_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 |
|---|---|---|---|---|---|---|---|---|
986b9665804c5ea6a6b3a368560f24f0a7d0436af16175c375a591e8b1b221f2 | openmusic-project/RQ | k-best-analysis.lisp | ;;;;
(in-package :om)
Segments = time marker , until next one
(defclass! k-best-analysis (abstract-analysis)
((segpen :accessor segpen :initarg :segpen :initform 5) ;penalty given to the creation of a new segment in the segmentation algorithm
(warning-p :accessor warning-p :initarg :warnin... | null | https://raw.githubusercontent.com/openmusic-project/RQ/d6b1274a4462c1500dfc2edab81a4425a6dfcda7/src/gui/analysis/k-best-analysis.lisp | lisp |
penalty given to the creation of a new segment in the segmentation algorithm
to display the long segment warning, or not.
Warning when the segment is long (computations may take a long time)
If each segment corresponds to a beat, we compute the tempo value from the segment length
Otherwise, use the tempo parameter
S... |
(in-package :om)
Segments = time marker , until next one
(defclass! k-best-analysis (abstract-analysis)
A k - best analysis is only allowed with a quand - chod - seq ( ie in the context of a RQ system )
(defmethod compatible-analysis-p ((analyse k-best-analysis) (object rq::quant-chord-seq)) t)
(defmethod compa... |
dd5522bca7e50d285c0395215d9149281b3c16c2d787ef4ba74b87734040ff67 | haskell/containers | Sorting.hs | {-# LANGUAGE BangPatterns #-}
# OPTIONS_HADDOCK not - home #
-- |
--
-- = WARNING
--
-- This module is considered __internal__.
--
The Package Versioning Policy _ _ does not apply _ _ .
--
-- The contents of this module may change __in any way whatsoever__
-- and __without any warning__ between minor versions of th... | null | https://raw.githubusercontent.com/haskell/containers/7fb91ca53b1aca7c077b36a0c1f8f785d177da34/containers/src/Data/Sequence/Internal/Sorting.hs | haskell | # LANGUAGE BangPatterns #
|
= WARNING
This module is considered __internal__.
The contents of this module may change __in any way whatsoever__
and __without any warning__ between minor versions of this package.
Authors importing this module are expected to track development
closely.
= Description
This m... |
# OPTIONS_HADDOCK not - home #
The Package Versioning Policy _ _ does not apply _ _ .
module Data.Sequence.Internal.Sorting
(
sort
,sortBy
,sortOn
,unstableSort
,unstableSortBy
,unstableSortOn
,
Queue(..)
,QList(..)
,IndexedQueue(..)
,IQList(..)
,TaggedQueue(..)
,TQList(..)
,Indexed... |
848ebf83c21f7d267913ad4a7e3c6ac80beea53dd3ce49031022402c3cf53277 | repl-acement/repl-acement | patched_specs.cljs | (ns replacement.structure.patched-specs
(:require [clojure.spec.alpha :as s]
[replacement.structure.core-fn-specs :as specs]))
There is a problem with this defn - args spec : unform and conform are not fully inlined which
;; means that unform returns lists instead of vectors.
;; We can use code from @... | null | https://raw.githubusercontent.com/repl-acement/repl-acement/a44812ab793db3d81db57fd0a28d70a9784f5780/repl-ui/replacement/structure/patched_specs.cljs | clojure | means that unform returns lists instead of vectors.
We can use code from @viebel to monkey patch :defn-args so that unform and conform are fully inlined.
from | (ns replacement.structure.patched-specs
(:require [clojure.spec.alpha :as s]
[replacement.structure.core-fn-specs :as specs]))
There is a problem with this defn - args spec : unform and conform are not fully inlined which
Fundamental issue is here -2021 and seems to be waiting on spec2 .
(s/def :... |
44f5050d48b0b06c4e89eff9ca2e112cf6911bcef72a23ca232aea352f3024c9 | ocaml/ocamlbuild | flags.mli | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/flags.mli | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
Original author :
val of_tags : Tags.t -> Command... |
cd0cda795d8fd4364eebde72ff214837c343f8742bf7dba3899fe5fd774ad588 | erlangonrails/devdb | gen_component.erl | 2007 - 2010 fuer Informationstechnik Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, ... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/gen_component.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... | 2007 - 2010 fuer Informationstechnik Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@author < >
@version $ I d : gen_component.erl 953 2010 - 08 - 03 13:52:39Z $
-module(gen_comp... |
045b385f719dc51650e8ed40569a0b0fe4da98c99e3f483181ff3504d22675db | ocaml/ocaml-lsp | text_document_tests.ml | open Lsp
open Lsp.Types
module List = ListLabels
module String = StringLabels
let tuple_range start end_ =
{ Range.start =
(let line, character = start in
{ Position.line; character })
; end_ =
(let line, character = end_ in
{ Position.line; character })
}
let test_general text changes... | null | https://raw.githubusercontent.com/ocaml/ocaml-lsp/c8c10966133cbbe88e6f23e5fd7bad3e125c198f/lsp/test/text_document_tests.ml | ocaml | open Lsp
open Lsp.Types
module List = ListLabels
module String = StringLabels
let tuple_range start end_ =
{ Range.start =
(let line, character = start in
{ Position.line; character })
; end_ =
(let line, character = end_ in
{ Position.line; character })
}
let test_general text changes... | |
2323a63172288d5674cac1cb2623d6412d7bb5a854e1f2e7dc2db4f30370a2ba | McCLIM/McCLIM | region-composition.lisp | ;;; ---------------------------------------------------------------------------
;;; License: LGPL-2.1+ (See file 'Copyright' for details).
;;; ---------------------------------------------------------------------------
;;;
( c ) copyright 1998 < >
( c ) copyright 1998 - 2000 < >
( c ) copyright 2014 ... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/d49fef5c2bb1307a006cdadfc4061e0a6b0fff79/Core/geometry/region-composition.lisp | lisp | ---------------------------------------------------------------------------
License: LGPL-2.1+ (See file 'Copyright' for details).
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Region algebra methods for ... | ( c ) copyright 1998 < >
( c ) copyright 1998 - 2000 < >
( c ) copyright 2014 < >
( c ) copyright 2019 < >
(in-package #:climi)
(defmethod region-union ((a bounding-rectangle) (b bounding-rectangle))
(make-instance 'standard-region-union :regions (list a b)))
(defmethod region-union
((a... |
99734e249b4064fed25667e03ccd7ceef8002018827eeea98358b3c60ec242f2 | quek/paiprolog | gps.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*-
;;; Code from Paradigms of Artificial Intelligence Programming
Copyright ( c ) 1991
;;;; File gps.lisp: Final version of GPS
(requires "gps1")
;;; ==============================
(defun executing-p (x)
"Is x of the form: (executing ...) ?"
(starts-with x 'executin... | null | https://raw.githubusercontent.com/quek/paiprolog/012d6bb255d8af7f1c8b1d061dcd8a474fb3b57a/gps.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; -*-
Code from Paradigms of Artificial Intelligence Programming
File gps.lisp: Final version of GPS
==============================
==============================
==============================
==============================
==============================
====================... | Copyright ( c ) 1991
(requires "gps1")
(defun executing-p (x)
"Is x of the form: (executing ...) ?"
(starts-with x 'executing))
(defun starts-with (list x)
"Is this a list whose first element is x?"
(and (consp list) (eql (first list) x)))
(defun convert-op (op)
"Make op conform to the (EXECUTING op... |
04d326fc0b716bc39952e6e92b6c795394066a1b6160b5939eb52f1ff7a457c3 | ragkousism/Guix-on-Hurd | containers.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 Lice... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/tests/containers.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (test-containers)
#:use-module (guix utils)
#:use-module (guix build syscalls)
#:use-module (... |
cff17e73e1333c1c3644bbe68b97e41b1f7089ef00199a3efbf8acdd843bd6af | pallix/tikkba | dynamic.clj | (ns tikkba.examples.dynamic
(:use clojure.pprint
[analemma svg charts xml]
[tikkba swing dom core]
tikkba.utils.xml)
(:require [tikkba.utils.dom :as dom])
(:import (javax.swing JFrame SwingUtilities)))
(defn create-svg
"Creates a SVG representation with the Analemma functions"
[]
(s... | null | https://raw.githubusercontent.com/pallix/tikkba/86fda7f97c3b1ff835f02c2b1c0337f3e134fd2c/src/tikkba/examples/dynamic.clj | clojure | changes rectangle position and color
or use the do-swing macro of clojure.contrib.swing-utils:
and displays the SVG in a JFrame | (ns tikkba.examples.dynamic
(:use clojure.pprint
[analemma svg charts xml]
[tikkba swing dom core]
tikkba.utils.xml)
(:require [tikkba.utils.dom :as dom])
(:import (javax.swing JFrame SwingUtilities)))
(defn create-svg
"Creates a SVG representation with the Analemma functions"
[]
(s... |
a31122e1a55205196420938025f85e49f844da3334fc1d9eae4ba47f3399e99c | tanders/cluster-engine | 07.backjumping.lisp | (in-package cluster-engine)
;backjump only in pitch-duration rule so far
(defun get-one-engine-index-first-counts (vsolution vindex engine)
(declare (type array vsolution vindex))
(declare (type fixnum engine))
(loop for index from 0 to (aref vindex engine)
collect (car (caddar (aref (aref vsolution engi... | null | https://raw.githubusercontent.com/tanders/cluster-engine/064ad4fd107f8d9a3dfcaf260524c2ab034c6d3f/sources/07.backjumping.lisp | lisp | backjump only in pitch-duration rule so far
measure layer
pitch and rhythm layer (also count values)
rhythm and measure layer (timepoints)
pitch motifs
measure layer
pitch and rhythm layer (also count values)
rhythm and measure layer (timepoints)
pitch motifs
then find index
it is not a fixnum since it can be nil
it is... | (in-package cluster-engine)
(defun get-one-engine-index-first-counts (vsolution vindex engine)
(declare (type array vsolution vindex))
(declare (type fixnum engine))
(loop for index from 0 to (aref vindex engine)
collect (car (caddar (aref (aref vsolution engine) index)))))
(defun get-one-engine-index-... |
636ef41e3b20621646967806457aa738800fb5aee9fdaf0fd4b8b766bd9f3852 | scarvalhojr/haskellbook | section27.5-ex.hs |
1 .
ex1 = const 1 undefined
ex1 = 1
2 .
ex2 = const undefined 1
-- ex2 = bottom
3 .
ex3 = flip const undefined 1
ex3 = 1
4 .
ex4 = flip const 1 undefined
-- ex4 = bottom
5 .
ex5 = const undefined undefined
-- ex5 = bottom
6 .
ex6 = foldr const 'z' ['a'..'e']
-- ex6 = 'a'
7 .
ex7 = ... | null | https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter27/section27.5-ex.hs | haskell | ex2 = bottom
ex4 = bottom
ex5 = bottom
ex6 = 'a'
ex7 = 'z' |
1 .
ex1 = const 1 undefined
ex1 = 1
2 .
ex2 = const undefined 1
3 .
ex3 = flip const undefined 1
ex3 = 1
4 .
ex4 = flip const 1 undefined
5 .
ex5 = const undefined undefined
6 .
ex6 = foldr const 'z' ['a'..'e']
7 .
ex7 = foldr (flip const) 'z' ['a'..'e']
|
cb278fb7f539fa7e0acb800257bb5441efebfa8ffcb97d370533cbe8368913ef | fractalide/fractalide | put-action.rkt | #lang racket/base
(require fractalide/modules/rkt/rkt-fbp/agent
racket/file)
(define-agent
#:input '("in") ; in array port
#:output '("out") ; out port
(define msg (recv (input "in")))
(define new-msg (cons (recv (input "option"))
msg))
(send (output "out") new-msg))... | null | https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/mesg/put-action.rkt | racket | in array port
out port | #lang racket/base
(require fractalide/modules/rkt/rkt-fbp/agent
racket/file)
(define-agent
(define msg (recv (input "in")))
(define new-msg (cons (recv (input "option"))
msg))
(send (output "out") new-msg))
|
c3fe37d680d78f223f69395a9747eae513b473b324e84f8bddd51cbfe68af1d4 | eponai/sulolive | account_verify.cljs | (ns eponai.devcards.account-verify
(:require
[eponai.web.ui.store.business.verify :as v]
[eponai.web.ui.store.business :as b]
[om.next :as om :refer [defui]]
[taoensso.timbre :refer [debug]]
[eponai.server.external.stripe.stub :as stub]
[eponai.common.ui.dom :as dom]
[eponai.client.devtoo... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/test/eponai/devcards/account_verify.cljs | clojure | :stripe/legal-entity {:stripe.legal-entity/address {:stripe}}
:stripe/legal-entity {:stripe.legal-entity/address {:stripe}}
:stripe/legal-entity {:stripe.legal-entity/address {:stripe}}
:stripe/legal-entity {:stripe.legal-entity/address {:stripe}} | (ns eponai.devcards.account-verify
(:require
[eponai.web.ui.store.business.verify :as v]
[eponai.web.ui.store.business :as b]
[om.next :as om :refer [defui]]
[taoensso.timbre :refer [debug]]
[eponai.server.external.stripe.stub :as stub]
[eponai.common.ui.dom :as dom]
[eponai.client.devtoo... |
5ffc030f2571969511298cb76b236c9d9f791f50351d0b2d481561dd1bacd353 | RefactoringTools/HaRe | SubPatternIn3AST.hs | module SubPatternIn3 where
data T a b = C1 a b | C2 b
g :: Int -> (T Int [Int]) -> Int
g z (C1 b c) = b
g z (C2 x@[]) = hd x
g z (C2 x@(b_1 : b_2)) = hd x
g z (C2 x) = hd x
f :: [Int] -> Int
f x@[] = (hd x) + (hd (tl x))
f x@((y : ys)) = (hd x) + (hd (tl x))
hd x = head x
tl x = tail x
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/subIntroPattern/SubPatternIn3AST.hs | haskell | module SubPatternIn3 where
data T a b = C1 a b | C2 b
g :: Int -> (T Int [Int]) -> Int
g z (C1 b c) = b
g z (C2 x@[]) = hd x
g z (C2 x@(b_1 : b_2)) = hd x
g z (C2 x) = hd x
f :: [Int] -> Int
f x@[] = (hd x) + (hd (tl x))
f x@((y : ys)) = (hd x) + (hd (tl x))
hd x = head x
tl x = tail x
| |
55090a7e3e700fc193e80dc9a86156d143f2b57d681fdcdb7c735fdce8e43332 | conscell/hugs-android | Bits.hs | # OPTIONS_GHC -fno - implicit - prelude #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Bits
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : expe... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/base/Data/Bits.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Bits
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
This module defines bitwise operations for signed and unsigned
integers. ... | # OPTIONS_GHC -fno - implicit - prelude #
Copyright : ( c ) The University of Glasgow 2001
' Integer ' types are available from this module , and instances for
module Data.Bits (
Bits(
)
instance Bits Int
instance Bits Integer
) where
... |
78b640f537a92b851e2721ea9d9218b268fea1b4fefc2bc27e94b6c08dd7a288 | sorawee/fmt | version.rkt | #lang racket/base
(provide version)
(define version 1)
| null | https://raw.githubusercontent.com/sorawee/fmt/b408340d9d1bb74d30e723a8a77d255b552d562a/version.rkt | racket | #lang racket/base
(provide version)
(define version 1)
| |
9a1f897f39f3910ecc95ac5f6bd772e8c342aee1e6d54b8e905661d88747a7fa | yi-editor/yi | Emacs.hs | {-# LANGUAGE OverloadedStrings #-}
module Yi.Config.Default.Emacs (configureEmacs) where
import Lens.Micro.Platform ((%=), (.=), (.~))
import Yi.Buffer.Misc (identA, directoryContentA)
import Yi.Config.Misc (ScrollStyle (..))
import Yi.Editor (buffersA, newBufferE)... | null | https://raw.githubusercontent.com/yi-editor/yi/58c239e3a77cef8f4f77e94677bd6a295f585f5f/yi-keymap-emacs/src/Yi/Config/Default/Emacs.hs | haskell | # LANGUAGE OverloadedStrings #
Useful for emacs lovers ;)
| Open an emacs-like scratch buffer if no file is open. | module Yi.Config.Default.Emacs (configureEmacs) where
import Lens.Micro.Platform ((%=), (.=), (.~))
import Yi.Buffer.Misc (identA, directoryContentA)
import Yi.Config.Misc (ScrollStyle (..))
import Yi.Editor (buffersA, newBufferE)
import Yi.Event ... |
05d28079efcd50150f33ad099bcda4ebbadfbc0c82bf540ffeb21f6eae1ef014 | marcelosousa/llvmvf | Module.hs | # LANGUAGE UnicodeSyntax #
-------------------------------------------------------------------------------
-- Module : Analysis.Type.Inference.Module
Copyright : ( c ) 2013
-- Type Inference
-------------------------------------------------------------------------------
module Analysis.Type.Inference.Module ... | null | https://raw.githubusercontent.com/marcelosousa/llvmvf/c314e43aa8bc8bb7fd9c83cebfbdcabee4ecfe1b/src/Analysis/Type/Inference/Module.hs | haskell | -----------------------------------------------------------------------------
Module : Analysis.Type.Inference.Module
Type Inference
-----------------------------------------------------------------------------
gγ = (⊨) nmdτ M.empty gτℂ
| Compute type constraints
Compute individually for functions
τList gvsℂs $... | # LANGUAGE UnicodeSyntax #
Copyright : ( c ) 2013
module Analysis.Type.Inference.Module (typeAnnInference,typeConstraints,typeAnnInferenceIP,typeAnnInferenceGlobals) where
import qualified Data.Map as M
import qualified Data.Set as S
import Language.LLVMIR hiding (Type(..),Id, NamedTypes)
import Language.LLVMI... |
df3f4ff2f0af59f2f1671c3a6afa36e05d5aa0e8674577da721789a10b2ccaec | input-output-hk/cardano-ledger | Scripts.hs | module Test.Cardano.Ledger.Alonzo.Scripts (
alwaysSucceeds,
alwaysFails,
saltFunction,
)
where
import Cardano.Ledger.Alonzo.Language (Language (..))
import Cardano.Ledger.Alonzo.Scripts (AlonzoScript (..))
import Data.ByteString.Short (ShortByteString)
import Numeric.Natural (Natural)
import qualified PlutusLedg... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/alonzo/test-suite/src/Test/Cardano/Ledger/Alonzo/Scripts.hs | haskell | module Test.Cardano.Ledger.Alonzo.Scripts (
alwaysSucceeds,
alwaysFails,
saltFunction,
)
where
import Cardano.Ledger.Alonzo.Language (Language (..))
import Cardano.Ledger.Alonzo.Scripts (AlonzoScript (..))
import Data.ByteString.Short (ShortByteString)
import Numeric.Natural (Natural)
import qualified PlutusLedg... | |
7b04ae75a3ac0ad875f228374b9bb47d8e69f3430312bda408ae307cd0dac104 | ocaml/merlin | magic_numbers.ml | open Std
module Cmi = struct
type error =
| Not_an_interface of string
| Wrong_version_interface of string * string
| Corrupted_interface of string
exception Error of error
let to_version_opt = function
| "Caml1999I017" -> Some "4.02"
| "Caml1999I020" -> Some "4.03"
| "Caml1999I021" -> ... | null | https://raw.githubusercontent.com/ocaml/merlin/9df16834afd13d76657f9b81214ca560f0bbef04/src/ocaml/typing/magic_numbers.ml | ocaml | open Std
module Cmi = struct
type error =
| Not_an_interface of string
| Wrong_version_interface of string * string
| Corrupted_interface of string
exception Error of error
let to_version_opt = function
| "Caml1999I017" -> Some "4.02"
| "Caml1999I020" -> Some "4.03"
| "Caml1999I021" -> ... | |
a442cfb312b9663bb03886e4f849fea71f9b815e125967dd4448951fb366eab5 | tomhanika/conexp-clj | latex_test.clj | ;; Copyright ⓒ the conexp-clj developers; all rights reserved.
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bou... | null | https://raw.githubusercontent.com/tomhanika/conexp-clj/5e4c15697f06446f925f53d1d143528155d7dd3a/src/test/clojure/conexp/io/latex_test.clj | clojure | Copyright ⓒ the conexp-clj developers; all rights reserved.
The use and distribution terms for this software are covered by the
which can be found in the file LICENSE 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 re... | Eclipse Public License 1.0 ( -1.0.php )
(ns conexp.io.latex-test
(:use conexp.base
conexp.fca.contexts
conexp.fca.lattices
conexp.layouts.base
conexp.io.latex)
(:use clojure.test))
(deftest test-tex-escape
(is (= (tex-escape "&%$#_{}~^\\<>")
(str
"\\&\\%\\... |
20dc100e07a87afb4ea773417aa043725c56833404175653bf92a704b25b0e1a | khasm-lang/khasmc | modules.ml | open Ast
let wrap_in name program =
match program with Program p -> Program [ SimplModule (name, p) ]
| null | https://raw.githubusercontent.com/khasm-lang/khasmc/a0e50f5c028d77500fb5647c428d174c986486c8/lib/frontend/modules.ml | ocaml | open Ast
let wrap_in name program =
match program with Program p -> Program [ SimplModule (name, p) ]
| |
299a6834af9a9e115f7dff2ea59656f2d3358831314162d9b968eccadba938e4 | cram2/cram | airy.lisp | Regression test AIRY for GSLL , automatically generated
;;
Copyright 2009
Distributed under the terms of the GNU General Public License
;;
;; 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 Foundatio... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/airy.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | Regression test AIRY for GSLL , automatically generated
Copyright 2009
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of ... |
19744069a6b4b37affed335a58c2a9b8d79a2363cde572149f52db6e4ded402f | deadpendency/deadpendency | SmokeScalaMaven.hs | module SR.Effect.RunSmokeTest.Backend.Smokes.SmokeScalaMaven (smokeScalaMaven) where
import Common.Model.Config.AppEnv
import Common.Model.Dependency.DependencyIdentifier
import Common.Model.Dependency.DependencyName
import Common.Model.Git.GitSha
import Common.Model.Git.QualifiedRepo
import Common.Model.Git.RepoHost
... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/script-runner/src/SR/Effect/RunSmokeTest/Backend/Smokes/SmokeScalaMaven.hs | haskell | module SR.Effect.RunSmokeTest.Backend.Smokes.SmokeScalaMaven (smokeScalaMaven) where
import Common.Model.Config.AppEnv
import Common.Model.Dependency.DependencyIdentifier
import Common.Model.Dependency.DependencyName
import Common.Model.Git.GitSha
import Common.Model.Git.QualifiedRepo
import Common.Model.Git.RepoHost
... | |
0c75d3eaf72c1570ab0935181d416359a57dc5efbdddce808a58829bf8b5146c | finnishtransportagency/harja | tarkastusreittimuunnin_test.clj | (ns harja-laadunseuranta.tarkastusreittimuunnin.tarkastusreittimuunnin-test
(:require [clojure.test :refer :all]
[harja
[pvm :as pvm]
[testi :refer :all]]
[harja-laadunseuranta.core :as ls-core]
[harja-laadunseuranta.tarkastusreittimuunnin.tarkastusreittim... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/laadunseuranta/test-src/clj/harja_laadunseuranta/tarkastusreittimuunnin/tarkastusreittimuunnin_test.clj | clojure | --------Liittyvät havainnot --------
Tasaisuus laskettu oikein
Tasaisuus laskettu oikein
Tasaisuus laskettu oikein
Tasaisuus laskettu oikein
Tasaisuus laskettu oikein
Tasaisuus laskettu oikein
Tasaisuus laskettu oikein
-------- Ympärikääntyminen --------
"))]
Määrä lisääntyi oikein
Ja geometria
-------- Apu... | (ns harja-laadunseuranta.tarkastusreittimuunnin.tarkastusreittimuunnin-test
(:require [clojure.test :refer :all]
[harja
[pvm :as pvm]
[testi :refer :all]]
[harja-laadunseuranta.core :as ls-core]
[harja-laadunseuranta.tarkastusreittimuunnin.tarkastusreittim... |
0aa1906d4c51865183cd0e04c111d27e2e7d3ad3dc28ec4c4532a63c0d112502 | racket/typed-racket | info.rkt | #lang info
(define collection 'multi)
(define deps '("srfi-lite-lib"
"base"
"net-lib"
"net-cookies-lib"
["web-server-lib" #:version "1.6"]
["db-lib" #:version "1.5"]
"draw-lib"
"rackunit-lib"
"racku... | null | https://raw.githubusercontent.com/racket/typed-racket/dd4f373a8bc500a0eacbd1c30c7c3ba55cbd83ec/typed-racket-more/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("srfi-lite-lib"
"base"
"net-lib"
"net-cookies-lib"
["web-server-lib" #:version "1.6"]
["db-lib" #:version "1.5"]
"draw-lib"
"rackunit-lib"
"racku... | |
1a3773eb52faedef975e7993130e46cc179fd4e92fc15ca07f7db5c367a4734e | mistupv/cauder-core | dining_ex.erl | -module(dining_ex).
-export([main/0, waiter/0, fork/1, philo/2]).
main() ->
spawn(?MODULE, waiter, []).
spawn_forks(0, Dict) ->
Dict;
spawn_forks(N, Dict) ->
Pair = {N, spawn(?MODULE, fork, [free])},
spawn_forks(N-1, [Pair] ++ Dict).
spawn_philos(0, Dict, _) ->
Dict;
spawn_philos(N, Dict, Pid) ->
Pair = ... | null | https://raw.githubusercontent.com/mistupv/cauder-core/b676fccd1bbd629eb63f3cb5259f7a9a8c6da899/examples/dining_ex.erl | erlang | -module(dining_ex).
-export([main/0, waiter/0, fork/1, philo/2]).
main() ->
spawn(?MODULE, waiter, []).
spawn_forks(0, Dict) ->
Dict;
spawn_forks(N, Dict) ->
Pair = {N, spawn(?MODULE, fork, [free])},
spawn_forks(N-1, [Pair] ++ Dict).
spawn_philos(0, Dict, _) ->
Dict;
spawn_philos(N, Dict, Pid) ->
Pair = ... | |
87fa0b20b9feae9974f77134bba2e8da9e83efe0b1bde44203b899ac5dd6b342 | bcc32/advent-of-code | main.ml | open! Core
open! Async
open! Import
let input =
Lazy_deferred.create (fun () ->
Reader.file_contents "input.txt" >>| Yojson.Basic.from_string)
;;
let rec sum_nums json =
match (json : Yojson.Basic.t) with
| `Bool _ -> 0.
| `Null -> 0.
| `Assoc kvs -> List.sum (module Float) kvs ~f:(fun (_, x) -> sum_num... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2015/day_12/main.ml | ocaml | open! Core
open! Async
open! Import
let input =
Lazy_deferred.create (fun () ->
Reader.file_contents "input.txt" >>| Yojson.Basic.from_string)
;;
let rec sum_nums json =
match (json : Yojson.Basic.t) with
| `Bool _ -> 0.
| `Null -> 0.
| `Assoc kvs -> List.sum (module Float) kvs ~f:(fun (_, x) -> sum_num... | |
4a958e914371e97bc44aeca5beb7d6ed9d5ac8d878baf5e6375977d4f9e2b5e6 | SimulaVR/godot-haskell | SceneTreeTimer.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.SceneTreeTimer
(Godot.Core.SceneTreeTimer.sig_timeou... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/SceneTreeTimer.hs | haskell | | Emitted when the timer reaches 0.
| The time remaining.
| The time remaining.
| The time remaining.
| The time remaining. | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.SceneTreeTimer
(Godot.Core.SceneTreeTimer.sig_timeou... |
94d331be7ca0eeb79d3c610ddf3600c1f1705ebb82d75525652a9d50a0ce44c4 | facebook/infer | bufferOverrunModels.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/719120d731022b3ca90e70b2372f48ad3f841fcb/infer/src/bufferoverrun/bufferOverrunModels.mli | ocaml | Type of abstract semantic function of execution
Type of checking function
* Create a collection value with the [length] and assign it to [ret]
* Evaluate length of ObjC collection
* Construct Java string from constant string |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
0f38bc45bd5af699b278790a57c9761213cf3683c80d0e8222fba966db998f0f | yangchenyun/learning-sicp | ps2tw1.scm | Scheme code for Twenty - One Simulator [ PS2 Fall ' 90 ]
(define (twenty-one player-strategy house-strategy)
(let ((house-initial-hand (make-new-hand (deal))))
(let ((player-hand
(play-hand player-strategy
(make-new-hand (deal))
(hand-up-card house-initial... | null | https://raw.githubusercontent.com/yangchenyun/learning-sicp/99a19a06eddc282e0eb364536e297f27c32a9145/practices/assignments/02.the-game-of-twenty-one/ps2tw1.scm | scheme | ``bust'': player loses
``bust'': house loses
house loses
player loses
I lose... give up
hit?
stay | Scheme code for Twenty - One Simulator [ PS2 Fall ' 90 ]
(define (twenty-one player-strategy house-strategy)
(let ((house-initial-hand (make-new-hand (deal))))
(let ((player-hand
(play-hand player-strategy
(make-new-hand (deal))
(hand-up-card house-initial... |
49248fdac8c702565f301b4741a0f305ca6e14a1b6da3845d9a0adf25bcd7622 | mirleft/ocaml-tls | unittests.ml | open OUnit2
let suite =
"All" >::: [
"Reader" >::: Readertests.reader_tests ;
"Writer" >::: Writertests.writer_tests ;
"ReaderWriter" >::: Readerwritertests.readerwriter_tests ;
]
| null | https://raw.githubusercontent.com/mirleft/ocaml-tls/1e308436ac8f61fc666732ef7a996c08f9bbb8d4/tests/unittests.ml | ocaml | open OUnit2
let suite =
"All" >::: [
"Reader" >::: Readertests.reader_tests ;
"Writer" >::: Writertests.writer_tests ;
"ReaderWriter" >::: Readerwritertests.readerwriter_tests ;
]
| |
271f9e9f59155e37d04899fe2ff88c64ef553c927dda02a9aa840d7f6e32b1c0 | tatut/re-html-template | view.cljc | (ns todomvc.view
(:require #?(:clj [re-html-template.core :refer [define-html-template]])
#?(:clj [clojure.java.io :as io])
#?(:cljs [todomvc.events :as events]))
#?(:cljs (:require-macros [re-html-template.core :refer [define-html-template]])))
(defn filtered-todos
"Return todos based on... | null | https://raw.githubusercontent.com/tatut/re-html-template/d1aa45b4df32ec79531f7937b6726074166183f8/todomvc/src/cljc/todomvc/view.cljc | clojure | Extract the template body
Add handlers to add new todo
Subtle render vs react difference in checkbox value
Set footer item count
Handle filters
Add clear completed handler
This renders the full HTML file on the backend
For simplicity, just include the CSS in the html header
Also add serialized app state
Add f... | (ns todomvc.view
(:require #?(:clj [re-html-template.core :refer [define-html-template]])
#?(:clj [clojure.java.io :as io])
#?(:cljs [todomvc.events :as events]))
#?(:cljs (:require-macros [re-html-template.core :refer [define-html-template]])))
(defn filtered-todos
"Return todos based on... |
d0250bda266b40526556cfa6ec738fa8566a5fb58888daf9835c8fb52b4e2bf1 | 4clojure/4clojure | template.clj | (ns foreclojure.template
(:require [noir.session :as session])
(:use [hiccup.core :only [html]]
[hiccup.page :only [doctype]]
[hiccup.element :only [javascript-tag link-to]]
[foreclojure.config :only [config repo-ur... | null | https://raw.githubusercontent.com/4clojure/4clojure/25dec057d9d6871ce52aee9e2c3de7efdab14373/src/foreclojure/template.clj | clojure | Global wrapping template
deserves its own page, but just make it discoverable for now
ga.async = true ;
s.parentNode.insertBefore(ga, s);
" | (ns foreclojure.template
(:require [noir.session :as session])
(:use [hiccup.core :only [html]]
[hiccup.page :only [doctype]]
[hiccup.element :only [javascript-tag link-to]]
[foreclojure.config :only [config repo-ur... |
cbe165f9f905f4d49640b3e18cc8c41f240e9003910fae16ee5e166f592d1e02 | gootik/hakisql | hakisql_sup.erl | -module(hakisql_sup).
-behaviour(supervisor).
-export([
start_link/0,
init/1
]).
-spec start_link() -> {ok, pid()} | {error, any()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-spec init(list()) -> {ok, {supervisor:sup_flags(), [supervisor:child_spec()]}}.
init([]) ->
SupF... | null | https://raw.githubusercontent.com/gootik/hakisql/4808a94383cf868df34afff47060bc4abb2cd986/src/hakisql_sup.erl | erlang | -module(hakisql_sup).
-behaviour(supervisor).
-export([
start_link/0,
init/1
]).
-spec start_link() -> {ok, pid()} | {error, any()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-spec init(list()) -> {ok, {supervisor:sup_flags(), [supervisor:child_spec()]}}.
init([]) ->
SupF... | |
f6b8868b5f72e36a82a2e21b954bdfd053c3c97d6d949c9d535f45d1f134bb10 | jordwalke/rehp | match_with_exn.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2017 Hugo Heuzard
* Copyright ( C ) 2019
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/compiler/tests/match_with_exn.ml | ocaml |
Make sure that [a] doesn't look constant
* match .. with exception is no compiled properly | Js_of_ocaml compiler
* /
* Copyright ( C ) 2017 Hugo Heuzard
* Copyright ( C ) 2019
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
... |
55cd86a2b389fffbf141cec3a6c323e5641182f682d948c1361e4fa50c57026a | fragnix/fragnix | System.Random.hs | # LANGUAGE Haskell98 , CPP #
# LINE 1 " System / Random.hs " #
# LANGUAGE Trustworthy #
-----------------------------------------------------------------------------
-- |
-- Module : System.Random
Copyright : ( c ) The University of Glasgow 2001
-- License ... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/application/System.Random.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.Random
License : BSD-style (see the file LICENSE in the 'random' repository)
Maintainer :
Stability : stable
Portability : portable
This library deals with the common task of pseudo-random number
g... | # LANGUAGE Haskell98 , CPP #
# LINE 1 " System / Random.hs " #
# LANGUAGE Trustworthy #
Copyright : ( c ) The University of Glasgow 2001
The library is split into two layers :
The class ' RandomGen ' provides a common interface to such generators .
The ... |
ae513d5d9ca74e260b5ea37ef56692658d7cd38ae39c20b8d2c6af64d5e291ce | CRogers/obc | yyparse.mli |
* yyparse.mli
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistribution... | null | https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/yacc/yyparse.mli | ocaml | semantic actions, indexed by rule
ids for constant tokens
ids for tokens with arguments
length of rhs for each rule
base of action row for each state
default action for each state
default goto for each state
size of parser table
packed action and goto rows
check table
error handler
name of each t... |
* yyparse.mli
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistribution... |
1798650d884d8e77fbeb2b875f44f47b664958887e2982a9516dcd0dea1380e9 | mfoemmel/erlang-otp | sasl.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/sasl/src/sasl.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 "
-module(sasl).
-export([start/2, stop/1]).... |
aba7d3a497c04666bd58ff18caade3139af297af3bdb09c2187246d3c3a20977 | hercules-ci/hercules-ci-agent | EnvironmentInfo.hs | # LANGUAGE ScopedTypeVariables #
module Hercules.Agent.EnvironmentInfo where
import qualified Data.ByteString as BS
import qualified Data.Set as S
import qualified Data.Text as T
import qualified Hercules.API.Agent.LifeCycle.AgentInfo as AgentInfo
import Hercules.Agent.CabalInfo as CabalInfo
import Hercules.Agent.Cac... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/ff5ab7f4db65a339849d91120c6028a5d2f13e34/hercules-ci-agent/hercules-ci-agent/Hercules/Agent/EnvironmentInfo.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Hercules.Agent.EnvironmentInfo where
import qualified Data.ByteString as BS
import qualified Data.Set as S
import qualified Data.Text as T
import qualified Hercules.API.Agent.LifeCycle.AgentInfo as AgentInfo
import Hercules.Agent.CabalInfo as CabalInfo
import Hercules.Agent.Cac... | |
18a4fd85c4d5421c4302c8597ad3ea6c34ddcaf7b0a571033bd48f571b66c137 | DKurilo/hackerrank | solution.hs | # LANGUAGE UnicodeSyntax #
module Main where
import Prelude.Unicode
import Control.Monad
import qualified Data.ByteString.Char8 as BSC
import Data.List (sort, nub)
import Data.List.Split (chunksOf)
import Data.Array
import Debug.Trace
import System.IO
type Polynom = [Bool]
data Convolution = C Int Int [Polynom]
ne... | null | https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/convolutional-coding/solution.hs | haskell | Or even to use wrong character...
BSC.putStrLn ∘ BSC.pack ∘ show $ dec | # LANGUAGE UnicodeSyntax #
module Main where
import Prelude.Unicode
import Control.Monad
import qualified Data.ByteString.Char8 as BSC
import Data.List (sort, nub)
import Data.List.Split (chunksOf)
import Data.Array
import Debug.Trace
import System.IO
type Polynom = [Bool]
data Convolution = C Int Int [Polynom]
ne... |
7be0e79923b735bd07e57811c40be9f4471c857cb7d055f8f8ea60f931808d26 | haskell-repa/repa | Main.hs | # LANGUAGE PatternGuards #
| Perform high pass filtering on a BMP image .
import Data.Array.Repa.Algorithms.FFT as R
import Data.Array.Repa.Algorithms.DFT.Center as R
import Data.Array.Repa.Algorithms.Complex as R
import Data.Array.Repa.IO.BMP as R
import Data.Array.Repa.IO.Timin... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-examples/examples/FFT/HighPass2d/src-repa/Main.hs | haskell | Load in the matrix.
Do the transform on each component individually
Write it back to file.
| Perform high-pass filtering on a rank-2 array.
Do the 2d transform.
Zap out the low frequency components.
Do the inverse transform to get back to image space.
Get the magnitude of the transformed array, | # LANGUAGE PatternGuards #
| Perform high pass filtering on a BMP image .
import Data.Array.Repa.Algorithms.FFT as R
import Data.Array.Repa.Algorithms.DFT.Center as R
import Data.Array.Repa.Algorithms.Complex as R
import Data.Array.Repa.IO.BMP as R
import Data.Array.Repa.IO.Timin... |
e07137e8fa717cb00b30831275289518fafe25eb5fbbed01029a5b7d75f07c00 | yallop/ocaml-ctypes | ctypes_std_view_stubs.ml |
* Copyright ( c ) 2013 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2013 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
(* Stubs for standard views. ... | null | https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/src/ctypes/ctypes_std_view_stubs.ml | ocaml | Stubs for standard views.
Convert a C string to an OCaml string
Convert an OCaml string to a C string
Size information for ptrdiff_t |
* Copyright ( c ) 2013 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2013 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
external string_of_cstring :... |
f2861a368434377411a0da8b25906e055e33ea2ea723ec2fd889d38f64e3365f | oshyshko/adventofcode | Days.hs | # LANGUAGE TemplateHaskell #
{-# OPTIONS_GHC -Wunused-imports #-}
module Days where
import qualified Y15.D01
import qualified Y15.D02
import qualified Y15.D03
import qualified Y15.D04
import qualified Y15.D05
import qualified Y15.D06
import qualified Y15.D07
import qualified Y15.D08
import qualified Y15.D09
import qua... | null | https://raw.githubusercontent.com/oshyshko/adventofcode/e1a623d2359087cd19818440e05723b24a226d31/src.exe/Days.hs | haskell | # OPTIONS_GHC -Wunused-imports # | # LANGUAGE TemplateHaskell #
module Days where
import qualified Y15.D01
import qualified Y15.D02
import qualified Y15.D03
import qualified Y15.D04
import qualified Y15.D05
import qualified Y15.D06
import qualified Y15.D07
import qualified Y15.D08
import qualified Y15.D09
import qualified Y15.D10
import qualified Y15.D... |
74c86ae1e660e5c19094ed06c4ee153bfc30efd100113209972c460209a53b6f | karlhof26/gimp-scheme | goode-letter-drop.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Letter Drop script for GIMP 2.4
Original author :
;
; Tags: animation
;
; Author statement:
Based on the PERL plug - in " Impact Letters " by
;
; --------------------------------------------------------------------
Distributed by ... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/95e0f37847c43b326f7f56d899f86e33c950d150/goode-letter-drop.scm | scheme |
The GIMP -- an image manipulation program
Tags: animation
Author statement:
--------------------------------------------------------------------
--------------------------------------------------------------------
- Changelog -
--------------------------------------------------------------------
Th... | Copyright ( C ) 1995 and
Letter Drop script for GIMP 2.4
Original author :
Based on the PERL plug - in " Impact Letters " by
Distributed by Gimp FX Foundry project
19.12.2007 - Added support for transparent background - Alexia Death
it under the terms of the GNU General Public License as publishe... |
e0a95364f0ecc837dbb3409b0398fd749dfb497a80635629eb52772ecbdc446f | fluree/ledger | garbage_collect.clj | (ns fluree.db.ledger.garbage-collect
(:require [clojure.core.async :refer [go]]
[fluree.db.storage.core :as storage]
[fluree.db.util.log :as log]
[fluree.db.util.async :refer [go-try <?]]
[fluree.db.ledger.txgroup.txgroup-proto :as txproto]))
(set! *warn-on-reflection*... | null | https://raw.githubusercontent.com/fluree/ledger/2b7819f38c6d9f8347028e4458fb8a301a3d9a35/src/fluree/db/ledger/garbage_collect.clj | clojure | takes care of garbage collection for a db.
remove db-root
remove all index segments that were garbage collected
remove garbage file
remove current index point
nothing to garbage collect
make sure from-block is smallest number
remove current index point | (ns fluree.db.ledger.garbage-collect
(:require [clojure.core.async :refer [go]]
[fluree.db.storage.core :as storage]
[fluree.db.util.log :as log]
[fluree.db.util.async :refer [go-try <?]]
[fluree.db.ledger.txgroup.txgroup-proto :as txproto]))
(set! *warn-on-reflection*... |
a94f34be82893d38b7f0a2d8550e98c7acdfc71e5016a331403fd477050984d6 | con-kitty/categorifier-c | KTypeRep.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
| Lightweight wrapper around ' TypeRep ' that lets us filter out unwanted parts .
-- Due to dependency loops we are filtering out C
-- by string processing :(.
I tried it the " right way " way at first , filtering out C by comparing to
@typeRep ( Proxy ... | null | https://raw.githubusercontent.com/con-kitty/categorifier-c/a34ff2603529b4da7ad6ffe681dad095f102d1b9/Categorifier/C/CTypes/KTypeRep.hs | haskell | # LANGUAGE OverloadedStrings #
Due to dependency loops we are filtering out C
by string processing :(.
recursive data types like trees later.
We can't use their representation because we need to do some unsafe stripping
| For minor introspection.
TODO(greg): clean up code duplication
C just disappears
C a -> a
... | # LANGUAGE QuasiQuotes #
| Lightweight wrapper around ' TypeRep ' that lets us filter out unwanted parts .
I tried it the " right way " way at first , filtering out C by comparing to
@typeRep ( Proxy , but when you do n't construct
this greedily when you make a CxxType , it leads to difficulties when processi... |
caf45765e10de951e4259d027d74fdb19d167d6b0be7ba04ec1a631e2fcc27cd | lemmaandrew/CodingBatHaskell | sameStarChar.hs | {- From
Returns true if for every '*' (star) in the string, if there are chars both immediately
before and after the star, they are the same.
-}
import Test.Hspec ( hspec, describe, it, shouldBe )
sameStarChar :: String -> Bool
sameStarChar str = undefined
main :: IO ()
main = hspec $ describe "Tests:" $ do
i... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-2/sameStarChar.hs | haskell | From
Returns true if for every '*' (star) in the string, if there are chars both immediately
before and after the star, they are the same.
| import Test.Hspec ( hspec, describe, it, shouldBe )
sameStarChar :: String -> Bool
sameStarChar str = undefined
main :: IO ()
main = hspec $ describe "Tests:" $ do
it "True" $
sameStarChar "xy*yzz" `shouldBe` True
it "False" $
sameStarChar "xy*zzz" `shouldBe` False
it "True" $
sa... |
6726ae8bcee0ee2ce5eda48ddc4b59f467527729066a5131443497bbf5da2623 | Leberwurscht/Diaspora-User-Directory | fixkey.ml | (************************************************************************)
This file is part of SKS . SKS 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 (... | null | https://raw.githubusercontent.com/Leberwurscht/Diaspora-User-Directory/1ca4a06a67d591760516edffddb0308b86b6314c/trie_manager/fixkey.ml | ocaml | **********************************************************************
*********************************************************************
********************************************************************
** Key Merging ***************************************************
*****************************************... | This file is part of SKS . SKS 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 .
This program is distributed in ... |
8c03af5e3bc99c67dc3a5bec787aac5e70bf7da89bbcb1d07c5f4ca3de21aaea | robert-strandh/Spell | spell.lisp | (defpackage #:spell
(:use #:cl)
(:export #:english-lookup
#:english-check-paragraph))
(in-package #:spell)
(defgeneric lookup (string dictionary))
(defgeneric insert (object string dictionary))
(defclass node () ())
(defmethod make-load-form ((object node) &optional environment)
(make-load-form-savi... | null | https://raw.githubusercontent.com/robert-strandh/Spell/d2ae9489d53ad1618ad887824f7d93be08118098/spell.lisp | lisp | (aref line 0)) | (defpackage #:spell
(:use #:cl)
(:export #:english-lookup
#:english-check-paragraph))
(in-package #:spell)
(defgeneric lookup (string dictionary))
(defgeneric insert (object string dictionary))
(defclass node () ())
(defmethod make-load-form ((object node) &optional environment)
(make-load-form-savi... |
eff318add8ce301d2ba317bc7445b77451254bca33059d1d80c54609f4392d19 | dnadales/sandbox | ExercisesFoldable.hs | -- |
module ExercisesFoldable where
| null | https://raw.githubusercontent.com/dnadales/sandbox/401c4f0fac5f8044fb6e2e443bacddce6f135b4b/my-typeclassopedia/my-typeclassopedia-haskell/src/ExercisesFoldable.hs | haskell | | |
module ExercisesFoldable where
|
4f54f7babc36d42c3178f7d78e23a458ca78eb538b13d85b2ce67c7f41d9b81e | maxlibin/ParentalJobs | jobs_bs.mli | (* Auto-generated from "jobs.atd" *)
[@@@ocaml.warning "-27-32-35-39"]
type salary = Jobs_t.salary = {
salaryFrom: string;
salaryTo: string;
salaryType: string
}
type jobOverview = Jobs_t.jobOverview = {
_id: string;
company: string;
jobTitle: string;
employmentType: string;
seniority: s... | null | https://raw.githubusercontent.com/maxlibin/ParentalJobs/0657b405051aa4d5112760eff769f75f2e4c40dd/packages/frontend/src/types/jobs_bs.mli | ocaml | Auto-generated from "jobs.atd" | [@@@ocaml.warning "-27-32-35-39"]
type salary = Jobs_t.salary = {
salaryFrom: string;
salaryTo: string;
salaryType: string
}
type jobOverview = Jobs_t.jobOverview = {
_id: string;
company: string;
jobTitle: string;
employmentType: string;
seniority: string;
minExperience: string;
job... |
e6a9ba6f6876a445f71c24fa1854c815e40c57f500cf5fba9a8c1bc8259898c4 | mirage/ocaml-cohttp | cohttp_server_lwt.ml | { { { Copyright ( c ) 2014 < >
* Copyright ( c ) 2014 Anil Madhavapeddy < >
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission no... | null | https://raw.githubusercontent.com/mirage/ocaml-cohttp/938c8084214b1997f5f66d51eacde75da3508315/cohttp-lwt-unix/bin/cohttp_server_lwt.ml | ocaml | Log the request to the console | { { { Copyright ( c ) 2014 < >
* Copyright ( c ) 2014 Anil Madhavapeddy < >
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission no... |
66f8f0e8c833c98661fedca6c48996ea7045c462d6a5f3f306e454d3c4e22527 | bobbae/gosling-emacs | exec.ml | ; From israel.umcp-cs@UDel-Relay Tue Feb 1 03:05:33 1983
; Received: from CMU-CS-A by UTAH-20; Tue 1 Feb 83 03:00:37-MST
; Received: from UDEL-RELAY by CMU-CS-PT; 1 Feb 83 03:30:07 EST
; Return-Path: <israel.umcp-cs@UDel-Relay>
; Date: 31 Jan 83 23:18:37 EST (Mon)
; From: Bruce Israel <israel.umcp-cs@UDel-Relay>... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/utah/exec.ml | ocaml | ; From israel.umcp-cs@UDel-Relay Tue Feb 1 03:05:33 1983
; Received: from CMU-CS-A by UTAH-20; Tue 1 Feb 83 03:00:37-MST
; Received: from UDEL-RELAY by CMU-CS-PT; 1 Feb 83 03:30:07 EST
; Return-Path: <israel.umcp-cs@UDel-Relay>
; Date: 31 Jan 83 23:18:37 EST (Mon)
; From: Bruce Israel <israel.umcp-cs@UDel-Relay>... | |
cc153f6e4c38ad3bdd3db3212bfbb2a39acb6402f50f9bc8d7abdc84b7ac6861 | himura/persistent-relational-record | Query.hs | # LANGUAGE OverloadedLabels #
module Query where
import Data.Text (Text)
import Database.Persist (Entity)
import Database.Relational
import Model
selectUserByUserGroupNameList
:: Bool -- ^ match any
-> [Text] -- ^ list of userGroup name
-> Relation () (Entity User)
selectUserByUserGroupNameList matchAny... | null | https://raw.githubusercontent.com/himura/persistent-relational-record/fcbadcb10b6efc0fe413a0dab7cb9b7e103355d8/examples/Query.hs | haskell | ^ match any
^ list of userGroup name
^ query user_id by userGroup name list
@
SELECT
user_id
FROM membership
INNER JOIN user_group ON user_group.id = membership.user_group_id
WHERE user_group.name IN (<<UserGroupNames>>)
GROUP BY membership.user_id
HAVING COUNT(membership.user_group_id) = <<length UserGro... | # LANGUAGE OverloadedLabels #
module Query where
import Data.Text (Text)
import Database.Persist (Entity)
import Database.Relational
import Model
selectUserByUserGroupNameList
-> Relation () (Entity User)
selectUserByUserGroupNameList matchAny userGroupNames =
relation $ do
user <- query userTable
... |
0d2929141315938c2a3aaf820d40c0a2082cd6572c30102d28fbf0a745b32718 | braveclojure/training | s12_java_interop.clj | (ns training.solutions.s12-java-interop)
(.indexOf "some string" "str")
| null | https://raw.githubusercontent.com/braveclojure/training/5b7fb9059c17b2166c2e66850094f424319e55eb/exercises/src/training/solutions/s12_java_interop.clj | clojure | (ns training.solutions.s12-java-interop)
(.indexOf "some string" "str")
| |
2b998437716b3511f70e1393ff20fc6a12700f2ed44f2736d31ec13a57386dc1 | autolwe/autolwe | ParserTypes.ml | (* * Types for parser *)
(* ** Imports and abbreviations *)
open Game
open Syms
open Assumption
open Util
(* ** Types for parsed types, expressions, and games
* ----------------------------------------------------------------------- *)
type parsedim =
| PDBase of string
| PDPlus of parsedim * parsedim
type pars... | null | https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Parser/ParserTypes.ml | ocaml | * Types for parser
** Imports and abbreviations
** Types for parsed types, expressions, and games
* -----------------------------------------------------------------------
** Types for parsed proof scripts and tactics
* ----------------------------------------------------------------------- |
open Game
open Syms
open Assumption
open Util
type parsedim =
| PDBase of string
| PDPlus of parsedim * parsedim
type parse_ty =
| Bool
| Fq
| BS of string
| Mat of parsedim * parsedim
| List of parsedim * parse_ty
| G of string
| TySym of string
| Prod of parse_ty list
le... |
113e9ead11a03b559039d0f568d6c0c145ec4b7204c2328974016a4a9d44d6f2 | GillianPlatform/Gillian | Val.ml | (** Interface for GIL Values *)
module type S = sig
(** Type of GIL values *)
type t [@@deriving yojson]
(** Type of substitutions for GIL values *)
type st
(** Type of extended substitutions for GIL values *)
type et
val equal : t -> t -> bool
(** Printer *)
val pp : Format.formatter -> t -> unit... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/894645bfe5027228f2f74ef3a2f7b26533014588/GillianCore/engine/GeneralSemantics/Val.ml | ocaml | * Interface for GIL Values
* Type of GIL values
* Type of substitutions for GIL values
* Type of extended substitutions for GIL values
* Printer
* Convert a value to a literal, if possible
* Convert a literal to a value, always possible
* Convert a value to a logical expression, always possible
* Converts a log... | module type S = sig
type t [@@deriving yojson]
type st
type et
val equal : t -> t -> bool
val pp : Format.formatter -> t -> unit
val full_pp : Format.formatter -> t -> unit
val full_pp_list : Format.formatter -> t list -> unit
val to_literal : t -> Literal.t option
val from_literal : Literal.t ... |
5f68454c651f740949e42bfb707f8b8210d95b23c71b6ecec91d350ca536b0eb | wrengr/bytestring-trie | ByteString.hs | {-# OPTIONS_GHC -Wall -fwarn-tabs #-}
{-# OPTIONS_HADDOCK hide #-}
# LANGUAGE CPP , BangPatterns #
#if __GLASGOW_HASKELL__ >= 701
-- Neither 'unsafeDupablePerformIO' nor 'Data.ByteString.Internal' is safe.
# LANGUAGE Trustworthy #
#endif
------------------------------------------------------------
-- ... | null | https://raw.githubusercontent.com/wrengr/bytestring-trie/a5cf8a715f6608a66232a596f1c50d9043a24cdd/src/Data/Trie/Internal/ByteString.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
# OPTIONS_HADDOCK hide #
Neither 'unsafeDupablePerformIO' nor 'Data.ByteString.Internal' is safe.
----------------------------------------------------------
~ 2022.02.27
|
License : BSD-3-Clause
Maintainer :
Stability : stab... | # LANGUAGE CPP , BangPatterns #
#if __GLASGOW_HASKELL__ >= 701
# LANGUAGE Trustworthy #
#endif
Module : Data . Trie . Internal . ByteString
Copyright : 2008 - -2022 wren romano
Portability : GHC - only
Helper functions on ' ByteString 's for " Data . Trie . Internal " .
module Data.Trie.Internal... |
f8d08083522dcb2d73f093cbaa16dbf757072515b199d645e3d6014bd45c7fb6 | helium/blockchain-core | path_v2_eqc.erl | -module(path_v2_eqc).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([prop_path_check/0]).
prop_path_check() ->
?FORALL({Hash, ChallengerIndex, PathLimit},
{gen_hash(), gen_challenger_index(), gen_path_limit()},
begin
Ledger = ledger(... | null | https://raw.githubusercontent.com/helium/blockchain-core/9011de7537ecfd737074b85b7b16e7d8e1ceef00/eqc/path_v2_eqc.erl | erlang | true ->
false ->
end,
Checks:
- honor path limit
- atleast one element in path
- target is always in path
- we never go back to the same h3 index in path
- check next hop is a witness of previous gateway
Ensure priv dir exists
Path to static ledger tar
ledger tar file present, extract
ledger tar fi... | -module(path_v2_eqc).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([prop_path_check/0]).
prop_path_check() ->
?FORALL({Hash, ChallengerIndex, PathLimit},
{gen_hash(), gen_challenger_index(), gen_path_limit()},
begin
Ledger = ledger(... |
8e2e7cb5a3c5892c7ae532dd5866e764357ada5a52cc6392e3a6b3ae9b83e2e3 | exoscale/seql | tree.clj | (ns ^:no-doc seql.tree
"Facilities to build trees of records based on a supplied
EQL field expression. This is exists because even though
LEFT JOIN queries build ad-hoc trees of data, a flat
(potentially unsorted!) list of records is what SQL will
give. The `build` function builds back the tree."
(:requ... | null | https://raw.githubusercontent.com/exoscale/seql/7142132a5c364baf201936052095589489320e99/src/seql/tree.clj | clojure | - `walk-tree` which groups records together
- `add-relation-fn` which builds a closure to add further
nest fields belonging to relations | (ns ^:no-doc seql.tree
"Facilities to build trees of records based on a supplied
EQL field expression. This is exists because even though
LEFT JOIN queries build ad-hoc trees of data, a flat
(potentially unsorted!) list of records is what SQL will
give. The `build` function builds back the tree."
(:requ... |
e7f5ba0df204ec795f2ef7815e1e55f81503f050b013585476d7b9a6971b8c98 | patricoferris/ocaml-multicore-monorepo | frame.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/vendor/h2/lib/frame.ml | ocaml | From RFC7540§6.1:
* DATA frames (type=0x0) convey arbitrary, variable-length sequences
* of octets associated with a stream.
From RFC7540§6.2:
* The HEADERS frame (type=0x1) is used to open a stream (Section 5.1),
* and additionally carries a header block fragment.
From RFC7540§6.3:
... | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... |
e8d8becb4d30d36bb1cf8b9d168fc6a9d7892ce3b581f2bf08f5d8fa7a14ccbb | cs136/seashell | seashell-cli.rkt | #lang typed/racket
(require seashell-cli/marmtest
seashell-cli/run
seashell-cli/object
seashell-cli/export
seashell-cli/import
seashell/log)
(: tools (HashTable String (List (-> (Listof String) Void) String)))
(define tools `#hash(("marmtest" . (,marmtest-main "Marmoset te... | null | https://raw.githubusercontent.com/cs136/seashell/17cc2b0a6d2cdac270d7168e03aa5fed88f9eb02/src/collects/seashell-cli/seashell-cli.rkt | racket | main program execution begins here
invoke main method for tool | #lang typed/racket
(require seashell-cli/marmtest
seashell-cli/run
seashell-cli/object
seashell-cli/export
seashell-cli/import
seashell/log)
(: tools (HashTable String (List (-> (Listof String) Void) String)))
(define tools `#hash(("marmtest" . (,marmtest-main "Marmoset te... |
0f00a355a21165aad7c5a1e48ff79d7b3a78ff45322141e9604af857e1ad154a | fujita-y/ypsilon | build-boot-fasl.scm | #!core
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
;;; See LICENSE file for terms and conditions of use.
(begin
(import (core primitives)
(core destructuring)
(core optimize)
(core parameters)
(core io)
(core files))
(define put... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/44260d99e24000f9847e79c94826c3d9b76872c2/heap/build-boot-fasl.scm | scheme | See LICENSE file for terms and conditions of use.
[end] | #!core
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
(begin
(import (core primitives)
(core destructuring)
(core optimize)
(core parameters)
(core io)
(core files))
(define put-fasl (parameterize ((current-environment (system-envi... |
e12a41f9e1987226558a56b1485b81bea0a23846e525792fbdae62d905fef53a | travelping/ergw | vrf.erl | Copyright 2016 , Travelping GmbH < >
%% 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 .
-module(vrf).
%%-compil... | null | https://raw.githubusercontent.com/travelping/ergw/1b6cc3ee89eea4cf9df1d7de612744f0a850dfd9/apps/ergw_core/src/vrf.erl | erlang | This program is free software; you can redistribute it and/or
-compile({parse_transform, cut}).
API
===================================================================
Options Validation
===================================================================
printable_name(Name) when is_binary(Name) ->
L = [ Part ... | Copyright 2016 , Travelping GmbH < >
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 .
-module(vrf).
-export([validate_name/1, normalize_name/1]).
-include_lib("kernel/inclu... |
bf7dd2b4c3f590e4bce620b989b6569400b2baebcd52e414421d398097efdad8 | elsys/fp-haskell | Permutations.hs | module Permutations where
import Data.List hiding (permutations)
permutations :: [Int] -> [[Int]]
permutations = undefined
| null | https://raw.githubusercontent.com/elsys/fp-haskell/9a2d0cf8b99739c4fee21dc2e2d142de8e87df73/exercises/permutations/Permutations.hs | haskell | module Permutations where
import Data.List hiding (permutations)
permutations :: [Int] -> [[Int]]
permutations = undefined
| |
becd334c9e19b88b47834f36a69ad9e4bd2008409460529e5d3940efbc522871 | logicmoo/wam_common_lisp | combin.lisp | -*-Mode : LISP ; Package : PCL ; ; Syntax : Common - lisp -*-
;;;
;;; *************************************************************************
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
;;; All rights reserved.
;;;
;;; Use and copying of this software and preparation of derivative w... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/pcl/combin.lisp | lisp | Package : PCL ; ; Syntax : Common - lisp -*-
*************************************************************************
All rights reserved.
Use and copying of this software and preparation of derivative works
based upon this software are permitted. Any distribution of this
States export control laws.
warra... | Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
software or derivative works must comply with all applicable United
This software is made available AS IS , and Xerox Corporation makes no
CommonLoops Coordinator
Xerox PARC
3333 Coyote Hill Rd .
Palo Alto , CA 94304
( o... |
38d1364e5289e37826ae6e7369f5ca4a1414d5b60d477f92b7bae1fef2bf6c1e | mjul/zeromq-tutorial | core.clj | (ns com.mjul.zeromq-tutorial.core
(:use [clojure.contrib.json])
(:require [org.zeromq.clojure :as zmq]))
(defn serialize [x]
(-> x json-str .getBytes))
(defn deserialize [x]
(-> x String. read-json))
(defn make-context []
(zmq/make-context 1))
(defn make-socket [ctx socket-type]
(zmq/make-socket ctx
... | null | https://raw.githubusercontent.com/mjul/zeromq-tutorial/6744a7eb5d66fb1cabb13b838e717ec5775af8ee/src/com/mjul/zeromq_tutorial/core.clj | clojure | Each exchange is a pair of messages between the client and server: a request and a reply.
This pattern is useful for async communication or for distributing commands to worker processes. | (ns com.mjul.zeromq-tutorial.core
(:use [clojure.contrib.json])
(:require [org.zeromq.clojure :as zmq]))
(defn serialize [x]
(-> x json-str .getBytes))
(defn deserialize [x]
(-> x String. read-json))
(defn make-context []
(zmq/make-context 1))
(defn make-socket [ctx socket-type]
(zmq/make-socket ctx
... |
5e466f66e9da34f26cebba5d8f19ce101d1a15eaad8d909a29bc896d0c672e04 | ailisp/Graphic-Forms | system-classes.lisp | (in-package :graphic-forms.uitoolkit.system)
(defclass native-object ()
((handle
:reader handle
:initarg :handle
:initform nil))
(:documentation "This is the base class for all objects that have a native handle representation at the system level."))
| null | https://raw.githubusercontent.com/ailisp/Graphic-Forms/1e0723d07e1e4e02b8ae375db8f3d65d1b444f11/src/uitoolkit/system/system-classes.lisp | lisp | (in-package :graphic-forms.uitoolkit.system)
(defclass native-object ()
((handle
:reader handle
:initarg :handle
:initform nil))
(:documentation "This is the base class for all objects that have a native handle representation at the system level."))
| |
352ceb6401c2f7cad8667979071a9644af3f2f4daadbd5856aeb0fd5c51eff88 | mindylou/legend-of-zolda | game.ml | open Types
open Command
open Sprites
(* js_of_ocaml helper declarations *)
module Html = Dom_html
let js = Js.string
let document = Html.document
(* initial state *)
let initial_state = {
all_sprites = [player; enemy2; enemy3; enemy4; enemy5; enemy6;
enemy7; enemy8; enemy9; enemy10; enemy12; enemy1... | null | https://raw.githubusercontent.com/mindylou/legend-of-zolda/1c0e7a4535c2c2361943a464b49963d6703a172a/game.ml | ocaml | js_of_ocaml helper declarations
initial state
mutable ref to store the current game state
other
other
the main game loop | open Types
open Command
open Sprites
module Html = Dom_html
let js = Js.string
let document = Html.document
let initial_state = {
all_sprites = [player; enemy2; enemy3; enemy4; enemy5; enemy6;
enemy7; enemy8; enemy9; enemy10; enemy12; enemy13; enemy14;
enemy15; enemy16; enemy17; en... |
aa60e749fa27c42a9e1bec2a1f1b0dda4b0ff100a86f7fb1b5a4e3978ae61a9c | arachne-framework/factui | api_reactive_test.cljc | (ns factui.api-reactive-test
(:require
#?(:cljs [factui.api :as api :include-macros true]
:clj [factui.api :as api])
#?(:clj [clara.rules.compiler :as com])
#?(:clj
[clara.rules :as cr]
:cljs [clara.rules :as cr :include-macros true])
[clojure.pprint :refer [pprint]]
#?(:clj [cloj... | null | https://raw.githubusercontent.com/arachne-framework/factui/818ea79d7f84dfe80ad23ade0b6b2ed5bb1c6287/test/factui/api_reactive_test.cljc | clojure | (ns factui.api-reactive-test
(:require
#?(:cljs [factui.api :as api :include-macros true]
:clj [factui.api :as api])
#?(:clj [clara.rules.compiler :as com])
#?(:clj
[clara.rules :as cr]
:cljs [clara.rules :as cr :include-macros true])
[clojure.pprint :refer [pprint]]
#?(:clj [cloj... | |
20a7de64d6e6a94b21679ce3b71793442be6d10f1098d33f62891b7fabc876e5 | UU-ComputerScience/uulib | Basic.hs | $ Header : /data / cvs - rep / uust / lib / pretty / UU / Pretty / Basic.hs , v 1.2 2003/02/26 11:18:27 uust Exp $
-- $Name: $ (version name)
module UU.Pretty.Basic ( PP (..), PP_Doc, PP_Exp
-- Single layout combinators
, empty, text, indent, (>|<), (>-<), fill , fillblock
... | null | https://raw.githubusercontent.com/UU-ComputerScience/uulib/68a5e661547908979545b493da3a55418ca5a6aa/src/UU/Pretty/Basic.hs | haskell | $Name: $ (version name)
Single layout combinators
Multiple layout combinators
Displaying the result
Additional generated combinators
Additional derived combinators
...................................................................
..... Interface definition ........................................
---------... | $ Header : /data / cvs - rep / uust / lib / pretty / UU / Pretty / Basic.hs , v 1.2 2003/02/26 11:18:27 uust Exp $
module UU.Pretty.Basic ( PP (..), PP_Doc, PP_Exp
, empty, text, indent, (>|<), (>-<), fill , fillblock
, (>//<), join, par, (>>$<)
, eindent, (>>|<<),... |
a921e55b427d1f88388e334856455ec2122be8df0c40f1972b3f7f9b2967d73b | chetmurthy/pa_ppx | hash.ml |
let hex_of_bytes b =
let s = Bytes.to_string b in
match Pack.unpack_substring s 0 [`HEXBESTRING (String.length s)] with
[`HEXBESTRING hex] -> hex
| _ -> assert false
let bytes_of_hex s =
Pack.pack [`HEXBESTRING s]
| null | https://raw.githubusercontent.com/chetmurthy/pa_ppx/7c662fcf4897c978ae8a5ea230af0e8b2fa5858b/util-lib/hash.ml | ocaml |
let hex_of_bytes b =
let s = Bytes.to_string b in
match Pack.unpack_substring s 0 [`HEXBESTRING (String.length s)] with
[`HEXBESTRING hex] -> hex
| _ -> assert false
let bytes_of_hex s =
Pack.pack [`HEXBESTRING s]
| |
c47ed66a2b540e4f3486cb7a77d3a355cc4bc0800e8c03342a5de9089fb8124e | mzp/coq-for-ipad | jg_multibox.mli | (*************************************************************************)
(* *)
(* Objective Caml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/otherlibs/labltk/browser/jg_multibox.mli | ocaml | ***********************************************************************
Objective Caml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ I d : jg_multibox.mli 4144 2001 - ... |
7a03f1d00122c8093e2c9200ad200add2ad5b91fc90cba909d4a796ac51d5abb | verma/clj-slackbot | handler_test.clj | (ns clj-slackbot.core.handler-test
(:require [clojure.test :refer :all]
[ring.mock.request :as mock]
[clj-slackbot.core.handler :refer :all]))
(deftest test-app
(testing "main route"
(let [response (app (mock/request :get "/"))]
(is (= (:status response) 200))
(is (= (:body ... | null | https://raw.githubusercontent.com/verma/clj-slackbot/1b73f539e4fea16d253cff7b1a8c60c53ec8cb6b/test/clj_slackbot/core/handler_test.clj | clojure | (ns clj-slackbot.core.handler-test
(:require [clojure.test :refer :all]
[ring.mock.request :as mock]
[clj-slackbot.core.handler :refer :all]))
(deftest test-app
(testing "main route"
(let [response (app (mock/request :get "/"))]
(is (= (:status response) 200))
(is (= (:body ... | |
31ad267399802d6dc9e755477830e89894d98de1678787e2c84e0666d896a4a2 | exercism/ocaml | anagram.ml | let anagrams _ _ =
failwith "'anagrams' is missing" | null | https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/anagram/anagram.ml | ocaml | let anagrams _ _ =
failwith "'anagrams' is missing" | |
9b32674b9b1cc5c2890642a020953644d3d1c575d6409ef26dbbfcf153e6a4e1 | stuart-robinson/clojure-serverless-demo | storage.clj | (ns clojure-serverless-demo.storage
(:require [taoensso.faraday :as far]
[clojure-serverless-demo.config :as config]))
;;require secondary index inorder to be able to sort correctly
scan should use filter expression to discard messsage older than 10 minutes
;;require secondary index inorder to be able... | null | https://raw.githubusercontent.com/stuart-robinson/clojure-serverless-demo/d8d046bd79ccfe3dcea8823e8eddc3cb78a9f732/src/clj/clojure_serverless_demo/storage.clj | clojure | require secondary index inorder to be able to sort correctly
require secondary index inorder to be able to sort correctly | (ns clojure-serverless-demo.storage
(:require [taoensso.faraday :as far]
[clojure-serverless-demo.config :as config]))
scan should use filter expression to discard messsage older than 10 minutes
scan should use filter expression to discard messsage older than 10 minutes
(defn fetch-messages [db-conf... |
e2a6d5aaa4090a452d0f9ff6dc133463c5e29449a0bf937f7a13d1c3c7b1f129 | elastic/eui-cljs | page_content_deprecated.cljs | (ns eui.page-content-deprecated
(:require ["@elastic/eui/lib/components/page/page_content/page_content.js" :as eui]))
(def EuiPageContent_Deprecated eui/EuiPageContent_Deprecated)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/page_content_deprecated.cljs | clojure | (ns eui.page-content-deprecated
(:require ["@elastic/eui/lib/components/page/page_content/page_content.js" :as eui]))
(def EuiPageContent_Deprecated eui/EuiPageContent_Deprecated)
| |
2b3719d93ccea6845a8bbf1d6f7116a979bc4610e6e2d580ca98cdf75181f24a | danieljharvey/mimsa | Main.hs | module Main where
import Control.Applicative
import qualified Options.Applicative as Opt
import Server.Main (server)
import Server.Swagger (outputJSON)
import System.IO
data CLICommand
= GenerateSwagger
| Server
cli :: IO ()
cli = do
command' <-
Opt.execParser (Opt.info (command <**> Opt.helper) Opt.fullDe... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/fa7eefede23f4b37168566593fe48fe21c894545/server/server/Main.hs | haskell | | this runs the server | module Main where
import Control.Applicative
import qualified Options.Applicative as Opt
import Server.Main (server)
import Server.Swagger (outputJSON)
import System.IO
data CLICommand
= GenerateSwagger
| Server
cli :: IO ()
cli = do
command' <-
Opt.execParser (Opt.info (command <**> Opt.helper) Opt.fullDe... |
ce79e21f8a5dff83e129cb792a9fae93a7ed1e850301f531d744d9dc7058a1c3 | ghosthamlet/algorithm-data-structure | breadth_first_search.clj | (ns algorithm-data-structure.algorithms.tree.breadth-first-search
(:require [algorithm-data-structure.data-structures.queue :as q]))
(defn init-callback
([]) (init-callback {})
([callbacks]
(let [stub-callback (fn [] {})
default-allow-traveral (fn [] true)]
{:allow-traversal (or (:allow-traversa... | null | https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/algorithms/tree/breadth_first_search.clj | clojure | (ns algorithm-data-structure.algorithms.tree.breadth-first-search
(:require [algorithm-data-structure.data-structures.queue :as q]))
(defn init-callback
([]) (init-callback {})
([callbacks]
(let [stub-callback (fn [] {})
default-allow-traveral (fn [] true)]
{:allow-traversal (or (:allow-traversa... | |
d80e0bc151c6928e67e2ba8f5272823d69782401bcef728f5673168790a167e9 | simingwang/emqx-plugin-kafkav5 | erl_expand_records.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2005 - 2021 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/stdlib-3.17.1/src/erl_expand_records.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2005 - 2021 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(erl_expand_records).
-export([module/2]).
-import(lists, [map/2,foldl/3,foldr/3,sort/1,reverse/1,duplicate... |
82405fe32028f264f3158c33c1acfb01d987463009a1e379ab5cb3e9d231e112 | jrheard/voke | runner.cljs | (ns voke.runner
(:require [doo.runner :refer-macros [doo-tests]]
[voke.input]
[voke.clock-test]
[voke.input-test]
[voke.events-test]
[voke.system.collision-test]
[voke.system.core-test]
[voke.system.movement-test]
[voke.st... | null | https://raw.githubusercontent.com/jrheard/voke/15b272955d214ce0c531fb2b8d645feb217255c2/test/voke/runner.cljs | clojure | (ns voke.runner
(:require [doo.runner :refer-macros [doo-tests]]
[voke.input]
[voke.clock-test]
[voke.input-test]
[voke.events-test]
[voke.system.collision-test]
[voke.system.core-test]
[voke.system.movement-test]
[voke.st... | |
52eebe342894af47d921f0b0e16de2b22273699f9e88f965760b73400a5b97df | thephoeron/quipper-language | Exact.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
-- ----------------------------------------------... | null | https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/Programs/Tools/Exact.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
----------------------------------------------------------------------
| This tool decomposes all gates that permit exact Clifford+/T/... | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
* controlled - not ( with one positive or negative control ) ,
* any single - qubit Clifford gates ,
Classical controls and classical gates are not subject to the gate
module Main where
import Quipper
import QuipperLib.QuipperASCIIPar... |
ba406acdff31659acdf0944ec4c2617434103075408af8fcc1567f48b28ac3a6 | jwiegley/simple-conduit | bench.hs | {-# LANGUAGE Arrows #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Conduit as C
import Conduit.Simple
import Conduit.Simple.Compat
import Control.Arrow
import Control.Monad
import Control.Monad.IO.Class
import Criterion.Main (defau... | null | https://raw.githubusercontent.com/jwiegley/simple-conduit/a4c7e9d447b3321e91c0a5aa7872ec8d4c1bc283/test/bench.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE OverloadedStrings #
,
rechunk2 =
where
loop = do
unless (null x) $ yield x >> loop
conduitRechunk2 :: [[Int]] -> IO [V.Vector Int]
conduitRechunk2 xs = C.yieldMany xs
C.=$= loop
C.$$ C.sinkList
where
loop = do
x <- C.takeCE 512 C.=$= C.fold... |
module Main where
import qualified Conduit as C
import Conduit.Simple
import Conduit.Simple.Compat
import Control.Arrow
import Control.Monad
import Control.Monad.IO.Class
import Criterion.Main (defaultMain, bench, nf)
import Data.Functor.Identity
i... |
6f1509e20199a1f3dd0de4d141cd1ac9f654185584e261b2dcd64884482184c5 | riemann/riemann | pool_test.clj | (ns riemann.pool-test
(:require [riemann.pool :refer :all]
[clojure.test :refer :all]
[slingshot.slingshot :refer [try+]]))
(deftest claim-release-test
(let [x (atom 0)
pool (fixed-pool #(swap! x inc) {:size 2 :block-start true})
; Claim both elements
... | null | https://raw.githubusercontent.com/riemann/riemann/1649687c0bd913c378701ee0b964a9863bde7c7c/test/riemann/pool_test.clj | clojure | Claim both elements
Pool is empty; should throw
Should re-acquire a
Empty
Re-acquire b
Shouldn't have (open)'d more than twice.
Wait for futures.
Regular claim
With-pool should have released.
Throwing errors
Pool should have regenerated.
Some of the time, multiple retries were needed.
The pool should have ... | (ns riemann.pool-test
(:require [riemann.pool :refer :all]
[clojure.test :refer :all]
[slingshot.slingshot :refer [try+]]))
(deftest claim-release-test
(let [x (atom 0)
pool (fixed-pool #(swap! x inc) {:size 2 :block-start true})
a (claim pool)
... |
5c0d62b17eb0c6a6cd1d182fd41760d2f8449fa7b99e31800f195e795bc398ae | ygrek/mldonkey | guiServers.ml | Copyright 2004 b8_bavard ,
This file is part of mldonkey .
mldonkey 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 l... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/gtk2/gui/guiServers.ml | ocaml | The servers window of MLgui
***********************************************************************
Global variables
**... | Copyright 2004 b8_bavard ,
This file is part of mldonkey .
mldonkey 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 l... |
d92b16b03a6f033e3234fe7b34b4d2b135cf8c9b680259c0a37326c8450947c8 | racketscript/racketscript | global.rkt | #lang racket
(provide global-export-graph)
;;;; Module dependencies and exports
;;;; Refer `moddeps.rkt`.
( Parameter ( Maybe ExportGraph ) )
(define global-export-graph (make-parameter #f))
| null | https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/racketscript-compiler/racketscript/compiler/global.rkt | racket | Module dependencies and exports
Refer `moddeps.rkt`. | #lang racket
(provide global-export-graph)
( Parameter ( Maybe ExportGraph ) )
(define global-export-graph (make-parameter #f))
|
845646a1748428c6bf472fa061aa82ee869b044acf07154253ced45f0593e134 | mmirman/caledon | Context.hs | {-# LANGUAGE
BangPatterns
#-}
module Context where
import Names
import AST
import Substitution
import Data.Monoid
import Data.Functor
import qualified Data.Map as M
import qualified Data.Set as S
import Data.Map (Map)
import Data.Set (Set)
import Control.Monad.State.Strict (StateT, runStateT, modify, get, put)
impor... | null | https://raw.githubusercontent.com/mmirman/caledon/7e97110270362d46d8784a5197a84b6a4b7e2982/sources/Context.hs | haskell | # LANGUAGE
BangPatterns
#
------------------
- context map ---
------------------
------------------------------
- constraint context list ---
------------------------------
assumes the element is not already in the context, or it is and the only thing that is changing is it's type.
gets the list of bindings afte... | module Context where
import Names
import AST
import Substitution
import Data.Monoid
import Data.Functor
import qualified Data.Map as M
import qualified Data.Set as S
import Data.Map (Map)
import Data.Set (Set)
import Control.Monad.State.Strict (StateT, runStateT, modify, get, put)
import Control.Monad.RWS.Strict (RWST... |
985c1ffffd11b1f01de5d077bebc8925efad47ca16665d602aceea5f2d182a27 | contivero/hasmin | ValueSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Hasmin.Parser.ValueSpec where
import Test.Hspec
-- import Test.QuickCheck
import Hasmin . . Internal
import Test . Hspec . ( shouldParse , parseSatisfies , ( ~ > ) )
import Data.Text (Text)
import Data . . Text ( )
import Hasmin.Parser.Value
import Hasmin.TestUtils... | null | https://raw.githubusercontent.com/contivero/hasmin/2a7604159b51e69c5e9c564dce53cb3ab09ae22b/tests/Hasmin/Parser/ValueSpec.hs | haskell | # LANGUAGE OverloadedStrings #
import Test.QuickCheck
it is a valid value! |
module Hasmin.Parser.ValueSpec where
import Test.Hspec
import Hasmin . . Internal
import Test . Hspec . ( shouldParse , parseSatisfies , ( ~ > ) )
import Data.Text (Text)
import Data . . Text ( )
import Hasmin.Parser.Value
import Hasmin.TestUtils
valueParserTest :: Spec
valueParserTest =
describe "valu... |
c061c706d647ec3d49e0b13a4cd836b9c79804ce2eb0025e9cdf8545296d06f3 | strojure/zizzmap | node_repl.cljc | (ns project.node-repl
"ClojureScript Node REPL."
(:require [cljs.repl :as repl]
[cljs.repl.node :as node]))
;;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
(defn- start
[]
(-> (node/repl-env)
(repl/repl :quit-prompt (fn []
... | null | https://raw.githubusercontent.com/strojure/zizzmap/a8779115f56718fabad5d13731638d52d022d86d/test/project/node_repl.cljc | clojure | ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, | (ns project.node-repl
"ClojureScript Node REPL."
(:require [cljs.repl :as repl]
[cljs.repl.node :as node]))
(defn- start
[]
(-> (node/repl-env)
(repl/repl :quit-prompt (fn []
(repl/repl-title)
(repl/repl-quit-prompt)))))
(def -... |
1273ceaf0309830c4105fbca96924db4b5d97dfda412805da1c84de9d0f55821 | McCLIM/McCLIM | smoke.lisp | ;;;; mcclim-dot smoke tests
;;;;
This file is part of the - dot extension . See
;;;; Extensions/dot/README.md and Extensions/dot/LICENSE for more information.
(cl:in-package #:mcclim-dot.test)
(defparameter *simple-graph*
'((s1 10 2)
(s8 9)
(s24 27 25)
(s30 31 33)
(s35 36 43)
(2 3 16 17 t1 18... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/a13c98d43948108d2433189aa3a6848b7d041c21/Extensions/dot/test/smoke.lisp | lisp | mcclim-dot smoke tests
Extensions/dot/README.md and Extensions/dot/LICENSE for more information. | This file is part of the - dot extension . See
(cl:in-package #:mcclim-dot.test)
(defparameter *simple-graph*
'((s1 10 2)
(s8 9)
(s24 27 25)
(s30 31 33)
(s35 36 43)
(2 3 16 17 t1 18)
(3 4)
(4 5)
(5 6 t35 23)
(6 7)
(7 t8)
(9 42 t1)
(10 11 14 t1 13 12)
(11 4)
... |
a9bff88a660894de21ee6fbefd82c6c0150f7a4cb921d448483ebbd0ebe9f7e6 | OCamlPro/operf-micro | main.ml | open! Utils
open Detect_config
open Benchmark
open Builder
type error =
| Mandatory_option of string
| Unexpected of string
| Problem_creating_save_directory of string
| No_save_directory of string
| Cannot_find_compiler
exception Error of error
let set_string r = Arg.String (fun v -> r := Some v)
let add_... | null | https://raw.githubusercontent.com/OCamlPro/operf-micro/d5d2bf2068204b889321b0c5a7bc0d079c0fca80/tools/operf-micro/main.ml | ocaml | Dump data in data file
Command to plot the data | open! Utils
open Detect_config
open Benchmark
open Builder
type error =
| Mandatory_option of string
| Unexpected of string
| Problem_creating_save_directory of string
| No_save_directory of string
| Cannot_find_compiler
exception Error of error
let set_string r = Arg.String (fun v -> r := Some v)
let add_... |
a21ca9d5400277083ca105a49bbe84a74d4d89326aacc78df55328d2af578541 | rbuchmann/samak | core.cljs | (ns ui.core
(:require [reagent.core :as r]
[ui.state :as s]
[ui.components.repl :as repl]
[clojure.string :as str]))
(set! *warn-on-infer* true)
(enable-console-print!)
(def fs ^js/fs (js/require "fs"))
( when @s / keybinds - needed ?
;; (s/register-keyb... | null | https://raw.githubusercontent.com/rbuchmann/samak/ab98d1a180ee02c6cd784962b3c03e473a6d481b/ui_src/ui/core.cljs | clojure | (s/register-keybindings s/app-state)
(reset! s/keybinds-needed? false)) | (ns ui.core
(:require [reagent.core :as r]
[ui.state :as s]
[ui.components.repl :as repl]
[clojure.string :as str]))
(set! *warn-on-infer* true)
(enable-console-print!)
(def fs ^js/fs (js/require "fs"))
( when @s / keybinds - needed ?
(def args (-> ^js/el... |
2cb71e0f76d2c991763e7df115e0ace96ead5a61e906607700c29b4eff4fe7ab | SanderSpies/ocaml-gist | create.ml | open Unix
let execute cmd =
let s = String.concat " " cmd in
let ret = Unix.open_process_in s in
let output = ref "" in
(try
while true do
let l = input_line ret in
output := !output ^ l ^ "\n"
done
with End_of_file -> ());
!output
let filtered_files dir = (
let all_files = Array.to_... | null | https://raw.githubusercontent.com/SanderSpies/ocaml-gist/7dc229aebdf51310e8c7dae12df0cb55b5de5a32/ocaml_gist/create.ml | ocaml | copy the files to the output
packages that should be available in the gist tool
local libraries that should be available in the gist tool
"-g";
"-jsopt"; "--source-map-inline";
"-jsopt"; "--no-inline";
"-jsopt"; "--pretty";
"-jsopt"; "--debug-info";
"-jsopt";"--opt=3";
TODO: use cmti files instead whe... | open Unix
let execute cmd =
let s = String.concat " " cmd in
let ret = Unix.open_process_in s in
let output = ref "" in
(try
while true do
let l = input_line ret in
output := !output ^ l ^ "\n"
done
with End_of_file -> ());
!output
let filtered_files dir = (
let all_files = Array.to_... |
f4059f149aa820750caf4943b8390a715c11ebd864bc39d06229467f4d2d03fd | epiccastle/bbssh | byte_array_output_stream.clj | (ns pod.epiccastle.bbssh.byte-array-output-stream
"Creates and calls the various methods of a ByteArrayOutputStream that
exists on the pod heap."
(:refer-clojure :exclude [flush])
(:require [pod.epiccastle.bbssh.pod.byte-array-output-stream :as byte-array-output-stream]
[pod.epiccastle.bbssh.impl.cl... | null | https://raw.githubusercontent.com/epiccastle/bbssh/ee15ca308e640c870c9ff3d7c519394e5732ee2b/src/bb/pod/epiccastle/bbssh/byte_array_output_stream.clj | clojure |
babashka doesn't support proxy for ByteArrayOutputStream
"Make a babashka java.io.ByteArrayOutputStream that calls the pod
heap output-stream `stream`."
[stream]
(proxy [java.io.ByteArrayOutputStream] []
(close []
(close stream))
(reset []
(reset stream))
(size []
(siz... | (ns pod.epiccastle.bbssh.byte-array-output-stream
"Creates and calls the various methods of a ByteArrayOutputStream that
exists on the pod heap."
(:refer-clojure :exclude [flush])
(:require [pod.epiccastle.bbssh.pod.byte-array-output-stream :as byte-array-output-stream]
[pod.epiccastle.bbssh.impl.cl... |
9ffd61d457f8ef10db6e1a61b84a882c9d1006964f43ea92ff37603b1ebb7675 | mariachris/Concuerror | spawned_senders.erl | -module(spawned_senders).
-export([spawned_senders/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
spawned_senders() ->
Receiver = spawn(fun receive_two/0),
spawn(sender(Receiver, one)),
spawn(sender(Receiver, two)).
receive_two() ->
receive
Pat1 ->
rece... | null | https://raw.githubusercontent.com/mariachris/Concuerror/87e63f10ac615bf2eeac5b0916ef54d11a933e0b/testsuite/suites/dpor/src/spawned_senders.erl | erlang | -module(spawned_senders).
-export([spawned_senders/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
spawned_senders() ->
Receiver = spawn(fun receive_two/0),
spawn(sender(Receiver, one)),
spawn(sender(Receiver, two)).
receive_two() ->
receive
Pat1 ->
rece... | |
d8ca0974c0785b787150ff425a8658486d9ecfcfc8ac248d70c88a11811342c3 | realworldocaml/book | console_intf.ml | open! Core
module type Io = sig
type 'a t
type 'a fmt
type out_channel
include Monad.S with type 'a t := 'a t
val output_string : out_channel -> string -> unit
val output : out_channel -> buf:bytes -> pos:int -> len:int -> unit
val stderr : out_channel
val stdout : out_channel
val flush : out_chann... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/textutils/console/src/console_intf.ml | ocaml | * Handling of ansi codes.
Create string with embedded formatting codes
* The width in characters of the current output. Returns [`Not_a_tty] if
stdout is not connected to a tty.
* print a list in a columnize way (like the output of ls)
* Color printing in terminals | open! Core
module type Io = sig
type 'a t
type 'a fmt
type out_channel
include Monad.S with type 'a t := 'a t
val output_string : out_channel -> string -> unit
val output : out_channel -> buf:bytes -> pos:int -> len:int -> unit
val stderr : out_channel
val stdout : out_channel
val flush : out_chann... |
a161e0301e9942b4588230660ad97db408e7f70fd1fcc51b039bb6823697557d | let-def/menhir | item.mli | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/item.mli | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the Q Public License versi... |
267f2bc8d0f7d8c5b8ab512c11e207511e86b47b79ec364f96ecd14ac2955313 | bytekid/mkbtt | externalTermination.mli | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* 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 (... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/termination/externalTermination.mli | ocaml | ** VALUES ************************************************************ | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* 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 (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.