_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 |
|---|---|---|---|---|---|---|---|---|
abeced27eb139b175081b6c3de17ba4b630f8e1a6422c272ffe9294041af1f01 | penpot/penpot | cache.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.util.cache
(:require
[app.util.time :as dt]
[beicon.core :as rx]))
(defonce cache (atom {}))
... | null | https://raw.githubusercontent.com/penpot/penpot/36d2f72768e3c4bcc9257baf30e9c1c36aefd5d8/frontend/src/app/util/cache.cljs | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.util.cache
(:require
[app.util.time :as dt]
[beicon.core :as rx]))
(defonce cache (atom {}))
(defonce pending (atom {}))
(def... |
3616dd1bb6720a3467f4c2aad561fc4f7c7d0b16792c65a13f7312dfc69cdebd | yogthos/yuggoth | comments.clj | (ns yuggoth.routes.services.comments
(:require [yuggoth.db.core :as db]
[noir.session :as session]
[noir.response :refer [content-type]]
[hiccup.util :refer [escape-html]]
[yuggoth.config :refer [text]]
[yuggoth.util :refer [gen-captcha format-time]])
(:im... | null | https://raw.githubusercontent.com/yogthos/yuggoth/901541c5809fb1e77c249f26a3aa5df894c88242/src/yuggoth/routes/services/comments.clj | clojure | (ns yuggoth.routes.services.comments
(:require [yuggoth.db.core :as db]
[noir.session :as session]
[noir.response :refer [content-type]]
[hiccup.util :refer [escape-html]]
[yuggoth.config :refer [text]]
[yuggoth.util :refer [gen-captcha format-time]])
(:im... | |
3fbcc560e31fe13b950d861003066987b715e5e1a5f49c63543827e5fdf72274 | logseq/logseq | thingatpt.cljs | (ns ^:no-doc frontend.util.thingatpt
(:require [clojure.string :as string]
[frontend.state :as state]
[frontend.util.cursor :as cursor]
[frontend.config :as config]
[logseq.graph-parser.text :as text]
[logseq.graph-parser.property :as gp-property]
... | null | https://raw.githubusercontent.com/logseq/logseq/9c7b4ea2016fb28b16ee42a7136c73dd52d8ce4b/src/main/frontend/util/thingatpt.cljs | clojure | (ns ^:no-doc frontend.util.thingatpt
(:require [clojure.string :as string]
[frontend.state :as state]
[frontend.util.cursor :as cursor]
[frontend.config :as config]
[logseq.graph-parser.text :as text]
[logseq.graph-parser.property :as gp-property]
... | |
9e36a83a95cadd4bb9c6d8b1f8dd065d269b26447942d99efdb988306e8f35be | pouriya/cfg | cfg_keeper_env.erl | %%% ----------------------------------------------------------------------------
@author < >
%%% @hidden
%% -----------------------------------------------------------------------------
-module(cfg_keeper_env).
-behaviour(cfg_keeper).
-author('').
%% -----------------------------------------------------------------... | null | https://raw.githubusercontent.com/pouriya/cfg/b03eb73549e2fa11b88f91db73f700d7e6ef4617/src/keepers/cfg_keeper_env.erl | erlang | ----------------------------------------------------------------------------
@hidden
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Exports:
'cfg_keeper' callbacks:
---------------------------------------... | @author < >
-module(cfg_keeper_env).
-behaviour(cfg_keeper).
-author('').
-export(
[
config_init/1,
config_set/2,
config_set/3,
config_get/1,
config_get/2,
config_delete/2,
config_delete/1
]
).
config_init(App) when erlang:is_atom(App) ->
ok;
c... |
42fdffc4294b7bd19d94c0826f30a2d96c51018f3f2b4258dd8618331ece21e3 | 8c6794b6/guile-tjit | save-stack.scm | -*- mode : scheme ; coding : utf-8 ; -*-
Copyright ( C ) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2014
Free Software Foundation , Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
L... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/ice-9/save-stack.scm | scheme | coding : utf-8 ; -*-
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A P... |
Copyright ( C ) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2014
Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , F... |
2b72251fcc6b253209f2e7dd162a4f8e6f673f83f4bc006ca458d28cbf683002 | audreyt/openafp | CF.hs | module OpenAFP.Records.T.CF where
import OpenAFP.Types
import OpenAFP.Internals
data T_CF = T_CF {
t_cf_Type :: !N1
,t_cf :: !NStr
} deriving (Show, Typeable)
| null | https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/T/CF.hs | haskell | module OpenAFP.Records.T.CF where
import OpenAFP.Types
import OpenAFP.Internals
data T_CF = T_CF {
t_cf_Type :: !N1
,t_cf :: !NStr
} deriving (Show, Typeable)
| |
027d308ce81dbc2476b4200c6fc0b022d060390d1dcbadf895626388998fad53 | purescript/purescript | TH.hs | # LANGUAGE TemplateHaskell #
-- | This module implements an eDSL for compactly declaring pattern synonyms
representing known PureScript modules and their members .
--
The following example assumes this module is imported qualified as TH and
the BlockArguments extension is used , both of which I recommend .
--
>... | null | https://raw.githubusercontent.com/purescript/purescript/5f6a6659391563cdec3c41ac6a4b2ff5263d0f68/src/Language/PureScript/Constants/TH.hs | haskell | | This module implements an eDSL for compactly declaring pattern synonyms
> TH.asIdent do
> TH.var "someVariable"
> )
will become:
>
>
> pattern I_someVariable :: Qualified Ident
> pattern I_someVariable = Qualified (ByModuleName M_Data_Foo) (Ident "someVariable")
All pattern synonyms must st... | # LANGUAGE TemplateHaskell #
representing known PureScript modules and their members .
The following example assumes this module is imported qualified as TH and
the BlockArguments extension is used , both of which I recommend .
> $ ( TH.declare do
> " Data . Foo " do
> TH.ty " SomeType "
> patter... |
4ca0418f0b19de5d0b724b31b5dc079d383fc3d1e5a2e6447f39b73a5b8b59b5 | cucapra/gator | ops.ml | open CoreAst
open TypedAst
open TypedAstPrinter
open Assoc
open Lin_ops
open Glsl_ops
open Util
type ovalue = CoreValue of value | ArrValue of ovalue list
type sigma = ovalue Assoc.context
let rec string_of_ovalue (o : ovalue) =
match o with
| CoreValue v -> string_of_value v
| ArrValue v -> string_of_array str... | null | https://raw.githubusercontent.com/cucapra/gator/c9f796e3d47793f2a1fe11cd8319eae33c4dd354/src/ops.ml | ocaml | open CoreAst
open TypedAst
open TypedAstPrinter
open Assoc
open Lin_ops
open Glsl_ops
open Util
type ovalue = CoreValue of value | ArrValue of ovalue list
type sigma = ovalue Assoc.context
let rec string_of_ovalue (o : ovalue) =
match o with
| CoreValue v -> string_of_value v
| ArrValue v -> string_of_array str... | |
813df96d65b3363a4745347ed9e1a7f64cee600f712bb5a6fd4ef53e17b3415c | zotonic/zotonic | filter_sub_week.erl | @author < >
2010
@doc ' sub_week ' filter , subtract one or more weeks from a date
Copyright 2010
%%
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
%%
%... | null | https://raw.githubusercontent.com/zotonic/zotonic/4c158e4f7b80784058cabff186cfd7a3dcc7005a/apps/zotonic_mod_base/src/filters/filter_sub_week.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | @author < >
2010
@doc ' sub_week ' filter , subtract one or more weeks from a date
Copyright 2010
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(filter_sub_week).
-export([sub_week/2, sub_week/3]).
... |
b8fe60a9d58898dfe42cea1333e348a3fda58fdeed1d56ae9ce544f884bf921d | jeapostrophe/mode-lambda | info.rkt | #lang info
(define collection 'multi)
(define deps '("gui-lib"
"scheme-lib"
"web-server-lib"
"lux"
"reprovide-lang-lib"
"base" "srfi-lite-lib" "draw-lib" "opengl" "htdp-lib" "pict-lib" "draw-lib"))
(define build-deps '("draw-doc"
... | null | https://raw.githubusercontent.com/jeapostrophe/mode-lambda/64b5ae81f457ded7664458cd9935ce7d3ebfc449/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("gui-lib"
"scheme-lib"
"web-server-lib"
"lux"
"reprovide-lang-lib"
"base" "srfi-lite-lib" "draw-lib" "opengl" "htdp-lib" "pict-lib" "draw-lib"))
(define build-deps '("draw-doc"
... | |
4d66140c91239abc39c25979465a12a6e1ecbdf0e085e32926851ac0da6da3ab | Janiczek/elmid | Setup.hs | import Distribution.Simple
main = defaultMain
| null | https://raw.githubusercontent.com/Janiczek/elmid/94cc4b3c990076a5725285796a2453e5b4f5ac63/Setup.hs | haskell | import Distribution.Simple
main = defaultMain
| |
71232e4a45861dc99534c38236953470ff2169f8e37d078032507f8ce776f1a5 | mzp/coq-ruby | genarg.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/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/interp/genarg.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
In globalize tactics, we need to ke... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : genarg.mli 11481 ... |
1c2b3598eee4cd858784d84ba1b0ae4a4fd583b7ca71e23fa08ee805a5835360 | kitnil/dotfiles | kodi.scm | (define-module (home services kodi)
#:use-module (gnu home services)
#:use-module (gnu home services shepherd)
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (gnu services)
#:use-module (home config)
#:export (home-kodi-service))
(define home-kodi-service
(simple-service 'kodi-config... | null | https://raw.githubusercontent.com/kitnil/dotfiles/354a101e7e2789ad37e8b0c9f4534e2a9fc55439/dotfiles/guixsd/modules/home/services/kodi.scm | scheme | (define-module (home services kodi)
#:use-module (gnu home services)
#:use-module (gnu home services shepherd)
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (gnu services)
#:use-module (home config)
#:export (home-kodi-service))
(define home-kodi-service
(simple-service 'kodi-config... | |
10b1c35c7758664c5c43165b1f1fab83a7267c419899dff8559ef30107eaa483 | qnikst/imagemagick | Types.hs | {-# OPTIONS -fno-warn-orphans #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Graphics.ImageMagick.MagickWand.Types
( PPixelIterator
, PPixelWand
, PPixelPacket
, PMagickPixe... | null | https://raw.githubusercontent.com/qnikst/imagemagick/bc9e7ac85749f42a87901b722c5d36a8bed07d5c/src/Graphics/ImageMagick/MagickWand/Types.hs | haskell | # OPTIONS -fno-warn-orphans #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE RankNTypes #
* support for ImageMagick Exceptions | # LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Graphics.ImageMagick.MagickWand.Types
( PPixelIterator
, PPixelWand
, PPixelPacket
, PMagickPixelPacket
, PDrawingWand
, PMagickWand
, MagickWandException(..)
, ExceptionCarrier(..)
, module Gra... |
5767baf0687d37cfb1d66cf4334e4fd1c6219acd5d9164e8ac4d8eae2f6f6d61 | rabbitmq/khepri | test_ra_server_helpers.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(test_ra_server_helpers).
-include_lib("stdli... | null | https://raw.githubusercontent.com/rabbitmq/khepri/3527362ad9f59cff36231eb4e7b34dc066aa0f50/test/test_ra_server_helpers.erl | erlang |
If the list is empty, assumed it was running on this node
but the store was stopped. This is the case in
app_starts_workers_test_() for instance. | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright © 2021 - 2023 VMware , Inc. or its affiliates . All rights reserved .
-module(test_ra_server_helpers).
-include_lib("stdlib/incl... |
91ed94bb7b77326300d3df6929dffc73168bf7557ba9472fbf3b6783bf299d22 | spectrum-finance/cardano-dex-backend | Parsers.hs | module Spectrum.Common.Parsers where
import Text.Parsec
( (<?>) )
import qualified Text.Parsec as Parsec
import qualified Text.Parsec.Language as Parsec
import qualified Text.Parsec.String as Parsec
import qualified Text.Parsec.Token as Parsec
import qualified Data.ByteString.Char8 as BSC
import Con... | null | https://raw.githubusercontent.com/spectrum-finance/cardano-dex-backend/69d3ee06b33c966c2d21281214252c1fd2e77325/amm-executor/src/Spectrum/Common/Parsers.hs | haskell | module Spectrum.Common.Parsers where
import Text.Parsec
( (<?>) )
import qualified Text.Parsec as Parsec
import qualified Text.Parsec.Language as Parsec
import qualified Text.Parsec.String as Parsec
import qualified Text.Parsec.Token as Parsec
import qualified Data.ByteString.Char8 as BSC
import Con... | |
a4f99ab25c89d8c8c11f42026e06e0148e74acd1771c3a17c1e6207f90fc1417 | dwayne/eopl3 | parser.test.rkt | #lang racket
(require "./parser.rkt")
(require rackunit)
(check-equal?
(parse "1")
(a-program (const-exp 1)))
(check-equal?
(parse "x")
(a-program (var-exp 'x)))
(check-equal?
(parse "-(5, y)")
(a-program (diff-exp (const-exp 5) (var-exp 'y))))
(check-equal?
(parse "zero?(z)")
(a-program (zero?-exp (var-e... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/IMPLICIT-REFS-4.20/parser.test.rkt | racket | #lang racket
(require "./parser.rkt")
(require rackunit)
(check-equal?
(parse "1")
(a-program (const-exp 1)))
(check-equal?
(parse "x")
(a-program (var-exp 'x)))
(check-equal?
(parse "-(5, y)")
(a-program (diff-exp (const-exp 5) (var-exp 'y))))
(check-equal?
(parse "zero?(z)")
(a-program (zero?-exp (var-e... | |
bde413ffccc988ae533c7df5cd095528646a350247e5851a6ce8c80ecd252768 | janestreet/async | log_extended.mli | open! Core
open! Async
include module type of struct include Async.Log end
module Console : sig
(** returns a [Log.Output.t] given optional styles (i.e. values of type [Ansi.t list])
for each of the [`Debug], [`Info], and [`Error] log levels. The default styling is
to display debug messages in yellow, e... | null | https://raw.githubusercontent.com/janestreet/async/a42d7fd4d14b2125c4bdf546d03d1a6aedf76b90/log_extended/src/log_extended.mli | ocaml | * returns a [Log.Output.t] given optional styles (i.e. values of type [Ansi.t list])
for each of the [`Debug], [`Info], and [`Error] log levels. The default styling is
to display debug messages in yellow, error messages in red, and info messages
without any additional styling.
[create] doesn't ... | open! Core
open! Async
include module type of struct include Async.Log end
module Console : sig
val output :
?debug:Console.Ansi.attr list
-> ?info:Console.Ansi.attr list
-> ?error:Console.Ansi.attr list
-> Writer.t
-> Log.Output.t
module Blocking : sig
val output :
?debug:Console.A... |
abe4707f172acfa5e81c9588b12ca5e6b2c2deea81b5bf52fd1b67ccf5217bdf | ultralisp/ultralisp | import.lisp | (defpackage #:ultralisp/import
(:use #:cl)
(:import-from #:defmain
#:defmain)
(:import-from #:legit)
(:import-from #:cl-fad
#:walk-directory)
(:import-from #:ultralisp/models/project
#:make-github-project-from-url)
(:import-from #:reblocks-auth/models
... | null | https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/src/import.lisp | lisp | (when (> (length lines)
(length lines)
content))) | (defpackage #:ultralisp/import
(:use #:cl)
(:import-from #:defmain
#:defmain)
(:import-from #:legit)
(:import-from #:cl-fad
#:walk-directory)
(:import-from #:ultralisp/models/project
#:make-github-project-from-url)
(:import-from #:reblocks-auth/models
... |
b2a2202b7b2955905a71c813320bd00253002615f1c5b8f5cb8dca28aa9d5184 | Isaac-DeFrain/KFramework | lexer.ml | # 1 "lexer.mll"
open Parser
open Constants.K
open Constants
open Prelude
# 9 "lexer.ml"
let __ocaml_lex_tables = {
Lexing.lex_base =
"\000\000\241\255\031\000\002\000\080\000\162\000\249\255\250\255\
\251\255\000\000\000\000\255\255\254\255\000\000\001\000\002\000\
\002\000\019\000\010\000\022\0... | null | https://raw.githubusercontent.com/Isaac-DeFrain/KFramework/54e6b833f104222ef24ea75551dc97c0ae4f588c/Languages/GroundedRho/Join/join-kompiled/lexer.ml | ocaml | ktoken
kapply
ksequence
kvariable
injectedklabel
end
back reference | # 1 "lexer.mll"
open Parser
open Constants.K
open Constants
open Prelude
# 9 "lexer.ml"
let __ocaml_lex_tables = {
Lexing.lex_base =
"\000\000\241\255\031\000\002\000\080\000\162\000\249\255\250\255\
\251\255\000\000\000\000\255\255\254\255\000\000\001\000\002\000\
\002\000\019\000\010\000\022\0... |
bc0a1660708a2440e312ac6f4218ddf67b0b749c0e40e1678e99e66b7f6350bc | purescript/purescript | Pretty.hs | -- | A collection of pretty printers for core data types:
--
* [ @Language . PureScript . Pretty . ] Pretty printer for kinds
--
-- * [@Language.PureScript.Pretty.Values@] Pretty printer for values
--
-- * [@Language.PureScript.Pretty.Types@] Pretty printer for types
module Language.PureScript.Pretty (module P) wher... | null | https://raw.githubusercontent.com/purescript/purescript/ee0b3d391151bcd5f56de4563208dcf657cccc8c/src/Language/PureScript/Pretty.hs | haskell | | A collection of pretty printers for core data types:
* [@Language.PureScript.Pretty.Values@] Pretty printer for values
* [@Language.PureScript.Pretty.Types@] Pretty printer for types | * [ @Language . PureScript . Pretty . ] Pretty printer for kinds
module Language.PureScript.Pretty (module P) where
import Language.PureScript.Pretty.Types as P
import Language.PureScript.Pretty.Values as P
import Language.PureScript.PSString as P (prettyPrintString)
|
359ed3aed9f8966e7a73cc0450f0a5345c25f2ac27a26791917a90550edc170e | vseloved/rutils | generic.lisp | ;;; see LICENSE file for permissions
(in-package #:rutils.generic)
(named-readtables:in-readtable rutils-readtable)
(eval-when (:compile-toplevel)
(declaim #.+default-opts+))
(declaim (inline copy smart-slot-value smart-set-slot-value))
(defmacro adding-smart-slot-methods (obj slot expr)
(with-gensyms (err class... | null | https://raw.githubusercontent.com/vseloved/rutils/db3c3f4ae897025b5f0cd81042ca147da60ca0c5/core/generic.lisp | lisp | see LICENSE file for permissions
generic element access protocol
generic copy
generic count |
(in-package #:rutils.generic)
(named-readtables:in-readtable rutils-readtable)
(eval-when (:compile-toplevel)
(declaim #.+default-opts+))
(declaim (inline copy smart-slot-value smart-set-slot-value))
(defmacro adding-smart-slot-methods (obj slot expr)
(with-gensyms (err class name alt args val)
`(handler-cas... |
f9dbaa66e7b42dfe3d706b1c87b75ce0d952ced668809fa473448254a9a22ea8 | AndreasVoellmy/openflow | EthernetAddress.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE BangPatterns #-}
# LANGUAGE MagicHash #
# LANGUAGE DeriveGeneric #
module Network.Data.Ethernet.EthernetAddress (
-- * Ethernet address
EthernetAddress
, ethernetAddress
, ethernetAddress64
, unpack
, unpack64
, toL... | null | https://raw.githubusercontent.com/AndreasVoellmy/openflow/1dc9c6e9b594d0edaa895b3db145752383e3b431/src/Network/Data/Ethernet/EthernetAddress.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE BangPatterns #
* Ethernet address
* Parsers and unparsers
| Builds an ethernet address from a Word64 value.
(W32# w32) (W16# w16)
= W64# ((w32 `uncheckedShiftL#` 16#) `or#` w16)
Show & Read instances
Specifications:
(B) parseHex1 . unparseHex1 == id
(C) fromList... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MagicHash #
# LANGUAGE DeriveGeneric #
module Network.Data.Ethernet.EthernetAddress (
EthernetAddress
, ethernetAddress
, ethernetAddress64
, unpack
, unpack64
, toList
, pack_32_16
, isReserved
, broadcastAddress
, prettyPrintEthernetAddress
... |
1fa778f0b5ce17c5b11e787939be27410b1ec14807ad1cd802ec2735890dbe88 | careercup/CtCI-6th-Edition-Haskell | is-permutation.hs | import Data.List (sort)
isPermutation :: String -> String -> Bool
isPermutation a b = sort a == sort b
| null | https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Haskell/46da3bca5a7f2c9bc999b8922b6c4f2eeff9a48b/src/chapter-1/is-permutation.hs | haskell | import Data.List (sort)
isPermutation :: String -> String -> Bool
isPermutation a b = sort a == sort b
| |
597d9bb35812a5437f17cd3de9653ed97613121ec8479b040867acbe0de5ec75 | weavejester/re-rand | tools.clj | Copyright ( c ) . All rights reserved .
The use and distribution terms for this software are covered by the Eclipse
;; Public License 1.0 (-1.0.php) which
;; can be found in the file epl-v10.html at the root of this distribution. By
;; using this software in any fashion, you are agreeing to be bound by the
;; ter... | null | https://raw.githubusercontent.com/weavejester/re-rand/40a3f0e4f362627d85de386feba834a85e80c979/src/re_rand/parser/tools.clj | clojure | Public License 1.0 (-1.0.php) which
can be found in the file epl-v10.html at the root of this distribution. By
using this software in any fashion, you are agreeing to be bound by the
terms of this license. You must not remove this notice, or any other, from
this software.
re-rand.parser.tools:
| Copyright ( c ) . All rights reserved .
The use and distribution terms for this software are covered by the Eclipse
Generic functions for creating a LL recursive descent parser .
(ns re-rand.parser.tools)
(defn match
"Create a rule to match a regular expression."
[re]
(fn [src]
(let [m (re-matcher ... |
dadb1060fb59340de7481c43d76bd98458fda0d75db6eb0c606fb22154ffc803 | shayan-najd/QFeldspar | Test.hs | module Test where
import QFeldspar.MyPrelude
import qualified Tests.ADTUntypedNamed as AUN
import qualified Tests.ADTUntypedDebruijn as AUD
import qualified Tests.GADTTyped as GTD
import qualified Tests.GADTFirstOrder as GFO
import qualified Tests.GADTHigherOrder as GHO
import qualified Tests.... | null | https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/Test.hs | haskell | Todo:
* Check for exotic terms
* Weakening of HOAS
+ getting rid of Tmp
* Bidirectional translations
* Free Fusion for Church / Ahman's Containers
* Supporting F
* Add sqrt and memorize (for Float) to Preludes that do not have it
* Write the code required for memorize
* Use macros for polymorphic datatypes... | module Test where
import QFeldspar.MyPrelude
import qualified Tests.ADTUntypedNamed as AUN
import qualified Tests.ADTUntypedDebruijn as AUD
import qualified Tests.GADTTyped as GTD
import qualified Tests.GADTFirstOrder as GFO
import qualified Tests.GADTHigherOrder as GHO
import qualified Tests.... |
38602f97ef7fc8e8e0c251db7652eddd3e2583014726c34033a2a8f698febdff | RyanGlScott/text-show | Text.hs | {-# LANGUAGE CPP #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - deprecations #
# OPTIONS_GHC -fno - warn - orphans #
|
Module : Instances . Data . Text
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE... | null | https://raw.githubusercontent.com/RyanGlScott/text-show/5ea297d0c7ae2d043f000c791cc12ac53f469944/tests/Instances/Data/Text.hs | haskell | # LANGUAGE CPP # | # LANGUAGE DeriveGeneric #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -fno - warn - deprecations #
# OPTIONS_GHC -fno - warn - orphans #
|
Module : Instances . Data . Text
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : ... |
7219b8a996d9bb0c18c2090929266e2613dc34d57da8e49bff42b1d45e975402 | renanpvaz/rickastley.live | Main.hs | module Main where
import Control.Concurrent
import Control.Monad
import Data.ByteString.Builder (lazyByteString)
import Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Char8 as C
import Data.List.Split as S
import Data.Text.Lazy as TL
import Network.Wai
import System.Environment
import System.IO
impor... | null | https://raw.githubusercontent.com/renanpvaz/rickastley.live/c32a0d5587f8272b7b552228b63bed59b2c650c0/app/Main.hs | haskell | module Main where
import Control.Concurrent
import Control.Monad
import Data.ByteString.Builder (lazyByteString)
import Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Char8 as C
import Data.List.Split as S
import Data.Text.Lazy as TL
import Network.Wai
import System.Environment
import System.IO
impor... | |
474c9bb06ff7b69b8741253411fdbce1e403f549f3f339d581ecd4c70ea4e4e6 | janestreet/core | memo.ml | open! Import
open Std_internal
type ('a, 'b) fn = 'a -> 'b
module Result = struct
type 'a t =
| Rval of 'a
| Expt of exn
let return = function
| Rval v -> v
| Expt e -> raise e
;;
let capture f x =
try Rval (f x) with
| e -> Expt e
;;
end
let unit f =
let l = Lazy.from_fun f in
... | null | https://raw.githubusercontent.com/janestreet/core/f382131ccdcb4a8cd21ebf9a49fa42dcf8183de6/core/src/memo.ml | ocaml | Allocate this closure at the call to [unbounded], not at each call to the memoized
function.
the same but with a bound on cache size
eject least recently used cache entry | open! Import
open Std_internal
type ('a, 'b) fn = 'a -> 'b
module Result = struct
type 'a t =
| Rval of 'a
| Expt of exn
let return = function
| Rval v -> v
| Expt e -> raise e
;;
let capture f x =
try Rval (f x) with
| e -> Expt e
;;
end
let unit f =
let l = Lazy.from_fun f in
... |
5d616666810152844a4a2b3c0948263fa24782c20fbbda7f37efea5760ac950d | tonyrog/bt | obex.erl | %%%---- BEGIN COPYRIGHT -------------------------------------------------------
%%%
Copyright ( C ) 2006 - 2014 , Rogvall Invest AB , < >
%%%
%%% This software is licensed as described in the file COPYRIGHT, which
%%% you should have received as part of this distribution. The terms
%%% are also available at .
%%%
%%... | null | https://raw.githubusercontent.com/tonyrog/bt/9a569b68bc652dbb298a15950e9e661918eda4e5/src/obex.erl | erlang | ---- BEGIN COPYRIGHT -------------------------------------------------------
This software is licensed as described in the file COPYRIGHT, which
you should have received as part of this distribution. The terms
are also available at .
You may opt to use, copy, modify, merge, publish, distribute and/or sell
furni... | Copyright ( C ) 2006 - 2014 , Rogvall Invest AB , < >
copies of the Software , and permit persons to whom the Software is
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY
Author : < >
Created : 19 May 2006 by < >
-module(obex).
-behaviour(gen_server).
-export([open/2, op... |
ba20a6eff8721fdcebb52ba94f7cdf3dd9f4eb7afe82775bd1d264e2c6b5d949 | janegca/htdp2e | Exercise -211-AbstractionExercise.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname |Exercise -211-AbstractionExercise|) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/03-Abstractions/Exercise%20-211-AbstractionExercise.rkt | racket | about the language level of this file in a form that our tools can easily process.
Abstract the functions inf and sup (given below) into a single function.
largest.
Define inf-1 and sup-1 in terms of the abstract function. Test each of them
Why are these functions slow on some of the long lists?
these ver... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname |Exercise -211-AbstractionExercise|) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
Exercise 211 .
Both consume non... |
0e4f5b5e15bd610e81125c421793d3e4f8a8d030560ba8fe4b166772b93d0a84 | codinuum/cca | compression.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/util/compression.ml | ocaml | compression.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... |
312bb5582d438f937ae6d02fea00dad74ec23a9784980d8e7748caa96564240c | inria-parkas/sundialsml | simplependulum.ml | A pendulum attached to a rigid rod banging against a wall , modeled by a DAE
in Cartesian coordinates . The wall extends 30 degrees to the left of the
plumb line extending from the pivot .
.
//\ // is the wall , \ is the rod , . is the pivot , o is a mass .
// \
// ... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a1848318cac2e340c32ddfd42671bef07b1390db/examples/ocaml/pendulum/ida/simplependulum.ml | ocaml | time step [s]
simulation end time [s]
length of rod [m]
gravitational acceleration [m/s^2]
elasticity of collision with wall
direction of the wall relative to the pivot
Position of pivot on the screen, scaled so that the screen is 1.0x1.0. The
solver will take the pivot as the origin.
angle with vert... | A pendulum attached to a rigid rod banging against a wall , modeled by a DAE
in Cartesian coordinates . The wall extends 30 degrees to the left of the
plumb line extending from the pivot .
.
//\ // is the wall , \ is the rod , . is the pivot , o is a mass .
// \
// ... |
7b98c919e2940c42c504b4ff9abc474288cd30384b6e717a2a1cf72c5397cf07 | binaryage/cljs-oops | oget_dev.cljs | (ns oops.arena.oget-dev
(:require-macros [oops.arena.macros :refer [macro-identity]])
(:require [oops.core :refer [oget oget+]]
[oops.config :refer [without-diagnostics with-debug]]
[oops.tools :refer [init-arena-test! done-arena-test! testing]]))
(init-arena-test!)
; we want to test gener... | null | https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/test/src/arena/oops/arena/oget_dev.cljs | clojure | we want to test generated code shape expansion under dev mode | (ns oops.arena.oget-dev
(:require-macros [oops.arena.macros :refer [macro-identity]])
(:require [oops.core :refer [oget oget+]]
[oops.config :refer [without-diagnostics with-debug]]
[oops.tools :refer [init-arena-test! done-arena-test! testing]]))
(init-arena-test!)
(testing "static oget ... |
5802d68bbd527b20d5c19cdffb443571fd53dae127b4c6aabdca02d633efd487 | mariari/Misc-Lisp-Scripts | lazy-cons.lisp | ;;; functions built ontop of laziness************************************************************************************
(defun sterms (n)
(scons (/ 1 (expt n 2))
(sterms (1+ n))))
(defun sieve (lis)
(scons (scar lis)
(sieve (sfilter (lambda (x) (/= 0 (mod x (scar lis))))
... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/data-structures/utils/lazy-cons.lisp | lisp | functions built ontop of laziness************************************************************************************
this function is just iterate in disguise and an end point
should just put range into my auto load file :(
time to add a match pattern to this |
(defun sterms (n)
(scons (/ 1 (expt n 2))
(sterms (1+ n))))
(defun sieve (lis)
(scons (scar lis)
(sieve (sfilter (lambda (x) (/= 0 (mod x (scar lis))))
(scdr lis)))))
(defun primes ()
(labels ((naturals-from (n)
(scons n (naturals-from (1+ n)))))
(sie... |
14b39d0b474068908f0e668531511817018e0bfc4cefb0d9c61dfba3ce5486cb | ranon-rat/learningHaskell | dict.hs | main::IO()
main=do
let dict=[("grabahama",14)]
print $ lookup "grabahama" dict | null | https://raw.githubusercontent.com/ranon-rat/learningHaskell/7dda339654ad8bcaf2a290fa2230125e78e3e2a3/types/dict.hs | haskell | main::IO()
main=do
let dict=[("grabahama",14)]
print $ lookup "grabahama" dict | |
ad6a793990aa10ec07e26985df8fbb7559ae36d54c95af35a5cc60226811890e | hkoktay/the-reasoned-schemer | chapter05.scm | Chapter 5 : Double Your Fun
(load "test-check.scm")
(load "minikanren/mkprelude.scm")
Page 61
(define append
(lambda (l s)
(cond
((null? l) s)
(else (cons (car l)
(append (cdr l) s))))))
Page 61
(test "append"
(append '(a b c) '(d e))
'(a b c d e))
Page 61
(test "app... | null | https://raw.githubusercontent.com/hkoktay/the-reasoned-schemer/847d1e4a5a1bb777604b02828b3497be6de8d189/chapter05.scm | scheme | 1.revision
would not stop.
1.revision
1.revision
Reasoning: So where does these values come from?
succeeds we pretend that it failed and evaluate the 'else' cond
line which returns the value '((a)).
returns the value '(a). The next recursive call to flatteno
' ( ) and ' ( ( ) ) . So ( appendo
res-a res-d ou... | Chapter 5 : Double Your Fun
(load "test-check.scm")
(load "minikanren/mkprelude.scm")
Page 61
(define append
(lambda (l s)
(cond
((null? l) s)
(else (cons (car l)
(append (cdr l) s))))))
Page 61
(test "append"
(append '(a b c) '(d e))
'(a b c d e))
Page 61
(test "app... |
5483c8177f3c151c03efbb8b4662e545ab9a21e0271e92d53f7dfdfee40cc745 | myuon/claire | LK.hs | module Claire.Syntax.LK where
import Claire.Syntax.FOL
type AssmIndex = String
data Rule
= I | Cut Formula
| AndL1 | AndL2 | AndR
| OrL | OrR1 | OrR2
| ImpL | ImpR
| BottomL | TopR
| ForallL Term | ForallR Ident
| ExistL Ident | ExistR Term
| WL | WR
| CL | CR
| PL Int | PR Int
deriving (Eq, Sh... | null | https://raw.githubusercontent.com/myuon/claire/e14268ced1bbab2f099a93feb0f2a129cf8b6a8b/src/Claire/Syntax/LK.hs | haskell | module Claire.Syntax.LK where
import Claire.Syntax.FOL
type AssmIndex = String
data Rule
= I | Cut Formula
| AndL1 | AndL2 | AndR
| OrL | OrR1 | OrR2
| ImpL | ImpR
| BottomL | TopR
| ForallL Term | ForallR Ident
| ExistL Ident | ExistR Term
| WL | WR
| CL | CR
| PL Int | PR Int
deriving (Eq, Sh... | |
187e7e783a52a76c3b5cac24e951406c90e8e3b86508ff066a1fbc093bf71778 | elbrujohalcon/witchcraft | angus_pingpong.erl | %%% File : pingpong.erl
%%% Author : <>, <>
Description : Sends a message N times between two processes
Created : Dec 2005 by and
-module(angus_pingpong).
Interface
-export([start/0, stop/0, send/1]).
%% Internal Exports
-export([init_a/0, init_b/0]).
start() ->
register(a, spawn(pingpong, init... | null | https://raw.githubusercontent.com/elbrujohalcon/witchcraft/050e91f028a50874347fea9dc552a0e0a056018f/src/angus_pingpong.erl | erlang | File : pingpong.erl
Author : <>, <>
Internal Exports
flush
flush | Description : Sends a message N times between two processes
Created : Dec 2005 by and
-module(angus_pingpong).
Interface
-export([start/0, stop/0, send/1]).
-export([init_a/0, init_b/0]).
start() ->
register(a, spawn(pingpong, init_a, [])),
ok.
stop() ->
exit(whereis(a), abnormal).
send(N)... |
420df8b40b1a677059f163e9520a3bd7b45fbda710c7743c91772e3b87c5d98d | rudymatela/express | All.hs | module All
( module Data.Express
, module Data.Express.Fixtures
)
where
import Data.Express
import Data.Express.Fixtures
import Data.Express.Triexpr ()
| null | https://raw.githubusercontent.com/rudymatela/express/e826610c97761046fd837a01c2c030d260decf68/mk/All.hs | haskell | module All
( module Data.Express
, module Data.Express.Fixtures
)
where
import Data.Express
import Data.Express.Fixtures
import Data.Express.Triexpr ()
| |
7699c41dd0f74c47abd798b17b47227eafe8fcd240904854e72b0d3c6475bbc8 | prikhi/quickbooks-for-communes | Types.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
| This module contains the environment the application runs with ,
a monad that all routes execute in , and functionality - based typeclasses
that are used to limit the effects possible within discrete
routes / handlers / functions , instead... | null | https://raw.githubusercontent.com/prikhi/quickbooks-for-communes/f4aefb9de90db04e9c657674627bcc777196d92f/server/src/Types.hs | haskell | * Application Types
* Typeclasses
** SQL
** Generation
** Time
** Hashing
| The environment the application runs in. This includes static
configuration data as well as global runtime resources like the database
connection pool.
| The monadic stack the handler routes run under.
| Wrap/unwrap the ReaderT insta... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
| This module contains the environment the application runs with ,
a monad that all routes execute in , and functionality - based typeclasses
that are used to limit the effects possible within discrete
routes / handlers / functions , instead... |
4942660f673e975b0206dd6ee09eaa2914e90740adf8a41b9b2c3864ab66be10 | Vagabond/teleport | teleport_node_sup.erl | -module(teleport_node_sup).
-behaviour(supervisor).
-export([start_link/1]).
-export([init/1]).
start_link(Node) ->
supervisor:start_link(?MODULE, [Node]).
init([Node]) ->
Name = teleport:name_for_node(Node),
PoolArgs = [{name, {local, Name}}, {size, 6}, {max_overflow, 5}, {worker_module, teleport_node_worker... | null | https://raw.githubusercontent.com/Vagabond/teleport/6fbb2283034a920cb0f70d6670d983bb0c241f98/src/teleport_node_sup.erl | erlang | -module(teleport_node_sup).
-behaviour(supervisor).
-export([start_link/1]).
-export([init/1]).
start_link(Node) ->
supervisor:start_link(?MODULE, [Node]).
init([Node]) ->
Name = teleport:name_for_node(Node),
PoolArgs = [{name, {local, Name}}, {size, 6}, {max_overflow, 5}, {worker_module, teleport_node_worker... | |
c80b46c83c0154ec9b388fcb387e277140f5ffbb9ee7f7565ef7aa4b43f8d40a | Zulu-Inuoe/clution | multipart-parser.lisp | (in-package :cl-user)
(defpackage fast-http.multipart-parser
(:use :cl
:fast-http.byte-vector
:fast-http.error)
(:import-from :fast-http.parser
:callbacks-body
:callbacks-headers-complete
:callbacks-message-begin
:callbacks-message-comp... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/fast-http-20180131-git/src/multipart-parser.lisp | lisp | Still in the body
Still in the body
Still in the body
got a part
XXX
parsing headers done
got a part
buffer the last part | (in-package :cl-user)
(defpackage fast-http.multipart-parser
(:use :cl
:fast-http.byte-vector
:fast-http.error)
(:import-from :fast-http.parser
:callbacks-body
:callbacks-headers-complete
:callbacks-message-begin
:callbacks-message-comp... |
2c83c0fd01c6e17868a3604bdd7e6b0f26247d40212fa2ac51ebd42256aad47b | askonomm/clarktown | list_block_test.clj | (ns clarktown.correctors.list-block-test
(:require
[clojure.test :refer [deftest testing is]]
[clarktown.correctors.list-block :as corrector]))
(deftest line-block-corrector-test
(testing "Empty line above"
(let [line "1. Hello"
lines ["Some text goes here" line]
index 1]
(i... | null | https://raw.githubusercontent.com/askonomm/clarktown/b97891cc45b9a087a372767e25aa36788bc979bf/test/clarktown/correctors/list_block_test.clj | clojure | (ns clarktown.correctors.list-block-test
(:require
[clojure.test :refer [deftest testing is]]
[clarktown.correctors.list-block :as corrector]))
(deftest line-block-corrector-test
(testing "Empty line above"
(let [line "1. Hello"
lines ["Some text goes here" line]
index 1]
(i... | |
2e417541886ef31b137875b58c0a6bcc473723558d5272000b87e1280fdbfb1d | ethercrow/yi-config | Make.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
-- TODO:
--
-- * fuzzy-open dialog for error list
-- * Somehow mark tabs with errors. Maybe with color or with a '!'.
* : and : wm1 commands for compiling just current file
-- Bugs:
-... | null | https://raw.githubusercontent.com/ethercrow/yi-config/3530e6ca8e9a598d8c7ddcf7954c66254c2b760d/modules/Make.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
TODO:
* fuzzy-open dialog for error list
* Somehow mark tabs with errors. Maybe with color or with a '!'.
Bugs:
were emitted, there is no error highlighting in that new buffer.
* Make process is leaked on editor exit
TODO: T.words is insuffi... | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
* : and : wm1 commands for compiling just current file
* If user runs : make first and then opens a file for which errors
module Make
( debug
, errorCountE
, errorCountB
, exMake
, exMakePrgOption
, guessMakePrg
, jumpToNextE... |
f056d2252ad1dd0abf8ca387bd5ff71b21b28e1b568f65e03f4208c294ffe819 | TaktInc/freer | Coroutine.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE CPP #
module Tests.Coroutine (
runTestCoroutine
) where
#if __GLASGOW_HASKELL__ <= 708
import Control.Applicative
#endif
import Control.Monad
import Eff
import Eff.Coroutine.Pure
import Eff.State.Pure
runTestCoroutine ... | null | https://raw.githubusercontent.com/TaktInc/freer/b1e4911832ad12ef0b9b23883548dcf44ea3bd59/tests/Tests/Coroutine.hs | haskell | # LANGUAGE ConstraintKinds # | # LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
# LANGUAGE CPP #
module Tests.Coroutine (
runTestCoroutine
) where
#if __GLASGOW_HASKELL__ <= 708
import Control.Applicative
#endif
import Control.Monad
import Eff
import Eff.Coroutine.Pure
import Eff.State.Pure
runTestCoroutine :: [Int] -> Int
runTestCoroutine ... |
14f31e2ce41a5773931a25d6e9e40ac4a12279328b545e2f81b6ce1fcec94808 | logseq/logseq | lifecycle.cljs | (ns ^:no-doc frontend.handler.editor.lifecycle
(:require [frontend.handler.editor :as editor-handler :refer [get-state]]
[frontend.handler.editor.keyboards :as keyboards-handler]
[frontend.state :as state :refer [sub]]
[frontend.util :as util]
[goog.dom :as gdom]))
(de... | null | https://raw.githubusercontent.com/logseq/logseq/9c7b4ea2016fb28b16ee42a7136c73dd52d8ce4b/src/main/frontend/handler/editor/lifecycle.cljs | clojure | Here we delay this listener, otherwise the click to edit event will trigger a outside click event,
which will hide the editor so no way for editing.
try to close all opened dropdown menu
TODO: ugly | (ns ^:no-doc frontend.handler.editor.lifecycle
(:require [frontend.handler.editor :as editor-handler :refer [get-state]]
[frontend.handler.editor.keyboards :as keyboards-handler]
[frontend.state :as state :refer [sub]]
[frontend.util :as util]
[goog.dom :as gdom]))
(de... |
bf96c466b22096e220b05ee47f4171ae8ebd35feac340a336c06ce76d16e9417 | hercules-ci/hercules-ci-agent | AccountInstallationStatus.hs | {-# LANGUAGE DeriveAnyClass #-}
module Hercules.API.Accounts.AccountInstallationStatus where
import Hercules.API.Accounts.Account (Account)
import Hercules.API.Forge.Forge (Forge)
import Hercules.API.Prelude
data AccountInstallationStatus = AccountInstallationStatus
{ site :: Forge,
account :: Maybe Account,
... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/b3f8aa8e4a8b22dbbe92cc5a89e6881090b933b3/hercules-ci-api/src/Hercules/API/Accounts/AccountInstallationStatus.hs | haskell | # LANGUAGE DeriveAnyClass # |
module Hercules.API.Accounts.AccountInstallationStatus where
import Hercules.API.Accounts.Account (Account)
import Hercules.API.Forge.Forge (Forge)
import Hercules.API.Prelude
data AccountInstallationStatus = AccountInstallationStatus
{ site :: Forge,
account :: Maybe Account,
isProcessingInstallationWebHo... |
b7eb79ca8c4241a617afea01dfffa8a84d70b789a4ac69fde916324e613c3e87 | CSVdB/pinky | PositiveInt.hs | # LANGUAGE ScopedTypeVariables #
module Pinky.Utils.PositiveInt
( PositiveInt
, posToNum
, constructPositiveInt
, takePos
, piDivide
) where
import Import
import Data.List.NonEmpty (NonEmpty)
import qualified Data.List.NonEmpty as NEL
import Pinky.Utils.PositiveInt.Internal
takePos :: Positi... | null | https://raw.githubusercontent.com/CSVdB/pinky/e77a4c0812ceb4b8548c41a7652fb247c2ab39e0/pinky/src/Pinky/Utils/PositiveInt.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Pinky.Utils.PositiveInt
( PositiveInt
, posToNum
, constructPositiveInt
, takePos
, piDivide
) where
import Import
import Data.List.NonEmpty (NonEmpty)
import qualified Data.List.NonEmpty as NEL
import Pinky.Utils.PositiveInt.Internal
takePos :: Positi... | |
0df9000c1246d85206ce8d6624eafe81a6b00f8df1544dbef635b0a5a00fbc66 | cram-code/cram_core | rete-prolog-handlers.lisp | ;;;
Copyright ( c ) 2010 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this li... | null | https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_reasoning/src/rete-prolog-handlers.lisp | lisp |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Re... | Copyright ( c ) 2010 , < >
* Neither the name of Willow Garage , Inc. nor the names of its
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
b5a5f12aabe4add2dd2ef675b9ab90f5058aa93b9ad77c87349c2d2e12abffad | morloc-project/morloc | Generate.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
|
Module : Morloc . CodeGenerator . Generate
Description : Translate AST forests into target language source code
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
The single @generate@ functi... | null | https://raw.githubusercontent.com/morloc-project/morloc/c4e76083afaaaeae2bb53a65fe23604200fdf2e0/library/Morloc/CodeGenerator/Generate.hs | haskell | # LANGUAGE OverloadedStrings #
translate modules into bitrees
select a single instance at each node in the tree
separate unrealized (general) ASTs (uASTs) from realized ASTs (rASTs)
concrete typecheck fully realized tree
| Translate typed, abstract syntax forests into compilable code
^ the nexus code and the sour... | # LANGUAGE ViewPatterns #
|
Module : Morloc . CodeGenerator . Generate
Description : Translate AST forests into target language source code
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
The single @generate@ function wraps the entire AST forest to s... |
d9bb512647216f6af43faddc4fc8610344847a5a81dc9e8f5c032cf718984954 | emgrasmeder/clojenetics | project.clj | (defproject clojenetics "0.1.0-SNAPSHOT"
:description "Clojure -> Genetic Programming => clojenetics"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[circleci/bond "0.3.1"]
[com.taoensso/timbre "4.10.... | null | https://raw.githubusercontent.com/emgrasmeder/clojenetics/6eb1986895e30c64b49ef6ea2b91db475a3f97a7/project.clj | clojure | (defproject clojenetics "0.1.0-SNAPSHOT"
:description "Clojure -> Genetic Programming => clojenetics"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[circleci/bond "0.3.1"]
[com.taoensso/timbre "4.10.... | |
35453093f7a98540c24b9a3706cff81d34bbdbd10ca9e4609fabedc145e0ac19 | monadbobo/ocaml-core | type_class.ml | (* Tp_class: sizers, writers, and readers in records *)
open Common
type 'a writer =
{
size : 'a Size.sizer;
write : 'a Write_ml.writer;
unsafe_write : 'a Unsafe_write_c.writer;
}
type 'a reader =
{
read : 'a Read_ml.reader;
unsafe_read : 'a Unsafe_read_c.reader;
unsafe_vtag_read : (int... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/bin_prot/lib/type_class.ml | ocaml | Tp_class: sizers, writers, and readers in records
Conversion of binable types |
open Common
type 'a writer =
{
size : 'a Size.sizer;
write : 'a Write_ml.writer;
unsafe_write : 'a Unsafe_write_c.writer;
}
type 'a reader =
{
read : 'a Read_ml.reader;
unsafe_read : 'a Unsafe_read_c.reader;
unsafe_vtag_read : (int -> 'a) Unsafe_read_c.reader;
}
type 'a t =
{
w... |
e2ce84f55c82e8f7f5bf4faa482b0b3aaf88f96a708c7d49297946df22684854 | mkoppmann/eselsohr | Article.hs | module Lib.Ui.Web.Page.Article
( handler
, query
, view
) where
import Lucid
import Lucid.Servant (linkAbsHref_)
import Servant
( Link
, fieldLink
)
import qualified Lib.Domain.Authorization as Authz
import qualified Lib.Ui.Web.Page.Layout as Layout
import qualified Lib.Ui.Web.Page.Static ... | null | https://raw.githubusercontent.com/mkoppmann/eselsohr/3bb8609199c1dfda94935e6dde0c46fc429de84e/src/Lib/Ui/Web/Page/Article.hs | haskell | ----------------------------------------------------------------------
Handler
----------------------------------------------------------------------
----------------------------------------------------------------------
Query
----------------------------------------------------------------------
--------------------... | module Lib.Ui.Web.Page.Article
( handler
, query
, view
) where
import Lucid
import Lucid.Servant (linkAbsHref_)
import Servant
( Link
, fieldLink
)
import qualified Lib.Domain.Authorization as Authz
import qualified Lib.Ui.Web.Page.Layout as Layout
import qualified Lib.Ui.Web.Page.Static ... |
dee4ab5c6558a37b1287dd3e8437ee22f7921f7e333788d499cae3006a5e0852 | Holmusk/postgresql-simple-named | PgNamed.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
| Introduces named parameters for @postgresql - simple@ library .
It uses @?@ question as the indicator of the named parameter which
is replaced with the standard syntax with question marks .
Check out the example of usage :
@
' queryName... | null | https://raw.githubusercontent.com/Holmusk/postgresql-simple-named/62df97364fa6dd58d4b3acca0b5f88e151532edb/src/PgNamed.hs | haskell | * Named data types and smart constructors
* Errors
* Functions to deal with named parameters
* Database querying functions with named parameters
* Internal utils
| Wrapper over name of the argument.
| Data type to represent each named parameter.
| @PostgreSQL@ error type for named parameters.
| Named parameter... | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
| Introduces named parameters for @postgresql - simple@ library .
It uses @?@ question as the indicator of the named parameter which
is replaced with the standard syntax with question marks .
Check out the example of usage :
@
' queryName... |
0eca21e13b1c1cd843f7a1b2350892f833cd85141076fbcd440c44e6f0b5357e | CryptoKami/cryptokami-core | BlockWorkMode.hs | # LANGUAGE DataKinds #
-- | Various constraints needed for block processing.
module Pos.Block.BlockWorkMode
( BlockInstancesConstraint
, BlockWorkMode
) where
import Universum
import Data.Default (Default)
import Mockable (Delay, Fork, Mockables, SharedAtomic)
import ... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/block/src/Pos/Block/BlockWorkMode.hs | haskell | | Various constraints needed for block processing.
are unavailable at this point, hence we defer providing them
to the calling site.
| A subset of @WorkMode@. | # LANGUAGE DataKinds #
module Pos.Block.BlockWorkMode
( BlockInstancesConstraint
, BlockWorkMode
) where
import Universum
import Data.Default (Default)
import Mockable (Delay, Fork, Mockables, SharedAtomic)
import System.Wlog (WithLogger)
import Pos.Bin... |
958b47597b966c1d12203e3cf040e5815d4217ec4f374a54ecba422c5310c13b | ruuvi/ruuvitracker_server | tracker_security_test.clj | (ns ruuvi-server.tracker-security-test
(:use midje.sweet
ruuvi-server.tracker-security)
)
(def valid-mac "17e4ccf60f766710d0695348d7fda63cee0a3d46")
(def valid-params {:X-foobar "bar",
:tracker_code "foobar",
:longitude "02536.100084,E",
:mac valid-m... | null | https://raw.githubusercontent.com/ruuvi/ruuvitracker_server/269041aa2ff450c0f35183de0264d82a5c3881f1/test/ruuvi_server/tracker_security_test.clj | clojure | (ns ruuvi-server.tracker-security-test
(:use midje.sweet
ruuvi-server.tracker-security)
)
(def valid-mac "17e4ccf60f766710d0695348d7fda63cee0a3d46")
(def valid-params {:X-foobar "bar",
:tracker_code "foobar",
:longitude "02536.100084,E",
:mac valid-m... | |
a551c0c4f49463b4166547b74fe9ffb4d4a6bde907eaadd3971909e5eca6bac5 | NorfairKing/the-notes | Application.hs | module Functions.Application where
import Notes
import Functions.Basics.Macro
import Functions.Basics.Terms
import Sets.Basics.Terms
import Functions.Application.Macro
import Functions.Application.Terms
application :: Note
application = note "application" ... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Functions/Application.hs | haskell | module Functions.Application where
import Notes
import Functions.Basics.Macro
import Functions.Basics.Terms
import Sets.Basics.Terms
import Functions.Application.Macro
import Functions.Application.Terms
application :: Note
application = note "application" ... | |
fe28393fc7c7c2a25b7d9bf8235cf6f71fcd460db5126facd9327ece398d0989 | cdepillabout/servant-checked-exceptions | Api.hs | # LANGUAGE DataKinds #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
module Api where
import Data.Aeson
(FromJSON(parseJSON), ToJSON(toJSON), Value, withText)
import Data.Aeson.Types (Parser)
impo... | null | https://raw.githubusercontent.com/cdepillabout/servant-checked-exceptions/8ec4e831e45e51f3404790496f036a42c7349afa/servant-checked-exceptions/example/Api.hs | haskell | # LANGUAGE OverloadedStrings #
-------
API --
-------
| This is our main 'Api' type. We will create a server, a client, and
documentation for this api.
'ApiNoErrSearch'.
| This is a strict search api. You pass it a @\"query\"@, and it returns a
error if your query is not capitalized like @\"Hello\"@.
Notice ... | # LANGUAGE DataKinds #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
module Api where
import Data.Aeson
(FromJSON(parseJSON), ToJSON(toJSON), Value, withText)
import Data.Aeson.Types (Parser)
import Data.String (IsString)
import Da... |
b76854bfc93751bc05900dd6cca2cfa82afd68f2043d47ba7bc3d87f5fad2081 | jordanthayer/ocaml-search | int_tree.ml | * A compact method for storing integers in a tree . Collapses ranges
of integers into a single node .
I have no idea if this is a good idea.:w
TODO :
* Balancing ? This seems to be non - trivial .
@author eaburns
@since 2010 - 03 - 11
of integers into a single node.
... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/structs/int_tree.ml | ocaml | * [empty] the empty tree.
[insert_into_left right range left] inserts a range where the
right end of the range definitely lies to the right or this
entire subtree. [right] is always passed back as the right
child of the resulting node.
Falls within the left node's range (engulf the right).
... | * A compact method for storing integers in a tree . Collapses ranges
of integers into a single node .
I have no idea if this is a good idea.:w
TODO :
* Balancing ? This seems to be non - trivial .
@author eaburns
@since 2010 - 03 - 11
of integers into a single node.
... |
5e374dbb65f5bc5637aa002f0286e18b16ad63bb9b26699694edbd26bff31947 | gren-lang/compiler | Utf8.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# OPTIONS_GHC -fno - warn - name - shadowing #
module Data.Utf8
( Utf8 (..),
isEmpty,
empty,
size,
contains,
startsWith,
startsWithChar,
endsWithWord8,
split,
join,
-... | null | https://raw.githubusercontent.com/gren-lang/compiler/9c93957cf592b092b290e39dc550440a39358bfa/compiler/src/Data/Utf8.hs | haskell | # LANGUAGE BangPatterns #
EMPTY
SIZE
CONTAINS
STARTS WITH
STARTS WITH CHAR
ENDS WITH WORD
SPLIT
JOIN
COMPARE
TODO: is it fine to sort by length and only compare bytes on length ties?
FROM STRING
TO CHARS
TO TEXT
This could most certainly be optimized for better performance
TO BYTESTRING
TO BUILDE... | # LANGUAGE FlexibleInstances #
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# OPTIONS_GHC -fno - warn - name - shadowing #
module Data.Utf8
( Utf8 (..),
isEmpty,
empty,
size,
contains,
startsWith,
startsWithChar,
endsWithWord8,
split,
join,
getUnder256,
putUnder256,
... |
840514d3139631cc6ad6b9e47de53a87039a96bde3487ec5e3ed46a4289ec841 | binaryage/chromex | accessibility_features.cljs | (ns chromex.ext.accessibility-features (:require-macros [chromex.ext.accessibility-features :refer [gen-wrap]])
(:require [chromex.core]))
; -- properties -------------------------------------------------------------------------------------------------------------
(defn spoken-feedback* [config]
(gen-wrap :prop... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/accessibility_features.cljs | clojure | -- properties ------------------------------------------------------------------------------------------------------------- | (ns chromex.ext.accessibility-features (:require-macros [chromex.ext.accessibility-features :refer [gen-wrap]])
(:require [chromex.core]))
(defn spoken-feedback* [config]
(gen-wrap :property ::spoken-feedback config))
(defn large-cursor* [config]
(gen-wrap :property ::large-cursor config))
(defn sticky-keys... |
ae4feececb8387011b7c1c891bdf475cb2677f2a128a1a68bc8a7ef5feb73045 | adamwalker/clash-utils | LFSRSpec.hs | module LFSRSpec where
import qualified Clash.Prelude as Clash
import Clash.Prelude (Signal, Vec(..), BitVector, Index, Signed, Unsigned, SFixed, Bit, SNat(..),
simulate, simulate_lazy, listToVecTH, KnownNat, pack, unpack, (++#), mealy, mux, bundle, unbundle,
HiddenClockRese... | null | https://raw.githubusercontent.com/adamwalker/clash-utils/434f2970b33824a6a934678e3378cb6836af2a56/tests/LFSRSpec.hs | haskell | module LFSRSpec where
import qualified Clash.Prelude as Clash
import Clash.Prelude (Signal, Vec(..), BitVector, Index, Signed, Unsigned, SFixed, Bit, SNat(..),
simulate, simulate_lazy, listToVecTH, KnownNat, pack, unpack, (++#), mealy, mux, bundle, unbundle,
HiddenClockRese... | |
ce540fbc2ea8119b87db78dff1658aa7fa0a0cbb34c9dbeef242a5f438633cf1 | deadtrickster/prometheus.cl | package.lisp | (in-package #:cl-user)
(defpackage #:prometheus.pushgateway.test
(:use #:cl #:prove #:alexandria #:prometheus.test.support))
(in-package #:prometheus.pushgateway.test)
| null | https://raw.githubusercontent.com/deadtrickster/prometheus.cl/60572b793135e8ab5a857d47cc1a5fe0af3a2d53/t/pushgateway/package.lisp | lisp | (in-package #:cl-user)
(defpackage #:prometheus.pushgateway.test
(:use #:cl #:prove #:alexandria #:prometheus.test.support))
(in-package #:prometheus.pushgateway.test)
| |
883b28dca5786679510b69ea17d136979104329462f69139f72fc89f0a2f537c | ermine/kombain | kmb_lib.mli | exception Syntax of string
type 'a result = Parsed of 'a * Kmb_input.input | Failed
val return : 'a -> Kmb_input.input -> 'a result
val transform : ('a -> 'b result) -> ('b -> 'c) -> 'a -> 'c result
val fail :
(Kmb_input.input -> 'a result) -> string -> Kmb_input.input -> 'a result
val predicate_not :
(Kmb_input.in... | null | https://raw.githubusercontent.com/ermine/kombain/07f643c892b0b9c2ef08d67428bb9125d5251f82/kmb/kmb_lib.mli | ocaml | exception Syntax of string
type 'a result = Parsed of 'a * Kmb_input.input | Failed
val return : 'a -> Kmb_input.input -> 'a result
val transform : ('a -> 'b result) -> ('b -> 'c) -> 'a -> 'c result
val fail :
(Kmb_input.input -> 'a result) -> string -> Kmb_input.input -> 'a result
val predicate_not :
(Kmb_input.in... | |
19b1db96849bcced33b71819131d6eb50c2d7de9de64892c62f6100e2756701e | aryx/fork-efuns | common_indenter.mli | type indentations = (int * (Text.position list (* eols *))) list
type 'tok indentation_stack = ('tok * int) list
val pop_to_top: 'tok indentation_stack -> 'tok indentation_stack * int
val pop_to: 'tok -> 'tok indentation_stack -> 'tok indentation_stack * int
val pop_to_kwds: 'tok ->
('tok list -> 'tok indentation_... | null | https://raw.githubusercontent.com/aryx/fork-efuns/8f2f8f66879d45e26ecdca0033f9c92aec2b783d/prog_modes/common_indenter.mli | ocaml | eols
helpers to generate the indent_func above
get_indent
phrase_start
indent_func
get_indent
phrase_start
color_region
internals
val pop_indentations: indentations -> int * Text.position * indentations
(* debugging |
type 'tok indentation_stack = ('tok * int) list
val pop_to_top: 'tok indentation_stack -> 'tok indentation_stack * int
val pop_to: 'tok -> 'tok indentation_stack -> 'tok indentation_stack * int
val pop_to_kwds: 'tok ->
('tok list -> 'tok indentation_stack ->
'tok indentation_stack * ('tok * int))
val add: int ... |
606b3bd83168e128d69a5c21ec37d8872b25e6587861b991df07b4da0e24f391 | radicle-dev/radicle-alpha | Path.hs |
module Radicle.Path where
import Paths_rad_base
import System.Directory (doesFileExist)
import System.Environment (lookupEnv)
import System.FilePath (splitSearchPath, (</>))
-- | Importing works as follows:
--
( 1 ) If the RADPATH environment variable exists , search ther... | null | https://raw.githubusercontent.com/radicle-dev/radicle-alpha/b38a360d9830a938fa83fc066c1d131ec903b5e1/rad-base/src/Radicle/Path.hs | haskell | | Importing works as follows:
RADPATH should be a colon-separated list of directories (just like PATH). |
module Radicle.Path where
import Paths_rad_base
import System.Directory (doesFileExist)
import System.Environment (lookupEnv)
import System.FilePath (splitSearchPath, (</>))
( 1 ) If the RADPATH environment variable exists , search there
( 2 ) Otherwise search in dat... |
3d32a4e0b6b614f7bae82d3e3396d7336754de8d16a82785aeb0ac7d5b3e5ae9 | wilkerlucio/pathom | map_db.cljc | (ns com.wsscode.pathom.map-db
(:require
[clojure.spec.alpha :as s]
[com.fulcrologic.guardrails.core :refer [>def >defn >fdef => | <- ?]]
[com.wsscode.pathom.core :as p]))
(>def ::sort-by-expr
(s/cat :attr keyword? :direction (s/? #{::asc ::desc})))
(>def ::sort-by
(s/or :single keyword?
:dir... | null | https://raw.githubusercontent.com/wilkerlucio/pathom/4ec25055d3d156241e9174d68ec438c93c971b9b/src/com/wsscode/pathom/map_db.cljc | clojure | (ns com.wsscode.pathom.map-db
(:require
[clojure.spec.alpha :as s]
[com.fulcrologic.guardrails.core :refer [>def >defn >fdef => | <- ?]]
[com.wsscode.pathom.core :as p]))
(>def ::sort-by-expr
(s/cat :attr keyword? :direction (s/? #{::asc ::desc})))
(>def ::sort-by
(s/or :single keyword?
:dir... | |
61375e3e673eea1fe3a0e776246d7dede8e47edf94123e00c85bd04872394a84 | WorksHub/client | events.cljs | (ns wh.login.github-callback.events
(:require
[re-frame.core :refer [reg-event-fx reg-event-db inject-cofx]]
[wh.common.fx.persistent-state]
[wh.db :as db]
[wh.login.db :as login]
[wh.login.github-callback.db :as github-callback]
[wh.login.shared :as login-shared]
[wh.pages.core :as pages ... | null | https://raw.githubusercontent.com/WorksHub/client/a44372f7a42fdb4a9a64d2da8faf038f37b7d00b/client/src/wh/login/github_callback/events.cljs | clojure | if persistent-state was empty, that means persisting
state didn't work (e.g. in incognito mode). Let's use
existing app-db – we lose pre-login context, but better
that than rendering nothing at all.
Note that in a company context we don't even need
persisting app-db. | (ns wh.login.github-callback.events
(:require
[re-frame.core :refer [reg-event-fx reg-event-db inject-cofx]]
[wh.common.fx.persistent-state]
[wh.db :as db]
[wh.login.db :as login]
[wh.login.github-callback.db :as github-callback]
[wh.login.shared :as login-shared]
[wh.pages.core :as pages ... |
4014a8aa85670773d0e1cd1bdccb9c62e69b2ad074a05e459b8443167c6a3699 | mumuki/mulang | FragmentParser.hs | module Language.Mulang.Analyzer.FragmentParser (
parseFragment',
parseFragment) where
import Control.Fallible (orFail)
import Language.Mulang
import Language.Mulang.Parsers (EitherParser, maybeToEither)
import Language.Mulang.Parsers.Haskell
import Language.Mulang.Parsers... | null | https://raw.githubusercontent.com/mumuki/mulang/92684f687566b2adafb331eae5b5916e2d90709e/src/Language/Mulang/Analyzer/FragmentParser.hs | haskell | module Language.Mulang.Analyzer.FragmentParser (
parseFragment',
parseFragment) where
import Control.Fallible (orFail)
import Language.Mulang
import Language.Mulang.Parsers (EitherParser, maybeToEither)
import Language.Mulang.Parsers.Haskell
import Language.Mulang.Parsers... | |
e3cda35a5458bf18c30dd5205af358c6b3f737d81b31f25aae7e4a8364fa6116 | clojure-interop/google-cloud-clients | core.clj | (ns com.google.cloud.videointelligence.v1p1beta1.stub.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[com.google.cloud.videointelligence.v1p1beta1.stub.GrpcVideoIntelligenceServiceCallableFactory])
(require '[com.google.cloud.videointelligence.v1p1beta1.stub.GrpcVideoIntelligenceServic... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.videointelligence/src/com/google/cloud/videointelligence/v1p1beta1/stub/core.clj | clojure | (ns com.google.cloud.videointelligence.v1p1beta1.stub.core
(:refer-clojure :only [require comment defn ->])
(:import ))
(require '[com.google.cloud.videointelligence.v1p1beta1.stub.GrpcVideoIntelligenceServiceCallableFactory])
(require '[com.google.cloud.videointelligence.v1p1beta1.stub.GrpcVideoIntelligenceServic... | |
a1f32dbae7e6547023f87df0cfd7fd01471ed91d88ac56021f6711f2ff0671ff | AbstractMachinesLab/caramel | pprintast.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/ocaml/parsing/404/pprintast.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | , OCamlPro
, University of Pennsylvania
Copyright 2007 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Original Code from Ber - metaocaml , modified... |
18d5576bb95b23394313939fd46c210efd08837ee2cd640084a9fa938075e09e | nniclausse/manderlbot | mdb_connection.erl | %%%----------------------------------------------------------------------
%%% File : mdb_connection.erl
Author : < >
%%% Purpose : Connection management library.
%%% Used by mdb_bot.erl
Created : 16 Sep 2001 , < >
%%%----------------------------------------------------------------------
%%%
%%%... | null | https://raw.githubusercontent.com/nniclausse/manderlbot/a65cfffc50801c09551b70d6bbd7a19e6b2c57dd/src/mdb_connection.erl | erlang | ----------------------------------------------------------------------
File : mdb_connection.erl
Purpose : Connection management library.
Used by mdb_bot.erl
----------------------------------------------------------------------
This program is free software; you can redistribute it and/or modify
(... | Author : < >
Created : 16 Sep 2001 , < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
the EPL license and distribute linked combinations including
the two . If you modify this file , you may extend this ex... |
b00518cb23ac1b439471eb2fd94cf19ec1ed1e5b5ec7579efe299dd1c0338b61 | maxcountryman/hyperlight | project.clj | (defproject hyperlight "0.3.1"
:description "A performance-focused HTTP reverse proxy"
:license {:name "Eclipse Public License"}
:dependencies [[aleph "0.4.4-alpha4"]
[org.clojure/clojure "1.9.0-alpha14"]]
:jvm-opts ^:replace ["-server"
"-XX:+UseConcMarkSweepGC"
... | null | https://raw.githubusercontent.com/maxcountryman/hyperlight/8b27db2ca0d90bdcd361159547103efddcd592f8/project.clj | clojure | (defproject hyperlight "0.3.1"
:description "A performance-focused HTTP reverse proxy"
:license {:name "Eclipse Public License"}
:dependencies [[aleph "0.4.4-alpha4"]
[org.clojure/clojure "1.9.0-alpha14"]]
:jvm-opts ^:replace ["-server"
"-XX:+UseConcMarkSweepGC"
... | |
3ae16ed8f49d4ab02460c8512ce29d7fc9e36f00ba3459bc730b629dbebad961 | Gizra/ihp-simple-seat-reservation | Config.hs | module Config where
import IHP.Prelude
import IHP.Environment
import IHP.FrameworkConfig
import Web.View.CustomCSSFramework
import IHP.Mail
config :: ConfigBuilder
config = do
option Development
option (AppHostname "localhost")
option customTailwind
option $
SMTP
{ host = "127.0.1.... | null | https://raw.githubusercontent.com/Gizra/ihp-simple-seat-reservation/316c84d6202acb05aa9398b5c5224c2058cc648c/Config/Config.hs | haskell | module Config where
import IHP.Prelude
import IHP.Environment
import IHP.FrameworkConfig
import Web.View.CustomCSSFramework
import IHP.Mail
config :: ConfigBuilder
config = do
option Development
option (AppHostname "localhost")
option customTailwind
option $
SMTP
{ host = "127.0.1.... | |
5fac4f7f9df364a70820ede6426bf17112e50e1458f10925606b2dd4b705fa5d | kelamg/HtDP2e-workthrough | ex52.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex52) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex52.rkt | racket | about the language level of this file in a form that our tools can easily process.
Intervals
- between 0 and CLOSE
- between CLOSE and HEIGHT
- below HEIGHT
distances in terms of pixels
WorldState -> WorldState
WorldState -> WorldState
computes next location of UFO
WorldState -> Image
WorldState -> Image
... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex52) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(require 2htdp/universe)
A WorldState fall... |
fcee972ae779c48938091f18645179e8dea5a6834c07bdae3c2bbabf86a9201a | korya/efuns | wX_deleg.ml | (***********************************************************************)
(* *)
(* ____ *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/toolkit/wX_deleg.ml | ocaml | *********************************************************************
____
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Xtypes
open WX_types
class base (deleg : WX_base.t) =
object
method default_font = de... |
7b0888b19b24b62e9af7794aa83f92e6bc066995da568aa55a2213a0c9e28f99 | Clojure2D/clojure2d-examples | P_1_2_1_01.clj | (ns GG.P.P-1-2-1-01
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[clojure2d.color :as c]
[fastmath.random :as r]
[fastmath.vector :as v]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(def ^:const ... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/GG/P/P_1_2_1_01.clj | clojure | (ns GG.P.P-1-2-1-01
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[clojure2d.color :as c]
[fastmath.random :as r]
[fastmath.vector :as v]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(def ^:const ... | |
b7309f058d90f9a54d37819fbc66238f3aea98440a486bc638fb5243c3e3f816 | issuu/ppx_mysql | mysql_with_identity.ml | include Ppx_mysql_runtime.Make_context (struct
module IO = struct
type 'a t = 'a
let return x = x
let bind x f = f x
end
module Prepared = struct
type dbh = Mysql.dbd
type stmt = Mysql.Prepared.stmt
type stmt_result = Mysql.Prepared.stmt_result
type error = exn
let wrap f x ... | null | https://raw.githubusercontent.com/issuu/ppx_mysql/bb9cc084c9b9422591fefefd7589255ae7d3b504/lib/mysql_with_identity/mysql_with_identity.ml | ocaml | include Ppx_mysql_runtime.Make_context (struct
module IO = struct
type 'a t = 'a
let return x = x
let bind x f = f x
end
module Prepared = struct
type dbh = Mysql.dbd
type stmt = Mysql.Prepared.stmt
type stmt_result = Mysql.Prepared.stmt_result
type error = exn
let wrap f x ... | |
284cf1422a67431d476aacf364c2f0a64d5a86bc029d5f6ee3702c928a892e00 | MassD/99 | p12.ml |
12 . Decode a run - length encoded list . ( medium )
Given a run - length code list generated as specified in the previous problem 11 , construct its uncompressed version .
12. Decode a run-length encoded list. (medium)
Given a run-length code list generated as specified in the previous problem 11, construct... | null | https://raw.githubusercontent.com/MassD/99/1d3019eb55b0d621ed1df4132315673dd812b1e1/1-28-lists/p12.ml | ocaml |
12 . Decode a run - length encoded list . ( medium )
Given a run - length code list generated as specified in the previous problem 11 , construct its uncompressed version .
12. Decode a run-length encoded list. (medium)
Given a run-length code list generated as specified in the previous problem 11, construct... | |
1f05d0e1d6c4393816106d96ce11958b2164876b62e45ff0c78674b4b08218ed | tdammers/sprinkles | EmbedVersion.hs | {-#LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Data.EmbedVersion
where
import Distribution.Version
import Distribution.Verbosity
import Distribution.Package
import Distribution.PackageDescription
import Distribution.PackageDescription.Parsec
import Language.Haskell.TH
import Language.Haskell... | null | https://raw.githubusercontent.com/tdammers/sprinkles/a9161e4506427a3cf5f686654edc7ed9aa3ea82b/src/Data/EmbedVersion.hs | haskell | #LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
module Data.EmbedVersion
where
import Distribution.Version
import Distribution.Verbosity
import Distribution.Package
import Distribution.PackageDescription
import Distribution.PackageDescription.Parsec
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
import Data.List (inter... |
86da26cbe68ece5c0a9f791fff61020c7dbb9c682caed46ec859678ac6aa2c6e | bhauman/figwheel-main | api.clj | (ns figwheel.main.api
(:require
[clojure.java.io :as io]
[figwheel.main :as fig]
[figwheel.main.logging :as log]
[figwheel.main.watching :as fww]
[figwheel.repl]))
(defn start
"Starts a Figwheel build process.
Has two arities:
(start build)
(start figwheel-config-or-build build & backgound-b... | null | https://raw.githubusercontent.com/bhauman/figwheel-main/ead06b94b1b2747ed37e5d8c37118d6e7ae77193/src/figwheel/main/api.clj | clojure | a required string build id
a required map of cljs compile options
an options map of figwheel.main config options
The simplest and most common case. This will start figwheel just like
`clojure -m figwheel.main -b dev -r`
With inline build config
With inline figwheel config
With inline figwheel and build config:
... | (ns figwheel.main.api
(:require
[clojure.java.io :as io]
[figwheel.main :as fig]
[figwheel.main.logging :as log]
[figwheel.main.watching :as fww]
[figwheel.repl]))
(defn start
"Starts a Figwheel build process.
Has two arities:
(start build)
(start figwheel-config-or-build build & backgound-b... |
347191bad3914ae3118b4074927c1f2890eac007f566b9aa872ebe0b316370c4 | reflectionalist/S9fES | while.scm | Scheme 9 from Empty Space , Function Library
By , 2010
; Placed in the Public Domain
;
; (until <test-expression> <body>) ==> unspecific
; (while <test-expression> <body>) ==> unspecific
;
; (load-from-library "while.scm")
;
The WHILE form first evaluates < test - expression > . When it evaluates
; to a ... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/while.scm | scheme | Placed in the Public Domain
(until <test-expression> <body>) ==> unspecific
(while <test-expression> <body>) ==> unspecific
(load-from-library "while.scm")
to a true value, it also evaluates <body>, which is a sequence of
expressions. The expressions will be evaluated in order and then the
WHILE form wi... | Scheme 9 from Empty Space , Function Library
By , 2010
The WHILE form first evaluates < test - expression > . When it evaluates
( while ( < x 10 )
( set ! y ( * 2 y ) )
y ) = = > 1024
(load-from-library "when.scm")
(define-syntax (while p . ... |
9930baf5ac8457582a259fc6c35ad577c8dd74f845da31e96073966ce35539da | sinahab/shamir-secret-sharing | ShamirSpec.hs | module ShamirSpec (main, spec) where
import Test.Hspec
import Shamir (createShares, combineShares, Share (..))
import Util (combinations)
-- `main` is here so that this module can be run from GHCi on its own. It is
-- not needed for automatic spec discovery.
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
... | null | https://raw.githubusercontent.com/sinahab/shamir-secret-sharing/9c39190f52f2316962d597fc5307819d68c7c790/test/ShamirSpec.hs | haskell | `main` is here so that this module can be run from GHCi on its own. It is
not needed for automatic spec discovery.
functions used to test whether the secret was recovered.
combinations of lt threshold shares do not recreate the secret. | module ShamirSpec (main, spec) where
import Test.Hspec
import Shamir (createShares, combineShares, Share (..))
import Util (combinations)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "createShares" $ do
it "Creates n shares" $ do
shares <- createShares 1234 3 6
length shares `sh... |
8c69352f8f792e255ddffebbda92a85c70d55fa67f6bdbf4ddb3ec54edfdc486 | Commonfare-net/macao-social-wallet | confirm_transaction_form.clj | (ns freecoin.views.confirm-transaction-form
(:require [freecoin.form_helpers :as fh]
[clavatar.core :as clavatar]
[freecoin.routes :as routes]
[freecoin-lib.config :as config]
[auxiliary.translation :as t]))
(defn confirm-transaction-form-spec [confirmation-uid show-pi... | null | https://raw.githubusercontent.com/Commonfare-net/macao-social-wallet/d3724d6c706cdaa669c59da439fe48b0373e17b7/src/freecoin/views/confirm_transaction_form.clj | clojure | (ns freecoin.views.confirm-transaction-form
(:require [freecoin.form_helpers :as fh]
[clavatar.core :as clavatar]
[freecoin.routes :as routes]
[freecoin-lib.config :as config]
[auxiliary.translation :as t]))
(defn confirm-transaction-form-spec [confirmation-uid show-pi... | |
a23c61895b3a3986072c8cd92ac558d1fa7f054979df663384032bd8a6232035 | tonyg/kali-scheme | type.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
; The types.
(define :syntax
(loophole :type syntax-type))
(define :values
(loophole :type any-values-type))
(define :arguments
(loophole :type any-arguments-type))
(define :value
(loo... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/bcomp/type.scm | scheme | The types.
Use the definitions of PROC and SOME-VALUES from the meta-types module
Various base types
Temporary | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
(define :syntax
(loophole :type syntax-type))
(define :values
(loophole :type any-values-type))
(define :arguments
(loophole :type any-arguments-type))
(define :value
(loophole :type v... |
9e52ee31e71c1f4c4d4f0a8aa83153ecc01563565a0678b9ddfd7f3a17343ecd | andrenth/ocaml-mariadb | blocking.ml | open Util
module B = Binding_wrappers
module T = Ffi_bindings.Types(Ffi_generated_types)
module Time = Time
module Field = Field
module Row = Row
type t = [`Blocking] Common.t
type mariadb = t
type error = Common.error
type 'a result = ('a, error) Stdlib.result
type flag = Common.flag =
| Compress
| Found_rows... | null | https://raw.githubusercontent.com/andrenth/ocaml-mariadb/3ae20e7d58b30b75e47ad3f34b94bb32df2666b1/lib/blocking.ml | ocaml | open Util
module B = Binding_wrappers
module T = Ffi_bindings.Types(Ffi_generated_types)
module Time = Time
module Field = Field
module Row = Row
type t = [`Blocking] Common.t
type mariadb = t
type error = Common.error
type 'a result = ('a, error) Stdlib.result
type flag = Common.flag =
| Compress
| Found_rows... | |
22e72a523654d83c83999718cd4f25f9001d39a9ed58ed3f0be983802a23b789 | cert-lv/pastelyzer | json-api.lisp | (in-package #:pastelyzer)
(defun provider-urls (provider id)
(cond ((string= "circl" provider)
(mapcar #'remote-content-location
(multiple-value-list (circl-provider-id-to-url id))))
((string= "web" provider)
(list id))
(t
nil)))
(defmethod content-uri ((c... | null | https://raw.githubusercontent.com/cert-lv/pastelyzer/278caeaafd5073300b5ee5bc9b801be5bd4f8637/src/json-api.lisp | lisp | XXX: What if the content does not exist? Should we respond
with not-found instead of an empty set?
XXX: This should definitely respond with not-found if the
content does not exist?
XXX: For now all our usernames in credentials are
emails. | (in-package #:pastelyzer)
(defun provider-urls (provider id)
(cond ((string= "circl" provider)
(mapcar #'remote-content-location
(multiple-value-list (circl-provider-id-to-url id))))
((string= "web" provider)
(list id))
(t
nil)))
(defmethod content-uri ((c... |
af099889c2eb8b9d5f74086bf4f49e8cbab31824e217db1e1af1916f3d0643f5 | takikawa/racket-ppa | syntax.rkt | #lang racket/base
(require racket/private/place-local
racket/fixnum
(only-in racket/unsafe/ops unsafe-struct*-cas!)
"../compile/serialize-property.rkt"
"../compile/serialize-state.rkt"
"../common/set.rkt"
"../common/inline.rkt"
"../namespace/inspector.rkt"
... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/src/expander/syntax/syntax.rkt | racket | includes `syntax?`
Used for content wrapped with scope propagations and/or a taint,
so a `content*` is either a `modified-content` or plain content
datum and nested syntax objects; mutated for lazy propagation
scopes that apply at all phases
scopes with a distinct identity at each phase; maybe a fallback search
... | #lang racket/base
(require racket/private/place-local
racket/fixnum
(only-in racket/unsafe/ops unsafe-struct*-cas!)
"../compile/serialize-property.rkt"
"../compile/serialize-state.rkt"
"../common/set.rkt"
"../common/inline.rkt"
"../namespace/inspector.rkt"
... |
8fb302ef00890603a3ccd9c6ce97fe62000c3bbb6c8b8459a013bda7df374755 | vmchale/apple | Name.hs | # LANGUAGE DeriveFoldable #
{-# LANGUAGE DeriveFunctor #-}
module Name ( Name (..)
, TyName
) where
import Control.DeepSeq (NFData (..))
import qualified Data.Text as T
import Prettyprinter (Pretty (..))
import U
type TyName a = Name a
data Name a = Nam... | null | https://raw.githubusercontent.com/vmchale/apple/39b6040994f0c6c4897e1ec7bd01277e5c8d4e71/src/Name.hs | haskell | # LANGUAGE DeriveFunctor #
TODO: prettyprinter library?
pretty (Name n (U i) _) = pretty n <> pretty i | # LANGUAGE DeriveFoldable #
module Name ( Name (..)
, TyName
) where
import Control.DeepSeq (NFData (..))
import qualified Data.Text as T
import Prettyprinter (Pretty (..))
import U
type TyName a = Name a
data Name a = Name { name :: T.Text
... |
ae34acbbf10d62b3319b494021c5f52190265a6776570f76cac2bb58315c6ef1 | weldr/bdcs | Depclose.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
-- |
-- Module: BDCS.Depclose
Copyright : ( c ) 2016 - 2017 Red Hat , Inc.
-- License: LGPL
--
Maintainer :
-- Stability: alpha
-- Portability: portable
--
-- Collect all the dependencies for a package, but do not solve them.
module BDCS.Depclose(DepFormu... | null | https://raw.githubusercontent.com/weldr/bdcs/cf360c3240644b4847336b9d58b2067f3aa1ec50/src/BDCS/Depclose.hs | haskell | |
Module: BDCS.Depclose
License: LGPL
Stability: alpha
Portability: portable
Collect all the dependencies for a package, but do not solve them.
The Set is used to store the groups that are parents of the current subexpression,
used to detect dependency loops and stop recursion. For instance:
A Requires B
... | # LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
Copyright : ( c ) 2016 - 2017 Red Hat , Inc.
Maintainer :
module BDCS.Depclose(DepFormula,
depcloseGroupIds,
depcloseNEVRAs,
depcloseNames)
where
import Codec.RPM.Version(DepRequir... |
17d0684529008b2620fb34c3925848ec66e0ec173e96e5123c651061f5d0c5cd | Ramarren/cffi-clutter | package.lisp | (defpackage :cffi-clutter
(:use :cl :cffi :alexandria)
(:export
;; foreign constants
#:+true+
#:+false+
#:+priority-high+
#:+priority-default+
#:+priority-high-idle+
#:+priority-default-idle+
#:+priority-low+
foreign
#:vertex
#:button-event
#:key-event
#:motion-event
#:sc... | null | https://raw.githubusercontent.com/Ramarren/cffi-clutter/498314cf5aa593e57a724252ae65dcf4ac9a835d/package.lisp | lisp | foreign constants
foreign types | (defpackage :cffi-clutter
(:use :cl :cffi :alexandria)
(:export
#:+true+
#:+false+
#:+priority-high+
#:+priority-default+
#:+priority-high-idle+
#:+priority-default-idle+
#:+priority-low+
foreign
#:vertex
#:button-event
#:key-event
#:motion-event
#:scroll-event
#:stage-st... |
ee58be54ec278a14ea4d847078107102856506fd5a145d80336d48f30aac6449 | ixmatus/orgmode-parse | Util.hs | |
Module : Data . . . . Util
Copyright : © 2017 Parnell Springmeyer
License : All Rights Reserved
Maintainer : Parnell Springmeyer < >
Stability : stable
Attoparsec utilities .
Module : Data.OrgMode.Parse.Attoparsec.Util
Copyright : © 2017 Parnell Springmeyer
Lic... | null | https://raw.githubusercontent.com/ixmatus/orgmode-parse/89adc4087556bb0dd58a7648a9e7e239463aa059/src/Data/OrgMode/Parse/Attoparsec/Util.hs | haskell | | Skip whitespace characters, only!
@Data.Char@ which also includes control characters such as a return
and newline which we need to *not* consume in some cases during
parsing.
| Parse a non-heading line of a section. | |
Module : Data . . . . Util
Copyright : © 2017 Parnell Springmeyer
License : All Rights Reserved
Maintainer : Parnell Springmeyer < >
Stability : stable
Attoparsec utilities .
Module : Data.OrgMode.Parse.Attoparsec.Util
Copyright : © 2017 Parnell Springmeyer
Lic... |
9f381e7d8d1baac050df61227a463f8d57a43c45b781ea3ff80ce6decc667b83 | jarohen/advent-of-code | day9.clj | (ns aoc2021.day9
(:require [clojure.string :as str]
[sss.arrows :refer [->>%]]
[clojure.test :as t]
[clojure.java.io :as io]
[clojure.set :as set])
(:import java.util.Comparator))
(def example-data (str/trim "
2199943210
3987894921
9856789892
8767896789
9899965678"))... | null | https://raw.githubusercontent.com/jarohen/advent-of-code/d03e6d1ed308909dc4701c42ef8973ffe18dbef7/2021/src/aoc2021/day9.clj | clojure | (ns aoc2021.day9
(:require [clojure.string :as str]
[sss.arrows :refer [->>%]]
[clojure.test :as t]
[clojure.java.io :as io]
[clojure.set :as set])
(:import java.util.Comparator))
(def example-data (str/trim "
2199943210
3987894921
9856789892
8767896789
9899965678"))... | |
6854cc6529de024717add60fe7bf5441fbc1cfd70eecfa89c765b0581a5d1a4b | clingen-data-model/genegraph | document_store.clj | (ns genegraph.sink.document-store
(:require [genegraph.rocksdb :as rocks]
[clojure.string :as s]
[cheshire.core :as json]
[mount.core :as mount :refer [defstate]]))
(defstate db
:start (rocks/open "document_store")
:stop (rocks/close db))
(def an-event
{:genegraph.annotate/... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/baae07c26b8ac4913a47d93e2959a8de5b9d63c3/src/genegraph/sink/document_store.clj | clojure | (ns genegraph.sink.document-store
(:require [genegraph.rocksdb :as rocks]
[clojure.string :as s]
[cheshire.core :as json]
[mount.core :as mount :refer [defstate]]))
(defstate db
:start (rocks/open "document_store")
:stop (rocks/close db))
(def an-event
{:genegraph.annotate/... | |
8c4b8e424fb5558d8574db6a7248901785f5af7a8304c104bc91c43c644c81d8 | jacekschae/learn-datomic-course-files | responses.clj | (ns cheffy.responses
(:require [spec-tools.data-spec :as ds]))
(def base-url "")
(def step
{:step/step-id string?
:step/sort int?
:step/description string?
:step/recipe-id string?})
(def ingredient
{:ingredient/ingredient-id string?
:ingredient/sort int?
:ingredient/name string?
:ingredient/a... | null | https://raw.githubusercontent.com/jacekschae/learn-datomic-course-files/be20cd3f77c70fac33c95f3231f0ccdf41525f67/increments/63-squuid/src/main/cheffy/responses.clj | clojure | (ns cheffy.responses
(:require [spec-tools.data-spec :as ds]))
(def base-url "")
(def step
{:step/step-id string?
:step/sort int?
:step/description string?
:step/recipe-id string?})
(def ingredient
{:ingredient/ingredient-id string?
:ingredient/sort int?
:ingredient/name string?
:ingredient/a... | |
52b4846a46378e3a7f383a39146dc4e5106365a56bdc1aebf0e313e3d50e575a | tommaisey/aeon | clip2.help.scm | ;; (clip2 a b)
;; Bilateral clipping. clips a to +/- b
(audition
(out 0 (clip2 (f-sin-osc ar 400 0) 0.2)))
(audition
(out 0 (clip2 (f-sin-osc ar 400 0) (line kr 0 1 8 remove-synth))))
| null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/binary-ops/clip2.help.scm | scheme | (clip2 a b)
Bilateral clipping. clips a to +/- b |
(audition
(out 0 (clip2 (f-sin-osc ar 400 0) 0.2)))
(audition
(out 0 (clip2 (f-sin-osc ar 400 0) (line kr 0 1 8 remove-synth))))
|
499faabdc5a5816d0d80399876b4020cf4f99e3d7782c26aa6a596e9ad131b9a | simedw/Kandidat | Util.hs | {-# LANGUAGE PackageImports #-}
module Util where
import "mtl" Control.Monad.State
import Data.Function
import Data.List
import qualified Data.Map as M
import System( getArgs )
import System.Directory
import System.FilePath
import qualified Text.PrettyPrint.ANSI.Leijen as PP
import Parser.Diabetes
import qualified Pa... | null | https://raw.githubusercontent.com/simedw/Kandidat/fbf68edf5b003aba2ce13dac32ee1b94172d57d8/test/Util.hs | haskell | # LANGUAGE PackageImports # | module Util where
import "mtl" Control.Monad.State
import Data.Function
import Data.List
import qualified Data.Map as M
import System( getArgs )
import System.Directory
import System.FilePath
import qualified Text.PrettyPrint.ANSI.Leijen as PP
import Parser.Diabetes
import qualified Parser.Locals as Locals
import Par... |
498ba20be00c0b7d8d4e3be9d0e1ed6978ff331137ac03961d21acdbc05a3675 | pietervdvn/ALGT | MinDistance.hs | # LANGUAGE TemplateHaskell #
module Graphs.MinDistance (minDistance) where
{-
Given connections
x ::= y | z
w ::= x
and start values:
y -> 0
z -> ?
x -> ?
w -> ?
We calculate the minimum distance to a start value (where each hop has a cost one)
-}
import Utils.Utils
import qualified Data.Map as M
import Data... | null | https://raw.githubusercontent.com/pietervdvn/ALGT/43a2811931be6daf1362f37cb16f99375ca4999e/src/Graphs/MinDistance.hs | haskell |
Given connections
x ::= y | z
w ::= x
and start values:
y -> 0
z -> ?
x -> ?
w -> ?
We calculate the minimum distance to a start value (where each hop has a cost one)
smaller path found! | # LANGUAGE TemplateHaskell #
module Graphs.MinDistance (minDistance) where
import Utils.Utils
import qualified Data.Map as M
import Data.Map (Map)
import qualified Data.Set as S
import Graphs.DirectedGraph
import Data.Maybe
import Data.Set
import Data.List (nub)
import qualified Data.List as L
import Control.Monad.... |
706c65b0c142f1030048224633f0eed7a912f13ea817e695dc538ca2db9503f9 | ThoughtWorksInc/stonecutter | user.clj | (ns stonecutter.integration.kerodon.user
(:require [midje.sweet :refer :all]
[kerodon.core :as k]
[clauth.client :as cl-client]
[stonecutter.email :as email]
[stonecutter.db.storage :as s]
[stonecutter.logging :as l]
[stonecutter.db.user :as user... | null | https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/test/stonecutter/integration/kerodon/user.clj | clojure | (ns stonecutter.integration.kerodon.user
(:require [midje.sweet :refer :all]
[kerodon.core :as k]
[clauth.client :as cl-client]
[stonecutter.email :as email]
[stonecutter.db.storage :as s]
[stonecutter.logging :as l]
[stonecutter.db.user :as user... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.