_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 |
|---|---|---|---|---|---|---|---|---|
37249e4d031017409b4b11b2d59cea3c6cb62f5d97b5a1c939a92323b25e275d | NetComposer/nklib | nklib_exec.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2019 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nklib/1f29f8f566586618651e4680dcc488f2dc11ff5c/src/nklib_exec.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 express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2019 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(nklib_exec).
-author... |
d5e437228ca63967ee177d8cb62276f1b2ac354a72465fcafd249a90b7ea62e1 | inhabitedtype/ocaml-aws | updateTrafficPolicyComment.ml | open Types
open Aws
type input = UpdateTrafficPolicyCommentRequest.t
type output = UpdateTrafficPolicyCommentResponse.t
type error = Errors_internal.t
let service = "route53"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/route53/lib/updateTrafficPolicyComment.ml | ocaml | open Types
open Aws
type input = UpdateTrafficPolicyCommentRequest.t
type output = UpdateTrafficPolicyCommentResponse.t
type error = Errors_internal.t
let service = "route53"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_... | |
ce93fd96906ee9f6477ba7ad1fc4dc2cff79e60680366798a9575d23744aa864 | fterrier/pylos | play_test.clj | (ns game.play-test
(:require [clojure.core.async :refer [<! <!! >!! alt!! chan close! go timeout]]
[clojure.test :refer [deftest is testing]]
[game
[play :refer [play]]
[strategy :refer [get-input-channel]]]
[pylos
[game :refer [new-pylos-game... | null | https://raw.githubusercontent.com/fterrier/pylos/f9283cf58a32000ed271e768ab6151ac081ed37d/test/game/play_test.clj | clojure | we expect a nil result cause the channel is closed
the channel should be closed
we pass a stupid move to the game
we take the result, there shouldn't be anything
we pass a real move to the game
this time we should get something
we pass a move from the wrong player to the game
we take the result, there shouldn't... | (ns game.play-test
(:require [clojure.core.async :refer [<! <!! >!! alt!! chan close! go timeout]]
[clojure.test :refer [deftest is testing]]
[game
[play :refer [play]]
[strategy :refer [get-input-channel]]]
[pylos
[game :refer [new-pylos-game... |
8aeeea54ab55d119a7897df30054b8ec799492ec9c3984ce49c0a306da3214a8 | vincenthz/hs-cryptohash | SHA512.hs | # LANGUAGE ForeignFunctionInterface #
-- |
-- Module : Crypto.Hash.SHA512
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : unknown
--
A module containing SHA512 bindings
--
module Crypto.Hash.SHA512
( Ctx(..)
-- * Incremental hashing Functions
: :
... | null | https://raw.githubusercontent.com/vincenthz/hs-cryptohash/bc7993c104964a2a593265266730ebc78ef59774/Crypto/Hash/SHA512.hs | haskell | |
Module : Crypto.Hash.SHA512
License : BSD-style
Stability : experimental
Portability : unknown
* Incremental hashing Functions
:: Int -> Ctx
:: Ctx -> ByteString -> Ctx
:: Ctx -> [ByteString] -> Ctx
* Single Pass hashing
:: ByteString -> ByteString
:: ByteString -> ByteString
| SHA512 Contex... | # LANGUAGE ForeignFunctionInterface #
Maintainer : < >
A module containing SHA512 bindings
module Crypto.Hash.SHA512
( Ctx(..)
: :
: : Ctx - > ByteString
) where
import Prelude hiding (init)
import Foreign.Ptr
import Foreign.ForeignPtr (withForeignPtr)
import Foreign.Storable
import Foreign.Ma... |
bce41982371f06a0676d4fa8f8b1c727bc7fb2f2db01d910d2f1f6dca2fe90ab | rtoy/cmucl | error.lisp | (,foo)
#1#
(defun foo ()
"foo"
(fonrod)
| null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/tests/error.lisp | lisp | (,foo)
#1#
(defun foo ()
"foo"
(fonrod)
| |
7f1362e3ed211e383bc3256dcf6623d250636b0e117c00ad8529fe3eafa41cb5 | Palmik/data-store | Main.hs | # LANGUAGE TypeOperators #
module Example01
where
--------------------------------------------------------------------------------
import Control.Applicative
import qualified Control.Monad.State as State
--------------------------------------------------------------------------------
import qualified Data.S... | null | https://raw.githubusercontent.com/Palmik/data-store/20131a9d6d310c29b57fd9e3b508f0335e1113b4/examples/01/Main.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | # LANGUAGE TypeOperators #
module Example01
where
import Control.Applicative
import qualified Control.Monad.State as State
import qualified Data.Store as S
import Data.Store (M, O, (.:), (.:.), (:.)(..), (.<), (.<=), (.>), (.>=), (./=), (.==), (.&&), (.||))
data Content = Content
{ contentNam... |
2f894d2825365382584469d054094d6068d897bc1a83a0ebd18d81ed46ef14e8 | nojb/llvm-min-caml | constFold.ml | open KNormal
open Prim
let memb x env =
try (match M.find x env with Bool(_) -> true | _ -> false)
with Not_found -> false
let memi x env =
try (match M.find x env with Int(_) -> true | _ -> false)
with Not_found -> false
let memf x env =
try (match M.find x env with Float(_) -> true | _ -> false)
with Not... | null | https://raw.githubusercontent.com/nojb/llvm-min-caml/68703b905f8292cb2e20b41bbd90cfea85ca2a19/constFold.ml | ocaml | 定数畳み込みルーチン本体 (caml2html: constfold_g)
| Var(x) when memf x env -> Float(findf x env)
足し算のケース (caml2html: constfold_add)
letのケース (caml2html: constfold_let) | open KNormal
open Prim
let memb x env =
try (match M.find x env with Bool(_) -> true | _ -> false)
with Not_found -> false
let memi x env =
try (match M.find x env with Int(_) -> true | _ -> false)
with Not_found -> false
let memf x env =
try (match M.find x env with Float(_) -> true | _ -> false)
with Not... |
c9a8579c9dfff2e8d990ed1173a8f54af42a7bd752eb45994bd2a63bd33ddac1 | tonsky/advent-of-code | day15.clj | (ns advent-of-code.year2021.day15
(:require
[advent-of-code.core :refer [cond+]]
[clojure.data.priority-map :refer [priority-map]]
[clojure.java.io :as io]
[clojure.java.math :as math]
[clojure.string :as str]
[clojure.set :as set]))
(set! *warn-on-reflection* true)
(set! *print-namespace-maps* fa... | null | https://raw.githubusercontent.com/tonsky/advent-of-code/b7267645e19f95664af9cf8501610c12c9daa569/src/advent_of_code/year2021/day15.clj | clojure | (ns advent-of-code.year2021.day15
(:require
[advent-of-code.core :refer [cond+]]
[clojure.data.priority-map :refer [priority-map]]
[clojure.java.io :as io]
[clojure.java.math :as math]
[clojure.string :as str]
[clojure.set :as set]))
(set! *warn-on-reflection* true)
(set! *print-namespace-maps* fa... | |
37f00fd93b958fadeff08cf47982841ec44a34dc64bce930ab0574dbf9434f01 | anoma/juvix-circuits | prelude.lisp | (in-package :alu.prelude)
(defprimitive-type int)
(defprimitive-type int64)
(defprimitive-type void)
(defprimitive-type bool)
(defprimitive-type array)
(defprimitive void)
(defprimitive +)
(defprimitive *)
(defprimitive =)
(defprimitive range)
(defprimitive exp)
(defmacro deflex (var &body (&optional val documentati... | null | https://raw.githubusercontent.com/anoma/juvix-circuits/a35d6af734c69ad40c809c14a70cadc68cac604f/alu/prelude.lisp | lisp | documentation copied from def in serpaeum
this maybe works? | (in-package :alu.prelude)
(defprimitive-type int)
(defprimitive-type int64)
(defprimitive-type void)
(defprimitive-type bool)
(defprimitive-type array)
(defprimitive void)
(defprimitive +)
(defprimitive *)
(defprimitive =)
(defprimitive range)
(defprimitive exp)
(defmacro deflex (var &body (&optional val documentati... |
31bde608b784918f7711c8bde1f9f72339e308346a881c6f9903650ec6c2ced8 | webyrd/mediKanren | multiomics-api-query.rkt | #lang racket
(provide (all-defined-out))
(require json net/url)
(define (js-count js)
(cond ((pair? js) (foldl + 0 (map js-count js)))
((hash? js) (foldl + 0 (hash-map js (lambda (k v) (js-count v)))))
(else 1)))
;; drug response kg
(define url.multiomics/drug-response
"")
;; cancer gene mu... | null | https://raw.githubusercontent.com/webyrd/mediKanren/f82c3c7eb0814eefbfff97f69ee9f73fb258d55c/medikanren/test/external-http/2020_NCATS_relay/multiomics-api-query.rkt | racket | drug response kg
cancer gene mutation frequnency
query with gene and get back mutation prevalence by cancer-type
disease --> gene w/ frequency of mutation
(string-append | #lang racket
(provide (all-defined-out))
(require json net/url)
(define (js-count js)
(cond ((pair? js) (foldl + 0 (map js-count js)))
((hash? js) (foldl + 0 (hash-map js (lambda (k v) (js-count v)))))
(else 1)))
(define url.multiomics/drug-response
"")
(define url.multiomics/tcga-mut-freq
... |
7ee73010015ab3f52c92816279b3a8696973123bd9caffcf06120a7bc7a7828d | dinakajoy/simple_mini_github | server.eml.ml | open Lwt.Syntax
let home =
<html>
<head><link rel="stylesheet" href="/static/style.css"></head>
<body id="body">
<header class="header"><h1>Mini Github</h1></header>
<main class="main">
<p>Please paste in a git repository below: </p>
<div class="input">
<input type="text... | null | https://raw.githubusercontent.com/dinakajoy/simple_mini_github/2412e4970c2ad4f58ff23ab9b5f58904d17de0f3/server/server.eml.ml | ocaml | open Lwt.Syntax
let home =
<html>
<head><link rel="stylesheet" href="/static/style.css"></head>
<body id="body">
<header class="header"><h1>Mini Github</h1></header>
<main class="main">
<p>Please paste in a git repository below: </p>
<div class="input">
<input type="text... | |
63820093b6b6f1ad92a0486268d7da95cc402b82ed5ced0444e16b40476094ba | krajj7/BotHack | position.clj | (ns bothack.position
(:require [clojure.tools.logging :as log]
[clojure.string :as string]
[bothack.util :refer :all]))
(defrecord Position [x y]
bothack.bot.IPosition
(x [pos] (:x pos))
(y [pos] (:y pos)))
(defmethod print-method Position [pos w]
(.write w (str "#Position{:x " (:x p... | null | https://raw.githubusercontent.com/krajj7/BotHack/70226b3c8ed12d29c64068aec0acc0ca71d57adf/src/bothack/position.clj | clojure | to corner | (ns bothack.position
(:require [clojure.tools.logging :as log]
[clojure.string :as string]
[bothack.util :refer :all]))
(defrecord Position [x y]
bothack.bot.IPosition
(x [pos] (:x pos))
(y [pos] (:y pos)))
(defmethod print-method Position [pos w]
(.write w (str "#Position{:x " (:x p... |
6576a83c05fe69acc5e6b863cd62f19311043783cfbe73f8db47b9fe0f8b0fce | runtimeverification/haskell-backend | SymbolKywd.hs | |
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Attribute.Symbol.SymbolKywd (
SymbolKywd (..),
symbolKywdId,
symbolKywdSymbol,
symbolKywdAttribute,
) where
import ... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/src/Kore/Attribute/Symbol/SymbolKywd.hs | haskell | |
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Attribute.Symbol.SymbolKywd (
SymbolKywd (..),
symbolKywdId,
symbolKywdSymbol,
symbolKywdAttribute,
) where
import ... | |
b639ffa505c1f31cdb0a3af0d6115d24825bcce62c326edc5b90ac9c28cd282d | rothfield/doremi-script | core.cljc | core.cljc Common to both clj and cljs ! ! ! ! ! !
(ns doremi-script.core
(:require
#?(:clj
[com.stuartsierra.component :as component]
)
#?(:cljs
[quile.component :as component]
)
[instaparse.core :as insta]
[instaparse.viz :as viz]
[clojure.string :refer
... | null | https://raw.githubusercontent.com/rothfield/doremi-script/7141720e14bb0dbac344b55caab47c4f046635a5/src/doremi_script/core.cljc | clojure | Implement the Lifecycle protocol
Discards the grammar-specification.
_ (println "a is" a)
to use in repl:
cpr runs current file in vim
cp% runs current form. vim-fireplace
note the tick
another approach would be to hardcode the mapping.
Only flatten D E A and B !!!!! and should only be
done for hindi-compositi... | core.cljc Common to both clj and cljs ! ! ! ! ! !
(ns doremi-script.core
(:require
#?(:clj
[com.stuartsierra.component :as component]
)
#?(:cljs
[quile.component :as component]
)
[instaparse.core :as insta]
[instaparse.viz :as viz]
[clojure.string :refer
... |
63ae0dcf0622cb44b769e01e248e15b022eb432bf5198851a133bf00d1dff860 | irastypain/sicp-on-language-racket | test_exercise_2_04.rkt | #lang racket
(require rackunit "../../src/chapter02/exercise_2_04.rkt")
(check-equal? (car (cons 1 2)) 1 (printf "test#1 2.04 passed\n"))
(check-equal? (car (cons 4 3)) 4 (printf "test#2 2.04 passed\n"))
(check-equal? (cdr (cons 1 2)) 2 (printf "test#3 2.04 passed\n"))
(check-equal? (cdr (cons 4 3)) 3 (printf "test#4... | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/test/chapter02/test_exercise_2_04.rkt | racket | #lang racket
(require rackunit "../../src/chapter02/exercise_2_04.rkt")
(check-equal? (car (cons 1 2)) 1 (printf "test#1 2.04 passed\n"))
(check-equal? (car (cons 4 3)) 4 (printf "test#2 2.04 passed\n"))
(check-equal? (cdr (cons 1 2)) 2 (printf "test#3 2.04 passed\n"))
(check-equal? (cdr (cons 4 3)) 3 (printf "test#4... | |
f24200eb8dbd125bc83f383f8f972f3943792da45cd87b3c5a797afa09fe3157 | shayne-fletcher/zen | yal.ml | type term =
| Var of int
| Abs of term
| App of term * term
let rec shift (c : int) (d : int) : term -> term = function
| Var k as v when k < c -> v
| Var k -> Var (k + d)
| Abs t -> Abs (shift (c + 1) d t)
| App (u, v) -> App (shift c d u, shift c d v)
let rec subst (j : int) (s : term) : term -> term = func... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/yal/yal.ml | ocaml | \x.\y. x
\p.\x.\y. p x y
(\p.\x.\y. p x y) (\x.\y. x) | type term =
| Var of int
| Abs of term
| App of term * term
let rec shift (c : int) (d : int) : term -> term = function
| Var k as v when k < c -> v
| Var k -> Var (k + d)
| Abs t -> Abs (shift (c + 1) d t)
| App (u, v) -> App (shift c d u, shift c d v)
let rec subst (j : int) (s : term) : term -> term = func... |
fa9c66fbaf789a0dd5969bdf7e438c2dd626b28c9c2ae95c91655475a0a0705b | orthecreedence/ghostie | meta.lisp | (:name "trees"
;:actors ((:type "ghostie" :start-pos (-480 -450) :main t :scale (.7 .7 .7)))
:actors ((:id :pilly :type "pill" :start-position (850.480 -400) :scale (.7 .7 .7)))
:objects ((:id :platform1 :type "platform" :start-position (-320 -440) :scale (.7 .7 .7) :limit (-300 1050))
(:id :platform2 :ty... | null | https://raw.githubusercontent.com/orthecreedence/ghostie/6e6f77e1f33511d5311319db4656960de1c6f668/demo/resources/levels/trees/meta.lisp | lisp | :actors ((:type "ghostie" :start-pos (-480 -450) :main t :scale (.7 .7 .7))) | (:name "trees"
:actors ((:id :pilly :type "pill" :start-position (850.480 -400) :scale (.7 .7 .7)))
:objects ((:id :platform1 :type "platform" :start-position (-320 -440) :scale (.7 .7 .7) :limit (-300 1050))
(:id :platform2 :type "platform" :start-position (700 -480) :scale (.7 .7 .7) :limit (-480 -330) :... |
79d7c93e9c398a2f5e9908c80f3e759e265a9c7024509b85c0b609b97fa2d764 | CmdrDats/space-shooter | ui.clj |
(ns space-shooter.ui
(:use [quil.core])
(:require [datomic.api :as d])
(:require [space-shooter.db :as db]))
(defn setup []
(smooth)
(frame-rate 10)
(background 200))
(defmulti render-thing :entity/type)
(defmethod render-thing :ship [e]
(ellipse (:thing/posx e) (:thing/posy e) (:thing/width e) (:thin... | null | https://raw.githubusercontent.com/CmdrDats/space-shooter/cb737f888180cb826371933a40a42f5778623627/src/space_shooter/ui.clj | clojure |
(ns space-shooter.ui
(:use [quil.core])
(:require [datomic.api :as d])
(:require [space-shooter.db :as db]))
(defn setup []
(smooth)
(frame-rate 10)
(background 200))
(defmulti render-thing :entity/type)
(defmethod render-thing :ship [e]
(ellipse (:thing/posx e) (:thing/posy e) (:thing/width e) (:thin... | |
7e5ec47fb762b554fe3877600e9d41834ac8c4dd8f984f0952d6e99bf4eee8d9 | pkaleta/kivi | GmEvaluator.hs | module GmEvaluator where
import Parser
import Utils
import List
import Common
import Debug.Trace
import GmCompiler
import Text.Regex.Posix
import Data.List.Utils
import PatternMatching
import AbstractDataTypes
import LambdaLifter
import LazyLambdaLifter
import DependencyAnalyser
import LambdaCalculusTransformer
import... | null | https://raw.githubusercontent.com/pkaleta/kivi/95d9a7c8023598c3ed634b9a7dbecaee3c6478fe/GmEvaluator.hs | haskell | runTest :: String -> CoreProgram
if the number of arguments on the stack is not sufficient for this supercombinator
not needed for the time being
(NNum 0) -> False
_ -> error "Trying to unbox value other than boolean" | module GmEvaluator where
import Parser
import Utils
import List
import Common
import Debug.Trace
import GmCompiler
import Text.Regex.Posix
import Data.List.Utils
import PatternMatching
import AbstractDataTypes
import LambdaLifter
import LazyLambdaLifter
import DependencyAnalyser
import LambdaCalculusTransformer
import... |
42699739edbea18da2822d0f46df5d8be983c66399e61ae8b15f514e3500a147 | EasyCrypt/easycrypt | ecPhlConseq.mli | (* -------------------------------------------------------------------- *)
open EcUtils
open EcParsetree
open EcFol
open EcCoreGoal
(* -------------------------------------------------------------------- *)
(* FIXME: add t_low* to all these tactics *)
(* ---------------------------------... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/f87695472e70c313ef2966e20979b1afcc2e543e/src/phl/ecPhlConseq.mli | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
FIXME: add t_low* to all these tactics
--------------------------------------------------------------------
-----------------------------------... | open EcUtils
open EcParsetree
open EcFol
open EcCoreGoal
val t_equivF_conseq : form -> form -> FApi.backward
val t_equivS_conseq : form -> form -> FApi.backward
val t_eagerF_conseq : form -> form -> FApi.backward
val t_hoareF_conseq : form -> form -> FApi.backward
val t_hoareS_conseq : f... |
7f2d9e17ed276c88e98a2a5710493c159180eb7cd5a9a164e9905f1e48398229 | agda/agda | Zipper.hs |
module Agda.Utils.Zipper where
class Zipper z where
type Carrier z
type Element z
firstHole :: Carrier z -> Maybe (Element z, z)
plugHole :: Element z -> z -> Carrier z
nextHole :: Element z -> z -> Either (Carrier z) (Element z, z)
data ListZipper a = ListZip [a] [a]
deriving (Eq, Ord, Show, Functor,... | null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/src/full/Agda/Utils/Zipper.hs | haskell |
module Agda.Utils.Zipper where
class Zipper z where
type Carrier z
type Element z
firstHole :: Carrier z -> Maybe (Element z, z)
plugHole :: Element z -> z -> Carrier z
nextHole :: Element z -> z -> Either (Carrier z) (Element z, z)
data ListZipper a = ListZip [a] [a]
deriving (Eq, Ord, Show, Functor,... | |
0a1ba8a894b782af739568df9033e9f2cd7bf27d37fc35917f283f9c59db61bc | maoo/segway | detail.clj | (ns segway.pages.detail
(:use segway.pages.common)
(:require [net.cgrand.enlive-html :as html]))
we only want to select p and
(def *section-sel* [[:#content] :> :p])
(html/defsnippet section-snippet "template/my-style-demo.html" *section-sel*
[text]
[:p] (html/do->
(html/html-content text)))
(def ... | null | https://raw.githubusercontent.com/maoo/segway/569306d306de1de743bcd3e68cf380c373bf1d22/src/segway/pages/detail.clj | clojure | (html/defsnippet carousel-snippet "template/my-style-demo.html" *image-sel*
[image]
[:div] (html/content )
[:*] (html/set-attr :class "holder imgholder"))
Structure - using snippets in segway.pages.common
Breadcrumb
Page content
[:#content] (html/append (html/html-content "<br/>"))
Images carousel
... | (ns segway.pages.detail
(:use segway.pages.common)
(:require [net.cgrand.enlive-html :as html]))
we only want to select p and
(def *section-sel* [[:#content] :> :p])
(html/defsnippet section-snippet "template/my-style-demo.html" *section-sel*
[text]
[:p] (html/do->
(html/html-content text)))
(def ... |
7df5f372922edb36c26d91147375990085ac787615e6d4efe21791a9548f0a21 | Ebanflo42/Persistence | SimplicialComplex.hs | |
Module : Persistence . SimplicialComplex
Copyright : ( c ) , 2018
License : BSD 3 Clause
Maintainer :
Stability : experimental
This module provides functions for constructing neighborhood graphs , clique complexes , and Vietoris - Rips complexes , as well as the computation of Betti num... | null | https://raw.githubusercontent.com/Ebanflo42/Persistence/6e5691cec58ce85d800ce8fff56e0797a6f2532d/src/Persistence/SimplicialComplex.hs | haskell | * Types
* Utilities
* Construction
* Homology
, simplicialHomology
, simplicialHomologyPar
import Persistence.Matrix
* Types
* Utilities
| Show all the information in a simplicial complex.
| Get the dimension of the highest dimensional simplex (V.constant time).
* Construction
|
Makes a simplicial complex w... | |
Module : Persistence . SimplicialComplex
Copyright : ( c ) , 2018
License : BSD 3 Clause
Maintainer :
Stability : experimental
This module provides functions for constructing neighborhood graphs , clique complexes , and Vietoris - Rips complexes , as well as the computation of Betti num... |
ed5f63328a679a56affaf35ec7db0ece1c82883915919d0c52ca3505849b0727 | MyDataFlow/ttalk-server | seestar.erl | Copyright 2014
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the License at
%%%
%%% -2.0
%%%
%%% Unless required by applicable law or agreed to in writing, software
distributed under... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/seestar/src/seestar.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(seestar).
-type consistency() :: any | one | two | three | quorum | all | local_quorum | each_quorum.
-export_type([consistency/0]).
|
aab8ada9679ad73579ee97c16b0d62644e84d57698cf5f518db2025a21b28db1 | processone/ejabberd | ejabberd_admin.erl | %%%-------------------------------------------------------------------
%%% File : ejabberd_admin.erl
Author : < >
%%% Purpose : Administrative functions and commands
Created : 7 May 2006 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
%%%
%%% This program is free software; you can... | null | https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/ejabberd_admin.erl | erlang | -------------------------------------------------------------------
File : ejabberd_admin.erl
Purpose : Administrative functions and commands
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be ... | Author : < >
Created : 7 May 2006 by < >
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
377c8c606e09b0c7bd4583863ca0be57f4f6680dbfaba8f3fe541c75b08ec94e | BillHallahan/G2 | Interface.hs | # LANGUAGE FlexibleContexts #
module G2.Preprocessing.Interface where
import G2.Language
import G2.Preprocessing.AdjustTypes
import G2.Preprocessing.NameCleaner
runPreprocessing :: (ASTContainer t Expr, ASTContainer t Type, Named t) => State t -> Bindings -> (State t, Bindings)
runPreprocessing s b = cleanNames ( ... | null | https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/src/G2/Preprocessing/Interface.hs | haskell | # LANGUAGE FlexibleContexts #
module G2.Preprocessing.Interface where
import G2.Language
import G2.Preprocessing.AdjustTypes
import G2.Preprocessing.NameCleaner
runPreprocessing :: (ASTContainer t Expr, ASTContainer t Type, Named t) => State t -> Bindings -> (State t, Bindings)
runPreprocessing s b = cleanNames ( ... | |
d23990e0a4b460b7914908c277f4e6acfd3e4115868378cef3b193f22cad260e | ladderlife/cambo | graph_test.clj | (ns cambo.graph-test
(:refer-clojure :exclude [get set range atom ref])
(:require [cambo.graph :refer :all]
[cambo.core :as core :refer [range atom ref]]
[clojure.test :refer :all]))
(def cache
{:users {0 (ref [:user/by-id 123])
1 nil
2 (atom nil)
3 (atom)... | null | https://raw.githubusercontent.com/ladderlife/cambo/73b01aee04dc6a8b573783118c43c4d0508a4138/test/cambo/graph_test.clj | clojure | 16us w/ no range check
32us w/ true range check
16us w/ false range check
98us w/ no range check
32us w/ true range check | (ns cambo.graph-test
(:refer-clojure :exclude [get set range atom ref])
(:require [cambo.graph :refer :all]
[cambo.core :as core :refer [range atom ref]]
[clojure.test :refer :all]))
(def cache
{:users {0 (ref [:user/by-id 123])
1 nil
2 (atom nil)
3 (atom)... |
edca4b1c8eab750b815d46d98a4ed8dd4cf73883d4b2de202c5cea070728bd14 | spilgames/erl-decorator-pt | decorator_pt_eunit.erl | -module(decorator_pt_eunit).
-include_lib("eunit/include/eunit.hrl").
-compile([{parse_transform, decorator_pt_core}]).
-export([demo_one/1,
demo_two/1,
my_decorator/3,
my_decorator_adder/3]).
my_decorator_test_() ->
[
?_assertEqual(decorated, demo_one(undecorated)),
?_assertEqual... | null | https://raw.githubusercontent.com/spilgames/erl-decorator-pt/67bebc740d5512e136dc502451387c7f0cad6859/test/decorator_pt_eunit.erl | erlang | -module(decorator_pt_eunit).
-include_lib("eunit/include/eunit.hrl").
-compile([{parse_transform, decorator_pt_core}]).
-export([demo_one/1,
demo_two/1,
my_decorator/3,
my_decorator_adder/3]).
my_decorator_test_() ->
[
?_assertEqual(decorated, demo_one(undecorated)),
?_assertEqual... | |
a82198189d818b66046942e0924f2062edeea871df7d20f2e6749bc03ddfa79b | avsm/platform | uucp_num_data.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% NAME% % VERSION%
---------------------------------------------------------------------------
Copyrig... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/uucp.12.0.0%2Bdune/src/uucp_num_data.ml | ocaml | WARNING do not edit. This file was automatically generated. | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% NAME% % VERSION%
---------------------------------------------------------------------------
Copyrig... |
857ecbcea6fc8a2887f45d5e0442b6549a2bfa3122214b78970f26b7ca6ec8f4 | hkoktay/the-little-schemer | chapter05.scm | Chapter 5 : * Oh * : It 's Full of Stars
(load "test-check.scm")
;; atom?: any -> boolean
(define atom?
(lambda (x)
(and (not (pair? x)) (not (null? x)))))
;; add1: number -> number
(define add1
(lambda (n)
(+ n 1)))
sub1 : number - > number
(define sub1
(lambda (n)
(- n 1)))
;; o+: number ... | null | https://raw.githubusercontent.com/hkoktay/the-little-schemer/007e25153a4721a0cd6007c83cc8ce1305f6cf2a/chapter05.scm | scheme | atom?: any -> boolean
add1: number -> number
o+: number number -> number
Returns the addition of 'n' and 'm'
rember*: [atom] [s-exp] -> [s-exp]
Returns a [s-exp] with [atom] 'a' removed.
insertR*: [atom] [atom] [s-exp] -> [s-exp]
Returns a s-exp with 'new' inserted everywhere rightafter every
occurence of 'o... | Chapter 5 : * Oh * : It 's Full of Stars
(load "test-check.scm")
(define atom?
(lambda (x)
(and (not (pair? x)) (not (null? x)))))
(define add1
(lambda (n)
(+ n 1)))
sub1 : number - > number
(define sub1
(lambda (n)
(- n 1)))
Page 60
(define o+
(lambda (n m)
(cond
((zero? m) n)... |
e8f1dd40f293e1e2dab58820a79f1e2a8e4e573f38764ad05f5da8707b704d71 | moby/vpnkit | vmnet.mli | module Make(C: Sig.CONN): sig
* Accept connections and talk to clients via the vmnetd protocol , exposing
the packets as a Mirage NETWORK interface
the packets as a Mirage NETWORK interface *)
type fd = C.flow
include Mirage_net.S
val after_disconnect: t -> unit Lwt.t
(** [after_disconnect conn... | null | https://raw.githubusercontent.com/moby/vpnkit/9f3644114c1215202a4a22ad9038d50658abbad1/src/hostnet/vmnet.mli | ocaml | * [after_disconnect connection] resolves after [connection] has
disconnected.
* [start_capture t ?size_limit filename] closes any existing pcap
capture file and starts capturing to [filename]. If
[?size_limit] is provided then the file will be automatically
closed after the given number of by... | module Make(C: Sig.CONN): sig
* Accept connections and talk to clients via the vmnetd protocol , exposing
the packets as a Mirage NETWORK interface
the packets as a Mirage NETWORK interface *)
type fd = C.flow
include Mirage_net.S
val after_disconnect: t -> unit Lwt.t
val add_listener: t -> (C... |
493a6c03bb2c4f78a885f36b55b5b3f8457c2f431e15dc7126dad694f0db6f67 | Carnap/Carnap | Fitch.hs | # LANGUAGE FlexibleContexts #
module Carnap.Calculi.NaturalDeduction.Parser.Fitch (toProofTreeFitch, toDeductionFitch, toDeductionFitchAlt, toCommentedDeductionFitch)
where
import Data.Tree
import Data.Typeable
import Data.List (delete, (\\))
import Text.Parsec
import Carnap.Core.Data.Types
import Carnap.Calculi.Util
... | null | https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap/src/Carnap/Calculi/NaturalDeduction/Parser/Fitch.hs | haskell | XXX: need triple "try" here to avoid
XXX: need triple "try" here to avoid
XXX the above is not ideal for producing error messages
this is a bit of a hack. All indirect rules should have arities.
line h is accessible by an ordinary inference from the end of
the chunk if everything in the chunk has depth greater than o... | # LANGUAGE FlexibleContexts #
module Carnap.Calculi.NaturalDeduction.Parser.Fitch (toProofTreeFitch, toDeductionFitch, toDeductionFitchAlt, toCommentedDeductionFitch)
where
import Data.Tree
import Data.Typeable
import Data.List (delete, (\\))
import Text.Parsec
import Carnap.Core.Data.Types
import Carnap.Calculi.Util
... |
389492706b10c9f9fc99b1c4fc9d4966db365118ed83b5699d2da576878372e9 | fortytools/holumbus | DCount.hs | module Holumbus.MapReduce.Examples.Count.DCount
(
countMap
, countReduce
, K1
, V1
)
where
import Holumbus.Distribution.SimpleDMapReduceIO
import Control.DeepSeq
import Holumbus.MapReduce.Types
type Options = [String]
type K1 = Int
type V1 = [String]
type K2 = Int
type V2 = Int
type V3 = V4
type V4 = Int
ty... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Examples2/Count/Count_1/source/Holumbus/MapReduce/Examples/Count/DCount.hs | haskell | let result = zip (repeat k1) (map counts v1)
return $ rnf result `seq` result
let c = counts v1
return [(c,c)]
return [(k1,counts v1)]
type ReduceFunction a k2 v2 v3 = ActionEnvironment -> a -> k2 -> [v2] -> IO (Maybe v3)
| module Holumbus.MapReduce.Examples.Count.DCount
(
countMap
, countReduce
, K1
, V1
)
where
import Holumbus.Distribution.SimpleDMapReduceIO
import Control.DeepSeq
import Holumbus.MapReduce.Types
type Options = [String]
type K1 = Int
type V1 = [String]
type K2 = Int
type V2 = Int
type V3 = V4
type V4 = Int
ty... |
d814cc14da1413734f2d40d2550b3744a8a06848f011886e456a11501963658c | justin2004/cl-jena | cl-jena.lisp | (defpackage :cl-jena
(:nicknames :jena)
(:use :common-lisp :java :jss)
(:export
#:get-query-execution
#:get-update-processor
#:load-triples
#:model->jsonld-embedded
#:print-result-set
#:sparql-construct
#:sparql-select
#:sparql-update
#:*prefix-list*
#:*ds*
#:*model*
... | null | https://raw.githubusercontent.com/justin2004/cl-jena/678cff130ba5c8727c11861e0d20f5d0b80d30bb/cl-jena.lisp | lisp | TODO do i need this?
defaults for playing around
if you have a model with lots of triples this could use alot of memory.
creates a tdb2 dataset
start from scratch
use existing dataset
TODO maybe this should return a dataset to fit with the pattern here
returns a model
dont export
dont export
dont export
don... | (defpackage :cl-jena
(:nicknames :jena)
(:use :common-lisp :java :jss)
(:export
#:get-query-execution
#:get-update-processor
#:load-triples
#:model->jsonld-embedded
#:print-result-set
#:sparql-construct
#:sparql-select
#:sparql-update
#:*prefix-list*
#:*ds*
#:*model*
... |
fcdde52a6d2be58ee6578d9da7277a4f4f41fab0eb7b1c4de01feaab3fe2bec7 | TrustInSoft/tis-kernel | MemEmpty.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/MemEmpty.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
04a44837207d8723ffe1034f035d84e54f10b52727722c0ebeabe76effc95c3e | fakedata-haskell/fakedata | RockBand.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Faker.Music.RockBand where
import Data.Text
import Faker
import Faker.Internal
import Faker.Provider.RockBand
import Faker.TH
$(generateFakeField "rockBand" "name")
| @since 1.0
$(generateFakeField "rockBand" "song")
| null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/ea938c38845b274e28abe7f4e8e342f491e83c89/src/Faker/Music/RockBand.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Music.RockBand where
import Data.Text
import Faker
import Faker.Internal
import Faker.Provider.RockBand
import Faker.TH
$(generateFakeField "rockBand" "name")
| @since 1.0
$(generateFakeField "rockBand" "song")
|
bdaee3c7810b69b9a42055ac986042bdb2ab64421cbb533ad5855db63821fc99 | alanzplus/EOPL | 1.35-test.rkt | #lang eopl
(require "bintree.rkt")
(require rackunit "1.35.rkt")
(require rackunit/text-ui)
(define input-tree
(interior-node 'foo
(interior-node 'bar
(leaf 26)
(leaf 12))
(interior-node 'baz
(leaf 11)
(interior-node 'quux
(leaf 117)
(leaf 14)))))
(define expected-tr... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch1/1.35-test.rkt | racket | #lang eopl
(require "bintree.rkt")
(require rackunit "1.35.rkt")
(require rackunit/text-ui)
(define input-tree
(interior-node 'foo
(interior-node 'bar
(leaf 26)
(leaf 12))
(interior-node 'baz
(leaf 11)
(interior-node 'quux
(leaf 117)
(leaf 14)))))
(define expected-tr... | |
58c74232d1a9da41f12768c677dbe3b1e41db0e84d1cf627a7bd17564dfdddad | tonyg/racket-reloadable | info.rkt | #lang setup/infotab
(define collection 'multi)
(define deps '("base"))
| null | https://raw.githubusercontent.com/tonyg/racket-reloadable/cae2a141955bc2e0d068153f2cd07f88e6a6e9ef/info.rkt | racket | #lang setup/infotab
(define collection 'multi)
(define deps '("base"))
| |
1fe949bb5ac46fa866aada2380b09ece8cd1538d27a68b731ef32bb7ebf83e00 | LexiFi/dead_code_analyzer | letIn.ml | let f n c ?a ?b s = n
| null | https://raw.githubusercontent.com/LexiFi/dead_code_analyzer/c44dc2ea5ccb13df2145e9316e21c39f09dad506/examples/letIn.ml | ocaml | let f n c ?a ?b s = n
| |
00aa0c528a88ed44c7b3c45031a84b6fc901a6ac4bf95845bf66d6333d4ea60e | nasa/Common-Metadata-Repository | project.clj | (defn get-banner
[]
(try
(str
(slurp "resources/text/banner.txt"))
;(slurp "resources/text/loading.txt")
;; If another project can't find the banner, just skip it;
this function is really only meant to be used by itself .
(catch Exception _ "")))
(defn get-prompt
[ns]
(str "\u001B[3... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/exchange-geo/project.clj | clojure | (slurp "resources/text/loading.txt")
If another project can't find the banner, just skip it;
The following is excluded because it stomps on twig's logger
Dev & Testing Aliases
["eastwood"]
Build tasks
Publishing
Application | (defn get-banner
[]
(try
(str
(slurp "resources/text/banner.txt"))
this function is really only meant to be used by itself .
(catch Exception _ "")))
(defn get-prompt
[ns]
(str "\u001B[35m[\u001B[34m"
ns
"\u001B[35m]\u001B[33m λ\u001B[m=> "))
(defproject gov.nasa.earthdata/cmr-... |
da5cef79b8e65cc434dba21aede964fab21dbb4dba1d5242d43bf707505b1171 | vaclavsvejcar/headroom | TH.hs | # LANGUAGE TypeApplications #
# LANGUAGE NoImplicitPrelude #
-- |
-- Module : Headroom.Embedded.TH
-- Description : /Template Haskell/ functions for "Headroom.Embedded"
Copyright : ( c ) 2019 - 2022
-- License : BSD-3-Clause
-- Maintainer :
-- Stability : experimental
-- Portability : POSIX
--
Th... | null | https://raw.githubusercontent.com/vaclavsvejcar/headroom/3b20a89568248259d59f83f274f60f6e13d16f93/src/Headroom/Embedded/TH.hs | haskell | |
Module : Headroom.Embedded.TH
Description : /Template Haskell/ functions for "Headroom.Embedded"
License : BSD-3-Clause
Maintainer :
Stability : experimental
Portability : POSIX
"Headroom.Embedded" module, that needs to be placed in separated module, due to
/GHC/ stage restriction.
| Embeds st... | # LANGUAGE TypeApplications #
# LANGUAGE NoImplicitPrelude #
Copyright : ( c ) 2019 - 2022
This module contains some /Template Haskell/ powered functions , used by
module Headroom.Embedded.TH
( embedConfigFile
, embedDefaultConfig
, embedDefaultGlobalConfig
, embedTemplate
)
where
import ... |
c629fbb1397c347fa21ddf5de0f119711c6622870e5ca52c5335355b6e71c461 | yesodweb/shakespeare | RT.hs | {-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE DeriveDataTypeable #-}
| Provides functionality for runtime Hamlet templates . Please use
-- "Text.Hamlet.Runtime" instead.
module Text.Hamlet.RT
( -- * Public API
HamletRT (..)
, HamletData (... | null | https://raw.githubusercontent.com/yesodweb/shakespeare/edf4f194a1b89d4654f719ae221aded675899b0d/Text/Hamlet/RT.hs | haskell | # LANGUAGE TypeSynonymInstances #
# LANGUAGE DeriveDataTypeable #
"Text.Hamlet.Runtime" instead.
* Public API
| See the comments in Text.Hamlet.Parse.testIncludeClazzes. The conditional
^ should embeded template (via ^{..}) be plain Html or actual templates? | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
| Provides functionality for runtime Hamlet templates . Please use
module Text.Hamlet.RT
HamletRT (..)
, HamletData (..)
, HamletMap
, HamletException (..)
, parseHamletRT
, renderHamletRT
, renderHamletRT'
, SimpleDoc (..)... |
3fcacff70086a3d510d6775ecdf6f1742f6591a3942b487bfe79e3752c24bbc2 | melange-re/melange | js_cmj_format.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/bcaf468572532f255262999d78af80585f25ecc0/jscomp/core/js_cmj_format.ml | ocaml | TODO: add a magic number
* Either constant or closed functor
Serialization ..
This may cause some build system always rebuild
maybe should not be turned on by default
a[lo] =< key < a[mid] <= a[hi]
a[lo] =< a[mid] < key <= a[hi]
FIXME: better error message when ocamldep
get self-cycle
Note it ... | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
eb684806289f6343fafaaaa145168ee9932247edaee230d4498ce1f512363d63 | Mishio595/disml | endpoints.mli | (** Endpoint formatters used internally. *)
val gateway : string
val gateway_bot : string
val channel : int -> string
val channel_messages : int -> string
val channel_message : int -> int -> string
val channel_reaction_me : int -> int -> string -> string
val channel_reaction : int -> int -> string -> int -> st... | null | https://raw.githubusercontent.com/Mishio595/disml/cbb1e47a6d358eace03790c07a1b85641f4ca366/lib/http/endpoints.mli | ocaml | * Endpoint formatters used internally. |
val gateway : string
val gateway_bot : string
val channel : int -> string
val channel_messages : int -> string
val channel_message : int -> int -> string
val channel_reaction_me : int -> int -> string -> string
val channel_reaction : int -> int -> string -> int -> string
val channel_reactions_get : int -> int ... |
cbf170ef39c1f9435d52954f047d8d759259e07c7bb0a32e596f37f4175dd44e | quil-lang/quilc | cfg-tests.lisp | ;;;; cfg-tests.lisp
;;;;
Author :
(in-package #:cl-quil-tests)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
TESTS FOR PROGRAM
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun verify-h-cnot-code-with-end (code)
;; Make sure there is ... | null | https://raw.githubusercontent.com/quil-lang/quilc/3f3260aaa65cdde25a4f9c0027959e37ceef9d64/tests/cfg-tests.lisp | lisp | cfg-tests.lisp
Make sure there is at least an entry block / code block and an exit block
Make sure that code contains the proper components
blocks kept through our trimming process, we can further expand on these tests to make
sure that links are correct
TESTS FOR DEAD CODE ELIMINATION
Arbitrarily remove a ... | Author :
(in-package #:cl-quil-tests)
TESTS FOR PROGRAM
(defun verify-h-cnot-code-with-end (code)
(is (< 1 (length code)))
(let ((code-string (with-output-to-string (out)
(quil::print-code-list code out))))
(is (search (format nil "H 0~%CNOT 0 1") code-string))
(is (search... |
81158a3abf33db20a942e2c760a9781657b4af61b4be6770b2a0ad98d063ca85 | blindglobe/clocc | path.lisp | Pathnames and Filesystems
;;;
Copyright ( C ) 1999 - 2009 by
;;; This is open-source software.
GNU Lesser General Public License ( LGPL ) is applicable :
;;; No warranty; you may copy/modify/redistribute under the same
;;; conditions with the source code.
;;; See <URL:>
;;; for details and the precise copyright... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/port/path.lisp | lisp |
This is open-source software.
No warranty; you may copy/modify/redistribute under the same
conditions with the source code.
See <URL:>
for details and the precise copyright document.
$Source: /cvsroot/clocc/clocc/src/port/path.lisp,v $
utilities
filesystem access
based on
logical pathnames
file path.... | Pathnames and Filesystems
Copyright ( C ) 1999 - 2009 by
GNU Lesser General Public License ( LGPL ) is applicable :
$ I d : path.lisp , v 1.13 2009/03/11 15:51:00 sds Exp $
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :port-ext (translate-logical-pathname "clocc:src;port;ext")))
(in-pac... |
53f0eb5b7aafe3e4a1e46d421509d151e8ee4a14dc0ed571c5d09f534209154e | haskell-github/github | ShowComments.hs | module ShowComments where
import qualified Github.Issues.Comments as Github
import Data.List (intercalate)
main = do
possibleComments <- Github.comments "thoughtbot" "paperclip" 635
case possibleComments of
(Left error) -> putStrLn $ "Error: " ++ show error
(Right issues) ->
putStrLn $ inte... | null | https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/Issues/Comments/ShowComments.hs | haskell | module ShowComments where
import qualified Github.Issues.Comments as Github
import Data.List (intercalate)
main = do
possibleComments <- Github.comments "thoughtbot" "paperclip" 635
case possibleComments of
(Left error) -> putStrLn $ "Error: " ++ show error
(Right issues) ->
putStrLn $ inte... | |
5ec0b16314bbb761e69b9d56ef5d2c06c0d9dc0d9b7257e1ddb9c4422e1f6db6 | yogthos/Selmer | validator.clj | (ns selmer.validator
(:require
[selmer.tags :refer :all]
[selmer.filters :refer :all]
[selmer.util :refer :all]
[clojure.string :as str]
[clojure.set :refer [difference]]
[clojure.java.io :as io]))
(def error-template
(slurp (io/resource "selmer-error-template.html")))
(def validate? (atom... | null | https://raw.githubusercontent.com/yogthos/Selmer/8403d1bbf8671b84878b8fee0e5ffbad7b12b28e/src/selmer/validator.clj | clojure | check if we have closing tag
handle the case where it's an intermediate tag
throw an exception if it doesn't belong to the last open tag | (ns selmer.validator
(:require
[selmer.tags :refer :all]
[selmer.filters :refer :all]
[selmer.util :refer :all]
[clojure.string :as str]
[clojure.set :refer [difference]]
[clojure.java.io :as io]))
(def error-template
(slurp (io/resource "selmer-error-template.html")))
(def validate? (atom... |
951552118974fa5dcc6b27948b5a62c0ffdd75f99bf9677668145252a43cd95d | mfoemmel/erlang-otp | yecc.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/parsetools/src/yecc.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Yacc like LALR-1 parser generator for Erl... |
b6d0b5b0c60dc2e005cdad5b19423e23ffb2dda60e9d80b4c8bf90baa91077d1 | adrieng/pulsar | formal.mli | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* This program is free software : you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation , either version 3 of the License , or ... | null | https://raw.githubusercontent.com/adrieng/pulsar/c3901388659d9c7978b04dce0815e3ff9aea1a0c/warp/formal.mli | ocaml | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* This program is free software : you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation , either version 3 of the License , or ... | |
0b3db2c9f8cf14be2e6cfcf52ea5d43abdf7989b03a99965d2b5552fb1eec80a | iskandr/parakeet-retired | SeqCost.mli |
(* returns single expression computing call cost as a function of *)
(* input argument shapes *)
val symbolic_seq_cost : FnTable.t -> SSA.fundef -> Imp.exp_node
val seq_cost : FnTable.t -> SSA.fundef -> Shape.t list -> float | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Runtime/CostModel/SeqCost.mli | ocaml | returns single expression computing call cost as a function of
input argument shapes |
val symbolic_seq_cost : FnTable.t -> SSA.fundef -> Imp.exp_node
val seq_cost : FnTable.t -> SSA.fundef -> Shape.t list -> float |
13447e14e753e3479f8d7d819bb61054bb2a8108c12a2d874aea8c0f55f335d3 | mk270/archipelago | events.ml |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | null | https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/server/events.ml | ocaml | currently we don't report this to the player
let fmt = "%Au %vpres:pick up %pu." in
Communication.wall2 ~actor ~patient ~local:true fmt
send a ping to any monster present
enqueue ~recipient ~event:Wakeup
this message is probably redundant
should also check terrain, for "outside" |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... |
fb0130293ccf8c7495e758fbcf906d89256c4b6e3b1b0b8e5813a2c313a192fc | 39aldo39/klfc | FileType.hs | # LANGUAGE UnicodeSyntax , NoImplicitPrelude #
module FileType
( FileType(..)
) where
import BasePrelude
import Util (HumanReadable(..))
data FileType
= Json
| Xkb
| Pkl
| Klc
| Keylayout
| Tmk
| Ahk
deriving (Eq, Show, Read, Enum, Bounded)
typeAndString ∷ [(FileType, String)... | null | https://raw.githubusercontent.com/39aldo39/klfc/83908c54c955b9c160b999bc8f0892401ba4adbf/src/FileType.hs | haskell | # LANGUAGE UnicodeSyntax , NoImplicitPrelude #
module FileType
( FileType(..)
) where
import BasePrelude
import Util (HumanReadable(..))
data FileType
= Json
| Xkb
| Pkl
| Klc
| Keylayout
| Tmk
| Ahk
deriving (Eq, Show, Read, Enum, Bounded)
typeAndString ∷ [(FileType, String)... | |
44f7bb1f2d3e6d0ee03092a13d6f5b9977568c764d3d399f31ebf4ebe15aaf14 | mirleft/ocaml-x509 | tests.ml | let suites =
X509tests.x509_tests @ [
"Regression", Regression.regression_tests ;
"Host names", Regression.hostname_tests ;
"Revoke", Revoke.revoke_tests ;
"CRL", Crltests.crl_tests ;
"PKCS12", Pkcs12.tests ;
"OCSP", Ocsp.tests ;
"Private Key", Priv.tests ;
]
let () =
Printexc.record... | null | https://raw.githubusercontent.com/mirleft/ocaml-x509/0005042e5b5a84e600f78eccbd9c4646ec01dd2f/tests/tests.ml | ocaml | let suites =
X509tests.x509_tests @ [
"Regression", Regression.regression_tests ;
"Host names", Regression.hostname_tests ;
"Revoke", Revoke.revoke_tests ;
"CRL", Crltests.crl_tests ;
"PKCS12", Pkcs12.tests ;
"OCSP", Ocsp.tests ;
"Private Key", Priv.tests ;
]
let () =
Printexc.record... | |
c14cf729f45dda6554809578f13e5ef233333dc7258a7606bbc5a2791d435325 | zippy/anansi | socket_in.clj | (ns anansi.test.streamscapes.channels.socket-in
(:use [anansi.streamscapes.channels.socket-in] :reload)
(:use [anansi.ceptr]
[anansi.receptor.scape]
[anansi.receptor.user :only [user-def]]
[anansi.receptor.host :only [host-def]]
[anansi.streamscapes.streamscapes]
[anansi.stre... | null | https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/test/anansi/test/streamscapes/channels/socket_in.clj | clojure | (ns anansi.test.streamscapes.channels.socket-in
(:use [anansi.streamscapes.channels.socket-in] :reload)
(:use [anansi.ceptr]
[anansi.receptor.scape]
[anansi.receptor.user :only [user-def]]
[anansi.receptor.host :only [host-def]]
[anansi.streamscapes.streamscapes]
[anansi.stre... | |
3518423575acd6f5f4483cc4c2c229b3a65817316aada85de9dd379875babc20 | erlangonrails/devdb | db_ets.erl | 2009 - 2010 fuer Informationstechnik Berlin ,
2009 onScale solutions
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 ap... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/db_ets.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2009 - 2010 fuer Informationstechnik Berlin ,
2009 onScale solutions
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@version $ I d : db_ets.erl 906 2010 - 07 - 23 14:09:20Z schue... |
f3da4f47aa61423d540dedbe39cb937f5fc8ba992c5351778a2269927a964a08 | aws-beam/aws-erlang | aws_opsworks.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc AWS OpsWorks
%%
%% Welcome to the AWS OpsWorks Stacks API Reference.
%%
%% This guide provides descriptions, syntax, and usage examples for AWS
%% OpsWorks Stacks actions and data types, including common parameters and
%% ... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_opsworks.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc AWS OpsWorks
Welcome to the AWS OpsWorks Stacks API Reference.
This guide provides descriptions, syntax, and usage examples for AWS
OpsWorks Stacks actions and data types, including common parameters and
error codes.
AWS OpsWorks Stacks is an application managem... | See -beam/aws-codegen for more details .
Command Line Interface ( CLI ) or by using one of the AWS SDKs to implement
< /li > < li > AWS SDK for Java
< /li > < li > AWS SDK for PHP 2
the AWS console )
When you call ` CreateStack ' , ` CloneStack ' , or ` UpdateStack ' we
currently 12 . Windows stacks use ... |
8b73a97d4147ac4c680bf69f3c13f6c928d15a53104aaada029b3747b0b540f6 | jbclements/RSound | check-recording.rkt | #lang racket
(module+ main
(require rsound)
(printf "starting to record ...\n")
(define s (record-sound (* (default-sample-rate) 4)))
(printf "... done\n")
(sleep 4)
(play s)) | null | https://raw.githubusercontent.com/jbclements/RSound/c699db1ffae4cf0185c46bdc059d7879d40614ce/rsound/test/check-recording.rkt | racket | #lang racket
(module+ main
(require rsound)
(printf "starting to record ...\n")
(define s (record-sound (* (default-sample-rate) 4)))
(printf "... done\n")
(sleep 4)
(play s)) | |
f389625208ddfa7c9c61743179fdc5dc19731e430d06cce2637b0f74e1de9b3b | jarvinet/scheme | fib.scm | ; To demonstrate that calling interpreted procedure containing
; internal define from a compiled procedure produces error
; When you compile this file, fib does not work but fib2 does
; compound procedures < + - contain internal defines but
; integer-less-than, integer-add, integer-minus do not
; all the functions her... | null | https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/bin/compiler/test/fib.scm | scheme | To demonstrate that calling interpreted procedure containing
internal define from a compiled procedure produces error
When you compile this file, fib does not work but fib2 does
compound procedures < + - contain internal defines but
integer-less-than, integer-add, integer-minus do not
all the functions here that ... |
(define (fib1 n)
(if (< n 2)
n
(+ (fib1 (- n 2))
(fib1 (- n 1)))))
(define (fib2 n)
(if (integer-less-than n 2)
n
(integer-add (fib2 (integer-minus n 2))
(fib2 (integer-minus n 1)))))
(define (fib3 n)
(if (< n 2)
n
(integer-add (fib3 (integer-minus n 2))
(fib3 ... |
dd21c883f6064060827f9628430edd60653784e822c40ef33591c86f2586c95c | gogins/csound-extended-nudruz | finnissy.lisp | ;;;; N U D R U Z C S O U N D F F I E X A M P L E S
August 2018
#|
Contrary to CM documentation, the events function does not return a usable seq object.
The generated score is placed into the seq that is passed to events.
|#
(require :asdf)
(require :fomus)
(require :nudruz)
(load "example-csd.lisp")
(in-p... | null | https://raw.githubusercontent.com/gogins/csound-extended-nudruz/4551d54890f4adbadc5db8f46cc24af8e92fb9e9/examples/finnissy.lisp | lisp | N U D R U Z C S O U N D F F I E X A M P L E S
Contrary to CM documentation, the events function does not return a usable seq object.
The generated score is placed into the seq that is passed to events.
|
August 2018
(require :asdf)
(require :fomus)
(require :nudruz)
(load "example-csd.lisp")
(in-package :cm)
(defparameter csound-seq (new seq :name "csound-test"))
(events
(let ((mypits (heapvec 100 10 50))
(durs (strums 20 2 6 4 6)))
(list
(splay mypits (ferney '(1) '(4) durs))
(splay (transp ... |
359459e5bc278b376a5f324cd262c784ffcaae40c168356af88f79cac5d371ca | slipstream/SlipStreamServer | metering_test.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.metering-test
(:require
[clojure.test :refer [deftest]]
[com.sixsq.slipstream.ssclj.resources.metering :as m]
[com.sixsq.slipstream.ssclj.resources.spec.metering :as metering]
[com.sixsq.slipstream.ssclj.resources.spec.spec-test-utils :as stu]))
(def val... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/test/com/sixsq/slipstream/ssclj/resources/spec/metering_test.cljc | clojure | mandatory keywords
optional keywords | (ns com.sixsq.slipstream.ssclj.resources.spec.metering-test
(:require
[clojure.test :refer [deftest]]
[com.sixsq.slipstream.ssclj.resources.metering :as m]
[com.sixsq.slipstream.ssclj.resources.spec.metering :as metering]
[com.sixsq.slipstream.ssclj.resources.spec.spec-test-utils :as stu]))
(def val... |
bdaefad3fff200f684c5ef8b941d026ec19444fac4220e4ecbde08307b5a0d72 | willtim/Atavachron | S3.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
| An S3 Store implementation for Atavachron .
--
module Atavachron.Store.S3
( newS3Store
, parseS3URL
) where
import Control.Arrow
import Control.Monad.Cat... | null | https://raw.githubusercontent.com/willtim/Atavachron/bbf9a93eac0e096ee4595e23067c912af865601e/src/Atavachron/Store/S3.hs | haskell | # LANGUAGE OverloadedStrings #
NB : assumes UTF8 ( ! )
^ The bucket to query.
^ Limit the response to keys with this prefix.
^ The source object key.
^ The bucket to store the file in.
^ The destination object key.
^ The bytes to upload.
NOTE: Move has to be implemented as a copy followed by a delete.
^ The b... | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
| An S3 Store implementation for Atavachron .
module Atavachron.Store.S3
( newS3Store
, parseS3URL
) where
import Control.Arrow
import Control.Monad.Catch
import Control.Monad.IO.C... |
6c1540aa0092af4aa1e75bc25a0c0f7b84435d95dff612f94bf6a1a9f67767f4 | ocsigen/ojwidgets | ojw_swipejs.ml |
Swipe 2.0
Copyright 2013 , MIT License
Swipe 2.0
Arnaud Parant
Copyright 2013, MIT License
*)
type jq_elt = Ojquery.t
type t = Js.Unsafe.any
class type options =
object
method startSlide : int Js.t Js.writeonly_prop
method auto : int Js.t Js.writeonly_prop
method contin... | null | https://raw.githubusercontent.com/ocsigen/ojwidgets/4be2233980bdd1cae187c749bd27ddbfff389880/src/ojw_swipejs.ml | ocaml |
Swipe 2.0
Copyright 2013 , MIT License
Swipe 2.0
Arnaud Parant
Copyright 2013, MIT License
*)
type jq_elt = Ojquery.t
type t = Js.Unsafe.any
class type options =
object
method startSlide : int Js.t Js.writeonly_prop
method auto : int Js.t Js.writeonly_prop
method contin... | |
bf869e0ee6eedab11423673669b63cb324e91364edd889576f40bcc567b67f6b | bytekid/mkbtt | rule.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/rewriting/src/rule.ml | ocaml | ** MODULES *****************************************************************
** OPENS *******************************************************************
** MODULES *****************************************************************
** MODULES ****************************************************************
** TYPES ****... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... |
7e44f0aebbdece33f320171870c8535a20f76e98993d605e4445b6805bc7498f | singleheart/programming-in-haskell | ex6.hs | (&&) :: Bool -> Bool -> Bool
a && b =
if a == True
then b
else False
| null | https://raw.githubusercontent.com/singleheart/programming-in-haskell/80c7efc0425babea3cd982e47e121f19bec0aba9/ch04/ex6.hs | haskell | (&&) :: Bool -> Bool -> Bool
a && b =
if a == True
then b
else False
| |
6b073e60ebaebaa6a57d4db48aa92e9b3d240ce792f6fca22e7f62ce36d33f05 | inhabitedtype/httpaf | test_client_connection.ml | open Httpaf
open Helpers
open Client_connection
let response_error_pp_hum fmt = function
| `Malformed_response str ->
Format.fprintf fmt "Malformed_response: %s" str
| `Invalid_response_body_length resp ->
Format.fprintf fmt "Invalid_response_body_length: %s" (response_to_string resp)
| `Exn exn ->
F... | null | https://raw.githubusercontent.com/inhabitedtype/httpaf/aaeffb9ee5fcbd995801b131b892dded729640d0/lib_test/test_client_connection.ml | ocaml | Single GET
not actually writen to the channel
not actually writen to the channel
not actually writen to the channel
We get some data on the connection, but not the full response yet. | open Httpaf
open Helpers
open Client_connection
let response_error_pp_hum fmt = function
| `Malformed_response str ->
Format.fprintf fmt "Malformed_response: %s" str
| `Invalid_response_body_length resp ->
Format.fprintf fmt "Invalid_response_body_length: %s" (response_to_string resp)
| `Exn exn ->
F... |
f02f0da0686754a35b5cb82e7db09232d48203a46f8ee95b400e1f8130fe31bd | inhabitedtype/ocaml-session | session_cohttp.mli | ----------------------------------------------------------------------------
Copyright ( c ) 2015 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-session/6180413996e8c95bd78a9afa1431349a42c95588/cohttp/session_cohttp.mli | ocaml | * Cohttp-aware session management for your everyday needs.
* The type of a blocking computation that will produce a value of type ['a]
* The type of a handle on the store.
* The type of a session key.
* The type of a session value.
* The type of a session expiry period.
* They key for the session in the backend a... | ----------------------------------------------------------------------------
Copyright ( c ) 2015 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... |
d388a18aca90d1e6fc4a7be652142f8c3763468fca64a6147557461dfbda5426 | Plisp/vico | search.lisp | (defpackage :vico-lib.search
(:use :cl :alexandria)
(:local-nicknames (:buf :vico-core.buffer)
(:conditions :vico-core.conditions)
(:hl :vico-core.highlight)
(:ui :vico-core.ui))
(:export #:search-buffer
#:symbol-at-point))
(in-package :vico-l... | null | https://raw.githubusercontent.com/Plisp/vico/930099af280acd25360ca389e884a637eedd787a/src/search.lisp | lisp | symbol searching
search field commands
destructive
TODO maybe we could use a stack and do this a bit smarter
search buffer
(declare (dynamic-extent #'add-span))
search and highlight if there's something to be found
TODO these could just be indices
note cursor is destructively updated | (defpackage :vico-lib.search
(:use :cl :alexandria)
(:local-nicknames (:buf :vico-core.buffer)
(:conditions :vico-core.conditions)
(:hl :vico-core.highlight)
(:ui :vico-core.ui))
(:export #:search-buffer
#:symbol-at-point))
(in-package :vico-l... |
1d25b4f0a50344e896797d370527207cd5d09c0ca999ddc724f0acec029d6379 | babashka/babashka | runner.cljs | (ns failjure.runner
(:require [doo.runner :refer-macros [doo-tests]]
[failjure.test-core]))
(doo-tests 'failjure.test-core)
| null | https://raw.githubusercontent.com/babashka/babashka/665ae4dd97535bf72a5ce34a19d624e74e5c4fe8/test-resources/lib_tests/failjure/runner.cljs | clojure | (ns failjure.runner
(:require [doo.runner :refer-macros [doo-tests]]
[failjure.test-core]))
(doo-tests 'failjure.test-core)
| |
7695de85b3bd7966a9c785bb6ccad8d16d7ea665f44539213c25650e91f07fb5 | nkaretnikov/OOHaskell | DML.hs | {-# OPTIONS -fglasgow-exts #-}
{-# OPTIONS -fallow-undecidable-instances #-}
{-# OPTIONS -fallow-overlapping-instances #-}
module DML where
import OOHaskell
import Prelude hiding (print)
import qualified Prelude (print)
-- Labels
data Value deriving Typeable; value = proxy::Proxy Value
data Left deriving Typeable... | null | https://raw.githubusercontent.com/nkaretnikov/OOHaskell/ddf42cfa62f8bd27643ff6db136dec6c14466232/samples/DML.hs | haskell | # OPTIONS -fglasgow-exts #
# OPTIONS -fallow-undecidable-instances #
# OPTIONS -fallow-overlapping-instances #
Labels
Idiom: properties
Int literals
Add expressions
no type annotations are needed here
A common base type for all expression forms
Add expressions; using dynamics-based casts
Add expressions; using ... |
module DML where
import OOHaskell
import Prelude hiding (print)
import qualified Prelude (print)
data Value deriving Typeable; value = proxy::Proxy Value
data Left deriving Typeable; left = proxy::Proxy Left
data Right deriving Typeable; right = proxy::Proxy Right
data Print deriving Typeable; print = proxy::Pro... |
73a6833de2730a47293ebdfa28f82a3725f717dfd02298181173248ca7f8769f | AbstractMachinesLab/caramel | docstrings.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/ocaml/parsing/404/docstrings.ml | ocaml | ************************************************************************
OCaml
... |
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Location
Docstrings
A docstring is " attached " if it has been inserted in the AST . This
... |
d791251b51487b6ffc8f5cfe3e35880f1d2bab8db1fd67e130191e23d273417e | lassik/upscheme | torus.scm | (define (maplist f l)
(if (null? l) ()
(cons (f l) (maplist f (cdr l)))))
; produce a beautiful, toroidal cons structure
; make m copies of a CDR-circular list of length n, and connect corresponding
; conses in CAR-circular loops
replace ' identity ' with ' copy - tree ' for rapdily exploding memory use
(defi... | null | https://raw.githubusercontent.com/lassik/upscheme/61935bd866acb18902199bc4bc4cdd1760aa1ffc/scheme-tests/torus.scm | scheme | produce a beautiful, toroidal cons structure
make m copies of a CDR-circular list of length n, and connect corresponding
conses in CAR-circular loops
(time (dotimes (i 1) (load "100x100.scm")))
with ltable
with ptrhash | (define (maplist f l)
(if (null? l) ()
(cons (f l) (maplist f (cdr l)))))
replace ' identity ' with ' copy - tree ' for rapdily exploding memory use
(define (torus m n)
(let* ((l (map-int identity n))
(g l)
(prev g))
(dotimes (i (- m 1))
(set! prev g)
(set! g (maplist ident... |
c6f93930c8470f858d2a4c117f417c4b0e21d6b9b91d3633457006935828b24b | WorksHub/client | components.cljc | (ns wh.components.card-actions.components
(:require [wh.common.text :as text]
[wh.components.icons :as icons]
[wh.interop :as interop]
[wh.styles.card-actions :as styles]
[wh.util :as util]
[wh.verticals :as verticals]))
TODO , ch5663 , reuse share - urls... | null | https://raw.githubusercontent.com/WorksHub/client/2eb98c87bcfefc80b1a4f866f9822f0a5c28ab04/common/src/wh/components/card_actions/components.cljc | clojure | (ns wh.components.card-actions.components
(:require [wh.common.text :as text]
[wh.components.icons :as icons]
[wh.interop :as interop]
[wh.styles.card-actions :as styles]
[wh.util :as util]
[wh.verticals :as verticals]))
TODO , ch5663 , reuse share - urls... | |
8d6412d692f8b5388b5046c24ac9c81378da67d10cc4aa177f1e7cd9e6d9dff5 | alekcz/konserve-jdbc | core_mssql_test.clj | (ns konserve-jdbc.core-mssql-test
(:require [clojure.test :refer [deftest is testing use-fixtures]]
[clojure.core.async :refer [<!!] :as async]
[konserve.core :as k]
[konserve.storage-layout :as kl]
[konserve-jdbc.core :refer [new-jdbc-store delete-store]]
[... | null | https://raw.githubusercontent.com/alekcz/konserve-jdbc/045827c5d831794cddb7176d962950326f0cd2ff/test/konserve_jdbc/core_mssql_test.clj | clojure | let's corrupt our store | (ns konserve-jdbc.core-mssql-test
(:require [clojure.test :refer [deftest is testing use-fixtures]]
[clojure.core.async :refer [<!!] :as async]
[konserve.core :as k]
[konserve.storage-layout :as kl]
[konserve-jdbc.core :refer [new-jdbc-store delete-store]]
[... |
a00f4084464d60bcb13745ab8a67173e0d21fa957eced6f988635aa98efd036e | boot-clj/boot | built_in_test.clj | (ns boot.task.built-in-test
(:require [clojure.pprint :refer [pprint]]
[clojure.test :refer :all]
[boot.core :refer :all]
[boot.task.built-in :refer :all]
[boot.test :as boot-test :refer [deftesttask]]
[boot.pod :as pod]))
;;;;;;;;;;;;;;;;;;;;;;;;;
;;; sift... | null | https://raw.githubusercontent.com/boot-clj/boot/64334b4d5744b1444634f4a5a5a52b3ae67dddeb/boot/core/test/boot/task/built_in_test.clj | clojure |
sift --with-meta ;;;
populate
populate
sift --include ;;;
populate
populate
sift --to-asset ;;;
AR - adding this in order to test sift-mv
populate
populate
sift --add-meta ;;;
populate
populate | (ns boot.task.built-in-test
(:require [clojure.pprint :refer [pprint]]
[clojure.test :refer :all]
[boot.core :refer :all]
[boot.task.built-in :refer :all]
[boot.test :as boot-test :refer [deftesttask]]
[boot.pod :as pod]))
(deftask ^:private with-meta-test... |
16a5d77c890af173d25dcee1d3babce5fdd1602329f182abecf13bd52981ca4e | ageneau/ecl-android | setup-compilers.lisp | Copyright ( c ) 2011 ,
;;;
;;; 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, merge, publi... | null | https://raw.githubusercontent.com/ageneau/ecl-android/324180b7701eaa24228d8602fafe7c040c976867/lisp-packages/asdf-cross/setup-compilers.lisp | lisp |
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 copies
furnished to do so, subject to the following conditions:
... | Copyright ( c ) 2011 ,
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-package :cross-cmp)
... |
5a964b6b764709ce99517aa14c65543b5bc63f524b3e13d746489d9120d0073d | patricoferris/ocaml-multicore-monorepo | cipher_block.ml | open Uncommon
module S = struct
module type Core = sig
type ekey
type dkey
val of_secret : Cstruct.t -> ekey * dkey
val e_of_secret : Cstruct.t -> ekey
val d_of_secret : Cstruct.t -> dkey
val key : int array
val block : int
(* XXX currently unsafe point *)
val encrypt : k... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/mirage-crypto/src/cipher_block.ml | ocaml | XXX currently unsafe point
FIXME: CTR has more room for speedups. Like stitching.
Clobbers `_cs`!
XXX arg order ocaml<->c slows down
XXX bounds checks | open Uncommon
module S = struct
module type Core = sig
type ekey
type dkey
val of_secret : Cstruct.t -> ekey * dkey
val e_of_secret : Cstruct.t -> ekey
val d_of_secret : Cstruct.t -> dkey
val key : int array
val block : int
val encrypt : key:ekey -> blocks:int -> Native.buffe... |
15b349284a31beb564f9465164eeaa66a5fb87dec0d45fa914e23f9eb7a032ea | danielsz/sente-boot | server.clj | (ns example.server
"Official Sente reference example: server"
{:author "Peter Taoussanis (@ptaoussanis)"}
(:require
[clojure.string :as str]
[ring.middleware.defaults]
[compojure.core :as comp :refer (defroutes GET POST)]
[compojure.route :as route]
[hiccup.core :as hiccup]
... | null | https://raw.githubusercontent.com/danielsz/sente-boot/2d18403b2a7ca07a3ec0d139ca61b5524fe2db62/src/clj/example/server.clj | clojure | TODO Choose (uncomment) a supported web server + adapter -------------
[immutant.web :as immutant]
[nginx.clojure.embed :as nginx-clojure]
[taoensso.sente.server-adapters.nginx-clojure :refer (get-sch-adapter)]
[aleph.http :as aleph]
[taoensso.sente.server-adapters.aleph :refer (get-sch-adapter)]
------------... | (ns example.server
"Official Sente reference example: server"
{:author "Peter Taoussanis (@ptaoussanis)"}
(:require
[clojure.string :as str]
[ring.middleware.defaults]
[compojure.core :as comp :refer (defroutes GET POST)]
[compojure.route :as route]
[hiccup.core :as hiccup]
... |
e58570b01654dda9d316f0c093392ca78ea263f0644ef15ddb4212c42c4d3497 | facebook/pyre-check | annotatedBases.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/10c375bea52db5d10b71cb5206fac7da9549eb0c/source/analysis/annotatedBases.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
0dba21e3e33e5475eb1d824c0b0ce5cfeb027ea929a3d3e7fbbca125795958d2 | goldfirere/video-resources | Strict.hs | module Main where
import System.Random
main :: IO ()
main = do
let (min_val, max_val) = computeValues 12345
print min_val
print max_val
computeValues :: Int -> (Int, Int)
computeValues seed = foldl go (maxBound, minBound) (take 100000 $ randoms std_gen)
where
std_gen = mkStdGen seed
go :: (Int, Int) ... | null | https://raw.githubusercontent.com/goldfirere/video-resources/59db79284afd4111511d13cc3ebba714f104b688/2021-11-23-strict/Strict.hs | haskell | module Main where
import System.Random
main :: IO ()
main = do
let (min_val, max_val) = computeValues 12345
print min_val
print max_val
computeValues :: Int -> (Int, Int)
computeValues seed = foldl go (maxBound, minBound) (take 100000 $ randoms std_gen)
where
std_gen = mkStdGen seed
go :: (Int, Int) ... | |
138a062bdc5c1c07bb0dca24d81edc9bb7fb23cd9b088dc850e964ae3a714530 | eugenehr/erlyconv | cp1006.erl | %% THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl
FROM mappings / MISC / CP1006.TXT AT 2016 - 08 - 19
-module(cp1006).
-vsn(20160819).
-export([to_unicode/1, from_unicode/1]).
%% Public functions
to_unicode(16#A1) -> 16#06F0;
to_unicode(16#A2) -> 16#06F1;
to_unicode(16#A3) -> 16#06F2;
to_unicode(16#A4) -> 16#06... | null | https://raw.githubusercontent.com/eugenehr/erlyconv/ecdcd7db8f785c9638cd1ebad37ccd426c050cdf/src/cp1006.erl | erlang | THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl
Public functions
Private functions | FROM mappings / MISC / CP1006.TXT AT 2016 - 08 - 19
-module(cp1006).
-vsn(20160819).
-export([to_unicode/1, from_unicode/1]).
to_unicode(16#A1) -> 16#06F0;
to_unicode(16#A2) -> 16#06F1;
to_unicode(16#A3) -> 16#06F2;
to_unicode(16#A4) -> 16#06F3;
to_unicode(16#A5) -> 16#06F4;
to_unicode(16#A6) -> 16#06F5;
to_unicode(... |
c7c0086c6a426e45fd26a84ddbaabd40b391bb99599885f8de3f4b3e65bedd9a | mfikes/fifth-postulate | ns414.cljs | (ns fifth-postulate.ns414)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns414.cljs | clojure | (ns fifth-postulate.ns414)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
41273e669a1ae5658ba16592db9d6ac27edc05a9abe01b50742dab6c6c3b08ac | shirok/Gauche | multibyte.scm | ;; Encode-specific character/string tests
(add-load-path "../test")
(use gauche.test)
;; char-set-copy to ensure we test mutable one.
(define (test-char-set-1 name expected op arg1)
(test* #"char-set ~name" (make-list 2 expected)
(let1 a (char-set-copy arg1)
(list (op a)
(op (ch... | null | https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/test/multibyte.scm | scheme | Encode-specific character/string tests
char-set-copy to ensure we test mutable one. | (add-load-path "../test")
(use gauche.test)
(define (test-char-set-1 name expected op arg1)
(test* #"char-set ~name" (make-list 2 expected)
(let1 a (char-set-copy arg1)
(list (op a)
(op (char-set-freeze a))))))
(define (test-char-set-2 name expected op arg1 arg2)
(test* #"cha... |
223764d53a82d577b702e2a63e52e61229ec2d402ed9b37e2d0855815557981d | haskellfoundation/error-message-index | NotARecordSelector.hs | module NotARecordSelector where
class Foo a where
foo :: a -> ()
data Bar = Bar { bar :: () }
test :: Bar
test = undefined { bar = () }
| null | https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-47535/example2/after/NotARecordSelector.hs | haskell | module NotARecordSelector where
class Foo a where
foo :: a -> ()
data Bar = Bar { bar :: () }
test :: Bar
test = undefined { bar = () }
| |
e75ed15ee95a1db862e2ed726787a5979f0f49f24e02c010a33ea8a90709257b | fons/cl-mongo | shell.lisp | (in-package :cl-mongo)
#|
shell commands
|#
(defun docs (result)
"Stop the iterator (if any) and return the list of documents returned by the query.
Typical ue would be in conjunction with db.find like so (docs (iter (db.find 'foo' 'll)))"
(cadr (db.stop result)))
(defun iter (result &key (mongo (mongo)) (m... | null | https://raw.githubusercontent.com/fons/cl-mongo/141518d34fddc9ba42d3813362abae12b368f059/src/shell.lisp | lisp |
shell commands
(format t "length of result set : ~A~%" (length result))
rm is is set up to handle insert/delete race conditions which may appear..
--------------------- | (in-package :cl-mongo)
(defun docs (result)
"Stop the iterator (if any) and return the list of documents returned by the query.
Typical ue would be in conjunction with db.find like so (docs (iter (db.find 'foo' 'll)))"
(cadr (db.stop result)))
(defun iter (result &key (mongo (mongo)) (max-per-call 0))
"Exha... |
06cd9d53fac6153b89292ea6b53cd5f676b08f7a10fae20fecc3422dd3a27982 | diagrams/SVGFonts | Benchmark.hs | {-# LANGUAGE OverloadedStrings #-}
import Criterion.Main
import qualified Data.ByteString.Char8 as BS
import Graphics.SVGFonts.ReadFont (loadFont)
import Graphics.SVGFonts.ReadPath (pathFromString)
path :: BS.ByteString
path = BS.unlines
[ "M600 1100q147 0 219 -49t72 -150q0 -71 -44 -117.5t-124 -60.5q19 -5 48 -38.... | null | https://raw.githubusercontent.com/diagrams/SVGFonts/66fa56c5a80f1aaaddf5c3e938ee844f90b60b9d/Benchmark.hs | haskell | # LANGUAGE OverloadedStrings # |
import Criterion.Main
import qualified Data.ByteString.Char8 as BS
import Graphics.SVGFonts.ReadFont (loadFont)
import Graphics.SVGFonts.ReadPath (pathFromString)
path :: BS.ByteString
path = BS.unlines
[ "M600 1100q147 0 219 -49t72 -150q0 -71 -44 -117.5t-124 -60.5q19 -5 48 -38.5t67 -92.5l114 -186h-143l-107 174q-... |
0f3a309e6ab8ae9a48f281aac41e63590ac5be55be15e83b69fc8ffd8e43131a | kowey/GenI | Automaton.hs | -- GenI surface realiser
Copyright ( C ) 2005 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 ( at your option ) any later version .
--
-- T... | null | https://raw.githubusercontent.com/kowey/GenI/570a6ef70e61a7cb01fe0fc29732cd9c1c8f2d7a/src/NLP/GenI/Automaton.hs | haskell | GenI surface realiser
This program is free software; you can redistribute it and/or
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 License for more det... | Copyright ( C ) 2005 and
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 ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple ... |
a683ec644c751356e7c9f17bd3f5fa27593fd6fe5fdf17e74e4267aa60f1ed17 | tfausak/argo | Flag.hs | module Argo.Internal.Type.Flag where
data Flag
= Help
| Spaces String
| Tab
| Version
deriving (Eq, Show)
| null | https://raw.githubusercontent.com/tfausak/argo/2e225c671dec9d4991864de8faed48acf4789192/source/library/Argo/Internal/Type/Flag.hs | haskell | module Argo.Internal.Type.Flag where
data Flag
= Help
| Spaces String
| Tab
| Version
deriving (Eq, Show)
| |
c52e8ed553dd7cbe53cbc1006f149b00665417a74a480af15e5b72f6faa37b39 | gheber/kenzo | Essai-Omega-S2.lisp |
(cat-init)
(setf G (loop-space (deltab2)))
(setf BG (classifying-space G))
(setf fibr (smgr-fibration G))
(setf brown (brown-reduction fibr))
(setf delta (third (orgn (bcc brown))))
(? delta 0 (tnpr 0 (gbar 0) 0 (loop3)))
(defun loo (n)
(assert (plusp n))
(loop3 0 (mask (+ n 2)) 1))
(? d... | null | https://raw.githubusercontent.com/gheber/kenzo/48e2ea398b80f39d3b5954157a7df57e07a362d7/archive/Kenzo-8/Essai-Omega-S2.lisp | lisp |
(cat-init)
(setf G (loop-space (deltab2)))
(setf BG (classifying-space G))
(setf fibr (smgr-fibration G))
(setf brown (brown-reduction fibr))
(setf delta (third (orgn (bcc brown))))
(? delta 0 (tnpr 0 (gbar 0) 0 (loop3)))
(defun loo (n)
(assert (plusp n))
(loop3 0 (mask (+ n 2)) 1))
(? d... | |
c6148b04c2b80b7898df1bd227aa3eb49df6895a620e21a2189b45c18ffa2542 | pedestal/samples | dev.clj | Copyright 2013 Relevance , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; which can be found in the file epl-v10.html at the root of this distribution.
;
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this licens... | null | https://raw.githubusercontent.com/pedestal/samples/caaf04afe255586f8f4e1235deeb0c1904179355/template-server/dev/dev.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
d... | Copyright 2013 Relevance , Inc.
Eclipse Public License 1.0 ( )
(ns dev
(:require [template-server.service :as service]
[template-server.server :as server]
[io.pedestal.service.http :as bootstrap]))
(def service (-> service/service
(merge {:env :dev
... |
1542eeb7dccc2fb5fccd3f105b49b58cac6d6815c8c36c2f317a52a58e259b30 | foreverbell/project-euler-solutions | MapReduce.hs | module Common.MapReduce (
mapReduce
, mapReduce'
) where
import Control.Parallel.Strategies (parMap, rdeepseq, using, NFData)
import Control.Parallel (pseq)
# INLINABLE divide #
{-# INLINABLE mapReduce #-}
{-# INLINABLE mapReduce' #-}
divide :: Int -> [a] -> [[a]]
divide _ [] = []
divide n xs = as : divide n bs wh... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/lib/Common/MapReduce.hs | haskell | # INLINABLE mapReduce #
# INLINABLE mapReduce' # | module Common.MapReduce (
mapReduce
, mapReduce'
) where
import Control.Parallel.Strategies (parMap, rdeepseq, using, NFData)
import Control.Parallel (pseq)
# INLINABLE divide #
divide :: Int -> [a] -> [[a]]
divide _ [] = []
divide n xs = as : divide n bs where (as, bs) = splitAt n xs
mapReduce :: (NFData b, NFDa... |
408e0ef88174ee606a80596bcbf0b88b4518b772fb9b80e5070054dd2b4a93c6 | tomjridge/imp_fs | imp_fuse.ml | FIXME commented for the time being ; use mini - fs version
( * * integration
(** FuSE integration *)
(* fuse integration ------------------------------------------------- *)
open Unix
open LargeFile
open Bigarray
open Fuse
open Imp_pervasives
open Tjr_fs_shared
open X.Base_types_pervasives
open X.Page_ref_int... | null | https://raw.githubusercontent.com/tomjridge/imp_fs/ba86e8e9204c59b18f041bf21332a2a4846ae20b/_src_TODO/d_fuse/imp_fuse.ml | ocaml | * FuSE integration
fuse integration -------------------------------------------------
data -------------------------------------------------------------
stores all versions of data blocks and id->id map, using underlying
fd
where data is stored in the base filesystem; grows without limit!
global mutable st... | FIXME commented for the time being ; use mini - fs version
( * * integration
open Unix
open LargeFile
open Bigarray
open Fuse
open Imp_pervasives
open Tjr_fs_shared
open X.Base_types_pervasives
open X.Page_ref_int
open X.Params
open X.Block
module Blk=Blk4096
open Blk
open Imp_state
open Path_resolution
open... |
f9fb3657fcb366d51d3d8a05d18e18bae4146489480125298dd3de62142d4216 | ryanpbrewster/haskell | message_decoding.hs | -- message_decoding.hs
- Credits : This challenge has appeared in a past ACM competition .
-
- Some message encoding schemes require that an encoded message be sent in two
- parts . The first part , called the header , contains the characters of the
- message . The second part contains a pattern that rep... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/message_decoding.hs | haskell | message_decoding.hs |
- Credits : This challenge has appeared in a past ACM competition .
-
- Some message encoding schemes require that an encoded message be sent in two
- parts . The first part , called the header , contains the characters of the
- message . The second part contains a pattern that represents the message . Y... |
4b0be18ad8d6d25222c7b494e4e83d9eed739af3c13304b2e9b4627923fc5fa3 | clojure/clojurescript | parse_test.cljs | (ns cljs.parse-test
(:require
[clojure.test :refer [deftest is are]]
[clojure.test.check :as chk]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]))
(deftest test-parse-long
(are [s expected]
(= expected (parse-long s))
"100" 100
"+100" 100
"0" 0
... | null | https://raw.githubusercontent.com/clojure/clojurescript/ba2672463e2a9c1c5f6b75940556270c3e3fb3d3/src/test/cljs/cljs/parse_test.cljs | clojure | do not parse
no float
past max long
past min long
no hex
no radix support
generative test - gen long -> str -> parse, compare
pass
below minimum double
nil on invalid string
invalid string
close, but not valid
generative test - gen double -> str -> parse, compare
pass
nil on invalid uuid string
throw on... | (ns cljs.parse-test
(:require
[clojure.test :refer [deftest is are]]
[clojure.test.check :as chk]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]))
(deftest test-parse-long
(are [s expected]
(= expected (parse-long s))
"100" 100
"+100" 100
"0" 0
... |
425d6a1a24ecc7e852aba698b8e1185c69e59e1f118caa1c4d08790b3543db57 | raptazure/experiments | Main.hs | module Main where
import Lib (headNil)
main :: IO ()
main = do
print $ headNil [1, 2, 3]
| null | https://raw.githubusercontent.com/raptazure/experiments/c48263980d1ce22ee9407ff8dcf0cf5091b01c70/haskell/wiwinwlh/languageExtensions/app/Main.hs | haskell | module Main where
import Lib (headNil)
main :: IO ()
main = do
print $ headNil [1, 2, 3]
| |
8888257364f664b1064180d5417506411651b1777c6151ba1f176e8cc6263432 | HuwCampbell/orc-haskell | Striped.hs | module Orc.Striped (
Striped.withOrcFileLifted
, Striped.putOrcFileLifted
, module Orc.Table.Striped
, Types.Type
, Types.CompressionKind
) where
import qualified Orc.Serial.Binary.Striped as Striped
import Orc.Table.Striped
import qualified Orc.Schema.Types as Types
| null | https://raw.githubusercontent.com/HuwCampbell/orc-haskell/259649bc5fa5c6d8bd850fdad0517af6c028e00e/src/Orc/Striped.hs | haskell | module Orc.Striped (
Striped.withOrcFileLifted
, Striped.putOrcFileLifted
, module Orc.Table.Striped
, Types.Type
, Types.CompressionKind
) where
import qualified Orc.Serial.Binary.Striped as Striped
import Orc.Table.Striped
import qualified Orc.Schema.Types as Types
| |
a50cf6fd0033cd157768ec2bdb6c005cc879ff04a68c2897a4af0cd1490a5684 | Holworth/SICP_Solutions | the-A-function.rkt | #lang racket
(define (A x y)
(cond ((= y 0) 0)
((= x 0) (* 2 y))
((= y 1) 2)
(else (A (- x 1) (A x (- y 1))))
)
)
(A 1 10)
(A 2 4)
(A 3 3) | null | https://raw.githubusercontent.com/Holworth/SICP_Solutions/f1df5e8e123af69e03b333df9960f445eaf28618/solutions/chap1/code/the-A-function.rkt | racket | #lang racket
(define (A x y)
(cond ((= y 0) 0)
((= x 0) (* 2 y))
((= y 1) 2)
(else (A (- x 1) (A x (- y 1))))
)
)
(A 1 10)
(A 2 4)
(A 3 3) | |
3237e6f234e95870a525afd1de2b9b204446afb4fb7c914cd29b508f98a704d8 | elaforge/karya | Effect_test.hs | Copyright 2020
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Synth.Faust.Effect_test where
import qualified Control.Monad.Trans.Resource as Resource
import qualified Data.Map as Map
import qualified Data.Vector.Storable as V
import qualifie... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Synth/Faust/Effect_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
Round up to block size.
protect against infinite stream | Copyright 2020
module Synth.Faust.Effect_test where
import qualified Control.Monad.Trans.Resource as Resource
import qualified Data.Map as Map
import qualified Data.Vector.Storable as V
import qualified Util.Audio.Audio as Audio
import qualified Util.Num as Num
import qualified Synth.Faust.Effect as Effect
import... |
902d192653cc8f9dd4664d50124cd412c0ee2b87faba89996216c60607591fa3 | WormBase/wormbase_rest | details.clj | (ns rest-api.classes.expr-pattern.widgets.details
(:require
[pseudoace.utils :as pace-utils]
[rest-api.formatters.date :as dates]
[rest-api.classes.generic-fields :as generic]
[rest-api.formatters.object :as obj :refer [pack-obj]]))
(defn experimental-details [e]
{:data {:types (into
... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/expr_pattern/widgets/details.clj | clojure | (ns rest-api.classes.expr-pattern.widgets.details
(:require
[pseudoace.utils :as pace-utils]
[rest-api.formatters.date :as dates]
[rest-api.classes.generic-fields :as generic]
[rest-api.formatters.object :as obj :refer [pack-obj]]))
(defn experimental-details [e]
{:data {:types (into
... | |
fce546b1dfd4ecd58becf2fe69790ec654d6789c5e716f73c26bf635fc0c7169 | thi-ng/geom | gmesh.cljc | (ns thi.ng.geom.gmesh
(:require
[thi.ng.geom.core :as g]
[thi.ng.geom.utils :as gu]
[thi.ng.geom.vector :as v :refer [vec2 vec3]]
[thi.ng.geom.matrix :refer [M44]]
[thi.ng.geom.meshface :as mf]
#?(:clj [thi.ng.geom.types] :cljs [thi.ng.geom.types :refer [AABB GMesh]])
[thi.ng.dstruct.core :as d]
... | null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/gmesh.cljc | clojure | *** Creating a mesh from a lathe
Revolving a seq of points (usually all in a plane) around an axis
is a classic and very powerful way to construct a
symmetrical/cylindrical 3d mesh. The =lathe-mesh= function does
exactly this (but in a more flexible way): It takes a seq of
revolved around an axis using a given r... | (ns thi.ng.geom.gmesh
(:require
[thi.ng.geom.core :as g]
[thi.ng.geom.utils :as gu]
[thi.ng.geom.vector :as v :refer [vec2 vec3]]
[thi.ng.geom.matrix :refer [M44]]
[thi.ng.geom.meshface :as mf]
#?(:clj [thi.ng.geom.types] :cljs [thi.ng.geom.types :refer [AABB GMesh]])
[thi.ng.dstruct.core :as d]
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.