_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 |
|---|---|---|---|---|---|---|---|---|
4e1ec1375b114581213586b456f604af83562d37fe7da97ae8098e4b85866e93 | k0ral/imm | Logger.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
-- | Logger module abstracts over logging data.
--
This module follows the [ Handle pattern]( / posts/2018 - 03 - 08 - handle - pattern.html ) .
--
> import qualified Imm... | null | https://raw.githubusercontent.com/k0ral/imm/eae96d96297aec0533bfcb88393827613e4235eb/src/lib/Imm/Logger.hs | haskell | # LANGUAGE FlexibleContexts #
| Logger module abstracts over logging data.
{{{ Imports
}}}
* Types | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
This module follows the [ Handle pattern]( / posts/2018 - 03 - 08 - handle - pattern.html ) .
> import qualified Imm . Logger as Logger ( Handle )
> import . Logger hiding ( Handle )
module Imm.Logger where... |
4c7f27278d22347ecf8eb84e4b420234d10c6cc914ca96602df24dc4c6fa5613 | overminder/YAC | Frame.hs | module Backend.X64.Frame (
Frame(..),
FrameGen,
runFrameGen,
insertProAndEpilogue,
insertCallerSave,
patchCalleeMovArg,
formatOutput,
nextTemp,
newStackLoc,
setStorageType,
getStorageType,
allocReg,
freeReg,
allocTempReg,
restoreTempRegs,
setFuncName,
setFuncArgs,
recordCallArgCount... | null | https://raw.githubusercontent.com/overminder/YAC/4a2633a81bc2d5880d1e7948b0cce0037ed788b1/Backend/X64/Frame.hs | haskell | Defs
Note: none of the scratch regs are callee-saved.
rcx is reserved for use in shift operations (sal, sar).
rsp and rip are treated differently
patches
XXX: hack, in case we are calling a vararg function.
including rbp
i32Min :: Int
| module Backend.X64.Frame (
Frame(..),
FrameGen,
runFrameGen,
insertProAndEpilogue,
insertCallerSave,
patchCalleeMovArg,
formatOutput,
nextTemp,
newStackLoc,
setStorageType,
getStorageType,
allocReg,
freeReg,
allocTempReg,
restoreTempRegs,
setFuncName,
setFuncArgs,
recordCallArgCount... |
937a4e2738a5c0052d5527c1bb84ae7f993b1f07942bacd978dc946e58ecb20c | zadean/xqerl | prod_GeneralComp_le_SUITE.erl | -module('prod_GeneralComp_le_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['generalexpression298'/1]).
-export(['generalexpression299'/1]).
-export(['... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_GeneralComp_le_SUITE.erl | erlang | -module('prod_GeneralComp_le_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['generalexpression298'/1]).
-export(['generalexpression299'/1]).
-export(['... | |
c517aaa8c10d9ec0e5faa3d5d146fb84abda2e75bce66000281b8d23fdfdb421 | zadean/xqerl | array_fold_left_SUITE.erl | -module('array_fold_left_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['array-fold-left-101'/1]).
-export(['array-fold-left-102'/1]).
-export(['array-... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/array/array_fold_left_SUITE.erl | erlang | -module('array_fold_left_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['array-fold-left-101'/1]).
-export(['array-fold-left-102'/1]).
-export(['array-... | |
e19b687567802b191a5d3b1d39d85a3d6186e49ca8dee15b6a4f3f4c1ae0e6f2 | morpheusgraphql/morpheus-graphql | Selection.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.Error.Selection
( unknownSelectionField,
subfieldsNotSelected,
hasNoSubfields,
)
where
import Data.Morpheus.Types.Internal.AST
( FieldName,
GQLError,
Position,
Ref (..),
Typ... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/cfaadc6f8491548bccab856757e95584946681b7/morpheus-graphql-core/src/Data/Morpheus/Error/Selection.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.Error.Selection
( unknownSelectionField,
subfieldsNotSelected,
hasNoSubfields,
)
where
import Data.Morpheus.Types.Internal.AST
( FieldName,
GQLError,
Position,
Ref (..),
TypeDefinition (..),
TypeName,
... |
6ab9f66caf5953ca0208e2bc3f5c7b207c395df100b70011946c908a3b4c241c | spurious/sagittarius-scheme-mirror | pkcs12.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; security/keystore/pkcs12.scm - Generic interface for PKCS#12
;;;
Copyright ( c ) 2010 - 2015 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; ... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/security/keystore/pkcs12.scm | scheme | coding : utf-8 ; -*-
security/keystore/pkcs12.scm - Generic interface for PKCS#12
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
... | Copyright ( c ) 2010 - 2015 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (security keystore pkcs12)
(exp... |
3368090f1aadb34a16069bc279833fbf61d08d8586559221622e11c46a9087c5 | winny-/aoc | day07.rkt | #lang debug racket
(define (read2 [ip (current-input-port)])
(match (read-line ip)
[(? eof-object? e) e]
[s (map string->number (string-split s ","))]))
(define (go ls fuel-cost)
(for/fold ([min-fuel #f])
([target (in-range (argmin identity ls)
(add1 (argmax iden... | null | https://raw.githubusercontent.com/winny-/aoc/f5cd5830dd05f31c4ec95d62ea50bf2cdae34e81/2021/day07/day07.rkt | racket | (1,3,6,10 ...) and it says its A000217 Triangular numbers.
Local Variables:
compile-command: "racket day07.rkt < sample.txt"
End: | #lang debug racket
(define (read2 [ip (current-input-port)])
(match (read-line ip)
[(? eof-object? e) e]
[s (map string->number (string-split s ","))]))
(define (go ls fuel-cost)
(for/fold ([min-fuel #f])
([target (in-range (argmin identity ls)
(add1 (argmax iden... |
68ca67fa7b7c4a4aa8a6f17425003cdd00595d03f74658e2f8537ef5f4ee5bea | ItsMeijers/Lambdabox | Types.hs | # LANGUAGE DeriveGeneric , DuplicateRecordFields #
module Binance.Internal.Account.Stream.Types
( DataStream(..)
) where
import GHC.Generics
import Data.Aeson.Extended
import Data.Text (Text)
-- | Model that is returned for opening a data stream from Binance
data DataStream = DataStream
{ listenKey :: !T... | null | https://raw.githubusercontent.com/ItsMeijers/Lambdabox/c19a8ae7d37b9f8ab5054d558fe788a5d4483092/src/Binance/Internal/Account/Stream/Types.hs | haskell | | Model that is returned for opening a data stream from Binance | # LANGUAGE DeriveGeneric , DuplicateRecordFields #
module Binance.Internal.Account.Stream.Types
( DataStream(..)
) where
import GHC.Generics
import Data.Aeson.Extended
import Data.Text (Text)
data DataStream = DataStream
{ listenKey :: !Text
} deriving (Show, Eq, Generic)
instance FromJSON DataStrea... |
dac2bab508fe73b3953a2eb2bee4affef872ededf3076afcb1249bb0db7aab65 | conreality/conreality | ros.ml | (* This is free and unencumbered software released into the public domain. *)
open Prelude
| null | https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/messaging/ros.ml | ocaml | This is free and unencumbered software released into the public domain. |
open Prelude
|
14975871565c210da3951930f5fea19de0d7db74435d97023ad8f4abb48ea642 | ygmpkk/house | Dynamic.hs | {-# OPTIONS -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Dynamic
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : exper... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/base/Data/Dynamic.hs | haskell | # OPTIONS -fno-implicit-prelude #
---------------------------------------------------------------------------
|
Module : Data.Dynamic
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
with operations for converting dynami... | Copyright : ( c ) The University of Glasgow 2001
The Dynamic interface provides basic support for dynamic types .
Operations for injecting values of arbitrary type into
a dynamically typed value , Dynamic , are provided , together
module Data.Dynamic
(
Module Data . re - exported for convenience
mo... |
44d5436f4a64f349616500d3fdd91bc70e6f4e84e7bd7dbc3cd14a05b0993a07 | duo-lang/duo-lang | Completion.hs | module LSP.Handler.Completion (completionHandler) where
import Control.Monad.IO.Class (liftIO)
import Data.Text (Text)
import Language.LSP.Types
import Language.LSP.Server
import System.Log.Logger ( debugM )
import LSP.Definition
completionHandler :: Handlers LSPMonad
completionHandler = requestHandler STextDocument... | null | https://raw.githubusercontent.com/duo-lang/duo-lang/c4928ede3378313b74bb07fef67086c72346d585/app/LSP/Handler/Completion.hs | haskell | module LSP.Handler.Completion (completionHandler) where
import Control.Monad.IO.Class (liftIO)
import Data.Text (Text)
import Language.LSP.Types
import Language.LSP.Server
import System.Log.Logger ( debugM )
import LSP.Definition
completionHandler :: Handlers LSPMonad
completionHandler = requestHandler STextDocument... | |
bc8c81ffcbf698dff419e77e084c1da4c27d19c2843a56de23b819f08bc23644 | stchang/macrotypes | filter-maximal.rkt | #lang racket/base
(require rackunit
(only-in racket/list in-permutations)
(only-in racket/set set=? subset?)
turnstile/examples/util/filter-maximal)
(define-check (check-filter-maximal lst <? expected)
(test-begin
(for ([p (in-permutations lst)])
(check set=? (filter-maximal p <?)... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/filter-maximal.rkt | racket | #lang racket/base
(require rackunit
(only-in racket/list in-permutations)
(only-in racket/set set=? subset?)
turnstile/examples/util/filter-maximal)
(define-check (check-filter-maximal lst <? expected)
(test-begin
(for ([p (in-permutations lst)])
(check set=? (filter-maximal p <?)... | |
557e5cfdef8df66927c5136d5f8c8fdde0b0b10a158451e65278aee371e27175 | tmoerman/sourire | core.clj | (ns sourire.core
(:require [plumbing.core :refer [map-keys map-vals]]
[sourire.victorinox :refer [kw->str]])
(:import [com.ggasoftware.indigo Indigo
IndigoRenderer]))
(defn clean [opts] (->> opts
(map-keys kw->str)
(map-... | null | https://raw.githubusercontent.com/tmoerman/sourire/0f1042812c7104917986677bea2d59e5ea7ff55a/src/sourire/core.clj | clojure | (ns sourire.core
(:require [plumbing.core :refer [map-keys map-vals]]
[sourire.victorinox :refer [kw->str]])
(:import [com.ggasoftware.indigo Indigo
IndigoRenderer]))
(defn clean [opts] (->> opts
(map-keys kw->str)
(map-... | |
5ccae6ec594a2881163174c7185e08524980a3a4a4f3dafbee61301ecf4e7f9f | google/mlir-hs | Setup.hs | Copyright 2021 Google LLC
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writing, software
distributed un... | null | https://raw.githubusercontent.com/google/mlir-hs/30c1c908df3b6676d3f022dc5ff73dabfd55fbe0/Setup.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2021 Google LLC
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
import Data.Char
import Data.List
import Data.Maybe
import System.Directory
import System.FilePath
import Distribution.ModuleName hiding (main)
im... |
a59fef2a495afc652bfa556e73439f9ca78450ef8cf160513673eafc93a76af5 | reflectionalist/S9fES | s9e1.scm | #! /usr/local/bin/s9e-core -f
; A command for invoking the S9 Editor.
by ,
; Placed in the Public Domain
;
; Usage: s9e [-r] [file]
When not using an S9E heap image , uncomment one of the below :
;(load "./contrib/s9e.scm")
;(load-from-library "s9e.scm")
;(load-from-library "parse-optionsb.scm")
(define sho... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/prog/s9e1.scm | scheme | A command for invoking the S9 Editor.
Placed in the Public Domain
Usage: s9e [-r] [file]
(load "./contrib/s9e.scm")
(load-from-library "s9e.scm")
(load-from-library "parse-optionsb.scm") | #! /usr/local/bin/s9e-core -f
by ,
When not using an S9E heap image , uncomment one of the below :
(define show-help (option #\h #f))
(define read-only (option #\r #f))
(define options `(,read-only
,show-help))
(define (usage)
(display "Usage: s9e [-r] [file]")
(newline))
(le... |
63c433d5141ecd145b38bfd6e7ff8cd090ba8fb18898ea831e9df979263cb97e | AlexKnauth/unnwraith | lam.rkt | #lang unnwraith racket
require syntax/parse
module+ test:
require rackunit
struct Val [v] ~transparent
struct Var [x] ~transparent
struct App [f, a] ~transparent
struct Lam [x, b] ~transparent
struct If [i, t, e] ~transparent
define (parse stx):
syntax-parse stx ~datum-literals [λ, if]
| n
~declare n numbe... | null | https://raw.githubusercontent.com/AlexKnauth/unnwraith/e1df42081ad7116ec64c2c865725a4ddd2352b0f/unnwraith/test/lam.rkt | racket | λ (env): v
v
hash-ref env x
((ntp f) env) ((ntp a) env)
λ (x): λ (y): x + y
λ (x): λ (y): x - y
λ (x): λ (y): x * y
λ (x): λ (y): x / y | #lang unnwraith racket
require syntax/parse
module+ test:
require rackunit
struct Val [v] ~transparent
struct Var [x] ~transparent
struct App [f, a] ~transparent
struct Lam [x, b] ~transparent
struct If [i, t, e] ~transparent
define (parse stx):
syntax-parse stx ~datum-literals [λ, if]
| n
~declare n numbe... |
d4b67a49e2c9b32a73f6d45409e8ed1ff80b413daaa60e48425589087688c62f | LdBeth/keim | top.lisp | ;;; -*- Package: KEIM; Syntax: Common-lisp; Mode: LISP -*-
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;; ;;
Copyright ( C ) 1993 by AG Siekmann , , ; ;
Universitaet des Saarlandes , Saarbr... | null | https://raw.githubusercontent.com/LdBeth/keim/ed2665d3b0d9a78eaa88b5a2940a4541f0750926/keim/prog/term/top.lisp | lisp | -*- Package: KEIM; Syntax: Common-lisp; Mode: LISP -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;;
;
;
All rights reserved. ;;
For information about th... |
(in-package "KEIM")
(mod~defmod top :uses (abstr appl keim mod pos sym term )
:documentation "Extended functionality for simple terms."
:exports (
top~term-linear-p
top~free-variables
top~=free-variables
top~replace-term
top~replace-term!
top~replace-term!!
... |
ba4cb26bdba8395ceae8a7d39170d5b7f888d2415c4e043aa3317ba16301580c | mflatt/shrubbery-rhombus-0 | write.rkt | #lang racket/base
(require racket/keyword
racket/symbol)
;; Writing a shubbery represented as an S-expression
(provide write-shrubbery)
(define rx:identifier #px"^(?:\\p{L}|_)(?:\\p{L}|\\p{N}|_)*$")
(define (write-shrubbery v [op (current-output-port)])
(cond
[(and (pair? v) (eq? 'group (car v)))
... | null | https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/2d440206d3ffbf4123d6f78bd3b7f1df6d6a5520/shrubbery/write.rkt | racket | Writing a shubbery represented as an S-expression
printing a raw group | #lang racket/base
(require racket/keyword
racket/symbol)
(provide write-shrubbery)
(define rx:identifier #px"^(?:\\p{L}|_)(?:\\p{L}|\\p{N}|_)*$")
(define (write-shrubbery v [op (current-output-port)])
(cond
[(and (pair? v) (eq? 'group (car v)))
(display "«" op)
(write-shrubbery-term v op)
... |
c3ced6176dfb8c1427c29bdce7ba41cb81c68485ee67df9c6f56931c43f5df58 | returntocorp/semgrep | visitor.mli | (* This is the same visitor type that is used by CIL *)
type 'a visitAction =
| SkipChildren
(** Do not visit the children. Return
the node as it is. *)
| DoChildren
(** Continue with the children of this
node. Rebui... | null | https://raw.githubusercontent.com/returntocorp/semgrep/00f1e67bbb80f00e29db3381288fc00398b6868a/languages/ruby/ast/visitor.mli | ocaml | This is the same visitor type that is used by CIL
* Do not visit the children. Return
the node as it is.
* Continue with the children of this
node. Rebuild the node on return
if any of ... | type 'a visitAction =
| SkipChildren
| DoChildren
| ChangeTo of 'a
* Replace the expression with the
given one
given one *)
| ChangeDoChildrenPost of 'a * ('a -> 'a)
* First consider that the entire
... |
1962af7d359ae8af3ea43c7172b760817bf13042386b14488e06e2411c6ec1d0 | Helium4Haskell/helium | KindBindingGroup.hs | data A = A (B Int)
data B a = B (A a)
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/kinderrors/KindBindingGroup.hs | haskell | data A = A (B Int)
data B a = B (A a)
| |
42c68150722710d7c199d9cbfd9a4139408a3378346bace4729bb6425d7ca437 | airbus-seclab/bincat | data.ml |
This file is part of BinCAT .
Copyright 2014 - 2018 - Airbus
BinCAT is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or ( at your
opti... | null | https://raw.githubusercontent.com/airbus-seclab/bincat/ab4787e7fa70c3fc4bd2399e0e695fef446a5e81/ocaml/src/data-struct/data.ml | ocaml | * Word data type
the integer is the size in bits
* returns the lowest n bit of the given int
* [truncate w n] returns the lowest n bits of w
* binary operation on words supposed to have the same size
result is truncated to have size of the operands
* Address Data Type
these memory regions are supposed not t... |
This file is part of BinCAT .
Copyright 2014 - 2018 - Airbus
BinCAT is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or ( at your
opti... |
886955927d904e733c92ca4bc19d4174214da5f7e0f8fa86b56a4457e209a468 | dmitryvk/sbcl-win32-threads | tests.lisp | (defpackage sb-cover-test
(:use "CL"))
(in-package sb-cover-test)
(defparameter *path* #.(truename *compile-file-pathname*))
(defparameter *output-directory*
(merge-pathnames (make-pathname :name nil
:type nil
:version nil
... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/contrib/sb-cover/tests.lisp | lisp | No instrumentation
None of the code was executed
Call the function again
And now we should have complete expression coverage
Reset-coverage clears the instrumentation
So none of the code should be marked as executed
Forget all about that file
Another file, with some branches
Complete expression coverage
Parti... | (defpackage sb-cover-test
(:use "CL"))
(in-package sb-cover-test)
(defparameter *path* #.(truename *compile-file-pathname*))
(defparameter *output-directory*
(merge-pathnames (make-pathname :name nil
:type nil
:version nil
... |
74375b52e5873e778909c602505c1d6c59f0236b8d8040f21f6c520b891cfc7a | nubank/k8s-api | swagger_test.clj | (ns kubernetes-api.swagger-test
(:require [clojure.test :refer :all]
[kubernetes-api.swagger :as swagger]))
(deftest remove-watch-endpoints-test
(is (= {:paths {"/foo/bar" 'irrelevant
"/foo/baz" 'irrelevant}}
(swagger/remove-watch-endpoints
{:paths {"/foo/bar" ... | null | https://raw.githubusercontent.com/nubank/k8s-api/5d8fb2e3ef789222f98092d48af454d297a41bc7/test/kubernetes_api/swagger_test.clj | clojure | (ns kubernetes-api.swagger-test
(:require [clojure.test :refer :all]
[kubernetes-api.swagger :as swagger]))
(deftest remove-watch-endpoints-test
(is (= {:paths {"/foo/bar" 'irrelevant
"/foo/baz" 'irrelevant}}
(swagger/remove-watch-endpoints
{:paths {"/foo/bar" ... | |
ed8ee6f2e0183ec3cb62b7d5fcb902692255f3f6209b5d8a059ffeb869846e5b | vrc-lt/VRC-Slide-Server | Internal.hs | # LANGUAGE FlexibleContexts #
module DataStore.Internal where
import Control.Monad.Logger ( runStdoutLoggingT )
import Control.Monad.Trans.Reader ( runReaderT
, ReaderT
)
import C... | null | https://raw.githubusercontent.com/vrc-lt/VRC-Slide-Server/b8d401aabd61c003cbdf440c22ea006a83586499/src/DataStore/Internal.hs | haskell | # LANGUAGE FlexibleContexts #
module DataStore.Internal where
import Control.Monad.Logger ( runStdoutLoggingT )
import Control.Monad.Trans.Reader ( runReaderT
, ReaderT
)
import C... | |
971cb1f298b66b2562e367eadcfc920d687216de295fd8a00f6040fbd293685c | shayan-najd/QFeldspar | Live.hs | import Prelude
import System.Process
import QFeldspar.QDSL
Syntax :
GHC Haskell ( almost )
Typed Quotations
domain - specific constructs
=
fully applied variables
Primitives :
- constructors and destructors for each datatype
- overloaded arithmetic operators
-... | null | https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/Examples/DSLDISS/Live.hs | haskell | while :: Rep a =>
(a -> Bool) -> (a -> a) -> a -> a | import Prelude
import System.Process
import QFeldspar.QDSL
Syntax :
GHC Haskell ( almost )
Typed Quotations
domain - specific constructs
=
fully applied variables
Primitives :
- constructors and destructors for each datatype
- overloaded arithmetic operators
-... |
7b3e95237eaecc7afec4b5ea995b21e015a072b46df1518217d2dc72947d76ea | brendanhay/gogol | Update.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-tagmanager/gen/Gogol/TagManager/Accounts/Containers/Workspaces/Zones/Update.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Updates a GTM Zone.
/See:/ <-manager Tag Manager API Reference> for @tagmanager.accounts.containers.workspaces.zones.update@.
* Resource
** Constructing a Request
'TagManagerAccountsContainersWorkspacesZonesUpdate' request co... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
bea24c85be7b8753975e8007c1d06a25027cc2e9455dbcb12a97abd9e3aa4eb5 | xebia/VisualReview | image_test.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Copyright 2015 Xebia B.V.
;
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 requir... | null | https://raw.githubusercontent.com/xebia/VisualReview/c74c18ff73cbf11ece23203cb7a7768e626a03e2/src/integration/clojure/com/xebia/visualreview/itest/image_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2015 Xebia B.V.
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.xebia.visualreview.itest.image-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[com.xebia.visualr... |
af51c6b979f016e0d77c179cd89e4b6f782069afe67a0c97a13076d74a7b5b67 | erlangonrails/devdb | shaper.erl | %%%----------------------------------------------------------------------
%%% File : shaper.erl
Author : < >
%%% Purpose : Functions to control connections traffic
Created : 9 Feb 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
%%%
%%% This program is free software; you can r... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ejabberd-2.1.4/src/shaper.erl | erlang | ----------------------------------------------------------------------
File : shaper.erl
Purpose : Functions to control connections traffic
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be us... | Author : < >
Created : 9 Feb 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Found... |
1b743192fb3063790d233d0a4dfe0f7b84cf3867cce5dda580fe5c57b5fc57b9 | well-typed/large-records | R000.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.SR_UpdateOne.Sized.R000 where
| null | https://raw.githubusercontent.com/well-typed/large-records/01259511c38fe480f5c4aff6c3d613923d7ea1b3/large-records-benchmarks/bench/superrecord/Experiment/SR_UpdateOne/Sized/R000.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.SR_UpdateOne.Sized.R000 where
|
ec60857b5265d871a45aa5af92e73b92d4c82d5adf527d88713c4832233b14d9 | simnalamburt/snucse.pl | poly_checker.ml |
* SNU 4190.310 Programming Languages 2015 Fall
* Type Checker
*
* < >
* < >
* SNU 4190.310 Programming Languages 2015 Fall
* Type Checker
*
* Jaeseung Choi <>
* Hyeon Kim <>
*)
open M
(*
* Mainly used types
*)
type var = string
type typ =
| TInt
| TBool
| TString
| TPair of typ ... | null | https://raw.githubusercontent.com/simnalamburt/snucse.pl/a130f826c6f27224c88b0dd2e1588f35bccc9ebb/hw8/poly_checker.ml | ocaml |
* Mainly used types
Definitions related to free type variable
* Definitions related to substitution
Precondition: query = name
substitution composition
* Type checking
TODO: 정리 |
* SNU 4190.310 Programming Languages 2015 Fall
* Type Checker
*
* < >
* < >
* SNU 4190.310 Programming Languages 2015 Fall
* Type Checker
*
* Jaeseung Choi <>
* Hyeon Kim <>
*)
open M
type var = string
type typ =
| TInt
| TBool
| TString
| TPair of typ * typ
| TLoc of typ
| TF... |
41d67d3670c3919f0a0ecf8bea6254b80465b987bd1b2aee21d446d90c5086d3 | caradoc-org/caradoc | selectview.mli | (*****************************************************************************)
(* Caradoc: a PDF parser and validator *)
Copyright ( C ) 2017
(* *)
(* This program is... | null | https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/ui/selectview.mli | ocaml | ***************************************************************************
Caradoc: a PDF parser and validator
This program is free software; you can redistribute it and/or modify
... | Copyright ( C ) 2017
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation .
You should have received a copy of the GNU General Public License along
with this program ; if n... |
bc692af90a982978b4f1e388f42019ebc7793cb6012ac04adb406d73e8215f97 | ocaml-batteries-team/batteries-included | batRef.mli |
* Ref - Operations on references
* Copyright ( C ) 2008
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your optio... | null | https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/f143ef5ec583d87d538b8f06f06d046d64555e90/src/batRef.mli | ocaml | * The type of references.
* Return a fresh reference containing the given value.
* [!r] returns the current contents of reference [r].
Equivalent to [fun r -> r.contents].
* [r := a] stores the value of [a] in reference [r].
Equivalent to [fun r v -> r.contents <- v].
* As [ := ]
* As [ ! ]
* [copy r] retur... |
* Ref - Operations on references
* Copyright ( C ) 2008
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your optio... |
9132c64ce7505365086150ffa1a2cff472de21f1e9d5e4bad0f13745ff86144a | nathanmarz/storm-deploy | project.clj | (defproject storm-deploy "0.0.6-SNAPSHOT"
:source-paths ["src/clj"]
:test-paths ["test/clj"]
:profiles {:dev {:resource-paths ["conf"]}}
:aliases {"deploy-storm" ["run" "-m" "backtype.storm.provision"]}
:repositories {
"sonatype" ""
"jclouds-snapshot" ""
}
... | null | https://raw.githubusercontent.com/nathanmarz/storm-deploy/b97265bb8b79f84f5907deb826c702e9c4947305/project.clj | clojure | (defproject storm-deploy "0.0.6-SNAPSHOT"
:source-paths ["src/clj"]
:test-paths ["test/clj"]
:profiles {:dev {:resource-paths ["conf"]}}
:aliases {"deploy-storm" ["run" "-m" "backtype.storm.provision"]}
:repositories {
"sonatype" ""
"jclouds-snapshot" ""
}
... | |
71c8fe3f5d2c6bd7c8d663242251aeb157e511bdbee9751b0c10739f615a3033 | ygrek/ocaml-extlib | test_ExtHashtbl.ml |
* ExtLib Testing Suite
* Copyright ( C ) 2013 ygrek
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) an... | null | https://raw.githubusercontent.com/ygrek/ocaml-extlib/0779f7a881c76f9aca3d5445e2f063ba38a76167/test/test_ExtHashtbl.ml | ocaml |
* ExtLib Testing Suite
* Copyright ( C ) 2013 ygrek
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) an... | |
b69999ebb3cb659d43078b87eeb2ecc3a88fd965e6dfc1aa119c113e388e0c66 | tdrhq/fiveam-matchers | delegating.lisp | (defpackage :fiveam-matchers/delegating
(:use #:cl)
(:import-from #:fiveam-matchers/core
#:describe-mismatch
#:describe-self
#:matchesp
#:matcher)
(:local-nicknames (#:a #:alexandria)))
(in-package :fiveam-matchers/delegating)
(defclass delegating-m... | null | https://raw.githubusercontent.com/tdrhq/fiveam-matchers/3dd3a3580e9c3b513d876266538cd35490fd25ca/delegating.lisp | lisp | (defpackage :fiveam-matchers/delegating
(:use #:cl)
(:import-from #:fiveam-matchers/core
#:describe-mismatch
#:describe-self
#:matchesp
#:matcher)
(:local-nicknames (#:a #:alexandria)))
(in-package :fiveam-matchers/delegating)
(defclass delegating-m... | |
42a1b27be476f5052adfc0756d9105f3908799720eab57066ecd74f3177256ba | ahrefs/devkit | mtq.ml |
ExtThread.locked , duplicated to break internal circular dependency in ExtThread
let locked mutex f = Mutex.lock mutex; Std.finally (fun () -> Mutex.unlock mutex) f ()
type 'a t = { mutex : Mutex.t; cond : Condition.t; q : 'a Queue.t; }
let create () = { mutex = Mutex.create (); cond = Condition.create (); q = Que... | null | https://raw.githubusercontent.com/ahrefs/devkit/559c2df8f6eacb091e0eac38f508c45b6567bdd8/mtq.ml | ocaml |
ExtThread.locked , duplicated to break internal circular dependency in ExtThread
let locked mutex f = Mutex.lock mutex; Std.finally (fun () -> Mutex.unlock mutex) f ()
type 'a t = { mutex : Mutex.t; cond : Condition.t; q : 'a Queue.t; }
let create () = { mutex = Mutex.create (); cond = Condition.create (); q = Que... | |
be44dbb59a320b22c7dddd92858c69fba58bb553c0c5b26c70bfc32dbd051646 | mfoemmel/erlang-otp | snmpm_network_interface.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pu... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/snmp/src/manager/snmpm_network_interface.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limit... | Copyright Ericsson AB 2004 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(snmpm_network_interface).
-export... |
dc57f7eb15961708f3c4283d812865443d25e4ded5be9732e6564a7ecf2b8409 | jgm/pandoc-citeproc | Prelude.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE PackageImports #-}
# LANGUAGE CPP #
The intent is that this Prelude provide the API of
the base 4.11 Prelude in a way that is portable for
-- all base versions.
module Prelude
(
module Prelude.Compat
, Semigroup(..)
)
where
import Prelude.Compat
import Data.Semigroup... | null | https://raw.githubusercontent.com/jgm/pandoc-citeproc/473378e588c40a6c3cb3b24330431b89cf4f81b4/prelude/Prelude.hs | haskell | # LANGUAGE PackageImports #
all base versions.
includes (<>) | # LANGUAGE NoImplicitPrelude #
# LANGUAGE CPP #
The intent is that this Prelude provide the API of
the base 4.11 Prelude in a way that is portable for
module Prelude
(
module Prelude.Compat
, Semigroup(..)
)
where
import Prelude.Compat
|
02d55db7af5ed55cc91cf1b28ada9819f2c3fe54e89aff47d3dee33d84d8d8c5 | danieljharvey/mimsa | ExprUtils.hs | # LANGUAGE TupleSections #
module Language.Mimsa.Core.ExprUtils
( withMonoid,
mapExpr,
bindExpr,
toEmptyAnnotation,
getAnnotation,
mapPattern,
nameFromIdent,
detailsFromIdent,
)
where
import Data.Bifunctor (second)
import qualified Data.List.NonEmpty as NE
import qualified Data.Map.Str... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/core/src/Language/Mimsa/Core/ExprUtils.hs | haskell | -----
-----
| Removes any annotations in the expression, useful when serialising
expressions
| Given a function `f` that turns any piece of the expression in a Monoid
`m`, flatten the entire expression into `m`
| Map a function `f` over the expression. This function takes care of
| Bind a function `f` over the ex... | # LANGUAGE TupleSections #
module Language.Mimsa.Core.ExprUtils
( withMonoid,
mapExpr,
bindExpr,
toEmptyAnnotation,
getAnnotation,
mapPattern,
nameFromIdent,
detailsFromIdent,
)
where
import Data.Bifunctor (second)
import qualified Data.List.NonEmpty as NE
import qualified Data.Map.Str... |
01c64a756cae37bfdbcd00ef04f084c448fad94ac17cdca2e530b161f89a63a6 | openmusic-project/openmusic | svg.lisp | ;;; -*- Mode: LISP; Syntax: Common-lisp; Package: cl-svg; Lowercase: Yes -*-
$ Id$
;;;
Copyright ( c ) 2008 . All rights reserved .
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistribution... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/externals/cl-svg/svg.lisp | lisp | -*- Mode: LISP; Syntax: Common-lisp; Package: cl-svg; Lowercase: Yes -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditi... | $ Id$
Copyright ( c ) 2008 . All rights reserved .
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ` ` AS IS '' AND
IMPLIED WARRANTIES OF MERCHANTABILITY AND... |
197d52c094076bbd8563762d20d9b027945a12ef68172c52b54ac39f6c82d592 | hellonico/origami-fun | detection.clj | (ns opencv4.detection
(:require
[opencv4.core :refer :all]
[opencv4.colors.rgb :as color]))
;;;
; face detection
;;;
(defn draw-rect
[mat rect _color]
(rectangle
mat
(new-point (.-x rect) (.-y rect))
(new-point (+ (.-width rect) (.-x rect)) (+ (.-height rect) (.-y rect)))
_color
5))
... | null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/detection.clj | clojure |
face detection
face detection
eyes detection
palm detection
fist (none found)
fist and palm both found | (ns opencv4.detection
(:require
[opencv4.core :refer :all]
[opencv4.colors.rgb :as color]))
(defn draw-rect
[mat rect _color]
(rectangle
mat
(new-point (.-x rect) (.-y rect))
(new-point (+ (.-width rect) (.-x rect)) (+ (.-height rect) (.-y rect)))
_color
5))
(defn recognize
([xml-... |
0b9afb6638bff45bbd97ba816d68482ecda9cbc9571d0eedd782b356871cb141 | GlideAngle/flare-timing | Angle.hs | {-# OPTIONS_GHC -fplugin Data.UnitsOfMeasure.Plugin #-}
# OPTIONS_GHC -fno - warn - orphans #
module Flight.Units.Angle (Angle(..), halfPi, deg90, deg270) where
import Data.Fixed (divMod', mod')
import Data.UnitsOfMeasure ((+:), (*:), u, convert, fromRational', toRational')
import Data.UnitsOfMeasure.Internal (Quanti... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/172a9b199eb1ff72c967669dc349cbf8d9c4bc52/lang-haskell/units/library/Flight/Units/Angle.hs | haskell | # OPTIONS_GHC -fplugin Data.UnitsOfMeasure.Plugin #
| -π <= a <= +π
| -π/2 <= a <= +π/2
^ rotation
^ initial angle
^ final angle
|
Nothing
Nothing | # OPTIONS_GHC -fno - warn - orphans #
module Flight.Units.Angle (Angle(..), halfPi, deg90, deg270) where
import Data.Fixed (divMod', mod')
import Data.UnitsOfMeasure ((+:), (*:), u, convert, fromRational', toRational')
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Data.UnitsOfMeasure.Convert (Convertible)... |
784308e7d1926c3fc08800b2d18c4f545058fcd48e77c1fa90e1ee2da43ff6a9 | apibot-org/apibot | schemas.clj | (ns apibot.schemas
(:require [schema.core :as s]))
(s/defschema User
{(s/optional-key :id) s/Str
:user-id s/Str
:email s/Str
:picture s/Str})
(s/defschema Edge
{:source s/Str
:target s/Str
:id s/Str})
(s/defschema Node
{:id s/Str
:graph-id s/S... | null | https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/clj/apibot/schemas.clj | clojure | (ns apibot.schemas
(:require [schema.core :as s]))
(s/defschema User
{(s/optional-key :id) s/Str
:user-id s/Str
:email s/Str
:picture s/Str})
(s/defschema Edge
{:source s/Str
:target s/Str
:id s/Str})
(s/defschema Node
{:id s/Str
:graph-id s/S... | |
5222d079f2fd4abdb3ec2236074c85cc499b84da2f36771d5c72730ba7b292f7 | zotonic/cowmachine | main.erl | -module(main).
-behaviour(gen_server).
-export([start_link/0]). % convenience call for startup
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]). % gen_server callbacks
-define(SERVER, ?MODULE). % macro just defines this module as server
... | null | https://raw.githubusercontent.com/zotonic/cowmachine/ad592a3e70ccce87434e3555c58fa1664bfa00c6/examples/file_server/src/main.erl | erlang | convenience call for startup
gen_server callbacks
macro just defines this module as server
convenience function for startup
gen_server callbacks
The listener name is used to refer to this listener in future calls
Use this module as middleware, and controller
TypeOfCallingCowmachine = 1+1,
... add your dispatch... | -module(main).
-behaviour(gen_server).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
start_link() ->
gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
init([]) ->
ServerPid = startServer(),
{ok, [ServerPid]}.
handle_call(_Request, _From, State) ... |
475c99d563c4649219ae87af40e0bb870bc258c5f7387b20464f95466069ab9e | PEZ/rich4clojure | problem_103.clj | (ns rich4clojure.medium.problem-103
(:require [hyperfiddle.rcf :refer [tests]]))
;; = Generating k-combinations =
By 4Clojure user : patsp
;; Difficulty: Medium
Tags : [ seqs combinatorics ]
;;
;; Given a sequence S consisting of n elements generate
all k - combinations of S , i. e. generate all possible
;; s... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/2ccfac041840e9b1550f0a69b9becbdb03f9525b/src/rich4clojure/medium/problem_103.clj | clojure | = Generating k-combinations =
Difficulty: Medium
Given a sequence S consisting of n elements generate
sets consisting of k distinct elements taken from S.
The number of k-combinations for a sequence is equal
to the binomial coefficient .
Share your solution, and/or check how others did it:
| (ns rich4clojure.medium.problem-103
(:require [hyperfiddle.rcf :refer [tests]]))
By 4Clojure user : patsp
Tags : [ seqs combinatorics ]
all k - combinations of S , i. e. generate all possible
(def __ :tests-will-fail)
(comment
)
(tests
(__ 1 #{4 5 6}) := #{#{4} #{5} #{6}}
(__ 10 #{4 5 6}) := #{}
... |
781eed36a0e0eb835efe6f22de8c5ee87ef00f788e2cfc8c65e61de4dc1e1f6e | gorillalabs/sparkling | project.clj | (defproject gorillalabs/sparkling "2.1.3"
:description "A Clojure Library for Apache Spark"
:url "/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url ""}
:dependencies [[org.clojure/tools.logging "0.3.1"]
[org.clojure/clojure "1.7.0" :sco... | null | https://raw.githubusercontent.com/gorillalabs/sparkling/2870dbd8b2277eb06376da4e41336f91e35f4526/project.clj | clojure | so gen-class stuff works in the repl
test with | (defproject gorillalabs/sparkling "2.1.3"
:description "A Clojure Library for Apache Spark"
:url "/"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url ""}
:dependencies [[org.clojure/tools.logging "0.3.1"]
[org.clojure/clojure "1.7.0" :sco... |
b9a08a926288217ba1f575efdaf29bdbc1c1258131b1b2e1fcd6588458ddcd9e | lgessler/glam | subs.clj | (ns glam.algos.subs
(:require [glam.xtdb.common :as gcc]
[glam.server.pathom-parser :refer [mutation?]]))
(defn get-messages [node tx response]
(let [messages (transient [])]
(doseq [item tx]
(when (and (mutation? item)
(gcc/document-mutation? item)
;; respo... | null | https://raw.githubusercontent.com/lgessler/glam/bbf5b7adecf1de873e117c3859b4cd799c395bee/src/main/glam/algos/subs.clj | clojure | response looks like {glam.models.span/batched-update #:server{...}}
assume that the mutation response will be the only item in the response
and only trigger the push notification if the mutation did not fail | (ns glam.algos.subs
(:require [glam.xtdb.common :as gcc]
[glam.server.pathom-parser :refer [mutation?]]))
(defn get-messages [node tx response]
(let [messages (transient [])]
(doseq [item tx]
(when (and (mutation? item)
(gcc/document-mutation? item)
(not (->... |
87400393f08ce055fb335cc22788009d62230d0408b71d5c8eaf4708d6a68210 | fab13n/lamtez | standard_ctx.ml | open Ast
open Typecheck_ctx
let ctx = empty
|> add_alias "unit" ([], tunit)
|> add_sum "zero" [] []
|> add_sum "bool" [] ["False", tunit; "True", tunit]
|> add_prim "nat" []
|> add_prim "int" []
|> add_prim "time" []
|> add_prim "key" []
|> add_prim "string" []
|> add_prim ... | null | https://raw.githubusercontent.com/fab13n/lamtez/ec0aab3093ca8380a4cd364f21cf763d729de25f/standard_ctx.ml | ocaml | misc.
contract manipulation
key -> key? -> bool -> bool -> tez -> (p*g -> r*g) -> g -> g -> contract p r
key -> key? -> bool -> tez -> contract unit unit
This contract's self-awareness
crypto
key -> signature -> string -> bool
sets
maps
lists | open Ast
open Typecheck_ctx
let ctx = empty
|> add_alias "unit" ([], tunit)
|> add_sum "zero" [] []
|> add_sum "bool" [] ["False", tunit; "True", tunit]
|> add_prim "nat" []
|> add_prim "int" []
|> add_prim "time" []
|> add_prim "key" []
|> add_prim "string" []
|> add_prim ... |
c65a6caabd8ea45590ee7279b7b1e7f15164cd4106c6cc6c01f1dca708c949ef | ermine/sulci | muc_sql.ml | (* DO NOT EDIT MANUALLY *)
(* *)
generated by sqlgg 0.2.3 - 49 - g30df037 on 2010 - 01 - 14T17:45Z
module Make (T : Sqlgg_traits.M) = struct
let create_muc db =
T.execute db "CREATE TABLE IF NOT EXISTS muc (room text, nick text, lang text, chatlog char(1))" T.no_params
let select_rooms db callback =
... | null | https://raw.githubusercontent.com/ermine/sulci/3ee4bd609b01e2093a6d37bf74579728d0a93b70/src/muc_sql.ml | ocaml | DO NOT EDIT MANUALLY
module Make | generated by sqlgg 0.2.3 - 49 - g30df037 on 2010 - 01 - 14T17:45Z
module Make (T : Sqlgg_traits.M) = struct
let create_muc db =
T.execute db "CREATE TABLE IF NOT EXISTS muc (room text, nick text, lang text, chatlog char(1))" T.no_params
let select_rooms db callback =
let invoke_callback stmt =
... |
15fa718a571297056428e3a71bb99b8db3876a91fdd833d4d786888447c61e75 | xvw/preface | indexed_apply.ml | module type LAWS = sig
type ('a, 'index) t
include Indexed_functor.LAWS with type ('a, 'index) t := ('a, 'index) t
val apply_1 :
unit -> ((unit, 'index) t, ('a, 'index) t -> ('a, 'index) t) Law.t
val apply_2 :
unit -> (('a, 'index) t, (unit, 'index) t -> ('a, 'index) t) Law.t
end
module For (A : Pre... | null | https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_laws/indexed_apply.ml | ocaml | module type LAWS = sig
type ('a, 'index) t
include Indexed_functor.LAWS with type ('a, 'index) t := ('a, 'index) t
val apply_1 :
unit -> ((unit, 'index) t, ('a, 'index) t -> ('a, 'index) t) Law.t
val apply_2 :
unit -> (('a, 'index) t, (unit, 'index) t -> ('a, 'index) t) Law.t
end
module For (A : Pre... | |
9a3aacfd3ebe4a3053ddc396a0690a5f111550a4cea9bf9483ff042a5d967e4b | spell-music/csound-expression | Strings.hs | module Csound.Typed.Opcode.Strings (
-- * Definition.
strfromurl, strget, strset,
-- * Manipulation.
puts, sprintf, sprintfk, strcat, strcatk, strcmp, strcmpk, strcpy, strcpyk, strindex, strindexk, strlen, strlenk, strrindex, strrindexk, strsub, strsubk,
-- * Conversion.
strc... | null | https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression-opcodes/src/Csound/Typed/Opcode/Strings.hs | haskell | * Definition.
* Manipulation.
* Conversion.
Definition.
|
Set string variable to value read from an URL
strfromurl sets a string variable at
initialization time to the value found from reading an URL.
csound doc: <>
|
Set string variable to value from strset table or string p-field
strget sets a... | module Csound.Typed.Opcode.Strings (
strfromurl, strget, strset,
puts, sprintf, sprintfk, strcat, strcatk, strcmp, strcmpk, strcpy, strcpyk, strindex, strindexk, strlen, strlenk, strrindex, strrindexk, strsub, strsubk,
strchar, strchark, strlower, strlowerk, strtod, strtodk, strtol, strt... |
a9eeafad574c7f7427c856267d858a9f1a41da157f95d7e07732a63849bc5c76 | yesodweb/yesod | Content.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE OverloadedStrings #-}
module Yesod.Core.Content
( -- * Content
Content (..)
, emptyContent
, ToContent (..)
, ToFlus... | null | https://raw.githubusercontent.com/yesodweb/yesod/c74fc994ae03a2b17c73480258a18bc4a74c82fd/yesod-core/src/Yesod/Core/Content.hs | haskell | # LANGUAGE TypeSynonymInstances #
# LANGUAGE Rank2Types #
# LANGUAGE OverloadedStrings #
* Content
* Mime types
** Data type
* Utilities
* Evaluation strategy
* Representations
** Specific content types
** Smart constructors
| Zero-length enumerator.
| Anything which can be converted into 'Content'. Most of t... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
module Yesod.Core.Content
Content (..)
, emptyContent
, ToContent (..)
, ToFlushBuilder (..)
, ContentType
, typeHtml
, typePlain
, typeJson
, typeXml
, typeAtom
, typeRss... |
6059d80c5c49ec03f88d686939e6229d369eb88f27030c814116d0e0a8c9aa05 | GillianPlatform/Gillian | WBinOp.ml | type t =
| NEQ
| EQUAL
| LESSTHAN
| GREATERTHAN
| LESSEQUAL
| GREATEREQUAL
| PLUS
| MINUS
| TIMES
| DIV
| MOD
| AND
| OR
(* Lists are only for the logic *)
| LSTCONS
(* list construction a::l, only for logic *)
| LSTCAT
| LSTNTH
(* list concatenation, only for logic *)
let pp fmt b... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/190c5a054c9572c81af6bc44c6a80b8a499766f8/wisl/lib/syntax/WBinOp.ml | ocaml | Lists are only for the logic
list construction a::l, only for logic
list concatenation, only for logic | type t =
| NEQ
| EQUAL
| LESSTHAN
| GREATERTHAN
| LESSEQUAL
| GREATEREQUAL
| PLUS
| MINUS
| TIMES
| DIV
| MOD
| AND
| OR
| LSTCONS
| LSTCAT
| LSTNTH
let pp fmt b =
let s = Format.fprintf fmt "@[%s@]" in
match b with
| EQUAL -> s "="
| LESSTHAN -> s "<"
| GREATERTHAN -> s ">"
... |
ed2d76859086d9900d11634651bd3ac836d55db8a0c8fe6f258a72aae78dea68 | ocamllabs/opam-doc | bindoc_errors.ml |
type parser_error =
Unclosed of Location.t * string * string
| Expecting of string
type lexer_error =
Unmatched_verbatim
| Unmatched_target
| Unmatched_code
| Unmatched_pre_code
| Unmatched_html_code
| Unterminated_verbatim
| Unterminated_target
| Unterminated_code
| Unterminated_pre_code
| Unterminated_ref
| U... | null | https://raw.githubusercontent.com/ocamllabs/opam-doc/4f5a332750177e3016b82d5923a681510335af4c/src/bin-doc/bindoc_errors.ml | ocaml |
type parser_error =
Unclosed of Location.t * string * string
| Expecting of string
type lexer_error =
Unmatched_verbatim
| Unmatched_target
| Unmatched_code
| Unmatched_pre_code
| Unmatched_html_code
| Unterminated_verbatim
| Unterminated_target
| Unterminated_code
| Unterminated_pre_code
| Unterminated_ref
| U... | |
a6bf92aac12b1ae98578a8ab481f5b2c79f99b44b6363e396b0b990b85ff0844 | AnyChart/export-server | twitter_utils.clj | (ns export-server.sharing.twitter-utils
(:require [oauth.one :as one]
[selmer.parser :refer [render-file]]
[ring.util.response :as rutils :refer [response]]))
(defn timestamp []
(quot (System/currentTimeMillis) 1000))
(defn users-show-request [consumer access-token access-token-secret sc... | null | https://raw.githubusercontent.com/AnyChart/export-server/0ef2f084e07aaa144e38dff30e3283f686de1108/src/export_server/sharing/twitter_utils.clj | clojure | (ns export-server.sharing.twitter-utils
(:require [oauth.one :as one]
[selmer.parser :refer [render-file]]
[ring.util.response :as rutils :refer [response]]))
(defn timestamp []
(quot (System/currentTimeMillis) 1000))
(defn users-show-request [consumer access-token access-token-secret sc... | |
fc574c426e827a10abe5fe58790c5243345f9e0b541a016883b77b893a679b63 | dakrone/clojure-opennlp | train.clj | (ns opennlp.tools.train
"This namespace contains tools used to train OpenNLP models"
(:use [clojure.java.io :only [reader file input-stream output-stream]])
(:import (opennlp.tools.util PlainTextByLineStream
TrainingParameters
MarkableFileInputStreamF... | null | https://raw.githubusercontent.com/dakrone/clojure-opennlp/17627c13fe261e62e6c7ff0521fba2b6d92ec091/src/opennlp/tools/train.clj | clojure | (ns opennlp.tools.train
"This namespace contains tools used to train OpenNLP models"
(:use [clojure.java.io :only [reader file input-stream output-stream]])
(:import (opennlp.tools.util PlainTextByLineStream
TrainingParameters
MarkableFileInputStreamF... | |
84b77c7c949d7a992123de2fb329cedb124bc69044adef4adf3c73a001bfe29c | arttuka/reagent-material-ui | severe_cold_rounded.cljs | (ns reagent-mui.icons.severe-cold-rounded
"Imports @mui/icons-material/SevereColdRounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def severe-cold-rounded... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/severe_cold_rounded.cljs | clojure | (ns reagent-mui.icons.severe-cold-rounded
"Imports @mui/icons-material/SevereColdRounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def severe-cold-rounded... | |
7440bfb5a0042f836836beac46e33163e6b45ad8dee59518ad15bdbd6da48422 | patzy/glaw | particles.lisp | (in-package #:glaw)
(defstruct particle
sprite
(color (create-color 1.0 1.0 1.0))
blend-mode
(active-p nil)
(vx 0.0) (vy 0.0) (vz 0.0)
(spin 0.0)
(age 0.0)
(lifetime 10.0))
(defun particle-dead-p (particle)
(or (> (particle-age particle) (particle-lifetime particle))
(zerop (color-a (particle-... | null | https://raw.githubusercontent.com/patzy/glaw/e678fc0c107ce4b1e3ff9921a6de7e32fd39bc37/src/particles.lisp | lisp | A particle system is a group of particles with same properties
This means all particles of a system are subjects to the same set of affectors
remove dead particles
emit new particles
affect particles
update particles position & orientation
This is what creates particles
emission management
number of particles ... | (in-package #:glaw)
(defstruct particle
sprite
(color (create-color 1.0 1.0 1.0))
blend-mode
(active-p nil)
(vx 0.0) (vy 0.0) (vz 0.0)
(spin 0.0)
(age 0.0)
(lifetime 10.0))
(defun particle-dead-p (particle)
(or (> (particle-age particle) (particle-lifetime particle))
(zerop (color-a (particle-... |
519a1bb7e9195a8dc74ef49738e77e8dbc5b5dcf771f2e871d53d090292dd501 | clj-kondo/clj-kondo | parser.clj | (ns clj-kondo.impl.parser
{:no-doc true}
(:require
[clj-kondo.impl.utils :as utils :refer [parse-string-all]]))
(defn parse-string [s]
(parse-string-all s))
;;;; Scratch
(comment
(parse-string "(+ 1 2 3) #_1 2 ;; no")
(:meta (utils/parse-string "^{:a 1} [1 2 3]"))
(:meta (utils/parse-string "^{:a 1} ^... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/src/clj_kondo/impl/parser.clj | clojure | Scratch | (ns clj-kondo.impl.parser
{:no-doc true}
(:require
[clj-kondo.impl.utils :as utils :refer [parse-string-all]]))
(defn parse-string [s]
(parse-string-all s))
(comment
(parse-string "(+ 1 2 3) #_1 2 ;; no")
(:meta (utils/parse-string "^{:a 1} [1 2 3]"))
(:meta (utils/parse-string "^{:a 1} ^{:b 1} [1 2 3... |
d0f673e276dcb05f72804cc24c96047a0703467f0c113d433652d37b986b14ba | OCamlPro/typerex-lint | sUError.mli | type ('good, 'bad) t =
| IsOk of 'good
| IsError of 'bad
val return : 'a -> ('a, 'err) t
val fail : 'a -> ('ok, 'a) t
val map : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t
val map_err : ('a -> 'b) -> ('ok, 'a) t -> ('ok, 'b) t
val bind : ('a -> ('b, 'err) t) -> ('a, 'err) t -> ('b, 'err) t
val bind_err : ('a -> (... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/libs/ocplib-sempatch/lib/std_utils/sUError.mli | ocaml | type ('good, 'bad) t =
| IsOk of 'good
| IsError of 'bad
val return : 'a -> ('a, 'err) t
val fail : 'a -> ('ok, 'a) t
val map : ('a -> 'b) -> ('a, 'err) t -> ('b, 'err) t
val map_err : ('a -> 'b) -> ('ok, 'a) t -> ('ok, 'b) t
val bind : ('a -> ('b, 'err) t) -> ('a, 'err) t -> ('b, 'err) t
val bind_err : ('a -> (... | |
8e1222e470a8f7a162661c2799d130aebe9f10f16836bc93ca06b390bad7e2b9 | originrose/cortex | backend.clj | (ns cortex.compute.nn.backend
"Neural network backends provide the driver-specific computations that cannot be represented
with the generalized math layer provided in math.clj or where cudnn provides a specific optimized
implementation.
A backend is expected to have access to:
1. A specific driver.
2. A s... | null | https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/src/cortex/compute/nn/backend.clj | clojure | let an enclosing resource context deal with the resources created while the
compute device was active. | (ns cortex.compute.nn.backend
"Neural network backends provide the driver-specific computations that cannot be represented
with the generalized math layer provided in math.clj or where cudnn provides a specific optimized
implementation.
A backend is expected to have access to:
1. A specific driver.
2. A s... |
8ff6b9a02d54152e9f1f29d797ba00ee4fb1451b45af428e65774bc8bf5c6e90 | ranjitjhala/sprite-lang | Spec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import qualified Control.Concurrent.STM as STM
import qualified Data.Functor.Compose as Functor
import qualified Data.IntMap as IntMap
-- import qualified Data.Map ... | null | https://raw.githubusercontent.com/ranjitjhala/sprite-lang/bebfa8a8de6d558853145cbed8c511daa9bda3c7/test/Spec.hs | haskell | # LANGUAGE OverloadedStrings #
import qualified Data.Map as Map
import Test.Tasty.Options
that will produce incremental output, e.g. 'consoleTestReporter'.
-------------------------------------------------------------------------
---------------------------------------------------------------------... | # LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import qualified Control.Concurrent.STM as STM
import qualified Data.Functor.Compose as Functor
import qualified Data.IntMap as IntMap
import qualified Control.Monad.State as State
import Control.Monad.Trans.Cla... |
6bb51177698c7e891ebaaac0865b7568abc73ad006f4be234f95aff27820fce3 | strojure/ring-undertow | handlers.clj | (ns usage.handlers
(:require [java-http-clj.core :as http]
[strojure.ring-undertow.handler :as ring.handler]
[strojure.undertow.api.types :as types]
[strojure.undertow.server :as server]))
(defn ring-handler
"The ring handler function, both sync and async."
([request]
{:bod... | null | https://raw.githubusercontent.com/strojure/ring-undertow/42b3c7b76369cd7ab239cfac9c576283f4fe5d19/doc/usage/handlers.clj | clojure | Synchronous ring handler - explicitly
=> "Hello from localhost (sync)"
Asynchronous ring handler - explicitly
=> "Hello from localhost (async)"
## Using adapter configuration option
Synchronous ring handler - adapter in configuration
=> "Hello from localhost (sync)"
Asynchronous ring handler - adapter in configura... | (ns usage.handlers
(:require [java-http-clj.core :as http]
[strojure.ring-undertow.handler :as ring.handler]
[strojure.undertow.api.types :as types]
[strojure.undertow.server :as server]))
(defn ring-handler
"The ring handler function, both sync and async."
([request]
{:bod... |
39103434ad3f51cdee3f15cabc5e70e0d88ad03489c16e386caa8620a8badfcd | DomainDrivenArchitecture/dda-managed-vm | domain.clj | Licensed to the Apache Software Foundation ( ASF ) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
; "License"); you may not... | null | https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-managed-vm/ed44f97ef89468a4dd4bc514439df3f936c86d26/main/src/dda/pallet/dda_managed_vm/domain.clj | clojure | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 b... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an " AS IS " BASIS ,
(ns dda.pallet.dda-managed-vm.domain
(:require
[clojure.set :as set]
[schema.core :as s]
[dda.config.commons.map-utils... |
3f8f25ee041f6e78d0aa469086bf53072503df37afe74fe6a5f112dd6d82afbd | c-cube/maki | test_fib.ml | Naive fibonacci function
open Maki.E
let rec fib n =
if n<= 1 then return 1
else
let n1 = fib_memo (n-1) in
let n2 = fib_memo (n-2) in
n1 >>= fun n1 -> n2 >|= fun n2 -> n1+n2
and fib_memo n =
Maki.call
~lifetime:(Maki.Lifetime.KeepFor (Maki.Time.minutes 20))
~name:"fib"
~returning:Mak... | null | https://raw.githubusercontent.com/c-cube/maki/7067602c3b1206a92abfd221bc8950f30bb75b73/tests/test_fib.ml | ocaml | Naive fibonacci function
open Maki.E
let rec fib n =
if n<= 1 then return 1
else
let n1 = fib_memo (n-1) in
let n2 = fib_memo (n-2) in
n1 >>= fun n1 -> n2 >|= fun n2 -> n1+n2
and fib_memo n =
Maki.call
~lifetime:(Maki.Lifetime.KeepFor (Maki.Time.minutes 20))
~name:"fib"
~returning:Mak... | |
edcebc4822adbf5753d38f2e658bf9057e5cab95eefd0b11223a50f9b1dab9dd | yzh44yzh/cat_traveler | cat_traveler.erl | -module(cat_traveler).
%% Attention! Before using this API you should listen
A Cool Cat in Town . TAPE FIVE .
%%
-export([
enter/2,
leave/2,
dwell/2,
where_is_cat/1,
who_is_in_town/1
]).
-include("cat_traveler_types.hrl").
-define(srv, cat_traveler_srv).
-spec enter(cat(), town()) -> ok | {... | null | https://raw.githubusercontent.com/yzh44yzh/cat_traveler/9f771bec96458cc24bfa123c6d01c6edd52dd5ba/system.marfa/src/cat_traveler.erl | erlang | Attention! Before using this API you should listen
| -module(cat_traveler).
A Cool Cat in Town . TAPE FIVE .
-export([
enter/2,
leave/2,
dwell/2,
where_is_cat/1,
who_is_in_town/1
]).
-include("cat_traveler_types.hrl").
-define(srv, cat_traveler_srv).
-spec enter(cat(), town()) -> ok | {error, already_in_town} | {error, invalid_town}.
enter(Cat... |
654ca6a21c9909b210791682557fd97e1910c70907155dbae150b1e28f29708a | fpco/wai-middleware-consul | Consul.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
|
Module : Network . Wai . Middleware .... | null | https://raw.githubusercontent.com/fpco/wai-middleware-consul/5544d7e34f779aa061888f63fcd79fd8a67f1294/src/Network/Wai/Middleware/Consul.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Consul Settings for watching & proxying Consul data
^ Consul host address
^ Consul host port
^ Consul key
^ Filter for proxy put
^ Optional request body size limit
^ Callback when data changes
| Creates a complete Consul middleware for ... | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
|
Module : Network . Wai . Middleware . Consul
Description : WAI Middleware for Consul
Copyright : ( c ) FPComplete , ... |
6d3be91579327b283389a6d77fa773cfd4ab62755eb72494414f1c9376a14ab2 | avsm/eeww | test_semaphore.ml | let debug = false
module T = Sem_state
let test ~capacity ~users () =
let messages = ref [] in
let log fmt = (fmt ^^ "@.") |> Format.kasprintf @@ fun msg -> messages := msg :: !messages in
if debug then log "== start ==";
let t = T.create capacity in
let running = Atomic.make 0 in
let acquire fn =
if ... | null | https://raw.githubusercontent.com/avsm/eeww/ab64c5391b67fb3f5b1d3de5e0a5a5cb4c80207b/lib/eio/lib_eio/tests/dscheck/test_semaphore.ml | ocaml | Do a dummy non-cancelled operation to ensure the pointers end up together: | let debug = false
module T = Sem_state
let test ~capacity ~users () =
let messages = ref [] in
let log fmt = (fmt ^^ "@.") |> Format.kasprintf @@ fun msg -> messages := msg :: !messages in
if debug then log "== start ==";
let t = T.create capacity in
let running = Atomic.make 0 in
let acquire fn =
if ... |
91c599befeb7443a535f2beb663b9edf93bccf021e08304938f09cd4090e9f2e | roman01la/minimax | primitives.clj | (ns minimax.ui.primitives
(:require
[clojure.java.io :as io]
[minimax.mem :as mem]
[minimax.pool.core :as pool]
[minimax.resources :as res]
[minimax.ui.context :as ui.ctx]
[minimax.ui.utils :as ui.utils])
(:import (java.nio FloatBuffer)
(org.lwjgl.nanovg NVGColor NVGPaint NanoVG)
... | null | https://raw.githubusercontent.com/roman01la/minimax/f371c199d55a2a219ed7cf5f2dd2e079be99f963/src/minimax/ui/primitives.clj | clojure | Primitive elements
colors pool
insetting border
compute layout from the root | (ns minimax.ui.primitives
(:require
[clojure.java.io :as io]
[minimax.mem :as mem]
[minimax.pool.core :as pool]
[minimax.resources :as res]
[minimax.ui.context :as ui.ctx]
[minimax.ui.utils :as ui.utils])
(:import (java.nio FloatBuffer)
(org.lwjgl.nanovg NVGColor NVGPaint NanoVG)
... |
445a76108389501c61e54f5f927912e37961ecc0c703b9be9bd7bfa0ecf87152 | bazurbat/chicken-scheme | posixwin.scm | posixwin.scm - Miscellaneous file- and process - handling routines , available on Windows
;
Copyright ( c ) 2008 - 2016 , The CHICKEN Team
Copyright ( c ) 2000 - 2007 ,
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the fo... | null | https://raw.githubusercontent.com/bazurbat/chicken-scheme/f0c9d1fd8b68eb322e320e65ec40b0bf7d1b41dc/posixwin.scm | scheme |
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.
Redistribution... | posixwin.scm - Miscellaneous file- and process - handling routines , available on Windows
Copyright ( c ) 2008 - 2016 , The CHICKEN Team
Copyright ( c ) 2000 - 2007 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRE... |
b0d7c19bc6cfff8bfec8ab3bc83416ce17ec5992f89cdb862e7400ee745b583f | MLanguage/mlang | pos.ml | Copyright ( C ) 2019 - 2021 Inria , contributor :
< >
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 ... | null | https://raw.githubusercontent.com/MLanguage/mlang/a8749761a48b47e28ecc4a0390b3873615d2a9b5/src/mlang/utils/pos.ml | ocaml | * A position in the source code is a file, as well as begin and end location
of the form col:line
* Everything related to the source code should keep its t stored, to improve
error messages
* Placeholder t
should not happen | Copyright ( C ) 2019 - 2021 Inria , contributor :
< >
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 ... |
337a90527408e5dce059aa3f2605eb7507b9b78cd3d7ec68361820741d15b300 | nubank/vessel | pusher.clj | (ns vessel.jib.pusher
"Push API built on top of Google Jib."
(:require [clojure.core.async :as async :refer [<! <!! >!!]]
[clojure.data.json :as json]
[clojure.java.io :as io]
[progrock.core :as progrock]
[vessel.jib.credentials :as credentials]
[vessel.ji... | null | https://raw.githubusercontent.com/nubank/vessel/40036928d20cfd07b31b99bb2389d5421c49d26d/src/vessel/jib/pusher.clj | clojure | (ns vessel.jib.pusher
"Push API built on top of Google Jib."
(:require [clojure.core.async :as async :refer [<! <!! >!!]]
[clojure.data.json :as json]
[clojure.java.io :as io]
[progrock.core :as progrock]
[vessel.jib.credentials :as credentials]
[vessel.ji... | |
c5e885693d70e8ac75086f9fe3aa34df134402879710273002904ba6f392ab40 | janestreet/lwt-async | toplevel.ml | Lightweight thread library for
* Module Toplevel
* Copyright ( C ) 2009
*
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with link... | null | https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/src/top/toplevel.ml | ocaml | Returns [acc] plus all modules of [dir]
List all names of the module with path [path]
List all names of the module with path [path]
List all names accessible without a path
Add names of the environment:
Add accessible modules: | Lightweight thread library for
* Module Toplevel
* Copyright ( C ) 2009
*
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with link... |
8d253a2bc7342cf9cc184fabe172eeb3dd7808166481b76c135392d1586684af | tonyg/racket-something | syndicate.rkt | #lang something // -*- sth -*-
require
for-syntax something/base
only-in syndicate/actor \
assert \
message asserted retracted
except-in syndicate \
assert run-ground
prefix-in s_ syndicate/actor
prefix-in s_ syndicate/ground
provide
for-syntax (all-defined-out)
(all-defined-out)
all-from-... | null | https://raw.githubusercontent.com/tonyg/racket-something/4a00a9a6d37777f5aab4f28b03c53555b87e21d7/examples/syndicate/syndicate.rkt | racket | #lang something // -*- sth -*-
require
for-syntax something/base
only-in syndicate/actor \
assert \
message asserted retracted
except-in syndicate \
assert run-ground
prefix-in s_ syndicate/actor
prefix-in s_ syndicate/ground
provide
for-syntax (all-defined-out)
(all-defined-out)
all-from-... | |
16c68f9ae353c4a9dee0d570dd0d1766f71cf39d197bf26f853eeb7e57ff9d4d | gsdlab/clafer | Alloy.hs | # LANGUAGE RankNTypes , FlexibleContexts #
Copyright ( C ) 2012 - 2017 , , , < >
Permission is hereby granted , free of charge , to any person obtaining a copy of
this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without... | null | https://raw.githubusercontent.com/gsdlab/clafer/a30a645ae1e4fc793851e53446d220924038873a/src/Language/Clafer/Generator/Alloy.hs | haskell | | Alloy code generation
optimization: top level cardinalities
optimization: if only boolean parents, then set card is known
todo: handle multiple inheritance
-----------------------------------------------------------------------------
relations: overlapping inheritance (val rel), children
adds parent relation
... | # LANGUAGE RankNTypes , FlexibleContexts #
Copyright ( C ) 2012 - 2017 , , , < >
Permission is hereby granted , free of charge , to any person obtaining a copy of
this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without... |
85746dea36d0b5482d0066893e017786b91a340c7f7b77e9bc33910e2b9ec28d | komadori/HsQML | Harness.hs | module Graphics.QML.Test.Harness where
import Graphics.QML.Test.Framework
import Test.QuickCheck
import Test.QuickCheck.Monadic
import Test.QuickCheck.Test
import Graphics.QML
import Data.IORef
import Data.Proxy
import Data.Typeable
import Data.Maybe
import System.IO
import System.Directory
qmlPrelude :: String
qml... | null | https://raw.githubusercontent.com/komadori/HsQML/f57cffe4e3595bdf743bdbe6f44bf45a4001d35f/test/Graphics/QML/Test/Harness.hs | haskell | module Graphics.QML.Test.Harness where
import Graphics.QML.Test.Framework
import Test.QuickCheck
import Test.QuickCheck.Monadic
import Test.QuickCheck.Test
import Graphics.QML
import Data.IORef
import Data.Proxy
import Data.Typeable
import Data.Maybe
import System.IO
import System.Directory
qmlPrelude :: String
qml... | |
277943f117064f070b6ce978a36abf9e521c7cb94462db3847659107f338a06e | fulcro-legacy/semantic-ui-wrapper | ui_tab_pane.cljs | (ns fulcrologic.semantic-ui.modules.tab.ui-tab-pane
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/modules/Tab/TabPane" :default TabPane]))
(def ui-tab-pane
"A tab pane holds the content of a tab.
Props:
- active (bool): A tab pane can be active.
- ... | null | https://raw.githubusercontent.com/fulcro-legacy/semantic-ui-wrapper/b0473480ddfff18496df086bf506099ac897f18f/semantic-ui-wrappers-shadow/src/main/fulcrologic/semantic_ui/modules/tab/ui_tab_pane.cljs | clojure | (ns fulcrologic.semantic-ui.modules.tab.ui-tab-pane
(:require
[fulcrologic.semantic-ui.factory-helpers :as h]
["semantic-ui-react/dist/commonjs/modules/Tab/TabPane" :default TabPane]))
(def ui-tab-pane
"A tab pane holds the content of a tab.
Props:
- active (bool): A tab pane can be active.
- ... | |
0be6d516bb11acdf8f97efa0e5eb5b103cb93625b1f9970e0861e9c75968918d | 0install/0install | windows_api.mli | Copyright ( C ) 2019 ,
See the README file for details , or visit .
See the README file for details, or visit . *)
val v : wow64:bool -> Common.windows_api
* [ v ~wow ] is an object for interacting with Windows .
Raises an exception if the host system is not Windows .
@param wow64 This is a 64... | null | https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/support/windows_api.mli | ocaml | Copyright ( C ) 2019 ,
See the README file for details , or visit .
See the README file for details, or visit . *)
val v : wow64:bool -> Common.windows_api
* [ v ~wow ] is an object for interacting with Windows .
Raises an exception if the host system is not Windows .
@param wow64 This is a 64... | |
b186308f2fe4560ae00f2d5720c5ae7853d84d660688122ceff5c982c664af8b | xapi-project/message-switch | varstore_interfaces_test.ml | open Idl_test_common
module Privileged = struct
module GenPath = struct let test_data_path = "varstore_privileged_gen" end
module OldPath = struct
let test_data_path = "test_data/varstore/privileged"
end
module C =
Varstore_privileged_interface.RPC_API (GenTestData (GenPath) (TXmlrpc))
module T =
... | null | https://raw.githubusercontent.com/xapi-project/message-switch/1d0d1aa45c01eba144ac2826d0d88bb663e33101/xapi-idl/lib_test/varstore_interfaces_test.ml | ocaml | open Idl_test_common
module Privileged = struct
module GenPath = struct let test_data_path = "varstore_privileged_gen" end
module OldPath = struct
let test_data_path = "test_data/varstore/privileged"
end
module C =
Varstore_privileged_interface.RPC_API (GenTestData (GenPath) (TXmlrpc))
module T =
... | |
b375a9bad222fa1fb1dcd4868a966eee6e3898552a78451ba8b80c2be1994342 | cxxxr/valtan | setf.lisp | #+valtan
(in-package :common-lisp)
#-valtan
(in-package :valtan-core)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun !get-setf-expansion (place &optional environment)
(flet ((gensyms (cl:list)
(cl:mapcar (lambda (x) (declare (ignore x)) (cl:gensym)) cl:list)))
(let ((setf-expand... | null | https://raw.githubusercontent.com/cxxxr/valtan/ec3164d42b86869357dc185b747c5dfba25c0a3c/library/valtan-core/lisp/setf.lisp | lisp | TODO: restが単一のシンボルか関数ではないときの処理 | #+valtan
(in-package :common-lisp)
#-valtan
(in-package :valtan-core)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun !get-setf-expansion (place &optional environment)
(flet ((gensyms (cl:list)
(cl:mapcar (lambda (x) (declare (ignore x)) (cl:gensym)) cl:list)))
(let ((setf-expand... |
dbfbef07efb0dbd3ecb382131c0e1d216d1dd036c30f64889c66e36705801a9a | kcsongor/generic-lens | Bifunctor.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE MonoLocalBinds #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
module Main (main) where
import Optics.Core... | null | https://raw.githubusercontent.com/kcsongor/generic-lens/8e1fc7dcf444332c474fca17110d4bc554db08c8/generic-optics/test/Bifunctor.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveAnyClass #
# LANGUAGE MonoLocalBinds #
------------------------------------------------------------------------------ | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
module Main (main) where
import Optics.Core
import Control.Monad (void)
import Data.Generics.Product
import GHC.Generics
import Test.HUnit
main :: IO ()
main = void $ runTestTT... |
cc78a58da84e238461f9c0941ad77bf94b523b5f16ecf10381ae2e2b84c38c29 | nikodemus/SBCL | cold-init.lisp | ;;;; cold initialization stuff, plus some other miscellaneous stuff
;;;; that we don't have any better place for
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and rel... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/code/cold-init.lisp | lisp | cold initialization stuff, plus some other miscellaneous stuff
that we don't have any better place for
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
burning our ships behind us
There's a... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!IMPL")
Rather than using a special table of symbols to be uninterned ,
uninterned .
(defun !unintern-i... |
6909483c0c2597fef5cb60163d2d923b3ef8fd0a70083e3cec7e27cc539dc31c | RefactoringTools/wrangler | tests_all_external.erl | @private
-module(tests_all_external).
-compile([export_all]).
testTwiceX(X) -> def:twice(X).
testTwice0() -> def:twice(0).
testTwice1() -> def:twice(1).
testH(X) -> def:h(X).
testH() -> def:h(2).
testTripleX(X) -> def:triple(X).
testTwiceTimesTriple(X,Y) ->
def:twice(X) * def:triple(Y).
testTwiceOfTriple(... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/symbolic_evaluation/tests/initial/tests_all_external.erl | erlang | @private
-module(tests_all_external).
-compile([export_all]).
testTwiceX(X) -> def:twice(X).
testTwice0() -> def:twice(0).
testTwice1() -> def:twice(1).
testH(X) -> def:h(X).
testH() -> def:h(2).
testTripleX(X) -> def:triple(X).
testTwiceTimesTriple(X,Y) ->
def:twice(X) * def:triple(Y).
testTwiceOfTriple(... | |
9d6b7a4e367e5f00b957dcd3c542c2178b57b95d3ba73b832ef1e49d2d14f463 | Relph1119/sicp-solutions-manual | p1-45-damped-nth-root.scm | (load "src/practices/ch01/p1-45-expt.scm")
(load "src/practices/ch01/p1-45-average-damp-n-times.scm")
(load "src/examples/ch01/p46-fixed-point.scm")
(define (fixed-point f first-guess)
(define (close-enough? v1 v2)
(< (abs (- v1 v2)) tolerance))
(define (convergence? v0 v1 v2)
(>= (/ (abs (- v1... | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-45-damped-nth-root.scm | scheme | (load "src/practices/ch01/p1-45-expt.scm")
(load "src/practices/ch01/p1-45-average-damp-n-times.scm")
(load "src/examples/ch01/p46-fixed-point.scm")
(define (fixed-point f first-guess)
(define (close-enough? v1 v2)
(< (abs (- v1 v2)) tolerance))
(define (convergence? v0 v1 v2)
(>= (/ (abs (- v1... | |
6c4157a258dc4208cf28bab3dc1b31a2921215f5cddcb220542543aa1a36c24a | bendmorris/scotch | Config.hs | module Scotch.Config where
import System.Environment.Executable
import System.Info
major = "0"
minor = "5"
revision = "0"
version = major ++ "." ++ minor ++ "." ++ revision
environment = os
libraryPath :: IO String
libraryPath = do fullPath <- splitExecutablePath
return $ (fst fullPath) ++ ... | null | https://raw.githubusercontent.com/bendmorris/scotch/7b4bb4546d0ea3bc6b345eedc65a5d7f82c98d10/Scotch/Config.hs | haskell | module Scotch.Config where
import System.Environment.Executable
import System.Info
major = "0"
minor = "5"
revision = "0"
version = major ++ "." ++ minor ++ "." ++ revision
environment = os
libraryPath :: IO String
libraryPath = do fullPath <- splitExecutablePath
return $ (fst fullPath) ++ ... | |
9f7e6fff46839cf41a2d610d5b55e7787e2f3f2f52773eabedf9552dce1a7263 | VisionsGlobalEmpowerment/webchange | book_library.cljc | (ns webchange.utils.book-library
(:require
[webchange.utils.languages :as l]))
(def ages [{:name "0-2" :value "0-2"}
{:name "3" :value "3"}
{:name "4" :value "4"}
{:name "5" :value "5"}
{:name "6" :value "6"}
{:name "7" :value "7"}
{:name "8" :val... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/8f188bac4e6185e504376df274693730fc1ac5c9/src/cljc/webchange/utils/book_library.cljc | clojure | (ns webchange.utils.book-library
(:require
[webchange.utils.languages :as l]))
(def ages [{:name "0-2" :value "0-2"}
{:name "3" :value "3"}
{:name "4" :value "4"}
{:name "5" :value "5"}
{:name "6" :value "6"}
{:name "7" :value "7"}
{:name "8" :val... | |
f89c9fc15bc0aec03d1a2752185b13790ff15b6c85f09a6e40cf79d3cabcd6a5 | aryx/xix | timer.ml | open Common
open Types
open Timer_
type t = Timer_.t
let alloc mode ns f =
{ mode = mode;
ns = ns;
fasttk = 0;
f = Callback f;
cpu = None;
l = Ilock.alloc ();
}
let add timer xs =
(* less: assert timer is locked? *)
assert (timer.cpu = None);
(match timer.mode with
| Relative ->
... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/kernel/time/timer.ml | ocaml | less: assert timer is locked?
stricter:
less: combine with identical timer
insert in sorted list
less: assert timer is locked? | open Common
open Types
open Timer_
type t = Timer_.t
let alloc mode ns f =
{ mode = mode;
ns = ns;
fasttk = 0;
f = Callback f;
cpu = None;
l = Ilock.alloc ();
}
let add timer xs =
assert (timer.cpu = None);
(match timer.mode with
| Relative ->
if timer.ns <= 0
then failwith "t... |
e74cecaf11b8acb0e5a5df1309af55c1fe6e04f3657fd285a2953e51a0c9661e | lingnand/VIMonad | CenteredMaster.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , TypeSynonymInstances #
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.CenteredMaster
Copyright : ( c ) 2009
License : BSD - style ( see xmonad / LICENSE )
--
Maintainer : ... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Layout/CenteredMaster.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Layout.CenteredMaster
Stability : unstable
Portability : unportable
on top of all other windows, which are managed by base layout.
topRightMaster is similar, but places master window in top right corner
inst... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , TypeSynonymInstances #
Copyright : ( c ) 2009
License : BSD - style ( see xmonad / LICENSE )
Maintainer : < >
Two layout modifiers . centerMaster places master window at center ,
module XMonad.Layout.CenteredMaster (
centerMa... |
d86c9f67a8397c41d49847dfd3fd96769c9a8a22564b81a619c0fae1a2c6288f | solita/mnt-teet | project_menu.cljs | (ns teet.project.project-menu
"Menu to navigate between different project views"
(:require [teet.common.common-controller :as common-controller]
[reagent.core :as r]
[teet.ui.hotkeys :as hotkeys]
[teet.ui.common :as common]
[teet.ui.material-ui :refer [MenuList MenuIt... | null | https://raw.githubusercontent.com/solita/mnt-teet/7f0fe085c4ea9382bb3cb4dcc5a0f3836798aa32/app/frontend/src/cljs/teet/project/project_menu.cljs | clojure | Define multimethods that different views can implement to hook into
the project menu system.
The project-tab-content is the only required one.
other pages to match as this tab
Tab is active if the page is correct and
all the query params have correct values.
The page may have other query params as well.
return ... | (ns teet.project.project-menu
"Menu to navigate between different project views"
(:require [teet.common.common-controller :as common-controller]
[reagent.core :as r]
[teet.ui.hotkeys :as hotkeys]
[teet.ui.common :as common]
[teet.ui.material-ui :refer [MenuList MenuIt... |
3ff584e74cdee845a26bd3fe49caa096223d7ab75b3c4efadb5911c169d4812c | ruricolist/media-types | file-extensions.lisp | (in-package #:media-types)
(def mime.types
(asdf:system-relative-pathname :media-types "mime.types")
"Where to store Apache's mime.types file.")
(eval-always
(defun dotted-extension? (x)
(and (stringp x) (string^= "." x))))
(deftype dotted-extension ()
'(and string (satisfies dotted-extension?)))
(defty... | null | https://raw.githubusercontent.com/ruricolist/media-types/b45fd49337c6f0ba2edd6120f65883a4b9d6d6c2/file-extensions.lisp | lisp | (in-package #:media-types)
(def mime.types
(asdf:system-relative-pathname :media-types "mime.types")
"Where to store Apache's mime.types file.")
(eval-always
(defun dotted-extension? (x)
(and (stringp x) (string^= "." x))))
(deftype dotted-extension ()
'(and string (satisfies dotted-extension?)))
(defty... | |
af9b0742035dbdad43971ee49d2d0fe6cd2e9f992556d208f58979a3d920ea17 | herd/herdtools7 | variant.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/bf8f4b801fe87d91ddcabdde7116f00c4f4155eb/herd/variant.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2018 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
393c6b96759c8f93c4e146b9ded429c2b53f47afd4f9a205c58ba85cbe6aec1f | aaronps/enotepad | enotepad_config.erl | %%%-------------------------------------------------------------------
@author
( C ) 2016 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 11 . Oct 2016 06:22
%%%-------------------------------------------------------------------
-module(enotepad_config).
-author("aaronps").
-include("enotepad.hrl").
%% API
-exp... | null | https://raw.githubusercontent.com/aaronps/enotepad/d6b501ed94e8f44d1f375eb3c5b228d13b0c9dd3/src/enotepad_config.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
private
@anecdote here I had a bug, the 'C' was missing, so the initial booleans
were always false, but I didn't realize this UNTIL I began checking with
dialyzer... | @author
( C ) 2016 , < COMPANY >
Created : 11 . Oct 2016 06:22
-module(enotepad_config).
-author("aaronps").
-include("enotepad.hrl").
-export([load/0, save/1]).
-spec load() -> config().
load() ->
FileName = filename:join(config_dir(), ?CONFIG_FILE),
case file:consult(FileName) of
{ok, [#con... |
d4c2fedfb240eb3c7c5fdab86406560e8738d6f3954ca18540e187171b70e8d1 | BranchTaken/Hemlock | real.ml | open Rudiments0
module T = struct
type t = real
module Dir = struct
type t =
| Down
| Up
| Nearest
| Zero
let pp t formatter =
formatter |> Fmt.fmt (match t with
| Down -> "Down"
| Up -> "Up"
| Nearest -> "Nearest"
| Zero -> "Zero"
)
e... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/ed397cf3294ca397024e69eb3b1ed5f1db773db6/bootstrap/src/basis/real.ml | ocaml | (ds * digit) scales digit to its fractional value.
ndigits incorporates the digit that is in the suffix.
Accurate to ~15 decimal digits.
Create a list with an extra digit (half_ulp), which will be rounded.
Bit-accurate.
Round if significant bits will be omitted.
Mask out trailing bits that won't be used so... | open Rudiments0
module T = struct
type t = real
module Dir = struct
type t =
| Down
| Up
| Nearest
| Zero
let pp t formatter =
formatter |> Fmt.fmt (match t with
| Down -> "Down"
| Up -> "Up"
| Nearest -> "Nearest"
| Zero -> "Zero"
)
e... |
d6e832093b2eb90a41a8fd632df38cbf50d2e0e49d3eed039e4741eb42fc6c3e | tsloughter/grpcbox | grpcbox_channel.erl | -module(grpcbox_channel).
-behaviour(gen_statem).
-export([start_link/3,
is_ready/1,
pick/2,
stop/1,
stop/2]).
-export([init/1,
callback_mode/0,
terminate/3,
connected/3,
idle/3]).
-include("grpcbox.hrl").
-define(CHANNEL(Name), {via, gproc, {n... | null | https://raw.githubusercontent.com/tsloughter/grpcbox/1e696f6ea845eea5adaa07fbbd85019b41059d4b/src/grpcbox_channel.erl | erlang | @doc Picks a subchannel from a pool using the configured strategy. | -module(grpcbox_channel).
-behaviour(gen_statem).
-export([start_link/3,
is_ready/1,
pick/2,
stop/1,
stop/2]).
-export([init/1,
callback_mode/0,
terminate/3,
connected/3,
idle/3]).
-include("grpcbox.hrl").
-define(CHANNEL(Name), {via, gproc, {n... |
dbbf36c1b11bb6fb05a9ad810044eec6d330058304298d17511e0edac307157b | camsaul/toucan2 | delete_test.clj | (ns toucan2.delete-test
(:require
[clojure.test :refer :all]
[methodical.core :as m]
[toucan2.connection :as conn]
[toucan2.delete :as delete]
[toucan2.model :as model]
[toucan2.pipeline :as pipeline]
[toucan2.query :as query]
[toucan2.select :as select]
[toucan2.test :as test]
[toucan2.... | null | https://raw.githubusercontent.com/camsaul/toucan2/5204b34d46f5adb3e52b022218049abe9b336928/test/toucan2/delete_test.clj | clojure | (ns toucan2.delete-test
(:require
[clojure.test :refer :all]
[methodical.core :as m]
[toucan2.connection :as conn]
[toucan2.delete :as delete]
[toucan2.model :as model]
[toucan2.pipeline :as pipeline]
[toucan2.query :as query]
[toucan2.select :as select]
[toucan2.test :as test]
[toucan2.... | |
07723a343de1162a757e8ccf60315c46d78d7e776a02ee59bdb300e1d2a4b893 | id774-2/maeve | fib.scm | (define-module fib
(import core))
(select-module fib)
(define (fib n)
(if (< n 2)
1
(+ (fib (- n 2)) (fib (- n 1)))))
(define (main)
(print (fib 0))
(print (fib 1))
(print (fib 2))
(print (fib 3))
(print (fib 4))
(print (fib 5))
(print (fib 6))
(print (fib 7))
(print (fib 8))
(print (... | null | https://raw.githubusercontent.com/id774-2/maeve/a9442c3479b0d575f896b898eb889297f30e1a96/example/fib.scm | scheme | (define-module fib
(import core))
(select-module fib)
(define (fib n)
(if (< n 2)
1
(+ (fib (- n 2)) (fib (- n 1)))))
(define (main)
(print (fib 0))
(print (fib 1))
(print (fib 2))
(print (fib 3))
(print (fib 4))
(print (fib 5))
(print (fib 6))
(print (fib 7))
(print (fib 8))
(print (... | |
d500318c105c709d1d5523dd6c0493dc2b43904af346eb9837a9a98fcb3b717c | Kappa-Dev/KappaTools | KaStor.ml | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/d5e267b5923f236bf7731a9872b8a209f899dc8e/core/agents/KaStor.ml | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
let file = ref ""
let dotCflows = ref Causal.Dot
let none_compression = ref false
let weak_compression = ref false
let strong_compression = ref false
let options = [
("-o", Arg.String Kappa_files.set_cflow,
"file name skeleton for ou... |
e4080dd921b9e68fbc6c5826728d1b8da0df882e69d776ff2c4d24ae8f967ea8 | GlideAngle/flare-timing | Equation.hs | module Flight.Gap.Equation
( PowerExponent(..)
, powerExp23, powerExp56
, powerFraction
, arrivalTimePowerFraction
) where
import GHC.Generics (Generic)
import "newtype" Control.Newtype (Newtype(..))
import Data.Via.Scientific (DecimalPlaces(..), deriveDecimalPlaces, deriveJsonViaSci)
import Data.U... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/gap-allot/library/Flight/Gap/Equation.hs | haskell | |
prop> powerFraction x 0 == 0
False | module Flight.Gap.Equation
( PowerExponent(..)
, powerExp23, powerExp56
, powerFraction
, arrivalTimePowerFraction
) where
import GHC.Generics (Generic)
import "newtype" Control.Newtype (Newtype(..))
import Data.Via.Scientific (DecimalPlaces(..), deriveDecimalPlaces, deriveJsonViaSci)
import Data.U... |
08bf12d29e456b165a41e081bb01e99d27bc701ede44cb28c1e6ce90cbb47a0a | lemenkov/erlstund | stund_app.erl | %%%----------------------------------------------------------------------
Copyright ( c ) 2012 < >
%%%
%%% 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 sou... | null | https://raw.githubusercontent.com/lemenkov/erlstund/9dc24d294a7592154693c38bfef26d4974f9fa77/src/stund_app.erl | erlang | ----------------------------------------------------------------------
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
... | Copyright ( c ) 2012 < >
DISCLAIMED . IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ;
ANY THEORY OF LIABILITY , WHETHER IN CONTRAC... |
9f32a5eaa3798ff0b151e50abd990df8589353f334491fecf2883619b65916b3 | haskell-suite/haskell-src-exts | MinimalPragma.hs | class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool
x == y = not (x /= y)
x /= y = not (x == y)
{-# MINIMAL (==) | (/=) #-}
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/MinimalPragma.hs | haskell | # MINIMAL (==) | (/=) # | class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool
x == y = not (x /= y)
x /= y = not (x == y)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.