_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 |
|---|---|---|---|---|---|---|---|---|
63baea62b8dcb9ed269e717cbc828d70a88f832b27ba75dba0a8b6d65e8ae50a | montelibero-org/veche | DevelMain.hs | -- | Running your app inside GHCi.
--
-- This option provides significantly faster code reload compared to
@yesod devel@. However , you do not get automatic code reload
-- (which may be a benefit, depending on your perspective). To use this:
--
1 . Start up GHCi
--
-- $ stack ghci veche:lib --no-load --work-dir .st... | null | https://raw.githubusercontent.com/montelibero-org/veche/0c57744e288b9cc2b7ece884dcf3fdc6aed1f842/veche-web/app/DevelMain.hs | haskell | | Running your app inside GHCi.
This option provides significantly faster code reload compared to
(which may be a benefit, depending on your perspective). To use this:
$ stack ghci veche:lib --no-load --work-dir .stack-work-devel
> :l app/DevelMain.hs
> DevelMain.update
> :r
> DevelMain.update
You ... | @yesod devel@. However , you do not get automatic code reload
1 . Start up GHCi
2 . Load this module
3 . Run @update@
4 . Your app should now be running , you can connect at :3000
5 . Make changes to your code
6 . After saving your changes , reload by running :
or manually @touch@ another Haskell module... |
b129c992ef19be11bb94db7158e03fe55d7e1e102e32c1619f8894eff486dc40 | opencog/pln | contraposition.scm | ;; =============================================================================
Contraposition rule
;;
;; <implication-type-link>
;; A
;; B
;; |-
;; <implication-type-link>
;; Not B
;; Not A
;;
;; where <implication-type-link> can be
;;
ImplicationLink
InheritanceLink
;; ImplicationScopeLink
;; etc
;;
;;... | null | https://raw.githubusercontent.com/opencog/pln/0ecb520efc1439069a3c6a68eb83ad7f22e6ba5c/opencog/pln/rules/propositional/contraposition.scm | scheme | =============================================================================
<implication-type-link>
A
B
|-
<implication-type-link>
Not B
Not A
where <implication-type-link> can be
ImplicationScopeLink
etc
TODO: maybe we want shortcut rules such as
<implication-type-link>
Not A
B
|-
<... | Contraposition rule
ImplicationLink
InheritanceLink
conclusion , as the backward chainer would .
(define (gen-contraposition-rule link-type)
(let* ((A (Variable "$A"))
(B (Variable "$B"))
(AB (link-type A B))
(NBNA (link-type (Not B) (Not A)))
(vardecl (VariableList A B))
... |
4b52f4387e97a4b35139d05505f470c7a47daf561a9bad6d5ebb63e98663bc47 | imdea-software/leap | prginfo.ml |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/progs/prginfo/prginfo.ml | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
a1913f60283ca1140113a2483f8c2d952a2e59deff41886fe76a15a4aba9bf2b | ollef/sixten | Tsil.hs | {-# LANGUAGE DeriveFunctor, DeriveTraversable #-}
module Util.Tsil where
import Protolude
data Tsil a
= Nil | Snoc (Tsil a) a
deriving (Eq, Functor, Ord, Show, Traversable)
instance Semigroup (Tsil a) where
xs <> Nil = xs
xs <> Snoc ys y = Snoc (xs <> ys) y
instance Monoid (Tsil a) where
mempty = Nil
ma... | null | https://raw.githubusercontent.com/ollef/sixten/60d46eee20abd62599badea85774a9365c81af45/src/Util/Tsil.hs | haskell | # LANGUAGE DeriveFunctor, DeriveTraversable # | module Util.Tsil where
import Protolude
data Tsil a
= Nil | Snoc (Tsil a) a
deriving (Eq, Functor, Ord, Show, Traversable)
instance Semigroup (Tsil a) where
xs <> Nil = xs
xs <> Snoc ys y = Snoc (xs <> ys) y
instance Monoid (Tsil a) where
mempty = Nil
mappend = (<>)
instance Applicative Tsil where
pu... |
3bae09684cead90946025a50aa4aa0dc4feb7f44f8a93934bac956b592338c5b | Metaxal/bazaar | utils.rkt | #lang racket/gui
(require racket/contract/base)
(define nnint? nonnegative-integer?)
(provide
(contract-out
[get-mouse-x/y
(->* ()
()
(values nnint? nnint?))]
[get-display-info
(->* (nnint?)
()
(values nnint? nnint? nnint? nnint?))]
[find-monitor
(->* (nnint? nnint?)
... | null | https://raw.githubusercontent.com/Metaxal/bazaar/8432d3c5398225a4bfb5ed5c25a1beffa06409ec/gui/utils.rkt | racket | Returns the coordinates of the mouse pointer
Returns the position x, y and the sizes w, h of the provided display/monitor number
Returns the display/monitor that contains the coordinates x,y, or #f if not found
Returns the display/monitor number that contains the mouse pointer
pointer is is used.
pos-y: (or/c non... | #lang racket/gui
(require racket/contract/base)
(define nnint? nonnegative-integer?)
(provide
(contract-out
[get-mouse-x/y
(->* ()
()
(values nnint? nnint?))]
[get-display-info
(->* (nnint?)
()
(values nnint? nnint? nnint? nnint?))]
[find-monitor
(->* (nnint? nnint?)
... |
b1f413b1a7d3d1c8e7afff8b47985cbd062689218eed853df31381542c89ad42 | mirage/ocaml-openflow | xen_controller.ml |
* Copyright ( c ) 2012 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE A... | null | https://raw.githubusercontent.com/mirage/ocaml-openflow/dcda113745e8edc61b5508eb8ac2d1e864e1a2df/controller/xen_controller.ml | ocaml |
* Copyright ( c ) 2012 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE A... | |
fcd5ca7f2d9e6086adb1eb2adf823508f8662f3d75cbcde3b72125d97d21043e | 7max/log4cl | naming-ccl.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;
Copyright ( c ) 2012 , . All rights reserved .
;;;
This file is licensed to You 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 Li... | null | https://raw.githubusercontent.com/7max/log4cl/d6293f9f1b6b8871b0a4417c4bb22afb9910b97f/src/naming-ccl.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
you may not use this file except in compliance
-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 permissions and
lim... | Copyright ( c ) 2012 , . All rights reserved .
This file is licensed to You under the Apache License , Version 2.0
with the License . You may obtain a copy of the License at
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package #:log4cl)
(defun ccl-get-block-name (env)
(declar... |
bab47352b56aba55ab69913912249f3f616f723c7b1f736c759b8be21e28e533 | wadehennessey/wcl | destructuring-bind.lisp | ( C ) Copyright 1990 - 2014 by . All rights reserved .
;;; Cannot self-compile this version - infinite recursion
( - bind ( lambda - list form & body body+decls )
; (dbind-1 lambda-list form (cons 'locally body+decls)))
(define-macro 'destructuring-bind
#'(lambda (whole env)
(let ((lambda-list (second wh... | null | https://raw.githubusercontent.com/wadehennessey/wcl/841316ffe06743d4c14b4ed70819bdb39158df6a/src/cl/decls/destructuring-bind.lisp | lisp | Cannot self-compile this version - infinite recursion
(dbind-1 lambda-list form (cons 'locally body+decls)))
just (&rest var) ?
The expansion could be made more efficient (fewer cars/cdrs)
if we factor out common subexpressions.
Because DESTRUCTURING-BIND expands into code using the following
macros, we must be... | ( C ) Copyright 1990 - 2014 by . All rights reserved .
( - bind ( lambda - list form & body body+decls )
(define-macro 'destructuring-bind
#'(lambda (whole env)
(let ((lambda-list (second whole))
(form (third whole))
(body+decls (cdddr whole)))
(dbind-1 lambda-list form (cons 'locally bod... |
11069fc2a257b6b3afc811d5916bc149de003229b86010838381d97e9390c963 | bvaugon/ocamlpp | instr.ml | (*************************************************************************)
(* *)
(* OCamlPP *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocamlpp/ee8dbf90b2012cb20bb2a9730524e12bc59dc1f2/src/instr.ml | ocaml | ***********************************************************************
OCamlPP
... |
This file is distributed under the terms of the CeCILL license .
type instr = {
addr : int;
mutable index : int;
mutable bc : bc;
mutable is_pointed : bool;
}
and ptr = {
ofs : int;
mutable pointed : instr;
}
and bc =
| Acc of int
| ... |
e9cdf32159b341a8e4de48fcfc693a2169d3a3638884a8f17fce276837d4a8a9 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] ru
[ @ISO639 - 2@ ] rus
[ @ISO639 - 3@ ] rus
[ @Native name@ ] Русский язык
[ @English name@ ] Russian
[@ISO639-1@] ru
[@ISO639-2@] rus
[@ISO639-3@] rus
[@Native name@] Русский язык
[@English name@] Russian
-}
module Te... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/RUS/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] ru
[ @ISO639 - 2@ ] rus
[ @ISO639 - 3@ ] rus
[ @Native name@ ] Русский язык
[ @English name@ ] Russian
[@ISO639-1@] ru
[@ISO639-2@] rus
[@ISO639-3@] rus
[@Native name@] Русский язык
[@English name@] Russian
-}
module Te... |
bfac5ef9f18a9955064048ecc244298dd7f6af670263de10a3265fafefb1d4e3 | zilch-lang/nstar | Pretty.hs | |
Module : Language . NStar . Syntax . Pretty
Copyright : ( c ) , 2020
License : : experimental
Module: Language.NStar.Syntax.Pretty
Copyright: (c) Mesabloo, 2020
License: BSD3
Stability: experimental
-}
module Language.NStar.Syntax.Pretty where
import Prettyprinter
import Language.NStar.Syn... | null | https://raw.githubusercontent.com/zilch-lang/nstar/9d56d1e2ac3f2f71c1081f5a47a96bc4ade61ccb/lib/nsc-pretty/src/Language/NStar/Syntax/Pretty.hs | haskell | |
Module : Language . NStar . Syntax . Pretty
Copyright : ( c ) , 2020
License : : experimental
Module: Language.NStar.Syntax.Pretty
Copyright: (c) Mesabloo, 2020
License: BSD3
Stability: experimental
-}
module Language.NStar.Syntax.Pretty where
import Prettyprinter
import Language.NStar.Syn... | |
262be0538783c1acb23c85c363c0f97cf7c978b302847617f9a51f4ed32d3b94 | ilya-klyuchnikov/henk | HenkInt.hs | module HenkInt where
import HenkAS
import HenkPP(expr2string)
import TermSupport
import Control.Monad
import Debug.Trace
--------------------------------------------------------------------------------
-- Main
--------------------------------------------------------------------------------
intmain :: DeltaRules -> Pr... | null | https://raw.githubusercontent.com/ilya-klyuchnikov/henk/d8dc0b4172a24e768d25907d14ef83c0a330ce82/src/HenkInt.hs | haskell | ------------------------------------------------------------------------------
Main
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Delta Rules
----------------------------------------------------------------... | module HenkInt where
import HenkAS
import HenkPP(expr2string)
import TermSupport
import Control.Monad
import Debug.Trace
intmain :: DeltaRules -> Program -> IO Expr
intmain deltaRules program
= do{ex <- case lookup'' (TVar (Var "main") Unknown) deltaRules of
Just deltarule -> return $ (reduceR... |
d55a09eb1b6a90716b22b53fef311b6c51113bf701a3a7d320c26f03b4b81a4f | active-group/sqlosure | h2.clj | (ns sqlosure.backends.h2
(:require [sqlosure.backend :as backend]
[sqlosure.backends.base :as base]))
TODO This is only a stub implementation .
(def implementation backend/backend)
| null | https://raw.githubusercontent.com/active-group/sqlosure/3cd74e90df4f3c49c841a1a75941acc7444c4bfb/src/sqlosure/backends/h2.clj | clojure | (ns sqlosure.backends.h2
(:require [sqlosure.backend :as backend]
[sqlosure.backends.base :as base]))
TODO This is only a stub implementation .
(def implementation backend/backend)
| |
08eb3508711e9a84791026f77c267ebd2990aa7b24f4eaa0ad7d48539f39002b | RunOrg/RunOrg | cli.ml | (* © 2013 RunOrg *)
let () =
if Array.length Sys.argv < 3 then (
print_endline "Usage: plang source output" ;
exit(-1)
)
let source_directory =
Sys.argv.(1)
let output_directory =
Sys.argv.(2)
| null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/plang/cli.ml | ocaml | © 2013 RunOrg |
let () =
if Array.length Sys.argv < 3 then (
print_endline "Usage: plang source output" ;
exit(-1)
)
let source_directory =
Sys.argv.(1)
let output_directory =
Sys.argv.(2)
|
a9b9f592e2e93a085d090b250c949b40800411074e2c177ff7ef3509509b7fb4 | caribou/caribou-core | core.clj | (ns caribou.core
(:refer-clojure :exclude [update])
(:require [caribou.config :as config]
[caribou.db :as db]
[caribou.model :as model]
[caribou.logger :as log]))
(def gather model/gather)
(def pick model/pick)
(def create model/create)
(def update model/update)
(def destroy mod... | null | https://raw.githubusercontent.com/caribou/caribou-core/6ebd9db4e14cddb1d6b4e152e771e016fa9c55f6/src/caribou/core.clj | clojure | (ns caribou.core
(:refer-clojure :exclude [update])
(:require [caribou.config :as config]
[caribou.db :as db]
[caribou.model :as model]
[caribou.logger :as log]))
(def gather model/gather)
(def pick model/pick)
(def create model/create)
(def update model/update)
(def destroy mod... | |
22304b5fe9d630b57073955920e4394c845ff5e56f530ee7fd4fb3aaad42aa54 | workframers/wonka | deps.cljs | {:npm-deps {:glamor "2.20.40"}}
| null | https://raw.githubusercontent.com/workframers/wonka/53803c152c0bd80d1f8001983321a070c1ac53ea/src/deps.cljs | clojure | {:npm-deps {:glamor "2.20.40"}}
| |
e4f5ab39b6a8933f5b430ae33ddd5eb545678c9e7e11281fdc1b8414ed51a84e | hexlet-codebattle/battle_asserts | single_number.clj | (ns battle-asserts.issues.single-number
(:require [clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["collections"])
(def description
{:en "Given an array of integers, every element appears twice except for one. Find that single one."
:ru "Дан массив целых чисел, в нем все элементы кроме о... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/39c4b1283f914ab7b8bfe23538d69448193d4255/src/battle_asserts/issues/single_number.clj | clojure | (ns battle-asserts.issues.single-number
(:require [clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["collections"])
(def description
{:en "Given an array of integers, every element appears twice except for one. Find that single one."
:ru "Дан массив целых чисел, в нем все элементы кроме о... | |
7c36edeaac80596fc48142ed2d029d52c2a250bc1d329c8506a9b1706521caff | pink-gorilla/goldly | bad_page.cljs | (ns page.bad-page
(:require
[cljs-libs.helper :refer [add-page-test]]))
; test if we get an error message
; (call-bad-fn 27) | null | https://raw.githubusercontent.com/pink-gorilla/goldly/35581af25d71911f1d0a72211b42192d08a526a1/goldly-test/src/demo/page/bad_page.cljs | clojure | test if we get an error message
(call-bad-fn 27) | (ns page.bad-page
(:require
[cljs-libs.helper :refer [add-page-test]]))
|
139d047b20b43ded29802a03119e94259ae41c138d755b9a6cc95686bd141bf4 | mbutterick/fontland | subset.rkt | #lang debug racket/base
(require racket/serialize
racket/list
racket/match
sugar/unstable/dict
"table/loca.rkt"
"table-stream.rkt"
"directory.rkt"
"struct.rkt"
fontland/glyph
fontland/ttf-glyph
fontland/cff-glyph
xenomorp... | null | https://raw.githubusercontent.com/mbutterick/fontland/e50e4c82f58e2014d64e87a14c1d29b546fb393b/fontland/subset.rkt | racket |
from
approximates
fka `includeGlyph`
put the new glyph at the end of `glyphs`,
and put its index in the mapping
approximates
this causes the glyph to be parsed
this causes the glyph to be parsed
(module+ test
approximates
glyph-decode unpacks the `glyf` table data corresponding to a certin gid.
here,... | #lang debug racket/base
(require racket/serialize
racket/list
racket/match
sugar/unstable/dict
"table/loca.rkt"
"table-stream.rkt"
"directory.rkt"
"struct.rkt"
fontland/glyph
fontland/ttf-glyph
fontland/cff-glyph
xenomorp... |
afbc4ecc3e6a787d5cd0ed1c415a313562c5903cb3c5f81ecae55be4d1f228d6 | melange-re/melange | enum_common.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/js_parser/enum_common.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
8890d420cf263bdd4f409f07ecaf85200626bc92cc1d553ff05b2d5e1471a8fb | nikita-volkov/strelka | HTTPAuthorizationParsing.hs | module Strelka.HTTPAuthorizationParsing
where
import Strelka.Prelude
import qualified Data.ByteString.Base64 as A
import qualified Data.Text as B
import qualified Data.Text.Encoding as B
import qualified Data.ByteString as C
basicCredentials :: ByteString -> Either Text (Text, Text)
basicCredentials =
dropPrefix ... | null | https://raw.githubusercontent.com/nikita-volkov/strelka/8dd3abbbb7ebe84b5319941b236163ebdee6d199/library/Strelka/HTTPAuthorizationParsing.hs | haskell | FIXME: How do we handle the absence of a password? | module Strelka.HTTPAuthorizationParsing
where
import Strelka.Prelude
import qualified Data.ByteString.Base64 as A
import qualified Data.Text as B
import qualified Data.Text.Encoding as B
import qualified Data.ByteString as C
basicCredentials :: ByteString -> Either Text (Text, Text)
basicCredentials =
dropPrefix ... |
3cab37b6c2d66ee9a4ae46f135c28558fdea918b72de688965a70e60dd8ed14a | ndmitchell/hoogle | Cabal.hs | # LANGUAGE ViewPatterns , PatternGuards , TupleSections , RecordWildCards , ScopedTypeVariables #
| Module for reading files .
module Input.Cabal(
PkgName, Package(..),
parseCabalTarball, readGhcPkg,
packagePopularity, readCabal
) where
import Input.Settings
import Data.List.Extra
import System.Fi... | null | https://raw.githubusercontent.com/ndmitchell/hoogle/25b2872929e3fccd5bbcdef026cec63ce365647e/src/Input/Cabal.hs | haskell | -------------------------------------------------------------------
DATA TYPE
^ True if the package provides a library (False if it is only an executable with no API)
^ The synposis, grabbed from the top section.
^ The version, grabbed from the top section.
^ The list of packages that this package directly depends... | # LANGUAGE ViewPatterns , PatternGuards , TupleSections , RecordWildCards , ScopedTypeVariables #
| Module for reading files .
module Input.Cabal(
PkgName, Package(..),
parseCabalTarball, readGhcPkg,
packagePopularity, readCabal
) where
import Input.Settings
import Data.List.Extra
import System.Fi... |
84ac89decfba8da06b6ced4191582d7ce61747f1e3b5eda4598b1e569fb307c2 | evturn/haskellbook | 17.08-apl1.hs | module Apl1 where
import Control.Applicative
import Data.Monoid
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
instance Monoid a => Monoid (ZipList a) where
mempty = pure mempty
mappend = liftA2 mappend
instance Arbitrary a... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/17/17.08-apl1.hs | haskell | module Apl1 where
import Control.Applicative
import Data.Monoid
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
instance Monoid a => Monoid (ZipList a) where
mempty = pure mempty
mappend = liftA2 mappend
instance Arbitrary a... | |
db9c097b6d192e86dd2aaed4d8b04304539d97ec9754be77d41ac0c91e118f9a | vikram/lisplibraries | gridedit.lisp |
(in-package :weblocks)
(export '(gridedit gridedit-drilldown-type))
(defwidget gridedit (dataedit-mixin datagrid)
((allow-select-p :initform t)
(drilldown-type :accessor gridedit-drilldown-type
:initform :edit
:initarg :drilldown-type
:documentation "Type of the drilldown UI to be provided
by the gr... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/src/widgets/gridedit.lisp | lisp | Renders the body of the gridedit. Essentially, just calls
delete item, etc.) are added or removed depending on the settings |
(in-package :weblocks)
(export '(gridedit gridedit-drilldown-type))
(defwidget gridedit (dataedit-mixin datagrid)
((allow-select-p :initform t)
(drilldown-type :accessor gridedit-drilldown-type
:initform :edit
:initarg :drilldown-type
:documentation "Type of the drilldown UI to be provided
by the gr... |
58625131475fdccd760c488a8b8def81b6e82c325dc999cccdb499159974ecf9 | akamai/cl-http2-protocol | util.lisp | Copyright ( c ) 2014 Akamai Technologies , Inc. ( MIT License )
(in-package :cl-http2-protocol-util)
(defmacro defalias (name existing)
"Define NAME as a synonym for an EXISTING function or macro."
`(progn
(defun ,name (&rest args)
`(,',existing ,@args))
(define-compiler-macro ,name (&rest args... | null | https://raw.githubusercontent.com/akamai/cl-http2-protocol/67fb6befe78ed1e52e1ba1f1e66a0a793119033e/util.lisp | lisp | when false, they are handled. | Copyright ( c ) 2014 Akamai Technologies , Inc. ( MIT License )
(in-package :cl-http2-protocol-util)
(defmacro defalias (name existing)
"Define NAME as a synonym for an EXISTING function or macro."
`(progn
(defun ,name (&rest args)
`(,',existing ,@args))
(define-compiler-macro ,name (&rest args... |
1bb43e373e93e1db45bd0b4a8431fe453add3cdbafda4caa49c83a99c0159460 | vlaaad/reveal | search.clj | (ns vlaaad.reveal.search
(:import [clojure.lang MapEntry]))
(defn- rank [^String s ^String q]
(let [q-len (.length q)
s-len (.length s)]
(loop [qi 0
si 0
rank 0]
(if (= qi q-len)
rank
(let [ch (Character/toLowerCase (.charAt q qi))
next-si (loop... | null | https://raw.githubusercontent.com/vlaaad/reveal/61c157b557c767aa34feb29e1e1aea197b1eed08/src/vlaaad/reveal/search.clj | clojure | (ns vlaaad.reveal.search
(:import [clojure.lang MapEntry]))
(defn- rank [^String s ^String q]
(let [q-len (.length q)
s-len (.length s)]
(loop [qi 0
si 0
rank 0]
(if (= qi q-len)
rank
(let [ch (Character/toLowerCase (.charAt q qi))
next-si (loop... | |
3af9726a71b4eafcd2462c32357b76aa54bf5f51eb1ba926ca4ec740a1ab17d3 | informatimago/lisp | syslog.lisp | -*- coding : utf-8 -*-
;;;;****************************************************************************
FILE : syslog.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
FFI to syslog .
;;;;
< PJB > < >
MODIFICATIONS
... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/clisp/syslog.lisp | lisp | ****************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
in the mean time.
LEGAL
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is d... | -*- coding : utf-8 -*-
FILE : syslog.lisp
USER - INTERFACE :
FFI to syslog .
< PJB > < >
MODIFICATIONS
2004 - 04 - 19 < PJB > Made use of slave logger processes .
2003 - 08 - 31 < PJB > Created .
Not implemented as FFI , we 're using the external program logger(1 )
... |
ddfeb9ad053d6648d3193727df79bbfbb1a877877b9ede446fe7e2dc56a7f445 | tonyg/kali-scheme | lize.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
Simplest rational within an interval . Copied from IEEE P1178 / D4 nimpl.tex .
(define (rationalize x e)
(let ((e (abs e)))
(simplest-rational (- x e) (+ x e))))
(define (simplest-rati... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/rts/lize.scm | scheme | assumes 0 < X < Y
Do some juggling to satisfy preconditions of simplest-rational-internal. | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
Simplest rational within an interval . Copied from IEEE P1178 / D4 nimpl.tex .
(define (rationalize x e)
(let ((e (abs e)))
(simplest-rational (- x e) (+ x e))))
(define (simplest-rati... |
1d192df6870b366aa8a400f690ecd2d7e0c139d318e6b5124982d4ccc1254d69 | Olical/propel | main_test.clj | (ns propel.main-test
(:require [clojure.test :as t]
[propel.main :as main]))
(t/deftest parse-opts
(letfn [(f [& args] (:opts (#'main/parse-opts args)))]
(t/testing "empty by default"
(t/is (= {} (f)))
(t/is (= {} (f " "))))
(t/testing "port is parsed"
(t/is (= {:port 5555} (... | null | https://raw.githubusercontent.com/Olical/propel/407ccf1ae507876e9a879239fac96380f2c1de2b/test/propel/main_test.clj | clojure | (ns propel.main-test
(:require [clojure.test :as t]
[propel.main :as main]))
(t/deftest parse-opts
(letfn [(f [& args] (:opts (#'main/parse-opts args)))]
(t/testing "empty by default"
(t/is (= {} (f)))
(t/is (= {} (f " "))))
(t/testing "port is parsed"
(t/is (= {:port 5555} (... | |
774f79f89e5d8bd1d1f6e8b2ad0429d71a372d66069a0624591a033708c6a7f7 | markus-wa/lssl | opcodes.clj | (ns lssl.opcodes
(:require [clojure.string :as str]))
(defn opcode
[opcode & args]
{::opcode opcode ::args args})
(defn add-label
[m label]
(assoc m ::label label))
(comment
how defop works
(defop entry-point OpEntryPoint [exec-model label name & interfaces])
; ==>
(defn entry-point
[entry-poin... | null | https://raw.githubusercontent.com/markus-wa/lssl/0c4858f624331588228bc3c31d05597e9d27bd55/src/lssl/opcodes.clj | clojure | ==> | (ns lssl.opcodes
(:require [clojure.string :as str]))
(defn opcode
[opcode & args]
{::opcode opcode ::args args})
(defn add-label
[m label]
(assoc m ::label label))
(comment
how defop works
(defop entry-point OpEntryPoint [exec-model label name & interfaces])
(defn entry-point
[entry-point OpEntr... |
c2f6d3026874ba4627a82cfe30f9fde9e32921e523695cf6112c77b578a3e281 | symbiont-io/eff-in-anger | Build.hs | #!/usr/bin/env stack
-- stack runhaskell --package async --package unix --
|
A simple script to build and run all components of the '' One Log '' talk
A simple script to build and run all components of the ''One Log'' talk
-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# OPTIONS_GHC -W... | null | https://raw.githubusercontent.com/symbiont-io/eff-in-anger/9f3a4aadbe7fa3ae3deda87ae7a624b58fd4748f/Build.hs | haskell | stack runhaskell --package async --package unix --
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -Wall -Werror # | #!/usr/bin/env stack
|
A simple script to build and run all components of the '' One Log '' talk
A simple script to build and run all components of the ''One Log'' talk
-}
# LANGUAGE ScopedTypeVariables #
import Color
import Control.Concurrent.Async
import Control.Concurrent.Chan
im... |
d99d04eb56b7f852b0c57ecc47a3ed0e4df026573cb197d5c1e5112d5acfa69b | bmeurer/ocamljit2 | configuration.mli | (***********************************************************************)
(* ocamlbuild *)
(* *)
, , projet Gallium , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/ocamlbuild/configuration.mli | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
Original author :
val parse_string : string -> ... |
17478b681c43ad75c7d78a00b4abf785556da4b6e30c00184db3a63f71887f7c | yallop/ocaml-charset | charset_bitops.intrinsics.ml |
* Copyright ( c ) 2022 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2022 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
external popcnt : int -> (int... | null | https://raw.githubusercontent.com/yallop/ocaml-charset/74f545621f89565f45925a16eda078914879b52c/lib/charset_bitops.intrinsics.ml | ocaml | Check that the signatures are as expected, since we're re-exporting externals |
* Copyright ( c ) 2022 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2022 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
external popcnt : int -> (int... |
56273bc7b0f82663573e637d4a7a2f51000e1266eada78cb301eec0458c5475b | evilmartians/foundry | fy_big_int.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet Crista... | null | https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/vendor/ocaml-num/fy_big_int.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : big_int.mli 10327 2010 - 04 - 29 13:53:... |
433cfaa1925082f42921284b8057b50be73ff5ad5b25dca4505448d922c1afd1 | ocaml-dune/fiber | fiber_bench_main.ml | Inline_benchmarks_public.Runner.main ~libname:"fiber_bench"
| null | https://raw.githubusercontent.com/ocaml-dune/fiber/5563b588c1313f128eafa74d66f0626c9128d34d/fiber/bench/fiber_bench_main.ml | ocaml | Inline_benchmarks_public.Runner.main ~libname:"fiber_bench"
| |
4e48b54698793130788d86fb4ec1d7e8776df6c27256d5a6c49956da7829fd80 | cacheaudit/cacheaudit | valAD.ml | Copyright ( c ) 2013 - 2015 , IMDEA Software Institute .
(* See ../../LICENSE for authorship and licensing information *)
open X86Types
open AbstrInstr
open AD.DS
open NumAD.DS
open Logger
(* We use a module for the options so that we can have different instances in the same analysis *)
module type... | null | https://raw.githubusercontent.com/cacheaudit/cacheaudit/f0b52f85771ee31fed2a0a84a7e767a9d19e4b15/abstract_domains/numeric/valAD.ml | ocaml | See ../../LICENSE for authorship and licensing information
We use a module for the options so that we can have different instances in the same analysis
We just print differing and new variables
truncate a [number] to its [numbits] least significant bits
Mask values and shift them to the right
in that case... | Copyright ( c ) 2013 - 2015 , IMDEA Software Institute .
open X86Types
open AbstrInstr
open AD.DS
open NumAD.DS
open Logger
module type VALADOPT = sig
val max_get_var_size:int
val max_set_size:int
end
module ValADOptForMemory = struct
let max_get_var_size = 256
let max_set_size = 32
end
let l... |
b8214bd6d69f5f7f9514d4ed676755938405eec52b66952069dc75b3d0356f44 | chaw/r7rs-libs | factor-test.sps | (import (scheme base)
(scheme sort)
(slib factor)
(srfi 64))
(test-begin "slib-factor")
(test-equal 1 (jacobi-symbol 15 7))
(test-equal 0 (jacobi-symbol 7 7))
(test-equal -1 (jacobi-symbol 7 15))
(test-equal 1 (jacobi-symbol 64 7))
(test-equal 0 (jacobi-symbol 63 7))
(test-assert (prime? 17))... | null | https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/slib-tests/factor-test.sps | scheme | (import (scheme base)
(scheme sort)
(slib factor)
(srfi 64))
(test-begin "slib-factor")
(test-equal 1 (jacobi-symbol 15 7))
(test-equal 0 (jacobi-symbol 7 7))
(test-equal -1 (jacobi-symbol 7 15))
(test-equal 1 (jacobi-symbol 64 7))
(test-equal 0 (jacobi-symbol 63 7))
(test-assert (prime? 17))... | |
5d3de942c738b58d49f1c8fe14bf406970170f8ef466a27910a69231c1455389 | WeiDUorg/weidu | dlg.ml | This file has been edited by , a.k.a . ,
starting from 18 December 2012 and WeiDU 231.06 .
starting from 18 December 2012 and WeiDU 231.06. *)
Infinity Engine [ DLG ]
open BatteriesInit
open Hashtblinit
open Util
let emit_from = ref true
let comments = ref true
let emit_text = ref false
let emit_some_... | null | https://raw.githubusercontent.com/WeiDUorg/weidu/e6e32a287b268edf515acd532723ecf8763ce2a1/src/dlg.ml | ocaml | ** Store Local Strings **
file * label * if_exists
copy all transitions from here; is the copy safe?
process the transitions
create "from: " lists
*****************************************************************
add the state triggers in Weighted order
sort the states by state trigger weight
tie breaker
... | This file has been edited by , a.k.a . ,
starting from 18 December 2012 and WeiDU 231.06 .
starting from 18 December 2012 and WeiDU 231.06. *)
Infinity Engine [ DLG ]
open BatteriesInit
open Hashtblinit
open Util
let emit_from = ref true
let comments = ref true
let emit_text = ref false
let emit_some_... |
e78e5d7af44806fc4b67aa3b709fe4adfce266d2b0de2c92b02b2b6d9e3e14f9 | Clozure/ccl-tests | clrhash.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Fri Nov 28 09:33:40 2003
Contains : Tests of CLRHASH
(in-package :cl-test)
(deftest clrhash.1
(let ((table (make-hash-table)))
(setf (gethash 'a table) 'b)
(values
(hash-table-count table)
(equalt (multiple-value-list (clrhash table))
(... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/clrhash.lsp | lisp | -*- Mode: Lisp -*-
| Author :
Created : Fri Nov 28 09:33:40 2003
Contains : Tests of CLRHASH
(in-package :cl-test)
(deftest clrhash.1
(let ((table (make-hash-table)))
(setf (gethash 'a table) 'b)
(values
(hash-table-count table)
(equalt (multiple-value-list (clrhash table))
(list table))
(hash-... |
acf78784214c82840e21cab0c062718cbe77597dcd79f74afe1cb6396661ce9d | alexandersgreen/qio-haskell | QioClass.hs |
-- | This module defines the functions that can be used run the classical subset
-- of QIO. That is, QIO computations that only use classical unitary operations.
module QIO.QioClass where
import Data.Maybe as Maybe
import Data.Monoid as Monoid
import Control.Monad.State
import QIO.QioSyn
import QIO.Heap
-- | A class... | null | https://raw.githubusercontent.com/alexandersgreen/qio-haskell/2525f5bad5f2f5f278da6cdc4771b08650109d04/QIO/QioClass.hs | haskell | | This module defines the functions that can be used run the classical subset
of QIO. That is, QIO computations that only use classical unitary operations.
| A classical unitary operation is defined as a function that will
update the current classical state.
| The classical unitary type forms a Monoid
| A single ... |
module QIO.QioClass where
import Data.Maybe as Maybe
import Data.Monoid as Monoid
import Control.Monad.State
import QIO.QioSyn
import QIO.Heap
newtype UnitaryC = U {unU :: Int -> HeapMap -> HeapMap}
instance Monoid UnitaryC where
mempty = U (\ fv bs -> bs)
mappend (U f) (U g) = U (\ fv h -> g fv (f fv h))
... |
e42776abe5cf89dfc0f7c6c9ea83eb3a7dcbc84f73ed63d5db68f70d72448fd4 | ajhc/ajhc | tc150.hs | {-# OPTIONS -fglasgow-exts #-}
module ShouldCompile where
f v = (\ (x :: forall a. a->a) -> x) id 'c'
| null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/regress/tests/1_typecheck/2_pass/ghc/tc150.hs | haskell | # OPTIONS -fglasgow-exts # |
module ShouldCompile where
f v = (\ (x :: forall a. a->a) -> x) id 'c'
|
d3ccd64217d51e4afa4408f58f030428b7bfc7448db1676ecc99f4ee288b4d8a | damballa/inet.data | psl.clj | (ns inet.data.format.psl
"Functions for interfacing with Mozilla Public Suffix List format files.
The supported format is an extended version of the PSL format. There are two
differences:
- Lines beginning with `#` are considered to be comments in addition to lines
beginning with `//`.
- Supports a new \"dyn... | null | https://raw.githubusercontent.com/damballa/inet.data/259eb578546bc0b8deb941df9642c0bf81b81dd0/src/clojure/inet/data/format/psl.clj | clojure | (ns inet.data.format.psl
"Functions for interfacing with Mozilla Public Suffix List format files.
The supported format is an extended version of the PSL format. There are two
differences:
- Lines beginning with `#` are considered to be comments in addition to lines
beginning with `//`.
- Supports a new \"dyn... | |
b24651a93bef18612c5f960b321bb130439a852807c7cbc3286d63e3744f6404 | mishun/tangles | Homology.hs | module Math.Topology.KnotTh.SurfaceGraph.Homology
( module Math.Topology.KnotTh.SurfaceGraph
, cellularHomology
) where
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as MV
import qualified Data.Vector.Unboxed as UV
import qualified Data.Array as A
import Math.Topology.KnotTh.Surfac... | null | https://raw.githubusercontent.com/mishun/tangles/9af39dd48e3dcc5e3944f8d060c8769ff3d81d02/src/Math/Topology/KnotTh/SurfaceGraph/Homology.hs | haskell | module Math.Topology.KnotTh.SurfaceGraph.Homology
( module Math.Topology.KnotTh.SurfaceGraph
, cellularHomology
) where
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as MV
import qualified Data.Vector.Unboxed as UV
import qualified Data.Array as A
import Math.Topology.KnotTh.Surfac... | |
1c270ffbd4a5ceecd9edb0d3a552125a64ead66de32adfc48a9076a197d1aa24 | haskell-suite/haskell-names | Err1.hs | -- Some random parse error
1 +
| null | https://raw.githubusercontent.com/haskell-suite/haskell-names/795d717541484dbe456342a510ac8e712e1f16e4/tests/errors/Err1.hs | haskell | Some random parse error | 1 +
|
c9b897541fdc1808025aa502dcc7f6c1ff213992d5ac5ffadb2ee88e0af9d23e | HaxeFoundation/ocamllibs | jReader.ml |
* This file is part of JavaLib
* Copyright ( c)2004 - 2012 and
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( a... | null | https://raw.githubusercontent.com/HaxeFoundation/ocamllibs/97e498e1b3bc2b3f08cfcae874b8529e4292bc3d/javalib/jReader.ml | ocaml | TODO: correctly decode modified UTF8
not index
next must be a :
TODO: expand UTF8 characters
signature, as used by the vm |
* This file is part of JavaLib
* Copyright ( c)2004 - 2012 and
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( a... |
d372de47dddd61e886b6d6ea362232d70ddd43e9e3d1122d3509f6297bf341c8 | nuvla/ui | spec.cljs | (ns sixsq.nuvla.ui.profile.spec
(:require [clojure.spec.alpha :as s]
[sixsq.nuvla.ui.plugins.tab :as tab-plugin]
[sixsq.nuvla.ui.utils.spec :as us]))
(s/def ::user any?)
(s/def ::customer any?)
(s/def ::subscription any?)
(s/def ::payment-methods any?)
(s/def ::upcoming-invoice any?)
(s/def :... | null | https://raw.githubusercontent.com/nuvla/ui/c10704eabd339489722fa53bc99f11f21103c070/code/src/cljs/sixsq/nuvla/ui/profile/spec.cljs | clojure | (ns sixsq.nuvla.ui.profile.spec
(:require [clojure.spec.alpha :as s]
[sixsq.nuvla.ui.plugins.tab :as tab-plugin]
[sixsq.nuvla.ui.utils.spec :as us]))
(s/def ::user any?)
(s/def ::customer any?)
(s/def ::subscription any?)
(s/def ::payment-methods any?)
(s/def ::upcoming-invoice any?)
(s/def :... | |
8d685add40b97c0bca28b666588bf59974772f4412baac1ed786d3d4718e609a | appleshan/cl-http | remote-listener.lisp | -*- Mode : lisp ; Package : RREP ; BASE : 10 ; Syntax : ANSI - Common - Lisp;-*-
;;;
;;; REMOTE READ-EVAL-PRINT LOOP FOR LISPWORKS
;;;
Based on initial code from , 24 May 2004 19:31:17 +0200
;;;
Revised by , Mon , 24 May 2004 19:31:17 +0600
(defpackage :RREP
(:use :common-lisp)
(:documentation "A ... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lw/contrib/jcma/remote-listener.lisp | lisp | Package : RREP ; BASE : 10 ; Syntax : ANSI - Common - Lisp;-*-
REMOTE READ-EVAL-PRINT LOOP FOR LISPWORKS
| Based on initial code from , 24 May 2004 19:31:17 +0200
Revised by , Mon , 24 May 2004 19:31:17 +0600
(defpackage :RREP
(:use :common-lisp)
(:documentation "A remote Read-Eval-Print Loop for LispWorks")
(:export
"*SERVICE-PORT*"
"DEBUG-PROCESS"
"DISABLE-RREP-SERVICE"
"ENABLE-RREP-SERVIC... |
97dbf603fc68a031b41caabd327d1079ff7d86d8293b05d5dc4f632ac09e9067 | YoshikuniJujo/test_haskell | try-shaderc.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import qualified Data.ByteString as BS
import Shaderc
import Shaderc.EnumAuto
import qualified Shaderc.CompileOptions as CompileOptions
main :: IO ()
main = BS.writeFil... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/a69af4731ae2894d86163267601116052e09bd26/themes/gui/vulkan/try-my-vulkan-snd/app/try-shaderc.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import qualified Data.ByteString as BS
import Shaderc
import Shaderc.EnumAuto
import qualified Shaderc.CompileOptions as CompileOptions
main :: IO ()
main = BS.writeFile "tmp.spv" . (\(Spv spv) -> spv) =... |
81e4391a8d54cc2d8a8ce85a305035ecb63c8f1105a977df4957bad5ef9de23f | fmancinelli/lein-lesscss | project.clj | Leiningen Less CSS compile task .
Copyright 2012 < >
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; (at your option) any later version.
;;
;;... | null | https://raw.githubusercontent.com/fmancinelli/lein-lesscss/af4b1a6b261e750225eb6f3736bb6db13bb39853/project.clj | clojure |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public... | Leiningen Less CSS compile task .
Copyright 2012 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(defproject lein-lesscss "1.3-SNAPSHOT"
:descrip... |
bed9cbad4a991377b194995acbf9912e61d14373861c56e23c2e81b7e4f3c28b | ewestern/geos | TopologySpec.hs |
module Data.Geometry.Geos.TopologySpec
( topologySpec
)
where
import Test.Hspec
import qualified Data.Vector as V
import Data.Either hiding (fromRight)
import Helpers
import Data.Geometry.Geos.Geometry
import Data.Geometry.Geos.Topology
poly1 ... | null | https://raw.githubusercontent.com/ewestern/geos/3568c3449efe180bd89959c9247d4667137662b6/tests/Data/Geometry/Geos/TopologySpec.hs | haskell |
module Data.Geometry.Geos.TopologySpec
( topologySpec
)
where
import Test.Hspec
import qualified Data.Vector as V
import Data.Either hiding (fromRight)
import Helpers
import Data.Geometry.Geos.Geometry
import Data.Geometry.Geos.Topology
poly1 ... | |
f7a8c47a07fd60b9c3082d6d7665641e521a43de6f16db5cc74e32395039939b | 40ants/openrpc | client.lisp | (uiop:define-package #:openrpc-client
(:use #:cl)
(:import-from #:openrpc-client/core
#:generate-client)
(:export #:generate-client))
(in-package #:openrpc-client)
| null | https://raw.githubusercontent.com/40ants/openrpc/2bc875c3d90cf2a6de425582fc1ab76baf31bccc/client/client.lisp | lisp | (uiop:define-package #:openrpc-client
(:use #:cl)
(:import-from #:openrpc-client/core
#:generate-client)
(:export #:generate-client))
(in-package #:openrpc-client)
| |
286a0dd6c4021a2bdbe9d7560f069e876ca6d32524625b07a2f2063c6f87572a | IndianRoboticsOrganization/ArimaTTS | CLUSTERGEN_cg.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
Copyright ( c ) 1998 - 2011 ; ; ;
... | null | https://raw.githubusercontent.com/IndianRoboticsOrganization/ArimaTTS/7377dca466306e2e6b90a063427273142cd50616/festvox/src/clustergen/CLUSTERGEN_cg.scm | scheme |
;;;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
without lim... |
(if (assoc 'INST_LANG_VOX_cg voice-locations)
(defvar INST_LANG_VOX::dir
(cdr (assoc 'INST_LANG_VOX_cg voice-locations)))
(defvar INST_LANG_VOX::dir (string-append (pwd) "/")))
(if (not (probe_file (path-append INST_LANG_VOX::dir "festvox/")))
(begin
(format stderr "INST_LANG_VOX::clustergen: ... |
52ae367d3e5a8e891d031937ed0b56d9a09881f56c7b78087cda9d273477580f | macchiato-framework/macchiato-core | mime_type.cljs | (ns macchiato.util.mime-type
"Utility functions for determining the mime-types files."
(:require [clojure.string :as str]))
(def ^{:doc "A map of file extensions to mime-types."}
default-mime-types
{"7z" "application/x-7z-compressed"
"aac" "audio/aac"
"ai" "application/postscript"
"appc... | null | https://raw.githubusercontent.com/macchiato-framework/macchiato-core/14eac3dbc561927ee61b6127f30ef0b0269b2af6/src/macchiato/util/mime_type.cljs | clojure | (ns macchiato.util.mime-type
"Utility functions for determining the mime-types files."
(:require [clojure.string :as str]))
(def ^{:doc "A map of file extensions to mime-types."}
default-mime-types
{"7z" "application/x-7z-compressed"
"aac" "audio/aac"
"ai" "application/postscript"
"appc... | |
b0e69fa2d23748cbe814e0b2290a497acb8f5efde78c3800abfcc6a9ea9734be | clojure-interop/aws-api | Base16Lower.clj | (ns com.amazonaws.util.Base16Lower
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.util Base16Lower]))
(defn *values
"Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
fo... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.util/src/com/amazonaws/util/Base16Lower.clj | clojure | (ns com.amazonaws.util.Base16Lower
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.util Base16Lower]))
(defn *values
"Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
fo... | |
0937d1cdd2a32a64f344236febf8f542b3ae865dcfd57b67bf208024a0ab14f3 | tarantool/jepsen.tarantool | tarantool_test.clj | (ns jepsen.tarantool-test
(:require [clojure.test :refer :all]
[jepsen.tarantool :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/tarantool/jepsen.tarantool/3eded035968143889a28015a1d95e46ecbf0006c/test/jepsen/tarantool_test.clj | clojure | (ns jepsen.tarantool-test
(:require [clojure.test :refer :all]
[jepsen.tarantool :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
b182a67e9213c939c7602b64351b1690af0e4c3823d24a02f86ddf5da23b9ee5 | tomjkidd/web-whiteboard | build.clj | (require '[cljs.build.api :as b])
(println "Building ...")
(let [start (System/nanoTime)]
(b/build "src"
{:main 'web-whiteboard.core
:output-to "out/web_whiteboard.js"
:output-dir "out"
:verbose true})
(println "... done. Elapsed" (/ (- (System/nanoTime) start) 1e9) "seconds"))
| null | https://raw.githubusercontent.com/tomjkidd/web-whiteboard/6bc508703b14c136be0def8bb6839f2784a3ae9b/scripts/build.clj | clojure | (require '[cljs.build.api :as b])
(println "Building ...")
(let [start (System/nanoTime)]
(b/build "src"
{:main 'web-whiteboard.core
:output-to "out/web_whiteboard.js"
:output-dir "out"
:verbose true})
(println "... done. Elapsed" (/ (- (System/nanoTime) start) 1e9) "seconds"))
| |
22a7a0de87c40ab3f456124b4fcfdaff1aea3530f5572c91bf4a27763351e96b | ssardina/ergo | interface.scm | #lang racket
(require (lib "defmacro.ss"))
(provide ergo-read define-interface
add-ifc-exog add-ifc-endo ifc-exog-acts ifc-endo-acts
read-exogenous write-endogenous)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Reading and writing of endogenous and exogenous action... | null | https://raw.githubusercontent.com/ssardina/ergo/4225ebb95779d1748f377cf2e4d0a593d6a2a103/System/interface.scm | scheme |
Reading and writing of endogenous and exogenous actions
read with a prompt
This is a vanilla procedure that can be used for reading exog actions
Note: there is no error checking!
This is a vanilla procedure that can be used for writing endogenous actions
The global lists of exogenous and endogenous interface... | #lang racket
(require (lib "defmacro.ss"))
(provide ergo-read define-interface
add-ifc-exog add-ifc-endo ifc-exog-acts ifc-endo-acts
read-exogenous write-endogenous)
(define (ergo-read prompt) (display prompt) (flush-output) (read))
(define (read-exogenous)
(let ((act (ergo-read #"Act: ")))
... |
e59cf9520199477197a2a31da62226e1ace0b6e04c2635655fa5f43ff4ec754a | monadbobo/ocaml-core | utils.ml | (* Utils: utility functions for user convenience *)
open Bigarray
open Common
open Read_ml
open Write_ml
open Size
open Type_class
let header_len = 8
let bin_dump ?(header = false) writer v =
let buf, pos, pos_len =
let v_len = writer.size v in
if header then
let tot_len = v_len + header_len in
... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/bin_prot/lib/utils.ml | ocaml | Utils: utility functions for user convenience
Reading from streams
Conversion of binable types |
open Bigarray
open Common
open Read_ml
open Write_ml
open Size
open Type_class
let header_len = 8
let bin_dump ?(header = false) writer v =
let buf, pos, pos_len =
let v_len = writer.size v in
if header then
let tot_len = v_len + header_len in
let buf = create_buf tot_len in
let pos = bin... |
4e1f4b441ed1b3017781a0ea95b37cae70e879ca8647824b5f0cf9473400e714 | binaryage/chromex | tab_capture.cljs | (ns chromex.ext.tab-capture (:require-macros [chromex.ext.tab-capture :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn capture* [config options]
(gen-wrap :function ::capture config ... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/tab_capture.cljs | clojure | -- events ----------------------------------------------------------------------------------------------------------------- | (ns chromex.ext.tab-capture (:require-macros [chromex.ext.tab-capture :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn capture* [config options]
(gen-wrap :function ::capture config ... |
e8755f8ce54a0b7b39e6f4f78ca9f66200f16d92924fa21adc4ca42c0e0ea8f1 | Chris00/ocaml-dropbox | restore.ml | open Lwt
module D = Dropbox_lwt_unix
* We assume there is only two entries in command line and that Sys.argv.(0 )
is the path of the file and Sys.argv.(1 ) is the rev of the file .
You can get a rev of the file by using { ! revisions } .
is the path of the file and Sys.argv.(1) is the rev of the file.
... | null | https://raw.githubusercontent.com/Chris00/ocaml-dropbox/36b222269e6bc7e5486cbb69738841d87a1212fb/tests/restore.ml | ocaml | open Lwt
module D = Dropbox_lwt_unix
* We assume there is only two entries in command line and that Sys.argv.(0 )
is the path of the file and Sys.argv.(1 ) is the rev of the file .
You can get a rev of the file by using { ! revisions } .
is the path of the file and Sys.argv.(1) is the rev of the file.
... | |
18bc922d08eb28d942ecf006deb8d8cda900af4cea39f4b650572b4b481643a3 | amclain/resolve | cover.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2001 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/amclain/resolve/6d901c8d84f2d997a6a622b94390fe19b602684f/src/cover.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2001 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(cover).
This module implements the Erlang coverage tool .
ARCHITECTURE
The coverage tool consists of o... |
d9e492c513f59bcae0e046f868b7a42437f259ac89baf2a21f54ddeb72f12431 | electric-sql/vaxine | prop_flag_ew.erl | %% -------------------------------------------------------------------
%%
Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
%% >
%%
This file is provided... | null | https://raw.githubusercontent.com/electric-sql/vaxine/872a83ea8d4935a52c7b850bb17ab099ee9c346b/apps/antidote_crdt/test/prop_flag_ew.erl | erlang | -------------------------------------------------------------------
>
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either expressed or implied. See the License for the
specific language governing perm... | Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
This file is provided to you under the Apache License ,
except in compliance with the License . You... |
900216e4f59773a05b0237275ad1091f1ee81f6e604a294876e7233ac72a0ce0 | plai-group/daphne | synthesize.clj | (ns daphne.synthesize
(:require [anglican.runtime :refer :all]
[anglican.core :refer :all]
[anglican.emit :refer :all]
[daphne.hy :refer [foppl->python]]))
(defn sample-sym? [sym]
(re-find #"smpl\d+" (name sym)))
(def operations ['+ '- '* #_'/])
(def distributions ['laplace '... | null | https://raw.githubusercontent.com/plai-group/daphne/b0f43fbb9c856116ec44419fea91c4011072dd74/src/daphne/synthesize.clj | clojure | filter samples
pick some interesting starting point for the prior
return not-needed atm. | (ns daphne.synthesize
(:require [anglican.runtime :refer :all]
[anglican.core :refer :all]
[anglican.emit :refer :all]
[daphne.hy :refer [foppl->python]]))
(defn sample-sym? [sym]
(re-find #"smpl\d+" (name sym)))
(def operations ['+ '- '* #_'/])
(def distributions ['laplace '... |
267f4c3f37503231c995756bd448201125a54870e87f342a8de4e7ff2da614fe | heroku/logplex | logplex_ranch_metrics.erl | Copyright ( c ) 2018 Salesforce.com , Inc
%%
%% Permission is hereby granted, free of charge, to any person
%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
%% restriction, including without limitation the rights to use,
%% copy, modify, ... | null | https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/src/logplex_ranch_metrics.erl | erlang |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condit... | Copyright ( c ) 2018 Salesforce.com , Inc
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
-module(logple... |
27fa2f8dae2d95e8a7da2413c34d962ba4a4a85b0c312b35592c0b2422ba616f | clojure-interop/google-cloud-clients | Session.clj | (ns com.google.cloud.spanner.Session
"A Session can be used to perform transactions that read and/or modify data in a Cloud
Spanner database.
Sessions can only execute one transaction at a time. To execute multiple concurrent
read-write/write-only transactions, create multiple sessions. Note that standalone re... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/Session.clj | clojure | thus, it is a
a
Session implementations are not required to be
calling this method on an idle session that is expected to execute a transaction or | (ns com.google.cloud.spanner.Session
"A Session can be used to perform transactions that read and/or modify data in a Cloud
Spanner database.
Sessions can only execute one transaction at a time. To execute multiple concurrent
read-write/write-only transactions, create multiple sessions. Note that standalone re... |
ed2bf38708268d8cd5a5da6dd2fdcb39cb1f24903afdc89b9ffa3dec133fd9b3 | BrunoBonacci/mulog | collector.clj | (ns com.brunobonacci.mulog.publishers.prometheus.collector
(:require [clojure.spec.alpha :as s]
[com.brunobonacci.mulog.publishers.prometheus.metrics :as met]
[com.brunobonacci.mulog.publishers.prometheus.metrics-spec :as ms])
(:import [io.prometheus.client
SimpleCollector
... | null | https://raw.githubusercontent.com/BrunoBonacci/mulog/e31f84ccf6d62d43c1c620ef5584722886e0d8a5/mulog-prometheus/src/com/brunobonacci/mulog/publishers/prometheus/collector.clj | clojure | labels are not allowed to be null, replacing with "" | (ns com.brunobonacci.mulog.publishers.prometheus.collector
(:require [clojure.spec.alpha :as s]
[com.brunobonacci.mulog.publishers.prometheus.metrics :as met]
[com.brunobonacci.mulog.publishers.prometheus.metrics-spec :as ms])
(:import [io.prometheus.client
SimpleCollector
... |
a5602ad2242ccab04b897afcc0a97459fbf7ffc5a0c58e8e4506c37570d8830d | xxyzz/SICP | Exercise_3_22.rkt | #lang racket/base
(define (make-queue)
(let ([front-ptr null]
[rear-ptr null])
(define (set-front-ptr! item)
(set! front-ptr item))
(define (set-rear-ptr! item)
(set! rear-ptr item))
(define (empty-queue?)
(null? front-ptr))
(define (queue)
(mcons front-ptr rear-ptr))... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/3_Modularity_Objects_and_State/3.3_Modeling_with_Mutable_Data/Exercise_3_22.rkt | racket | (mcons (mcons 'a '()) (mcons 'a '()))
'(a)
(mcons (mcons 'a (mcons 'b '())) (mcons 'b '()))
'(a b)
(mcons (mcons 'b '()) (mcons 'b '()))
'(b)
(mcons '() (mcons 'b '()))
'() | #lang racket/base
(define (make-queue)
(let ([front-ptr null]
[rear-ptr null])
(define (set-front-ptr! item)
(set! front-ptr item))
(define (set-rear-ptr! item)
(set! rear-ptr item))
(define (empty-queue?)
(null? front-ptr))
(define (queue)
(mcons front-ptr rear-ptr))... |
180a904952a6b26e1f28211d8d030e0ab6910ae5249c94f8dae700bbfad6f816 | dorchard/effect-monad | SafeFiles.hs | # OPTIONS_GHC -fno - warn - redundant - constraints #
# LANGUAGE TypeOperators #
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE TypeFamilies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
m... | null | https://raw.githubusercontent.com/dorchard/effect-monad/e5e4ef7ed739561ff4e1ac2e2ec9e2aaefa9db87/src/Control/Effect/Parameterised/SafeFiles.hs | haskell | # LANGUAGE EmptyDataDecls #
Bye Monads... as we know them
Import qualified versions of standard code we want to wrap
gives us type-level natural numbers
openFile : : FilePath - > IOMode - > IO Handle
hGetChar : : Handle - > IO
hPutChar : : Handle - > Char - > IO ( )
hClose : : Handle - > IO ( )
hIsOpen : :... | # OPTIONS_GHC -fno - warn - redundant - constraints #
# LANGUAGE TypeOperators #
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
module Control.Effect.Parameteris... |
2f7a3968c82af3c78dd31d7a977aa49f2e17346e4c297346b7f15fe4e58d37c7 | astanin/moo | Continuous.hs | # LANGUAGE LambdaCase #
# OPTIONS_GHC -fno - warn - unused - imports #
{- |
Continuous (real-coded) genetic algorithms. Candidate solutions are
represented as lists of real variables.
-}
module Moo.GeneticAlgorithm.Continuous
(
-- * Types
module Moo.GeneticAlgorithm.Types
-- * Initialization
, getRando... | null | https://raw.githubusercontent.com/astanin/moo/2e77a94a543d21360f7610c1ee0dda52813997c4/Moo/GeneticAlgorithm/Continuous.hs | haskell | |
Continuous (real-coded) genetic algorithms. Candidate solutions are
represented as lists of real variables.
* Types
* Initialization
* Selection
** Scaling and niching
** Sorting
* Crossover
** Neighborhood-based operators
* Mutation
* Control
| Generate at most @popsize@ genomes uniformly distributed i... | # LANGUAGE LambdaCase #
# OPTIONS_GHC -fno - warn - unused - imports #
module Moo.GeneticAlgorithm.Continuous
(
module Moo.GeneticAlgorithm.Types
, getRandomGenomes
, uniformGenomes
, rouletteSelect
, stochasticUniversalSampling
, tournamentSelect
, withPopulationTransform
, withScale
, rankSc... |
90b612a1e8fd9ed24c5b331f8dcc8f872e9da8393f8f6ef5fd206583e152e8df | franzinc/clim2 | layout.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : SILICA ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
(in-package :silica)
" Copyright ( c ) 1991 , 1992 Franz , Inc. All rights reserved .
Portions copyright ( c ) 1992 Symbolics , Inc. All rig... | null | https://raw.githubusercontent.com/franzinc/clim2/e8d03da80e1f000be40c37d088e283d95365bfdd/silica/layout.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : SILICA ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
Compare with EQ since width and height can be :COMPUTE
(defgeneric compose-space (sheet)
)
(defmethod compose-space (sheet)
(multiple-value-bind (width height)
... |
(in-package :silica)
" Copyright ( c ) 1991 , 1992 Franz , Inc. All rights reserved .
Portions copyright ( c ) 1992 Symbolics , Inc. All rights reserved .
Portions copyright ( c ) 1989 , 1990 Xerox Corp. All rights reserved . "
(define-protocol-class space-requirement ())
(defmethod print-object ((object... |
bc3e6f359d6910774fbe0fc5ec8723ba17322f000d89df5b79b70e04f579f75c | quux00/land-of-lisp-in-clojure | server.clj | (ns thornydev.web.server
(:require [clojure.string :as str]
[thornydev.clj-sockets :as sk]
[server.socket :refer [create-server close-server]]
[thornydev.web.handlers :as hdlr])
;; (:import (java.io BufferedReader InputStreamReader PrintWriter)
( java.util.concurrent ... | null | https://raw.githubusercontent.com/quux00/land-of-lisp-in-clojure/2a15a89afa0cd04cf1757ccf7da289031e135165/webserver/src/thornydev/web/server.clj | clojure | (:import (java.io BufferedReader InputStreamReader PrintWriter)
(let [to-pairs (fn [qstr]
TODO: we could write a slurp-some that takes a limit of
how much to read
try with server.socket again: see this: -conditions-to-the-clojure-echo-server.html
(binding [*in* (BufferedReader. (InputStreamReader. in))... | (ns thornydev.web.server
(:require [clojure.string :as str]
[thornydev.clj-sockets :as sk]
[server.socket :refer [create-server close-server]]
[thornydev.web.handlers :as hdlr])
( java.util.concurrent ) )
)
(defn rrest [coll]
(rest (rest coll)))
(defn rrrest [coll... |
f72c8855b36192d04381e0755bc13fc571ecca53ed139a82f51bec9d028389eb | penpot/penpot | common.cljc | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.common.geom.shapes.common
(:require
[app.common.data :as d]
[app.common.geom.matrix :as gmt]
... | null | https://raw.githubusercontent.com/penpot/penpot/3de217a52efd12759b2c0e821f190bf805db41e1/common/src/app/common/geom/shapes/common.cljc | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.common.geom.shapes.common
(:require
[app.common.data :as d]
[app.common.geom.matrix :as gmt]
[app.common.geom.point :as gpt]... |
8c10a3b07b0d357e59a73e87986b9bacd54bfe907a9050b58f027801ad907c55 | anoma/juvix | Options.hs | module Commands.Dev.Asm.Run.Options where
import CommonOptions
data AsmRunOptions = AsmRunOptions
{ _asmRunNoValidate :: Bool,
_asmRunInputFile :: AppPath File
}
deriving stock (Data)
makeLenses ''AsmRunOptions
parseAsmRunOptions :: Parser AsmRunOptions
parseAsmRunOptions = do
_asmRunNoValidate <-
s... | null | https://raw.githubusercontent.com/anoma/juvix/af63c36574da981e62d72b3c985fff2ba6266e8b/app/Commands/Dev/Asm/Run/Options.hs | haskell | module Commands.Dev.Asm.Run.Options where
import CommonOptions
data AsmRunOptions = AsmRunOptions
{ _asmRunNoValidate :: Bool,
_asmRunInputFile :: AppPath File
}
deriving stock (Data)
makeLenses ''AsmRunOptions
parseAsmRunOptions :: Parser AsmRunOptions
parseAsmRunOptions = do
_asmRunNoValidate <-
s... | |
34145d50bd320b5319eccb679bc41168d8b7ebb2072b218caca2f3107dd2efe9 | aplusbi/OCaml-FFI-presentation | setup.ml | setup.ml generated for the first time by
OASIS_START
DO NOT EDIT ( digest : 50d488ee1db90c1826ed21837557eaf1 )
(*
Regenerated by OASIS v0.2.1~alpha1
Visit for more information and
documentation about functions used in this file.
*)
module OASISGettext = struct
# 21 "/home/niki/projects/ocaml/system... | null | https://raw.githubusercontent.com/aplusbi/OCaml-FFI-presentation/697c80664bbc76c60ab91371500585f83b246b52/variant/setup.ml | ocaml |
Regenerated by OASIS v0.2.1~alpha1
Visit for more information and
documentation about functions used in this file.
Nothing more in the string
String end with a separator
Start with a _ if digit
Default value container
Last chance to get a value: the default
Get data
Get value
Set data
Set d... | setup.ml generated for the first time by
OASIS_START
DO NOT EDIT ( digest : 50d488ee1db90c1826ed21837557eaf1 )
module OASISGettext = struct
# 21 "/home/niki/projects/ocaml/system/oasis-0.2.1~alpha1/src/oasis/OASISGettext.ml"
let ns_ str =
str
let s_ str =
str
let f_ (str : ('a, 'b, 'c,... |
d26a88774866cc4e4ca9dc7ad76c1649bd2f8f39eaeadca043f4b69c3079d16a | vaibhavsagar/experiments | XPathResultType.hs | module Dotnet.System.Xml.XPath.XPathResultType where
import Dotnet
import qualified IOExts
import qualified Dotnet.System.Type
import qualified Dotnet.System.Enum
data XPathResultType_ a
type XPathResultType a = Dotnet.System.Enum.Enum (XPathResultType_ a)
data XPathResultTypeTy
= Number
| String
| Boolean
| Nod... | null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/dotnet/lib/Dotnet/System/Xml/XPath/XPathResultType.hs | haskell | module Dotnet.System.Xml.XPath.XPathResultType where
import Dotnet
import qualified IOExts
import qualified Dotnet.System.Type
import qualified Dotnet.System.Enum
data XPathResultType_ a
type XPathResultType a = Dotnet.System.Enum.Enum (XPathResultType_ a)
data XPathResultTypeTy
= Number
| String
| Boolean
| Nod... | |
7da27649e6142233c69a3d28305573157bc740c87bc23d1db86b83d8887151ac | favila/crinkle | component_test.cljs | (ns crinkle.component-test
(:require [clojure.test :refer [deftest testing is]]
[crinkle.component :as c]
[crinkle.dom :as d]
[react-test-renderer :as rtr]))
;; For now one must manually inspect the generated js to verify these tests
(defn myrawcomponentfn [{:keys [a b c]}]
#js... | null | https://raw.githubusercontent.com/favila/crinkle/7c24c7cc31bdf507f2e9ab72b547ba52ef692ddc/test/crinkle/component_test.cljs | clojure | For now one must manually inspect the generated js to verify these tests | (ns crinkle.component-test
(:require [clojure.test :refer [deftest testing is]]
[crinkle.component :as c]
[crinkle.dom :as d]
[react-test-renderer :as rtr]))
(defn myrawcomponentfn [{:keys [a b c]}]
#js[a b c])
(c/RE "div" {:key 1 :style #js{:color "w"}})
(c/CE myrawcomponent... |
b9d52ac0d634fed37ed85288f357ae21e1eaebae6faf3d0a515d0cfa53a1f216 | input-output-hk/cardano-benchmarking | GeneratorTx.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - all - missed - specialisations #
{-# OPTIONS_GHC -Wno-missed-specialisations #-}
# OPTION... | null | https://raw.githubusercontent.com/input-output-hk/cardano-benchmarking/af05b42df27e2cc7305475cf5c4efa81e7f97540/cardano-tx-generator/src/Cardano/Benchmarking/GeneratorTx.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
# OPTIONS_GHC -Wno-missed-specialisations #
---------------------------------------------------------------------------------------
Obtain initial funds.
---------------------------------------------------------------------------------------
The number of splitting tx... | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - all - missed - specialisations #
# OPTIONS_GHC -Wno - orphans #
module Cardano.Benchmarking.GeneratorTx
( AsyncBenchmarkControl
, NumberOfTxs(... |
71c4bad8b917ecf74cfb5540c6db9b529c01943567ebc5448f80be89ba7c356b | axelarge/advent-of-code | project.clj | (defproject advent-of-code "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/math.combinatorics "0.1.6"]
[clj-http "3.11.0"]
... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/project.clj | clojure | (defproject advent-of-code "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/math.combinatorics "0.1.6"]
[clj-http "3.11.0"]
... | |
3dc3b128d7a88552fbb52315571a575c16993532e8350b5282be1e2553cbe9ed | auser/hermes | cluster.erl | -module (cluster).
-include ("hermes.hrl").
-export ([get/1, post/2, put/2, delete/2]).
/cluster
get([]) ->
Monitors = mon_server:list_monitors(),
JsonMonitors = lists:map(fun({Mon, Types}) ->
{Mon, lists:map(fun(T) -> utils:turn_binary(T) end, Types)}
end, Monitors),
{?MODULE, {struct,
{mon... | null | https://raw.githubusercontent.com/auser/hermes/32741eb75398ebbcbf640e2c73dfd2a54f0d1241/src/rest/controllers/cluster.erl | erlang | {?MODULE, {struct, [
]}};
====================================================================
PRIVATE
==================================================================== | -module (cluster).
-include ("hermes.hrl").
-export ([get/1, post/2, put/2, delete/2]).
/cluster
get([]) ->
Monitors = mon_server:list_monitors(),
JsonMonitors = lists:map(fun({Mon, Types}) ->
{Mon, lists:map(fun(T) -> utils:turn_binary(T) end, Types)}
end, Monitors),
{?MODULE, {struct,
{mon... |
09ee341d2a5722463d6af3171abb9bc2748d144028180ff4efb909f82ca734ab | atdixon/me.untethr.nostr-desk | cache.clj | (ns me.untethr.nostr.cache
(:import (com.google.common.cache CacheBuilder Cache CacheLoader LoadingCache)))
(defn build
^Cache [^String spec]
(.build
(CacheBuilder/from spec)))
(defn build-loading
^LoadingCache [^String spec load-fn]
(.build
(CacheBuilder/from spec)
^CacheLoader (proxy [CacheLoa... | null | https://raw.githubusercontent.com/atdixon/me.untethr.nostr-desk/0ef74ca5e1a80ce71abd84a1569d71e3cba2be9a/src/me/untethr/nostr/cache.clj | clojure | (ns me.untethr.nostr.cache
(:import (com.google.common.cache CacheBuilder Cache CacheLoader LoadingCache)))
(defn build
^Cache [^String spec]
(.build
(CacheBuilder/from spec)))
(defn build-loading
^LoadingCache [^String spec load-fn]
(.build
(CacheBuilder/from spec)
^CacheLoader (proxy [CacheLoa... | |
c58ec5c14960bf5f5b3f8f6c4607011a125632d22e3c8bb26149c8f969bfb402 | remodoy/clj-postgresql | Point.clj | (ns clj-postgresql.geometric.Point
"Example implementation of a PGobject that also implements
Clojure's ISeq and shows as a sequence of two numbers."
(:gen-class
:extends org.postgresql.geometric.PGpoint
:implements [clojure.lang.Counted clojure.lang.ISeq]
:main false))
(defn to-list
[^org.postgresql... | null | https://raw.githubusercontent.com/remodoy/clj-postgresql/38eec16386e43504addcae4601fa36f595c81f1a/src/clj_postgresql/geometric/Point.clj | clojure | (ns clj-postgresql.geometric.Point
"Example implementation of a PGobject that also implements
Clojure's ISeq and shows as a sequence of two numbers."
(:gen-class
:extends org.postgresql.geometric.PGpoint
:implements [clojure.lang.Counted clojure.lang.ISeq]
:main false))
(defn to-list
[^org.postgresql... | |
f59f7b37e06cf973e491a43e455c54e9af4e17848bcfcef977de20cf15016391 | DSiSc/why3 | Macrogen_nlparams_sig.mli |
type printer = Format.formatter -> unit
open Macrogen_decls
module type NLParameters = sig
val nlfree_var_type_name : TName.t -> printer
val default_variable_value : TName.t -> printer
val nltype_name : TName.t -> printer
val free_variable_name : TName.t -> printer
val bound_variable_name : TName.t -> p... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/examples/prover/macro_generator/Macrogen_nlparams_sig.mli | ocaml |
type printer = Format.formatter -> unit
open Macrogen_decls
module type NLParameters = sig
val nlfree_var_type_name : TName.t -> printer
val default_variable_value : TName.t -> printer
val nltype_name : TName.t -> printer
val free_variable_name : TName.t -> printer
val bound_variable_name : TName.t -> p... | |
6384a382cb897c9efbe0ce15a1d183c9fd4c500da35237729c0cf24e6e819b1d | ddmcdonald/sparser | catalog.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1991 - 1994,2012,2016,2020 - 2021 -- all rights reserved
;;;
;;; File: "catalog"
;;; Module: "objects/chart/words/"
Version : November 2021
1.1 ( 2/13 v2.2 ) Moved the the file and grammar module checking into
;;... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/7440a90ce0bb9770ea5d37418be8c32d889d8e22/Sparser/code/s/objects/chart/words/catalog.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "catalog"
Module: "objects/chart/words/"
the catalog routine.
(7/19/94) added Alphabetize-word-list
(3/1/12) quieting the compiler
-----------------------------------------------------------
noting provinance of definitions... | copyright ( c ) 1991 - 1994,2012,2016,2020 - 2021 -- all rights reserved
Version : November 2021
1.1 ( 2/13 v2.2 ) Moved the the file and grammar module checking into
(in-package :sparser)
(defparameter *source-of-unknown-words-definition* nil
"This is intended to provide the same sort of informat... |
ef8e28a37a2c0b3744f5348de9d83b5c40ee1da54e680d5f323e2deaec055435 | cbiffle/ruckus | df-prims.rkt | #lang racket
; Stuff needed to evaluate distance functions in generated Racket code.
(provide
radial-project
smooth-min
df-sphere
df-box
df-capsule
df-rect
df-circle)
(require "./math.rkt")
(define (radial-project q period shift)
(let* ([a (if (zero? (vec3-x q))
(* (sgn (vec3-y q)) (/ ... | null | https://raw.githubusercontent.com/cbiffle/ruckus/62cd4a00837783a88a007c2d5979909a4e86ca0f/core/df-prims.rkt | racket | Stuff needed to evaluate distance functions in generated Racket code. | #lang racket
(provide
radial-project
smooth-min
df-sphere
df-box
df-capsule
df-rect
df-circle)
(require "./math.rkt")
(define (radial-project q period shift)
(let* ([a (if (zero? (vec3-x q))
(* (sgn (vec3-y q)) (/ pi 2))
(atan (vec3-y q) (vec3-x q)))]
[d (sqrt (+... |
7b15c0f5e4237651c8767a083519c5259c0c2886095f0f3dfd54079a239b6c59 | stumpwm/stumpwm-contrib | package.lisp | (defpackage #:gnu-pw-mgr
(:use #:cl #:stumpwm)
(:export #:password-to-selection
#:*password-id-remember-timeout*
#:*clipboard-clear-timeout*))
| null | https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/util/gnu-pw-mgr/package.lisp | lisp | (defpackage #:gnu-pw-mgr
(:use #:cl #:stumpwm)
(:export #:password-to-selection
#:*password-id-remember-timeout*
#:*clipboard-clear-timeout*))
| |
738d814f81171c81d1675e7f0340f8bf98f991aa949e05787412342379bb0341 | tsloughter/grpcbox | grpcbox_chain_interceptor.erl | -module(grpcbox_chain_interceptor).
-export([stream_chain/1,
unary_client/1,
new_stream_client/1,
send_client/1,
recv_client/1,
unary/1,
stream/1]).
stream_chain(L) ->
#{new_stream => new_stream_client(L),
send_msg => send_client(L),
recv_msg => re... | null | https://raw.githubusercontent.com/tsloughter/grpcbox/49d9275b2bb264e3ecd4c3adee5cf0c03972d496/src/grpcbox_chain_interceptor.erl | erlang | this may change in the future
and so on until the last which has the service method handler as usual. | -module(grpcbox_chain_interceptor).
-export([stream_chain/1,
unary_client/1,
new_stream_client/1,
send_client/1,
recv_client/1,
unary/1,
stream/1]).
stream_chain(L) ->
#{new_stream => new_stream_client(L),
send_msg => send_client(L),
recv_msg => re... |
3c96e889e98b8928e184c04f9d07db15fb566333fb04f67b818db7ba23a694a6 | S8A/htdp-exercises | ex048.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex048) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex048.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex048) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ... |
58ad91148b221f234608e8530b2f15fd95b98ec211665a9f260d6f25bfcbef9e | tonyg/pi-nothing | mkgot-x86_64.rkt | #lang racket
;; Experiment with production of an x86_64 Global Offset Table for dynamic linking
(require bitsyntax)
(require "dump-bytes.rkt")
(require "disasm.rkt")
(require "asm-x86_64.rkt")
(require "linker.rkt")
(require "elf.rkt")
(define origin-addr #x0000000000400000)
need to skip past the ELF header .
(def... | null | https://raw.githubusercontent.com/tonyg/pi-nothing/4b2b59d42babd72cfd007cb71ed295dcdbf53d4a/nothingc/mkgot-x86_64.rkt | racket | Experiment with production of an x86_64 Global Offset Table for dynamic linking
procedure linkage table
index into relocation table
index into relocation table
global offset table
int addsharedvar(int arg) {
}
| #lang racket
(require bitsyntax)
(require "dump-bytes.rkt")
(require "disasm.rkt")
(require "asm-x86_64.rkt")
(require "linker.rkt")
(require "elf.rkt")
(define origin-addr #x0000000000400000)
need to skip past the ELF header .
(define start-addr (+ origin-addr start-offset))
(list (label-anchor 'plt-trapunboun... |
ce251d673321c3098ce0e014d767df0dc8104cad6c3e4e4d2177a65188253ed7 | metabase/metabase | cache_test.clj | (ns metabase.query-processor.middleware.cache-test
"Tests for the Query Processor cache."
(:require
[buddy.core.codecs :as codecs]
[clojure.core.async :as a]
[clojure.data.csv :as csv]
[clojure.test :refer :all]
[java-time :as t]
[medley.core :as m]
[metabase.driver.sql-jdbc.execute :as sql-jdb... | null | https://raw.githubusercontent.com/metabase/metabase/56b28e5b07e73002d5c507f583e3d64439ba8b8c/test/metabase/query_processor/middleware/cache_test.clj | clojure | if `save-results!` isn't going to get called because `*result-fn*`
throws an Exception, catch it and send it to `save-chan` so it still
gets a result and tests can finish
clear out stale values in save/purge channels
clear any existing values in the `save-chan`
wait-for-result closes the channel
rerun query gett... | (ns metabase.query-processor.middleware.cache-test
"Tests for the Query Processor cache."
(:require
[buddy.core.codecs :as codecs]
[clojure.core.async :as a]
[clojure.data.csv :as csv]
[clojure.test :refer :all]
[java-time :as t]
[medley.core :as m]
[metabase.driver.sql-jdbc.execute :as sql-jdb... |
6ed4df7196b047a8bf8dc8061ef0c746da5dd1c07e23b2d495bf60d3ab24ad60 | ceramic/ceramic | error.lisp | (in-package :cl-user)
(defpackage ceramic.error
(:use :cl)
(:export :ceramic-error
:unsupported-operating-system
:not-in-release
:no-such-tag)
(:documentation "Error conditions."))
(in-package :ceramic.error)
(define-condition ceramic-error ()
()
(:documentation "The base cla... | null | https://raw.githubusercontent.com/ceramic/ceramic/5d81e2bd954440a6adebde31fac9c730a698c74b/src/error.lisp | lisp | (in-package :cl-user)
(defpackage ceramic.error
(:use :cl)
(:export :ceramic-error
:unsupported-operating-system
:not-in-release
:no-such-tag)
(:documentation "Error conditions."))
(in-package :ceramic.error)
(define-condition ceramic-error ()
()
(:documentation "The base cla... | |
a8f7276e55f789c6011e4cd49fd55c4db0d6958d13d7f54796559ff4e5e802a7 | alesaccoia/festival_flinger | cmu_us_jmk_lexicon.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_jmk_cg/festvox/cmu_us_jmk_lexicon.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... | CMU lexicon for US English
(require 'postlex)
(setup_cmu_lex)
(define (cmu_us_jmk::select_lexicon)
"(cmu_us_jmk::select_lexicon)
Set up the CMU lexicon for US English."
(lex.select "cmu")
Post lexical rules
(set! postlex_rules_hooks (list postlex_apos_s_check))
)
(define (cmu_us_jmk::reset_lexicon)
"(cm... |
62779678ee53c1d35680c154072995ef6f73fefbb78975c8fa14b672762ce041 | effectai/effect-network | token.cljs | (ns e2e.token
(:require
[eos-cljs.core :as eos]
[eos-cljs.node-api :refer [deploy-file]]
[clojure.string :as string]
[cljs.test :refer [do-report report] :refer-macros [deftest is testing run-tests async use-fixtures]]
[cljs.core.async :refer [go] ]
[cljs.core.async.interop :refer [<p!]]
[e2e.uti... | null | https://raw.githubusercontent.com/effectai/effect-network/529acfd2493509eab9d35c84c11e53a6aed2b92e/tests/e2e/token.cljs | clojure | (ns e2e.token
(:require
[eos-cljs.core :as eos]
[eos-cljs.node-api :refer [deploy-file]]
[clojure.string :as string]
[cljs.test :refer [do-report report] :refer-macros [deftest is testing run-tests async use-fixtures]]
[cljs.core.async :refer [go] ]
[cljs.core.async.interop :refer [<p!]]
[e2e.uti... | |
bda9493b591d50572ecd8c9d19a84c0c4717b776c4368cb7112558967a8e18d5 | Bike/hominy | info.lisp | (in-package #:hominy/info)
;; An INFO is something passed around by flow analysis (data or control).
In order to run something like , they must support meet and join
;; operations, as well as a subinfop to determine if propagation should
;; continue.
;; They're also used by the more basic compiler(s).
;; Info are c... | null | https://raw.githubusercontent.com/Bike/hominy/ee8bb886d26f9c04eadf978ddbf4141c687b0c74/info.lisp | lisp | An INFO is something passed around by flow analysis (data or control).
operations, as well as a subinfop to determine if propagation should
continue.
They're also used by the more basic compiler(s).
Info are computed from other info, or from constants and parameters and
encloses and stuff.
FOLLOWING NOT ACTUALLY... | (in-package #:hominy/info)
In order to run something like , they must support meet and join
use multiple kinds of datum but only output one , i.e. the function that
the abstract interpreter in Cleavir . For now the flow analysis here is
(defclass info ()
((%type :initarg :type :reader type)))
(defun default... |
20bc722f5163b54d96b6e5781b70ed3bbeec87e2b753d608cf875d226c0a06a4 | apache/couchdb-mochiweb | mochiweb_request_tests.erl | -module(mochiweb_request_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
accepts_content_type_test() ->
Req1 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
mochiweb_headers:make([{"Accept",
"multipart/related"}])),
?assertEqual(true,
(mochiweb_request:accepts_content_type("mu... | null | https://raw.githubusercontent.com/apache/couchdb-mochiweb/070594e4d66163d662ac7e3bfb75dadcc922dd7c/test/mochiweb_request_tests.erl | erlang | -module(mochiweb_request_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
accepts_content_type_test() ->
Req1 = mochiweb_request:new(nil, 'GET', "/foo", {1, 1},
mochiweb_headers:make([{"Accept",
"multipart/related"}])),
?assertEqual(true,
(mochiweb_request:accepts_content_type("mu... | |
5c5f01049c4766ad6ef3ec7aae5b6a8fa4235280f7b7f4c7a76deeedfacb80de | BardurArantsson/cqrs | Scope.hs | module Data.CQRS.Test.Internal.Scope
( ScopeM
, ask
, mkRunScope
, verify
) where
import Control.Exception (bracket)
import Control.Monad ((>=>))
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Reader (ReaderT, ask, runReaderT)
import Data.CQRS.Test.Internal.TestKitSettings
Mon... | null | https://raw.githubusercontent.com/BardurArantsson/cqrs/2491d83e2bcd68c883aaea33cdce6c5ea8c0cd1a/cqrs-testkit/src/Data/CQRS/Test/Internal/Scope.hs | haskell | test code, so we don't bother making it opaque.
Verify a property in the current spec scope. This is just an alias
for 'lifIO' which can be used to aid readability.
Make a "scope runner" function from a given IO action and test
settings. Each scope will be automatically bracketed by the "setUp"
and "tearDown" fun... | module Data.CQRS.Test.Internal.Scope
( ScopeM
, ask
, mkRunScope
, verify
) where
import Control.Exception (bracket)
import Control.Monad ((>=>))
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Reader (ReaderT, ask, runReaderT)
import Data.CQRS.Test.Internal.TestKitSettings
Mon... |
1d53300acc782f54c1cc14aba55a28b4df80a92649a90387133ee5bbb0cee251 | Soostone/katip | example_lens.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Main
( main,
)
where
--------------------------... | null | https://raw.githubusercontent.com/Soostone/katip/d868c431b435dc7e11a3888e2b333653514c1cd8/katip/examples/example_lens.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
general as possible.
---------------------------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Main
( main,
)
where
import Control.Applicative as A
import Control.Exception
impo... |
debdc38f5e6a76dd855c6ca2117f74abc0f3a934e54972e220478d805af5228a | ekmett/linear | V0.hs | # LANGUAGE CPP #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DeriveGeneric #
# LANGUAGE Trustworthy #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveLift #-}
#ifndef MIN_VERSION_hashable
#define M... | null | https://raw.githubusercontent.com/ekmett/linear/3efe225e20948703f5b62039b38018f1ffa8a652/src/Linear/V0.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveLift #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
0-D Vectors
---------------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DeriveGeneric #
# LANGUAGE Trustworthy #
# LANGUAGE DataKinds #
#ifndef MIN_VERSION_hashable
#define MIN_VERSION_hashable(x,y,z) 1
#endif
#ifndef MIN_VERSION_vector
... |
d30deef0944fce819432655fdf8ca13ac35ec96da074b041b0aae3c0c75a1b23 | DavidAlphaFox/RabbitMQ | sockjs.erl | -module(sockjs).
-export([send/2, close/1, close/3, info/1]).
%% -type(conn() :: {sockjs_session, any()}).
%% Send data over a connection.
%% -spec send(iodata(), conn()) -> ok.
send(Data, Conn = {sockjs_session, _}) ->
sockjs_session:send(Data, Conn).
%% Initiate a close of a connection.
%% -spec close(conn())... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/sockjs-erlang-wrapper/sockjs-erlang-git/src/sockjs.erl | erlang | -type(conn() :: {sockjs_session, any()}).
Send data over a connection.
-spec send(iodata(), conn()) -> ok.
Initiate a close of a connection.
-spec close(conn()) -> ok.
-spec info(conn()) -> [{atom(), any()}]. | -module(sockjs).
-export([send/2, close/1, close/3, info/1]).
send(Data, Conn = {sockjs_session, _}) ->
sockjs_session:send(Data, Conn).
close(Conn) ->
close(1000, "Normal closure", Conn).
-spec close(non_neg_integer ( ) , string ( ) , conn ( ) ) - > ok .
close(Code, Reason, Conn = {sockjs_session, _}) -... |
ee4f8168ba0219955e2835b49ccef67143664fc41ce9193016343d0b85d99630 | ConferOpenSource/composite | Main.hs | module Main where
import ClassyPrelude
import App
main :: IO ()
main = startApp
| null | https://raw.githubusercontent.com/ConferOpenSource/composite/4be75266b5293516b225030c207c4e08b35c1df2/example/app/Main.hs | haskell | module Main where
import ClassyPrelude
import App
main :: IO ()
main = startApp
| |
7b70248751cdb63195a7ca71176059fff5eba3fe639b8814df00a830463bb1d0 | fons/cl-twitter | twitter-tweet-status.lisp | (in-package :cl-twitter)
;;
;; Status/Tweet Element --> depends on twitter user..
;;
(define-element tweet ((user twitter-user) (entities twitter-entities))
"A status element consisting of information on a status and a nested
user element"
(id "" nil)
(contributors nil nil)
(created-at "" nil)
(text "" ... | null | https://raw.githubusercontent.com/fons/cl-twitter/6a72291f8c60bd07efd2a8605f18a3eb7570cc4a/api/twitter-tweet-status.lisp | lisp |
Status/Tweet Element --> depends on twitter user..
embedded twitter entities
embedded user
Tweets resources
statuses/show/:id
statuses/update
statuses/destroy/:id
statuses/retweet/:id
statuses/retweets/:id
statuses/:id/retweeted_by
sta... | (in-package :cl-twitter)
(define-element tweet ((user twitter-user) (entities twitter-entities))
"A status element consisting of information on a status and a nested
user element"
(id "" nil)
(contributors nil nil)
(created-at "" nil)
(text "" nil)
(source "" nil)
(truncated "" nil)
(favorited "" ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.