_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 |
|---|---|---|---|---|---|---|---|---|
0d558563fd4932adba560ef7f51495aa8eaa0d336c35f3d365ddd5a6f7c067f3 | zotonic/z_stdlib | z_jsmin.erl | @author < >
2018
@doc Javascript minifier . Based on jsmin.c
Copyright 2018
%%
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 a... | null | https://raw.githubusercontent.com/zotonic/z_stdlib/da120ed8128dd811b0b1a2aeaa62e89c9134204a/src/z_jsmin.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | @author < >
2018
@doc Javascript minifier . Based on jsmin.c
Copyright 2018
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
jsmin is Copyright ( c ) 2002 ( www.crockford.com )
see
-module(z_jsmin).... |
a609c776b2e327311dc29cc5be908948a88c8e83d36569a750e23fbd2673edfb | TrustInSoft/tis-interpreter | docgen_lt400.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/doc/code/docgen_lt400.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
b45581f6d69822dff19f9e9c0fc11340937d7ce6d3ad01eda45f42d35048d432 | DougHamil/threeagent | parent_transform_update_test.cljs | (ns threeagent.virtual-scene.parent-transform-update-test
(:require [cljs.test :refer-macros [deftest is testing]]
[threeagent.impl.virtual-scene :as vscene]
[threeagent.core :as th]))
(def child-render-count (atom 0))
(defn child-component [state entity-key]
(swap! child-render-count inc)... | null | https://raw.githubusercontent.com/DougHamil/threeagent/da5c65d593dd270b174128e8aff597d2768c5b57/src/test/threeagent/virtual_scene/parent_transform_update_test.cljs | clojure | Update just the parent component
Child should not be re-rendered
Update just the child component
Child should be re-rendered
Update both child and parent
Child should be re-rendered | (ns threeagent.virtual-scene.parent-transform-update-test
(:require [cljs.test :refer-macros [deftest is testing]]
[threeagent.impl.virtual-scene :as vscene]
[threeagent.core :as th]))
(def child-render-count (atom 0))
(defn child-component [state entity-key]
(swap! child-render-count inc)... |
3371cadb75b7d08ed9a17508a3875e76eac99695d9f2f233f7d59a322345113d | Paczesiowa/virthualenv | Args.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Args ( usage
, parseArgs
) where
import System.Directory (getCurrentDirectory)
import Data.List (isPrefixOf, isInfixOf)
import Data.Char (isAlphaNum)
import Data.Maybe (fromMaybe)
import Control.Monad (when)
import Data.Monoid (Monoid(..))
import S... | null | https://raw.githubusercontent.com/Paczesiowa/virthualenv/aab89dad9de7dac5268472eaa50c11eb40b02380/src/Args.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
module Args ( usage
, parseArgs
) where
import System.Directory (getCurrentDirectory)
import Data.List (isPrefixOf, isInfixOf)
import Data.Char (isAlphaNum)
import Data.Maybe (fromMaybe)
import Control.Monad (when)
import Data.Monoid (Monoid(..))
import S... | |
8c0faed877003ba5819fef40aff4dac93668501d246669c37243f6ef3f0d873b | OCamlPro/socaml-analyzer | test_tlambda.ml | open Common_types
open Lambda
open Asttypes
open Ident
open Tlambda
let tlet te_id te_lam te_in =
Tlet { te_id; te_lam; te_in; te_kind = Alias }
let last_id = ref (-1)
let mk_id s =
incr last_id;
( "", { stamp = !last_id; name = s; flags = 0 } )
let ret_id = mk_id "return"
let tend = Tend ret_id
let tconst_i... | null | https://raw.githubusercontent.com/OCamlPro/socaml-analyzer/f39121e1d05a9e5bb6f005497eaaa5a67f256d4c/test/test_tlambda.ml | ocaml | simple test
addition test | open Common_types
open Lambda
open Asttypes
open Ident
open Tlambda
let tlet te_id te_lam te_in =
Tlet { te_id; te_lam; te_in; te_kind = Alias }
let last_id = ref (-1)
let mk_id s =
incr last_id;
( "", { stamp = !last_id; name = s; flags = 0 } )
let ret_id = mk_id "return"
let tend = Tend ret_id
let tconst_i... |
554e9b918a1a4fa9a823cd6ca3cbee0acfc5aeee3af4a3af32729a15a03d4d13 | Dasudian/DSDIN | dsdc_metrics.erl | -module(dsdc_metrics).
-behaviour(exometer_report).
-behavior(exometer_report_logger).
-export([update/2,
try_update/2]).
%% exometer_report_logger callbacks
-export([logger_init_input/1,
logger_init_output/1,
logger_handle_data/2]).
exometer_report logging callbacks
-export([exometer_in... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdcore/src/dsdc_metrics.erl | erlang | exometer_report_logger callbacks
start phase API
Hard-coded default
===================================================================
Metrics API
===================================================================
===================================================================
================================... | -module(dsdc_metrics).
-behaviour(exometer_report).
-behavior(exometer_report_logger).
-export([update/2,
try_update/2]).
-export([logger_init_input/1,
logger_init_output/1,
logger_handle_data/2]).
exometer_report logging callbacks
-export([exometer_init/1,
exometer_report/5,
... |
b398d2a03214cb0d48da764aca34f7ac45c96e5c1039dba78fa9fc7af87b44a8 | jeromesimeon/Galax | code_selection_context.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/code_selection_context.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : code_selection_context.mli , v 1.32 2007/08/08 19:27:52 mff Exp $
open Xquery_common_ast
open Namespace_names
open Physical_value
open Processing_context
open Typing_context
open Ast_logical_algebra_types
open Algebra_type
open Va... |
2985176fd55e52c50d11ab536f7bb7d37e32fa9666998fa125a6226f790f2eb5 | schemeorg-community/index.scheme.org | srfi.31.scm | (((name . "rec")
(signature
syntax-rules
()
((_ (name variables ...) body ...) procedure?)
((_ name expression)))))
| null | https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/srfi.31.scm | scheme | (((name . "rec")
(signature
syntax-rules
()
((_ (name variables ...) body ...) procedure?)
((_ name expression)))))
| |
dce7ab3a68ceb1254311870f06f13c2bc29d70bc93f787511fe20e7c3660325e | aryx/xix | sort.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_core/unused/sort.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
val list : ('a -> 'a -> bool) -> 'a list -> 'a list
Sort a list in increasing order according to an orderin... |
385f70f5c96f033ac1a5b23d1cd732d2bd817a70cbfa4a69be2a8e9c05781112 | sanette/bogue | b_var.ml | * Variables with
WARNING contrary to what the OCaml Mutex doc seems to say : ( fixed
in ocaml 4.12 )
-ocaml/libref/Mutex.html
calling Mutex.lock on a mutex locked by the SAME thread will ALSO block .
TODO ? rewrite everything to use only simple , non - recursive mutex ?
TODO starting f... | null | https://raw.githubusercontent.com/sanette/bogue/abf8f294855d8f46fd4f68bb33b2c2907f0ec07a/lib/b_var.ml | ocaml | = the id of the thread currently locking this var
lock
unlock
Execute an action on the given variable if it is not locked by *another*
thread. Can be used in recursions.
this should be the vast majority of cases
The variable is now locked
just for debugging
The variable is now unlocked
the variable ... | * Variables with
WARNING contrary to what the OCaml Mutex doc seems to say : ( fixed
in ocaml 4.12 )
-ocaml/libref/Mutex.html
calling Mutex.lock on a mutex locked by the SAME thread will ALSO block .
TODO ? rewrite everything to use only simple , non - recursive mutex ?
TODO starting f... |
87ff8838954c6986c62b42a0ba16c6b4f0e5b1b4a078b3aeb7f6ce334bebfc63 | TheLortex/mirage-monorepo | domain_manager.ml | open Effect
class virtual t = object
method virtual run : 'a. (unit -> 'a) -> 'a
method virtual run_raw : 'a. (unit -> 'a) -> 'a
end
let run_raw (t : #t) = t#run_raw
let run (t : #t) fn =
let ctx = perform Private.Effects.Get_context in
Cancel.check (Private.Fiber_context.cancellation_context ctx);
let can... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/0c29acffaf08dc0008097d36225a14960769f132/duniverse/eio/lib_eio/domain_manager.ml | ocaml | If the spawning fiber is cancelled, [cancelled] gets set to the exception.
To avoid [Cancelled (Cancelled ex))]
Shouldn't happen
We unwrapped the exception above to avoid a double cancelled exception.
But this means that the top-level reported the original exception,
which isn't what we want. | open Effect
class virtual t = object
method virtual run : 'a. (unit -> 'a) -> 'a
method virtual run_raw : 'a. (unit -> 'a) -> 'a
end
let run_raw (t : #t) = t#run_raw
let run (t : #t) fn =
let ctx = perform Private.Effects.Get_context in
Cancel.check (Private.Fiber_context.cancellation_context ctx);
let can... |
1d7aafe9633031ca075c1bcda40e43bbb0aa124b88d89355ff244f6c72c461c4 | bufferswap/ViralityEngine | opengl.lisp | (in-package #:virality)
TODO : This file is currently not used by Virality Engine yet . The contents
;;;; of this file will become useful when we have a complete rendering pipeline
with multiple render passes . ~axion 4/8/2020
;; This is a list of the default OpenGL enabled capabilities. We store them here
;; as ... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/core-late/opengl.lisp | lisp | of this file will become useful when we have a complete rendering pipeline
This is a list of the default OpenGL enabled capabilities. We store them here
as a constant so we have a known state to revert back to when we render
per-material capabilities.
This is a list of the default OpenGL disabled capabilities. We ... | (in-package #:virality)
TODO : This file is currently not used by Virality Engine yet . The contents
with multiple render passes . ~axion 4/8/2020
(u:define-constant +enabled-capabilities+
'(:blend :cull-face :depth-test :dither :multisample)
:test #'equal)
(u:define-constant +disabled-capabilities+
'(... |
f1c0a22426f2ccddcf6369d23237875c356578f6da014e071f1f1a12bb309cc9 | syntheorem/thexa | Rules.hs | # OPTIONS_GHC -Wno - missing - signatures #
module RustLexer.Rules where
import Control.Monad.State.Strict (State, evalState)
import Control.Monad.Except (ExceptT, throwError, runExceptT)
import Data.ByteString (ByteString)
import Data.ByteString qualified as BS
import Data.ByteString.Builder qualified as BS
import D... | null | https://raw.githubusercontent.com/syntheorem/thexa/78ddec28baad7040f1f3fcef03926d5dd0c0caa9/examples/RustLexer/Rules.hs | haskell | This is the type of the tokens emitted by our lexer, which associates the actual token data
Keywords
Symbols
Literals
We're wrapping the string contents with the UTF8 type so the Show instance will properly decode
it. Since all the other tokens are ASCII-only, we don't bother to use UTF8 anywhere else.
Normally ... | # OPTIONS_GHC -Wno - missing - signatures #
module RustLexer.Rules where
import Control.Monad.State.Strict (State, evalState)
import Control.Monad.Except (ExceptT, throwError, runExceptT)
import Data.ByteString (ByteString)
import Data.ByteString qualified as BS
import Data.ByteString.Builder qualified as BS
import D... |
da982b4ea42ce27f68015d1b252a5984307a93a2d1a15ce15eb07e018ea936a1 | agda/agda | LaTeX.hs | | Generating highlighted and aligned LaTeX from literate Agda source .
module Agda.Interaction.Highlighting.LaTeX
( module Exports
) where
import Agda.Interaction.Highlighting.LaTeX.Backend as Exports
( latexBackend
)
| null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/src/full/Agda/Interaction/Highlighting/LaTeX.hs | haskell | | Generating highlighted and aligned LaTeX from literate Agda source .
module Agda.Interaction.Highlighting.LaTeX
( module Exports
) where
import Agda.Interaction.Highlighting.LaTeX.Backend as Exports
( latexBackend
)
| |
a22b5c84a90fcd855664db71b3736efcd22549831853a4c915918ace79c4243c | patoline/patoline | DynArray.ml | (**
Dynamic arrays
A dynamic array behaves like an ordinary array, except that it can grow
on demand. It is implemented as a regular OCaml array, except that any
write attempt beyond the end of the array triggers the allocation of a
new array, whose size is twice the size of the current array. This new
array replaces... | null | https://raw.githubusercontent.com/patoline/patoline/3dcd41fdff64895d795d4a78baa27d572b161081/patutil/DynArray.ml | ocaml | *
Dynamic arrays
A dynamic array behaves like an ordinary array, except that it can grow
on demand. It is implemented as a regular OCaml array, except that any
write attempt beyond the end of the array triggers the allocation of a
new array, whose size is twice the size of the current array. This new
array replaces t... |
type 'a t = {
mutable data: 'a array;
mutable length: int;
default_value : 'a;
}
let make n default_value =
{
data = Array.make n default_value;
length = n;
default_value = default_value;
}
let get arr i =
try arr.data.(i)
with Invalid_argument(_) -> arr.default_value
let set arr i x =
l... |
6a388928e4b1851954fa5b8b15565e5562f0370e7cb2a701d733b82ef011c9f8 | lanl/APPFL | Tokenizer.hs | # LANGUAGE PatternGuards #
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
module MHS.Tokenizer
(
Token(..),
tokenize
) where
import MHS.AST (PrimOp (..), primOpTab)
import Data.Char
import Data.List (isPrefixOf)
import ParserComb
import Debug... | null | https://raw.githubusercontent.com/lanl/APPFL/0f29f390d4735e863904348711a48b8f38ca5d03/codegen/MHS/Tokenizer.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE TypeSynonymInstances #
don't like tabs, replace with spaces
default tab width
ignore other control chars
If '{', then add brace indicator with appropriate column,
else add nothing
keep looking for lex
found lex, enter "main" auxiliary function
no lexemes in prog
aux... | # LANGUAGE PatternGuards #
# LANGUAGE FlexibleInstances #
module MHS.Tokenizer
(
Token(..),
tokenize
) where
import MHS.AST (PrimOp (..), primOpTab)
import Data.Char
import Data.List (isPrefixOf)
import ParserComb
import Debug.Trace
import PPrint hiding (space, hash)
testtok file =
do
lns <- re... |
52b75fbd2902d9b749bb41e3f4a2a010b903775d35efed2b647631041a538002 | NetComposer/nksip | outbound_test_ua1.erl | %% -------------------------------------------------------------------
%%
%% outbound_test: Path (RFC5626) Tests
%%
Copyright ( c ) 2013 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the L... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/test/callbacks/outbound_test_ua1.erl | erlang | -------------------------------------------------------------------
outbound_test: Path (RFC5626) Tests
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
... | Copyright ( c ) 2013 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(outbound_test_ua1).
... |
92bfb9ff6759b0d5cc171f2620387047f95586c0356d766c0e0f13b8dc33874c | phochste/clj-marc | example.clj | ( c ) 2010 < >
(use 'clj-marc.parser)
(def records (parse "data/loc.export" :marc21))
(def my-seq (marc-seq records))
(time (doseq [rec my-seq] (println (rec "245"))))
| null | https://raw.githubusercontent.com/phochste/clj-marc/70ba82dc378351ab7f520aad53515aa4342f60ec/src/example.clj | clojure | ( c ) 2010 < >
(use 'clj-marc.parser)
(def records (parse "data/loc.export" :marc21))
(def my-seq (marc-seq records))
(time (doseq [rec my-seq] (println (rec "245"))))
| |
2a62b8fecd1c51fdca0d17e92759f81822b8ec9497ffdd30ec1a1ba96e6f04db | FPBench/FPBench | tensor.rkt | #lang racket
(require "common.rkt")
(provide
(contract-out
[tensor? (-> any/c boolean?)]
[tensor-ref (-> tensor? integer? ... integer? any/c)]
[tensor-dim (-> tensor? integer?)]
[tensor-size (-> tensor? integer? integer?)]
[tabulate->tensor (-> (listof integer?) (listof any/c) tensor?)]))
(define (t... | null | https://raw.githubusercontent.com/FPBench/FPBench/43a8f4854baebce88614059e4b48bcfc08d97f61/src/tensor.rkt | racket | #lang racket
(require "common.rkt")
(provide
(contract-out
[tensor? (-> any/c boolean?)]
[tensor-ref (-> tensor? integer? ... integer? any/c)]
[tensor-dim (-> tensor? integer?)]
[tensor-size (-> tensor? integer? integer?)]
[tabulate->tensor (-> (listof integer?) (listof any/c) tensor?)]))
(define (t... | |
7ef6c73d7c31b411168e39784ad59b11881f130e0ce6f23bcd0058fad5c13233 | abdulapopoola/SICPBook | Ex3.25.scm | #lang planet neil/sicp
;; Need to change to pass in table in search to lookup/insert procedures
(define (make-table)
(define (lookup-table table key)
(assoc key (cdr table)))
(define (walk-down-tables table lst)
(cond ((not table) false)
((= (length lst) 1)
(lookup-table table (car ls... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%203/3.3/Ex3.25.scm | scheme | Need to change to pass in table in search to lookup/insert procedures | #lang planet neil/sicp
(define (make-table)
(define (lookup-table table key)
(assoc key (cdr table)))
(define (walk-down-tables table lst)
(cond ((not table) false)
((= (length lst) 1)
(lookup-table table (car lst)))
(else (walk-down-tables
(lookup-table ta... |
bb6ff400783db02e0150ae8fe728a10472118e1909ae7b60f0ed0181e1713930 | juspay/atlas | SearchReqLocation.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you m... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/driver-offer-bpp/src/Storage/Tabular/SearchReqLocation.hs | haskell | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
|
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you m... | |
44204174b40d4c85f06b520fa28c22064fd68e6d8f3cf39d4655f26733766cdf | tweag/kernmantle | ExLenses.hs | {-# LANGUAGE Arrows #-}
# LANGUAGE OverloadedLabels #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE GeneralizedNewtypeDeriving #
| Here we use the @wander@ function from Traversing ( which Rop... | null | https://raw.githubusercontent.com/tweag/kernmantle/19e018449f4fba68d383611a9d38a1b9e04e81ee/kernmantle/examples/ExLenses.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| The Console effect
| Run a Console effect in IO
| The File effect
| Run a File effect in IO
| Just a shortcut to say our program can run in any rope that supports our
it in our type alias as a condition
| Should permit to implement wander_?
# INLIN... | # LANGUAGE OverloadedLabels #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE GeneralizedNewtypeDeriving #
| Here we use the @wander@ function from Traversing ( which Rope instanciates )
that turn any Control . Lens . Traversal into a profunct... |
5b01a371b45c5d29b818ec221ae6aa88bfa6db0242f7d898ad8ac2eb05b37074 | AdRoll/rebar3_format | format_in_comments.erl | -module(format_in_comments).
These two comments below should be correctly parsed and used
@format # { paper = > 20 } .
%% @format #{inline_items => all}.
-export([func/0]).
func() ->
[a, list, that,
doesnt, fit,
in, 20, chars].
| null | https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/after/src/per-file-config/format_in_comments.erl | erlang | @format #{inline_items => all}. | -module(format_in_comments).
These two comments below should be correctly parsed and used
@format # { paper = > 20 } .
-export([func/0]).
func() ->
[a, list, that,
doesnt, fit,
in, 20, chars].
|
602288242a23c6e369576c60292bd4f76dfee94e6cbfd521fc248b47db175085 | FranklinChen/hugs98-plus-Sep2006 | Window.hs | -----------------------------------------------------------------------------
-- |
-- Module : Graphics.HGL.X11.Window
Copyright : ( c ) , 1999 - 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : internal
-- Portability : non-portable (requir... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HGL/Graphics/HGL/X11/Window.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.HGL.X11.Window
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : internal
Portability : non-portable (requires concurrency)
A simple graphics library.
-----------... | Copyright : ( c ) , 1999 - 2003
module Graphics.HGL.X11.Window
, Window(events, graphic)
RedrawMode - > Maybe Time - > IO Window
: : Window - > IO ( Point , Point )
, sendTicks, findWindow, showEvent
) where
import Graphics.HGL.Internals.Types
import Graphics.HGL.Internals.Draw (Graphic, Draw, un... |
6df0f019427d1fd3f238834155dfe30d754faf74f029dd2f92b87b1e255ca80b | sleexyz/hylogen | Booly.hs | {-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
module Hylogen.Types.Booly where
import Hylogen.Expr
-- | Booly singleton type tag
data BoolyType = BoolyType
instance ToGLSLType BoolyType where
toGLSLType _ = GLSLBool
tag = BoolyType
| Hylogen Boolean type
type Booly = Expr BoolyType
| ... | null | https://raw.githubusercontent.com/sleexyz/hylogen/0e5eb3f117e0dd960ec0aef1da581402efee1148/hylogen/src/Hylogen/Types/Booly.hs | haskell | # LANGUAGE TypeSynonymInstances #
| Booly singleton type tag
| Or
| And | # LANGUAGE FlexibleInstances #
module Hylogen.Types.Booly where
import Hylogen.Expr
data BoolyType = BoolyType
instance ToGLSLType BoolyType where
toGLSLType _ = GLSLBool
tag = BoolyType
| Hylogen Boolean type
type Booly = Expr BoolyType
| We use operators for Boolean arithmetic :
instance Num Booly where
... |
bd8e741ff6a17abf8c055f4f20c56281351265d1dca652dc275fa0d90d156300 | psholtz/MIT-SICP | exercise2-67.scm | ;;
Exercise 2.67
;;
;; Define an encoding tree and a sample message:
;;
;; (define sample-tree
( make - code - tree ( make - leaf ' A 4 )
;; (make-code-tree
( make - leaf ' B 2 )
( make - code - tree ( make - leaf ' D 1 )
;; ... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-2.3/mit-scheme/exercise2-67.scm | scheme |
Define an encoding tree and a sample message:
(define sample-tree
(make-code-tree
(make-leaf 'C 1)))))
(define sample-message '(0 1 1 0 0 1 0 1 0 1 1 1 0))
Use the "decode" procedure to decode the message and give the result.
Now, let's define th... | Exercise 2.67
( make - code - tree ( make - leaf ' A 4 )
( make - leaf ' B 2 )
( make - code - tree ( make - leaf ' D 1 )
First let 's import the relevant tree procedures .
Procedures for generating the leaves of a tree :
(define (make-leaf symbol weight)
(list 'l... |
1b47c08d9d36033082b86735e7309142e59cace99b32848e68f98afc244205e5 | xh4/web-toolkit | diff.lisp | (in-package :component)
(defun diff (a b)
(check-type a html:element)
(check-type b html:element)
(diff-node a b))
(defvar *diff-path* nil)
(defgeneric diff-node (a b)
(:method ((a html:element) (b html:element))
(if (equal (dom:tag-name a) (dom:tag-name b))
(let ((a-attributes (slot-value a 'dom... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/component/diff.lisp | lisp | (in-package :component)
(defun diff (a b)
(check-type a html:element)
(check-type b html:element)
(diff-node a b))
(defvar *diff-path* nil)
(defgeneric diff-node (a b)
(:method ((a html:element) (b html:element))
(if (equal (dom:tag-name a) (dom:tag-name b))
(let ((a-attributes (slot-value a 'dom... | |
de9d4dc9644faeed6ae9492aba77ccd927641dedfaecc681734eeb50dcb804b3 | penpot/penpot | streams.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.streams
"User interaction events and streams."
(:require
[app.config :as cfg]
[app.main... | null | https://raw.githubusercontent.com/penpot/penpot/8c618f95f7ecd392c175d7be61181a5b44146c9c/frontend/src/app/main/streams.cljs | clojure |
Copyright (c) KALEIDOS INC
--- User Events
--- Derived streams
Fix a situation caused by using `ctrl+alt` kind of shortcuts,
that makes keyboard-alt stream registering the key pressed but
on blurring the window (unfocus) the key down is never arrived.
Fix a situation caused by using `ctrl+alt` kind of shortcuts... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.streams
"User interaction events and streams."
(:require
[app.config :as cfg]
[app.main.store :as st]
[app.util.globa... |
177c8e4f5ebdb064a417fcaac5ba377f73a2f6295b73b7fa331e9b27a650b9e3 | VERIMAG-Polyhedra/VPL | ZNone.ml | open BinInt
open BinNums
(** val coq_Z_isZero : coq_Z -> bool **)
let coq_Z_isZero = function
| Z0 -> true
| _ -> false
* coq_Z_isNat : coq_Z - > bool *
let coq_Z_isNat = function
| Zneg _ -> false
| _ -> true
* coq_Z_isNegNat : coq_Z - > bool *
let coq_Z_isNegNat = function
| Zpos _ -> false
| _ -> true
modul... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/extracted/ZNone.ml | ocaml | * val coq_Z_isZero : coq_Z -> bool *
* val opp : t -> t *
* val isZero : coq_Z option -> bool *
* val meet : t -> t -> t * | open BinInt
open BinNums
let coq_Z_isZero = function
| Z0 -> true
| _ -> false
* coq_Z_isNat : coq_Z - > bool *
let coq_Z_isNat = function
| Zneg _ -> false
| _ -> true
* coq_Z_isNegNat : coq_Z - > bool *
let coq_Z_isNegNat = function
| Zpos _ -> false
| _ -> true
module ZN =
struct
type t = coq_Z option
*... |
f61f35201dcf71e42a927abcc496c1422042dd7af96fc3d7446cb8d7bf5dcc0f | AdaCore/why3 | compile.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/src/extract/compile.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
module Translate : sig
val module_ : Pmodule.pmodule -> Mltree.pmodule
val pdecl_m : Pmodule.pmodule ... |
61cdc8d1be02826caebeb3797fb32059e7deabdc9876b36829f28da877e0baeb | fendor/hsimport | Args.hs | {-# LANGUAGE DeriveDataTypeable, CPP #-}
module HsImport.Args
( HsImportArgs(..)
, hsImportArgs
, defaultArgs
) where
import Prelude hiding (all)
import System.Console.CmdArgs
#ifdef CABAL
import Data.Version (showVersion)
import Paths_hsimport (version)
#endif
data HsImportArgs = HsImportArgs
{ modu... | null | https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/lib/HsImport/Args.hs | haskell | # LANGUAGE DeriveDataTypeable, CPP # |
module HsImport.Args
( HsImportArgs(..)
, hsImportArgs
, defaultArgs
) where
import Prelude hiding (all)
import System.Console.CmdArgs
#ifdef CABAL
import Data.Version (showVersion)
import Paths_hsimport (version)
#endif
data HsImportArgs = HsImportArgs
{ moduleName :: String
, symbolName ::... |
dc1823324ed906718b3e49d908f99612fee462d4f01dc8d77fad585fcd3ffeae | Operational-Transformation/ot.hs | Server.hs | module Control.OperationalTransformation.Server
( Revision
, ServerState (..)
, initialServerState
, applyOperation
) where
import Control.OperationalTransformation
import Control.Monad.Trans.Either
import Control.Monad.Identity
type Revision = Integer
-- | The server keeps the current revision number and ... | null | https://raw.githubusercontent.com/Operational-Transformation/ot.hs/4a0ca8f1e3f59fd8ce0e6cfd95633940d4e22f88/src/Control/OperationalTransformation/Server.hs | haskell | | The server keeps the current revision number and a list of previous
operations to transform incoming operations against.
| Handles incoming operations.
^ The latest operation that the client has received from the server when it sent the operation.
^ The operation received from the client.
^ The clients cursor p... | module Control.OperationalTransformation.Server
( Revision
, ServerState (..)
, initialServerState
, applyOperation
) where
import Control.OperationalTransformation
import Control.Monad.Trans.Either
import Control.Monad.Identity
type Revision = Integer
data ServerState doc op = ServerState Revision doc [op... |
d95325ffab19b691d554113bdeb1b292f278e9539e05b54ef904a1ba45114ef4 | alanmarazzi/panthera | panthera.clj | (ns panthera.panthera
(:refer-clojure
:exclude [mod any? drop])
(:require
[tech.parallel.utils :refer [export-symbols]]
[panthera.pandas.generics]
[panthera.pandas.math]
[panthera.pandas.utils]
[panthera.pandas.conversion]
[panthera.pandas.reshape]))
(export-symbols
panthe... | null | https://raw.githubusercontent.com/alanmarazzi/panthera/08484e2f0cf9b7c766047d13cca449dc9cf30ea2/src/panthera/panthera.clj | clojure | (ns panthera.panthera
(:refer-clojure
:exclude [mod any? drop])
(:require
[tech.parallel.utils :refer [export-symbols]]
[panthera.pandas.generics]
[panthera.pandas.math]
[panthera.pandas.utils]
[panthera.pandas.conversion]
[panthera.pandas.reshape]))
(export-symbols
panthe... | |
5bb0ea713980e2f6978a6ac1c20eb76d79f684e2a8e4b8625be52d22eb256461 | cdfa/frugel | PrettyPrinting.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Scout.PrettyPrinting where
import Data.Has
import Frugel.DisplayProjection
import Optics.Extra.Scout
import PrettyPrinting.Expr
import qualified Scout.Internal.Nod... | null | https://raw.githubusercontent.com/cdfa/frugel/9c59f2281c06bfa5e13bd575866d165dbc0ce411/scout-src/Scout/PrettyPrinting.hs | haskell | remove leading whitespace on newlines, because indenting is managed by the pretty printer | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Scout.PrettyPrinting where
import Data.Has
import Frugel.DisplayProjection
import Optics.Extra.Scout
import PrettyPrinting.Expr
import qualified Scout.Internal.Nod... |
43e1ba9d713e341fb2affb26f987e7835f78efa1025808c098f0dea1858966fc | jiangpengnju/htdp2e | defining_structure_types.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 defining_structure_types) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor re... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/adding-structure/defining_structure_types.rkt | racket | about the language level of this file in a form that our tools can easily process.
In general, a structure type definition has this shape:
(define-struct StructureName [FieldName ... FieldName])
For example:
(define-struct posn [x y])
will defines:
constructor
make-posn
posn-x
posn-y
posn?
!!!!!!!!!!!!!!;;;;... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname defining_structure_types) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
It defines three kind of functions :
1 ... |
382583e5e90d9f6ab1bb0a63f5b75f79627432688f1359aab656b16db3004ad8 | icicle-lang/icicle-ambiata | ToCore.hs | | Converting Source to Core .
--
-- This is all very rough around the edges at the moment.
-- Some fundamental things are missing, like dealing with optional values:
-- the "newest v" aggregate returns a "Maybe v", but we actually want to implicitly
-- unbox that.
-- So, for example,
--
> let x = newest value ~ > x... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-source/src/Icicle/Source/ToCore/ToCore.hs | haskell |
This is all very rough around the edges at the moment.
Some fundamental things are missing, like dealing with optional values:
the "newest v" aggregate returns a "Maybe v", but we actually want to implicitly
unbox that.
So, for example,
here, "x" should be bound to a simple "Int", but the outer query should re... | | Converting Source to Core .
> let x = newest value ~ > x * 5
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TupleSections #
module Icicle.Source.ToCore.ToCore (
convertQueryTop
, convertQuery
) where
import Data.Monoid ((<>))
import Icicle.Source.Query
import ... |
c9c3c2257b1c5f766769e94b8c1d3dda778749c87e9fdafb5be4c988ba887980 | kmi/irs | load.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(def-ontology cobra
:type :domain
:includes (time-ontology physical-quantities)
;;:namespace-uri "-super.org/ontologies/COBRA/20071215#"
:namespace-uri "-super.org/ontologies/process/cobr... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/cobra/load.lisp | lisp | Package :
:namespace-uri "-super.org/ontologies/COBRA/20071215#" |
File created in WebOnto
(in-package "OCML")
(def-ontology cobra
:type :domain
:includes (time-ontology physical-quantities)
:namespace-uri "-super.org/ontologies/process/cobra/v1.1.1#"
:Namespaces (("time" time-ontology)
("phys-q" ... |
094b9b217751458765ebb010a82e820b18b25bb6f2e94105328618d35e76f5c3 | ddmcdonald/sparser | loader.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1992 - 1997,2021 -- all rights reserved
extensions copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved
;;;
;;; File: "loader"
;;; Module: "grammar;rules:traversal:"
Version : October 2021
0.1 ( 6/15/9... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/c6e331d6390eb303e7cce2b4fba3d2f7802593f6/Sparser/code/s/grammar/rules/traversal/loader.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "loader"
Module: "grammar;rules:traversal:"
(9/13/95) added [other brackets]
0.2 (8/31/09) broke out single-capitalized-word and gated on *proper-names* | copyright ( c ) 1992 - 1997,2021 -- all rights reserved
extensions copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved
Version : October 2021
0.1 ( 6/15/94 ) bumped [ angle brackets ] to 1
(in-package :sparser)
(gload "traversal;parenthesis")
(gload "traversal;quotations")
(gload "travers... |
928be0926404fdef3c5822a767d8f992f678742b123b469dd85b6f8ca124099e | deps-app/versions | common.clj | (ns jarkeeper.views.common
(:require [clojure.string :as string]
[hiccup.page :refer [include-css]]))
(defn apple-touch-icon [size]
[:link {:rel "apple-touch-icon-precomposed" :sizes size :href (format "/images/logos/apple-touch-icon-%s.png" size)}])
(defn favicon [size]
[:link {:rel "icon" :type "i... | null | https://raw.githubusercontent.com/deps-app/versions/5e58ac456cb3ec90c5d87dbfdde8f9414f8b1f3b/src/jarkeeper/views/common.clj | clojure | i[r]=i[r]||function(){
a=s.createElement(o),
a.src = g;m.parentNode.insertBefore(a , m )
| (ns jarkeeper.views.common
(:require [clojure.string :as string]
[hiccup.page :refer [include-css]]))
(defn apple-touch-icon [size]
[:link {:rel "apple-touch-icon-precomposed" :sizes size :href (format "/images/logos/apple-touch-icon-%s.png" size)}])
(defn favicon [size]
[:link {:rel "icon" :type "i... |
583b3006cb86eb43880537672e11c30627579213a3ac8287d7b7527c21213b25 | haskell-beam/beam | Branch.hs | module Database.Beam.Migrate.Tool.Branch where
import Database.Beam.Migrate.Tool.CmdLine
import Database.Beam.Migrate.Tool.Registry
import Control.Monad
#if !MIN_VERSION_base(4, 11, 0)
import Data.Monoid
#endif
import qualified Data.Text as T
import System.Console.A... | null | https://raw.githubusercontent.com/haskell-beam/beam/596981a1ea6765b9f311d48a2ec4d8460ebc4b7e/beam-migrate-cli/Database/Beam/Migrate/Tool/Branch.hs | haskell | module Database.Beam.Migrate.Tool.Branch where
import Database.Beam.Migrate.Tool.CmdLine
import Database.Beam.Migrate.Tool.Registry
import Control.Monad
#if !MIN_VERSION_base(4, 11, 0)
import Data.Monoid
#endif
import qualified Data.Text as T
import System.Console.A... | |
d0b344217d5898508fa2c01ed79b24202e38e2e7b12af6c408273d24170d488a | ontodev/howl | util.cljc | (ns howl.util
"Cross-platform utility functions."
(:require
[clojure.string :as string]
#?@(:cljs
[[goog.string]
[goog.string.format]]))
#?(:clj
(:refer-clojure :exclude [format])))
#?(:clj
(def format #'clojure.core/format)
:cljs
(defn format
"Formats a string using goog.... | null | https://raw.githubusercontent.com/ontodev/howl/0880c903a0f603324309153586f720860d1e7d89/src/howl/util.cljc | clojure | (ns howl.util
"Cross-platform utility functions."
(:require
[clojure.string :as string]
#?@(:cljs
[[goog.string]
[goog.string.format]]))
#?(:clj
(:refer-clojure :exclude [format])))
#?(:clj
(def format #'clojure.core/format)
:cljs
(defn format
"Formats a string using goog.... | |
7791bb09681fd6a93d714f5a7c9a5a769e6594f1a9ee2e5b18cbdaaf46c0c9e0 | AccelerationNet/clsql-helper | iterate-clauses.lisp | (in-package :clsql-helper-test)
(cl-interpol:enable-interpol-syntax)
(clsql-sys:file-enable-sql-reader-syntax)
(defparameter +iterate-tests+
'(test-iterate-clauses-date test-iterate-clauses-date-2
test-iterate-clauses-date-3 test-iterate-clauses-date-4
test-iterate-clauses-date-5 test-iterate-clauses-date-6
... | null | https://raw.githubusercontent.com/AccelerationNet/clsql-helper/846b67a26906da5ea2cff790a36a4cb2f496a528/tests/iterate-clauses.lisp | lisp | (in-package :clsql-helper-test)
(cl-interpol:enable-interpol-syntax)
(clsql-sys:file-enable-sql-reader-syntax)
(defparameter +iterate-tests+
'(test-iterate-clauses-date test-iterate-clauses-date-2
test-iterate-clauses-date-3 test-iterate-clauses-date-4
test-iterate-clauses-date-5 test-iterate-clauses-date-6
... | |
a2caf5b25f931215df4f83c1263db62cfaa8c43ba778f830d79c28416d2e8e4a | haskell-works/cabal-cache | Version.hs | {-# LANGUAGE OverloadedStrings #-}
module HaskellWorks.CabalCache.Version
( archiveVersion,
) where
import Data.String (IsString)
archiveVersion :: IsString s => s
archiveVersion = "v2"
| null | https://raw.githubusercontent.com/haskell-works/cabal-cache/66116b2d50e18292c0a1d2b34901595396440fcb/src/HaskellWorks/CabalCache/Version.hs | haskell | # LANGUAGE OverloadedStrings # |
module HaskellWorks.CabalCache.Version
( archiveVersion,
) where
import Data.String (IsString)
archiveVersion :: IsString s => s
archiveVersion = "v2"
|
7d8d144f212c92f9cafe0233bb06715b6e91a3002e9ef3b82c4b31f96f5281be | smart-chain-fr/tokenomia | WalletUTxO.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE LambdaCase #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# LANGUAGE DuplicateRecordFields #
# OPTIONS_GHC -Wno - orphans #
# LANGUAGE NamedFieldPuns #
module Tokenomia.Wallet.WalletUTxO
( Walle... | null | https://raw.githubusercontent.com/smart-chain-fr/tokenomia/01a6fdc97ccd9229a3fca1a821d0054f38a60e6b/src/Tokenomia/Wallet/WalletUTxO.hs | haskell | # LANGUAGE OverloadedStrings #
| Intercalate non-null elements. | # LANGUAGE LambdaCase #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# LANGUAGE DuplicateRecordFields #
# OPTIONS_GHC -Wno - orphans #
# LANGUAGE NamedFieldPuns #
module Tokenomia.Wallet.WalletUTxO
( WalletUTxO (..)
, getAdas
, valu... |
0e50ee2e17c1b0c76d189a0e3401e082a353c7f1b328b4cdd7f848f203f82620 | jordwalke/rehp | source_map.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2013 Hugo Heuzard
*
* 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 th... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/compiler/lib/source_map.ml | ocaml | We already are at this location
let map' = mapping_of_string map_str' in | Js_of_ocaml compiler
* /
* Copyright ( C ) 2013 Hugo Heuzard
*
* 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 th... |
5e696071119acbcbd25ea4cbfce877e51e5648f2eb6de0b9255e78860e98f6e2 | facebook/duckling | Tests.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.CreditCardNumber.Tests
( tests
) where
import Data.... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/CreditCardNumber/Tests.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.CreditCardNumber.Tests
( tests
) where
import Data.String
import Test.Tasty
import Duckling.Dimensions.Types
import Duckling.CreditCardNumber.Corpus
import Duckling.Testing.Asserts
tests :: TestTree
tests = testGroup "CreditCardNumber Tests"
... |
2376ff025726460edf0ab42a5ea7f73d7416fe1593832bba511b804a9bc03e0b | kuberlog/holon | purpose.lisp | (defpackage :holon.purpose
(:use :cl :sb-ext)
(:export :purpose-schedule-reminder))
(in-package :holon.purpose)
(defvar *current-purpose*
(with-open-file (f (concatenate 'string
(directory-namestring (user-homedir-pathname))
"/Documents/curr... | null | https://raw.githubusercontent.com/kuberlog/holon/427226b44fc0eb09dc833b616978319b773f6cb0/lisp/purpose.lisp | lisp | (defpackage :holon.purpose
(:use :cl :sb-ext)
(:export :purpose-schedule-reminder))
(in-package :holon.purpose)
(defvar *current-purpose*
(with-open-file (f (concatenate 'string
(directory-namestring (user-homedir-pathname))
"/Documents/curr... | |
82baf9fa9db7192d2960eec054171c3d8f8c14b1c4bc3881a81e166b0e1974c6 | sheyll/b9-vm-image-builder | ExecEnv.hs | {-# LANGUAGE DeriveDataTypeable #-}
-- | Data types describing the execution environment
-- of virtual machine builds.
' ' , ' Resources ' and ' SharedDirectory ' describe how
-- "B9.LibVirtLXC" should configure and execute
-- build scripts, as defined in "B9.ShellScript" and "B9.Vm".
module B9.ExecEnv
... | null | https://raw.githubusercontent.com/sheyll/b9-vm-image-builder/4d2af80d3be4decfce6c137ee284c961e3f4a396/src/lib/B9/ExecEnv.hs | haskell | # LANGUAGE DeriveDataTypeable #
| Data types describing the execution environment
of virtual machine builds.
"B9.LibVirtLXC" should configure and execute
build scripts, as defined in "B9.ShellScript" and "B9.Vm". |
' ' , ' Resources ' and ' SharedDirectory ' describe how
module B9.ExecEnv
( ExecEnv (..),
Resources (..),
noResources,
SharedDirectory (..),
CPUArch (..),
RamSize (..),
)
where
import B9.DiskImages
import Control.Parallel.Strategies
import Data.Binary
import Data.Data
import Data.Hashab... |
78442e2f2ae8611c38fcc72c0737374450a2891aab16c508f5c1981c63dae603 | troydm/edda | Parser.hs | {-# LANGUAGE OverloadedStrings #-}
module EDDA.Schema.Parser where
import EDDA.Types
import EDDA.Schema.Util
import Control.Applicative ((<|>))
import Control.Monad.Trans
import Control.Monad.Trans.Reader
import Data.Aeson
import Data.Aeson.Types
import Data.Bson (Field(..))
import qualified Data.Bson as BSON
import ... | null | https://raw.githubusercontent.com/troydm/edda/710856d5bc3bf70c1061c50ae159107ca51c15f0/src/EDDA/Schema/Parser.hs | haskell | # LANGUAGE OverloadedStrings # | module EDDA.Schema.Parser where
import EDDA.Types
import EDDA.Schema.Util
import Control.Applicative ((<|>))
import Control.Monad.Trans
import Control.Monad.Trans.Reader
import Data.Aeson
import Data.Aeson.Types
import Data.Bson (Field(..))
import qualified Data.Bson as BSON
import qualified Data.Text as T
import qua... |
a8bd84366382baa99080ba4e7b4d0d7a7293bc80a2b59dc3fde9c3e65dc4fe31 | joelburget/lvca | Sort_slot.ml | open Base
type t =
| Sort_binding of Sort.t
| Sort_pattern of Pattern_sort.t
let equivalent ?(info_eq = fun _ _ -> true) slot1 slot2 =
match slot1, slot2 with
| Sort_binding s1, Sort_binding s2 -> Sort.equivalent ~info_eq s1 s2
| Sort_pattern ps1, Sort_pattern ps2 -> Pattern_sort.equivalent ~info_eq ps1 ps2... | null | https://raw.githubusercontent.com/joelburget/lvca/c5a13f2c5403a6ac4f9a0b71907632d4dd52039d/syntax/Sort_slot.ml | ocaml | open Base
type t =
| Sort_binding of Sort.t
| Sort_pattern of Pattern_sort.t
let equivalent ?(info_eq = fun _ _ -> true) slot1 slot2 =
match slot1, slot2 with
| Sort_binding s1, Sort_binding s2 -> Sort.equivalent ~info_eq s1 s2
| Sort_pattern ps1, Sort_pattern ps2 -> Pattern_sort.equivalent ~info_eq ps1 ps2... | |
99c9374ddd2806cb7391283be8161a80a27fb0fa5a44461f15af641547be3d51 | HealthSamurai/dojo.clj | dev.cljs | (ns ^:figwheel-hooks app.dev
(:require [app.core :as core]
[re-frisk.core :refer [enable-re-frisk!]]
[devtools.core :as devtools]))
(devtools/install!)
(enable-console-print!)
(enable-re-frisk!)
(core/init!)
(defn ^:after-load reload []
(println "Reload")
(core/mount-root))
| null | https://raw.githubusercontent.com/HealthSamurai/dojo.clj/94922640f534897ab2b181c608b54bfbb8351d7b/ui/src/app/dev.cljs | clojure | (ns ^:figwheel-hooks app.dev
(:require [app.core :as core]
[re-frisk.core :refer [enable-re-frisk!]]
[devtools.core :as devtools]))
(devtools/install!)
(enable-console-print!)
(enable-re-frisk!)
(core/init!)
(defn ^:after-load reload []
(println "Reload")
(core/mount-root))
| |
eef4c8842e17a32179be4d11dbd4bf8e8f87439ef5de96791ca3127838e8ccc6 | wiseman/turboshrimp | pave.clj | (ns com.lemondronor.turboshrimp.pave
"Code for reading and parsing video data in Parrot Video
Encapsulated (PaVE) format, which is the format of the drone's video
stream.
Typically you will do something like the following to process drone
video:
* Create a frame queue ([[make-frame-queue]]), a video input... | null | https://raw.githubusercontent.com/wiseman/turboshrimp/a1f53003bd4afd084e1c9e8cb80109ba732854bc/src/com/lemondronor/turboshrimp/pave.clj | clojure | If
our image rendering is slow this will drop frames, which is
good.
Header size can change from version to version, so we read
and ignore any remaining bytes.
We don't parse out the full header, just some of the parts
we're interested in. | (ns com.lemondronor.turboshrimp.pave
"Code for reading and parsing video data in Parrot Video
Encapsulated (PaVE) format, which is the format of the drone's video
stream.
Typically you will do something like the following to process drone
video:
* Create a frame queue ([[make-frame-queue]]), a video input... |
45d51834ae090d304feb8d586d10ddfe58ac8f49a333fe21a785d94bb1abc23d | lemaetech/reparse | test_parser.ml | module type TEST_PARSER = sig
include Reparse.PARSER
val of_string : string -> input promise
val run : 'a t -> (unit -> input promise) -> ('a, string) result
end
module String : TEST_PARSER = struct
include Reparse.String
let of_string = create_input_from_string
let run p i =
match parse (i ()) p wi... | null | https://raw.githubusercontent.com/lemaetech/reparse/0b9096cf3e4779813f8b82d5a0ba5d82035cca0e/tests/test_parser.ml | ocaml | module type TEST_PARSER = sig
include Reparse.PARSER
val of_string : string -> input promise
val run : 'a t -> (unit -> input promise) -> ('a, string) result
end
module String : TEST_PARSER = struct
include Reparse.String
let of_string = create_input_from_string
let run p i =
match parse (i ()) p wi... | |
574b8472d7d80db69b9ae4764d5a4d962ed41300e92a59b44921e86e9df3815c | footprintanalytics/footprint-web | bookmark.clj | (ns metabase.api.bookmark
"Handle creating bookmarks for the user. Bookmarks are in three tables and should be thought of as a tuple of (model,
model-id) rather than a row in a table with an id. The DELETE takes the model and id because DELETE's do not
necessarily support request bodies. The POST is therefore sha... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/api/bookmark.clj | clojure | below
todo: allow admins to include an optional user id to delete for so they can delete other's bookmarks. | (ns metabase.api.bookmark
"Handle creating bookmarks for the user. Bookmarks are in three tables and should be thought of as a tuple of (model,
model-id) rather than a row in a table with an id. The DELETE takes the model and id because DELETE's do not
necessarily support request bodies. The POST is therefore sha... |
220711cdc53a5c66f41636848a4b5b2ec6cd2f4ebd3cc07123eda5e4f1f3429f | cmr-exchange/cmr-client | protocol.cljc | (ns cmr.client.http.protocol
"This namespace defines the protocols used by the CMR HTTP client."
(:refer-clojure :exclude [get]))
(defprotocol HTTPClientAPI
"An interface for ClojureScript HTTP clients."
(^:export get [this url] [this url opts]
"Perform an HTTP `GET`.")
(^:export head [this url] [this ur... | null | https://raw.githubusercontent.com/cmr-exchange/cmr-client/0b4dd4114e3b5ed28fc5b57db0f8dcd8773c1c14/src/cljc/cmr/client/http/protocol.cljc | clojure | (ns cmr.client.http.protocol
"This namespace defines the protocols used by the CMR HTTP client."
(:refer-clojure :exclude [get]))
(defprotocol HTTPClientAPI
"An interface for ClojureScript HTTP clients."
(^:export get [this url] [this url opts]
"Perform an HTTP `GET`.")
(^:export head [this url] [this ur... | |
bfa1e782989af3c592e2a0a5eb5b6ab22ffbb1038aff73b60b90bc29f0e89234 | ucsd-progsys/liquidhaskell | ListISort_LType.hs | {-@ LIQUID "--expect-any-error" @-}
module ListISort_LType () where
import Language.Haskell.Liquid.Prelude
data List a = Nil | Cons a (List a)
-- isOdd x = not (isEven x)
-- isEven x = not (isOdd x)
-- foo x = x+1
insert y Nil
= Cons y Nil
insert y (Cons x xs) | (y <= x)
= let ys1 = Cons x xs in
... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/absref/neg/ListISort_LType.hs | haskell | @ LIQUID "--expect-any-error" @
isOdd x = not (isEven x)
isEven x = not (isOdd x)
foo x = x+1 | module ListISort_LType () where
import Language.Haskell.Liquid.Prelude
data List a = Nil | Cons a (List a)
insert y Nil
= Cons y Nil
insert y (Cons x xs) | (y <= x)
= let ys1 = Cons x xs in
let ys2 = Cons y ys1 in ys2
insert y (Cons x xs) | (x < y)
= let xs1 = insert y xs in
let xs2 = Con... |
f55dba2366e473642f65c0c9f99c5d1c33e3a62a68d04fa99185f7dcf87e61f2 | igorhvr/bedlam | defmacex.scm | ;;;"defmacex.scm" defmacro:expand* for any Scheme dialect.
Copyright 1993 - 1994 and .
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and understandings.
;
1 . Any copy made o... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/defmacex.scm | scheme | "defmacex.scm" defmacro:expand* for any Scheme dialect.
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and I am under no... | Copyright 1993 - 1994 and .
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
subexpressions , the primitive forms quote , lambda , set ! , let/*/rec ,
(defin... |
7727da0f99dbcb9d5e7c8911e295011d7bb25a897486902f5a0c6625bc9b7f5c | mbj/stratosphere | S3EncryptionProperty.hs | module Stratosphere.Synthetics.Canary.S3EncryptionProperty (
S3EncryptionProperty(..), mkS3EncryptionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3Encr... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/synthetics/gen/Stratosphere/Synthetics/Canary/S3EncryptionProperty.hs | haskell | module Stratosphere.Synthetics.Canary.S3EncryptionProperty (
S3EncryptionProperty(..), mkS3EncryptionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data S3Encr... | |
bbc1b7337a9e31ff565ef6bdece982481260a465d0d26287803aaf8adb1dd9cc | oakes/play-cljc-examples | dev.clj | (defmulti task first)
(defmethod task :default
[[task-name]]
(println "Unknown task:" task-name)
(System/exit 1))
(require '[figwheel.main :as figwheel])
(defmethod task nil
[_]
(figwheel/-main "--build" "dev"))
(defmethod task "native"
[_]
(require '[dungeon-crawler.start-dev])
((resolve 'dungeon-c... | null | https://raw.githubusercontent.com/oakes/play-cljc-examples/4e90d4de09b4d32c31412a3204c5a15f012f8060/dungeon-crawler/dev.clj | clojure | (defmulti task first)
(defmethod task :default
[[task-name]]
(println "Unknown task:" task-name)
(System/exit 1))
(require '[figwheel.main :as figwheel])
(defmethod task nil
[_]
(figwheel/-main "--build" "dev"))
(defmethod task "native"
[_]
(require '[dungeon-crawler.start-dev])
((resolve 'dungeon-c... | |
341662451b7da2948ad23a2eca14173559476de164572ca5e75d3cabdf52a75f | sjl/temperance | 0-data.lisp | (in-package :temperance)
;;;; .-,--. .
;;;; ' | \ ,-. |- ,-.
;;;; , | / ,-| | ,-|
;;;; `-^--' `-^ `' `-^
;;;; Constants
(defconstant +choice-point-placeholder+ 'choice-point-placeholder)
Utils
(declaim (inline variablep))
(defun variablep (term)
(and (symbolp term)
(char= (char (symbol-name t... | null | https://raw.githubusercontent.com/sjl/temperance/f7e68f46b7afaeecf643c009eb2e130500556e31/src/compiler/0-data.lisp | lisp | .-,--. .
' | \ ,-. |- ,-.
, | / ,-| | ,-|
`-^--' `-^ `' `-^
Constants
Registers
Clause Properties
When tokenizing/precompiling a clause there are a few pieces of metadata
we're going to need. We group them into a struct to make it easier to pass
everything around.
Facts and chain rules have no pe... | (in-package :temperance)
(defconstant +choice-point-placeholder+ 'choice-point-placeholder)
Utils
(declaim (inline variablep))
(defun variablep (term)
(and (symbolp term)
(char= (char (symbol-name term) 0) #\?)))
(defun lisp-object-to-string (o)
(with-output-to-string (str)
(print-unreadable-obje... |
4e4b6d61e1fe19ca00d41c9e047b294baf965e1112c3470dcf7de7483305c803 | YoshikuniJujo/test_haskell | try-sort-on2.hs | # LANGUAGE ImportQualifiedPost #
# , OverloadedStrings #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Foreign.C.Types
import Control.Monad.ST
import Data.Foldable
import Data.Traversable
import Data.Maybe
import Data.Int
import Data.Text qualified as T
import Data.Time
import Data.Color
import ... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/8243a8e2889dbf143f5a92ad23ccf733d861f7c5/tribial/graph/try-graph/app/try-sort-on2.hs | haskell | # LANGUAGE ImportQualifiedPost #
# , OverloadedStrings #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Foreign.C.Types
import Control.Monad.ST
import Data.Foldable
import Data.Traversable
import Data.Maybe
import Data.Int
import Data.Text qualified as T
import Data.Time
import Data.Color
import ... | |
4fd8fed1e2c8282992f1c5375d307551c34879b39054311018edc5c41ce72749 | reanimate/reanimate | blender_sphere.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Main (main) where
import qualified Data.Text as T
import NeatInterpolation
import Reanimate
main :: IO ()
main = reanimate $ addStatic (mkBackground "black"... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/blender_sphere.hs | haskell | stack runghc --package reanimate
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # | #!/usr/bin/env stack
module Main (main) where
import qualified Data.Text as T
import NeatInterpolation
import Reanimate
main :: IO ()
main = reanimate $ addStatic (mkBackground "black") $ mkAnimation 5 $ \t ->
let s = t * pi * 2
in blender (script $ T.pack $ show s)
texture :... |
162d1658940d69016306d6e70090a73ccd601cd3fe851229ee5f2651ce3dc932 | tezos-checker/checker | mockFA2.ml | (* Just a plain FA2 contract in which we can make tokens out of thin air. *)
(* Mainly to be used in tests. *)
open Fa2Interface
open Fa2Ledger
open Common
open TokenMetadata
type mock_fa2_params =
(* FA2 entrypoints *)
| Balance_of of fa2_balance_of_param
| Transfer of fa2_transfer list
| Update_operators of... | null | https://raw.githubusercontent.com/tezos-checker/checker/7f043341ef87784852e745978314780ce173cc03/src/mockFA2.ml | ocaml | Just a plain FA2 contract in which we can make tokens out of thin air.
Mainly to be used in tests.
FA2 entrypoints
Contract-specific entrypoints
* Make a fresh state.
unchanged state
deconstruct
reconstruct
The standard does not specify who is permitted to update operators. We restrict
it on... |
open Fa2Interface
open Fa2Ledger
open Common
open TokenMetadata
type mock_fa2_params =
| Balance_of of fa2_balance_of_param
| Transfer of fa2_transfer list
| Update_operators of fa2_update_operator list
| Mint of Ligo.nat
| Redeem of Ligo.nat
type mock_fa2_state =
{ fa2_state : fa2_state;
total_token... |
c841e4a9620cd50f6b55c2e1a56859b26cd576d09a0f416c75df0ada9e60e758 | MercuryTechnologies/ghc-specter | Sugiyama.hs | module GHCSpecter.GraphLayout.Sugiyama (
layOutGraph,
) where
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Resource (allocate)
import Data.Bits ((.|.))
import Data.Foldable qualified as F
import Data.IntMap (IntMap)
import Data.IntMap qualified as IM
import Data.Maybe... | null | https://raw.githubusercontent.com/MercuryTechnologies/ghc-specter/d911e610e0ee0fb43497dad9e762fec2abbf9e08/daemon/src/GHCSpecter/GraphLayout/Sugiyama.hs | haskell | module GHCSpecter.GraphLayout.Sugiyama (
layOutGraph,
) where
import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Resource (allocate)
import Data.Bits ((.|.))
import Data.Foldable qualified as F
import Data.IntMap (IntMap)
import Data.IntMap qualified as IM
import Data.Maybe... | |
f2fa67c11e7613545315820bef89b088cb575a60e04c27d8901aa6117d9d926b | ucsd-progsys/liquidhaskell | DependentTypes.hs | {-@ LIQUID "--expect-any-error" @-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module DependentTypes where
import GHC.TypeLits
-- THIS SHOULD BE UNSAFE
miunsafe1 :: forall s. MI... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/DependentTypes.hs | haskell | @ LIQUID "--expect-any-error" @
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
THIS SHOULD BE UNSAFE
THIS SHOULD BE UNSAFE
@ Small :: forall (s :: Symbol). {v:String | s ~~ v } -> MI s @
OR
data MI (s :: Symbol)
= Small { mi_... | # LANGUAGE ScopedTypeVariables #
module DependentTypes where
import GHC.TypeLits
miunsafe1 :: forall s. MI s
miunsafe1 = Small "blaa"
miunsafe2 :: MI "bla0"
miunsafe2 = Small "blaa"
data MI (s :: Symbol)
= Small { mi_input :: String }
|
5788e7e526ea8b63f7d127d6a4cc974c8c471727394587069f5203c73335376f | Hendekagon/cljs-web-audio | core.cljs | (ns cljs-web-audio.core
"
A web-audio lib for Clojurescript,
aimed at sonification of data and code, rather than music.
Very very rough!!!
This is currently just a disorganized bunch of badly-named functions,
and experiments, just to get the ball rolling. There are no clever abstractions
and it's hardly... | null | https://raw.githubusercontent.com/Hendekagon/cljs-web-audio/1913188c49db165710688d821d80a663ef7b4a60/src/cljs/cljs_web_audio/core.cljs | clojure | huh ? why ?
(println f v t) | (ns cljs-web-audio.core
"
A web-audio lib for Clojurescript,
aimed at sonification of data and code, rather than music.
Very very rough!!!
This is currently just a disorganized bunch of badly-named functions,
and experiments, just to get the ball rolling. There are no clever abstractions
and it's hardly... |
ce3ba70772596ec23976c86797d1e505901e1c6cc08009a56ffd03af8ee49cfd | haskell-opengl/OpenGLRaw | APPLE.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.APPLE
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
A convenience module , combining all raw modules containi... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/APPLE.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.APPLE
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------ | Copyright : ( c ) 2019
Maintainer : < >
A convenience module , combining all raw modules containing APPLE extensions .
module Graphics.GL.APPLE (
module Graphics.GL.APPLE.AuxDepthStencil,
module Graphics.GL.APPLE.ClientStorage,
module Graphics.GL.APPLE.ElementArray,
module Graphics.GL.APPLE... |
901d5c0839a649bf9d4b1c132650e66d65bc027ca5c34bc7999ecf2006655b7c | futurice/haskell-mega-repo | TimereportKind.hs | # LANGUAGE ApplicativeDo #
# LANGUAGE DerivingVia #
{-# LANGUAGE DataKinds #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveLift #-}
# LANGUAGE ImpredicativeTypes #
# LANGUAGE InstanceSigs #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Stan... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/futurice-integrations/src/Futurice/Integrations/TimereportKind.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveLift #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
^ billable work
^ non-billable client work
^ sick leave
^ balance absence
-----------------------------------------------------------------------------
More instances
----------------... | # LANGUAGE ApplicativeDo #
# LANGUAGE DerivingVia #
# LANGUAGE DeriveGeneric #
# LANGUAGE ImpredicativeTypes #
# LANGUAGE InstanceSigs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies ... |
b0a722e83d5025c114bdb65d327cc7b03333b22d8d4cd222a94bb1430514fed0 | msakai/toysolver | BoolExpr.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -Wall #
{-# OPTIONS_HADDOCK show-extensions #-}
-----------------------------------------------------------------------------
-- |
-- Module : ToySolver.Data.BoolExpr
... | null | https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/src/ToySolver/Data/BoolExpr.hs | haskell | # LANGUAGE DeriveDataTypeable #
# OPTIONS_HADDOCK show-extensions #
---------------------------------------------------------------------------
|
Module : ToySolver.Data.BoolExpr
License : BSD-style
Maintainer :
Stability : provisional
Portability : non-portable
Boolean expression over a give... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -Wall #
Copyright : ( c ) 2014 - 2015
module ToySolver.Data.BoolExpr
(
BoolExpr (..)
, fold
, simplify
) where
import Control.DeepSeq
import Control.Monad
import Data.Data
import Data.Has... |
1926691541065421e84bc497d2664da0e6a61442c840566e813fa431bc95de75 | rubenbarroso/EOPL | 3-6-letrec1.scm | environment structure for letrec , using procedural representation
(let ((time-stamp "Time-stamp: <2000-09-07 07:26:52 dfried>"))
(eopl:printf "letrec1.scm -- procedural rep of environments ~a~%"
(substring time-stamp 13 29)))
(define environment? procedure?)
(define apply-env
(lambda (env sym)
(env sy... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/interps/3-6-letrec1.scm | scheme | environment structure for letrec , using procedural representation
(let ((time-stamp "Time-stamp: <2000-09-07 07:26:52 dfried>"))
(eopl:printf "letrec1.scm -- procedural rep of environments ~a~%"
(substring time-stamp 13 29)))
(define environment? procedure?)
(define apply-env
(lambda (env sym)
(env sy... | |
692a14fbdc64be640fe279fdb9ec0b537b5f912f0926447af32a6adf2cf367ce | ecraven/r7rs-benchmarks | Mosh-prelude.scm | (import (rnrs) (rnrs mutable-pairs) (rnrs mutable-strings) (rnrs io simple) (srfi :19) (rnrs r5rs (6)))
(define (current-second)
(let ((d (current-date)))
(+ (* 60 60 (date-hour d))
(* 60 (date-minute d))
(date-second d))))
(define (current-jiffy)
(+ (current-second) (/ (date-nanosecond (current-dat... | null | https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/cd6ea87a6fa7d20424449b5d08dcd5bf990f26e4/src/Mosh-prelude.scm | scheme | (import (rnrs) (rnrs mutable-pairs) (rnrs mutable-strings) (rnrs io simple) (srfi :19) (rnrs r5rs (6)))
(define (current-second)
(let ((d (current-date)))
(+ (* 60 60 (date-hour d))
(* 60 (date-minute d))
(date-second d))))
(define (current-jiffy)
(+ (current-second) (/ (date-nanosecond (current-dat... | |
a0f8d3dc6abbd327b3e190d591b070070404fefa742a63ff488c21ff94cc0512 | vernemq/vernemq | vmq_pulse_cli.erl | Copyright 2019 Octavo Labs AG Switzerland ( )
%%
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, softw... | null | https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_pulse/src/vmq_pulse_cli.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2019 Octavo Labs AG Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_pulse_cli).
-export([register_cli/0]).
register_cli() ->
ConfigKeys = [
"vmq_pulse.api_key",
"v... |
fe62c07960a6b2b338d6e3ef46b87ab874e68c42f2700cdf8795200c37f6584f | facebook/flow | recheck_stats.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/690359737ba0010e5833afa185a2b2df5509b5ba/src/services/inference/recheck_stats.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
55b3f1b8af87c4a08e377cb7527c63927ab656733edbb788c08c9d7d62aa84dd | tommaisey/aeon | projects.scm | ;; Clears all running patterns and the loads the project's main
;; file, which will usually restart its patterns afresh.
(define (reinit-project)
(if (file-exists? "main.scm")
(let ([j jump])
(set! jump (lambda args '()))
(stop)
(load "main.scm")
(set! jump j))
(println "No... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/runtime/projects.scm | scheme | Clears all running patterns and the loads the project's main
file, which will usually restart its patterns afresh. | (define (reinit-project)
(if (file-exists? "main.scm")
(let ([j jump])
(set! jump (lambda args '()))
(stop)
(load "main.scm")
(set! jump j))
(println "No active aeon project. Try: (switch-project \"name\")")))
(define (jump . args)
(apply vc:jump args)
(reinit-project)... |
3b3007a0577d130555b0425edb013a96d4703d70a1fcf3432f922532f35fd285 | nuvla/api-server | credential_infrastructure_service_vpn_nuvlabox_lifecycle_test.clj | (ns sixsq.nuvla.server.resources.credential-infrastructure-service-vpn-nuvlabox-lifecycle-test
(:require
[clojure.test :refer [deftest use-fixtures]]
[sixsq.nuvla.server.resources.credential :as credential]
[sixsq.nuvla.server.resources.credential-template-infrastructure-service-vpn-customer
:as ctis... | null | https://raw.githubusercontent.com/nuvla/api-server/e4f0535e2e39e5042094fc20bfb811d2a9c75ad5/code/test/sixsq/nuvla/server/resources/credential_infrastructure_service_vpn_nuvlabox_lifecycle_test.clj | clojure | (ns sixsq.nuvla.server.resources.credential-infrastructure-service-vpn-nuvlabox-lifecycle-test
(:require
[clojure.test :refer [deftest use-fixtures]]
[sixsq.nuvla.server.resources.credential :as credential]
[sixsq.nuvla.server.resources.credential-template-infrastructure-service-vpn-customer
:as ctis... | |
e75fd321963f52a296d2101d1ff3a4bdba8e3d8553a8ac3c1668ecba843eded5 | play-co/hermes | edge_test.clj | (ns hermes.memory.edge-test
(:use [clojure.test])
(:require [hermes.core :as g]
[hermes.edge :as e]
[hermes.vertex :as v]))
(deftest test-delete
(g/open)
(let [u (v/create!)
w (v/create!)
a (e/connect! u w "test")
a-id (e/get-id a)]
(e/delete! a)
(is (= ... | null | https://raw.githubusercontent.com/play-co/hermes/9d203ec7b239e7800c89e6ee161486f35dabd110/test/hermes/memory/edge_test.clj | clojure | (ns hermes.memory.edge-test
(:use [clojure.test])
(:require [hermes.core :as g]
[hermes.edge :as e]
[hermes.vertex :as v]))
(deftest test-delete
(g/open)
(let [u (v/create!)
w (v/create!)
a (e/connect! u w "test")
a-id (e/get-id a)]
(e/delete! a)
(is (= ... | |
7b15fb8702a04550c3470a1ae8fac1add9507ed1dfea2850c2d897aa65a22efc | Kakadu/fp2022 | interpret.ml | * Copyright 2021 - 2022 , Danila Pechenev &
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Ast
open List
module type MONAD_FAIL = sig
include Base.Monad.S2
val run : ('a, 'e) t -> ok:('a -> ('b, 'e) t) -> err:('e -> ('b, 'e) t) -> ('b, 'e) t
val fail : 'e -> ('a, 'e) t
val ( let* ) : ('a, 'e) ... | null | https://raw.githubusercontent.com/Kakadu/fp2022/7f9035ae2d6fb779e2cb075ab1a0c76883f30b00/OCamlWithEffects/lib/interpret.ml | ocaml | * "apple"
* true
* 'a'
* ()
* fun x -> x * x
* E 0
* | effect EmptyListEffect -> ...
* Unbound value
* Inbound effect
* Unreachable code. If this error is thrown then something went seriously wrong
* Used unsupported operation
* n / 0
* Unreachable when type inference is used
* Unreachable when type inferen... | * Copyright 2021 - 2022 , Danila Pechenev &
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Ast
open List
module type MONAD_FAIL = sig
include Base.Monad.S2
val run : ('a, 'e) t -> ok:('a -> ('b, 'e) t) -> err:('e -> ('b, 'e) t) -> ('b, 'e) t
val fail : 'e -> ('a, 'e) t
val ( let* ) : ('a, 'e) ... |
fe3241c137119f1e2cd35a2fd0c98c9511c1a4e67ac393d6df52af2b60ecb6fa | MarcusPlieninger/HtDP_2e_solutions | HtDP_2e_Exercise_045.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 HtDP_2e_Exercise_45) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeati... | null | https://raw.githubusercontent.com/MarcusPlieninger/HtDP_2e_solutions/1b25b01ee950034c43cc9a907c4eabae2b5e4dbc/HtDP_2e_Exercise_045.rkt | racket | about the language level of this file in a form that our tools can easily process.
Let’s call it cat-prog and let’s assume it consumes the starting position of the cat. Furthermore,
it reappears on the left. You may wish to read up on the modulo function.
Physical constants
Graphical constants
to avoid any unwante... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_45) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Exercise 45 . Design a “ virtual cat ” world progr... |
4224bf73c8793e7fc36fdb17fa90dc261bb8dd6d1802ac37d545085c5b647ab8 | racket/typed-racket | plambda-utils.rkt | #lang racket/base
(provide
plambda-prop
has-poly-annotation?
get-poly-layer
remove-poly-layer
get-poly-tvarss)
(require
racket/list
racket/match
typed-racket/env/scoped-tvar-env
typed-racket/private/syntax-properties)
(define (plambda-prop stx)
(define d (plambda-property stx))
(and d (car (fl... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/utils/plambda-utils.rkt | racket | #lang racket/base
(provide
plambda-prop
has-poly-annotation?
get-poly-layer
remove-poly-layer
get-poly-tvarss)
(require
racket/list
racket/match
typed-racket/env/scoped-tvar-env
typed-racket/private/syntax-properties)
(define (plambda-prop stx)
(define d (plambda-property stx))
(and d (car (fl... | |
c6843b75d363bedbdddcb01880d7fb5d3197f54f6d6d290443e325bb8a2d7f8c | gregr/experiments | micro.rkt | #lang racket/base
(provide (all-defined-out))
(require racket/list racket/match racket/set)
;;; microVerse
;;; based on: -conf.pdf
;; TODO: IO operations?
- immediate read / write on a channel : sort of like
- scoped IO : an IO handler that receives and services IO request descriptions , sort of like the IO mona... | null | https://raw.githubusercontent.com/gregr/experiments/38a76f0c7c14117dd3b88c459a0a9cf2bf259143/verse/micro.rkt | racket | microVerse
based on: -conf.pdf
TODO: IO operations?
TODO: subst garbage collection
This implements path compression without leaking references to large values.
Acyclic unify
NOTE: if we use a fancy evaluation strategy, this assignment may want to schedule
work that depends on x.
just in case x is rigid
NOTE: ... | #lang racket/base
(provide (all-defined-out))
(require racket/list racket/match racket/set)
- immediate read / write on a channel : sort of like
- scoped IO : an IO handler that receives and services IO request descriptions , sort of like the IO monad
- transactional IO : a ( mozart / oz - style ) single - ass... |
acc1e1896cb2df87a0c579c56f816dc051503850ff7fb40e51eca0dc9deaa628 | graninas/The-Amoeba-World | Facade.hs | module Amoeba.Middleware.Config.Facade (module X) where
import Data.Either.Utils as X (forceEither)
import Amoeba.Middleware.Config.Config as X (Configuration(..), getOption, loadConfiguration, intOption, strOption, extract)
import Amoeba.Middleware.Config.Extra as X | null | https://raw.githubusercontent.com/graninas/The-Amoeba-World/a147cd4dabf860bec8a6ae1c45c02b030916ddf4/src/Amoeba/Middleware/Config/Facade.hs | haskell | module Amoeba.Middleware.Config.Facade (module X) where
import Data.Either.Utils as X (forceEither)
import Amoeba.Middleware.Config.Config as X (Configuration(..), getOption, loadConfiguration, intOption, strOption, extract)
import Amoeba.Middleware.Config.Extra as X | |
d316b60e3c259df2364812f37786490e88c902dc565594faeb381a35a09d2d92 | droog/configs | xmonad.hs | import XMonad
import XMonad.Util.Run
import XMonad.Hooks.DynamicLog
import qualified Data.Map as M
import qualified XMonad.StackSet as W
import XMonad.Layout.ResizableTile
import XMonad.Layout.SimplestFloat
import XMonad.Layout.PerWorkspace
import XMonad.Layout.NoBorders
import XMonad.Layout.Spacing
import XMonad.Layou... | null | https://raw.githubusercontent.com/droog/configs/df7b42fa60cb3cac0463f8aa98247d2e55fcda3d/.xmonad/xmonad.hs | haskell | > doFloat | c <- cFloats ]
> doFloat | t <- tFloats ]] | import XMonad
import XMonad.Util.Run
import XMonad.Hooks.DynamicLog
import qualified Data.Map as M
import qualified XMonad.StackSet as W
import XMonad.Layout.ResizableTile
import XMonad.Layout.SimplestFloat
import XMonad.Layout.PerWorkspace
import XMonad.Layout.NoBorders
import XMonad.Layout.Spacing
import XMonad.Layou... |
3fae70211398ff8551be041bf4aff269549f6ce83d7f255794fddf46cfc2a31c | oofp/Beseder | STransFunc.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamil... | null | https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Base/Internal/STransFunc.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE ConstraintKinds # | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
modul... |
bfa904ea950dacf2cfdf5f938618eb5a4ba963e6bd39b50979d385c61a53cf1a | chessai/vector-circular | doctests.hs | module Main (main) where
import Test.DocTest
main :: IO ()
main = doctest $ ["-isrc" ] ++ ghcExts ++ files
ghcExts :: [String]
ghcExts = map ("-X" ++)
[ "Haskell2010"
, "TypeApplications"
]
files :: [String]
files = map toFile modules
toFile :: String -> String
toFile = (\s -> "src... | null | https://raw.githubusercontent.com/chessai/vector-circular/7125c2c74165b0330660674bb28775f94b988ec3/test/doctests.hs | haskell | module Main (main) where
import Test.DocTest
main :: IO ()
main = doctest $ ["-isrc" ] ++ ghcExts ++ files
ghcExts :: [String]
ghcExts = map ("-X" ++)
[ "Haskell2010"
, "TypeApplications"
]
files :: [String]
files = map toFile modules
toFile :: String -> String
toFile = (\s -> "src... | |
455dc0bb428cce86ce55fd54b30693024d2976b9d8e221ec1c3120a41d3b80ab | redbadger/karma-tracker | contributors.cljs | (ns karma-tracker-ui.views.contributors
(:require [re-frame.core :as re-frame]))
(defn contributor [{:keys [username avatar link]}]
[:figure.contributor {:key username, :title username}
[:a.contributor__link {:href link, :target "_blank"}
[:img.contributor__avatar {:alt username, :src avatar}]]])
(defn con... | null | https://raw.githubusercontent.com/redbadger/karma-tracker/c5375f32f4cd0386f6bb1560d979b79bceea19e2/ui/src/cljs/karma_tracker_ui/views/contributors.cljs | clojure | (ns karma-tracker-ui.views.contributors
(:require [re-frame.core :as re-frame]))
(defn contributor [{:keys [username avatar link]}]
[:figure.contributor {:key username, :title username}
[:a.contributor__link {:href link, :target "_blank"}
[:img.contributor__avatar {:alt username, :src avatar}]]])
(defn con... | |
2df922d61200c750a17540c990d258eb5b2466aeb0354805e65d7e94c0dd480a | sbcl/sbcl | format.lisp | 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
;;;; provided with absolutely no wa... | null | https://raw.githubusercontent.com/sbcl/sbcl/0a6218116f8a122e1957e830f181e870e06ebffd/src/code/format.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.
TOKENIZE-CONTROL-STRING
The case for caching is to speed up out-of-line calls that use a fixed
control string in a loop, not to avoid re-toke... | 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-FORMAT")
happen to be STRING= to that string .
#+sb-xc-host
(defun tokenize-control-string (string)
(com... |
ef9cef6ce213902e1c0e363b69c6ea8d36b8fc78036332ac6b5b6347110ee862 | padsproj/oforest | forest_types.mli | (** Forest_types contains a collection of most if not all of the relevant types
in oforest *)
type loc = Location.t
val pp_loc : Format.formatter -> Location.t -> unit
(** This is just the location type and a function for printing it given a
formatter. Mainly this is needed because every other type derives 's... | null | https://raw.githubusercontent.com/padsproj/oforest/e10abf1c35f6d49d4bdf13d51cab44487629b3a3/parsing/forest_types.mli | ocaml | * Forest_types contains a collection of most if not all of the relevant types
in oforest
* This is just the location type and a function for printing it given a
formatter. Mainly this is needed because every other type derives 'show' (see
ppx_deriving).
* These are file paths, variable names, quoted OCaml... |
type loc = Location.t
val pp_loc : Format.formatter -> Location.t -> unit
* { 2 Common types }
type filepath = string
type varname = string
type aquot = string
type forest_regexp_str = string
type fPayload = PNone | PVList of varname list | PRec
* This type represents the possible payloads forest AST nodes c... |
ad14b81d8ef1fbdc1a239fe0d62f04189832fd7459643342b6feed16b765f818 | Tener/deeplearning-thesis | ConstraintsGeneric.hs | # LANGUAGE FlexibleContexts #
{-# OPTIONS_GHC -funbox-strict-fields #-}
module ConstraintsGeneric where
import Prelude hiding (putStr, putStrLn)
import GenericGame
import AgentGeneric
import MinimalNN
import NeuralNets (parseNetFromFile)
import ThreadLocal
import Numeric . Container ( sumElements )
import Data ... | null | https://raw.githubusercontent.com/Tener/deeplearning-thesis/c56866bf6f48db3185b4b62348d292bf39a7a2af/lib/ConstraintsGeneric.hs | haskell | # OPTIONS_GHC -funbox-strict-fields #
import qualified Data.Packed.Vector as Vector
| check if constraint is held under given evaluation function
| score constraints, returns percentage true
| generate constraints using base game state and a best choice following that state
| generate constraints using base game s... | # LANGUAGE FlexibleContexts #
module ConstraintsGeneric where
import Prelude hiding (putStr, putStrLn)
import GenericGame
import AgentGeneric
import MinimalNN
import NeuralNets (parseNetFromFile)
import ThreadLocal
import Numeric . Container ( sumElements )
import Data . Packed . Vector ( Vector )
import MyVect... |
541c5e3518dc0efb9df40df643c18855a235be891c8c81f707abe40db9c52015 | arttuka/reagent-material-ui | no_adult_content_rounded.cljs | (ns reagent-mui.icons.no-adult-content-rounded
"Imports @mui/icons-material/NoAdultContentRounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def no-adult-c... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/no_adult_content_rounded.cljs | clojure | (ns reagent-mui.icons.no-adult-content-rounded
"Imports @mui/icons-material/NoAdultContentRounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def no-adult-c... | |
6c9a679ff878fd7a3070e992621abb24d0e927f989410e1b732cbb9eb9ee82cb | alexandergunnarson/quantum | convert.cljc | (ns quantum.test.core.convert
(:require [quantum.core.convert :as ns]))
(defn test:transit->
([x type])
([x type opts]))
(defn test:->transit
([x type])
([x type opts]))
(defn test:->path
[& args])
(defn test:bytes->base64
[x])
(defn test:base64->forge-bytes [x])
(defn test:forge-bytes->base64 [x])
... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/core/convert.cljc | clojure | (ns quantum.test.core.convert
(:require [quantum.core.convert :as ns]))
(defn test:transit->
([x type])
([x type opts]))
(defn test:->transit
([x type])
([x type opts]))
(defn test:->path
[& args])
(defn test:bytes->base64
[x])
(defn test:base64->forge-bytes [x])
(defn test:forge-bytes->base64 [x])
... | |
3028c836c6fd3bf593ef830dea1d0cc8d42ba9f8c78eda340c9d679e10ee6651 | haskell/lsp | CallHierarchy.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE TemplateHaskell #
| Since LSP 3.16.0
module Language.LSP.Types.CallHierarchy where
import Data.Aeson.TH
import Data.Aeson.Types ( Value )
import Data.Text ( Text )
import Language.LSP.Types.Common
import Language.LSP.Types.DocumentSymbol
import Language.LSP.Types.Locat... | null | https://raw.githubusercontent.com/haskell/lsp/62b8bb54523f341bd13fe64a35f18250f7b8417c/lsp-types/src/Language/LSP/Types/CallHierarchy.hs | haskell | | More detail for this item, e.g. the signature of a function.
| The range that should be selected and revealed when this symbol
is being picked, e.g. the name of a function. Must be contained by
| A data entry field that is preserved between a call hierarchy
prepare and incoming calls or outgoing calls requests.
... | # LANGUAGE DuplicateRecordFields #
# LANGUAGE TemplateHaskell #
| Since LSP 3.16.0
module Language.LSP.Types.CallHierarchy where
import Data.Aeson.TH
import Data.Aeson.Types ( Value )
import Data.Text ( Text )
import Language.LSP.Types.Common
import Language.LSP.Types.DocumentSymbol
import Language.LSP.Types.Locat... |
ea1e5d73858b563fad6e3059f2f47a21d8833d0446322a4d8890744da1a38846 | melisgl/planet-wars | conditions.lisp | (in-package :alexandria)
(defun required-argument (&optional name)
"Signals an error for a missing argument of NAME. Intended for
use as an initialization form for structure and class-slots, and
a default value for required keyword arguments."
(error "Required argument ~@[~S ~]missing." name))
(define-condition s... | null | https://raw.githubusercontent.com/melisgl/planet-wars/499742d5fb46edeb114f2996b01b0343cf42b76a/src/alexandria/conditions.lisp | lisp | We don't specify a :report for simple-reader-error to let the
underlying implementation report the line and column position for
us. Unfortunately this way the message from simple-error is not
displayed, unless there's special support for that in the
debugger... | (in-package :alexandria)
(defun required-argument (&optional name)
"Signals an error for a missing argument of NAME. Intended for
use as an initialization form for structure and class-slots, and
a default value for required keyword arguments."
(error "Required argument ~@[~S ~]missing." name))
(define-condition s... |
da2d79b4935255fdc7a8d182556218deea374df56e74d0d791ad26d50249a8c5 | yakaz/yamerl | ex_8.19_compact_block_mappings.erl | -module('ex_8.19_compact_block_mappings').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[],
<<>>,
46,
true,
[],
0,
47,
... | null | https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/ex_8.19_compact_block_mappings.erl | erlang | -module('ex_8.19_compact_block_mappings').
-include_lib("eunit/include/eunit.hrl").
-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").
single_test_() ->
?_assertMatch(
{yamerl_parser,
{file,?FILENAME},
[],
<<>>,
46,
true,
[],
0,
47,
... | |
429a065c8738dc590dace8c730d2ce53e4281415cc1f07ba94c6f548f8d31464 | DKurilo/hackerrank | solution.hs | # LANGUAGE OverloadedStrings , UnicodeSyntax #
module Main where
import Prelude.Unicode
import Control.Monad.Unicode
import Control.Monad
import Data.List (foldl')
import Data.List.Split (splitOn)
import Numeric
import Debug.Trace
import System.IO
-- expectation ∷ Double → Double
-- expectation n = go (n - 1)
... | null | https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/kundu-and-bubble-wrap/solution.hs | haskell | expectation ∷ Double → Double
expectation n = go (n - 1)
where p = k / n
check image here: -and-bubble-wrap/ | # LANGUAGE OverloadedStrings , UnicodeSyntax #
module Main where
import Prelude.Unicode
import Control.Monad.Unicode
import Control.Monad
import Data.List (foldl')
import Data.List.Split (splitOn)
import Numeric
import Debug.Trace
import System.IO
where go ∷ Double → Double
go 0 = 1.0
g... |
9881ab1112e69717b0460fd2a92366875f8984ef83db276e3bd83001469c39ec | digikar99/numericals | n-arg-fn-tests.lisp | (numericals.common:compiler-in-package numericals.common:*compiler-package*)
(5am:in-suite nu::array)
;; FIXME: Categorize optimizable and non-optimizable tests correctly
(5am:def-test nu:+ (:suite nu::array)
(symbol-macrolet ((non-optimizable-tests
`(let ((nu:*array-element-type* 'single-f... | null | https://raw.githubusercontent.com/digikar99/numericals/8a0e7190996f38b29107d51285a65f518cbf5037/dense-numericals-src/n-arg-fn-tests.lisp | lisp | FIXME: Categorize optimizable and non-optimizable tests correctly | (numericals.common:compiler-in-package numericals.common:*compiler-package*)
(5am:in-suite nu::array)
(5am:def-test nu:+ (:suite nu::array)
(symbol-macrolet ((non-optimizable-tests
`(let ((nu:*array-element-type* 'single-float))
(5am:is (= 2 (nu:+ 2)))
... |
1f475fbf82707206d5e32922345bc4f77c8a384d86b6a02959f6a1aedf7a9caf | gafiatulin/codewars | HaskellGolf.hs | -- One Line Task: How many digits?
module HaskellGolf where
f x=read(show(x-1)++replicate(x-1)'8'++"9")
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/Beta/HaskellGolf.hs | haskell | One Line Task: How many digits? |
module HaskellGolf where
f x=read(show(x-1)++replicate(x-1)'8'++"9")
|
b1d962d76ee0ffe7c1f95de6ac0e9fff3c299cd658cf1ddb3967de2923452677 | simonmichael/hledger | Timeclock.hs | {-|
A 'TimeclockEntry' is a clock-in, clock-out, or other directive in a timeclock
file (see timeclock.el or the command-line version). These can be
converted to 'Transactions' and queried like a ledger.
-}
{-# LANGUAGE OverloadedStrings #-}
module Hledger.Data.Timeclock (
timeclockEntriesToTransactions
,tests... | null | https://raw.githubusercontent.com/simonmichael/hledger/b46cb8a7f77df569373d0b2b12bba5e97eff76c7/hledger-lib/Hledger/Data/Timeclock.hs | haskell | |
A 'TimeclockEntry' is a clock-in, clock-out, or other directive in a timeclock
file (see timeclock.el or the command-line version). These can be
converted to 'Transactions' and queried like a ledger.
# LANGUAGE OverloadedStrings #
| Convert time log entries to journal transactions. When there is no
transaction, ... |
module Hledger.Data.Timeclock (
timeclockEntriesToTransactions
,tests_Timeclock
)
where
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
import Data.Time.Calendar (addDays)
import Data.Time.Clock (addUTCTime, getCurrentTime)
import Data.Time.Format (defaultTimeLocale, formatTime, parseTimeM)
import... |
539ef796b6433c639976e47ca571a8f9ec5bf97fa37128d7dd3fd77c236ab81f | Javran/advent-of-code | Day16.hs | module Javran.AdventOfCode.Y2021.Day16 (
) where
import Control.Monad
import Control.Monad.State.Strict
import Data.Bits
import qualified Data.DList as DL
import Data.Functor.Base (TreeF (..))
import Data.Functor.Foldable
import Data.List
import Data.Tree
import Javran.AdventOfCode.Prelude
import Numeric
data Day16... | null | https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2021/Day16.hs | haskell | literal
operator | module Javran.AdventOfCode.Y2021.Day16 (
) where
import Control.Monad
import Control.Monad.State.Strict
import Data.Bits
import qualified Data.DList as DL
import Data.Functor.Base (TreeF (..))
import Data.Functor.Foldable
import Data.List
import Data.Tree
import Javran.AdventOfCode.Prelude
import Numeric
data Day16... |
c8dc91bae230f5d0e66a5f04c5ec84f3cc26298722111a4a6710665947f1cf6f | Frama-C/Frama-C-snapshot | Report.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/report/Report.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
d4b75fc937897eebb371284ad30ec89296fc6e9cdb18d8fce14789d52d55813e | sjl/chancery | quickutils.lisp | ;;;; This file was automatically generated by Quickutil.
;;;; See for details.
;;;; To regenerate:
( qtlc : save - utils - as " quickutils.lisp " : utilities ' (: CURRY : ENSURE - BOOLEAN : ENSURE - LIST : FLIP : RANGE : RCURRY : RIFFLE : SPLIT - SEQUENCE : SYMB ) : ensure - package T : package " CHANCERY.QUICKUTIL... | null | https://raw.githubusercontent.com/sjl/chancery/87cb53cd791d4d60a6c41bc0b02345739b82abb0/vendor/quickutils.lisp | lisp | This file was automatically generated by Quickutil.
See for details.
To regenerate:
eval-when
To propagate return type and allow the compiler to eliminate the IF when
it is known if the argument is function or not.
eval-when
Using M-V-C we don't need to append the arguments.
We can't take any more. Return now... |
( qtlc : save - utils - as " quickutils.lisp " : utilities ' (: CURRY : ENSURE - BOOLEAN : ENSURE - LIST : FLIP : RANGE : RCURRY : RIFFLE : SPLIT - SEQUENCE : SYMB ) : ensure - package T : package " CHANCERY.QUICKUTILS " )
(eval-when (:compile-toplevel :load-toplevel :execute)
(unless (find-package "CHANCERY.QUIC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.