_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
405e4d9d7fbfd1ca15493f66b49ac3772845dc926158d050a9880ad65c927ce4
AdRoll/rebar3_format
inline_items.erl
%% @doc All the lists of items in this module should be placed in a single line if they 're small enough , but one item %% per line if they're large. -module(inline_items). -format #{paper => 80}. -export([short_tuple/0, short_list/0, short_fun/0]). -export([short_bin/0, short_guard/1, short_lc/0]). -expo...
null
https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/after/src/inline_items/inline_items.erl
erlang
@doc All the lists of items in this module should be placed per line if they're large.
in a single line if they 're small enough , but one item -module(inline_items). -format #{paper => 80}. -export([short_tuple/0, short_list/0, short_fun/0]). -export([short_bin/0, short_guard/1, short_lc/0]). -export([short_bc/0, short_arglist/3]). -export([long_tuple/0, long_list/0, long_fun/0, long_bin/0, lon...
0d845f641039006a4917eedc7e288772cc35ba8004acec8c02a25a1eeb393912
ocsigen/ocsigenserver
revproxy.ml
Ocsigen * * Module revproxy.ml * Copyright ( C ) 2007 * * 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 exception ; * either version 2.1 of the...
null
https://raw.githubusercontent.com/ocsigen/ocsigenserver/d468cf464dcc9f05f820c35f346ffdbe6b9c7931/src/extensions/revproxy.ml
ocaml
* Reverse proxy for Ocsigen The reverse proxy is still experimental. * The table of redirections for each virtual server * Generate the pages from the request Is it a redirection? FIXME: we do not seem to handle GET parameters. Why? It is now safe to start processing next request. ...
Ocsigen * * Module revproxy.ml * Copyright ( C ) 2007 * * 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 exception ; * either version 2.1 of the...
ce96f28d936f1fe520255a2c66befb062eaa0252e5d6b511fc7c393f935d7902
FundingCircle/topology-grapher
config.clj
(ns topology-grapher.config) (def work-dir "/tmp/graphs")
null
https://raw.githubusercontent.com/FundingCircle/topology-grapher/c1e3518ef90f95097b3310d3d5cbd48750498e81/src/topology_grapher/config.clj
clojure
(ns topology-grapher.config) (def work-dir "/tmp/graphs")
6dc6171fd472223bab568165818bf3c2add85ce3b4afa695a6cfb30736022f92
dyzsr/ocaml-selectml
ambiguity.ml
(* TEST * expect *) [@@@warning "-8-11-12"] (* reduce the noise. *) type ('a, 'b) eq = Refl : ('a, 'a) eq;; [%%expect{| type ('a, 'b) eq = Refl : ('a, 'a) eq |}];; let ret_e1 (type a b) (b : bool) (wit : (a, b) eq) (x : a) (y : b) = match wit with | Refl -> if b then x else y | _ -> x ;; [%%expect{| Line 3,...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-gadts/ambiguity.ml
ocaml
TEST * expect reduce the noise.
type ('a, 'b) eq = Refl : ('a, 'a) eq;; [%%expect{| type ('a, 'b) eq = Refl : ('a, 'a) eq |}];; let ret_e1 (type a b) (b : bool) (wit : (a, b) eq) (x : a) (y : b) = match wit with | Refl -> if b then x else y | _ -> x ;; [%%expect{| Line 3, characters 29-30: 3 | | Refl -> if b then x else y ...
c7aca3ab8b2af581576af189013584872bcf6a425cf5c37081129b158a120fdd
ryantm/nixpkgs-update
Nix.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Nix ( assertNewerVersion, assertOldVersionOn, binPath, build, cachix, getAttrString, getChangelog, getDerivationFile, getDescription, getHash, getHashFromBuild, getHomep...
null
https://raw.githubusercontent.com/ryantm/nixpkgs-update/fd546296e7481ac1ab23350abbdbb33d4cf1ccec/src/Nix.hs
haskell
# LANGUAGE OverloadedStrings # Error if the "new version" is actually newer according to nix This is extremely slow but gives us the best results we know of lookup attrpath by nix-env if that fails, check by attrpath Get an attribute that can be evaluated off a derivation, as in: Sum the number of things that loo...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module Nix ( assertNewerVersion, assertOldVersionOn, binPath, build, cachix, getAttrString, getChangelog, getDerivationFile, getDescription, getHash, getHashFromBuild, getHomepage, getIsBroken, getMainta...
fe455057a23ae48c8e57ffcf5b6d5e0b4c00be6608af1cf765afe00d08e9cb01
ds-wizard/engine-backend
List_DELETE.hs
module Wizard.Specs.API.Locale.List_DELETE ( list_DELETE, ) where import Network.HTTP.Types import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Test.Hspec.Wai.Matcher import Wizard.Database.DAO.Locale.LocaleDAO import qualified Wizard.Database.Migration.Develop...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/0ec94a4b0545f2de8a4e59686a4376023719d5e7/engine-wizard/test/Wizard/Specs/API/Locale/List_DELETE.hs
haskell
------------------------------------------------------------------------ DELETE /locales ------------------------------------------------------------------------ ---------------------------------------------------- ---------------------------------------------------- ----------------------------------------------...
module Wizard.Specs.API.Locale.List_DELETE ( list_DELETE, ) where import Network.HTTP.Types import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Test.Hspec.Wai.Matcher import Wizard.Database.DAO.Locale.LocaleDAO import qualified Wizard.Database.Migration.Develop...
3db117d0fde6d8af30bccf20ca695ea858f9ba1aaf71076a7f70f175c5b26126
chris-taylor/Haskeme
Setup.hs
--#!/usr/bin/env runhaskell import Distribution.Simple main = defaultMain
null
https://raw.githubusercontent.com/chris-taylor/Haskeme/e9f9fc93c727c6127ac9e1d7e05f105a0fee4a38/Setup.hs
haskell
#!/usr/bin/env runhaskell
import Distribution.Simple main = defaultMain
18e2a66e0d6f434ca79b3b2ef08eb5953c93e3065d49e2a8911ab400fffc33a2
hyperfiddle/electric
electric_recursion.cljc
(ns user.electric.electric-recursion (:require [hyperfiddle.electric :as e] [hyperfiddle.rcf :refer [tests tap % with]])) (hyperfiddle.rcf/enable!) Electric compiler has n't implemented recursion syntax yet but the primitives are in place ; so you can do it with explicit dynamic vars all Electric d...
null
https://raw.githubusercontent.com/hyperfiddle/electric/2446937b21440bf4faed8123e2ee544110203cee/src-docs/user/electric/electric_recursion.cljc
clojure
so you can do it with explicit dynamic vars self recur reactive engine will reuse the topmost frame, it is still naive fib though
(ns user.electric.electric-recursion (:require [hyperfiddle.electric :as e] [hyperfiddle.rcf :refer [tests tap % with]])) (hyperfiddle.rcf/enable!) Electric compiler has n't implemented recursion syntax yet but the primitives are in place all Electric defs are dynamic (e/def Pong) (tests "recurs...
57d7739dbece189a54b9d5544ea02be7d8895fab5d6328ac7e561e1de449ccf5
dhess/sicp-solutions
ex1.44.scm
(define dx 0.00001) (define (smooth f) (define (ave a b c) (/ (+ a b c) 3)) (lambda (x) (ave (f (- x dx)) (f x) (f (+ x dx))))) (define (compose f g) (lambda (x) (f (g x)))) (define (inc x) (+ x 1)) (define (repeated f n) (define (repeated-iter i result) (if (= i n) result (repeated-...
null
https://raw.githubusercontent.com/dhess/sicp-solutions/2cf78db98917e9cb1252efda76fddc8e45fe4140/chap1/ex1.44.scm
scheme
(define dx 0.00001) (define (smooth f) (define (ave a b c) (/ (+ a b c) 3)) (lambda (x) (ave (f (- x dx)) (f x) (f (+ x dx))))) (define (compose f g) (lambda (x) (f (g x)))) (define (inc x) (+ x 1)) (define (repeated f n) (define (repeated-iter i result) (if (= i n) result (repeated-...
470698d6d1fd37b72f2243b2774bb1d3a93f3d8f0c335b4ae3e580338c8e0250
pyr/warp
layout.cljs
(ns warp.client.layout (:require [clojure.string :as str])) (defn h4 [& fragments] [:h4 (str/join " " fragments)]) (defn h3 [& fragments] [:h3 (str/join " " fragments)]) (defn h2 [& fragments] [:h2 (str/join " " fragments)]) (defn h1 [& fragments] [:h1 (str/join " " fragments)]) (defn link-to [...
null
https://raw.githubusercontent.com/pyr/warp/c3ee96d90b233a47c1104b4339fed071ec8afe68/src/warp/client/layout.cljs
clojure
(ns warp.client.layout (:require [clojure.string :as str])) (defn h4 [& fragments] [:h4 (str/join " " fragments)]) (defn h3 [& fragments] [:h3 (str/join " " fragments)]) (defn h2 [& fragments] [:h2 (str/join " " fragments)]) (defn h1 [& fragments] [:h1 (str/join " " fragments)]) (defn link-to [...
330ab164a269a14ceeb9393019b919a48e0c79715ff9ed6350dc5a373f4df7ce
mbenke/zpf2012
DotP.hs
{-# LANGUAGE ParallelArrays #-} {-# OPTIONS_GHC -fvectorise #-} module DotP where import qualified Prelude import Data.Array.Parallel import Data.Array.Parallel.Prelude import Data.Array.Parallel.Prelude.Double as D dotp_double :: [:Double:] -> [:Double:] -> Double dotp_double xs ys = D.sumP [:x * y | x <- xs | y <- ...
null
https://raw.githubusercontent.com/mbenke/zpf2012/faad6468f9400059de1c0735e12a84a2fdf24bb4/Code/dph/DotP.hs
haskell
# LANGUAGE ParallelArrays # # OPTIONS_GHC -fvectorise #
module DotP where import qualified Prelude import Data.Array.Parallel import Data.Array.Parallel.Prelude import Data.Array.Parallel.Prelude.Double as D dotp_double :: [:Double:] -> [:Double:] -> Double dotp_double xs ys = D.sumP [:x * y | x <- xs | y <- ys:] dotp_wrapper :: PArray Double -> PArray Double -> Double ...
a86e410f361c9a7abb0e3235f3d78e600dcbca1c25b899abb671a161f038f721
arenadotio/pgx
pgx_value.ml
open Sexplib0.Sexp_conv open Pgx_aux type v = string [@@deriving compare, sexp_of] type t = v option [@@deriving compare, sexp_of] exception Conversion_failure of string [@@deriving sexp_of] let convert_failure ?hint type_ s = let hint = match hint with | None -> "" | Some hint -> Printf.sprintf " (%s)...
null
https://raw.githubusercontent.com/arenadotio/pgx/5cc53c729e8ec5171d1909e47505137c7427c2c0/pgx/src/pgx_value.ml
ocaml
Skip if not encoded as hex Decode if encoded as hex FIXME: Slashes don't seem to round-trip properly optional match
open Sexplib0.Sexp_conv open Pgx_aux type v = string [@@deriving compare, sexp_of] type t = v option [@@deriving compare, sexp_of] exception Conversion_failure of string [@@deriving sexp_of] let convert_failure ?hint type_ s = let hint = match hint with | None -> "" | Some hint -> Printf.sprintf " (%s)...
02da211dfc23001a19393536c54002405d596372f36c7d4327100524b4533589
patricoferris/ocaml-multicore-monorepo
uutf.mli
--------------------------------------------------------------------------- Copyright ( c ) 2012 The uutf programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/uutf/src/uutf.mli
ocaml
* [encoding_of_string s] converts a (case insensitive) {{:-sets}IANA character set name} to an encoding. * [encoding_to_string e] is a {{:-sets}IANA character set name} for [e]. * The type for decoders. */* This function is dangerous, it may destroy the current continuation. But it's needed for t...
--------------------------------------------------------------------------- Copyright ( c ) 2012 The uutf programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) ...
c3f0b1319a2e8ee3008c69dbfefc60b673bc0cd8180cbb629350a8dd80c5add4
GetShopTV/swagger2
Generator.hs
# LANGUAGE GADTs # # LANGUAGE OverloadedLists # # LANGUAGE ScopedTypeVariables # module Data.Swagger.Schema.Generator where import Prelude () import Prelude.Compat import Control.Lens.Operators import Control.Monad ...
null
https://raw.githubusercontent.com/GetShopTV/swagger2/9846955d72e7242f3c1fa982911972cd9e4eb720/src/Data/Swagger/Schema/Generator.hs
haskell
| Note: 'schemaGen' may 'error', if schema type is not specified, and cannot be inferred.
# LANGUAGE GADTs # # LANGUAGE OverloadedLists # # LANGUAGE ScopedTypeVariables # module Data.Swagger.Schema.Generator where import Prelude () import Prelude.Compat import Control.Lens.Operators import Control.Monad ...
ba0ecf23d6e7ac9e0ea3481f15df628863835b49e336debc144a7bef6086bd8a
emqx/emqx-sn
emqx_sn_app.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/emqx-sn/8f94f68f3740c328bd905e5d4581d58e9013fbba/src/emqx_sn_app.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_sn_app). -behaviour(application). -emqx_plugin(protocol). -export([ start/2 , s...
efa2ecc7734cd420fdf679fee5dfaf2d2ffcbd836264a513b74f018d19373f64
akiss/akiss
util.ml
(****************************************************************************) (* Akiss *) Copyright ( C ) 2011 - 2014 Baelde , Ciobaca , Delaune , Kremer (* *) ...
null
https://raw.githubusercontent.com/akiss/akiss/5577c6bb31e463c18c1cb05430e344a2734c8407/src/util.ml
ocaml
************************************************************************** Akiss This program is free software; you can redistribute it and/or modify (at your option) an...
Copyright ( C ) 2011 - 2014 Baelde , Ciobaca , Delaune , Kremer it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy of the GNU General Public License along with ...
b6718c86c4a4c027cda05fe1797a0f5e5f1e047a7dbe122588876731d8adb050
dharmatech/abstracting
glu.scm
;;;; glu.scm (use easyffi) (cond-expand (msvc #> #define WIN32_LEAN_AND_MEAN 1 #include <windows.h> #include <GL/glu.h> <#) (else #> #ifdef C_MACOSX #include <OpenGL/glu.h> #else #include <GL/glu.h> #endif <#)) (foreign-parse #<<EOF ___declare(export_constants, yes) /* ___declare(substitu...
null
https://raw.githubusercontent.com/dharmatech/abstracting/9dc5d9f45a9de03c6ee379f1928ebb393dfafc52/support/chicken/glu/glu.scm
scheme
glu.scm /* 1-byte signed */ /* 1-byte unsigned */ /* single precision float */ /* double precision float */ The callback passed to gluTess/gluQuadric/gluNurbsCallback must be __stdcall in windows. Defining the however , I could n't figure out how ...
(use easyffi) (cond-expand (msvc #> #define WIN32_LEAN_AND_MEAN 1 #include <windows.h> #include <GL/glu.h> <#) (else #> #ifdef C_MACOSX #include <OpenGL/glu.h> #else #include <GL/glu.h> #endif <#)) (foreign-parse #<<EOF ___declare(export_constants, yes) /* ___declare(substitute, "^(GLU_|g...
06e63bb5ad1df4f49e0e717ef7161a778ab28c995365600f572493bd0d1f2c8e
nikita-volkov/rebase
Mutable.hs
module Rebase.Data.Vector.Storable.Mutable ( module Data.Vector.Storable.Mutable ) where import Data.Vector.Storable.Mutable
null
https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Vector/Storable/Mutable.hs
haskell
module Rebase.Data.Vector.Storable.Mutable ( module Data.Vector.Storable.Mutable ) where import Data.Vector.Storable.Mutable
a0ca0220a29db8adcf7b393bc88296bb7412195965fc341e66ead77c9fe65c80
wireless-net/erlang-nommu
wxFontPickerCtrl.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxFontPickerCtrl.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(wxFontPickerCtrl). -include("wxe....
120a53563f2de31dfa355aa32f02b2b7a18d460fec9e3c62d59ca47a5caa8f9c
ixmatus/orgmode-parse
Test.hs
module Main where import Content.Contents import Content.List import Content.Paragraph import Document import Drawer import Headline import Test.Tasty import Timestamps main :: IO () main = defaultMain tests tests :: TestTree tests = tes...
null
https://raw.githubusercontent.com/ixmatus/orgmode-parse/89adc4087556bb0dd58a7648a9e7e239463aa059/test/Test.hs
haskell
module Main where import Content.Contents import Content.List import Content.Paragraph import Document import Drawer import Headline import Test.Tasty import Timestamps main :: IO () main = defaultMain tests tests :: TestTree tests = tes...
571cf9ae246beb978209626d7ff15d6d1cc1329873e2a1d4ea8f426300fc708e
freizl/dive-into-haskell
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad.Trans.State import Control.Monad.Trans.Reader import Data.List import Control.Monad.Trans.Except import Control.Monad.Trans.Maybe (MaybeT(..)) import Control.Monad.IO.Class main :: IO () main = putStrLn "Hello, Haskell!" --- -- * StateT --- --...
null
https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/haskell-book/26/Main.hs
haskell
# LANGUAGE OverloadedStrings # - * StateT - Compare with default behavior (see `26.org`), what's the problem with this implementation? ^ NO. `s` is passing through all the way hence has to be same type. runStateT :: StateT s m a -> s -> m (a, s) - * Reader - why it is `r' -> r` instead of `r -> r'`...
module Main where import Control.Monad.Trans.State import Control.Monad.Trans.Reader import Data.List import Control.Monad.Trans.Except import Control.Monad.Trans.Maybe (MaybeT(..)) import Control.Monad.IO.Class main :: IO () main = putStrLn "Hello, Haskell!" 1 . given the ` runStateT ` , has to add ` Monad m ` co...
4dfa070379f88c0e1c2e932fb3f6c43daab110037988d6b87ee2908b69417186
mpelleau/AbSolute
out.ml
open Libabsolute open Signature open Picasso module Make (D : Domain) = struct let print_list ?(t = false) msg print l = Format.printf "%i %s" (List.length l) msg ; if t then List.iteri (fun i -> Format.printf "\nsol n°%i:\n%a" (i + 1) print) l ; Format.printf "\n" let blue e = ((150, 150, 255),...
null
https://raw.githubusercontent.com/mpelleau/AbSolute/8cdea2008161a7c4899db653b85da88b2fe79891/absolute-solver/out.ml
ocaml
text output on std out
open Libabsolute open Signature open Picasso module Make (D : Domain) = struct let print_list ?(t = false) msg print l = Format.printf "%i %s" (List.length l) msg ; if t then List.iteri (fun i -> Format.printf "\nsol n°%i:\n%a" (i + 1) print) l ; Format.printf "\n" let blue e = ((150, 150, 255),...
7aca3c6614c2f0e8b9b202faaecd8bddaec55587710556fbc45cec9c8c1c6dec
pixlsus/registry.gimp.org_static
layers-slices.scm
; Layers-slices script-fu ( c)2009 ;; This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 or higher . ;; v0.1 ; Function to delete "SLICE-" layers from the image (define (delete-layer image) (let* ( (layers (cadr...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/layers-slices.scm
scheme
Layers-slices script-fu This program is free software; you can redistribute it and/or modify v0.1 Function to delete "SLICE-" layers from the image Layer array Layer number Pick the layer to check extract the name delete the layer For each layer, check if the name begins with "SLICE-", create a dup...
( c)2009 it under the terms of the GNU General Public License version 3 or higher . (define (delete-layer image) (let* ( (name "") (layer 0) ) (while (>= i 0) (let* ( ) (set! i (- i 1)) (if (string-ci=? "slice-" (substring name 0 6)) ) ) ) ) ...
3bdb22acb1c1b1437f36671149951f1edb8bb08a35e0fb91aa6795f2a8cefe12
acl2/acl2
octal-digits-validation@useless-runes.lsp
(JAVA::GRAMMAR-OCT-DIGITP) (JAVA::GRAMMAR-OCT-DIGITP-SUFF) (JAVA::BOOLEANP-OF-GRAMMAR-OCT-DIGITP) (JAVA::GRAMMAR-OCT-DIGITP) (JAVA::SINGLETON-WHEN-GRAMMAR-OCT-DIGITP (452 450 (:REWRITE DEFAULT-CAR)) (450 450 (:REWRITE CAR-WHEN-ALL-EQUALP)) (368 48 (:REWRITE ABNF::TREE-TERMINATEDP-OF-CAR-WHEN-TREE-LIST-TERMINATEDP)) ...
null
https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/java/language/.sys/octal-digits-validation%40useless-runes.lsp
lisp
(JAVA::GRAMMAR-OCT-DIGITP) (JAVA::GRAMMAR-OCT-DIGITP-SUFF) (JAVA::BOOLEANP-OF-GRAMMAR-OCT-DIGITP) (JAVA::GRAMMAR-OCT-DIGITP) (JAVA::SINGLETON-WHEN-GRAMMAR-OCT-DIGITP (452 450 (:REWRITE DEFAULT-CAR)) (450 450 (:REWRITE CAR-WHEN-ALL-EQUALP)) (368 48 (:REWRITE ABNF::TREE-TERMINATEDP-OF-CAR-WHEN-TREE-LIST-TERMINATEDP)) ...
82477e2cd194761fbf62e4bdb95b52e3dcbbcbd1978391727d6207c891d08d69
input-output-hk/plutus-apps
Playground.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Plutus.Trace.Playground( PlaygroundTrace -- * Constructing traces ...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/8706e6c7c525b4973a7b6d2ed7c9d0ef9cd4ef46/plutus-contract/src/Plutus/Trace/Playground.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # * Constructing traces * Running traces * Interpreter ^ The contract ^ Wallets that should be simulated in the emulator
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TypeApplications # module Plutus.Trace.Playground( PlaygroundTrace , Waiting.waitUntilSlot , Waiting.waitNSlots , Waiting.nextSlot , EmulatedWalletAPI.payToWallet , RunContractPlayground.callEndpoint , EmulatorConf...
33ffb844fc1cdc7f01f5dac804f9e337135652e443d58deb3895c3fd21c35547
ice1000/learn
small-enough-beginner.hs
module Kata where smallEnough :: [Int] -> Int -> Bool smallEnough xs v = all (<= v) xs
null
https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/small-enough-beginner.hs
haskell
module Kata where smallEnough :: [Int] -> Int -> Bool smallEnough xs v = all (<= v) xs
b83b95fb9a3897305044346a0b8609b6a171a3c39d1442c8e0f14b7da5c6b0df
tsloughter/kuberl
kuberl_v1_component_condition.erl
-module(kuberl_v1_component_condition). -export([encode/1]). -export_type([kuberl_v1_component_condition/0]). -type kuberl_v1_component_condition() :: #{ 'error' => binary(), 'message' => binary(), 'status' := binary(), 'type' := binary() }. encode(#{ 'error' := Error, 'messa...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_component_condition.erl
erlang
-module(kuberl_v1_component_condition). -export([encode/1]). -export_type([kuberl_v1_component_condition/0]). -type kuberl_v1_component_condition() :: #{ 'error' => binary(), 'message' => binary(), 'status' := binary(), 'type' := binary() }. encode(#{ 'error' := Error, 'messa...
8bb5c9a4eee77b87ef03f1e73f460ae775562dbd74aeb0a4c1e554ad27e4b472
damn/cdq
selection_list.clj
(ns game.player.skill.selection-list (:use utils.core [engine.core :only (initialize)] engine.render (game settings ingame-gui session) (game.components core [render :only (rendering)] [ingame-loop :only (ingame-loop-comp)]) gam...
null
https://raw.githubusercontent.com/damn/cdq/5093dbdba91c445e403f53ce96ead05d5ed8262b/src/game/player/skill/selection_list.clj
clojure
this icon will be replaced during create-player-skillmanager and the correct icon for each mouse Hotkeys
(ns game.player.skill.selection-list (:use utils.core [engine.core :only (initialize)] engine.render (game settings ingame-gui session) (game.components core [render :only (rendering)] [ingame-loop :only (ingame-loop-comp)]) gam...
b4a72f2bbfb1c8d7892d5947c883f5e5d8c91f41171e7a4472812479e7d24409
sulami/spielwiese
single-byte-xor-cypher.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.List (minimumBy) import Data.Ord (comparing) import qualified Data.ByteString as BS import Matasano main = do let enc = "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736" options = [ replicate (BS.length enc) x | x <- [65....
null
https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/matasano/single-byte-xor-cypher.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Data.List (minimumBy) import Data.Ord (comparing) import qualified Data.ByteString as BS import Matasano main = do let enc = "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736" options = [ replicate (BS.length enc) x | x <- [65..90] ] test = (\w -> (score w...
54c8f98e8f9aefbdcc78cc5091ad7fd30a808605da11c0e506e5e053e0a3b57d
mit-plv/riscv-semantics
ExecuteClash.hs
module Platform.ExecuteClash where import Spec.Decode import Spec.Machine import qualified Spec.CSRField as Field import Spec.ExecuteI as I import Spec.ExecuteM as M import Spec.ExecuteCSR as CSR import Control.Monad import Control.Monad.Trans.Maybe import Prelude execute :: (RiscvMachine p t) => Instruction -> p () e...
null
https://raw.githubusercontent.com/mit-plv/riscv-semantics/1c0da3cac9d3f8dd813d26c0d2fbaccbb2210313/src/Platform/ExecuteClash.hs
haskell
I64Instruction i -> I64.execute i M64Instruction i -> M64.execute i
module Platform.ExecuteClash where import Spec.Decode import Spec.Machine import qualified Spec.CSRField as Field import Spec.ExecuteI as I import Spec.ExecuteM as M import Spec.ExecuteCSR as CSR import Control.Monad import Control.Monad.Trans.Maybe import Prelude execute :: (RiscvMachine p t) => Instruction -> p () e...
a624b78e3ba2eb58db16efda4830e55ef4fc4a4d62f6d751b8b35dca49b5c6b8
jtod/Hydra
Reg1Run.hs
-- Reg1Run: simulation driver for reg1 This file is part of Hydra . See README and Copyright ( c ) 2022 Module Main where import HDL.Hydra.Core.Lib import Reg1 main :: IO () main = reg1Run testData testData :: [String] testData = ------------------------ -- ld x output --------------...
null
https://raw.githubusercontent.com/jtod/Hydra/cf67a88050720acfff6a51b16d5f9efbd154dc1e/examples/register/Reg1Run.hs
haskell
Reg1Run: simulation driver for reg1 ---------------------- ld x output ---------------------- 0 output in cycle 0 is initial state 0 during this cycle can see result of state change 0 the 0 now becomes visible 0 no change Input data Input ports Circuit Run
This file is part of Hydra . See README and Copyright ( c ) 2022 Module Main where import HDL.Hydra.Core.Lib import Reg1 main :: IO () main = reg1Run testData testData :: [String] testData = 1 state changed to 1 at tick between cycles 0/1 1 no change 1 no change 1 still se...
d9222ec7de8ce4bd5d14f7d0dd81648002c0d7b0314344107545c189dc3dd950
AshleyYakeley/Truth
Test.hs
module Main ( main ) where import Options import Options.Applicative import Options.Applicative.Help hiding ((</>)) import Shapes import Shapes.Test parseResult :: Show a => ParserResult a -> Result String a parseResult (Success a) = SuccessResult a parseResult r = FailureResult $ show r testOptions :: [Stri...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/d704b8baaa77dac002922eccecdd91018c4b7eef/Pinafore/pinafore-app/app/main/Test.hs
haskell
module Main ( main ) where import Options import Options.Applicative import Options.Applicative.Help hiding ((</>)) import Shapes import Shapes.Test parseResult :: Show a => ParserResult a -> Result String a parseResult (Success a) = SuccessResult a parseResult r = FailureResult $ show r testOptions :: [Stri...
ffa9576a3ce8deaa49d7583a9469d6ae622bc926463d7f7c6c89e74911084b5c
glguy/advent2015
Day7.hs
# LANGUAGE DeriveFunctor # module Main where import Data.Bits import Data.Map (Map) import Data.Word import Text.Read (readMaybe) import qualified Data.Map as Map data Gate a = Gate1 Op1 a | Gate2 Op2 a a deriving Functor data Op1 = Not | Id data Op2 = And | Or | LShift | RShift main :: IO () main = do circuit1 <-...
null
https://raw.githubusercontent.com/glguy/advent2015/e59b93c41363be85eb7f11396db5c95e79e485ad/Day7.hs
haskell
| Build a circuit and compute output 'a' | Parse a line describing a gate in the circuit.
# LANGUAGE DeriveFunctor # module Main where import Data.Bits import Data.Map (Map) import Data.Word import Text.Read (readMaybe) import qualified Data.Map as Map data Gate a = Gate1 Op1 a | Gate2 Op2 a a deriving Functor data Op1 = Not | Id data Op2 = And | Or | LShift | RShift main :: IO () main = do circuit1 <-...
e4b1df84632770c4bef0537ebadc654d553eb0910e098de00d69ef7c8baed1a2
RichiH/git-annex
Win32Notify.hs
Win32 - notify interface - - Copyright 2013 < > - - License : BSD-2 - clause - - Copyright 2013 Joey Hess <> - - License: BSD-2-clause -} module Utility.DirWatcher.Win32Notify where import Common hiding (isDirectory) import Utility.DirWatcher.Types import System.Win32.Notify import qualified...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Utility/DirWatcher/Win32Notify.hs
haskell
Check each component of the path to see if it's ignored.
Win32 - notify interface - - Copyright 2013 < > - - License : BSD-2 - clause - - Copyright 2013 Joey Hess <> - - License: BSD-2-clause -} module Utility.DirWatcher.Win32Notify where import Common hiding (isDirectory) import Utility.DirWatcher.Types import System.Win32.Notify import qualified...
1654d766272a856779f0e52e45e3eb060d254661b85e8c4a61f106074ad4563b
shirok/Gauche
japanize.scm
-*- coding : utf-8 -*- ;;; This is just a joke. (define-syntax λ (syntax-rules () ((_ args body ...) (lambda args body ...)))) (define-syntax 定義 (syntax-rules (は) ((_ (f . args) body ...) (define (f . args) body ...)) ((_ var val) (define var val)) ((_ var は val) (define var val)))) ...
null
https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/examples/japanize.scm
scheme
This is just a joke. ----------------------------------------------- examples
-*- coding : utf-8 -*- (define-syntax λ (syntax-rules () ((_ args body ...) (lambda args body ...)))) (define-syntax 定義 (syntax-rules (は) ((_ (f . args) body ...) (define (f . args) body ...)) ((_ var val) (define var val)) ((_ var は val) (define var val)))) (define-syntax もし (synt...
dbb01330db3ee331b2c8af8a2aa012b7abf2552b0320b98a0657b1cc3e2e58e0
yzhs/ocamlllvm
unused_var.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet C...
null
https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/typing/unused_var.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 2004 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 . $ I d : unused_var.ml 11110 2011 - 07 -...
9e8c849680eef6a68f28f07adb796aff17daa454aaf0b5328938dad9c64c3843
input-output-hk/ouroboros-network
ChainProducerState.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE NamedFieldPuns # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} # OPTIONS_GHC -Wno - incomplete - uni - patterns # module Test.ChainProducerState ( ChainProducerStateTest (..) , ChainProducerStateForkTest (..) , tests ) where import Data.L...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/2793b6993c8f6ed158f432055fa4ef581acdb661/ouroboros-network-protocols/testlib/Test/ChainProducerState.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # Properties | Check that followers start in the expected state, at the right point and in the rollback state. | As above but check that when we move the follower on by one, from the rollback state, they stay at the same point but...
# LANGUAGE NamedFieldPuns # # OPTIONS_GHC -Wno - incomplete - uni - patterns # module Test.ChainProducerState ( ChainProducerStateTest (..) , ChainProducerStateForkTest (..) , tests ) where import Data.List (unfoldr) import qualified Data.Map as Map import Test.QuickCheck import ...
609400ccd065614d721a74eb8ff0d45968959f30e398e0ee5583fdfebed8f3d5
skroutz/clj-skroutz
favorite_lists.clj
(ns clj_skroutz.favorite_lists "Implements user favorite lists endpoints. /" (:use [clj_skroutz.core :refer [api-call]])) (defn all "Lists all favorite lists of a user. /#list-favorite-lists" [& options] (api-call :get "favorite_lists" [] options)) (defn create "Creates a new favorite list. ...
null
https://raw.githubusercontent.com/skroutz/clj-skroutz/25c6c32f5ac8d5ea082ef4dbede6720f74d15ef0/src/clj_skroutz/favorite_lists.clj
clojure
(ns clj_skroutz.favorite_lists "Implements user favorite lists endpoints. /" (:use [clj_skroutz.core :refer [api-call]])) (defn all "Lists all favorite lists of a user. /#list-favorite-lists" [& options] (api-call :get "favorite_lists" [] options)) (defn create "Creates a new favorite list. ...
0c25f6646bebc52386a4460410e3ee03eff4c3573d59e634330b19baeb918bb6
cram-code/cram_core
offline-episode-knowledge.lisp
;;; Copyright ( c ) 2009 - 2010 ;;; 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 o...
null
https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_execution_trace/src/episode-knowledge/offline-episode-knowledge.lisp
lisp
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. * Redi...
Copyright ( c ) 2009 - 2010 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 OWNER OR LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,...
9119229d96ca2d0027024ec4e505302399f7ba3f1ac73457d16f081a211bd3d2
CryptoKami/cryptokami-core
Lens.hs
# LANGUAGE TypeOperators # -- | Lenses for main blockchain types. -- Lenses whose name starts with ` mainBlock ' are from ' MainBlock ' to -- small parts of it. It makes it clear what exactly is stored in ' MainBlock ' . Similar fact is true for ` mainHeader ' prefix . module Pos.Core.Block.Main.Lens ( ...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/core/Pos/Core/Block/Main/Lens.hs
haskell
| Lenses for main blockchain types. small parts of it. It makes it clear what exactly is stored in * MainToSign * Extra types * MainConsensusData * MainBlockHeader * MainBody -------------------------------------------------------------------------- MainToSign --------------------------------------------------...
# LANGUAGE TypeOperators # Lenses whose name starts with ` mainBlock ' are from ' MainBlock ' to ' MainBlock ' . Similar fact is true for ` mainHeader ' prefix . module Pos.Core.Block.Main.Lens ( msHeaderHash , msBodyProof , msSlot , msChainDiff , msExtraHeader ...
8e1c3b7f6c10491f7000d8e0bf98a6bca5e169709c607698c006577c92fd7cd2
Clojure2D/clojure2d-examples
interval.clj
(ns rt4.in-one-weekend.ch10b.interval (:refer-clojure :exclude [empty]) (:require [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol IntervalProto (contains [interval x]) ;; a <= x <= b ;; introduced due to the bug in the bo...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/in_one_weekend/ch10b/interval.clj
clojure
a <= x <= b introduced due to the bug in the book (in the time of writing this code), a < x <= b
(ns rt4.in-one-weekend.ch10b.interval (:refer-clojure :exclude [empty]) (:require [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol IntervalProto (contains- [interval x]) (clamp [interval x])) (defrecord Interval [^double...
1e713de51bc8e02a0758ddc1a9c52030fc77c73981f557b673577e41777c7c5c
cedlemo/OCaml-GI-ctypes-bindings-generator
Recent_filter_info.mli
open Ctypes type t val t_typ : t structure typ val f_contains: (Recent_filter_flags.t_list, t structure) field val f_uri: (string, t structure) field val f_display_name: (string, t structure) field val f_mime_type: (string, t structure) field Struct field Recent_filter_info : C Array type for Types . Array tag tag no...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Recent_filter_info.mli
ocaml
open Ctypes type t val t_typ : t structure typ val f_contains: (Recent_filter_flags.t_list, t structure) field val f_uri: (string, t structure) field val f_display_name: (string, t structure) field val f_mime_type: (string, t structure) field Struct field Recent_filter_info : C Array type for Types . Array tag tag no...
cf66f75cb1f0de0a64dba7b50e10068f4c8f7f531429bc6b44b464d4e24e1035
danilkolikov/dfl
ParserError.hs
# LANGUAGE FlexibleContexts # | Module : Frontend . Syntax . ParserError Description : Functions for handling parser errors Copyright : ( c ) , 2019 License : MIT Functions for handling errors of Module : Frontend.Syntax.ParserError Description : Functions for handling pa...
null
https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Syntax/ParserError.hs
haskell
a source position a source location Helper functions | Get tokens from an ErrorItem
# LANGUAGE FlexibleContexts # | Module : Frontend . Syntax . ParserError Description : Functions for handling parser errors Copyright : ( c ) , 2019 License : MIT Functions for handling errors of Module : Frontend.Syntax.ParserError Description : Functions for handling pa...
7a0d8ef98bb1b12daab0bcb194348df116be1fcc9c7f44b4dfd6bd6d31861903
vyos/vyconf
config_tree.mli
type value_behaviour = AddValue | ReplaceValue exception Duplicate_value exception Node_has_no_value exception No_such_value exception Useless_set type config_node_data = { values : string list; comment : string option; inactive : bool; ephemeral : bool; } [@@deriving yojson] type t = config_node_data Vytree...
null
https://raw.githubusercontent.com/vyos/vyconf/dd9271b4304c6b1a5a2576821d1b2b8fd3aa6bf5/src/config_tree.mli
ocaml
type value_behaviour = AddValue | ReplaceValue exception Duplicate_value exception Node_has_no_value exception No_such_value exception Useless_set type config_node_data = { values : string list; comment : string option; inactive : bool; ephemeral : bool; } [@@deriving yojson] type t = config_node_data Vytree...
cf8efb273ba287d61f668e7fbff5c47c13a8c91f5b5340418de1104a20dc050c
sebashack/servantRestfulAPI
BreadCrumbs.hs
module HelperLibs.SCalendar.BreadCrumbs where import Control.Monad import HelperLibs.SCalendar.DataTypes import qualified Data.Set as S import qualified Data.Time as TM import qualified Data.Text as T BreadCrumbs to move around the calendar -- data Crumb = LeftCrumb (From, To) Q QN Calendar | RightCrum...
null
https://raw.githubusercontent.com/sebashack/servantRestfulAPI/e625535d196acefaff4f5bf03108816be668fe4d/libs/HelperLibs/SCalendar/BreadCrumbs.hs
haskell
module HelperLibs.SCalendar.BreadCrumbs where import Control.Monad import HelperLibs.SCalendar.DataTypes import qualified Data.Set as S import qualified Data.Time as TM import qualified Data.Text as T data Crumb = LeftCrumb (From, To) Q QN Calendar | RightCrumb (From, To) Q QN Calendar derivin...
ec97707d3915c769c95a623c6f9b01a9a2060451d1eb6cf65d1bae70e45899d5
JustusAdam/language-haskell
CommentLike.hs
SYNTAX TEST " source.haskell " " Test ending of comment - like blocks " {- a b -} a b -- ^^^^^^^^^ comment.block.haskell -- ^ ^ - comment.block.haskell {-$ a b -} a b -- ^^^^^^^^^^ comment.block.documentation.haskell -- ^ ^ - comment.block.documentation.haskell # SPECIALISE foo : :...
null
https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tests/CommentLike.hs
haskell
a b ^^^^^^^^^ comment.block.haskell ^ ^ - comment.block.haskell $ a b ^^^^^^^^^^ comment.block.documentation.haskell ^ ^ - comment.block.documentation.haskell ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.preprocessor.haskell ^ ^ - meta.preprocessor.haskell @...
SYNTAX TEST " source.haskell " " Test ending of comment - like blocks " # SPECIALISE foo : : a - > b # ^ ^ storage.type.haskell @ type NonEmpty a = { v:[a ] | 0 < len v } @ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ block.liquidhaskell.haskell
da0c68e31c1f9142d200d98d78de8197824160c334e417bf1eaa1f7ad525f70b
jolby/colors
core.cljc
by April 16 , 2010 Copyright ( c ) , 2010 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this ;; distribution. By using this software in any fashion, you a...
null
https://raw.githubusercontent.com/jolby/colors/30607e456cb7e80bc5b58f04b59505db92ae728e/src/com/evocomputing/colors/palettes/core.cljc
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
by April 16 , 2010 Copyright ( c ) , 2010 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns com.evocomputing.colors.palettes.core (:use [com.evocomputing.colors :only (create-color)])) (defn inclusive-seq "Return n evenly spaced points along th...
893f91e9a3b94dc1722984d8e74f1c83fffae8d8154e57596f81ebc9cd653b41
raydeejay/cl-microvm
opcodes.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*- (in-package #:cl-microvm) ;; when the opcode is executed the PC is already past the operands ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; OPCODES (defun illegal (&rest args) (declare (ignore args)) (error "Illegal opcode")) (defpara...
null
https://raw.githubusercontent.com/raydeejay/cl-microvm/65e1d11c251f28198ed199bd2d66aa3cdd34a7c8/opcodes.lisp
lisp
Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*- when the opcode is executed the PC is already past the operands OPCODES 1OP some (or all) operators can take both an address (which can represent memory/registers/ports/stack?) or a literal/constant operators can take both an indirection (which can represent ...
(in-package #:cl-microvm) (defun illegal (&rest args) (declare (ignore args)) (error "Illegal opcode")) (defparameter *opcodes* (make-array '(32) :initial-element #'illegal)) (defparameter *opcode-names* (make-array '(32) :initial-element 'illegal)) (defmacro define-opcode (number name args &body body) `(let...
72a5305475937e8d29305017eccd6b3f38300272210288f2761e71e79bd15654
dbushenko/scotty-blog-postgres
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Db import Views import Auth import Domain import Web.Scotty import Web.Scotty.Internal.Types (ActionT) import Network.Wai import Network.Wai.Middleware.Static import Network.Wai.Middleware.RequestLogger (logStdoutDev, logStdout) import Network.Wai.Middlewar...
null
https://raw.githubusercontent.com/dbushenko/scotty-blog-postgres/bc5d12caf6b3052c6b6ac7023c8fe3fdd7912979/src/Main.hs
haskell
# LANGUAGE OverloadedStrings # The function knows which resources are available only for the authenticated users all requests to /admin/* should be authenticated other requests are allowed for anonymous users serve static files check if the user is authenticated for protected resources function which restricts a...
module Main where import Db import Views import Auth import Domain import Web.Scotty import Web.Scotty.Internal.Types (ActionT) import Network.Wai import Network.Wai.Middleware.Static import Network.Wai.Middleware.RequestLogger (logStdoutDev, logStdout) import Network.Wai.Middleware.HttpAuth import Control.Applicati...
3ff293021162f585d8f44183b683ce19bf52a93f2d74f35348e1890bbd5b0ad6
blynn/compiler
wrap4.hs
GHC wrapper for " methodically " and friends . $ cc -c stub.c -- $ ghci wrap4.hs stub.o # , LambdaCase # # LANGUAGE CPP # # LANGUAGE TupleSections # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE FlexibleInstances # # LANGUAGE QuasiQuotes # # LANGUAGE ExtendedDefaultRules # import Prelude (Bool(..), Char, Int,...
null
https://raw.githubusercontent.com/blynn/compiler/b9fe455ad4ee4fbabe77f2f5c3c9aaa53cffa85b/wrap4.hs
haskell
$ ghci wrap4.hs stub.o
GHC wrapper for " methodically " and friends . $ cc -c stub.c # , LambdaCase # # LANGUAGE CPP # # LANGUAGE TupleSections # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE FlexibleInstances # # LANGUAGE QuasiQuotes # # LANGUAGE ExtendedDefaultRules # import Prelude (Bool(..), Char, Int, Word, String, IO) import ...
b5a29d240d7125aec885745134dce7acf31ef2f6ac479311bfed0bd2e98311f0
pbevin/cardelli
Parse.hs
module Parse(parseExpr, parseFun) where import Control.Applicative hiding (many, optional, (<|>)) import Control.Monad import Text.Parsec import Text.Parsec.String import Text.Parsec.Expr import qualified Text.Parsec.Token as T import Text.Parsec.Language (emptyDef) import VarName import AST funStyle :: T.LanguageDe...
null
https://raw.githubusercontent.com/pbevin/cardelli/bf239351289d379796fa68c25bb6c56be0e67925/hs/src/Parse.hs
haskell
Exp ::= "if" Exp "then" Exp "else" Exp | "fun" "(" Ide ")" Exp | Exp "(" Exp ")" | "let" Decl "in" Exp | "(" Exp ")" Decl ::=
module Parse(parseExpr, parseFun) where import Control.Applicative hiding (many, optional, (<|>)) import Control.Monad import Text.Parsec import Text.Parsec.String import Text.Parsec.Expr import qualified Text.Parsec.Token as T import Text.Parsec.Language (emptyDef) import VarName import AST funStyle :: T.LanguageDe...
ef501effd1db575677448a2281ff517a9568e554b9273b740091e7077f2c55d0
zachjs/sv2v
Interface.hs
# LANGUAGE PatternSynonyms # sv2v - Author : < > - - Conversion for interfaces - Author: Zachary Snow <> - - Conversion for interfaces -} module Convert.Interface (convert) where import Data.List (intercalate, (\\)) import Data.Maybe (isJust, isNothing, mapMaybe) import Control.Monad.Writer.Stric...
null
https://raw.githubusercontent.com/zachjs/sv2v/e00582de8f1ccf9b4ad1f1a262eb43c27cdcc1bd/src/Convert/Interface.hs
haskell
we can only collect/map non-extern interfaces and modules multidimensional instances need to be flattened before this conversion can proceed inline instantiation of an interface inline instantiation of a module elaborates and resolves provided modport bindings determines the underlying modport and interface inst...
# LANGUAGE PatternSynonyms # sv2v - Author : < > - - Conversion for interfaces - Author: Zachary Snow <> - - Conversion for interfaces -} module Convert.Interface (convert) where import Data.List (intercalate, (\\)) import Data.Maybe (isJust, isNothing, mapMaybe) import Control.Monad.Writer.Stric...
5c61ed36b99204fafb4bcbb0664c16766c8c2241c4d76db7bdbdac257f768b8e
ucsd-progsys/liquidhaskell
Main.hs
module Main where import Test.Tasty import ErrorFilterReportTests main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "Tests" errorFilterReportTests
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/tasty/Main.hs
haskell
module Main where import Test.Tasty import ErrorFilterReportTests main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "Tests" errorFilterReportTests
f6f236c2d91cff5eb5da062cdf83ecc048d7ebabb87b328cd378c543e911911c
LambdaHack/LambdaHack
Frequency.hs
# LANGUAGE DeriveGeneric , DeriveTraversable , TupleSections # -- | A list of entities with relative frequencies of appearance. module Game.LambdaHack.Core.Frequency ( -- * The @Frequency@ type Frequency -- * Construction , uniformFreq, toFreq, maxBoundInt32 -- * Transformation , scaleFreq -- * Co...
null
https://raw.githubusercontent.com/LambdaHack/LambdaHack/d1c429d729c503790c44dca43a8e57ae6354f801/definition-src/Game/LambdaHack/Core/Frequency.hs
haskell
| A list of entities with relative frequencies of appearance. * The @Frequency@ type * Construction * Transformation * Consumption | The frequency distribution type. Not normalized (operations may or may not group the same elements and sum their frequencies). However, The @Eq@ instance compares raw representat...
# LANGUAGE DeriveGeneric , DeriveTraversable , TupleSections # module Game.LambdaHack.Core.Frequency Frequency , uniformFreq, toFreq, maxBoundInt32 , scaleFreq , nullFreq, runFrequency, nameFrequency ) where import Prelude () import Game.LambdaHack.Core.Prelude import Control.Applicative import Data.Int ...
9cfb85cee14167e7858bf602f447f8ca07cb83fdab19f0abe90df249225843bb
HealthSamurai/dojo.clj
15_destructuring_test.clj
(ns koans.15-destructuring-test (:require [koans.engine :refer :all])) (def test-address {:street-address "123 Test Lane" :city "Testerville" :state "TX"}) (meditations "Destructuring is an arbiter: it breaks up arguments" (= __ ((fn [[a b]] (str b a)) [:foo :bar])) "Wheth...
null
https://raw.githubusercontent.com/HealthSamurai/dojo.clj/94922640f534897ab2b181c608b54bfbb8351d7b/test/koans/15_destructuring_test.clj
clojure
(ns koans.15-destructuring-test (:require [koans.engine :refer :all])) (def test-address {:street-address "123 Test Lane" :city "Testerville" :state "TX"}) (meditations "Destructuring is an arbiter: it breaks up arguments" (= __ ((fn [[a b]] (str b a)) [:foo :bar])) "Wheth...
3de122a8926683d2a021edf0778ab48681cb0e3bbc2be341bd8163f1e769dbad
technomancy/grenchman
repl.ml
open Core.Std open Async.Std let repl_message input session = ([("session", session); ("op", "eval"); ("id", "repl-" ^ (Uuid.to_string (Uuid.create ()))); ("ns", ! Client.ns); ("code", input)], Nrepl.print_all) let dummy_message session = ([("session", session); ("op", "eval"); ("id", "...
null
https://raw.githubusercontent.com/technomancy/grenchman/713689773402dc329ea36b183b721552d7fd02cf/repl.ml
ocaml
open Core.Std open Async.Std let repl_message input session = ([("session", session); ("op", "eval"); ("id", "repl-" ^ (Uuid.to_string (Uuid.create ()))); ("ns", ! Client.ns); ("code", input)], Nrepl.print_all) let dummy_message session = ([("session", session); ("op", "eval"); ("id", "...
eaa47f1c1d4727fc22ab4cea0eace7ca8d0b64ef2e65dcc969d420ff74c8fa36
tezos/tezos-mirror
injector_operation.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/8a1c0d2236bfa9c0143704ac0cdacb6e89b208b0/src/lib_injector/injector_operation.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Nomadic Labs , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN A...
8c5fe3863f4f5a58d64f4cb755530ebfc3d2ef6464687ecddeedf14b29f07143
grin-compiler/grin
Util.hs
# LANGUAGE LambdaCase , FlexibleContexts , RecordWildCards # module Transformations.ExtendedSyntax.Util where import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe import Control.Monad import Control.Monad.State import Control.Monad.Trans.Except import Control.Comonad import Control.Comonad.Cofree...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Transformations/ExtendedSyntax/Util.hs
haskell
apply a function to all @Name@s in a @Val@ TODO: replace at use sites with mapValVal :: (Val -> Val) -> Val -> Val mapValVal f val = case f val of ConstTagNode tag vals -> ConstTagNode tag (map (mapValVal f) vals) val -> val NOTE: does not recurse into alts NOTE: does not recurse into alts...
# LANGUAGE LambdaCase , FlexibleContexts , RecordWildCards # module Transformations.ExtendedSyntax.Util where import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe import Control.Monad import Control.Monad.State import Control.Monad.Trans.Except import Control.Comonad import Control.Comonad.Cofree...
97766f86308b4232a552f8e2a856f55ad7cfa9592f5ac893799c81278d81a4e1
music-suite/music-suite
NewTTStuff.hs
sameDurations :: Voice a -> Voice b -> Bool mergeIfSameDuration :: Voice a -> Voice b -> Maybe (Voice (a, b)) mergeIfSameDurationWith :: (a -> b -> c) -> Voice a -> Voice b -> Maybe (Voice c) -- TODO relate to Splittable splitAt :: splitAt :: [Duration] -> Voice a -> [Voice a] -- This is a specificat...
null
https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/sketch/old/NewTTStuff.hs
haskell
TODO relate to Splittable This is a specification Compare music21's Stream.chordify More generally Position of each value Note that eraMap for Track Same as Foldable.toList Up to meta-data... More interesting for score... List functions as voice functions for free TODO this *only* works with fully polymorphi...
sameDurations :: Voice a -> Voice b -> Bool mergeIfSameDuration :: Voice a -> Voice b -> Maybe (Voice (a, b)) mergeIfSameDurationWith :: (a -> b -> c) -> Voice a -> Voice b -> Maybe (Voice c) splitAt :: splitAt :: [Duration] -> Voice a -> [Voice a] splitTiesVoiceAt : : a = > [ Duration ] - > Voice...
d96190fd6fe7a0eb481b8286b883bf39684ee512b70376a643f71893f3eb7c01
schlepfilter/frp
keyboard_shortcuts.cljs
(ns examples.rx.keyboard-shortcuts (:require [clojure.string :as str] [cats.core :as m] [cljsjs.mousetrap] [com.rpl.specter :as s] [frp.core :as frp] [frp.clojure.core :as core])) (def combine (comp (partial str/join "+") vector)) (def placeholde...
null
https://raw.githubusercontent.com/schlepfilter/frp/4a889f0aefd3aa17371fe1f0cdfabdad01fece8f/examples/src/examples/rx/keyboard_shortcuts.cljs
clojure
(ns examples.rx.keyboard-shortcuts (:require [clojure.string :as str] [cats.core :as m] [cljsjs.mousetrap] [com.rpl.specter :as s] [frp.core :as frp] [frp.clojure.core :as core])) (def combine (comp (partial str/join "+") vector)) (def placeholde...
3a9679335c5ba1ac44382925fb4f5cb0f4c183dbb089c5e12849bd0d106a88a9
korya/efuns
test2.ml
let switch_knowm x = let y = None in match y with None -> x + 2 | Some z -> x + z let orororor x1 x2 x3 x4 = x1 lor (x2 lsl 8) lor (x3 lsl 16) lor (x4 lsl 24) let deadcode x y z = let zz = y+z in let w = y*2 + zz in (x+1,y+2,z+3) let loop () = while true do () done let set buf pos c = buf.[...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/inliner/tests/test2.ml
ocaml
let switch_knowm x = let y = None in match y with None -> x + 2 | Some z -> x + z let orororor x1 x2 x3 x4 = x1 lor (x2 lsl 8) lor (x3 lsl 16) lor (x4 lsl 24) let deadcode x y z = let zz = y+z in let w = y*2 + zz in (x+1,y+2,z+3) let loop () = while true do () done let set buf pos c = buf.[...
8acde4fc686f5b450fa78483b77bfb56cba3edcf1f395bd346053d0fb49a4dd3
S8A/htdp-exercises
ex079.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-reader.ss" "lang")((modname ex079) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex079.rkt
racket
about the language level of this file in a form that our tools can easily process. — "white" — "yellow" — "orange" — "green" — "red" — "blue" — "black" interpretation represents a happiness value A low happiness value A medium happiness value A high happiness value A Person is a structure: (make-person ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex079) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ...
777fed77c10d302afd03430fb12f504246910cba2a32207ec935bb2afb90dfbe
Workiva/flowgraph
queue.clj
Copyright 2016 - 2019 Workiva Inc. ;; 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 distri...
null
https://raw.githubusercontent.com/Workiva/flowgraph/0a17a000fb6e8e8dcb072bbd0c0f3409f36ee545/src/flowgraph/queue.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2016 - 2019 Workiva Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns flowgraph.queue (:require [flowgraph.protocols :as p :refer :all] [flowgraph.error :refer [raise-queue-err]] [recide.core :refer [insist]] [recide.sanex :as sanex] ...
6a95c73f5d46941cab94608f65a2a060998862cd1ff2aad9588da2fc4473e645
EMSL-NMR-EPR/Haskell-MFAPipe-Executable
Strict.hs
----------------------------------------------------------------------------- -- | -- Module : Data.Graph.Inductive.Graph.Extras.Node.Strict Copyright : 2016 - 17 Pacific Northwest National Laboratory -- License : ECL-2.0 (see the LICENSE file in the distribution) -- -- Maintainer : -- Stability ...
null
https://raw.githubusercontent.com/EMSL-NMR-EPR/Haskell-MFAPipe-Executable/8a7fd13202d3b6b7380af52d86e851e995a9b53e/fgl-extras/src/Data/Graph/Inductive/Graph/Extras/Node/Strict.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Graph.Inductive.Graph.Extras.Node.Strict License : ECL-2.0 (see the LICENSE file in the distribution) Maintainer : Stability : experimental Portability : portable This module exports assorted functions...
Copyright : 2016 - 17 Pacific Northwest National Laboratory module Data.Graph.Inductive.Graph.Extras.Node.Strict ( module Data.Graph.Inductive.Graph.Extras.Node , partitionNodes , partitionLabNodes ) where import Data.Graph.Inductive.Graph (Graph(), LNode, Node) import qualified Data.Graph.Inductive....
e6cd64f5a503862e4d7bd7675e39d6958559229790944f4e120fdfcddcc9eaaf
CloudI/CloudI
proper_tests.erl
-*- coding : utf-8 ; erlang - indent - level : 2 -*- %%% ------------------------------------------------------------------- Copyright 2010 - 2021 < > , < > and < > %%% This file is part of PropEr . %%% %%% PropEr is free software: you can redistribute it and/or mo...
null
https://raw.githubusercontent.com/CloudI/CloudI/c47b4f94525dfaf7c33328c2e50f8611c11a9565/src/external/proper/test/proper_tests.erl
erlang
------------------------------------------------------------------- PropEr is free software: you can redistribute it and/or modify (at your option) any later version. PropEr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITN...
-*- coding : utf-8 ; erlang - indent - level : 2 -*- Copyright 2010 - 2021 < > , < > and < > This file is part of PropEr . it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ...
1d1863f610d864d69b7785584ccbc5c9c615f4022ae5956487975bd031717ca5
sorawee/helpful
suggest.rkt
#lang racket/base (provide suggest) (require racket/match racket/list racket/string levenshtein "doc.rkt") ;; find-closest :: string? (listof string?) -> (or/c string? #f) (define (find-closest id xs) (match xs ;; in a #lang that has empty namespace, empty xs might be possib...
null
https://raw.githubusercontent.com/sorawee/helpful/47e4bf05db259208321105f653ea4bc975cd42cb/suggest.rkt
racket
find-closest :: string? (listof string?) -> (or/c string? #f) in a #lang that has empty namespace, empty xs might be possible get-locals :: identifier? -> (hash/c symbol? #t) prioritize non-required identifiers import->string :: (listof symbol?) #:before-first string? -> string? suggest :: identifier? #:closest? ...
#lang racket/base (provide suggest) (require racket/match racket/list racket/string levenshtein "doc.rkt") (define (find-closest id xs) (match xs ['() #f] [_ (argmin (λ (x) (string-levenshtein id x)) xs)])) (define (get-locals x) (for/hasheq ([v (in-list (syntax-bound...
9c8e8b00bf3d0db71ccda9b8625ed0044c586fdb54922e544a5609878bf6f191
haskell-numerics/random-fu
Weibull.hs
# LANGUAGE MultiParamTypeClasses , FlexibleInstances , UndecidableInstances , FlexibleContexts # module Data.Random.Distribution.Weibull where import Data.Random.Distribution import Data.Random.Distribution.Uniform data Weibull a = Weibull { weibullLambda :: !a, weibullK :: !a } deriving (Eq, Show) instance (Flo...
null
https://raw.githubusercontent.com/haskell-numerics/random-fu/18a6ba6b29c7ca3b3ff34ea6ca0eca910da72726/random-fu/src/Data/Random/Distribution/Weibull.hs
haskell
# LANGUAGE MultiParamTypeClasses , FlexibleInstances , UndecidableInstances , FlexibleContexts # module Data.Random.Distribution.Weibull where import Data.Random.Distribution import Data.Random.Distribution.Uniform data Weibull a = Weibull { weibullLambda :: !a, weibullK :: !a } deriving (Eq, Show) instance (Flo...
64ec33a106f54e384bd1ec3fab045260e2cde4fd6e90f5f87264a57cfbf10a37
brendanhay/gogol
Product.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/8cbceeaaba36a3c08712b2e272606161500fbe91/lib/services/gogol-apps-calendar/gen/Gogol/AppsCalendar/Internal/Product.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated * AclRule * AclRule_Scope * Calendar * CalendarListEntry * CalendarListEntry_NotificationSettings * Channel * Channel_Params * ColorDefinition * Colors * Colors_Event * ConferenceParameters * ConferenceParametersAddOnPar...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
88ccbdd8cb7dbedc43364e7c1a387efadb455950adeea18c506fc60f0208c808
cloojure/tupelo
uuid.clj
(ns tst.tupelo.uuid (:use tupelo.core tupelo.test) (:refer-clojure :exclude [rand]) (:require [tupelo.uuid :as uuid])) (verify (is= "00000000-0000-0000-0000-000000000000" (uuid/null-str) (str (uuid/null))) (is= "cafebabe-1953-0510-0970-0123456789ff" (uuid/dummy-str) (str (uuid/dummy))) ...
null
https://raw.githubusercontent.com/cloojure/tupelo/dbb4b12fd6f379803a74a6bdcf54726597ec0fdf/test/clj/tst/tupelo/uuid.clj
clojure
we return uuids as an object or a string if no failures, we pass the test demonstrate uuid/with-null usage for testing demonstrate uuid/with-counted for testing demonstrate uuid/counted (manual)
(ns tst.tupelo.uuid (:use tupelo.core tupelo.test) (:refer-clojure :exclude [rand]) (:require [tupelo.uuid :as uuid])) (verify (is= "00000000-0000-0000-0000-000000000000" (uuid/null-str) (str (uuid/null))) (is= "cafebabe-1953-0510-0970-0123456789ff" (uuid/dummy-str) (str (uuid/dummy))) ...
832c2706d8bcfbe4264e23895cfdffce6b5f49905874a2b682ad1edac9430596
kiranlak/austin-sbst
symbolic.ml
open Cil open Utils module Log = LogManager type symbolic_state = {s : exp ExpHashtbl.t; u : exp ExpHashtbl.t} let symStack : (lval option * symbolic_state) list ref = ref [] let state : symbolic_state ref = ref {s=ExpHashtbl.create 100; u=ExpHashtbl.create 10} class rewriteVisitor = object(this) inherit nopCilVi...
null
https://raw.githubusercontent.com/kiranlak/austin-sbst/9c8aac72692dca952302e0e4fdb9ff381bba58ae/AustinOcaml/symbolic/symbolic.ml
ocaml
push current state onto stack each expr is joined by LAnd each atomicAlia is joined by LOr
open Cil open Utils module Log = LogManager type symbolic_state = {s : exp ExpHashtbl.t; u : exp ExpHashtbl.t} let symStack : (lval option * symbolic_state) list ref = ref [] let state : symbolic_state ref = ref {s=ExpHashtbl.create 100; u=ExpHashtbl.create 10} class rewriteVisitor = object(this) inherit nopCilVi...
0ada0108f6b9790e95ff8719248c67d9ea4a560ae361302db873ee134967b1c7
slagyr/gaeshi
mail_spec.clj
(ns gaeshi.mail-spec (:use [speclj.core] [gaeshi.mail] [gaeshi.spec-helpers.mail]) (:import [com.google.appengine.api.mail MailService])) (describe "Mail" (it "converts a simple map into a message" (let [message (map->message {:bcc "" :cc "" ...
null
https://raw.githubusercontent.com/slagyr/gaeshi/a5677ed1c8d9269d412f07a7ab33bbc40aa7011a/gaeshi/spec/gaeshi/mail_spec.clj
clojure
(ns gaeshi.mail-spec (:use [speclj.core] [gaeshi.mail] [gaeshi.spec-helpers.mail]) (:import [com.google.appengine.api.mail MailService])) (describe "Mail" (it "converts a simple map into a message" (let [message (map->message {:bcc "" :cc "" ...
bb8455e2544027a1fdf2e3ee18952e53fbd173984c2d53719caf81f207b97f1b
ucsd-progsys/dsolve
miscutil.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/utils/miscutil.ml
ocaml
********************************************************************* Objective Caml ...
, 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 . exception Fatal_error let fatal_erro...
9696d11d984423fb1f3effbafdf01c5f8a4ec08cee4fce62fcca5d978828b0df
rm-hull/project-euler
euler004.clj
EULER # 004 ;; ========== ;; A palindromic number reads the same both ways. The largest palindrome made from the product of two 2 - digit numbers is 9009 = 91 x 99 . ;; Find the largest palindrome made from the product of two 3 - digit numbers . ;; (ns euler004 (:use [util.palindromes])) (defn solve [] ...
null
https://raw.githubusercontent.com/rm-hull/project-euler/04e689e87a1844cfd83229bb4628051e3ac6a325/src/euler004.clj
clojure
========== A palindromic number reads the same both ways. The largest
EULER # 004 palindrome made from the product of two 2 - digit numbers is 9009 = 91 x 99 . Find the largest palindrome made from the product of two 3 - digit numbers . (ns euler004 (:use [util.palindromes])) (defn solve [] (reduce max (for [a (range 100 1000) b (range a 1000) :let...
6f409e6136ab140872c6bd1e8fd936a3b7d64e4a12197e28c6d4fb554d1a9c7b
tommaisey/aeon
playhead.scm
;;----------------------------------------------------------------- (define bpm 115) (define playback-thread #f) (define playback-chunk 1/8) ; 1/8th beat for now (define playback-thread-semaphore (make-semaphore)) (define playback-latency 0.2) State used to mitigate timing jitter in callbacks : (define last-process-...
null
https://raw.githubusercontent.com/tommaisey/aeon/12e8ff92bd5efed2923aecf974fa12d39835abc6/runtime/playhead.scm
scheme
----------------------------------------------------------------- 1/8th beat for now time of last callback, utc time of last callback, beats extra time to render each block Find out how many beats have elapsed since the last process-chunk. Called regularly by the playback thread. It renders events in chunks whos...
(define bpm 115) (define playback-thread #f) (define playback-thread-semaphore (make-semaphore)) (define playback-latency 0.2) State used to mitigate timing jitter in callbacks : musical time that has been sent to SC (define (beats-since-last-process utc-time) (if (not last-process-time) 0 (secs->measures...
11dd50eb1e07e492a3ee32aa2799f0ded5c9068a8c54fe8980e82c7311feb6d1
patrikja/AFPcourse
Signal.hs
-- | A very simple library for manipulating continuous signals. module Signal ( module SignalImpl , module Signal , module Control.Applicative ) where import Control.Applicative -- Alternative implementation: > import Signal . Shallow as SignalImpl import Signal.Deep as SignalImpl | TODO : Fix Haddock Tick...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L2/src/Signal.hs
haskell
| A very simple library for manipulating continuous signals. Alternative implementation: <> | 'Signal' is an applicative functor
module Signal ( module SignalImpl , module Signal , module Control.Applicative ) where import Control.Applicative > import Signal . Shallow as SignalImpl import Signal.Deep as SignalImpl | TODO : Fix Haddock Ticket # 121 ( could be part of lab 3 for eager students ) instance Functor Signal where fmap = ...
9ca4f9217423ed1d0b66fea1f67025f5f1080c261fbfaf227ddee114752be07d
tfausak/patrol
BrowserContext.hs
module Patrol.Type.BrowserContext where import qualified Data.Aeson as Aeson import qualified Data.Text as Text import qualified Patrol.Extra.Aeson as Aeson -- | <-payloads/types/#browsercontext> data BrowserContext = BrowserContext { name :: Text.Text, version :: Text.Text } deriving (Eq, Show) instance A...
null
https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/library/Patrol/Type/BrowserContext.hs
haskell
| <-payloads/types/#browsercontext>
module Patrol.Type.BrowserContext where import qualified Data.Aeson as Aeson import qualified Data.Text as Text import qualified Patrol.Extra.Aeson as Aeson data BrowserContext = BrowserContext { name :: Text.Text, version :: Text.Text } deriving (Eq, Show) instance Aeson.ToJSON BrowserContext where toJS...
4a40271fcbc7e6a57540b5040b7132f0633db7a9372750c54d7c917f8b190b96
acieroid/scala-am
matmul.scm
;; Benchmark that compare recursive concurrent matrix multiplication with naive sequential matrix multiplication (define N (expt 2 42)) (define (build-vector n init f) (letrec ((v (make-vector n init)) (loop (lambda (i) (if (< i n) (begin (...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/futures/matmul.scm
scheme
Benchmark that compare recursive concurrent matrix multiplication with naive sequential matrix multiplication
(define N (expt 2 42)) (define (build-vector n init f) (letrec ((v (make-vector n init)) (loop (lambda (i) (if (< i n) (begin (vector-set! v i (f i)) (loop (+ i 1))) v)))) (loop 0))) (defi...
d89ebac6993e8d38175af69b08cb74790a0920ceb6249da028bd9234259a66bd
datacraft-sciences/confuse
binary_class_metrics.clj
(ns confuse.binary-class-metrics (:require [clojure.core.matrix :as m] [clojure.core.matrix.impl.pprint :refer [pm]] [clojure.core.matrix.dataset :as cd])) (defn- accuracy-helper [pred-ac-seq filtfn] (let [denom (count pred-ac-seq) pred-ac-same (-> (filter filtfn pred-ac-seq) coun...
null
https://raw.githubusercontent.com/datacraft-sciences/confuse/d6c908cde9d5e47aa2b32bb416b352fa44aa72b7/src/confuse/binary_class_metrics.clj
clojure
(ns confuse.binary-class-metrics (:require [clojure.core.matrix :as m] [clojure.core.matrix.impl.pprint :refer [pm]] [clojure.core.matrix.dataset :as cd])) (defn- accuracy-helper [pred-ac-seq filtfn] (let [denom (count pred-ac-seq) pred-ac-same (-> (filter filtfn pred-ac-seq) coun...
0db98d56bc8ccfe28fa0ed54aaa46d54282070e69d7ef64eb365903775c93e4e
wies/grasshopper
symbExec.ml
* { 5 Symbolic execution based verifier } open Util open Grass open GrassUtil open Prog open Printf let simplify proc prog = prog |> dump_if 0 |> Analyzer.infer_accesses true |> Simplifier.elim_loops |> Simplifier.elim_global_deps |> dump_if 1 exception NotYetImplemented let todo () = raise NotYetImple...
null
https://raw.githubusercontent.com/wies/grasshopper/108473b0a678f0d93fffec6da2ad6bcdce5bddb9/src/verifier/symbExec.ml
ocaml
* ----------- Symbolic state and manipulators ---------- * x |-> [f1: E1, ..] * Array(address, length, map) * Conjunction of spatial states * The state of the symbolic execution engine TODO use Format formatters for these |> String.map (function | '\n' -> ' ' | c -> c) Special find_ptsto for extracting and re...
* { 5 Symbolic execution based verifier } open Util open Grass open GrassUtil open Prog open Printf let simplify proc prog = prog |> dump_if 0 |> Analyzer.infer_accesses true |> Simplifier.elim_loops |> Simplifier.elim_global_deps |> dump_if 1 exception NotYetImplemented let todo () = raise NotYetImple...
3e821090767232623b9aa666f6c38c20ce41cedef5a27655279da8457448ab35
ddmcdonald/sparser
day-in-month.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 1991 Content Technologies Inc. ;;; copyright (c) 1992-1993,2021 David D. McDonald -- all rights reserved ;;; ;;; File: "day-in-month" Module : " : time : " version : February 2021 initiated 7/31 v1.8.6 1.0 ( 12/15/92 v...
null
https://raw.githubusercontent.com/ddmcdonald/sparser/304bd02d0cf7337ca25c8f1d44b1d7912759460f/Sparser/code/s/grammar/model/core/time/day-in-month.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright (c) 1992-1993,2021 David D. McDonald -- all rights reserved File: "day-in-month" ------------ the object ------------ ------- rules -------
copyright ( c ) 1991 Content Technologies Inc. Module : " : time : " version : February 2021 initiated 7/31 v1.8.6 1.0 ( 12/15/92 v2.3 ) setting up for new semantics 1.1 ( ) actually doing it (in-package :sparser) (define-category day-of-the-month :specializes time :instantiates self :b...
da0e0f67d88e287a1a8ad4e9a91438a21c703e607b914a2eb46b3f30c51917af
vseloved/cl-nlp
decision-tree.lisp
( c ) 2015 - 2017 Vsevolod Dyomkin (in-package #:nlp.learning) (named-readtables:in-readtable rutilsx-readtable) (defclass decision-tree () ((decision-fn :accessor tree-decision-fn :initarg :decision-fn) (decision-fn-dbg :accessor tree-decision-fn-dbg :initarg :decision-fn-dbg) (repr :accessor tree-repr :i...
null
https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/src/learning/decision-tree.lisp
lisp
main methods debug cart transforms training for RF classifier to sample dimensions no data single class no indices, min-size or max-depth reached general case we won't return to it putting T case (if present) last there's no split-point for non-binary splits split criteria entropy calculations utils sim...
( c ) 2015 - 2017 Vsevolod Dyomkin (in-package #:nlp.learning) (named-readtables:in-readtable rutilsx-readtable) (defclass decision-tree () ((decision-fn :accessor tree-decision-fn :initarg :decision-fn) (decision-fn-dbg :accessor tree-decision-fn-dbg :initarg :decision-fn-dbg) (repr :accessor tree-repr :i...
9f2561cb139fcf5b624ca6228c537a362d7715e627501be51ee958bb8f07dad3
openmusic-project/openmusic
cffi-abcl.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; cffi-abcl.lisp --- CFFI - SYS implementation for ABCL / JNA . ;;; Copyright ( C ) 2009 , Copyright ( C ) 2012 , < > ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation ...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/foreign-interface/ffi/CFFI/src/cffi-abcl.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...
cffi-abcl.lisp --- CFFI - SYS implementation for ABCL / JNA . Copyright ( C ) 2009 , Copyright ( C ) 2012 , < > 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 Softwa...
51e6d93ca65ac97131b0de722d09d58579d9770978d234f7b2d3f3b84fd882f0
habit-lang/alb
Desugaring.hs
# LANGUAGE FunctionalDependencies , FlexibleContexts , FlexibleInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , TypeSynonymInstances , UndecidableInstances , OverloadedStrings # GeneralizedNewtypeDeriving, MultiParamTypeClasses, TypeSynonymInstances, Undecidab...
null
https://raw.githubusercontent.com/habit-lang/alb/567d4c86194a884cc1ceeffca9663211de2d554c/src/Analyzer/Desugaring.hs
haskell
This module eliminates much of the sugar of the surface syntax, generating the implicitly typed intermediate language used for type checking. In the process, we perform some verification, such as checking that variable and constructor names are in scope, equations are valid definitions, etc. DONE: factor out tupl...
# LANGUAGE FunctionalDependencies , FlexibleContexts , FlexibleInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , TypeSynonymInstances , UndecidableInstances , OverloadedStrings # GeneralizedNewtypeDeriving, MultiParamTypeClasses, TypeSynonymInstances, Undecidab...
3ca8c27b8d8dc631a3bc591c8d081869513e9d3ce687134c1b9d8f727f610274
gildor478/ocaml-gettext
test4.ml
(**************************************************************************) (* ocaml-gettext: a library to translate messages *) (* *) Copyright ( C ) 2003 - 2008 < > (* ...
null
https://raw.githubusercontent.com/gildor478/ocaml-gettext/9b7afc702bccace9a544b8efa2a28bc2b13371ed/test/testdata/test4.ml
ocaml
************************************************************************ ocaml-gettext: a library to translate messages This library is free softw...
Copyright ( C ) 2003 - 2008 < > License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version ; You should have received a copy of the GNU Lesser General Public License along with this library ; if not ,...
34c831d6e06a010510acefc93130b71f322affac2dbafa4112308e966d461fd2
Hans-Halverson/myte
simplify_instructions.ml
open Mir open Mir_builders open Mir_type type cx = { (* Instructions that could potentially be simplified *) mutable worklist: VSet.t } let enqueue_instr ~cx instr_value = cx.worklist <- VSet.add instr_value cx.worklist let simplify_instruction ~cx instr_value = let instr = cast_to_instruction instr_va...
null
https://raw.githubusercontent.com/Hans-Halverson/myte/e3eaf0ba1397d7d241006b538ba0e3bbb0050f02/src/mir/transforms/simplify_instructions.ml
ocaml
Instructions that could potentially be simplified Simplify phis where all arguments have the same value If truncated below extended size, shorten extension to the truncated size Check for a comparison of a sign extended value against a literal, which is known if the literal does not have the same bit valu...
open Mir open Mir_builders open Mir_type mutable worklist: VSet.t } let enqueue_instr ~cx instr_value = cx.worklist <- VSet.add instr_value cx.worklist let simplify_instruction ~cx instr_value = let instr = cast_to_instruction instr_value in let enqueue_operands_and_uses instr_value = value_iter...
d51ee0325cb7b89c8de6485f1b89f608c0ef319bbab60bd6597a0f3c119db9db
CSCfi/rems
testing.cljs
(ns rems.testing (:require [re-frame.core :as rf])) (defn isolate-re-frame-state [f] (let [restore-fn (rf/make-restore-fn)] (try (f) (finally (restore-fn))))) (defn stub-re-frame-effect [id] (rf/clear-fx id) (rf/reg-fx id (fn [_])))
null
https://raw.githubusercontent.com/CSCfi/rems/644ef6df4518b8e382cdfeadd7719e29508a26f0/test/cljs/rems/testing.cljs
clojure
(ns rems.testing (:require [re-frame.core :as rf])) (defn isolate-re-frame-state [f] (let [restore-fn (rf/make-restore-fn)] (try (f) (finally (restore-fn))))) (defn stub-re-frame-effect [id] (rf/clear-fx id) (rf/reg-fx id (fn [_])))
e7642e46f0754bc51e2982e8730d91cd74eb2facdc6f14e6d7363720b53dd5e8
christoff-buerger/racr
cookie-automaton.scm
; This program and the accompanying materials are made available under the terms of the MIT license ( X11 license ) which accompanies this distribution . Author : Specification of the cookie automaton given on page 21 , Figure 2.1 in ; " Petrinetze : Modellierungstechnik , Analysemethoden , F...
null
https://raw.githubusercontent.com/christoff-buerger/racr/ecb2a9b8bf3f333550728cf45b97607a8298532f/examples/atomic-petrinets/examples/cookie-automaton.scm
scheme
This program and the accompanying materials are made available under the Places with start marking: D with 'Token token G with 'Token token All other places have no tokens. Transitions: Produce 'Euro token in A. Consume 'Euro token from A. Consume 'Euro token from A. Consume 'Token token from G. Produce 'T...
terms of the MIT license ( X11 license ) which accompanies this distribution . Author : Specification of the cookie automaton given on page 21 , Figure 2.1 in " Petrinetze : Modellierungstechnik , Analysemethoden , Fallstudien " ...
beb717a2f778d9863bdf30734aa7307dbabd6dfa7c095020b923fd954dd6eb99
acl2/acl2
enum.cpp.ref.ast.lsp
(funcdef foo () (block (return 0)))(funcdef bar () (block (return 5)))
null
https://raw.githubusercontent.com/acl2/acl2/c2d69bad0ed3132cc19a00cb632de8b73558b1f9/books/projects/rac/tests/yaml_test/program_structure/enum.cpp.ref.ast.lsp
lisp
(funcdef foo () (block (return 0)))(funcdef bar () (block (return 5)))
07aea94ecc15a131ffb2bd48e6a9e70aab8b6faecaadae5fb6d5e386098da845
takeoutweight/clojure-scheme
foo.cljs
(ns cljs.import-test.foo) (defrecord Bar [x]) (deftype Quux [x])
null
https://raw.githubusercontent.com/takeoutweight/clojure-scheme/6121de1690a6a52c7dbbe7fa722aaf3ddd4920dd/test/cljs/cljs/import_test/foo.cljs
clojure
(ns cljs.import-test.foo) (defrecord Bar [x]) (deftype Quux [x])
27c256e69c555aaeb8e38221d5b6a62a030c4427210ce2f14d20574752f8dbe3
ToTal/total
beautify.ml
(** Renaming of bound variables for pretty printing. *) open Syntax (** default generated name *) let default = "x" * Split a variable name into base and numerical postfix , e.g. , [ " x42 " ] is split into [ ( " x " , 42 ) ] . ["x42"] is split into [("x", 42)]. *) let split s = let n = String.length s in ...
null
https://raw.githubusercontent.com/ToTal/total/fa9c677c9110afd5fb423a4fe24eafff2fd08507/beautify.ml
ocaml
* Renaming of bound variables for pretty printing. * default generated name * Given a variable [x] and a list of variable names [xs], find a variant of [x] which does not appear in [xs].
open Syntax let default = "x" * Split a variable name into base and numerical postfix , e.g. , [ " x42 " ] is split into [ ( " x " , 42 ) ] . ["x42"] is split into [("x", 42)]. *) let split s = let n = String.length s in let i = ref (n - 1) in while !i >= 0 && '0' <= s.[!i] && s.[!i] <= '9' do decr i...
587282853b7de2ff59461b0b390e714cdae454eae8bf1476ca14984dcaf51fd2
bmeurer/ocaml-arm
frames.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cr...
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/debugger/frames.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt OCaml port by and 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 . $ Id$ ...
17df2ede8cf159e8486992f5cf793f6c8f647b0bbce068dece1c57b3369a690d
sonyxperiadev/dataflow
Renderer.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE TypeSynonymInstances #-} module DataFlow.PlantUML.Renderer ( renderPlantUML ) where import Text.Printf import DataFlow.PrettyRenderer import DataFlow.PlantUML class Renderable t where render :: t -> Renderer () instance Renderable Stmt where render (SkinParam na...
null
https://raw.githubusercontent.com/sonyxperiadev/dataflow/8bef5bd6bf96a918197e66ad9d675ff8cd2a4e33/src/DataFlow/PlantUML/Renderer.hs
haskell
# LANGUAGE TypeSynonymInstances #
# LANGUAGE FlexibleInstances # module DataFlow.PlantUML.Renderer ( renderPlantUML ) where import Text.Printf import DataFlow.PrettyRenderer import DataFlow.PlantUML class Renderable t where render :: t -> Renderer () instance Renderable Stmt where render (SkinParam name value) = do write "skinparam " ...
3caaeec49d9371e2bab61a8b9c49c3c13eda409a108c53ab1b3f1aa4e582ace3
zotonic/zotonic
z_lib_include_tests.erl
@author < > %% @hidden -module(z_lib_include_tests). -include_lib("zotonic.hrl"). -include_lib("eunit/include/eunit.hrl"). uncollapse_test() -> ?assertEqual([], z_lib_include:uncollapse("")), ?assertEqual([ <<"/a/b1.js">>, <<"/a/b2.js">>, <<"/a/b/c.js">>, <<"/a/b3.js">> ], ...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_core/test/z_lib_include_tests.erl
erlang
@hidden ?assertEqual([[], <<"<script src=\"/lib/js/a~62167258800.js\" type=\"text/javascript\"></script>">>], z_lib_include:tag(["/js/a.js"], C)), ?assertEqual([[], <<"<script src=\"/lib/js/a~b~62167258800.js\" type=\"text/javascript\"></script>">>], z_lib_include:tag(["/js/a.js", "/js/b....
@author < > -module(z_lib_include_tests). -include_lib("zotonic.hrl"). -include_lib("eunit/include/eunit.hrl"). uncollapse_test() -> ?assertEqual([], z_lib_include:uncollapse("")), ?assertEqual([ <<"/a/b1.js">>, <<"/a/b2.js">>, <<"/a/b/c.js">>, <<"/a/b3.js">> ], z_li...
4473b3e66d34946f077052e9db6f4b8d588dc945e27f2949b99b11269b329bd7
galdor/tungsten
random.lisp
(in-package :openssl) (defun random-octets (n) (rand-bytes n))
null
https://raw.githubusercontent.com/galdor/tungsten/5d6e71fb89af32ab3994c5b2daf8b902a5447447/tungsten-openssl/src/random.lisp
lisp
(in-package :openssl) (defun random-octets (n) (rand-bytes n))
711b752d5ac0d045e22c27546c56060d4b073d268f3d8fc0614ce6d3e6e02dda
haskell/ghc-builder
ExampleConfig.hs
module Config (clients, fromAddress, emailAddresses, urlRoot) where import Builder.Utils fromAddress :: String fromAddress = "" emailAddresses :: [String] emailAddresses = [""] urlRoot :: String urlRoot = "/" buildSteps :: [BuildStep] buildSteps = [BuildStep { bs_name = "Test build step", ...
null
https://raw.githubusercontent.com/haskell/ghc-builder/ef90aa7da7ec017d59d875e5bfe5d6b281d766f7/server/ExampleConfig.hs
haskell
module Config (clients, fromAddress, emailAddresses, urlRoot) where import Builder.Utils fromAddress :: String fromAddress = "" emailAddresses :: [String] emailAddresses = [""] urlRoot :: String urlRoot = "/" buildSteps :: [BuildStep] buildSteps = [BuildStep { bs_name = "Test build step", ...
fe56209fd8bbe8281462b2d938b1ca0ee019990670a6778ca2e0ab31f1e00052
ocaml-multicore/ocaml-tsan
ambiguous_guarded_disjunction.ml
(* TEST flags = " -w +A -strict-sequence " * expect *) Ignore = b to be reproducible Printexc.record_backtrace false;; [%%expect {| - : unit = () |}] type expr = Val of int | Rest;; [%%expect {| type expr = Val of int | Rest |}] let ambiguous_typical_example = function | ((Val x, _) | (_, Val x)) when x <...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml
ocaml
TEST flags = " -w +A -strict-sequence " * expect the reader might expect to hold here, but it is wrong! it should be understood that the ambiguity warning only protects (p | q) when guard -> ... it will never warn on (p | q) -> if guard ... This is not a limitation. The point is that people...
Ignore = b to be reproducible Printexc.record_backtrace false;; [%%expect {| - : unit = () |}] type expr = Val of int | Rest;; [%%expect {| type expr = Val of int | Rest |}] let ambiguous_typical_example = function | ((Val x, _) | (_, Val x)) when x < 0 -> () | (_, Rest) -> () | (_, Val x) -> assert (...
1157bf2ac7f2d7a7749beca46651671683fb96bdcf8dff7d099fb96edc252484
trainline/optimus
core.clj
Copyright ( c ) Trainline Limited , 2017 . All rights reserved . See LICENSE.txt in the project root for license information (ns optimus.service.core "This namespace is the business logic layer for the Optimus service. Functions in this namespace perform the necessary orchestrations across the meta data sto...
null
https://raw.githubusercontent.com/trainline/optimus/caf4d065f40d5edef87eeb60d767b8379465501e/service/src/optimus/service/core.clj
clojure
Store ;; ---==| D A T A S E T S |==---- ;; ;; ...
Copyright ( c ) Trainline Limited , 2017 . All rights reserved . See LICENSE.txt in the project root for license information (ns optimus.service.core "This namespace is the business logic layer for the Optimus service. Functions in this namespace perform the necessary orchestrations across the meta data sto...
c7afa4ffed326458b29c37c20bbe84602f0e5d3c687d145deaa7556a6065a709
ollef/sixty
OrderedHashSet.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TupleSections # module Data.OrderedHashSet where import Data.OrderedHashMap (OrderedHashMap) import qualified Data.OrderedHashMap as OrderedHashMap import Data.Persist import Protolude hiding (toList) import Prelude (Show (showsPrec), showParen, showString, shows) n...
null
https://raw.githubusercontent.com/ollef/sixty/2582551f3c12f84489afb961b800f0d7cfa74844/src/Data/OrderedHashSet.hs
haskell
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TupleSections # module Data.OrderedHashSet where import Data.OrderedHashMap (OrderedHashMap) import qualified Data.OrderedHashMap as OrderedHashMap import Data.Persist import Protolude hiding (toList) import Prelude (Show (showsPrec), showParen, showString, shows) n...
145e97ddad863965c10ba8f9be40a44fdb460514aecc814503c20746fa2abb64
ghc/packages-Cabal
Modular.hs
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Distribution.Solver.Modular ( modularResolver, SolverConfig(..), PruneAfterFirstSuccess(..) ) where -- Here, we try to map between the external cabal-install solver -- interface and the internal interface that the solver actually -- expects. The...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/Distribution/Solver/Modular.hs
haskell
Here, we try to map between the external cabal-install solver interface and the internal interface that the solver actually expects. There are a number of type conversions to perform: we have to convert the package indices to the uniform index used by the solver; we also have to convert the initial constraints; a...
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Distribution.Solver.Modular ( modularResolver, SolverConfig(..), PruneAfterFirstSuccess(..) ) where import Prelude () import Distribution.Solver.Compat.Prelude import qualified Data.Map as M import Data.Set (isSubsetOf) import Distribution.Com...
40108fa9e92f3960ed94f9d502ce1868f374edd456f974e2b7fd51c402611a81
i-am-tom/dagless
HList.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE KindSignatures # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeV...
null
https://raw.githubusercontent.com/i-am-tom/dagless/783dc720eceb89416c7452c95c675b66124473e4/src/Data/HList.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # | A heterogeneous list, indexed by the types that it contains. We define the within the list, and thus it is a total function. >>> :set -XTyp...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE KindSignatures # # LANGUAGE TypeApplications # | Module : Data . HList Description : A nice , neat HList . Copyright : ( c ) , 2018 ...