_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 |
|---|---|---|---|---|---|---|---|---|
18cd881b57baa0b1e1647c19702b1372afd9af92767153a0a97ff04560f0b744 | teamwalnut/graphql-ppx | graphql_parser.ml | open Result
open Source_pos
type parser = { mutable tokens : Graphql_lexer.token spanning list }
type parseError =
| Unexpected_token of Graphql_lexer.token
| Unexpected_end_of_file
| Lexer_error of Graphql_lexer.lexerError
let make tokens = { tokens }
let peek parser = List.hd parser.tokens
exception Interna... | null | https://raw.githubusercontent.com/teamwalnut/graphql-ppx/8276452ebe8d89a748b6b267afc94161650ab620/src/graphql_compiler/graphql_parser.ml | ocaml | open Result
open Source_pos
type parser = { mutable tokens : Graphql_lexer.token spanning list }
type parseError =
| Unexpected_token of Graphql_lexer.token
| Unexpected_end_of_file
| Lexer_error of Graphql_lexer.lexerError
let make tokens = { tokens }
let peek parser = List.hd parser.tokens
exception Interna... | |
5180b9af287387e8e3cd578de49a35984c59534a47c520d4079eb8e0f29d620c | exercism/babashka | project.clj | (defproject hello-world "0.1.0-SNAPSHOT"
:description "hello-world exercise."
:url "-world"
:dependencies [[org.clojure/clojure "1.10.0"]])
| null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/hello-world/project.clj | clojure | (defproject hello-world "0.1.0-SNAPSHOT"
:description "hello-world exercise."
:url "-world"
:dependencies [[org.clojure/clojure "1.10.0"]])
| |
33ccbc0b95a84be224d0f0d0cada54914c21285a210ad3b109765b33a32f45f1 | tek/helic | Event.hs | -- |The data type 'Event' consists of a yank text and metadata identifying its source and time.
module Helic.Data.Event where
import qualified Chronos
import Polysemy.Chronos (ChronosTime)
import qualified Polysemy.Time as Time
import Polysemy.Time.Json (json)
import Helic.Data.AgentId (AgentId)
import Helic.Data.Ins... | null | https://raw.githubusercontent.com/tek/helic/055b2ffa063936ad4ae6249c9e6e0603482baaa9/packages/helic/lib/Helic/Data/Event.hs | haskell | |The data type 'Event' consists of a yank text and metadata identifying its source and time.
|The central data type representing a clipboard event.
|The host from which the event originated.
|The entity that caused the event.
|Timestamp.
|Payload.
|Construct an event for the current host and time. | module Helic.Data.Event where
import qualified Chronos
import Polysemy.Chronos (ChronosTime)
import qualified Polysemy.Time as Time
import Polysemy.Time.Json (json)
import Helic.Data.AgentId (AgentId)
import Helic.Data.InstanceName (InstanceName)
data Event =
Event {
sender :: InstanceName,
source :: Agent... |
a5b9309e28e8802b932491ca1beeb55946d8fe90f32b372cc4fd317a3c6dd137 | xavierleroy/camlidl | funct.mli | (***********************************************************************)
(* *)
(* CamlIDL *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/xavierleroy/camlidl/b192760875fe6e97b13004bd289720618e12ee22/compiler/funct.mli | ocaml | *********************************************************************
CamlIDL
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
$ I d : funct.mli , v 1.11 2004 - 07 - 08 09:50:23 xleroy Exp $
open Idltypes
type in_out =
In | Out |... |
33beb5d42a3788fbf741f73b7dfe0c63f917bf3f28cbf146f2e71715556a98bc | andorp/bead | ErrorPage.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE CPP #
module Bead.View.Content.Public.ErrorPage (
template
) where
import Data.ByteString.Char8 (unpack)
import Data.Monoid (mempty)
import Data.String (fromString)
im... | null | https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/View/Content/Public/ErrorPage.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances # | # LANGUAGE FlexibleInstances #
# LANGUAGE CPP #
module Bead.View.Content.Public.ErrorPage (
template
) where
import Data.ByteString.Char8 (unpack)
import Data.Monoid (mempty)
import Data.String (fromString)
import qualified Text.Blaze.Html5 as H
import qualified Bead.View.Content.... |
226547ed0ae9587a0e9b959e8e367cd4878635ae42e92187d9a062c7b8f56139 | emqx/emqx | emqx_ctl_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2019 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/388c33395e6cacd9850f2df67a2e98901ed151ca/apps/emqx_ctl/test/emqx_ctl_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2019 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_ctl_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("euni... |
7ecb77ab21f1a9f87599418060dc1561b71467360a4c3df34f926fe757ed66c7 | serefayar/ayatori | clj_kondo_hooks.clj | (ns aleph.clj-kondo-hooks)
(defmacro def-http-method [method]
`(defn ~method
([url#])
([url# options#])))
| null | https://raw.githubusercontent.com/serefayar/ayatori/4ae80d64439850b7e515526554d9ff29ee078fc9/.clj-kondo/clj-commons/aleph/aleph/clj_kondo_hooks.clj | clojure | (ns aleph.clj-kondo-hooks)
(defmacro def-http-method [method]
`(defn ~method
([url#])
([url# options#])))
| |
17040bf4f24f40abc48866e985ea01279a9cd0b1eb55f1d9d1ac2cda1b3d76e7 | lsrcz/grisette | Trans.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
-- |
Module : . Lib . Control . Monad . Trans
Copyright : ( c ) 2021 - 2023
-- License : BSD-3-Clause (see the LICENSE file)
--
-- Maintainer :
-- Stability : Experimental
Portability : GHC on... | null | https://raw.githubusercontent.com/lsrcz/grisette/51d492f60fb37b74a626b591ec4c7ed128fa6217/src/Grisette/Lib/Control/Monad/Trans.hs | haskell | # LANGUAGE RankNTypes #
|
License : BSD-3-Clause (see the LICENSE file)
Maintainer :
Stability : Experimental | # LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
Module : . Lib . Control . Monad . Trans
Copyright : ( c ) 2021 - 2023
Portability : GHC only
module Grisette.Lib.Control.Monad.Trans
* mrg * variants for operations in " Control . . Trans "
mrgLift,
)
where
import Control.M... |
0b58d31096714d4537609a3e198ad7aace82e8acae0c9e1e3a5a6a261123a836 | janestreet/core | option_array.mli | * This module extends { { ! Base . Option_array}[Base . Option_array ] } with
bin_io .
bin_io. *)
open! Import
type 'a t = 'a Base.Option_array.t [@@deriving bin_io, sexp]
include module type of struct
include Base.Option_array
end
with type 'a t := 'a t
| null | https://raw.githubusercontent.com/janestreet/core/b0be1daa71b662bd38ef2bb406f7b3e70d63d05f/core/src/option_array.mli | ocaml | * This module extends { { ! Base . Option_array}[Base . Option_array ] } with
bin_io .
bin_io. *)
open! Import
type 'a t = 'a Base.Option_array.t [@@deriving bin_io, sexp]
include module type of struct
include Base.Option_array
end
with type 'a t := 'a t
| |
151e6d0a9b74704b12157ffe6ac39efa57a94bc6ef96814ab7133dbcaabdabfe | MercuryTechnologies/moat | Kotlin.hs | module Moat.Pretty.Kotlin
( prettyKotlinData,
)
where
import qualified Data.Char as Char
import Data.Functor ((<&>))
import Data.List (intercalate)
import Data.Maybe (mapMaybe, catMaybes)
import Moat.Pretty.Doc.KDoc
import Moat.Types
| Convert a ' MoatData ' into a canonical representation in Kotlin
--
-- This ... | null | https://raw.githubusercontent.com/MercuryTechnologies/moat/6fc4d51ed976265c55be6bef17486f09044093b5/src/Moat/Pretty/Kotlin.hs | haskell |
This is a decent default if you plan to do Android development, however you
could instead use this as a template to write your own version. Or, use it
to write an entirely new language backend :)
| This function will take a name and the indentation level and render
annotations in the style '@{string}\n...'. The n... | module Moat.Pretty.Kotlin
( prettyKotlinData,
)
where
import qualified Data.Char as Char
import Data.Functor ((<&>))
import Data.List (intercalate)
import Data.Maybe (mapMaybe, catMaybes)
import Moat.Pretty.Doc.KDoc
import Moat.Types
| Convert a ' MoatData ' into a canonical representation in Kotlin
prettyKotli... |
4259505c7522c8aa863003b2aa9da32d789ad1d505a300e5569f65cacdd44af9 | xapi-project/xen-api | xapi_blob.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/48cc1489fff0e344246ecf19fc1ebed6f09c7471/ocaml/xapi/xapi_blob.ml | ocaml | * Binary blob management
This needs to be special-cased for all objects that contain blobs
Send blobs to a remote host on a different pool. uuid_map is a
map of remote blob uuids to local blob refs.
Send a VMs blobs to a remote host on another pool, and destroy the
leftover blobs on this host. To be called ... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... |
4873c31e762aa80c28eca9e042b72eab74cf0f1ccb00212f97a16e57ded8dec4 | swannodette/swannodette.github.com | helpers.cljs | (ns blog.utils.helpers)
(defn now [] (js/Date.))
(defn index-of [xs x]
(let [len (count xs)]
(loop [i 0]
(if (< i len)
(if (= (nth xs i) x)
i
(recur (inc i)))
-1))))
(defn error? [x]
(instance? js/Error x))
(defn throw-err [x]
(if (error? x)
(throw x)
x))
... | null | https://raw.githubusercontent.com/swannodette/swannodette.github.com/91a196ded00bfacd59cc925161312090b2cfa931/code/blog/src/blog/utils/helpers.cljs | clojure | (ns blog.utils.helpers)
(defn now [] (js/Date.))
(defn index-of [xs x]
(let [len (count xs)]
(loop [i 0]
(if (< i len)
(if (= (nth xs i) x)
i
(recur (inc i)))
-1))))
(defn error? [x]
(instance? js/Error x))
(defn throw-err [x]
(if (error? x)
(throw x)
x))
... | |
ea040b00254c56b58e2bd47164e6a15c94cd856b67ee40412dc7ecf9398b63e3 | ekmett/lens | Lens.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ViewPatterns #
# LANGUAGE PatternSynonyms #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Text.Lens
Copyright : ( C ) 2012 - 16
-- License : BSD-style (see t... | null | https://raw.githubusercontent.com/ekmett/lens/479966809048787402adb0ff4d03525b8a65ada6/src/Data/Text/Lens.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Text.Lens
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
--------------------------------------------------------------------------
$setup
>>> import qualifi... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ViewPatterns #
# LANGUAGE PatternSynonyms #
Copyright : ( C ) 2012 - 16
Maintainer : < >
module Data.Text.Lens
( IsText(..)
, unpacked
, _Text
, pattern Text
) where
import Control.Lens.Type
i... |
c5e2cccfc15870a6d4f7c150899ae3fa6b372ae5166507226a2347ba8bb48449 | geophf/1HaskellADay | Exercise.hs | module Y2020.M07.D30.Exercise where
-
and are going on vacation .
We have a database of our team , where the members are :
-
Shoaib and Kate are going on vacation.
We have a database of our team, where the members are:
--}
members, actives :: [String]
members = words ("Roxi Ken Doug Shoaib Victor Robert Mor... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2020/M07/D30/Exercise.hs | haskell | }
the active members are the team are:
command that will remove those members from the active list, following
this template:
use whatever magic to replace "[name]" with the name of the person taking
vacay.
(also, you could rewrite the template String as a function if that suits
you better) (or you could show off... | module Y2020.M07.D30.Exercise where
-
and are going on vacation .
We have a database of our team , where the members are :
-
Shoaib and Kate are going on vacation.
We have a database of our team, where the members are:
members, actives :: [String]
members = words ("Roxi Ken Doug Shoaib Victor Robert Morgan ... |
00fd446294e9ce9e78540d8a3389de073962b8fff8584a2d3cbc89d5af36ea98 | fyquah/hardcaml_zprize | config.ml | module type S = Config_intf.S
module Zprize = struct
let num_windows = 7
let affine_point_bits = 377 * 2
let pipeline_depth = 150
let log_stall_fifo_depth = 2
end
| null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/pippenger/src/config.ml | ocaml | module type S = Config_intf.S
module Zprize = struct
let num_windows = 7
let affine_point_bits = 377 * 2
let pipeline_depth = 150
let log_stall_fifo_depth = 2
end
| |
7a4754fc333c19b7d0b1e28e237e997aaac05c81ac06ce6a81f3aa089af92c0d | bennn/dissertation | pfds-real-time.rkt | #lang typed/racket #:transient
(provide filter remove head+tail build-queue
queue queue->list empty empty?
(rename-out [qmap map] [queue-andmap andmap] [queue-ormap ormap])
fold head tail enqueue Queue list->queue)
(require "pfds-stream.rkt")
(struct: (A) Queue ([front : (Stream A)]
... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/QA/transient-fast/determinance/shallow/pfds-real-time.rkt | racket | An empty queue
Function to check for empty queue
similar to list map function. apply is expensive so using case-lambda
in order to saperate the more common case
similar to list foldr or foldl
Similar to build-list function
Similar to ormap | #lang typed/racket #:transient
(provide filter remove head+tail build-queue
queue queue->list empty empty?
(rename-out [qmap map] [queue-andmap andmap] [queue-ormap ormap])
fold head tail enqueue Queue list->queue)
(require "pfds-stream.rkt")
(struct: (A) Queue ([front : (Stream A)]
... |
78864dd1108546a5dd359778fb135b92f5b1a2be3e4f680b9eba00b9cd393352 | chshersh/iris | Internal.hs | |
Module : . Cli . Cmd
Copyright : ( c ) 2022
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Internal
Portability : Portable
Wrapper around the user - defined command .
_ _ ⚠ ️ This module is interna... | null | https://raw.githubusercontent.com/chshersh/iris/8d5627284ac6b6814c6e026d709fde9ac07656a8/src/Iris/Cli/Internal.hs | haskell | | Wrapper around @cmd@ with additional predefined fields | |
Module : . Cli . Cmd
Copyright : ( c ) 2022
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Internal
Portability : Portable
Wrapper around the user - defined command .
_ _ ⚠ ️ This module is interna... |
5f159ebb1d88455352f6a57c23c1de8538daac3c8215f0bc7e876f059ee6b448 | spechub/Hets | Utils.hs | # LANGUAGE CPP #
|
Module : ./Common / Utils.hs
Description : utility functions that ca n't be found in the libraries
Copyright : ( c ) , Uni Bremen 2002 - 2006
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
... | null | https://raw.githubusercontent.com/spechub/Hets/65413446b056dfc965a75e9076eaf78b2ec550e7/Common/Utils.hs | haskell | | Writes the message to the given handle unless the verbosity is less than
the message level.
^ Output handle
^ global verbosity
^ message level
^ message level
| Same as 'verbMsg' but with a newline at the end
| 'verbMsg' with stdout as handle
| 'verbMsgLn' with stdout as handle
| trims a string both on left... | # LANGUAGE CPP #
|
Module : ./Common / Utils.hs
Description : utility functions that ca n't be found in the libraries
Copyright : ( c ) , Uni Bremen 2002 - 2006
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
... |
07c76a348ddd1b9b03dc3690adbb5e47cf6da5e5cbe805fb7600cee152caa305 | atgeller/Wasm-prechk | IndexTypingRules.rkt | #lang racket
(require redex
"IndexTypes.rkt"
"SubTyping.rkt"
"TableValidation.rkt"
"Utilities.rkt"
"WASM-Redex/Utilities.rkt")
(provide ⊢ tfi-ok)
(define-metafunction WASMIndexTypes
tfi-ok : tfi -> boolean
[(tfi-ok (((ti_1 ...) locals_1 φ_1) -> ((ti_2 ...) locals_2 φ_... | null | https://raw.githubusercontent.com/atgeller/Wasm-prechk/16fa7ff4cc9e316211887d8f957aa833833ae04f/IndexTypingRules.rkt | racket | ivar fresh
ivar fresh
ivar_3 fresh
ivar_3 fresh
ivar_3 fresh
ivar_3 fresh
ivar_3 fresh
ivar_3 fresh
ivar_1 fresh
ivar_1 fresh
ivar_1 fresh
TODO: distinct check on postcondition ivars?
ivar_3 fresh
Strengthen precondition outside
Weaken postcondition inside
Strengthen precondition outside
Weaken postcon... | #lang racket
(require redex
"IndexTypes.rkt"
"SubTyping.rkt"
"TableValidation.rkt"
"Utilities.rkt"
"WASM-Redex/Utilities.rkt")
(provide ⊢ tfi-ok)
(define-metafunction WASMIndexTypes
tfi-ok : tfi -> boolean
[(tfi-ok (((ti_1 ...) locals_1 φ_1) -> ((ti_2 ...) locals_2 φ_... |
604715e4ee0dded7ad85c6bda7a36f658f1f47fad0dd156fba5b9025c61b0549 | janestreet/universe | syntax.ml | open Core
type regex = Re2.t
let regex_of_sexp = function
| Sexp.Atom s -> Re2.create_exn s
| Sexp.List _ as s -> Sexplib.Conv.of_sexp_error "atom (regular expression) expected" s
;;
let sexp_of_regex r = Sexp.Atom (Re2.to_string r)
type sexp = Sexp.t =
| Atom of string
| List of sexp list
(* cheap import ... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/sexp/sexp_app/src/syntax.ml | ocaml | cheap import
recursive record needed here to account for polymorphic recursion
error in [Syntax.check_rewrite_scope]
error in [Syntax.check_rewrite_scope]
error in [Syntax.check_rewrite_scope]
error in [Syntax.check_rewrite_scope]
Matches t with any given xs. If successful, returns the environment and the... | open Core
type regex = Re2.t
let regex_of_sexp = function
| Sexp.Atom s -> Re2.create_exn s
| Sexp.List _ as s -> Sexplib.Conv.of_sexp_error "atom (regular expression) expected" s
;;
let sexp_of_regex r = Sexp.Atom (Re2.to_string r)
type sexp = Sexp.t =
| Atom of string
| List of sexp list
let con x t = L... |
f91f1541da770eb135a5e3d2c992679c1425fc09eb0674ed4311ab935177e49b | erlangonrails/devdb | pdb.erl | 2010 fuer Informationstechnik Berlin
and onScale solutions GmbH
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 applica... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/pdb.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2010 fuer Informationstechnik Berlin
and onScale solutions GmbH
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@version $ I d : pdb.erl 906 2010 - 07 - 23 14:09:20Z schuett $
-mo... |
acaaee73deb217a969a7f7c1192b9180f6390d834f239b80eb3af6d1a50c9d29 | Apress/common-lisp-recipes | code.lisp | Copyright ( c ) 2015 , . All rights reserved .
This is example code for the book " Common Lisp Recipes " and meant
to be used with something like ( from SLIME ) C - M - x or C - c C - c.
;;; See the book for more information.
(eval-when (:compile-toplevel :load-toplevel :execute)
(error "This code is not ... | null | https://raw.githubusercontent.com/Apress/common-lisp-recipes/211a8b6eabc48ac906010e8c5a185f03504b3867/code/chapter-15/code.lisp | lisp | See the book for more information.
continued from above
continued from above
continued from above
continued from above
see shell script "prepare.sh" in this directory
continued from above
see shell script "prepare2.sh" in this directory
see file "foo... | Copyright ( c ) 2015 , . All rights reserved .
This is example code for the book " Common Lisp Recipes " and meant
to be used with something like ( from SLIME ) C - M - x or C - c C - c.
(eval-when (:compile-toplevel :load-toplevel :execute)
(error "This code is not meant to be used with LOAD or COMPILE-F... |
a3b80fd7828e9be433e6cca2ca80e37144d9ce3da834a7da3dcdd9a528361e14 | rabbitmq/looking_glass | lg.erl | %% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
This package , Looking , is double - licensed under the Mozilla
Public License 1.1 ( " MPL " ) and the Apache License version 2
( " ASL " ) . For the MPL , please see LICENSE - MPL - RabbitMQ . For the ASL ,
%% please see LICENSE-APACH... | null | https://raw.githubusercontent.com/rabbitmq/looking_glass/0ae891a8cee16603cdead0caf2d4c0b0800b22c9/src/lg.erl | erlang | Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
please see LICENSE-APACHE2.
either express or implied. See the LICENSE file for specific language governing
rights and limitations of this software.
If you have any questions regarding licensing, please contact us at
.
The trace functions... | This package , Looking , is double - licensed under the Mozilla
Public License 1.1 ( " MPL " ) and the Apache License version 2
( " ASL " ) . For the MPL , please see LICENSE - MPL - RabbitMQ . For the ASL ,
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY KIND ,
-module(lg).
-exp... |
7cd3d3bb0201382884df2ebb5cae9348e232c1888a9138c7c82e274dc6d9d278 | ArulselvanMadhavan/haskell-first-principles | Playground.hs | module Playground where
import Data.Char
cap :: [Char] -> [Char]
cap xs = map toUpper xs
rev :: [Char] -> [Char]
rev xs = reverse xs
composed :: [Char] -> [Char]
composed = rev . cap
fmapped :: [Char] -> [Char]
fmapped = fmap cap rev
tupled :: [Char] -> ([Char], [Char])
tupled = (,) <$> cap <*> rev
tup... | null | https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter22/src/Playground.hs | haskell | module Playground where
import Data.Char
cap :: [Char] -> [Char]
cap xs = map toUpper xs
rev :: [Char] -> [Char]
rev xs = reverse xs
composed :: [Char] -> [Char]
composed = rev . cap
fmapped :: [Char] -> [Char]
fmapped = fmap cap rev
tupled :: [Char] -> ([Char], [Char])
tupled = (,) <$> cap <*> rev
tup... | |
1d259419385421316be76ad1128c9325e80e3322d573d034346032722c0a54f5 | racket/plot | types.rkt | #lang typed/racket/base
(require (for-syntax racket/base)
typed/racket/draw
typed/racket/class
typed/pict
"type-doc.rkt"
"math.rkt")
(provide (all-defined-out))
(deftype (Treeof A) (U A (Listof (Treeof A))))
(deftype Anchor
(U 'top-left 'top 'top-right
'lef... | null | https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-lib/plot/private/common/types.rkt | racket | #lang typed/racket/base
(require (for-syntax racket/base)
typed/racket/draw
typed/racket/class
typed/pict
"type-doc.rkt"
"math.rkt")
(provide (all-defined-out))
(deftype (Treeof A) (U A (Listof (Treeof A))))
(deftype Anchor
(U 'top-left 'top 'top-right
'lef... | |
3e887723b6df06ee547be45c9db36271970002f61b213faa687a38f58eddcfd2 | ocaml/dune | menhir_stanza.ml | open Import
let syntax =
Dune_lang.Syntax.create ~name:"menhir" ~desc:"the menhir extension"
[ ((1, 0), `Since (1, 0))
; ((1, 1), `Since (1, 4))
; ((2, 0), `Since (1, 4))
; ((2, 1), `Since (2, 2))
]
open Dune_lang.Decoder
type t =
{ merge_into : string option
; flags : Ordered_set_lang.Unex... | null | https://raw.githubusercontent.com/ocaml/dune/715825e0b032015ff7f1652a2b3ea448513c43ac/src/dune_rules/menhir/menhir_stanza.ml | ocaml | open Import
let syntax =
Dune_lang.Syntax.create ~name:"menhir" ~desc:"the menhir extension"
[ ((1, 0), `Since (1, 0))
; ((1, 1), `Since (1, 4))
; ((2, 0), `Since (1, 4))
; ((2, 1), `Since (2, 2))
]
open Dune_lang.Decoder
type t =
{ merge_into : string option
; flags : Ordered_set_lang.Unex... | |
d55f9a1d24b18b2c4daad2e41703d5f04795e0a31f49db8463ff904df832abb8 | anmonteiro/ocaml-quic | recovery.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2020
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | null | https://raw.githubusercontent.com/anmonteiro/ocaml-quic/d4ada690841481ebea744d08ff39f49bb7d8ae89/lib/recovery.ml | ocaml | ----------------------------------------------------------------------------
* Copyright ( c ) 2020
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | |
76703e9bcab581feb61992303183c062db7a0d2e5e1739d7d5943c093334afe2 | jubnzv/iec-checker | plcopen_cp2.mli | (** PLCOPEN-CP2: All code shall be used in the application *)
open IECCheckerCore
module S = Syntax
val do_check : Cfg.t list -> Warn.t list
| null | https://raw.githubusercontent.com/jubnzv/iec-checker/666cd8a28cb1211465a900862df84d70460c2742/src/lib/plcopen_cp2.mli | ocaml | * PLCOPEN-CP2: All code shall be used in the application | open IECCheckerCore
module S = Syntax
val do_check : Cfg.t list -> Warn.t list
|
bbf0d5b539dbb91844283170aa436c2c1e182514d39c70201537af124f4030d1 | chenyukang/eopl | 18.scm | (load-relative "../libs/init.scm")
(load-relative "./base/classes/test.scm")
(load-relative "./base/classes/store.scm")
(load-relative "./base/classes/data-structures.scm")
(load-relative "./base/classes/environments.scm")
(load-relative "./base/classes/lang.scm")
(load-relative "./base/classes/interp.scm")
(load-relat... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch9/18.scm | scheme | The method environments produced by merge-method-envs can be long.
Write a new version of merge-method-envs with the property that each
method name occurs exactly once, and furthermore, it appears in the
same place as its earliest declaration.
have-method-with-name: Sym * MethodEnv -> #t/#f
merge-method-envs : Me... | (load-relative "../libs/init.scm")
(load-relative "./base/classes/test.scm")
(load-relative "./base/classes/store.scm")
(load-relative "./base/classes/data-structures.scm")
(load-relative "./base/classes/environments.scm")
(load-relative "./base/classes/lang.scm")
(load-relative "./base/classes/interp.scm")
(load-relat... |
58155cd87f14fc5451465bbfc2dd24bc1886bb80e10c64bf7a4eb11098143dbe | jmtd/liquorice | Render.hs | # OPTIONS_GHC -F -pgmF htfpp #
{-# OPTIONS_HADDOCK prune #-}
|
Module : Liquorice . Render
Description : High - level functions for rendering Liquorice programs to PWAD files .
Copyright : © , 2020
License : GPL-3
Maintainer : jon+
Stability : experimental
Portability : POSIX
This... | null | https://raw.githubusercontent.com/jmtd/liquorice/907af53036c57f55909bc32c634c2a876b48c899/Liquorice/Render.hs | haskell | # OPTIONS_HADDOCK prune #
utility stuff -------------------------------------------------------------
-------------------------
a hack
output if there isn't: [[all linedefs], []]
(need to avoid tail in "after" for the [] case)
old case, no overlap, single-sided
| Convert the geometry described by the supplied Co... | # OPTIONS_GHC -F -pgmF htfpp #
|
Module : Liquorice . Render
Description : High - level functions for rendering Liquorice programs to PWAD files .
Copyright : © , 2020
License : GPL-3
Maintainer : jon+
Stability : experimental
Portability : POSIX
This module exposes a high - level... |
86e5c376df07993cf2890f0de59d6fc51c8ff9cadcd0e53822e3331adb9fd7c6 | metabase/metabase | pulses.clj | (ns metabase-enterprise.audit-app.pages.common.pulses
"Shared code for [[metabase-enterprise.audit-app.pages.dashboard-subscriptions]]
and [[metabase-enterprise.audit-app.pages.alerts]]."
(:require
[cheshire.core :as json]
[metabase.models.collection :as collection]
[metabase.util.cron :as u.cron]
[me... | null | https://raw.githubusercontent.com/metabase/metabase/fab6832052f8312ec37b1f24e1faf4b9df265ed1/enterprise/backend/src/metabase_enterprise/audit_app/pages/common/pulses.clj | clojure | something like | (ns metabase-enterprise.audit-app.pages.common.pulses
"Shared code for [[metabase-enterprise.audit-app.pages.dashboard-subscriptions]]
and [[metabase-enterprise.audit-app.pages.alerts]]."
(:require
[cheshire.core :as json]
[metabase.models.collection :as collection]
[metabase.util.cron :as u.cron]
[me... |
66254f465d213882a3b4dfe0374599ec4f8d789d36812f7a73fe642a9b4d9ee8 | BinaryAnalysisPlatform/bap | bap_primus_lisp_attribute.mli | * Primus attributes .
Attributes are declared with the [ declare ] statement . Each
attribute has its own syntax . A parser can be registered using
this module .
So far , we keep this module internal .
Attributes are declared with the [declare] statement. Each
attribute has its own ... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/ef6afa455a086fdf6413d2f32db98fa9ff1b28d8/lib/bap_primus/bap_primus_lisp_attribute.mli | ocaml | * Primus attributes .
Attributes are declared with the [ declare ] statement . Each
attribute has its own syntax . A parser can be registered using
this module .
So far , we keep this module internal .
Attributes are declared with the [declare] statement. Each
attribute has its own ... | |
e0d6accd6211de269287f51ba513b81b23edc6ad0be5f95cf98d61ef8c594533 | wrengr/logfloat | PartialOrd.hs | # LANGUAGE CPP
, FlexibleInstances
, UndecidableInstances
#
, FlexibleInstances
, UndecidableInstances
#-}
#if __GLASGOW_HASKELL__ < 710
# LANGUAGE OverlappingInstances #
#endif
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
-----------------------------... | null | https://raw.githubusercontent.com/wrengr/logfloat/dbe465b525505084a41aa0b81022218ec092584b/src/Data/Number/PartialOrd.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
--------------------------------------------------------------
~ 2021.10.17
|
License : BSD3
Maintainer :
Stability : stable
Portability : semi-portable (OverlappingInstances,...)
ordering. While such total orderings ... | # LANGUAGE CPP
, FlexibleInstances
, UndecidableInstances
#
, FlexibleInstances
, UndecidableInstances
#-}
#if __GLASGOW_HASKELL__ < 710
# LANGUAGE OverlappingInstances #
#endif
Module : Data . Number . PartialOrd
Copyright : Co... |
15ca195da53d642ed097c51d30894f9cc290e008b968a32642d286a0d012ed83 | lijunsong/fl-compiler | translate.ml | open Symbol
open Batteries
Notes on static link : static link ( sl ) is added during the
translation .
Functions level stored in environment will include the static link
which is added during the translation of a function declaration by
calling new_level , while function signature does not i... | null | https://raw.githubusercontent.com/lijunsong/fl-compiler/6d2938855012a7a0a8767dc342f6abb454c43eec/frontend/translate.ml | ocaml | * level is a wrapper of Frame with additional _static_ scope
* information
* access is a wrapper to Frame.access with additional level
* information
* uniq is for compare levels
* frag_list stores seen functions and string literals
* To use an IR as an Ex, call this function
* To use an IR as an Nx, call this fu... | open Symbol
open Batteries
Notes on static link : static link ( sl ) is added during the
translation .
Functions level stored in environment will include the static link
which is added during the translation of a function declaration by
calling new_level , while function signature does not i... |
d44b7077acd5b4ee41f3435e26001ad54ab50ccf07a243568101140623adf334 | kit-ty-kate/visitors | expr00endo.ml | type expr =
| EConst of int
| EAdd of expr * expr
[@@deriving visitors { variety = "endo" }]
| null | https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/expr00endo.ml | ocaml | type expr =
| EConst of int
| EAdd of expr * expr
[@@deriving visitors { variety = "endo" }]
| |
ea51482be6dab667d94b1799fd132c312b67b3041cd223467b57649e435dc0a7 | hedgehogqa/haskell-hedgehog-classes | Func.hs | module Hedgehog.Classes.Common.Func
( func1
, func2
, func3
, func4
, func5
, func6
, Triple(..), reverseTriple, genTriple
) where
import Hedgehog
import Data.Functor.Classes (Eq1(..), Show1(..))
import Data.Functor.Compose
import qualified Data.Set as S
import qualified Control.Monad.Trans.Writer.Laz... | null | https://raw.githubusercontent.com/hedgehogqa/haskell-hedgehog-classes/4d97b000e915de8ba590818f551bce7bd862e7d4/src/Hedgehog/Classes/Common/Func.hs | haskell | module Hedgehog.Classes.Common.Func
( func1
, func2
, func3
, func4
, func5
, func6
, Triple(..), reverseTriple, genTriple
) where
import Hedgehog
import Data.Functor.Classes (Eq1(..), Show1(..))
import Data.Functor.Compose
import qualified Data.Set as S
import qualified Control.Monad.Trans.Writer.Laz... | |
72edb1165dfcba646a6a1a69b3f5f713ad74f43ef02bb94a92aa27da8bb636a7 | mflatt/plait | contract-support.rkt | #lang racket/base
(require racket/runtime-path
(for-syntax racket/base))
(provide (all-from-out racket/runtime-path)
(for-syntax quote))
| null | https://raw.githubusercontent.com/mflatt/plait/98811b30889d9be6b15326d932187dd99037a139/private/contract-support.rkt | racket | #lang racket/base
(require racket/runtime-path
(for-syntax racket/base))
(provide (all-from-out racket/runtime-path)
(for-syntax quote))
| |
674f3b0ac27900ada66500b6e4774137365ddf3598c78ecc61e6cb2a91cff9ae | mirage/mirage-www-deployment | config.ml |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/mirage-www-deployment/ef439e79be8fb8b475021c72af3c781a8bd42cfa/xen/9eb85d0a439f81fa76def24669b02d0068c95519/config.ml | ocaml | Hack to make the image name parametrized
* With tls
* Without tls
let tracing = mprof_trace ~size:10000 () in |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
1f3b9964f95d72b9eb34615c8a90eebce79d851f9ccbcff0cf74f56fc57a0956 | ocaml-ppx/ppx_tools_versioned | ast_lifter_408.ml | open Migrate_parsetree.Ast_408
class virtual ['res] lifter =
object (this)
method lift_Parsetree_expression : Parsetree.expression -> 'res=
(fun
{ Parsetree.pexp_desc = pexp_desc;
Parsetree.pexp_loc = pexp_loc;
Parsetree.pexp_loc_stack = pexp_loc_stack;
Parsetree.p... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/ast_lifter_408.ml | ocaml | open Migrate_parsetree.Ast_408
class virtual ['res] lifter =
object (this)
method lift_Parsetree_expression : Parsetree.expression -> 'res=
(fun
{ Parsetree.pexp_desc = pexp_desc;
Parsetree.pexp_loc = pexp_loc;
Parsetree.pexp_loc_stack = pexp_loc_stack;
Parsetree.p... | |
6344a67534a2e9496c07a8a371e00ba0749161d6d61ef713f1e8600e33f5ff72 | input-output-hk/cardano-sl | Constants.hs | module Pos.Chain.Update.Constants
* Genesis constants
genesisBlockVersion
, genesisSoftwareVersions
, genesisAppNames
) where
import Universum
import Pos.Chain.Update.ApplicationName (ApplicationName (..))
import Pos.Chain.Update.BlockVersion (BlockVersion... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/src/Pos/Chain/Update/Constants.hs | haskell | --------------------------------------------------------------------------
--------------------------------------------------------------------------
| BlockVersion used at the very beginning.
| Software Versions | module Pos.Chain.Update.Constants
* Genesis constants
genesisBlockVersion
, genesisSoftwareVersions
, genesisAppNames
) where
import Universum
import Pos.Chain.Update.ApplicationName (ApplicationName (..))
import Pos.Chain.Update.BlockVersion (BlockVersion... |
9640d0bf8b84f6a056144572c6eb1623eae71efae1e15db9604c3c6e07cc5699 | TristanCacqueray/haskell-xstatic | XStatic.hs | {-# LANGUAGE OverloadedStrings #-}
| Add XStaticFile to Html document .
@
indexHtml : : Html ( )
indexHtml = do
doctypehtml _ do
head _ do
meta _ [ charset _ " utf-8 " ]
meta _ [ name _ " viewport " , content _ " width = device - width , initial - scale=1.0 " ]
... | null | https://raw.githubusercontent.com/TristanCacqueray/haskell-xstatic/387d11b980f1a864cd7c1a3fcfd9ad7786fca964/lucid2-xstatic/src/Lucid/XStatic.hs | haskell | # LANGUAGE OverloadedStrings #
| Adds 'script_' and 'link_' for javascript and css files. |
| Add XStaticFile to Html document .
@
indexHtml : : Html ( )
indexHtml = do
doctypehtml _ do
head _ do
meta _ [ charset _ " utf-8 " ]
meta _ [ name _ " viewport " , content _ " width = device - width , initial - scale=1.0 " ]
xstaticScripts xfiles
... |
09cacae40d6bba532785ea586b58473e548f7dae0bea79841642bba23041ae4b | clojure/data.xml | test_process.cljc | (ns clojure.data.xml.test-process
(:require [clojure.data.xml :refer [element qname element?
#?@(:clj [element-nss aggregate-xmlns
find-xmlns])]]
[clojure.test :refer [deftest is]]
[clojure.walk :as w]
... | null | https://raw.githubusercontent.com/clojure/data.xml/12cc9934607de6cb4d75eddb1fcae30829fa4156/src/test/clojure/clojure/data/xml/test_process.cljc | clojure | (ns clojure.data.xml.test-process
(:require [clojure.data.xml :refer [element qname element?
#?@(:clj [element-nss aggregate-xmlns
find-xmlns])]]
[clojure.test :refer [deftest is]]
[clojure.walk :as w]
... | |
b0c89600c2f4b6fcadba11a0544947d577fcb11db21f6a8918c86219c9078e0d | vikram/lisplibraries | person.lisp |
(in-package :weblocks-demo-popover)
;;; Person
(defclass person ()
((id :accessor person-id)
(first-name :accessor person-first-name
:initarg :first-name)
(last-name :accessor person-last-name
:initarg :last-name
:type string)
(age :accessor person-age
:initarg :age
:type (or null i... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/contrib/yarek/examples/weblocks-demo-popover/src/model/person.lisp | lisp | Person
Table View
Data View
Form View |
(in-package :weblocks-demo-popover)
(defclass person ()
((id :accessor person-id)
(first-name :accessor person-first-name
:initarg :first-name)
(last-name :accessor person-last-name
:initarg :last-name
:type string)
(age :accessor person-age
:initarg :age
:type (or null integer))
... |
e37a98e3974493172967ca5c7ee2c180b6a5a632b53db34373f27d3282cb4b57 | mentat-collective/functional-numerics | common.cljc | (ns quadrature.common
"Implements utilities shared by all integrators, for example:
- code to wrap a sequence of progressively better estimates in a common `integrator` interface
- data structures implementing various integration intervals."
#?(:cljs (:refer-clojure :exclude [infinite?]
... | null | https://raw.githubusercontent.com/mentat-collective/functional-numerics/44856b0e3cd1f0dd9f8ebb2f67f4e85a68aa8380/src/quadrature/common.cljc | clojure | (ns quadrature.common
"Implements utilities shared by all integrators, for example:
- code to wrap a sequence of progressively better estimates in a common `integrator` interface
- data structures implementing various integration intervals."
#?(:cljs (:refer-clojure :exclude [infinite?]
... | |
220a305fe9aab40fdab2235cd07987f8c5f4f53af047d07f315070ee653f3641 | tcsprojects/pgsolver | mucalculus.ml | open Tcsset;;
open Tcsarray;;
open Paritygame;;
type ('p,'a) mucalc = Prop of 'p
| Var of string
| Neg of ('p,'a) mucalc
| Imp of ('p,'a) mucalc * ('p,'a) mucalc
| Conj of ('p,'a) mucalc list
| Disj of ('p,'a) mucalc list
| Diam of 'a option * (('p,'a) mucalc)
| Box of 'a ... | null | https://raw.githubusercontent.com/tcsprojects/pgsolver/b0c31a8b367c405baed961385ad645d52f648325/src/generators/modelchecking/mucalculus.ml | ocaml | for further ideas to simplify formulas | open Tcsset;;
open Tcsarray;;
open Paritygame;;
type ('p,'a) mucalc = Prop of 'p
| Var of string
| Neg of ('p,'a) mucalc
| Imp of ('p,'a) mucalc * ('p,'a) mucalc
| Conj of ('p,'a) mucalc list
| Disj of ('p,'a) mucalc list
| Diam of 'a option * (('p,'a) mucalc)
| Box of 'a ... |
675b61378bbc23297a2c15f611520daef922f2844c330246c61dc3798c0116e5 | ocaml/ocaml | pprintast.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml/ocaml/8a61778d2716304203974d20ead1b2736c1694a8/parsing/pprintast.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | , OCamlPro
, University of Pennsylvania
Copyright 2007 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Original Code from Ber - metaocaml , modified... |
03e8aa337e457c593ed51521023dc9c1d9873ca1e2d1794e905c09df18c4d5a8 | rixed/ramen | CodeGenLib_Publish.ml | This module implements the part of a worker that connects to the confserver
* and output tuples in every requested destinations .
* When a worker wants to commit a tuple it just calls the function returned
* by [ make_outputer ] .
* It is then forwarded to each taillers and configured outputs .
*
* ... | null | https://raw.githubusercontent.com/rixed/ramen/5e63e68df71bda4286d959e2b8e30e885d6aef4b/src/CodeGenLib_Publish.ml | ocaml | FIXME: now that TcpSocket.send is asynchronous, this is useless:
Store all tuple batch per response key.
* value is a count and a list (in reverse order)
The list of channels for which this replayer is in charge of deleting the replay
* and response keys:
Flag to command the async_thread to exit
Do not stop ... | This module implements the part of a worker that connects to the confserver
* and output tuples in every requested destinations .
* When a worker wants to commit a tuple it just calls the function returned
* by [ make_outputer ] .
* It is then forwarded to each taillers and configured outputs .
*
* ... |
dfc5d0051df2d96a2052d59df744fa70b3aad511728f31c3f38623962daf5248 | ekmett/unpacked-containers | Base.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE MagicHash #
# LANGUAGE PatternGuards #
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeFamilies #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - full - laziness -funbox - strict - fiel... | null | https://raw.githubusercontent.com/ekmett/unpacked-containers/7dc56993a57511b58257b5d389473e638a7082d2/unpacked-unordered-containers/src/HashMap/Base.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
* Construction
* Basic interface
* Combine
** Union
* Transformations
* Difference and intersection
* Folds
* Filter
* Conversions
** Lists
Internals used by the strict version
| A set of values. A set cannot contain duplicate values.
----------------------... | # LANGUAGE MagicHash #
# LANGUAGE PatternGuards #
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - full - laziness -funbox - strict - fields #
module HashMap.Base
(
HashMap(..)
, Le... |
48afa5efb6784334903f0d7363c8609f15e2a4e03b3368c77444d9e4e0014ed7 | stumpwm/stumpwm-contrib | radio.lisp | (in-package :stump-radio)
;; radio stations
(defvar *stations*
'((:|Le DJAM| . "")
(:|FluxFM| . "-320/audio/")
(:|1Live| . "-1live-live.icecastssl.wdr.de/wdr/1live/live/mp3/128/stream.mp3"))
"association list of radio stations, key is a name, value is a playable URL of the radio station")
(defun add-stat... | null | https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/media/stump-radio/radio.lisp | lisp | radio stations
radio playing and control
don't test for :running, but for (not :exited),
as the process might also be in :stopped or :signaled | (in-package :stump-radio)
(defvar *stations*
'((:|Le DJAM| . "")
(:|FluxFM| . "-320/audio/")
(:|1Live| . "-1live-live.icecastssl.wdr.de/wdr/1live/live/mp3/128/stream.mp3"))
"association list of radio stations, key is a name, value is a playable URL of the radio station")
(defun add-station (name url)
(... |
c7e22f1beea8353b435c09cbdd929e728843d34f8aef96a42bfafb2fbb4bf1f6 | eslick/cl-registry | question.lisp | (in-package :registry)
(registry-proclamations)
;; ===========================================================
;; Survey question model
;; ===========================================================
;; Prompt, type, view, relation
;; => validation, extraction
(defmodel question (fulltext-mixin user-translation-mix... | null | https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/src/data-model/question.lisp | lisp | ===========================================================
Survey question model
===========================================================
Prompt, type, view, relation
=> validation, extraction
Prompt
statisfy via fulltext!
Type and view
Properties
Prompt slot may be translated into current language
This... | (in-package :registry)
(registry-proclamations)
(defmodel question (fulltext-mixin user-translation-mixin published-data-mixin)
(name :accessor question-name :initarg :name :index t)
(number :accessor question-number :initarg :number :initform nil)
(prompt-format :accessor question-prompt-format :initarg :... |
07ae970b6c4c95d93ba614d06674d128702cbe09d377ce1f8799936a0a22c01f | awslabs/s2n-bignum | bignum_mul_4_8_alt.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_mul_4_8_alt.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "x86/fastmul/bignum_mul_4_8_alt.o";;
***
XOR (% r9) (% r9)
XOR (% r10) (% r10)
ADD (% r8) (% rax)
ADC (% r9) (% rdx)
ADD (% r8) (% ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
4x4->8 multiplication using traditional x86 mul instructions . ... |
94b67361767b2acbf7a76f04575c10f56364483bc261970a2f12e93078fa2721 | jellelicht/guix | nar.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2015 < >
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free So... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/nar.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 , 2015 < >
Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix nar)
#:use-module (guix utils)
#:use-modu... |
da90a3edf8ee2410f59d79baa6e6b2fe7d9d1f34e7888252d71b95545a0eec40 | Gizra/ihp-simple-seat-reservation | Main.hs | module Main where
import Config
import IHP.FrameworkConfig
import IHP.Job.Types
import IHP.Prelude
import IHP.RouterSupport
import qualified IHP.Server
import Web.FrontController
import Web.Types
import Web.Worker
instance FrontController RootApplication where
controllers =
[ mountFrontController WebApplication... | null | https://raw.githubusercontent.com/Gizra/ihp-simple-seat-reservation/94401e2f80236026cffe253f77a42fab6df07f8f/Main.hs | haskell | module Main where
import Config
import IHP.FrameworkConfig
import IHP.Job.Types
import IHP.Prelude
import IHP.RouterSupport
import qualified IHP.Server
import Web.FrontController
import Web.Types
import Web.Worker
instance FrontController RootApplication where
controllers =
[ mountFrontController WebApplication... | |
dcc27cf5417f0902299c4dd9683e15bc5f0d83830c811cfc13d3d51b62e49d4f | yurug/ocaml4.04.0-copatterns | test_ratios.ml | open Test;;
open Nat;;
open Big_int;;
open Ratio;;
open Arith_status;;
set_error_when_null_denominator false
;;
let infinite_failure = "infinite or undefined rational number";;
testing_function "create_ratio"
;;
let r = create_ratio (big_int_of_int 1) (big_int_of_int (-2)) in
test 1 eq_big_int (numerator_ratio r, b... | null | https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/testsuite/tests/lib-num/test_ratios.ml | ocaml | PR#4566 | open Test;;
open Nat;;
open Big_int;;
open Ratio;;
open Arith_status;;
set_error_when_null_denominator false
;;
let infinite_failure = "infinite or undefined rational number";;
testing_function "create_ratio"
;;
let r = create_ratio (big_int_of_int 1) (big_int_of_int (-2)) in
test 1 eq_big_int (numerator_ratio r, b... |
7e9605603fefa5f929db90e79aef9142786a4dd2b7b9f3a749b1d6364147572d | ryanpbrewster/haskell | P174Test.hs | module Problems.P174Test
( test_174
) where
import Problems.P174
import Test.Tasty.Discover
test_174 :: [TestTree]
test_174 = [testCase "main" $ solve @?= "209566"]
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P174Test.hs | haskell | module Problems.P174Test
( test_174
) where
import Problems.P174
import Test.Tasty.Discover
test_174 :: [TestTree]
test_174 = [testCase "main" $ solve @?= "209566"]
| |
0e07b5310c712de5900f30daf7b915a49631b522f9754098a68ebd45c407b6fd | oconn/re-frame-routing | core.cljs | (ns re-frame-routing.core
(:require [cljs.spec.alpha :as s]
[re-frame.core :as re-frame]
[re-frame-routing.events :as evts]
[re-frame-routing.subscriptions :as subs]))
(def initial-state
{:route nil
:route-params nil
:route-query nil
:initialized false})
(s/def ::href ... | null | https://raw.githubusercontent.com/oconn/re-frame-routing/da3b02c1bf8c73b8856326a269ccdc0d60a23d6e/src/re_frame_routing/core.cljs | clojure | method for sharing infromation between middleware functions
or track information on global state updates that will trigger
re-renders of the middleware chain.
Realworld application of using middleware-state:
View relies on data from a server before rendering. Add request
information to middleware state to cause ... | (ns re-frame-routing.core
(:require [cljs.spec.alpha :as s]
[re-frame.core :as re-frame]
[re-frame-routing.events :as evts]
[re-frame-routing.subscriptions :as subs]))
(def initial-state
{:route nil
:route-params nil
:route-query nil
:initialized false})
(s/def ::href ... |
d61677eba87a65defcbf8fa984cb8d2c26cbad63fa254855eeb5088ae6186f7a | ocaml/ocaml-re | test_perl.ml | open Re
open Re.Perl
open Fort_unit
let eq_re ?opts r s = expect_equal_app ~msg:s id r (re ?opts) s
;;
let parse_error_re ?opts s =
try ignore (re ?opts s); OUnit2.assert_failure s with
| Re.Perl.Parse_error -> ()
* Tests based on description of Perl regular expressions given at
* -local/doc/manual/htm... | null | https://raw.githubusercontent.com/ocaml/ocaml-re/09c2745a2d8d1517b3d597396e82e122903b0017/lib_test/test_perl.ml | ocaml | escape sequences (\t, etc) ?
modifier support ?
lookahead assertions
independent subexpression
conditional expression
pattern-match modifiers
Extended ? | open Re
open Re.Perl
open Fort_unit
let eq_re ?opts r s = expect_equal_app ~msg:s id r (re ?opts) s
;;
let parse_error_re ?opts s =
try ignore (re ?opts s); OUnit2.assert_failure s with
| Re.Perl.Parse_error -> ()
* Tests based on description of Perl regular expressions given at
* -local/doc/manual/htm... |
e926945c57eaf16defcfcdc91d8a21d942c30103fb04aab3ee4007bb55c3ec70 | sbcl/sbcl | ctor.lisp | ;;;; This file contains the optimization machinery for make-instance.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;; This software is derived from software originally released by
. Copyright and release statements follow . Later
;;;; modifications to the softw... | null | https://raw.githubusercontent.com/sbcl/sbcl/4154e8d5e7b6054305b596975436b05a17653d3c/src/pcl/ctor.lisp | lisp | This file contains the optimization machinery for make-instance.
more information.
This software is derived from software originally released by
modifications to the software are in the public domain and are
provided with absolutely no warranty. See the COPYING and
CREDITS files for more information.
All rights... |
This software is part of the SBCL system . See the README file for
. Copyright and release statements follow . Later
Copyright ( C ) 2002 < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . The name of t... |
1fde4c29ec8a3b057deebe116c9d77318ac8fe51a6947d379a43e9b2fdfb5e60 | arsenm/Clutterhs | ClutterGame.hs | module Main where
import Graphics.UI.Clutter hiding (Nothing)
import System.Glib.Attributes
import System.Glib.Signals
import Control.Monad (foldM)
import Data.Maybe (fromJust)
import Data.Word (Word8)
import System.Random (randomIO)
colors = map (fromJust . colorFromString) ["blanched almond",
... | null | https://raw.githubusercontent.com/arsenm/Clutterhs/ad3390895264c46906b5d3d954c4b04b04d96b1d/clutter/demo/ClutterGame.hs | haskell | rotation_angle change makes it stop spinning. don't know why it's still
spinning here, it really should have stopped when the timeline did.
off stage | module Main where
import Graphics.UI.Clutter hiding (Nothing)
import System.Glib.Attributes
import System.Glib.Signals
import Control.Monad (foldM)
import Data.Maybe (fromJust)
import Data.Word (Word8)
import System.Random (randomIO)
colors = map (fromJust . colorFromString) ["blanched almond",
... |
8e85b3e087aec92bbffeb86e456eb05f22bb67f1ebffe61724832b7434bab896 | mput/sicp-solutions | 2_07.rkt | #lang racket
Solution for exercise 2_07 .
(require rackunit "../solutions/utils.rkt")
(provide make-interval lower-bound upper-bound add-interval mul-interval)
(define (add-interval x y)
(make-interval (+ (lower-bound x) (lower-bound y))
(+ (upper-bound x) (upper-bound y))))
(define (mul-interva... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/solutions/2_07.rkt | racket | #lang racket
Solution for exercise 2_07 .
(require rackunit "../solutions/utils.rkt")
(provide make-interval lower-bound upper-bound add-interval mul-interval)
(define (add-interval x y)
(make-interval (+ (lower-bound x) (lower-bound y))
(+ (upper-bound x) (upper-bound y))))
(define (mul-interva... | |
972585e9013023830489050fec7bae98cb59eb26bf23279d99ff3e14c16637d2 | polyfy/polylith | brick_deps.clj | (ns polylith.clj.core.migrator.brick-deps
(:require [polylith.clj.core.common.interface :as common]
[polylith.clj.core.migrator.shared :as shared]))
(defn as-tools-deps [{:keys [type version path git/url sha]}]
(case type
"maven" {:mvn/version version}
"local" {:local/root path}
"git" {:g... | null | https://raw.githubusercontent.com/polyfy/polylith/febea3d8a9b30a60397594dda3cb0f25154b8d8d/components/migrator/src/polylith/clj/core/migrator/brick_deps.clj | clojure | (ns polylith.clj.core.migrator.brick-deps
(:require [polylith.clj.core.common.interface :as common]
[polylith.clj.core.migrator.shared :as shared]))
(defn as-tools-deps [{:keys [type version path git/url sha]}]
(case type
"maven" {:mvn/version version}
"local" {:local/root path}
"git" {:g... | |
29b742ef25d34f5384233f8e805121c8f1dd2244b8ead35f087da3595eb1352c | lucasdicioccio/prodapi | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE TypeApplications #
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
module Main where
import Network.Wai.Handler.Warp as Warp
import Network.Wai.Middleware.RequestLogger as RequestLogger
import Data.Function ((&... | null | https://raw.githubusercontent.com/lucasdicioccio/prodapi/80d622f5bd75e8bad05181b4c35f9c78dd50cdea/example/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE TypeApplications #
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
module Main where
import Network.Wai.Handler.Warp as Warp
import Network.Wai.Middleware.RequestLogger as RequestLogger
import Data.Function ((&))
import Data.Aeson (ToJSON(..))
i... |
f9434fb90a97bbc95b8bdd7dd121ec8a7bc94b3e35ae42109d020da0fcc68e66 | google/ormolu | unboxed-tuples.hs | # LANGUAGE UnboxedTuples #
foo = (# 1,2,3 #)
bar = (#
1,
2,
3 #)
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/unboxed-tuples.hs | haskell | # LANGUAGE UnboxedTuples #
foo = (# 1,2,3 #)
bar = (#
1,
2,
3 #)
| |
9fc7ed1ac5c93e32859f3f01c2f68f77d167cdb649d22a6bba23c7794b0e0779 | babashka/pods | impl_test.clj | (ns babashka.pods.impl-test
(:require [clojure.test :refer :all]
[babashka.pods.impl :refer :all]))
(deftest load-pod-test
(testing "resolve fn gets called when pod has EDN data readers"
(let [resolved? (atom false)
test-resolve (fn [_sym]
(reset! resolved? true))... | null | https://raw.githubusercontent.com/babashka/pods/842ff347391adabece623e4fb3f30297c848acdc/test/babashka/pods/impl_test.clj | clojure | (ns babashka.pods.impl-test
(:require [clojure.test :refer :all]
[babashka.pods.impl :refer :all]))
(deftest load-pod-test
(testing "resolve fn gets called when pod has EDN data readers"
(let [resolved? (atom false)
test-resolve (fn [_sym]
(reset! resolved? true))... | |
b09e1e98d8eb5a2e61b70aa6cd36157b63c09ab599137d58c100c994cce80913 | philnguyen/soft-contract | cpstak.rkt | #lang racket
(require soft-contract/fake-contract)
(define (tak x y z k)
(if (not (< y x))
(k z)
(tak (- x 1)
y
z
(lambda (v1)
(tak (- y 1)
z
x
(lambda (v2)
(tak (- z 1)
x
y
(lambda (v3)
(tak v1 v2 v3 k)))))))))
(define (tak-main x y z)
(tak x y z ... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/unsafe/softy/cpstak.rkt | racket | HERE | #lang racket
(require soft-contract/fake-contract)
(define (tak x y z k)
(if (not (< y x))
(k z)
(tak (- x 1)
y
z
(lambda (v1)
(tak (- y 1)
z
x
(lambda (v2)
(tak (- z 1)
x
y
(lambda (v3)
(tak v1 v2 v3 k)))))))))
(define (tak-main x y z)
(tak x y z ... |
a38764e7ff58e3527ff6ac42c2fe977a6c0faa1438a4d455dbd9cb3c9fa4d5de | alphaHeavy/consul-haskell | Main.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
import Control.Concurrent
import Control.Monad (when)
import Control.Monad.IO.Class
import Control.Retry
import qualified Data.ByteString.Char8 as BS8
import Data.Maybe
#if MIN_VERSION_base(4,11,0)
( < >... | null | https://raw.githubusercontent.com/alphaHeavy/consul-haskell/64e31cb1c678aac04a4fdcd64d9e017b832fd5c4/tests/Main.hs | haskell | # LANGUAGE OverloadedStrings #
* Internal Helper Utilities
Internal Tests
specify the datacenter as part of our request
Client KV
Agent
Health Checks
Session
We use a non-standard port in the test suite and spawn consul there,
to ensure that the test suite doesn't mess with real consul deployments.
hardc... | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
import Control.Concurrent
import Control.Monad (when)
import Control.Monad.IO.Class
import Control.Retry
import qualified Data.ByteString.Char8 as BS8
import Data.Maybe
#if MIN_VERSION_base(4,11,0)
( < > ) is part of Prelude
#else
import ... |
fdd067eeb0742a907a3a16b501decd116f5a8269316745b9c5920648ed14475c | dmitryvk/sbcl-win32-threads | signal.lisp | handling UNIX signals
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provi... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/signal.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
macros for dynamically enabling and disabling signal handling
Before invoking the supplied handler for any of the signals that
can be blocke... | handling UNIX signals
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!UNIX")
Notes on how the without - interrupts / with - interrupts stuff works :
... |
1acdf3aac26658ba05e03b8d1e5435e4fc1a4f92452ac6a7850c0a0751ad7c2a | clj-commons/cljss | padding.clj | (ns cljss.css.props.padding
(:require [clojure.spec.alpha :as s]
[cljss.css.units :as units]))
(defmulti padding count)
(defmethod padding 1 [_]
(s/and
(s/coll-of ::units/dimension)
(s/conformer
(fn [[v]]
{:top v
:left v
:right v
:bottom v}))))
(... | null | https://raw.githubusercontent.com/clj-commons/cljss/d2856688cf650babe518c798cf20e6bdb4227bb7/src/cljss/css/props/padding.clj | clojure | (ns cljss.css.props.padding
(:require [clojure.spec.alpha :as s]
[cljss.css.units :as units]))
(defmulti padding count)
(defmethod padding 1 [_]
(s/and
(s/coll-of ::units/dimension)
(s/conformer
(fn [[v]]
{:top v
:left v
:right v
:bottom v}))))
(... | |
132656947c24a00dd0a0845066dcb9b8b0d6b733316e4b85032d2ac23e1f6144 | qkrgud55/ocamlmulti | testfork.ml | (* POSIX threads and fork() *)
let compute_thread c = ignore c
while true do
print_char c ; flush stdout ;
for i = 1 to 100000 do ignore(ref [ ] ) done
done
while true do
print_char c; flush stdout;
for i = 1 to 100000 do ignore(ref []) done
done
*)
let main () =
ignore(Thread.crea... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/testsuite/tests/lib-systhreads/testfork.ml | ocaml | POSIX threads and fork() |
let compute_thread c = ignore c
while true do
print_char c ; flush stdout ;
for i = 1 to 100000 do ignore(ref [ ] ) done
done
while true do
print_char c; flush stdout;
for i = 1 to 100000 do ignore(ref []) done
done
*)
let main () =
ignore(Thread.create compute_thread '1');
Threa... |
0439b7d2a43584dda6333d173509d0bd5e0ea888afdd90575d7b0bcb26720dcf | AbstractMachinesLab/caramel | math.ml | external sqrt : float -> float = ""
external exp : float -> float = ""
external log : float -> float = ""
external log10 : float -> float = ""
external cos : float -> float = ""
external sin : float -> float = ""
external tan : float -> float = ""
external acos : float -> float = ""
external asin : float -> flo... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/stdlib/math.ml | ocaml | external sqrt : float -> float = ""
external exp : float -> float = ""
external log : float -> float = ""
external log10 : float -> float = ""
external cos : float -> float = ""
external sin : float -> float = ""
external tan : float -> float = ""
external acos : float -> float = ""
external asin : float -> flo... | |
8b205c4722c90e5ef28c30d635acad99617c50f241bcdd3719695a45f0758f75 | fukamachi/clozure-cl | vars.lisp | -*- Log : hemlock.log ; Package : Hemlock - Internals -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
#+CMU (ext:file-comment
"$Header$")... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/cocoa-ide/hemlock/src/vars.lisp | lisp | Package : Hemlock - Internals -*-
**********************************************************************
**********************************************************************
Get the mode-object corresponding to name or die trying.
Return the Binding object corresponding to Name in the collection... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
#+CMU (ext:file-comment
"$Header$")
Written by
The file contains the routines which define Hemlock variables .
(in-package :hemlock-internals)
UNDEFINED - VARIABLE - ER... |
e0444246f6b80be93fdd69bdf8be4c5b467ab0aef54937ee2b3ed8358ee492f3 | gregcman/sucle | scratch-buffer.lisp | (defpackage #:scratch-buffer
(:use :cl #:reverse-array-iterator)
(:export
my-iterator
free-my-iterator-memory
flush-my-iterator
flush-my-iterator*
iterator-fill-pointer
bind-in
bind-in*
bind-out
bind-out*
flush-bind-in
flush-bind-in*))
(in-package #:scratch-buffer)
(defparameter *... | null | https://raw.githubusercontent.com/gregcman/sucle/258be4ac4daaceea06a55f893227584d3772bb47/src/scratch-buffer/scratch-buffer.lisp | lisp | and not be a cons cell, or at least a named cons cell
cleanup
[FIXME]refactor out for * type macros? | (defpackage #:scratch-buffer
(:use :cl #:reverse-array-iterator)
(:export
my-iterator
free-my-iterator-memory
flush-my-iterator
flush-my-iterator*
iterator-fill-pointer
bind-in
bind-in*
bind-out
bind-out*
flush-bind-in
flush-bind-in*))
(in-package #:scratch-buffer)
(defparameter *... |
ff2cab2276b53bc82d7972dac12adb7c06ead1ab9d2daef3bc71a880bd7c6489 | lichenscript/lichenscript | version.ml |
let version = "0.6.3"
| null | https://raw.githubusercontent.com/lichenscript/lichenscript/79dcdb299cb6101dcc48203bb6373834a5539f35/bin/version.ml | ocaml |
let version = "0.6.3"
| |
fa70d7de8365a171faf08e45c9dad9d498df28dd7b1a01ed0419b14bb904099e | dylex/haskell-nfs | File.hs | -- |Operations on file handles and references.
module Network.NFS.V4.File
( FileHandle
, FileName
, FileReference(..)
, relativeFileReference
, absoluteFileReference
, opFileReference
, opGetFileHandle
, opFileReferenceGet
) where
import Network.ONCRPC.XDR.Opaque (toOpaque')
import qualifi... | null | https://raw.githubusercontent.com/dylex/haskell-nfs/07d213e09f7bf9e6fe3200aca3de494c3dcd54f7/nfs/Network/NFS/V4/File.hs | haskell | |Operations on file handles and references. | module Network.NFS.V4.File
( FileHandle
, FileName
, FileReference(..)
, relativeFileReference
, absoluteFileReference
, opFileReference
, opGetFileHandle
, opFileReferenceGet
) where
import Network.ONCRPC.XDR.Opaque (toOpaque')
import qualified Network.NFS.V4.Prot as NFS
import ... |
bbd641e59b7eaec1f4ced97c10ccafad04f069668008627c0d3e1e60b3b7e975 | ndmitchell/catch | Val.hs |
module Val(
Val(..), Vals,
blur,
valsAnd, valsOr,
valsAnds, valsOrs,
valsTrue, valsFalse,
anyCtor,
checkRoot, integrate, differentiate
) where
import Yhc.Core
import General
import Data.List
import Data.Maybe
data Val = Val {valCtor :: String, valFields :: [Val]}
| Any
... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/inspect/Val.hs | haskell | and doesn't consider Pair T _ ^ Pair _ T == Pair T T
is a `subset` b
properties of normalise, with X as the result:
if x is a member, it must not be a subset of any other members
if y is a superset of x and is valid in X, then x should not be present
is the root allowed
some simple constructors |
module Val(
Val(..), Vals,
blur,
valsAnd, valsOr,
valsAnds, valsOrs,
valsTrue, valsFalse,
anyCtor,
checkRoot, integrate, differentiate
) where
import Yhc.Core
import General
import Data.List
import Data.Maybe
data Val = Val {valCtor :: String, valFields :: [Val]}
| Any
... |
6065d74d7f2c7089ddfa172ad11f5bc2943ae063cd808fb589f2646ca0f1ba0f | Bogdanp/racket-component | graph-tests.rkt | #lang racket/base
(require component/private/graph
rackunit)
(provide graph-tests)
(define (symbol<=? x . xs)
(or (apply eq? x xs)
(apply symbol<? x xs)))
(define (pair<=? a-p b-p)
(and (symbol<=? (car a-p) (car b-p))
(symbol<=? (cdr a-p) (cdr b-p))))
(define graph-tests
(test-suite
... | null | https://raw.githubusercontent.com/Bogdanp/racket-component/3ca0ce9f27f7d2f0bc4e71434b558e3088d7da84/component-test/tests/component/graph-tests.rkt | racket | #lang racket/base
(require component/private/graph
rackunit)
(provide graph-tests)
(define (symbol<=? x . xs)
(or (apply eq? x xs)
(apply symbol<? x xs)))
(define (pair<=? a-p b-p)
(and (symbol<=? (car a-p) (car b-p))
(symbol<=? (cdr a-p) (cdr b-p))))
(define graph-tests
(test-suite
... | |
1c0d7b93748d7e5818f4abb0a0b9cb6f7e3632db6a0b05a50e0dbca7a5929c4d | dwayne/eopl3 | ex2.12-2.rkt | #lang racket
;; Constructors
(define (empty-stack)
(list
(lambda () (error 'top "Stack is empty"))
(lambda () #t)))
(define (push x s)
(list
(lambda () x)
(lambda () #f)
s))
(define (pop s)
((car s))
(caddr s))
;; Observers
(define (top s)
((car s)))
(define (empty-stack? s)
((cadr s))... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/02-ch2/racket/ex2.12-2.rkt | racket | Constructors
Observers | #lang racket
(define (empty-stack)
(list
(lambda () (error 'top "Stack is empty"))
(lambda () #t)))
(define (push x s)
(list
(lambda () x)
(lambda () #f)
s))
(define (pop s)
((car s))
(caddr s))
(define (top s)
((car s)))
(define (empty-stack? s)
((cadr s)))
(module+ test
(require r... |
dca91a01db34f8a635fd09c79b2c5708c5cbb5c95625d7d65631ff22da22b2ea | BardurArantsson/cqrs | EventStream.hs | {-# LANGUAGE OverloadedStrings #-}
module Data.CQRS.PostgreSQL.Internal.EventStream
( newEventStream
) where
import Control.Monad.IO.Unlift (MonadUnliftIO(..))
import Control.Monad.Trans.Class (lift)
import Data.ByteString (ByteString)
import Data.CQRS.Internal.StreamPos... | null | https://raw.githubusercontent.com/BardurArantsson/cqrs/2491d83e2bcd68c883aaea33cdce6c5ea8c0cd1a/cqrs-postgresql/src/Data/CQRS/PostgreSQL/Internal/EventStream.hs | haskell | # LANGUAGE OverloadedStrings #
SQL | module Data.CQRS.PostgreSQL.Internal.EventStream
( newEventStream
) where
import Control.Monad.IO.Unlift (MonadUnliftIO(..))
import Control.Monad.Trans.Class (lift)
import Data.ByteString (ByteString)
import Data.CQRS.Internal.StreamPosition
import Data.CQRS.Ty... |
69e01b6dbd1f741918f551d77e4e4b8e7a88dd7e58a3049e108185deacbc2230 | GrammaTech/sel | php.lisp | (defpackage :software-evolution-library/software/php
(:nicknames :sel/software/php :sel/sw/php)
(:use :gt/full
:software-evolution-library
:software-evolution-library/software/tree-sitter-base
:software-evolution-library/software/template))
(in-package :software-evolution-library/software/t... | null | https://raw.githubusercontent.com/GrammaTech/sel/d7b297361ff8418805a228504a5365cd05ed55f8/software/php.lisp | lisp | ===================================================
Generate the language definitions
===================================================
===================================================
#+:TREE-SITTER-PHP | (defpackage :software-evolution-library/software/php
(:nicknames :sel/software/php :sel/sw/php)
(:use :gt/full
:software-evolution-library
:software-evolution-library/software/tree-sitter-base
:software-evolution-library/software/template))
(in-package :software-evolution-library/software/t... |
fd73d1ab648e369d8cae994b47e5e61a9306bd0bb082101adaa44be4ba312782 | typedclojure/typedclojure | tag_test.clj | (ns clojure.core.typed.test.tag-test
(:require [typed.clj.checker.test-utils :refer :all]
[clojure.test :refer :all]))
;(deftest tag-test
( is - tc - e ( tag 1 long ) )
; (is-tc-err (tag 1 Long))
; (is-tc-e (tag
; (let [a (inc 1)
b ( * 2 10 ) ]
; (+ a b)... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/1b791b9e5f3e907f9cf1d504a7798c9bf2a04e8f/typed/clj.checker/test/clojure/core/typed/test/tag_test.clj | clojure | (deftest tag-test
(is-tc-err (tag 1 Long))
(is-tc-e (tag
(let [a (inc 1)
(+ a b))
long)))
(deftest unboxed-arith-test
(is-tc-e (do
from -complex-number-arithmetic-in-clojure
(ann-datatype complex [real :- Double
imag :- Do... | (ns clojure.core.typed.test.tag-test
(:require [typed.clj.checker.test-utils :refer :all]
[clojure.test :refer :all]))
( is - tc - e ( tag 1 long ) )
b ( * 2 10 ) ]
( deftype complex [ ^double real
( plus [ complex complex - > complex ] )
... |
b4927dbc3c736b81a400f331c425db6443bc757acfe0c60d030bfa9ab7ae2768 | reasonml/reason | synthesis.ml | open MenhirSdk.Cmly_api
open Attributes
open Utils
(** Specification of synthesized tactics *)
module type SYNTHESIZER = sig
module G : GRAMMAR
Specification of problems
There are two situations we want to synthesize solution for :
- ` Head ` is when the dot is just in front of some non - termina... | null | https://raw.githubusercontent.com/reasonml/reason/daa11255cb4716ce1c370925251021bd6e3bd974/src/menhir-recover/synthesis.ml | ocaml | * Specification of synthesized tactics
const
add
* A human readable representation of a [variable].
* Specification of solutions
A successful synthesis results in a list of actions.
`Abort` is issued if there is no solution. This is the case for instance
if there is a semantic value that the synthesizer... | open MenhirSdk.Cmly_api
open Attributes
open Utils
module type SYNTHESIZER = sig
module G : GRAMMAR
Specification of problems
There are two situations we want to synthesize solution for :
- ` Head ` is when the dot is just in front of some non - terminal ,
and we would like to find a way... |
bef9209f4257c4f49467b12bbb9c2b48630900913116654d0205c15a59fd7918 | clojure-interop/google-cloud-clients | ProductSearchClient$ListReferenceImagesPagedResponse.clj | (ns com.google.cloud.vision.v1p4beta1.ProductSearchClient$ListReferenceImagesPagedResponse
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.vision.v1p4beta1 ProductSearchClient$ListReferenceImagesPagedResponse]))
(defn *create-async
"context - `com.google.api.gax.rpc.PageContext`
fut... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.vision/src/com/google/cloud/vision/v1p4beta1/ProductSearchClient%24ListReferenceImagesPagedResponse.clj | clojure | (ns com.google.cloud.vision.v1p4beta1.ProductSearchClient$ListReferenceImagesPagedResponse
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.vision.v1p4beta1 ProductSearchClient$ListReferenceImagesPagedResponse]))
(defn *create-async
"context - `com.google.api.gax.rpc.PageContext`
fut... | |
0a731d46225af9aa51e1d64d58e6c461f65a3127b98b6c2d1f3c91298b9bcafe | ermine/xmpp | XEP_pubsub.ml |
* ( c ) 2010
*
* (c) 2010 Anastasia Gornostaeva
*
*)
| null | https://raw.githubusercontent.com/ermine/xmpp/85f31c5aaac6e3b5042694ff33ac8afdfb845c06/src/XEP_pubsub.ml | ocaml |
* ( c ) 2010
*
* (c) 2010 Anastasia Gornostaeva
*
*)
| |
ff4ed76d33a6ce2dbca92842ec6e495acda057a82d0dfdfb9d0eef8ff60b9423 | Bodigrim/arithmoi | PrimesTests.hs | -- |
Module : Math . . PrimesTests
Copyright : ( c ) 2016
Licence : MIT
Maintainer : < >
--
Tests for Math . . Primes
--
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - type - defaults #
module Math.NumberTheory.PrimesTests
( testSuite... | null | https://raw.githubusercontent.com/Bodigrim/arithmoi/c72a1017450c2f1f05a959943dec265678b1cbc3/test-suite/Math/NumberTheory/PrimesTests.hs | haskell | |
| Module : Math . . PrimesTests
Copyright : ( c ) 2016
Licence : MIT
Maintainer : < >
Tests for Math . . Primes
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - type - defaults #
module Math.NumberTheory.PrimesTests
( testSuite
) where
... |
dba5187009a0f7ad7a5280d4d9a0f31880f20d662d621ca4e21e3a477050689e | PaulRivier/kiwi | Types.hs | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleInstances #
module Kiwi.Types where
import Control.Monad.Reader
import Data.Char (toLower, isSpace)
import Data.IORef
import Data.Ix (Ix)
import qualified Data.Map.Strict as M
import Data.Maybe (catMaybes)
import ... | null | https://raw.githubusercontent.com/PaulRivier/kiwi/c89bd5b7586939f4491d56f3d842c731047c5830/src/Kiwi/Types.hs | haskell | ^ (user id, groups, login time)
^ Map Session-Key Login
^ path to file, absolute
^ time of file modification from filesystem
^ (source, page id)
^ TargetId
Config, locales ... | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleInstances #
module Kiwi.Types where
import Control.Monad.Reader
import Data.Char (toLower, isSpace)
import Data.IORef
import Data.Ix (Ix)
import qualified Data.Map.Strict as M
import Data.Maybe (catMaybes)
import ... |
a031d33409e95d97c07243d11a6d3c150f35381b75b23821a62f9a1ad2d0006f | ilya-klyuchnikov/lambdapi | Printer.hs | module LambdaPi.Printer where
import Prelude hiding ((<>))
import Text.PrettyPrint.HughesPJ hiding (parens)
import Common
import LambdaPi.AST
iPrint_ :: Int -> Int -> ITerm_ -> Doc
iPrint_ p ii (Ann_ c ty) = parensIf (p > 1) (cPrint_ 2 ii c <> text " :: " <> cPrint_ 0 ii ty)
iPrint_ p ii Star_ = ... | null | https://raw.githubusercontent.com/ilya-klyuchnikov/lambdapi/79ddf21581e03ea34a94cc00ffd5c8684d845ed9/src/LambdaPi/Printer.hs | haskell | module LambdaPi.Printer where
import Prelude hiding ((<>))
import Text.PrettyPrint.HughesPJ hiding (parens)
import Common
import LambdaPi.AST
iPrint_ :: Int -> Int -> ITerm_ -> Doc
iPrint_ p ii (Ann_ c ty) = parensIf (p > 1) (cPrint_ 2 ii c <> text " :: " <> cPrint_ 0 ii ty)
iPrint_ p ii Star_ = ... | |
d3af26eed8f47601ba949d144bb3be7457f16dd63fe06d2512e5be57805ae2be | tnelson/Forge | file.rkt | #lang forge
--sig A { r: set A, s: two A }
--sig B extends A {}
--
--pred p[a:A] { a->a in r }
--fun f[a:A]: A { a.r }
--fun g[a1:A, a2:A]: A {a1+a2}
--
--run { (sing[1]).succ = sing[2] }
--run { some a:A | f[a].r = A }
--check { all a:A | r.s[a] = (r.s)[a] } -- valid
--check { all a:A | r.s[a] = r.(s[a]) } -- inval... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/examples/dir/file.rkt | racket | #lang forge
--sig A { r: set A, s: two A }
--sig B extends A {}
--
--pred p[a:A] { a->a in r }
--fun f[a:A]: A { a.r }
--fun g[a1:A, a2:A]: A {a1+a2}
--
--run { (sing[1]).succ = sing[2] }
--run { some a:A | f[a].r = A }
--check { all a:A | r.s[a] = (r.s)[a] } -- valid
--check { all a:A | r.s[a] = r.(s[a]) } -- inval... | |
74c1882c594fe49a8073a799f17a788a6bd33aa2d5205b50a9c185a111b74a86 | rowangithub/DOrder | miniOCamlSet.ml | * A mini - demo of the tree based implementation of Ocaml - Set .
This demo supports tree insertion , removal , membershipe query ,
max_elt query , min_elt query and convertion to list
This demo supports tree insertion, removal, membershipe query,
max_elt query, min_elt query and convertion to list *)
ty... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/reachability/miniOCamlSet.ml | ocaml | Node (add x l, x', n)
Node (l, x', add x n)
| Empty -> invalid_arg "Map.remove_min_elt"
Node (l'', x, n)
Smallest and greatest element of a set
| Empty -> raise Not_found
| Empty -> raise Not_found | * A mini - demo of the tree based implementation of Ocaml - Set .
This demo supports tree insertion , removal , membershipe query ,
max_elt query , min_elt query and convertion to list
This demo supports tree insertion, removal, membershipe query,
max_elt query, min_elt query and convertion to list *)
ty... |
a5739956bc6b5d3a06b283ccd58c36f6e38f460b70c6d1bc2580d93e1f543fb0 | rachbowyer/keirin | core_test.clj | Copyright © ️ 2017 , 2021 . All rights reserved .
;;
;; This program and the accompanying materials
;; are made available under the terms of the Eclipse Public License v1.0
;; which accompanies this distribution, and is available at
-v10.html
(ns keirin.core_test
(:require [keirin.core :as kc]
[clo... | null | https://raw.githubusercontent.com/rachbowyer/keirin/9e10c36be999d9212d98592a6d3bb3711cb8a2e2/test/keirin/core_test.clj | clojure |
This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
All elements are 0 from the central point | Copyright © ️ 2017 , 2021 . All rights reserved .
-v10.html
(ns keirin.core_test
(:require [keirin.core :as kc]
[clojure.test :refer :all]))
(def ^:private sq #'kc/sq)
(def ^:private abs #'kc/abs)
(def ^:private mean #'kc/mean)
(def ^:private sample-variance #'kc/sample-variance)
(def ^:private sa... |
851327e5e50fa826089d64b1a7308d3b5420ce6d660f0d4763029a75258cf178 | ocaml-flambda/flambda-backend | cfg_loop_infos.ml | [@@@ocaml.warning "+a-4-30-40-41-42"]
module List = ListLabels
let fatal = Misc.fatal_errorf
let debug = false
type dominators = Label.Set.t Label.Map.t
let compute_dominators (cfg : Cfg.t) =
(* CR-soon xclerc for xclerc: this is a naive implementation, that could
clearly be optimized and/or rely on the dat... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/66c63610792e4c192979e6282bde0374072893f4/backend/cfg/cfg_loop_infos.ml | ocaml | CR-soon xclerc for xclerc: this is a naive implementation, that could
clearly be optimized and/or rely on the dataflow framework.
CR-soon xclerc for xclerc: consider deduplicating.
CR-soon xclerc for xclerc: probably safe to pass `~exn:false`.
Merge loops when not properly nested. | [@@@ocaml.warning "+a-4-30-40-41-42"]
module List = ListLabels
let fatal = Misc.fatal_errorf
let debug = false
type dominators = Label.Set.t Label.Map.t
let compute_dominators (cfg : Cfg.t) =
let all_labels =
Cfg.fold_blocks cfg ~init:Label.Set.empty ~f:(fun label _block acc ->
Label.Set.add label ac... |
40add55886b2ecd14a93f68fba0edce033d1d2a5714ed8216d91909a8380b4fb | kudelskisecurity/scannerl | tgt.erl | %%% helper function for targets
%%%
%%% a tgt can be:
- a single IP ( ex : 192.168.0.1 )
- a single IP on a port ( ex : 192.168.0.1:8080 )
- a range ( ex : 10.0.0.0/24 )
- a cidr range on a port ( ex : )
- a domain ( ex : )
%%% - a domain on a port (ex: www.myip.ch:81)
%%% each of the above c... | null | https://raw.githubusercontent.com/kudelskisecurity/scannerl/8133065030d014401c47b2470e67a36e9df81b1e/src/utils/tgt.erl | erlang | helper function for targets
a tgt can be:
- a domain on a port (ex: www.myip.ch:81)
each of the above can have an additional argument
added with a "+" separator. It must be added at the end.
It is up to the fp module to use (or ignore) it.
exported function
convert
cidr/ip bits op
returns the integer ... | - a single IP ( ex : 192.168.0.1 )
- a single IP on a port ( ex : 192.168.0.1:8080 )
- a range ( ex : 10.0.0.0/24 )
- a cidr range on a port ( ex : )
- a domain ( ex : )
-module(tgt).
-author("Adrien Giner - ").
-export([get_tgts/1, minrange/2]).
-export([parse_ip/2, parse_domain/2]).
-recor... |
bbc515f0484f4524b9b7970fd6c0007953eb5c646a92eaa941ad85c7c6066da9 | gheber/kenzo | classifying-spaces-test.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 - *
(in-package :kenzo-test-7)
(in-suite :kenzo-7)
(test normalize-gbar
(cat-7:normalize-gbar (list 0))
(cat-7:normalize-gbar (list 1 (cat-7:absm 0 'i)))
(cat-7:normalize-gbar (list 2 (cat-7:absm 1 'i) (cat-7:absm 0 'i)))
(cat-7:n... | null | https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/test/kenzo-7/classifying-spaces-test.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 - * |
(in-package :kenzo-test-7)
(in-suite :kenzo-7)
(test normalize-gbar
(cat-7:normalize-gbar (list 0))
(cat-7:normalize-gbar (list 1 (cat-7:absm 0 'i)))
(cat-7:normalize-gbar (list 2 (cat-7:absm 1 'i) (cat-7:absm 0 'i)))
(cat-7:normalize-gbar (list 2 (cat-7:absm 0 'a) (cat-7:absm 0 'i)))
... |
8791fe51c8931658f15f5b478a9e03d271965152d4b1aa6656c53f71d4e654fc | racket/plot | animation.rkt | #lang racket
Ensure plot / dc , plot - bitmap , plot3d / dc , and plot3d - bitmap are fast enough for smooth animations
(require racket/gui
plot)
(plot-animating? #t)
(define max-fps 30)
(define frame (new frame% [label "Animation Test"] [width 400] [height 400]))
(define canvas (new canvas% [parent fra... | null | https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-test/plot/tests/animation.rkt | racket | #lang racket
Ensure plot / dc , plot - bitmap , plot3d / dc , and plot3d - bitmap are fast enough for smooth animations
(require racket/gui
plot)
(plot-animating? #t)
(define max-fps 30)
(define frame (new frame% [label "Animation Test"] [width 400] [height 400]))
(define canvas (new canvas% [parent fra... | |
9d81dbc4c2301d39ed9f90b5795b79eb7899a12f1516bec47f717156e123cbb6 | arcfide/oleg | streams-diff.scm | Stream - wise processing of two SXML documents
;
; using a not-so-trivial example of detecting the differences in
character content within the corresponding paragraphs of two SXML
documents . We assume that two SXML documents in question are made of
; the same number of paragraphs. The paragraphs may be enclose... | null | https://raw.githubusercontent.com/arcfide/oleg/c6826870436925fd4c873c01d7fcc24a7a7f95dc/ssax/examples/streams-diff.scm | scheme |
using a not-so-trivial example of detecting the differences in
the same number of paragraphs. The paragraphs may be enclosed in
other elements such as `div', chapters, etc., and that enclosing may
comparing the documents. Paragraphs contain text, perhaps
interspersed with markup such as `em', etc. We compare the... | Stream - wise processing of two SXML documents
character content within the corresponding paragraphs of two SXML
documents . We assume that two SXML documents in question are made of
vary between the two documents . We disregard such differences when
content of the respective paragraphs from two SXML documen... |
ed5435dae0ee4b26ef84d03509003ff3353f7638e3d8ecd2fc09ee6fa15a2978 | inhabitedtype/ocaml-aws | applySecurityGroupsToLoadBalancer.mli | open Types
type input = ApplySecurityGroupsToLoadBalancerInput.t
type output = ApplySecurityGroupsToLoadBalancerOutput.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/elasticloadbalancing/lib/applySecurityGroupsToLoadBalancer.mli | ocaml | open Types
type input = ApplySecurityGroupsToLoadBalancerInput.t
type output = ApplySecurityGroupsToLoadBalancerOutput.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
e1a04af9f86cde8e7c926001b9b374a5f55a79142e427b148baf791ed05ba570 | elastic/eui-cljs | icon_push.cljs | (ns eui.icon-push
(:require ["@elastic/eui/lib/components/icon/assets/push.js" :as eui]))
(def push eui/icon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_push.cljs | clojure | (ns eui.icon-push
(:require ["@elastic/eui/lib/components/icon/assets/push.js" :as eui]))
(def push eui/icon)
| |
10c063852de01fbfe0f959970cfe8638107a9b34ef63ac8d7fbc76abb2aa1384 | roman01la/minimax | utils.clj | (ns minimax.ui.utils
(:require [minimax.mem :as mem]
[minimax.pool.core :as pool]
[minimax.resources :as res])
(:import (java.io File)
(java.nio IntBuffer)
(org.lwjgl.nanovg NVGColor NanoVG)))
(set! *warn-on-reflection* true)
(defn rgba ^NVGColor
([[r g b a] color]
... | null | https://raw.githubusercontent.com/roman01la/minimax/f371c199d55a2a219ed7cf5f2dd2e079be99f963/src/minimax/ui/utils.clj | clojure | (ns minimax.ui.utils
(:require [minimax.mem :as mem]
[minimax.pool.core :as pool]
[minimax.resources :as res])
(:import (java.io File)
(java.nio IntBuffer)
(org.lwjgl.nanovg NVGColor NanoVG)))
(set! *warn-on-reflection* true)
(defn rgba ^NVGColor
([[r g b a] color]
... | |
7353de3f95546710065dbeebd17134c965e4554665d2ec4287972e48aed5bbe0 | tolitius/mount | test.cljc | (ns mount.test
(:require
#?@(:cljs [[cljs.test :as t]
[doo.runner :refer-macros [doo-tests]]]
:clj [[clojure.test :as t]])
mount.core
mount.test.fun-with-values
mount.test.private-fun
mount.test.parts
mount.test.cleanup-dirty-states
mount.test.stop-except
mount... | null | https://raw.githubusercontent.com/tolitius/mount/c85da6149ceab96c903c1574106ec56f78338b5f/test/core/mount/test.cljc | clojure | (doo.runner/do-all-tests) | (ns mount.test
(:require
#?@(:cljs [[cljs.test :as t]
[doo.runner :refer-macros [doo-tests]]]
:clj [[clojure.test :as t]])
mount.core
mount.test.fun-with-values
mount.test.private-fun
mount.test.parts
mount.test.cleanup-dirty-states
mount.test.stop-except
mount... |
aa3c5a8d396c6020e461ed2fc90d9da75d2f825cf69b6b318346e9a546c7e3a3 | jakemcc/sicp-study | 2_27.clj | Exercise 2.27
(defn deep-reverse [s]
(cond (empty? s) nil
(seq? (first s))
(concat (deep-reverse (rest s))
(list (deep-reverse (first s))))
:else
(concat (deep-reverse (rest s))
(list (first s)))))
(defn print-dr [s]
(println "Before: " s)
(prin... | null | https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section2.2/2_27.clj | clojure | Exercise 2.27
(defn deep-reverse [s]
(cond (empty? s) nil
(seq? (first s))
(concat (deep-reverse (rest s))
(list (deep-reverse (first s))))
:else
(concat (deep-reverse (rest s))
(list (first s)))))
(defn print-dr [s]
(println "Before: " s)
(prin... | |
3b515e6de6211bf98938584c3e4b4cebf2205154241b1f5048c513a4caf8f2f7 | binsec/binsec | loader_utils.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/loader/loader_utils.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.