_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 |
|---|---|---|---|---|---|---|---|---|
2026a0c168dac8b49912d18e1ebb6b1ec09f3db2f51e6d3dc758cd55344da882 | erlang/otp | mnesia_evil_coverage_test.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/dd28c69518e8d9c7ed3c3a30cb8f9645e678bbc2/lib/mnesia/test/mnesia_evil_coverage_test.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1996 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mnesia_evil_coverage_test).
-author('').
-include("mnesia_test_lib.hrl").
-export([init_per_testcase/2, end... |
4c90c1a8317ff8d40f2a7bd138d03c70c5feb0488c73698b4cc97a8aebd4ea63 | herd/herdtools7 | equivSpec.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/5bed6439c96fce799c32343fb78704a71b7b6bdd/herd/equivSpec.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2020 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
3df89a3cca366f3f40f00763b5db771a3343bc5dcfca5a0177280ae9fc432928 | swtwsk/vinci-lang | ErrM.hs | -- BNF Converter: Error Monad
Copyright ( C ) 2004 Author :
module Parser.ErrM where
the Error monad : like Maybe type with error msgs
import Control.Monad (MonadPlus(..), liftM)
import Control.Applicative (Alternative(..))
data Err a = Ok a | Bad String
deriving (Read, Show, Eq, Ord)
instance Monad Er... | null | https://raw.githubusercontent.com/swtwsk/vinci-lang/9c7e01953e0b1cf135af7188e0c71fe6195bdfa1/src/Parser/ErrM.hs | haskell | BNF Converter: Error Monad | Copyright ( C ) 2004 Author :
module Parser.ErrM where
the Error monad : like Maybe type with error msgs
import Control.Monad (MonadPlus(..), liftM)
import Control.Applicative (Alternative(..))
data Err a = Ok a | Bad String
deriving (Read, Show, Eq, Ord)
instance Monad Err where
return = Ok
O... |
3d6b5a2251fadee378bff80b2c2ff6d19a1828a5520f7a510ea459fc6790efe1 | dselsam/arc | ClassifyIndices.hs | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE StrictData #-}
module Solver.Tactics.ClassifyIndices where
import Util.Imports
import Solver.SolveM
import S... | null | https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Solver/Tactics/ClassifyIndices.hs | haskell | # LANGUAGE StrictData #
TODO: this is missing ones that the Lean version got.
I ported very very rushed, likely stupid mistakes.
TODO:
uncomment below if we want to only do this choice if the dims are NOT the same
guard $ flip any (zip (Ex.train inputs) outputs) $ \(ig, og) -> not (Grid.sameDims ig og)
should only... | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
# LANGUAGE ScopedTypeVariables #
module Solver.Tactics.ClassifyIndices where
import Util.Imports
import Solver.SolveM
import Solver.Goal
import qualified ... |
b627abec0510a4fb15fa32961089108a6c7c6b7579db10891ef08f976ec707d5 | michaelballantyne/syntax-spec | statecharts-smaller.rkt | #lang racket
(require "../main.rkt" (for-syntax syntax/parse))
(syntax-spec
(binding-class statechart-name)
(binding-class state-name)
(binding-class var)
(binding-class data-name)
(nonterminal/two-pass state-body
(initial n:state-name)
#:binding {n}
e:event
(state n:state-name
... | null | https://raw.githubusercontent.com/michaelballantyne/syntax-spec/1eca406e83468601ce7507de25fb036f6ff4d0ff/design/statecharts-smaller.rkt | racket | (host-interface/definition
... accessors ... | #lang racket
(require "../main.rkt" (for-syntax syntax/parse))
(syntax-spec
(binding-class statechart-name)
(binding-class state-name)
(binding-class var)
(binding-class data-name)
(nonterminal/two-pass state-body
(initial n:state-name)
#:binding {n}
e:event
(state n:state-name
... |
dd687aad3ae1fcf0c1af0b07c0fad39c16ab1845c37a67e4860217d039fd6cc4 | typelead/eta | tc094.hs | module ShouldSucceed where
From a bug report by .
foo = bar
where bar = \_ -> (truncate boing, truncate boing)
boing = 0
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc094.hs | haskell | module ShouldSucceed where
From a bug report by .
foo = bar
where bar = \_ -> (truncate boing, truncate boing)
boing = 0
| |
6d99c2704f0d71394af43a3483f2779425d70b60bd4e324e7e6cb83d0d6c94d2 | gmr/pgsql-listen-exchange | pgsql_listen_worker.erl | %%==============================================================================
@author < >
2014 - 2020 AWeber Communications
%% @end
%%==============================================================================
%% @doc gen_server process for listening to casts and calls from
pgsql_listen_exchange and e... | null | https://raw.githubusercontent.com/gmr/pgsql-listen-exchange/033ea5ecc6e02b740d616812ba10d142915149ee/src/pgsql_listen_worker.erl | erlang | ==============================================================================
@end
==============================================================================
@doc gen_server process for listening to casts and calls from
@end
------------------------- | @author < >
2014 - 2020 AWeber Communications
pgsql_listen_exchange and epgsql
-module(pgsql_listen_worker).
-behaviour(gen_server).
-export([
start_link/0,
init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3
]).
-include("pgsql_listen.hrl").
star... |
678d0d3eee034633fabc8e05125fcd8616b7b45f208dea4ba356449b687f3baa | lucasvreis/organon | JSON.hs | module Site.Org.JSON
( ToJSON (..),
FromJSON (..),
genericToEncoding,
genericToJSON,
genericParseJSON,
customOptions,
)
where
import Data.Aeson
customOptions :: Options
customOptions =
defaultOptions
{ fieldLabelModifier = camelTo2 '-',
constructorTagModifier = camelTo2 '-',
... | null | https://raw.githubusercontent.com/lucasvreis/organon/08d20ee0e3f28519a6a31b54cfab9cfc701ae004/src/ema-org/Site/Org/JSON.hs | haskell | module Site.Org.JSON
( ToJSON (..),
FromJSON (..),
genericToEncoding,
genericToJSON,
genericParseJSON,
customOptions,
)
where
import Data.Aeson
customOptions :: Options
customOptions =
defaultOptions
{ fieldLabelModifier = camelTo2 '-',
constructorTagModifier = camelTo2 '-',
... | |
551e5e1e976db2b2f59c0f375353a94f0fff02731447b3b00456d0e7e904acb9 | wdebeaum/step | y.lisp | ;;;;
;;;; W::Y
;;;;
(define-words :pos W::value :boost-word t
:words (
(W::Y
(senses((LF-PARENT ONT::letter-symbol)
(TEMPL value-templ) (PREFERENCE 0.92)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/y.lisp | lisp |
W::Y
|
(define-words :pos W::value :boost-word t
:words (
(W::Y
(senses((LF-PARENT ONT::letter-symbol)
(TEMPL value-templ) (PREFERENCE 0.92)
)
)
)
))
|
265032cff63dc54c52d8a66727dd86c3441580dd28f8f2cd0640a445af82146b | progman1/genprintlib | input_handling.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/progman1/genprintlib/acc1e5cc46b9ce6191d0306f51337581c93ffe94/debugger/4.10.0/input_handling.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Unix
open Primitives
let active_files =
ref ([... |
5d02713bfdd86a0063966f6d7072e4a5fff64aa379834201d2941568c9f3eddc | SamB/coq | coq_config.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/config/coq_config.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
local use (no installation... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
exact name of : eit... |
5b28f74e91e9b39dd2c135b657b7bd6f4bf75ed804993c08ac9a262a943aa46f | didierverna/tfm | package.lisp | package.lisp --- TFM package definition
Copyright ( C ) 2019 , 2021
Author : < >
This file is part of TFM .
;; Permission to use, copy, modify, and distribute this software for any
;; purpose with or without fee is hereby granted, provided that the above
;; copyright notice and this permission notice a... | null | https://raw.githubusercontent.com/didierverna/tfm/30ef2114392063043d34f900a641a8510069db68/core/package.lisp | lisp | Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SH... | package.lisp --- TFM package definition
Copyright ( C ) 2019 , 2021
Author : < >
This file is part of TFM .
THIS SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE ... |
860818bbe3d4f938fa34b4382223dcf88259b145855140b40dfcceb37be3c682 | workframers/garamond | util.clj | (ns garamond.util)
(defn exit
"Abort garamond and exit with the specified exit code. If a message is passed, print it to stderr
before exiting. Note that this function just throws exceptions which are handled in garamond.main/-main."
([]
(exit 0))
([code]
(exit code nil))
([code message]
(throw (ex-... | null | https://raw.githubusercontent.com/workframers/garamond/a5077bc99d5f6e303735505068d5363d3b2cc00c/src/garamond/util.clj | clojure | (ns garamond.util)
(defn exit
"Abort garamond and exit with the specified exit code. If a message is passed, print it to stderr
before exiting. Note that this function just throws exceptions which are handled in garamond.main/-main."
([]
(exit 0))
([code]
(exit code nil))
([code message]
(throw (ex-... | |
2eaa7545690079f16f10c8b04c49f8051c4b74747d9d3043168c49f14d7bcdbe | mirage/shared-memory-ring | client.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | null | https://raw.githubusercontent.com/mirage/shared-memory-ring/34b981b4db5c020b2967a0397c41f642d7b07df1/examples/client.ml | ocaml |
* Copyright ( C ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | |
3c5d50f47f4774ea6aa0a036633a200c899070a6257d1d994e9db8336a8ff03e | gdamore/tree-sitter-d | empty.scm | ==================
Empty file
==================
---
(source_file)
==================
End of file
==================
__EOF__
module is.not.included;
---
(source_file (end_file))
| null | https://raw.githubusercontent.com/gdamore/tree-sitter-d/d7b3cc1f9f1f59518457696a8547e0e1bb1a64b4/test/corpus/empty.scm | scheme | ==================
Empty file
==================
---
(source_file)
==================
End of file
==================
__EOF__
---
(source_file (end_file))
| |
f45b22bc3805cd348c156cd003e7f504886f028840f79f99e46673d6d595c30e | brendanhay/gogol | Patch.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Regions/Patch.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Resource
** Constructing a Request
'ContentRegionsPatch' request conforms to.
/See:/ 'newContentRegionsPatch' smart constructor.
| V1 error format.
| OAuth access token.
| Required. The id of the merchant for which to up... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
115fbdc893e3f192e23c291ebcb00100d45b5c9f7417d08782d85de3124621f8 | edicl/cl-unicode | tests.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - UNICODE - TEST ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - unicode / test / tests.lisp , v 1.18 2012 - 05 - 04 21:17:49 edi Exp $
Copyright ( c ) 2008 - 2012 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary form... | null | https://raw.githubusercontent.com/edicl/cl-unicode/2790a6b8912be1cb051437f463400b4a7198748a/test/tests.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - UNICODE - TEST ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditio... | $ Header : /usr / local / cvsrep / cl - unicode / test / tests.lisp , v 1.18 2012 - 05 - 04 21:17:49 edi Exp $
Copyright ( c ) 2008 - 2012 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
... |
89b5eda4340407bb70763db4a37f56d28382331a451262861b61efb5b24d5482 | ludat/conferer | Conferer.hs | -- |
Copyright : ( c ) 2019
-- License: MPL-2.0
Maintainer : < >
-- Stability: stable
-- Portability: portable
--
-- Public and stable API for the most basic usage of this library
module Conferer
(
-- * How to use this doc
-- | This doc is mostly for reference, so you probably won't learn how to
-- ... | null | https://raw.githubusercontent.com/ludat/conferer/13af5727c3b34779e87a1bdb4b0f247581ce4bc4/packages/conferer/src/Conferer.hs | haskell | |
License: MPL-2.0
Stability: stable
Portability: portable
Public and stable API for the most basic usage of this library
* How to use this doc
| This doc is mostly for reference, so you probably won't learn how to
use conferer by reading it. For more detailed and guided documentation
the best place is th... | Copyright : ( c ) 2019
Maintainer : < >
module Conferer
(
mkConfig
, mkConfig'
, fetch
, fetch'
, fetchKey
, fetchFromConfig
, safeFetchKey
, unsafeFetchKey
, DefaultConfig(..)
, FromConfig
, Config
, Key
) where
import Data.Text (Text)
import Data.Typeable (Typeable)
import C... |
505fef936b3b8b9450a6825836c73f74a75f5571e6dfaab50e37d5f38c04dd60 | aeolus-project/zephyrus | myocamlbuild.ml |
open Ocamlbuild_plugin;;
Options.use_ocamlfind := true ;;
let _ = dispatch begin function
| After_rules ->
Disable Warning 24 : bad source file name
flag ["ocaml"; "compile"] & S[A"-w"; A"-24"];
(* optimization to ocaml code *)
flag ["ocaml"; "compile"] & S[A"-ccopt"; A"-O9"];
fla... | null | https://raw.githubusercontent.com/aeolus-project/zephyrus/0b52de4038bbab724e6a9628430165a7f09f77ae/myocamlbuild.ml | ocaml | optimization to ocaml code |
open Ocamlbuild_plugin;;
Options.use_ocamlfind := true ;;
let _ = dispatch begin function
| After_rules ->
Disable Warning 24 : bad source file name
flag ["ocaml"; "compile"] & S[A"-w"; A"-24"];
flag ["ocaml"; "compile"] & S[A"-ccopt"; A"-O9"];
flag ["ocaml"; "pkg_threads"; "compile"] (S... |
0aee2758fa9decdaa9281c251581727d5dbe4d0a52050eb8b044536d60805543 | triclops200/quickapp | slime.lisp | (cl:load "quickapp.asd")
(ql:quickload "quickapp")
| null | https://raw.githubusercontent.com/triclops200/quickapp/20e004d90b971201cb7df3020a05ccebc38763eb/slime.lisp | lisp | (cl:load "quickapp.asd")
(ql:quickload "quickapp")
| |
fc803033a19d29f15b23f7c3d049cef176fd6cc0f91badc52c4322d3cf0bbba8 | haskellari/some | Newtype.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RoleAnnotations #
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE Trustworthy #-}
#if __GLASGOW_HASKELL__ >= 810
# LANGUAGE StandaloneKindSignatures #
#endif
module Data.Some.Newt... | null | https://raw.githubusercontent.com/haskellari/some/00e42322da777cba81a1afdbb701fe8bbe263f58/src/Data/Some/Newtype.hs | haskell | # LANGUAGE CPP #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE PolyKinds #
# LANGUAGE Trustworthy #
$setup
>>> :set -XKindSignatures -XGADTs
>>> x
"I"
or you can use functions
>>> let y = mkSome TagBool
>>> y
>>> withSome y $ \y' -> case y' of { TagInt -> "I";... | # LANGUAGE PatternSynonyms #
# LANGUAGE RoleAnnotations #
#if __GLASGOW_HASKELL__ >= 810
# LANGUAGE StandaloneKindSignatures #
#endif
module Data.Some.Newtype (
Some(Some),
mkSome,
withSome,
withSomeM,
mapSome,
foldSome,
traverseSome,
) where
import Control.Applicative (Applicative (..)... |
b0addfe1edc0e942f4dc040dd4498f566355b2242e7dbb1212236677ae5a3246 | clojurians-org/haskell-example | CopyObject.hs | --
MinIO Haskell SDK , ( C ) 2017 MinIO , Inc.
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writing, softw... | null | https://raw.githubusercontent.com/clojurians-org/haskell-example/c96b021bdef52a121e04ea203c8c3e458770a25a/minio-migration/src/Network/Minio/CopyObject.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | MinIO Haskell SDK , ( C ) 2017 MinIO , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
module Network.Minio.CopyObject where
import qualified Data.List as List
import Lib.Prelude
import ... |
d71a4e4d69539d923a90c97c0a505992902ca5101f5c66549f97a5b7381c8b00 | marcoheisig/Typo | predicates.lisp | (in-package #:typo.vm)
(defmacro define-predicate-fnrecord (predicate type-specifier)
`(define-fnrecord ,predicate (object)
(:properties :foldable :movable)
(:specializer
(let ((ntype (wrapper-ntype object)))
(ntype-subtypecase ntype
((not ,type-specifier) (wrap nil))
(,ty... | null | https://raw.githubusercontent.com/marcoheisig/Typo/303e21c38b1773f7d6f87eeb7f03617c286c4a44/code/vm/predicates.lisp | lisp | because the domain of these functions is limited to certain numbers. | (in-package #:typo.vm)
(defmacro define-predicate-fnrecord (predicate type-specifier)
`(define-fnrecord ,predicate (object)
(:properties :foldable :movable)
(:specializer
(let ((ntype (wrapper-ntype object)))
(ntype-subtypecase ntype
((not ,type-specifier) (wrap nil))
(,ty... |
f3b107061afdf968fc200df5c0ba30368c4b71a57662f7148e75699f5c9345de | garrigue/lablgtk | searchpos.mli | (**************************************************************************)
(* Lablgtk - Applications *)
(* *)
(* * You are free to do anything you want with this code as long *)
(* as i... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/applications/browser/searchpos.mli | ocaml | ************************************************************************
Lablgtk - Applications
* You are free to do anything you want with this code as long
as it is for personal ... | < >
< >
< >
< >
< >
< >
$ Id$
val top_widgets : GWindow.window list ref
type module_widget... |
9313da63f1186634a93fa692f271a597e992ec29fcf7ebd243f37523a6028cb6 | masateruk/micro-caml | mybool.ml | type b = True | False
let () =
let x = True in
match x with
| True -> print_int 1
| False -> print_int 0
| null | https://raw.githubusercontent.com/masateruk/micro-caml/0c0bd066b87cf54ce33709355c422993a85a86a1/test/mybool.ml | ocaml | type b = True | False
let () =
let x = True in
match x with
| True -> print_int 1
| False -> print_int 0
| |
a11e0bbf1fd0f6696ce16c7e91892b6ba59d00466ad457c8509c27f0024f2cfb | kadena-io/chainweb-node | ModuleCacheOnRestart.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Chainweb.Test.Pact.ModuleCacheOnRestart (tests) where
import Control.Concurrent... | null | https://raw.githubusercontent.com/kadena-io/chainweb-node/aff594a05096341d01ae50a9f37056b2519025d2/test/Chainweb/Test/Pact/ModuleCacheOnRestart.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
pact imports
wow, Tasty thinks there's a "loop" if the following test is called "testCoinbase"!!
| Do genesis load, snapshot cache.
| Do restart load, test results of 'initialPayloadState' against snapshotted cache.
| Run coinbase to do upgrade to v2, snapsh... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Chainweb.Test.Pact.ModuleCacheOnRestart (tests) where
import Control.Concurrent.MVar.Strict
import Control.DeepSeq (NFData)
import Control.Lens
... |
321dd423d6454a6675aae9bf28511bb2cc046c9c020c2db333e55654e99af691 | facebook/infer | livenessTests.ml |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/28e867254f6dc8c2a26d749575b472ca0ae27a0f/infer/src/unit/livenessTests.ml | ocaml | this is *x = y, which is a read of both x and y
a should be live here but the C++ exception system is not in synch yet with the
new abstract interpreter framework for exceptional edges |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
a780a4cf4b4a4abe6e99fac8d5aca31a13e19cd5fbec6691dd95e697841c1b08 | moby/vpnkit | mux.ml | open Lwt.Infix
let src =
let src = Logs.Src.create "mux" ~doc:"Mirage TCP/IP <-> socket proxy" in
Logs.Src.set_level src (Some Logs.Info);
src
module Log = (val Logs.src_log src : Logs.LOG)
module DontCareAboutStats = struct
let get_stats_counters _ = Mirage_net.Stats.create ()
let reset_stats_counters _ =... | null | https://raw.githubusercontent.com/moby/vpnkit/6dda85cda59e36875fcc6324205aaf0c7056ff0a/src/hostnet/mux.ml | ocaml | Does the packet match any of our rules? | open Lwt.Infix
let src =
let src = Logs.Src.create "mux" ~doc:"Mirage TCP/IP <-> socket proxy" in
Logs.Src.set_level src (Some Logs.Info);
src
module Log = (val Logs.src_log src : Logs.LOG)
module DontCareAboutStats = struct
let get_stats_counters _ = Mirage_net.Stats.create ()
let reset_stats_counters _ =... |
f3b33877f1b4cc2ac79f2bff5252a362af9c1a06d0c91626e0c972606dfe49be | composewell/unicode-data | Main.hs | module Main where
import Test.Hspec
import qualified Unicode.Char.General.NamesSpec as Names
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "Unicode.Char.General.Names" Names.spec
| null | https://raw.githubusercontent.com/composewell/unicode-data/3ba60c1a254e37b019c36feda9d1e82a889aec19/unicode-data-names/test/Main.hs | haskell | module Main where
import Test.Hspec
import qualified Unicode.Char.General.NamesSpec as Names
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "Unicode.Char.General.Names" Names.spec
| |
13910927848a953c6f2fd0214a584f3e67ffda68afa765926458de7a1b1e1a55 | MailOnline/s-metric | bulk.clj | (ns s-metric.bulk
(:require [s-metric.protocols :as p]
[clojure.set :as s]
[s-metric.levenshtein]
[clojure.core.reducers :as r])
(:import [s_metric.levenshtein LevenshteinDistance]))
(defn reducef [n]
(fn [topn score]
(let [top (conj topn score)
lowest (first top... | null | https://raw.githubusercontent.com/MailOnline/s-metric/991c84f3cc1c8c3ac55981f7eb1788385927fba0/src/s_metric/bulk.clj | clojure | (ns s-metric.bulk
(:require [s-metric.protocols :as p]
[clojure.set :as s]
[s-metric.levenshtein]
[clojure.core.reducers :as r])
(:import [s_metric.levenshtein LevenshteinDistance]))
(defn reducef [n]
(fn [topn score]
(let [top (conj topn score)
lowest (first top... | |
446d1352d15ebd2eb9049392a415981f924e78ecb8c611d439e483ac55266cd1 | danieljharvey/nix-mate | Spec.hs | import Data.Either
import NixMate.Actions.Config (defaultConfig, loadConfig)
import NixMate.Actions.Docker
import NixMate.Actions.Tags (parseTags)
import Test.Hspec
main :: IO ()
main = hspec $ do
describe "tmux-mate" $ do
it "Parses tags" $ do
resp <- readFile "./test/data/git-tags.txt"
let tags = p... | null | https://raw.githubusercontent.com/danieljharvey/nix-mate/0197b8517319a4ad4c9cb489579a6ed36ad9aec1/test/Spec.hs | haskell | import Data.Either
import NixMate.Actions.Config (defaultConfig, loadConfig)
import NixMate.Actions.Docker
import NixMate.Actions.Tags (parseTags)
import Test.Hspec
main :: IO ()
main = hspec $ do
describe "tmux-mate" $ do
it "Parses tags" $ do
resp <- readFile "./test/data/git-tags.txt"
let tags = p... | |
ac84a3696ffd3d6e06eb517220db9b8f45a23924acaa0e64a430b0986a5e9a39 | jlongster/genetic-canvas | vectors.scm |
;; Vectors
(define-structure vec2
x y)
(define-structure vec3
x y z)
(define (vec2-equal? v1 v2)
(and (eq? (vec2-x v1) (vec2-x v2))
(eq? (vec2-y v1) (vec2-y v2))))
(define (vec2-op v1 v2 op)
(make-vec2 (op (vec2-x v1) (vec2-x v2))
(op (vec2-y v1) (vec2-y v2))))
(define (vec2-add v1 v2)... | null | https://raw.githubusercontent.com/jlongster/genetic-canvas/2592e48ddbd168a819ca6ca330a6f8af6ffc37aa/lib/vectors.scm | scheme | Vectors |
(define-structure vec2
x y)
(define-structure vec3
x y z)
(define (vec2-equal? v1 v2)
(and (eq? (vec2-x v1) (vec2-x v2))
(eq? (vec2-y v1) (vec2-y v2))))
(define (vec2-op v1 v2 op)
(make-vec2 (op (vec2-x v1) (vec2-x v2))
(op (vec2-y v1) (vec2-y v2))))
(define (vec2-add v1 v2)
(vec2-op... |
b17c3638f389708bfbbbec69dc1801a43d2e2a9be96c00401292b32ed6187f12 | callum-oakley/advent-of-code | 01.clj | (ns aoc.2021.01
(:require
[clojure.string :as str]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(map read-string (str/split-lines s)))
(defn part-1 [xs]
(->> xs (partition 2 1) (filter #(apply < %)) count))
(defn part-2 [xs]
(->> xs (partition 3 1) (map #(apply + %)) part-1))
(deftest test-exa... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/3cf44bcb8c57693639630f95f29d4abf49a6f0e4/src/aoc/2021/01.clj | clojure | (ns aoc.2021.01
(:require
[clojure.string :as str]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(map read-string (str/split-lines s)))
(defn part-1 [xs]
(->> xs (partition 2 1) (filter #(apply < %)) count))
(defn part-2 [xs]
(->> xs (partition 3 1) (map #(apply + %)) part-1))
(deftest test-exa... | |
1b942fcf0f0299a1940515b451dd52cf3fd11002de97f084c04d51153b98735b | EasyCrypt/easycrypt | ecGenRegexp.ml | (* -------------------------------------------------------------------- *)
open EcUtils
open EcMaps
(* -------------------------------------------------------------------- *)
type anchor =
| Start
| End
type 'base gen_regexp =
| Anchor of anchor
| Any
| Base of 'base
| Choice of 'base gen_regex... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/f87695472e70c313ef2966e20979b1afcc2e543e/src/ecGenRegexp.ml | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
-----------------------------------... | open EcUtils
open EcMaps
type anchor =
| Start
| End
type 'base gen_regexp =
| Anchor of anchor
| Any
| Base of 'base
| Choice of 'base gen_regexp list
| Named of 'base gen_regexp * string
| Repeat of 'base gen_regexp * int option pair * [ `Greedy | `Lazy ]
| Seq of 'base gen... |
0e90d976bb18a3712bd9ea911df2a64eea11ef1f3e22d27e955f5ad80340fcd0 | reborg/clojure-essential-reference | 5.clj | < 1 >
(intern 'disappear 'my-var 0)
(refer 'disappear :only ['my-var])
my-var
0
< 2 >
(.ns #'my-var)
;; #object[clojure.lang.Namespace 0x1f780201 "disappear"]
(create-ns 'disappear) ; <3>
(intern 'disappear 'my-var 1)
< 4 >
0
< 5 >
1 | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/VarsandNamespaces/ns%2Cin-ns%2Ccreate-nsandremove-ns/5.clj | clojure | #object[clojure.lang.Namespace 0x1f780201 "disappear"]
<3> | < 1 >
(intern 'disappear 'my-var 0)
(refer 'disappear :only ['my-var])
my-var
0
< 2 >
(.ns #'my-var)
(intern 'disappear 'my-var 1)
< 4 >
0
< 5 >
1 |
e323d2e6a267bb0e78f5f7ead9aa2632b09abf7d59ad92795343b58d11849a9b | inclojure-org/intermediate-clojure-workshop | users_pure_test.clj | (ns workshop-app.handlers.users-pure-test
(:require [clojure.test :refer :all]
[workshop-app.handlers.users :as wahu])
(:import (java.time LocalDate)))
(deftest pure-get-person-test
(is (= {:status 200
:headers {"content-type" "application/json"}
:body "{\"dob\":\"2000-01-01\",\"... | null | https://raw.githubusercontent.com/inclojure-org/intermediate-clojure-workshop/3338a476aa815a587fa9e0b8b3804aa43492d15e/save-points/final/test/workshop_app/handlers/users_pure_test.clj | clojure | (ns workshop-app.handlers.users-pure-test
(:require [clojure.test :refer :all]
[workshop-app.handlers.users :as wahu])
(:import (java.time LocalDate)))
(deftest pure-get-person-test
(is (= {:status 200
:headers {"content-type" "application/json"}
:body "{\"dob\":\"2000-01-01\",\"... | |
ee14faaacd3ecf6a3bced4971cbc30978e5c77733d3e1aed5b5560b9e4b8804b | AbstractMachinesLab/caramel | typer_raw.ml | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/ocaml/merlin_specific/402/typer_raw.ml | ocaml | Ident.reinit();
Type expressions for the class language | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... |
7aa12b4be88167f58a6600044b2ec77c52a9e512f49f90a5133a0799c4ea1c59 | xhtmlboi/yocaml | util.mli | (** An invasive but probably useful tooling. *)
(** {1 String util}
As I was not very serious... strings occupy a very large place in
Wordpress... so it is necessary to be able to work correctly with them. *)
val split_metadata : string -> string option * string
* { 1 Infix operators }
Even if someti... | null | https://raw.githubusercontent.com/xhtmlboi/yocaml/8b67d643da565993c2adf6530ea98149774445bd/lib/yocaml/util.mli | ocaml | * An invasive but probably useful tooling.
* {1 String util}
As I was not very serious... strings occupy a very large place in
Wordpress... so it is necessary to be able to work correctly with them.
* [f $ x] is [f @@ x] which is [f x]... but I don't like [@@].
* @closed |
val split_metadata : string -> string option * string
* { 1 Infix operators }
Even if sometimes , infix operators can seem unreadable ... the immoderate
use of Arrows has already made the code incomprehensible ... so why deprive
yourself ?
Even if sometimes, infix operators can seem unreadabl... |
f7e40dff385a45697875fa3b103d7d4f989daa0225be57d05419bb108f7744a6 | cmk/rings | Free.hs | {-# LANGUAGE Safe #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE NoImplicitPrelude #-}
# LANGUAGE Rebinda... | null | https://raw.githubusercontent.com/cmk/rings/f1203d693d0069169582d478c663159de9416d87/src/Data/Semimodule/Free.hs | haskell | # LANGUAGE Safe #
# LANGUAGE ConstraintKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TypeOperators #
# LANGUAGE RankNTypes #
| < +module >
* Types
* Coltor access... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE RebindableSyntax #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
module Data.Semimodule.Free (
type (**), type (++)
, type Free
, type FreeModule
, type FreeSemimodule
... |
587159d3e03f03c02685eda529569a3319606944321416351b53e5cf077e50ce | tranma/shitty-complexity | Plot.hs | # LANGUAGE FlexibleContexts #
module Test.BigOh.Plot where
import Control.Arrow
import Control.Monad
import Control.Monad.ST
import qualified Data.Array.MArray as AM
import Data.Array.ST
import qualified Data.Array.ST as AS
import Data.Array.Unboxed
i... | null | https://raw.githubusercontent.com/tranma/shitty-complexity/573815a8af9d5f3cda3c96e22d59b71ec9f29de9/src/Test/BigOh/Plot.hs | haskell | | Grab the highest y for each x
------------------------------------------------------------------------------ | # LANGUAGE FlexibleContexts #
module Test.BigOh.Plot where
import Control.Arrow
import Control.Monad
import Control.Monad.ST
import qualified Data.Array.MArray as AM
import Data.Array.ST
import qualified Data.Array.ST as AS
import Data.Array.Unboxed
i... |
313a05fec5ad0a0953b0fd8fd9455ca081f580792c89b6caab219130f1f0f6a5 | noschinl/cyp | Tasty.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE LambdaCase #
module Test.Info2.Cyp.Tasty (
CypTest(..)
, findTests
) where
import Data.List
import Data.Tagged (Tagged(..))
import Data.Typeable (Typeable)
import qualified Test.Info2.Cyp as Cyp
import Test.Info2.Cyp.Util
import Test.Tasty
import Test.Tasty.Providers
i... | null | https://raw.githubusercontent.com/noschinl/cyp/48e840ef0b1cf358eb3c2c6a42589b005c315164/src/Test/Info2/Cyp/Tasty.hs | haskell | # LANGUAGE DeriveDataTypeable # | # LANGUAGE LambdaCase #
module Test.Info2.Cyp.Tasty (
CypTest(..)
, findTests
) where
import Data.List
import Data.Tagged (Tagged(..))
import Data.Typeable (Typeable)
import qualified Test.Info2.Cyp as Cyp
import Test.Info2.Cyp.Util
import Test.Tasty
import Test.Tasty.Providers
import Text.PrettyPrint (empty, rende... |
686bde6efc0e4676203068f9b9f1737176fce7919fdd640205ca52b109c019e7 | PEZ/rich4clojure | problem_068.clj | (ns rich4clojure.elementary.problem-068
(:require [hyperfiddle.rcf :refer [tests]]))
;; = Recurring Theme =
By 4Clojure user :
;; Difficulty: Elementary
;; Tags: [recursion]
;;
Clojure only has one non - stack - consuming looping
;; construct: recur. Either a function or a loop can be
;; used as the recursion ... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/28ea575ede8677f3a97437a646cdb3376a28ebc9/src/rich4clojure/elementary/problem_068.clj | clojure | = Recurring Theme =
Difficulty: Elementary
Tags: [recursion]
construct: recur. Either a function or a loop can be
used as the recursion point. Either way, recur rebinds
the bindings of the recursion point to the values it is
and calling it elsewhere will result in an error.
Share your solution, and/or check h... | (ns rich4clojure.elementary.problem-068
(:require [hyperfiddle.rcf :refer [tests]]))
By 4Clojure user :
Clojure only has one non - stack - consuming looping
passed . Recur must be called from the tail - position ,
(def __ :tests-will-fail)
(comment
)
(tests
__ :=
(loop [x 5
result []]
... |
5af2ff1ffdd3672d17c5bf048229d9a116e3e99b8f35a9350981085261cd6f9c | TokTok/hs-toxcore | Result.hs | {-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE Safe #-}
# LANGUAGE StrictData #
module Data.Result
( Result (..)
) where
import Control.Applicative (Alternative (..))
data Result a
= Success a
| Failu... | null | https://raw.githubusercontent.com/TokTok/hs-toxcore/647c3070cab29aee3d795a456be534d77c167d81/test/Data/Result.hs | haskell | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveTraversable #
# LANGUAGE Safe # | # LANGUAGE StrictData #
module Data.Result
( Result (..)
) where
import Control.Applicative (Alternative (..))
data Result a
= Success a
| Failure String
deriving (Read, Show, Eq, Functor, Foldable, Traversable)
instance Applicative Result where
pure = Success
Success f... |
6315b4541c181c5264d2b2a9eea83e38d3f8e1ec2a2f43b31708cd1f3a43ee7e | logicshan/pj-lester-book | Template2.hs | module Template2 where
import Language
import Utils
runProg :: [Char] -> [Char]
compile :: CoreProgram -> TiState
eval :: TiState -> [TiState]
showResults :: [TiState] -> [Char]
runProg = showResults . eval . compile . parse
type TiState = (TiStack, TiDump, TiHeap, TiGlobals, TiStats)
type TiStack = [Addr]
data TiDump... | null | https://raw.githubusercontent.com/logicshan/pj-lester-book/2ddb3fadc35800582002dd34be351980df2dec65/Template2.hs | haskell | Application
Supercombinator
A number
Body of supercombinator
Association of names to addresses
address of root of instance | module Template2 where
import Language
import Utils
runProg :: [Char] -> [Char]
compile :: CoreProgram -> TiState
eval :: TiState -> [TiState]
showResults :: [TiState] -> [Char]
runProg = showResults . eval . compile . parse
type TiState = (TiStack, TiDump, TiHeap, TiGlobals, TiStats)
type TiStack = [Addr]
data TiDump... |
df37b62603151f5e5ad4165656bb1f63742256d4b9ca224ee4fe7cc2892f9b14 | Bogdanp/racket-gui-easy | slider.rkt | #lang racket/base
(require racket/gui/easy
racket/gui/easy/operator)
(define @n (@ 50))
(define @n-str (@n . ~> . number->string))
(render
(window
(vpanel
(text @n-str)
(slider
@n (λ:= @n)
#:style '(horizontal plain))
(progress @n #:style '(vertical))
(input @n-str (λ (_ text)
... | null | https://raw.githubusercontent.com/Bogdanp/racket-gui-easy/e3bcbfe912b9914b5fda437546c53a8caaa65060/examples/slider.rkt | racket | #lang racket/base
(require racket/gui/easy
racket/gui/easy/operator)
(define @n (@ 50))
(define @n-str (@n . ~> . number->string))
(render
(window
(vpanel
(text @n-str)
(slider
@n (λ:= @n)
#:style '(horizontal plain))
(progress @n #:style '(vertical))
(input @n-str (λ (_ text)
... | |
d130de5fc52f107e179a8a7317967e5e35352f9875be4c5104726ce602d7eb0e | circuithub/rel8 | Window.hs | module Rel8.Expr.Window
( cumulative
, rowNumber
, rank
, denseRank
, percentRank
, cumeDist
, ntile
, lag
, lead
, firstValue
, lastValue
, nthValue
)
where
-- base
import Data.Int ( Int32, Int64 )
import Prelude
-- opaleye
import qualified Opaleye.Internal.Aggregate as Opaleye
import quali... | null | https://raw.githubusercontent.com/circuithub/rel8/2e82fccb02470198297f4a71b9da8f535d8029b1/src/Rel8/Expr/Window.hs | haskell | base
opaleye
profunctors
rel8
| [@rank()@](-window.html)
| [@dense_rank()@](-window.html)
| [@percent_rank()@](-window.html)
| [@cume_dist()@](-window.html)
| [@ntile(num_buckets)@](-window.html)
| [@lag(value, offset, default)@](-window.html)
| [@first_value(value)@](-window.html)
| [@last_value(value)@](-... | module Rel8.Expr.Window
( cumulative
, rowNumber
, rank
, denseRank
, percentRank
, cumeDist
, ntile
, lag
, lead
, firstValue
, lastValue
, nthValue
)
where
import Data.Int ( Int32, Int64 )
import Prelude
import qualified Opaleye.Internal.Aggregate as Opaleye
import qualified Opaleye.Intern... |
b8b9597e8f7f1418e82d0f739816aab5fcb8a04c499e6778a48f22e6e608bb99 | chunsj/TH | genchars-obama-lstm.lisp | ;; from
;; -effectiveness/
(defpackage :genchars-obama-lstm
(:use #:common-lisp
#:mu
#:th
#:th.ex.data))
(in-package :genchars-obama-lstm)
(defparameter *data-lines* (remove-if (lambda (line) (< ($count line) 1)) (text-lines :obama)))
(defparameter *data* (format nil "~{~A~^~%~}" *data-line... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/genchars/genchars-obama-lstm.lisp | lisp | from
-effectiveness/
non batched lstm for example
XXX of course, we need better strategy for building data
for example, breaking at the word level will be better one.
adgd - 1.551497 - 1.841827 |
(defpackage :genchars-obama-lstm
(:use #:common-lisp
#:mu
#:th
#:th.ex.data))
(in-package :genchars-obama-lstm)
(defparameter *data-lines* (remove-if (lambda (line) (< ($count line) 1)) (text-lines :obama)))
(defparameter *data* (format nil "~{~A~^~%~}" *data-lines*))
(defparameter *chars* ... |
953dc3ff75c7fb0ac2ca4bd8dfa26faa77f0ccf3c71a396045b9dfdc2e8be885 | ayato-p/bulkhead | bulkhead.clj | (ns org.panchromatic.bulkhead
(:require [integrant.core :as ig]
[org.panchromatic.bulkhead.internal :as internal]
[org.panchromatic.bulkhead.state :as state]))
(defn set-prep! [f]
(alter-var-root #'state/prep (constantly f)))
(defmacro with-bulkhead
{:arglists '([bindings mock-map body])... | null | https://raw.githubusercontent.com/ayato-p/bulkhead/64c9571d6fb33860b8079f06e2db54b02d779b41/src/org/panchromatic/bulkhead.clj | clojure | (ns org.panchromatic.bulkhead
(:require [integrant.core :as ig]
[org.panchromatic.bulkhead.internal :as internal]
[org.panchromatic.bulkhead.state :as state]))
(defn set-prep! [f]
(alter-var-root #'state/prep (constantly f)))
(defmacro with-bulkhead
{:arglists '([bindings mock-map body])... | |
7eb63ac839ff904e7bef7934e7d84290aa7ce18c8425f893ba2d8f37b9d047f7 | jjmeyer0/gt | trie.mli | type 'a trie =
Tnone
| Texact of char list * 'a
| Tnext of 'a option * 'a trie array
val mk_trievec : 'a -> 'a array
val charlist_of_string : string -> char list
val trie_insert : 'a trie -> string -> 'a -> 'a trie
val trie_lookup : 'a trie -> string -> 'a option
val trie_contains : 'a trie -> string -> bool
| null | https://raw.githubusercontent.com/jjmeyer0/gt/c0c7febc2e3fd532d44617f663b224cc0b9c7cf2/src/trie.mli | ocaml | type 'a trie =
Tnone
| Texact of char list * 'a
| Tnext of 'a option * 'a trie array
val mk_trievec : 'a -> 'a array
val charlist_of_string : string -> char list
val trie_insert : 'a trie -> string -> 'a -> 'a trie
val trie_lookup : 'a trie -> string -> 'a option
val trie_contains : 'a trie -> string -> bool
| |
07840d25cc92fb96877f71407dea728f62966e9bf34e953e23efd5145fcd291b | Elzair/nazghul | af-entry.scm | ;; ----------------------------------------------------------------------------
;; af-entry.scm
;;
;; This file defines the on-entry procedure executed whenever the player enters
;; the abandoned farm place. The purpose of this proc is to respawn some
;; monsters in the place.
;;
I never want there to be more than 5 ... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/af-entry.scm | scheme | ----------------------------------------------------------------------------
af-entry.scm
This file defines the on-entry procedure executed whenever the player enters
the abandoned farm place. The purpose of this proc is to respawn some
monsters in the place.
----------------------------------------------------... | I never want there to be more than 5 each of trolls or spiders . I 'll roll to
add monsters if there are 2 or less , and I 'll never add more than 3 .
(define (af-spawn-spiders kplace n)
(if (> n 0)
(begin
(psummon (place-random-corner kplace)
mk-wood-spider
1)
... |
96e1c7c96b4a8972b35f9aee143c2f7ef6b6223796317d8115dba69dfb2b005d | grzm/awyeah-api | signers.clj | Copyright ( c ) Cognitect , Inc.
;; All rights reserved.
(ns ^:skip-wiki com.grzm.awyeah.signers
"Impl, don't call directly."
(:require
[clojure.string :as str]
[com.grzm.awyeah.service :as service]
[com.grzm.awyeah.util :as util])
(:import
(java.net URI)
(java.net URLDecoder)))
(set! *warn-on-... | null | https://raw.githubusercontent.com/grzm/awyeah-api/1810bf624da2be58c77813106a1d51e32db11690/src/com/grzm/awyeah/signers.clj | clojure | All rights reserved.
it's already been encoding. Look into avoiding that! | Copyright ( c ) Cognitect , Inc.
(ns ^:skip-wiki com.grzm.awyeah.signers
"Impl, don't call directly."
(:require
[clojure.string :as str]
[com.grzm.awyeah.service :as service]
[com.grzm.awyeah.util :as util])
(:import
(java.net URI)
(java.net URLDecoder)))
(set! *warn-on-reflection* true)
(defm... |
2727ff4e82bd77542b180a895477f1d9b0a5df0eede41d6894371f8c805ac725 | yedi/rhyme-finder | streams.clj | (ns rhyme-finder.streams)
(defn indices [pred coll]
(keep-indexed #(when (pred %2) %1) coll))
(defn combos
"[3 4] 4 = 2 1234343412343434 => [[2, 4, 6], [10, 12, 14]]"
[val dist match?-fn min-combo-len coll]
(let [indexes (indices (partial match?-fn val) coll)]
(loop [rem (rest indexes)
curr (fi... | null | https://raw.githubusercontent.com/yedi/rhyme-finder/c2f994606794e16361f04b03950113ce82a4e090/src/clj/rhyme_finder/streams.clj | clojure | (ns rhyme-finder.streams)
(defn indices [pred coll]
(keep-indexed #(when (pred %2) %1) coll))
(defn combos
"[3 4] 4 = 2 1234343412343434 => [[2, 4, 6], [10, 12, 14]]"
[val dist match?-fn min-combo-len coll]
(let [indexes (indices (partial match?-fn val) coll)]
(loop [rem (rest indexes)
curr (fi... | |
e3e3a405f07458ebbb059ca8a771515122a08ee9c1970be975d03841bf238a37 | OCamlPro/directories | win_functions_functor.ml |
module Apply (F : Cstubs.FOREIGN) = struct
open Ctypes
open F
open Win_types
module Kernel32 = struct
(** see
-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte *)
let wide_char_to_multi_byte =
foreign "WideCharToMultiByte" (
UINT CodePage
DWORD dwFlags
LPCW... | null | https://raw.githubusercontent.com/OCamlPro/directories/b7597a0495da62a8f62a0c20f5a9071ac1c77eb5/src/windows/bindings/win_functions_functor.ml | ocaml | * see
-us/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte
int cchWideChar
int cbMultiByte
LPCCH lpDefaultChar
LPBOOL lpUsedDefaultChar
int
* see
-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath
REFKNOWNFOLDERID rfid (= GUID * )
HANDLE ... |
module Apply (F : Cstubs.FOREIGN) = struct
open Ctypes
open F
open Win_types
module Kernel32 = struct
let wide_char_to_multi_byte =
foreign "WideCharToMultiByte" (
UINT CodePage
DWORD dwFlags
LPCWCH lpWideCharStr
LPSTR lpMultiByteStr
)
end
module Shell32 = struct
... |
933874a9cf066238569937dde9485ea0c11cfeb2627c1b3eb30ce816f53aa510 | fission-codes/fission | Types.hs | module Fission.CLI.Parser.Config.IPFS.Types (Config (..)) where
import qualified Network.IPFS.BinPath.Types as IPFS
import qualified Network.IPFS.Timeout.Types as IPFS
import Fission.Prelude
data Config = Config
^ Path to the IPFS binary ( defaults to system )
^ IPFS timeout
} deriving (Show, Eq)
| null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-cli/library/Fission/CLI/Parser/Config/IPFS/Types.hs | haskell | module Fission.CLI.Parser.Config.IPFS.Types (Config (..)) where
import qualified Network.IPFS.BinPath.Types as IPFS
import qualified Network.IPFS.Timeout.Types as IPFS
import Fission.Prelude
data Config = Config
^ Path to the IPFS binary ( defaults to system )
^ IPFS timeout
} deriving (Show, Eq)
| |
4f822c99d3f61b59dbdde1b09ca1f482851e0bc79e6cf5bca203e7d83b9be020 | portkey-cloud/aws-clj-sdk | codecommit.clj | (ns portkey.aws.codecommit (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope
{:service "codecommit", :region "ap-northeast-1"},
:ssl-common-name "codecommit.ap-northeast-1.amazonaws.com",
:endpoint "-northeast-1.amazonaws.com",
:signature-version :v4},
"eu-west-1"
... | null | https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/codecommit.clj | clojure | (ns portkey.aws.codecommit (:require [portkey.aws]))
(def
endpoints
'{"ap-northeast-1"
{:credential-scope
{:service "codecommit", :region "ap-northeast-1"},
:ssl-common-name "codecommit.ap-northeast-1.amazonaws.com",
:endpoint "-northeast-1.amazonaws.com",
:signature-version :v4},
"eu-west-1"
... | |
38d7984d7c8ca466f607e95248e00f2207ec4ac3d6a6da8bea043c7d1ed9c9f8 | YoshikuniJujo/test_haskell | Device.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE MonoLocalBinds #
# LANGUAGE PatternSynonyms #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Device (
D, create, M.CreateInfo(..), M.QueueCreateInfo(..), M.CreateFlags,
getQueue,
waitIdle
) where
import Foreign.Storable.PeekPoke
import Foreign.Storable.HeteroList... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/fa60580c77c26494bf3a8ee2606e4cf5fd282b82/themes/gui/vulkan/try-my-vulkan-snd/src/Gpu/Vulkan/Device.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE MonoLocalBinds #
# LANGUAGE PatternSynonyms #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Device (
D, create, M.CreateInfo(..), M.QueueCreateInfo(..), M.CreateFlags,
getQueue,
waitIdle
) where
import Foreign.Storable.PeekPoke
import Foreign.Storable.HeteroList
import Control.Exception
im... |
14e596dfe76a54c82ca890d51117870903208c5ea619faf170812c98814d7731 | dhleong/spade | demo.cljs | (ns spade.demo
(:require [clojure.string :as str]
[reagent.dom :as rdom]
[spade.core :refer [defclass defattrs defglobal defkeyframes]]
[spade.react :as spade]))
(defkeyframes anim-frames []
["0%" {:opacity 0}]
["100%" {:opacity 1}])
(defkeyframes parameterized-anim-frames [s... | null | https://raw.githubusercontent.com/dhleong/spade/d77c2adcf451aa9c0b55bd0a835d53f95c7becf4/dev/spade/demo.cljs | clojure | (ns spade.demo
(:require [clojure.string :as str]
[reagent.dom :as rdom]
[spade.core :refer [defclass defattrs defglobal defkeyframes]]
[spade.react :as spade]))
(defkeyframes anim-frames []
["0%" {:opacity 0}]
["100%" {:opacity 1}])
(defkeyframes parameterized-anim-frames [s... | |
d322947801cc5885be781d0e389ec749aa2f21465f888b8109742ec8f8f653c0 | bravit/hid-examples | BenchBuildIPGroups.hs | module BenchBuildIPGroups where
import Criterion.Main
import NFUtils ()
import ParseIP
bench_buildIP :: [Benchmark]
bench_buildIP = [
bgroup "buildIP" [
let theip = [17,0,32,2] in
bgroup "single" [
bench "default" $ nf buildIP theip
, bench "foldr" $ nf buildIP_foldr theip
, bench... | null | https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/benchmarks/iplookup/BenchBuildIPGroups.hs | haskell | module BenchBuildIPGroups where
import Criterion.Main
import NFUtils ()
import ParseIP
bench_buildIP :: [Benchmark]
bench_buildIP = [
bgroup "buildIP" [
let theip = [17,0,32,2] in
bgroup "single" [
bench "default" $ nf buildIP theip
, bench "foldr" $ nf buildIP_foldr theip
, bench... | |
47ca551dd14eb1df20654fbf676049bb6787c45cd12301a74fa7f7402579bed8 | hopv/MoCHi | typConst.ml | open Util
open Combinator
(** Type constants *)
* { 6 Constructors }
type t =
(* base types *)
| Unit
| Bool
| Int
| Real
| String
| Ext of string (* external types *)
| Bot
| Top
| Unknown
(* composed types *)
| Arrow
| List
(* intersection and union types *)
| Inter of int
| Union o... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/typConst.ml | ocaml | * Type constants
base types
external types
composed types
intersection and union types
refinement types
of t * Idnt.t * Formulat.t
abstraction types
of t * Idnt.t * Formulat.t
@todo
@todo? | open Util
open Combinator
* { 6 Constructors }
type t =
| Unit
| Bool
| Int
| Real
| String
| Bot
| Top
| Unknown
| Arrow
| List
| Inter of int
| Union of int
* { 6 Inspectors }
let arity_of = function
| Unit | Bool | Int | Real | String -> 0
| Bot | Top -> 0
| Unknown -> 0
| Arrow... |
f16f82c396e1f36aadbadffafdddeedbabfaa78393fb6ccd78bdbf10ac0d6e39 | pink-gorilla/webly | dialog.cljs | (ns frontend.dialog
(:require-macros [reagent.ratom :refer [reaction]])
(:require
[re-frame.core :refer [reg-sub-raw reg-event-db dispatch subscribe]]))
; stolen from:
; -frame-modal
; todo: incorporate this
; -tim.com/learning-lab/tailwind-starter-kit/documentation/vue/modals/small
(reg-event-db
:modal/open... | null | https://raw.githubusercontent.com/pink-gorilla/webly/fcc124b1ad92849d783d7d71b064d0009223d6a6/frontend/src/frontend/dialog.cljs | clojure | stolen from:
-frame-modal
todo: incorporate this
-tim.com/learning-lab/tailwind-starter-kit/documentation/vue/modals/small
optionally dispatch on close reframe event | (ns frontend.dialog
(:require-macros [reagent.ratom :refer [reaction]])
(:require
[re-frame.core :refer [reg-sub-raw reg-event-db dispatch subscribe]]))
(reg-event-db
:modal/open
(fn [db [_ child size close]]
(assoc-in db [:modal]
{:show? true
:child child
:size (... |
c6e6699dd46070dda8122417d62a15cf3bdbb8e6d1c0dd6815bc2c43f7bee776 | elastic/eui-cljs | take_mounted_snapshot.cljs | (ns eui.test.take-mounted-snapshot
(:require ["@elastic/eui/lib/test/take_mounted_snapshot.js" :as eui]))
(def takeMountedSnapshot eui/takeMountedSnapshot)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/test/take_mounted_snapshot.cljs | clojure | (ns eui.test.take-mounted-snapshot
(:require ["@elastic/eui/lib/test/take_mounted_snapshot.js" :as eui]))
(def takeMountedSnapshot eui/takeMountedSnapshot)
| |
789c402834a1ecc85cf594b82b8bce4557e6e4effdd3b9274027b4c4403ec84d | russ/openpoker | betting.erl | Copyright ( C ) 2005 - 2008 Wager Labs , SA
%%%%
%%%% THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
CREATIVE COMMONS PUBLIC LICENSE ( " CCPL " OR " LICENSE " ) . THE WORK IS
%%%% PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF
%%%% THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICE... | null | https://raw.githubusercontent.com/russ/openpoker/62edd72a35b9ef52f55da9303cf1e06142e95895/src/betting.erl | erlang |
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF
THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT
LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT
AND AGREE TO BE BOUND BY THE TERM... | Copyright ( C ) 2005 - 2008 Wager Labs , SA
CREATIVE COMMONS PUBLIC LICENSE ( " CCPL " OR " LICENSE " ) . THE WORK IS
-nc-sa/3.0/us/
-module(betting).
-export([start/3, betting/3]).
-include_lib("eunit/include/eunit.hrl").
-include("common.hrl").
-include("texas.hrl").
-include("pp.hrl").
-include("game.hrl")... |
dc8c22e173774fbe72e4d2083d1aeb6bc0c8ea68c49b8d4adb106c9e55c3632c | adrieng/pulsar | name.ml | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* This program is free software : you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation , either version 3 of the License , or ... | null | https://raw.githubusercontent.com/adrieng/pulsar/c3901388659d9c7978b04dce0815e3ff9aea1a0c/pulsar-lib/name.ml | ocaml | * Module name.
* Top-level declaration name.
* Fully qualified name. | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* This program is free software : you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation , either version 3 of the License , or ... |
03e2085e162725c85bea2870769e9b46c68179de7d399ef65da52e4fba862e28 | robert-strandh/Climacs | prolog2paiprolog.lisp | ;;; -*- Mode: Lisp; Package: CLIMACS-PROLOG-SYNTAX -*-
( c ) copyright 2005 by
( )
;;; This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version 2 of the Licens... | null | https://raw.githubusercontent.com/robert-strandh/Climacs/68ccba6a2a9cc78c1a84f1698c31c78a215f3d90/Syntax/Prolog/prolog2paiprolog.lisp | lisp | -*- Mode: Lisp; Package: CLIMACS-PROLOG-SYNTAX -*-
This library is free software; you can redistribute it and/or
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
... |
( c ) copyright 2005 by
( )
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public License for more details .
You should have received a copy of the GNU Library General Public
Free Software Fou... |
f26bfceed444349b9bfe4c21b0d736149213d4c8afbfdcf2c17d93a50c66fb5f | osfameron/words | expression.hs | data Expression = Number Int
| Add Expression Expression
| Subtract Expression Expression
deriving (Eq, Ord, Show)
calculate :: Expression -> Int
calculate (Number x) = x
calculate (Add x y) = (calculate x) + (calculate y)
calculate (Subtract x y) = (calculate x) - (calc... | null | https://raw.githubusercontent.com/osfameron/words/2afc9513b75ef713083627d8e7102650f028a99f/s2/expression.hs | haskell | data Expression = Number Int
| Add Expression Expression
| Subtract Expression Expression
deriving (Eq, Ord, Show)
calculate :: Expression -> Int
calculate (Number x) = x
calculate (Add x y) = (calculate x) + (calculate y)
calculate (Subtract x y) = (calculate x) - (calc... | |
49d279c70b9e46a01da763283c1813258badf03ea1ce883d9e398f76bcbc6aa4 | hidaris/thinking-dumps | parser.rkt | #lang typed/racket
(require "ast.rkt")
(provide parse)
;; easy version
(: string->sexp (-> String Any))
(define (string->sexp s)
(read (open-input-string s)))
(: parse-bool (-> Any BoolExp))
(define (parse-bool sexp)
(match sexp
[`(zero? ,n)
(IsZero (parse-sexp n))]
[_ (error 'parse
"b... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-14/parser.rkt | racket | easy version | #lang typed/racket
(require "ast.rkt")
(provide parse)
(: string->sexp (-> String Any))
(define (string->sexp s)
(read (open-input-string s)))
(: parse-bool (-> Any BoolExp))
(define (parse-bool sexp)
(match sexp
[`(zero? ,n)
(IsZero (parse-sexp n))]
[_ (error 'parse
"bool exression ex... |
3b19452512d415bc9b3779e97a2bca204e98ccf8669694e27321b37b82a7732c | bragful/ephp | ephp_stack.erl | -module(ephp_stack).
-author('').
-compile([{no_auto_import, [get/1]}]).
-behaviour(gen_server).
-include("ephp.hrl").
-export([start_link/0, destroy/0, get/0, get_array/0, get_array/1, push/6, pop/0]).
-export([init/1, handle_cast/2, handle_call/3, handle_info/2, code_change/3,
terminate/2]).
start_link... | null | https://raw.githubusercontent.com/bragful/ephp/119f1760a5cdf4c8b6a01739e852c7183af7acff/src/ephp_stack.erl | erlang | FIXME: generate this information under a supervisor with
the context.
gen_server callbacks
TODO: use filtering tables for tracing, implement ephp_tracer.
internal functions | -module(ephp_stack).
-author('').
-compile([{no_auto_import, [get/1]}]).
-behaviour(gen_server).
-include("ephp.hrl").
-export([start_link/0, destroy/0, get/0, get_array/0, get_array/1, push/6, pop/0]).
-export([init/1, handle_cast/2, handle_call/3, handle_info/2, code_change/3,
terminate/2]).
start_link... |
1be0e35d0027bfad48a9fc51bb74299e274a330a14e9a7ce85e65a5796b00dfd | backtracking/combine | matrix.mli |
type 'a matrix = 'a array array
val copy: 'a matrix -> 'a matrix
| null | https://raw.githubusercontent.com/backtracking/combine/d2d9276c99f6d09662900c348f062c618a1b4c95/src/lib/matrix.mli | ocaml |
type 'a matrix = 'a array array
val copy: 'a matrix -> 'a matrix
| |
e9132bfc84ac4bf8089ad15b41b6b0fa7379ed0f3c2a46352d0427bbadd4aae1 | tonyday567/mvc-todo | Arbitrary.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - type - defaults #
# OPTIONS_GHC -fno - warn - orphans #
module Todo.Arbitrary where
import Todo.Model
import Protolude hiding (Show(..), show)
import Control.Applicat... | null | https://raw.githubusercontent.com/tonyday567/mvc-todo/13b2e52f1169c77caf528d3ce74901ad6f06eec6/src/Todo/Arbitrary.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - type - defaults #
# OPTIONS_GHC -fno - warn - orphans #
module Todo.Arbitrary where
import Todo.Model
import Protolude hiding (Show(..), show)
import Control.Applicative
import Control.Monad
... |
d264cb94715ff2d65fa98b62932fe5fb98ab1a6eee28984e16bf3a1bc2a2872d | iand675/hs-opentelemetry | TraceState.hs | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
|
Module : OpenTelemetry . Trace . TraceState
Copyright : ( c ) , 2021
License : BSD-3
Description : W3C - compliant way to ... | null | https://raw.githubusercontent.com/iand675/hs-opentelemetry/1f0328eb59fec2a97aec7ef98fe4f1e0d5c8f2ac/api/src/OpenTelemetry/Trace/TraceState.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
| Remove a key-value pair for the given key.
O(n)
|
|
Module : OpenTelemetry . Trace . TraceState
Copyright : ( c ) , 2021
License : BSD-3
Description : W3C - compliant way to provide additional vendor - specific trace identification information across different distributed tracing systems
Maintainer :
Stability : ... |
e413993544dc77a4a1dacb53ea1d5da658eb1d9a96c91a01cde132f25c14cd52 | ocaml-flambda/flambda-backend | compiler_hooks.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/5efd9f1c6fa45fc85be47c668ed90d2aa95d5d74/driver/compiler_hooks.mli | ocaml | ************************************************************************
OCaml
... | Copyright 2021 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Compile_common
Hooks allow to inspect the IR produced by a pass without altering
the compilation pipeline .
Hooks are allowed to inspect the ... |
dcdeb805f8ce801fcb389ad16d5bc738c3dfc8efcfbd47ea860c900afbf164e1 | huangjs/cl | browse-demo.lisp | Simple demo of MOP browsing using a toy memory .
;;;
;;; Load this file then call
;;;
;;; > (browse 'causal-1)
;;;
;;; Double-click items in the browser window that appears
;;; to browse those items.
;;;
;;; Note: if you want to add anything to memory,
;;; you need to be in the CLYDE-MEMORY package.
;;;... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cs325/www.cs.northwestern.edu/academics/courses/325/programs/browse-demo.lisp | lisp |
Load this file then call
> (browse 'causal-1)
Double-click items in the browser window that appears
to browse those items.
Note: if you want to add anything to memory,
you need to be in the CLYDE-MEMORY package.
MODULES
-------
PACKAGES
--------
| Simple demo of MOP browsing using a toy memory .
(eval-when (:compile-toplevel :load-toplevel :execute)
(require "clyde")
(require "mop-browser")
)
(in-package "CL-USER")
(eval-when (:compile-toplevel :load-toplevel :execute)
(use-package "CLYDE-MEMORY")
(use-package "MOP-BROWSER")
) |
5a7cf312389e97bf85da29d73d0280d43200504a95b266ed503a94508901e047 | fxfactorial/bs-web3 | types.ml | class type ['provider_impl] _module = object
method set_provider : unit -> unit [@@bs.set]
end [@bs]
type t
class type bzz = object
inherit [t] _module
end [@bs]
class type eth = object
inherit [t] _module
end [@bs]
type request = < > Js.t
(* class type batch = object
*
* end [@bs] *)
type batch =
<a... | null | https://raw.githubusercontent.com/fxfactorial/bs-web3/816c42923cc8f82a5341a99c4b3ff8602ede5029/src/types.ml | ocaml | class type batch = object
*
* end [@bs] | class type ['provider_impl] _module = object
method set_provider : unit -> unit [@@bs.set]
end [@bs]
type t
class type bzz = object
inherit [t] _module
end [@bs]
class type eth = object
inherit [t] _module
end [@bs]
type request = < > Js.t
type batch =
<add:request -> unit [@bs.meth];
execute:unit -> u... |
19b28083d81aa3b5dccca1791aa462956c7d4fdb0809fe21f0849c14cf85a281 | hanshuebner/bos | boi-handlers.lisp | (in-package :bos.web)
(enable-interpol-syntax)
(defclass boi-handler (page-handler)
())
(defmethod authorized-p ((handler boi-handler))
(bos.m2:editor-p (bknr-session-user)))
(defclass create-contract-handler (boi-handler)
())
(defun find-sponsor (sponsor-id)
(let ((sponsor (store-object-with-id (parse-int... | null | https://raw.githubusercontent.com/hanshuebner/bos/ab5944cc46f4a5ff5a08fd8aa4d228c0f9cfc771/web/boi-handlers.lisp | lisp | (in-package :bos.web)
(enable-interpol-syntax)
(defclass boi-handler (page-handler)
())
(defmethod authorized-p ((handler boi-handler))
(bos.m2:editor-p (bknr-session-user)))
(defclass create-contract-handler (boi-handler)
())
(defun find-sponsor (sponsor-id)
(let ((sponsor (store-object-with-id (parse-int... | |
5a91e3b118bf76ba149e43f47878cde58ab13a5803452e8c97f274041faa5fa8 | naxels/youtube-channel-data | url.clj | (ns youtube-channel-data.youtube.url
"Build Youtube Data API URL's"
(:require [youtube-channel-data.utils :as u]
[youtube-channel-data.youtube.config :as ytc]))
; Define url paths
(def base-url "")
; Use v3
(def sub-path "/youtube/v3/")
; Main API string builder closure
(defn api
"Returns fn with r... | null | https://raw.githubusercontent.com/naxels/youtube-channel-data/fd0534b26b9b131968332109fb94a35d53149d1f/src/youtube_channel_data/youtube/url.clj | clojure | Define url paths
Use v3
Main API string builder closure
Caller helper methods
| (ns youtube-channel-data.youtube.url
"Build Youtube Data API URL's"
(:require [youtube-channel-data.utils :as u]
[youtube-channel-data.youtube.config :as ytc]))
(def base-url "")
(def sub-path "/youtube/v3/")
(defn api
"Returns fn with route filled in.
Ultimately Returns https string encoded rea... |
2f63323ca732b9d58b01dfc72bdfd1e83c6d5414c3954a7de45721d0e1783739 | FlowForwarding/loom | tap_time.erl | %%------------------------------------------------------------------------------
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable la... | null | https://raw.githubusercontent.com/FlowForwarding/loom/86a9c5aa8b7d4776062365716c9a3dbbf3330bc5/tapestry/apps/tapestry/src/tap_time.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, eithe... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Infoblox Inc < >
2013 Infoblox Inc
-module(tap_time).
-export([now/0,
since/1,
diff/2,
diff_millis/2,
universal/1,
u... |
63a0749f63e4915a50e4c03142e05ac0b6fe2924719af2eac031f47bebe78a8a | magnetcoop/hydrogen-ce | user.clj | 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 user)
(defn dev
"Load and switch to the 'dev' namespace."
[]
(require 'dev)
(in-ns 'dev)
:loaded)
| null | https://raw.githubusercontent.com/magnetcoop/hydrogen-ce/83450437eaeaaa47171e4de152b2951d32cf2c7a/dev/src/user.clj | clojure | file, You can obtain one at / | 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
(ns user)
(defn dev
"Load and switch to the 'dev' namespace."
[]
(require 'dev)
(in-ns 'dev)
:loaded)
|
d09c78122fb7671b35df0e747909f9c3fddca9a4a13adbee43d88ecfa01d4994 | sfrank/minheap | violation-heap-test.lisp | (defpackage :heap-violation-test (:use :CL :violation-heap :lisp-unit))
(in-package :heap-violation-test)
(define-test test-basic
(let ((heap (make-instance 'violation-heap))
(htable (make-hash-table :test #'eql)))
(assert-true (empty-p heap))
(assert-eql 0 (heap-size heap))
(dotimes (i 100)
... | null | https://raw.githubusercontent.com/sfrank/minheap/51cc9edcbbe13d9132fe12b0b197848f31513232/test/violation-heap-test.lisp | lisp | (defpackage :heap-violation-test (:use :CL :violation-heap :lisp-unit))
(in-package :heap-violation-test)
(define-test test-basic
(let ((heap (make-instance 'violation-heap))
(htable (make-hash-table :test #'eql)))
(assert-true (empty-p heap))
(assert-eql 0 (heap-size heap))
(dotimes (i 100)
... | |
97d413792346c571507d8b59526e8a803ef33a780e210fc98d6c1e79674d94c7 | kana/sicp | ex-4.45.scm | Exercise 4.45 . With the grammar given above , the following sentence can be
parsed in five different ways : ` ` The professor lectures to the student in
the class with the cat . '' Give the five parses and explain the differences
;;; in shades of meaning among them.
(load "./sec-4.3.2.scm")
(load "./sec-4.3.3... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-4.45.scm | scheme | in shades of meaning among them.
Results are:
(sentence (simple-noun-phrase (article the) (noun professor)) (verb-phrase (verb-phrase (verb-phrase (verb lectures) (prep-phrase (prep to) (simple-noun-phrase (article the) (noun student)))) (prep-phrase (prep in) (simple-noun-phrase (article the) (noun class)))) (prep-... | Exercise 4.45 . With the grammar given above , the following sentence can be
parsed in five different ways : ` ` The professor lectures to the student in
the class with the cat . '' Give the five parses and explain the differences
(load "./sec-4.3.2.scm")
(load "./sec-4.3.3.scm")
(ambtest `(begin
... |
00a439660b5be42e6e0212c06ef08c78f751ba2699de049f301fbf48f9e5ea37 | liqula/react-hs | TodoViews.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUA... | null | https://raw.githubusercontent.com/liqula/react-hs/204c96ee3514b5ddec65378d37872266b05e8954/react-hs-examples/todo/src/TodoViews.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE EmptyDataDecls #
# LANGUAGE OverloadedStrings #
with the store and will be re-rendered whenever the store changes.
Note how we use an underscore to signal that this is directly a combinator that can be used
inside the rendering function.
| A view for each todo item. We specific... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE S... |
337d324b2c848f1e56811c466752d51bb3668d603a4d2f24e265ccddd0b2f7c5 | ghollisjr/cl-ana | convert-units.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the ... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/quantity/convert-units.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public Lice... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
... |
af6141e39aa465b1bbd7be77a0823a15c77e1bc602c566048c6ddca00725e1c1 | tomlokhorst/AwesomePrelude | Bool.hs | {-# LANGUAGE EmptyDataDecls #-}
module Generic.Data.Bool where
import Prelude ()
infixr 3 &&
infixr 2 ||
data Bool
class BoolC j where
false :: j Bool
true :: j Bool
bool :: j a -> j a -> j Bool -> j a
if' :: BoolC j => j Bool -> j a -> j a -> j a
if' b x y = bool y x b
(&&) :: BoolC j => j Bool -> j Bo... | null | https://raw.githubusercontent.com/tomlokhorst/AwesomePrelude/c06fc73e1489aecdd3556b0395d427065245efee/src/Generic/Data/Bool.hs | haskell | # LANGUAGE EmptyDataDecls # |
module Generic.Data.Bool where
import Prelude ()
infixr 3 &&
infixr 2 ||
data Bool
class BoolC j where
false :: j Bool
true :: j Bool
bool :: j a -> j a -> j Bool -> j a
if' :: BoolC j => j Bool -> j a -> j a -> j a
if' b x y = bool y x b
(&&) :: BoolC j => j Bool -> j Bool -> j Bool
x && y = bool false... |
65cadcc78b376e4157823c1900b54038d25e220a15763f9e1fae3d5b2c56403e | MattWindsor91/travesty | mappable.ml | This file is part of ' travesty ' .
Copyright ( c ) 2018 by
Permission is hereby granted , free of charge , to any person obtaining a
copy of this software and associated documentation files ( the " Software " ) ,
to deal in the Software without restriction , including without limitation
... | null | https://raw.githubusercontent.com/MattWindsor91/travesty/3f4da33830cc928ad879077e690277088de1f836/src/mappable.ml | ocaml | This file is part of ' travesty ' .
Copyright ( c ) 2018 by
Permission is hereby granted , free of charge , to any person obtaining a
copy of this software and associated documentation files ( the " Software " ) ,
to deal in the Software without restriction , including without limitation
... | |
5965582dab1395c6080acd4f9f445c95fdb3ee17c63a6ceacfad5b63013a46fd | dfinity-side-projects/winter | Winter.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
| This is a parser for Wast scripts , used by the WebAssembly specification .
module Wasm.Text.Winter where
import Control.Monad.Except
import Control.M... | null | https://raw.githubusercontent.com/dfinity-side-projects/winter/cca827ab9299146c0b3b51920e5ad63c4c6014c3/src/Wasm/Text/Winter.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
| This is a parser for Wast scripts , used by the WebAssembly specification .
module Wasm.Text.Winter where
import Control.Monad.Except
import Control.M... | |
d3daf6ec0523b7f090800f2aa0e8d0e9f60dc9d4eb72af761cc63fff9954cb0c | racket/racket7 | reader.rkt | #lang racket/base
(require racket/contract
racket/list
racket/match
"structures.rkt")
(provide/contract
[read-xml (() (input-port?) . ->* . document?)]
[read-xml/document (() (input-port?) . ->* . document?)]
[read-xml/element (() (input-port?) . ->* . element?)]
[xml-count-bytes (parame... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/xml/private/reader.rkt | racket | Start-tag ::= (make-start-tag Location Location Symbol (listof Attribute))
End-tag ::= (make-end-tag Location Location Symbol)
Token ::= Contents | Start-tag | End-tag | Eof
read-xml : [Input-port] -> Document
read-xml : [Input-port] -> Document
read-xml/element : [Input-port] -> Element
XXX Some data structures... | #lang racket/base
(require racket/contract
racket/list
racket/match
"structures.rkt")
(provide/contract
[read-xml (() (input-port?) . ->* . document?)]
[read-xml/document (() (input-port?) . ->* . document?)]
[read-xml/element (() (input-port?) . ->* . element?)]
[xml-count-bytes (parame... |
677f5c98057da7ecfa892683b72aff4c9e660e822abda5cdbf187a1b6d458b51 | bmeurer/ocamljit2 | syntax.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/tool-lexyacc/syntax.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
type location =
Location ... |
01b38baf55c865517dbef6a2d7513fcf7d2f79db419b64b82b255e375a057c40 | lspitzner/brittany | Decl.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Language.Haskell.Brittany.Internal.Layouters.Decl where
import qualified Data.Data
import qualified Data.Foldable
import qualified Data.Maybe
import qualified Data.Semigroup as Semigroup
import... | null | https://raw.githubusercontent.com/lspitzner/brittany/7399b7538835411727e025e1480ea96b5496416c/source/library/Language/Haskell/Brittany/Internal/Layouters/Decl.hs | haskell | # SOURCE #
# SOURCE #
------------------------------------------------------------------------------
Sig
------------------------------------------------------------------------------
in fact the default
------------------------------------------------------------------------------
-----------------------------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Language.Haskell.Brittany.Internal.Layouters.Decl where
import qualified Data.Data
import qualified Data.Foldable
import qualified Data.Maybe
import qualified Data.Semigroup as Semigroup
import... |
5bece90416886fdcf33215a29c385fd72541c29a102521d09ca30b0ca0155456 | haskell-repa/repa | Combine.hs |
module Data.Array.Repa.Stream.Combine
( combine2
, combineSegs2 )
where
import Data.Array.Repa.Stream.Base
import Prelude hiding (map, zipWith)
| Combine two streams , using a tag stream to tell us which of the data
-- streams to take the next element from.
--
-- If there are insufficient elem... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-stream/Data/Array/Repa/Stream/Combine.hs | haskell | streams to take the next element from.
If there are insufficient elements in the data streams for the provided
tag stream then `error`.
@
combine2 [F T T F F T] [1 2 3] [4 5 6]
@
# INLINE [1] combine2 #
| Segmented Stream combine. Like `combine2ByTag`, except that the tags select
@
combineSegs2
... |
module Data.Array.Repa.Stream.Combine
( combine2
, combineSegs2 )
where
import Data.Array.Repa.Stream.Base
import Prelude hiding (map, zipWith)
| Combine two streams , using a tag stream to tell us which of the data
= [ 1 4 5 2 3 6 ]
combine2 :: Stream Bool -> Stream a -> Stream a -> Stream a
c... |
41a90f762b7dd03f4cce5af9a100921d38c1d22297299d18d01374dff95ff394 | vernemq/vmq-discovery | vmq_discovery_sup.erl | Copyright 2018 Octavo Labs AG Zurich 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... | null | https://raw.githubusercontent.com/vernemq/vmq-discovery/6d25de3c0923c49bf6704543f537b1da56e8588d/src/vmq_discovery_sup.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 2018 Octavo Labs AG Zurich Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_discovery_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MOD... |
b533e1068769042406e5133a792def13fd7b81b87b7f5dfd3fb416bc97d79c90 | disteph/cdsat | interfaces_basic.ml | (******************************************************************)
(* This file contains basic module types that specify how the kernel
interacts with the other components of Psyche *)
(******************************************************************)
Generic interface for printable hashed types
module type PH ... | null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/kernel.mld/top.mld/interfaces_basic.ml | ocaml | ****************************************************************
This file contains basic module types that specify how the kernel
interacts with the other components of Psyche
****************************************************************
Type of Monads |
Generic interface for printable hashed types
module type PH = sig
type t [@@deriving eq,ord,show,hash]
end
Generic interface for printable hconsed types
module type PHCons = sig
include PH
val id: t -> int
val clear: unit->unit
end
Collection Interface that Theory needs to provide for
module type C... |
2ac7294231f86d62902231fb4a955e02d58b241ef113d7ff42746ad1bae081b6 | nibbula/yew | package.lisp | ;;;
package.lisp - Package definition for UNICODE .
;;;
(defpackage :unicode
(:documentation "Package definition for UNICODE.")
(:use :cl :dlib)
(:export
;; char-width
#:char-grid-width
;; utf8
#:get-utf8-char #:%get-utf8-char
#:length-in-utf8-bytes
#:put-utf8-char #:%put-utf8-char
#:strin... | null | https://raw.githubusercontent.com/nibbula/yew/e7fbc900e92b1295c4ee640e89ed8c4a60a4b84f/unicode/package.lisp | lisp |
char-width
utf8
utf8b
encoding construction
End | package.lisp - Package definition for UNICODE .
(defpackage :unicode
(:documentation "Package definition for UNICODE.")
(:use :cl :dlib)
(:export
#:char-grid-width
#:get-utf8-char #:%get-utf8-char
#:length-in-utf8-bytes
#:put-utf8-char #:%put-utf8-char
#:string-to-utf8-bytes
#:utf8-bytes-to-s... |
0c37dcc0934f08805b6523a4b139420657e63698a94c2f0e57cb6a6ab8134a3d | amnh/poy5 | gz.mli | (** Zlib interface *)
(** The module [Gz] redefines most of the I/O functions of
[Pervasives] to allow I/O on compressed files (using the
[zlib] library). It doesn't use [zlib] lower-level
functions, so there might be some way to write a more efficient
interface ; this one is however, very small (and didn'... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/gz-0.5.7/gz.mli | ocaml | * Zlib interface
* The module [Gz] redefines most of the I/O functions of
[Pervasives] to allow I/O on compressed files (using the
[zlib] library). It doesn't use [zlib] lower-level
functions, so there might be some way to write a more efficient
interface ; this one is however, very small (and didn't take ... |
* { 2 Datatypes & exceptions }
type in_channel
type out_channel
exception Error of string
val version : string
* { 2 Output funcions }
type zstrategy = | Default | Filtered | Huffman_only
* [ open_out ] opens the given filename for writing .
@param compression specifies the level of compression : 0
... |
e8877ad70a3f3f037c55e41ccfd5f5a9ed7a11cc1d01a8903a1ae5b41f2e8790 | csabahruska/jhc-components | Infix.hs | module FrontEnd.Infix (
buildFixityMap, infixHsModule, FixityMap,size,
infixStatement, restrictFixityMap, dumpFixityMap) where
import Data.Binary
import Data.Monoid
import qualified Data.Map as Map
import FrontEnd.HsSyn
import FrontEnd.Lex.ParseMonad
import FrontEnd.SrcLoc
import FrontEnd.Syn.Traverse
import ... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-frontend/src/FrontEnd/Infix.hs | haskell | make_key a_name = case a_name of
(Qual a_module name) -> (a_module, name)
TODO: interactive | module FrontEnd.Infix (
buildFixityMap, infixHsModule, FixityMap,size,
infixStatement, restrictFixityMap, dumpFixityMap) where
import Data.Binary
import Data.Monoid
import qualified Data.Map as Map
import FrontEnd.HsSyn
import FrontEnd.Lex.ParseMonad
import FrontEnd.SrcLoc
import FrontEnd.Syn.Traverse
import ... |
5f798bf64d177f412a548df50f70eac0bcef786432cc66fee348474e63405de6 | ahf/ircd-scylla | log.ml |
* Copyright ( c ) 2015 . All rights reserved .
* Use of this source code is governed by a BSD - style
* license that can be found in the LICENSE file .
* Copyright (c) 2015 Alexander Færøy. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICE... | null | https://raw.githubusercontent.com/ahf/ircd-scylla/d06bfa61cd75a44c4f5493f316fba23143c32a78/log.ml | ocaml |
* Copyright ( c ) 2015 . All rights reserved .
* Use of this source code is governed by a BSD - style
* license that can be found in the LICENSE file .
* Copyright (c) 2015 Alexander Færøy. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICE... | |
50109cf603e3986ccf7cbbef816c40d7287d44b9b8af1793914e1402525a5a44 | racket/gui | init.rkt | #lang racket/base
(require ffi/unsafe
"utils.rkt"
"types.rkt"
"queue.rkt")
(define-gtk gtk_rc_parse_string (_fun _string -> _void))
(define-gtk gtk_rc_add_default_file (_fun _path -> _void))
(when (eq? 'windows (system-type))
(let ([dir (simplify-path (build-path (collection-path "racket"... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/gtk/init.rkt | racket | #lang racket/base
(require ffi/unsafe
"utils.rkt"
"types.rkt"
"queue.rkt")
(define-gtk gtk_rc_parse_string (_fun _string -> _void))
(define-gtk gtk_rc_add_default_file (_fun _path -> _void))
(when (eq? 'windows (system-type))
(let ([dir (simplify-path (build-path (collection-path "racket"... | |
945a8fa0c8a6f37b699cbab39df04e50f0624bede60cc09e0aaeccd56cf725c5 | fulcrologic/fulcro | server_render.cljc | (ns com.fulcrologic.fulcro.algorithms.server-render
(:require
[com.fulcrologic.fulcro.algorithms.transit :as transit]
[com.fulcrologic.fulcro.algorithms.merge :as merge]
[com.fulcrologic.fulcro.algorithms.normalize :refer [tree->db]]
[com.fulcrologic.fulcro.algorithms.do-not-use :refer [base64-encode ... | null | https://raw.githubusercontent.com/fulcrologic/fulcro/71ed79c650222567ac4a566513365a95f12657e3/src/main/com/fulcrologic/fulcro/algorithms/server_render.cljc | clojure | (ns com.fulcrologic.fulcro.algorithms.server-render
(:require
[com.fulcrologic.fulcro.algorithms.transit :as transit]
[com.fulcrologic.fulcro.algorithms.merge :as merge]
[com.fulcrologic.fulcro.algorithms.normalize :refer [tree->db]]
[com.fulcrologic.fulcro.algorithms.do-not-use :refer [base64-encode ... | |
663028a40363f4454b9f562f2c74fe5e3926fe6e78ea9ea34874ff2b7a1439b4 | dsorokin/aivika | Specs.hs |
-- |
-- Module : Simulation.Aivika.Specs
Copyright : Copyright ( c ) 2009 - 2017 , < >
-- License : BSD3
Maintainer : < >
-- Stability : experimental
Tested with : GHC 8.0.1
--
-- It defines the simulation specs and functions for this data type.
module Simulation.Aivika.Specs
(-- * Simulat... | null | https://raw.githubusercontent.com/dsorokin/aivika/7a14f460ab114b0f8cdfcd05d5cc889fdc2db0a4/Simulation/Aivika/Specs.hs | haskell | |
Module : Simulation.Aivika.Specs
License : BSD3
Stability : experimental
It defines the simulation specs and functions for this data type.
* Simulation Specs
* Auxiliary Functions |
Copyright : Copyright ( c ) 2009 - 2017 , < >
Maintainer : < >
Tested with : GHC 8.0.1
module Simulation.Aivika.Specs
Specs(..),
Method(..),
basicTime,
integIterationBnds,
integIterationHiBnd,
integIterationLoBnd,
integPhaseBnds,
integPhaseH... |
536ca1b2b4732eb03b961a46627d45f666e14f85653efbca7acff096f9f55e46 | static-analysis-engineering/codehawk | jCHSimplify.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchlib/jCHSimplify.mli | ocaml | jchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... |
fb52c6bbdcd24a3c1f240dde79a91f721c9d15e24eba0d90e6ba0bd1596643cf | layerware/pgqueue | core.clj | (ns pgqueue.core
(:refer-clojure :exclude [take count])
(:require [clojure.string :as string]
[clojure.java.jdbc :as jdbc]
[pgqueue.serializer.protocol :as s]
[pgqueue.serializer.nippy :as nippy-serializer]))
(defrecord PGQueue [name config])
(defrecord PGQueueItem [queue id nam... | null | https://raw.githubusercontent.com/layerware/pgqueue/2af3f578338d25332e48ee30d9aea2c83eaf05c8/src/pgqueue/core.clj | clojure | worker threads sharing a queue can take multiple
items across a postgresql session. Postgresql's
advisory locks handle locking for separate processes.
We also want to execute unlocks on the same connection
a lock was made (if that connection is still open), so
we store the db connection used for each lock
Each ... | (ns pgqueue.core
(:refer-clojure :exclude [take count])
(:require [clojure.string :as string]
[clojure.java.jdbc :as jdbc]
[pgqueue.serializer.protocol :as s]
[pgqueue.serializer.nippy :as nippy-serializer]))
(defrecord PGQueue [name config])
(defrecord PGQueueItem [queue id nam... |
d38d09cdee25d3a5618ed61ef34d9334845e111d1a5e2ea019d02c328fa73ab3 | weavejester/crypto-equality | project.clj | (defproject crypto-equality "1.0.1"
:description "Securely check equality of strings or byte sequences"
:url "-equality"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]]
:aliases {"test-all" ["with-profile" "default:+1.8:+1.9:+1.10" "test"]}
... | null | https://raw.githubusercontent.com/weavejester/crypto-equality/e62f63882c9d25694ba8c53ed6b108b2813175ea/project.clj | clojure | (defproject crypto-equality "1.0.1"
:description "Securely check equality of strings or byte sequences"
:url "-equality"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]]
:aliases {"test-all" ["with-profile" "default:+1.8:+1.9:+1.10" "test"]}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.