_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 |
|---|---|---|---|---|---|---|---|---|
fa22d79cbb406ba63b86d04e76300ef7590a36bbd4f87354a14868170d833992 | travelping/prometheus_diameter_collector | prometheus_diameter_collector_SUITE.erl | Copyright 2021 Travelping GmbH < >
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distr... | null | https://raw.githubusercontent.com/travelping/prometheus_diameter_collector/f54a47c31e71793af16d3feceddf8e20e98316a9/test/prometheus_diameter_collector_SUITE.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2021 Travelping GmbH < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(prometheus_diameter_collector_SUITE).
-export([
all/0,
groups/0,
init_per_suite/1,
end_per_suite/1
]).
-export... |
f9be72a67d952b3666fa7bee41ac8f836f644d0cf6c8c5646296c791b3daff93 | audreyt/openafp | CFC.hs |
module OpenAFP.Records.AFP.CFC where
import OpenAFP.Types
import OpenAFP.Internals
data CFC = CFC {
cfc_Type :: !N3
,cfc_ :: !N3
,cfc_CFIRepeatingGroupLength :: !N1
,cfc :: !NStr
} deriving (Show, Typeable)
| null | https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/AFP/CFC.hs | haskell |
module OpenAFP.Records.AFP.CFC where
import OpenAFP.Types
import OpenAFP.Internals
data CFC = CFC {
cfc_Type :: !N3
,cfc_ :: !N3
,cfc_CFIRepeatingGroupLength :: !N1
,cfc :: !NStr
} deriving (Show, Typeable)
| |
53650f3a827d13910e7667f7aded6a50adc38355e973c20670147593ea695d5a | wlitwin/graphv | demo.ml | module NVG = Graphv_gles2
let clampf a mn mx =
if a < mn then mn
else if a > mx then mx
else a
;;
let is_black (c : NVG.Color.t) =
c.r = 0.0
&& c.g = 0.0
&& c.b = 0.0
&& c.a = 1.0
;;
let to_utf8 (c : int) =
let n =
if c < 0x80 then 1
else if c < 0x800 then 2
... | null | https://raw.githubusercontent.com/wlitwin/graphv/d0a09575c5ff5ee3727c222dd6130d22e4cf62d9/examples/native/demo.ml | ocaml | Window
Drop shadow
Header
Graph background
Sample points
Selector
Marker on
Center triangle
Select circle on triangle
Hide fades
Scroll bar
Line joins
Line caps
Thumbnails box | module NVG = Graphv_gles2
let clampf a mn mx =
if a < mn then mn
else if a > mx then mx
else a
;;
let is_black (c : NVG.Color.t) =
c.r = 0.0
&& c.g = 0.0
&& c.b = 0.0
&& c.a = 1.0
;;
let to_utf8 (c : int) =
let n =
if c < 0x80 then 1
else if c < 0x800 then 2
... |
395e0a1e580c213aad214cb0594e1d6235d66aba78304ecabafde77ac4b2d51a | atgreen/lisp-openshift | ffi-buffer.lisp | #+xcvb (module (:depends-on ("package")))
(in-package :cl+ssl)
(defun make-buffer (size)
(cffi-sys::make-shareable-byte-vector size))
(defun buffer-length (buf)
(length buf))
(defun buffer-elt (buf index)
(elt buf index))
(defun set-buffer-elt (buf index val)
(setf (elt buf index) val))
(defsetf buffer-elt ... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/cl%2Bssl-20120305-git/ffi-buffer.lisp | lisp | #+xcvb (module (:depends-on ("package")))
(in-package :cl+ssl)
(defun make-buffer (size)
(cffi-sys::make-shareable-byte-vector size))
(defun buffer-length (buf)
(length buf))
(defun buffer-elt (buf index)
(elt buf index))
(defun set-buffer-elt (buf index val)
(setf (elt buf index) val))
(defsetf buffer-elt ... | |
dae549ca1155c630fe2a792f092386184cd2c7ec77379fdd227e315554fca3c7 | argp/bap | predicate_suite.ml | open Ast
open Ast_convenience
open Big_int_convenience
open OUnit
open Pcre
open Test_common
open Type
open Utils_common
let test_file = "C/test";;
let g_il = "g.il";;
let stp_out = "stp_out.stp";;
(* Auto select solver based on which one is available *)
let solver = Smtexec.YICES.si;;
let check = let module SC = So... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/tests/predicate_suite.ml | ocaml | Auto select solver based on which one is available
A very basic test of assumption. The goal of this test is to make
sure that symbeval_search handles assumption failures correctly.
ret_to_jmp introduces a TMem, so mem2array must come after! | open Ast
open Ast_convenience
open Big_int_convenience
open OUnit
open Pcre
open Test_common
open Type
open Utils_common
let test_file = "C/test";;
let g_il = "g.il";;
let stp_out = "stp_out.stp";;
let solver = Smtexec.YICES.si;;
let check = let module SC = SolverCheck(Smtexec.YICES) in
SC.check_solver_p... |
a50fc144e4c98a62245a6aee92d95a47a9b5d7e05b7d43d011fea0529e83e960 | egri-nagy/lambdago | katago.clj | (ns lgo.analysis.katago
"Functions for doing KataGo analysis directly.
Preparing input files for the analysis engine and parsing the
output into a map suitable for visualization.
"
(:require [clojure.data.json :as json]
[clojure.string :refer [lower-case
join
... | null | https://raw.githubusercontent.com/egri-nagy/lambdago/d06db2153eed2396da1ffa1a7a7dd72a9d937cec/src/lgo/analysis/katago.clj | clojure | ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
katago needs the previous moves
the id tells whether it is a game move or not
no policy details needed for imaginary pass
we don't want the policy table for the passed
PROCESSING THE OUTPUT of the analysis engine.
the result of parsing JSON
sorting to make sure
stripping the... | (ns lgo.analysis.katago
"Functions for doing KataGo analysis directly.
Preparing input files for the analysis engine and parsing the
output into a map suitable for visualization.
"
(:require [clojure.data.json :as json]
[clojure.string :refer [lower-case
join
... |
bcded96a3eea2ae7a28c8578b5d783ce189994d2592237979323fee9272c5ff8 | mahallow/thinkdots | xmonad.hs | The " I wish I was using AwesomeWM but for some reason I 'm here " official XMonad config--
import XMonad hiding ( (|||) ) -- jump to layout
import XMonad.Layout.LayoutCombinators (JumpToLayout(..), (|||)) -- jump to layout
import XMonad.Config.Desktop
import System.Exit
import qualified XMonad.StackSet as W
-- dat... | null | https://raw.githubusercontent.com/mahallow/thinkdots/5f3541cd3fa218f3bdbfa4dfd0ca39d93232339c/.xmonad/xmonad.hs | haskell |
jump to layout
jump to layout
data
for video
system
for xmobar
util
hooks
to show workspaces in application switchers#9d9d9d
actions
for dwm window style tagging
update mouse postion
layout
----------------------------------------------------------------------
variables
---------------------------------... |
import XMonad.Config.Desktop
import System.Exit
import qualified XMonad.StackSet as W
import Data.Char (isSpace)
import Data.List
import Data.Monoid
import Data.Maybe (isJust)
import qualified Data.Map as M
import XMonad.Util.Run (safeSpawn, unsafeSpawn, runInTerm, spawnPipe)
import XMonad.Util.SpawnOnce
import XMon... |
09294b5146f3d8ee23133a339da428d009d983a303bd1d627064558fb6899795 | Liutos/Project-Euler | pro4.lisp | (defun palindromicp (number)
(let ((str (format nil "~A" number)))
(string= str (reverse str))))
(defun pro4 ()
(let ((max 0))
(dotimes (i 899)
(dotimes (j 899)
(let ((mul (* (+ 100 i) (+ 100 j))))
(if (and (palindromicp mul)
(> mul max))
(setf max mul)))))
max)) | null | https://raw.githubusercontent.com/Liutos/Project-Euler/dd59940099ae37f971df1d74c4b7c78131fd5470/pro4.lisp | lisp | (defun palindromicp (number)
(let ((str (format nil "~A" number)))
(string= str (reverse str))))
(defun pro4 ()
(let ((max 0))
(dotimes (i 899)
(dotimes (j 899)
(let ((mul (* (+ 100 i) (+ 100 j))))
(if (and (palindromicp mul)
(> mul max))
(setf max mul)))))
max)) | |
3b8653c34c18835c7fd4fb72b2fdd090ef8001082dbaeca2d48499ef81d80867 | jaredly/reason-language-server | translprim.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/translprim.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
val event_before : Typedtree.expression -> Lambda.lambda -> Lambda.lambda
val event_after : Typedtree.e... |
49299c0209e9b5112ebf94e26ada6986100bc7ae64052d9d385846c0bc0859f5 | MondayMorningHaskell/haskellings | Transformers2.hs | -- I AM NOT DONE
import Control.Monad.Trans.Maybe
import Data.List
import Text.Read
- Since ' Maybe ' is a monad as well , it also has a monad transformer ' MaybeT ' .
There 's no ' runMaybe ' function though . You just use ' MaybeT ' as a constructor
aroud a function in the underlying monad .
newtype M... | null | https://raw.githubusercontent.com/MondayMorningHaskell/haskellings/fafadd5bbb722b54c1b7b114e34dc9b96bb7ca4d/exercises/monads/Transformers2.hs | haskell | I AM NOT DONE
Normal IO monad actions !
Must return a value as ' Maybe '
Normal IO monad actions!
Must return a value as 'Maybe'
TODO:
Fill in these functions to populate a user with the validated information!
You should print the given prompt and then use 'getLine' to retrieve the
input, applying the speci... |
import Control.Monad.Trans.Maybe
import Data.List
import Text.Read
- Since ' Maybe ' is a monad as well , it also has a monad transformer ' MaybeT ' .
There 's no ' runMaybe ' function though . You just use ' MaybeT ' as a constructor
aroud a function in the underlying monad .
newtype MaybeT m a = Maybe... |
05238757e5b0b76b1f8275c46346c95bbe1d7261a3b789e844f52c084f61b4d6 | hellonico/origami-fun | trees.clj | (ns opencv4.trees
(:require
[opencv4.utils :as u]
[opencv4.colors.rgb :as rgb]
[opencv4.core :refer :all]))
; -way-to-segment-a-tree-in-plantation-aerial-image-using-opencv?rq=1
(def original (-> "resources/images/trees.png" imread))
(def trees
(-> original clone (cvt-color! COLOR_BGR2HSV)))
(def in-range-pic... | null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/trees.clj | clojure | -way-to-segment-a-tree-in-plantation-aerial-image-using-opencv?rq=1
(u/show in-range-pict)
(u/show in-range-pict)
-converting-one-color-to-another
(bitwise-not! mask)
(u/show mat2) | (ns opencv4.trees
(:require
[opencv4.utils :as u]
[opencv4.colors.rgb :as rgb]
[opencv4.core :refer :all]))
(def original (-> "resources/images/trees.png" imread))
(def trees
(-> original clone (cvt-color! COLOR_BGR2HSV)))
(def in-range-pict
(new-mat))
(in-range trees (new-scalar 100 80 100) (new-scalar 12... |
9f689f56951a40f9549f194d38f3d0e2d50f5bce99147882b3e8cad42ddbaeb7 | softlab-ntua/bencherl | acceptor_state.erl | 2009 - 2011 Zuse Institute Berlin ,
onScale solutions GmbH
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 l... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/src/paxos/acceptor_state.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2009 - 2011 Zuse Institute Berlin ,
onScale solutions GmbH
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc Part of generic Paxos - Consensus implementation
@version $ I d :... |
ef9627a89ea403b55ee67e40969154b167f3c298c96df9fbc7ffc7d9ac10b77e | mcandre/cl-quickcheck | self-test.lisp | Copyright 2010 under the terms of the MIT X license
found at
;
Copyright 2004
;
;
; Testing the tester
(in-package :cl-quickcheck)
(eval-when (:execute :compile-toplevel :load-toplevel)
(defmacro quietly (&body body)
`(let ((*loud* nil))
(isolate ,@body)))
(defmacro isolate (&body body)
... | null | https://raw.githubusercontent.com/mcandre/cl-quickcheck/a76e360f0ead6809269b06221492fb7b3bfc8169/self-test.lisp | lisp |
Testing the tester
all passed."
1 SKIPPED."
all passed."
1 SKIPPED." | Copyright 2010 under the terms of the MIT X license
found at
Copyright 2004
(in-package :cl-quickcheck)
(eval-when (:execute :compile-toplevel :load-toplevel)
(defmacro quietly (&body body)
`(let ((*loud* nil))
(isolate ,@body)))
(defmacro isolate (&body body)
`(singletonize (collect-tes... |
77b0e32d39c105773c17026b449d97cca70542f3832e0c190a14ab8a0f89964e | melisgl/mgl | log.lisp | (in-package :mgl-log)
;;; FIXDOC
(defsection @mgl-log (:title "Logging")
(log-msg function)
(with-logging-entry macro)
(*log-file* variable)
(*log-time* variable)
(log-mat-room function))
(defun time->string (&optional (time (get-universal-time)))
(destructuring-bind (second minute hour date month year)
... | null | https://raw.githubusercontent.com/melisgl/mgl/27a2552632a6a9330c1a133e519e676d9c6ca714/src/log.lisp | lisp | FIXDOC | (in-package :mgl-log)
(defsection @mgl-log (:title "Logging")
(log-msg function)
(with-logging-entry macro)
(*log-file* variable)
(*log-time* variable)
(log-mat-room function))
(defun time->string (&optional (time (get-universal-time)))
(destructuring-bind (second minute hour date month year)
(subse... |
5ac80e8ce07e03b595a419b7fbd4e401c1f0e572f245d66f63dc9d8026b6e722 | sergv/hkanren | Subst.hs | ----------------------------------------------------------------------------
-- |
Module : Language . . Subst
Copyright : ( c ) 2015
-- License : BSD3-style (see LICENSE)
--
-- Maintainer :
-- Stability :
-- Portability :
--
--
--------------------------------------------------------------... | null | https://raw.githubusercontent.com/sergv/hkanren/94a9038f5885471c9f4d3b17a8e52af4e7747af3/src/Language/HKanren/Subst.hs | haskell | --------------------------------------------------------------------------
|
License : BSD3-style (see LICENSE)
Maintainer :
Stability :
Portability :
--------------------------------------------------------------------------
# LANGUAGE ConstraintKinds #
# LANGUAGE KindSignatures ... | Module : Language . . Subst
Copyright : ( c ) 2015
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
module Language.HKanren.Subst
( Subst
, extend
, lookup
, domain
, domainSize
, empty
, LVar
, L.mkLVar
, Term
, Term1
, LFunctor
, LDomain
, ... |
c51a2619c31eee341bd007936f553546e7add9e0a5c91f86da41763776357b06 | AndrasKovacs/ELTE-func-lang | Notes03.hs |
--------------------------------------------------------------------------------
import Prelude hiding (Either(..), Functor(..), Semigroup(..), Monoid(..))
class Functor f where
fmap :: (a -> b) -> f a -> f b
infixr 6 <>
class Semigroup a where
(<>) :: a -> a -> a
class Semigroup a => Monoid a where
mempty :... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2019-20-1/lectures/Notes03.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
összeadás és változónevek. Pl: |
import Prelude hiding (Either(..), Functor(..), Semigroup(..), Monoid(..))
class Functor f where
fmap :: (a -> b) -> f a -> f b
infixr 6 <>
class Semigroup a where
(<>) :: a -> a -> a
class Semigroup a => Monoid a where
mempty :: a
1 . . instance - t az :
data Tree1 a = Leaf1 a | Node1 (Tree1 a) (... |
6374a57b72f5dfdcd4a13d01c8cbe2339b341938954915672f96f505b3c49f6c | haskell-jp/makeMistakesToLearnHaskell | 2.hs | main = print (60 / (1.7 * 1.7))
| null | https://raw.githubusercontent.com/haskell-jp/makeMistakesToLearnHaskell/1174d5c6bb82e57622be8033607a4d049e30ae7e/assets/2.hs | haskell | main = print (60 / (1.7 * 1.7))
| |
873c6db77257d22d7f9110ba07bca879ffe7164c0d423e4b2206b9ec5a069bc2 | vseloved/cl-nlp | porter.lisp | ( c ) 2015 - 2016 Vsevolod Dyomkin
(in-package #:nlp.lexics)
(named-readtables:in-readtable rutilsx-readtable)
(defclass porter-stemmer (stemmer) ())
(defmethod stem ((stemmer porter-stemmer) word)
(if (<= (length word) 2)
word
(-> (make-array (length word) :element-type 'character
... | null | https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/src/lexics/porter.lisp | lisp | steps
original algorithm: replace prev line with next
"abli" "able"
original algo: remove next line
predicates
morphers | ( c ) 2015 - 2016 Vsevolod Dyomkin
(in-package #:nlp.lexics)
(named-readtables:in-readtable rutilsx-readtable)
(defclass porter-stemmer (stemmer) ())
(defmethod stem ((stemmer porter-stemmer) word)
(if (<= (length word) 2)
word
(-> (make-array (length word) :element-type 'character
... |
9a5012aa1cdb7d007ac10165e3e5b09a0fcfc6dd269dbd3b2ba95c3b600797ae | racket/racket7 | utf-16-encode.rkt | #lang racket/base
(require "../common/set-two.rkt")
(provide utf-16-encode)
(define (utf-16-encode s)
(define surrogate-count
(for/fold ([n 0]) ([c (in-string s)])
(if ((char->integer c) . >= . #x10000)
(add1 n)
n)))
(define bstr (make-bytes (* 2 (+ (string-length s) surrogate-count)... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/string/utf-16-encode.rkt | racket | #lang racket/base
(require "../common/set-two.rkt")
(provide utf-16-encode)
(define (utf-16-encode s)
(define surrogate-count
(for/fold ([n 0]) ([c (in-string s)])
(if ((char->integer c) . >= . #x10000)
(add1 n)
n)))
(define bstr (make-bytes (* 2 (+ (string-length s) surrogate-count)... | |
5d99b0b6e5e4bdb3fb4c850286c7382e9c26b5b2fdbabf0f8f0f073e950a1267 | hargettp/raft | Log.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
-----------------------------------------------------------------------------
-- |
-- Module : Control.Consensus.Log
Copyright : ( c ) 2014
License : MIT (... | null | https://raw.githubusercontent.com/hargettp/raft/1ed007986a908e43d9867935af759bccc3b9a57f/src/Data/Log.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Consensus.Log
Maintainer :
Stability : experimental
Portability : portable
< replicated state machine model>
for implementing a distributed system.
-----------------------------------------------------... | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
Copyright : ( c ) 2014
License : MIT ( see LICENSE file )
General ' Log ' and ' State ' typeclasses . Collectively , these implement a state machine , and the
... |
7143bb7a50153e9b10051896f3782a5bebfa7c53dab4f726daffbf932136c391 | discus-lang/salt | Term.hs |
module Salt.Core.Check.Term where
import Data.List (partition)
import Salt.Core.Check.Term.App
import Salt.Core.Check.Term.Case
import Salt.Core.Check.Term.Bind
import Salt.Core.Check.Term.Params
import Salt.Core.Check.Term.Value
import Salt.Core.Check.Term.Base
import Salt.Core.Check.Type.Base
... | null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/Core/Check/Term.hs | haskell | | Partition effects into region-local and region-escaping.
Get region names out of bindings.
Wrap into level 0 Bound(s).
---------------------------------------------------------------------------------------- Synth --
| Check and elaborate a term producing, a new term and its type.
(t-synth-ann) -----------------... |
module Salt.Core.Check.Term where
import Data.List (partition)
import Salt.Core.Check.Term.App
import Salt.Core.Check.Term.Case
import Salt.Core.Check.Term.Bind
import Salt.Core.Check.Term.Params
import Salt.Core.Check.Term.Value
import Salt.Core.Check.Term.Base
import Salt.Core.Check.Type.Base
... |
e9e81b063e31bf9e4430f1933323944d084678753c0480cbb1d16a178e0ac8f8 | bmeurer/ocaml-arm | compile.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/driver/compile.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Misc
open Config
open Fo... |
2865e29c1dedb2682f855158e002ee52e034e3ef2da250a736d3849c341564ea | HunterYIboHu/htdp2-solution | ex94-define-constants.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex94-define-constants) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (l... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section6/ex94-define-constants.rkt | racket | about the language level of this file in a form that our tools can easily process.
physical constants
graphical constants | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex94-define-constants) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-decimal #... |
643e62eae5508dd47c61b817d1a320323f4db900f933eba33ff46163b5aa7d1c | aantron/luv | FS_poll.ml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
type t = [ `FS_poll ] Handle.t
let init ?loop () =
let poll = Handle.allocate C.Types.FS_poll.t in
C.Functions.FS_poll.init (Loop.or_default loop) poll
|> Error.to_result poll
... | null | https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/FS_poll.ml | ocaml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
type t = [ `FS_poll ] Handle.t
let init ?loop () =
let poll = Handle.allocate C.Types.FS_poll.t in
C.Functions.FS_poll.init (Loop.or_default loop) poll
|> Error.to_result poll
... | |
d368794bc320eb722949e86ffdedfbfe3e172e03f5c4b63f1694500dfe0ed3bc | footprintanalytics/footprint-web | test_util.clj | (ns metabase.actions.test-util
(:require
[clojure.java.jdbc :as jdbc]
[clojure.test :refer :all]
[metabase.driver.sql-jdbc.connection :as sql-jdbc.conn]
[metabase.http-client :as client]
[metabase.models :refer [Action Card Database QueryAction]]
[metabase.models.action :as action]
[metabase.test... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/actions/test_util.clj | clojure | make sure all the table names are valid so we can catch errors/typos
using categories AND venues will let us test FK constraint failures
it won't work the other way | (ns metabase.actions.test-util
(:require
[clojure.java.jdbc :as jdbc]
[clojure.test :refer :all]
[metabase.driver.sql-jdbc.connection :as sql-jdbc.conn]
[metabase.http-client :as client]
[metabase.models :refer [Action Card Database QueryAction]]
[metabase.models.action :as action]
[metabase.test... |
898108c75f68ce7f2a9755a0c4ac406633375ed10391c82d4165200d054ffb1e | well-typed/large-records | R020.hs | # LANGUAGE TypeApplications #
#if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.Induction_Tree_Phantom.Sized.R020 where
import Data.Proxy
import Common.EmptyClass_Tree_P... | null | https://raw.githubusercontent.com/well-typed/large-records/c6c2b51af11e90f30822543d7ce4d1cb28cee294/large-records-benchmarks/bench/experiments/Experiment/Induction_Tree_Phantom/Sized/R020.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | # LANGUAGE TypeApplications #
#if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.Induction_Tree_Phantom.Sized.R020 where
import Data.Proxy
import Common.EmptyClass_Tree_Phantom
import Common.HListOfSize.HL020
requiresInstance :: ()
requiresInstance = requireEmptyClass (Proxy @ExampleFields)
|
e0ce42e29018ce55ae19d3e72e42162b2b8d9ebaf06f4cff0f744cf69ca49578 | ragkousism/Guix-on-Hurd | mtools.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
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 ; ei... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/mtools.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 © 2013 < >
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 (gnu packages mtools)
#:use-module (guix licenses)
#:use-module (guix... |
1450586f7c63f31958d85161eb262e20b9e9ec78878b0d231c428d70ca68b9a9 | ocaml/ocamlfind | fl_topo.ml | (* $Id$
* ----------------------------------------------------------------------
*
*)
(* TODO:
* - Use a hashtable in 'find'
* - implement le_than with an 'iter' like method
*)
(**********************************************************************)
module type IdentifiedType =
sig
type t
type id_... | null | https://raw.githubusercontent.com/ocaml/ocamlfind/678148e559cf207bee5d3836ac4d18ed4dffda6c/src/findlib/fl_topo.ml | ocaml | $Id$
* ----------------------------------------------------------------------
*
TODO:
* - Use a hashtable in 'find'
* - implement le_than with an 'iter' like method
********************************************************************
********************************************************************
used i... |
module type IdentifiedType =
sig
type t
type id_t
val id : t -> id_t
end
exception Inconsistent_ordering
module type S =
sig
type key
type el_t
type t
val create : unit -> t
val add : t -> el_t -> unit
val let_le : t -> key -> key -> unit
val find : t -> key -> el_t... |
cc84807e4978aaaf86694f952d6598c3dbc3a99edab00e797c9e0bbbd4f6d63c | MyDataFlow/ttalk-server | loop_handler_timeout_h.erl | %% This module implements a loop handler that sends
%% itself a timeout that will intentionally arrive
%% too late, as it configures itself to only wait
200ms before closing the connection in init/3 .
This results in a 204 reply being sent back by Cowboy .
-module(loop_handler_timeout_h).
-behaviour(cowboy_loop_ha... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/test/handlers/loop_handler_timeout_h.erl | erlang | This module implements a loop handler that sends
itself a timeout that will intentionally arrive
too late, as it configures itself to only wait | 200ms before closing the connection in init/3 .
This results in a 204 reply being sent back by Cowboy .
-module(loop_handler_timeout_h).
-behaviour(cowboy_loop_handler).
-export([init/3]).
-export([info/3]).
-export([terminate/3]).
init(_, Req, _) ->
erlang:send_after(1000, self(), timeout),
{loop, Req, undefi... |
6f0dfa6faddcff994ab0a317b3b7837642f2679879e2a431847056c442d3bacb | willtim/Atavachron | Files.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
-- | Functions for reading/writing files.
--
module Ata... | null | https://raw.githubusercontent.com/willtim/Atavachron/bbf9a93eac0e096ee4595e23067c912af865601e/src/Atavachron/Files.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
| Functions for reading/writing files.
| Save files in the supplied target directory using the tagged
stream of bytestring chunks.
| Save non-regular files (links and directories) in the supplied target directory.
do not error if a direct... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Atavachron.Files where
import Prelude hiding (concatMap)
import Control.Monad
import Control.Monad.Morph (hoist)
import Control.Monad.... |
e861dabb4fcc21570fadd4f0d97ef78ce2e625149dc80ab231b28e70e6233e63 | tatut/xtdb-inspector | doc.clj | (ns xtdb-inspector.page.doc
"Page that displays a single document."
(:require [ripley.html :as h]
[xtdb-inspector.id :as id]
[xtdb-inspector.ui :as ui]
[xtdb.api :as xt]
[ripley.live.source :as source]
[clojure.set :as set]
[ripley.js :as js]
... | null | https://raw.githubusercontent.com/tatut/xtdb-inspector/613ded17725119cdfb9b4afda9fcad4595021736/src/xtdb_inspector/page/doc.clj | clojure | PENDING: we could have a live collection
for the history and listen to changes as they happen.
The whole page could be live and show the current doc
and the history. Any changes in db could be listened to
and automatically reflected here.
PENDING: we could also keep a set of all
attributes of id values we encou... | (ns xtdb-inspector.page.doc
"Page that displays a single document."
(:require [ripley.html :as h]
[xtdb-inspector.id :as id]
[xtdb-inspector.ui :as ui]
[xtdb.api :as xt]
[ripley.live.source :as source]
[clojure.set :as set]
[ripley.js :as js]
... |
c579d47d159482fb65b0ff52593107898cba56b9772dcaf6e13e1796e11615d2 | gafiatulin/codewars | MiddlePermutation.hs | Simple Fun # 159 : Middle Permutation
module MiddlePermutation.JorgeVS.Kata where
import Data.List (sort, splitAt)
middlePermutation :: String -> String
middlePermutation s = if o == 1 then b : last a : reverse (init a ++ bs) else last a : reverse (init a ++ b:bs)
where (a, b:bs) = splitAt i . sort $ s
... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/4%20kyu/MiddlePermutation.hs | haskell | Simple Fun # 159 : Middle Permutation
module MiddlePermutation.JorgeVS.Kata where
import Data.List (sort, splitAt)
middlePermutation :: String -> String
middlePermutation s = if o == 1 then b : last a : reverse (init a ++ bs) else last a : reverse (init a ++ b:bs)
where (a, b:bs) = splitAt i . sort $ s
... | |
28c4fdb2db47abe620a6177344f2c19d6a0c885e9473789c7504aeb467be3417 | iu-parfunc/haskell_dsl_tour | Substitution.hs | # LANGUAGE GADTs #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
-- Simultaneous substitution
--
module Substitution where
import AST
import Array.Sugar
| Replace the first variable ( ZeroIdx ) with the given expression . The
-- environment shrinks.
--
inline
:: Elt t
... | null | https://raw.githubusercontent.com/iu-parfunc/haskell_dsl_tour/f75a7e492a1e5d219a77fb128f70441d54a706eb/middle_end/GADT_transforms/src/Substitution.hs | haskell | # LANGUAGE RankNTypes #
Simultaneous substitution
environment shrinks.
| Composition of unary functions.
SEE: [Renaming and Substitution]
SEE: [Weakening]
NOTE: [Renaming and Substitution]
To do things like renaming and substitution, we need some operation on
variables that we push structurally t... | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
module Substitution where
import AST
import Array.Sugar
| Replace the first variable ( ZeroIdx ) with the given expression . The
inline
:: Elt t
=> OpenExp (env, s) aenv t
-> OpenExp env aenv s
-> OpenExp env aenv t
inlin... |
30f3f641f5196747e293653f0be37ef19287334afb8e1a5ed76b561de55e6d76 | hslua/hslua | UtilTests.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : HsLua . Class . UtilTests
Copyright : © 2017 - 2023 : MIT
Maintainer : < tarleb+ >
Stability : stable
Portability : portable
Tests for utility types and functions
Module : HsLua.Class.UtilTests
Copyright : © 2017... | null | https://raw.githubusercontent.com/hslua/hslua/178c225f3da193f09fc27877a5a30e66eef069fb/hslua-classes/test/HsLua/Class/UtilTests.hs | haskell | # LANGUAGE OverloadedStrings #
| Specifications for Attributes parsing functions. | |
Module : HsLua . Class . UtilTests
Copyright : © 2017 - 2023 : MIT
Maintainer : < tarleb+ >
Stability : stable
Portability : portable
Tests for utility types and functions
Module : HsLua.Class.UtilTests
Copyright : © 2017-2023 Albert Krewinkel
License ... |
eba07015592ddaf8cb33be3b21f114d6fa01761c0f8a16f509e19486d88c2d32 | mentat-collective/emmy | rational_function.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.rational-function
(:refer-clojure :exclude [abs])
(:require [clojure.set :as set]
[emmy.complex :refer [complex?]]
[emmy.expression :as x]
[emmy.expression.analyze :as a]
[emmy.function :as f]
[emmy.generic :a... | null | https://raw.githubusercontent.com/mentat-collective/emmy/90a1de10e78187c70d546c3cfd63c8d32b783bed/src/emmy/rational_function.cljc | clojure |
This namespace contains an implementation of rational functions, or rational
fractions; the data structure wraps a numerator `u` and denominator `v` where
either or both are instances of [[p/Polynomial]]. (If both become
non-polynomial, the functions in this namespace drop the [[RationalFunction]]
instance down t... | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.rational-function
(:refer-clojure :exclude [abs])
(:require [clojure.set :as set]
[emmy.complex :refer [complex?]]
[emmy.expression :as x]
[emmy.expression.analyze :as a]
[emmy.function :as f]
[emmy.generic :a... |
fb13c6c315f04dbba41f3e668f0c1aa1f5d8c240fc42050b37685f98496c62f2 | yzh44yzh/cat_traveler | cats_api.erl | -module(cats_api).
-export([enter_town/2, leave_town/2]).
-include("logger.hrl").
-spec enter_town(binary(), binary()) -> ok.
enter_town(CatName, Town) ->
?log_info("~s enters ~s", [CatName, Town]),
Payload = <<
"{\"cat\": \"", CatName/binary,
"\", \"town\": \"", Town/binary, "\"}"
>>,
... | null | https://raw.githubusercontent.com/yzh44yzh/cat_traveler/9f771bec96458cc24bfa123c6d01c6edd52dd5ba/load.agent/src/cats_api.erl | erlang | -module(cats_api).
-export([enter_town/2, leave_town/2]).
-include("logger.hrl").
-spec enter_town(binary(), binary()) -> ok.
enter_town(CatName, Town) ->
?log_info("~s enters ~s", [CatName, Town]),
Payload = <<
"{\"cat\": \"", CatName/binary,
"\", \"town\": \"", Town/binary, "\"}"
>>,
... | |
6aef7f4d28740caad9fc0a14f92a781027195c46c67acf0b7048f05bb7864e96 | binsec/binsec | dba_visitor.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/22ee39aad58219e8837b6ba15f150ba04a498b63/src/dba/dba_visitor.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
240db8d5256e13934389750e2af3942e00b943530c8b74dcb0743824b23a87f6 | kind2-mc/kind2 | proof.ml | This file is part of the Kind 2 model checker .
Copyright ( c ) 2014 by the Board of Trustees of the University of Iowa
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 a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/03149b89bf601f07799343daa7238c3cc68c2f30/src/certif/proof.ml | ocaml | Hard coded options
disable the preprocessor and tell cvc5 to dump proofs
LFSC symbols
let s_iff = H.mk_hstring "iff"
let s_true = H.mk_hstring "true"
let s_term = H.mk_hstring "term"
let s_eq = H.mk_hstring "="
let s_lambda = H.mk_hstring "#"
LFSC types (sexpressions)
LFSC terms (sexpressions)
Type... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2014 by the Board of Trustees of the University of Iowa
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 a... |
f9d8f1a44529b288e315eaa26a93c4209f650dd89ee65d42af589e05b6b0e9dd | ulisses/Static-Code-Analyzer | ChaseImports.hs | -- |
Maintainer : ,
-- Stability : experimental
-- Portability : portable
--
This module is part of ' StrategyLib ' , a library of functional strategy
-- combinators, including combinators for generic traversal. This module
-- defines a generic algorithm for import chasing. This algorithm is not
-- strategic... | null | https://raw.githubusercontent.com/ulisses/Static-Code-Analyzer/4c3f6423d43e1bccb9d1cf04e74ae60d9170186f/Analyzer/Strafunski/Data/Generics/Strafunski/StrategyLib/ChaseImports.hs | haskell | |
Stability : experimental
Portability : portable
combinators, including combinators for generic traversal. This module
defines a generic algorithm for import chasing. This algorithm is not
strategic in nature itself, but usually it will be instantiated with
strategic functions for a particular object language... | Maintainer : ,
This module is part of ' StrategyLib ' , a library of functional strategy
module Strafunski.Data.Generics.Strafunski.StrategyLib.ChaseImports (
ChaseName,
chaseWith,
chaseFile, findFile
) where
import Control.Monad
import System.Directory
This import gives us ( MonadPlus IO ) ! !
import... |
b700e6e20748cd751c0f1913b03726481ed0afcbd8f5f496d8f1834cbe625800 | viercc/matchable | doctest.hs | module Main(main) where
import System.FilePath.Glob as Glob
import Test.DocTest
sourceDir :: FilePath
sourceDir = "src"
sourcePatterns :: [Pattern]
sourcePatterns = Glob.compile <$> [ "**/*.hs", "**/*.lhs" ]
main :: IO ()
main = do
globResult <- globDir sourcePatterns sourceDir
let sourceFiles = [ f | f <- conc... | null | https://raw.githubusercontent.com/viercc/matchable/dc97cfad1434b9e3e086994387303e77c45f5348/test/doctest.hs | haskell | module Main(main) where
import System.FilePath.Glob as Glob
import Test.DocTest
sourceDir :: FilePath
sourceDir = "src"
sourcePatterns :: [Pattern]
sourcePatterns = Glob.compile <$> [ "**/*.hs", "**/*.lhs" ]
main :: IO ()
main = do
globResult <- globDir sourcePatterns sourceDir
let sourceFiles = [ f | f <- conc... | |
49794381b5bd89b07e6ac31eea861aa0a59f5b493595bd133a15d006432981f0 | SimulaVR/godot-haskell | Curve2D.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.Curve2D
(Godot.Core.Curve2D._get_data, Godot.Core.Cu... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/Curve2D.hs | haskell | | Adds a point to a curve at @position@, with control points @in@ and @out@.
| Adds a point to a curve at @position@, with control points @in@ and @out@.
| Removes all points from the curve.
| Removes all points from the curve.
| Returns the cache of points as a @PoolVector2Array@.
| Returns the cache of points a... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.Curve2D
(Godot.Core.Curve2D._get_data, Godot.Core.Cu... |
fb8c89648773a015de33edbc42408997bed9856f98cec67cabad200df2bbdcb8 | spl/emgm | Map.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - orphans #
-----------------------------------------------------------------------------
-- |
-- Module : Map
Copyright : ( c ) 2008 , 2009 Universit... | null | https://raw.githubusercontent.com/spl/emgm/dc16c10137487d7eb97aa851a577be66b46070a2/tests/Map.hs | haskell | ---------------------------------------------------------------------------
|
Module : Map
License : BSD3
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Utility functions
----------------------------... | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - orphans #
Copyright : ( c ) 2008 , 2009 Universiteit Utrecht
Maintainer :
module Map (tests) where
import Prelude hiding (map)
import qualified P... |
dc974a3e4eee46d860535fb500d4ff4a1a8482ab7d7caf48308c7fafabd56ec4 | riemann/riemann | telegram_test.clj | (ns riemann.telegram-test
(:require [riemann.logging :as logging]
[riemann.telegram :refer :all]
[riemann.test-utils :refer [with-mock]]
[clojure.test :refer :all]))
(def api-token (System/getenv "TELEGRAM_API_TOKEN"))
(def chat-id (System/getenv "TELEGRAM_CHAT_ID"))
(when-not ap... | null | https://raw.githubusercontent.com/riemann/riemann/1649687c0bd913c378701ee0b964a9863bde7c7c/test/riemann/telegram_test.clj | clojure | (ns riemann.telegram-test
(:require [riemann.logging :as logging]
[riemann.telegram :refer :all]
[riemann.test-utils :refer [with-mock]]
[clojure.test :refer :all]))
(def api-token (System/getenv "TELEGRAM_API_TOKEN"))
(def chat-id (System/getenv "TELEGRAM_CHAT_ID"))
(when-not ap... | |
42d0f261a1aa3096177ba27e44044591ea427784aa2f5526792269131465fdc8 | susanemcg/pandoc-tufteLaTeX2GitBook | FB2.hs |
Copyright ( c ) 2011 - 2012 ,
All rights reserved .
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 .
This... | null | https://raw.githubusercontent.com/susanemcg/pandoc-tufteLaTeX2GitBook/00c34b4299dd89c4e339e1cde006061918b559ab/pandoc-1.12.4.2/src/Text/Pandoc/Writers/FB2.hs | haskell | | Data to be written at the end of the document:
(foot)notes, URLs, references, images.
^ #, ID, text
^ filename, URL or path
^ list marker of the parent ordered list
^ nesting level of the unordered list
| FictionBook building monad.
^ conversion options
^ document to convert
^ FictionBook2 document (not enc... |
Copyright ( c ) 2011 - 2012 ,
All rights reserved .
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 .
This... |
55d632b40b48cf97ab1eb86738c62d1ba5c0b629ecaf74f692700c61b2d82682 | ygmpkk/house | Complex.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.Complex
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/base/Data/Complex.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Complex
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
Complex numbers.
--------------------------------------------------------... | Copyright : ( c ) The University of Glasgow 2001
module Data.Complex
( Complex((:+))
Implementation checked wrt . 98 lib report , 1/99 .
) where
import Prelude
#ifndef __NHC__
import Data.Typeable
#endif
#ifdef __HUGS__
import Hugs.Prelude(Num(fromInt), Fractional(fromDouble))
#endif
infix... |
6245a0643353b43f0b4669e2b85cfc820ef06c1ec5e8ba4614131434c6720941 | shriram/smol | reader.rkt | #lang s-exp syntax/module-reader
smol/state/semantics
| null | https://raw.githubusercontent.com/shriram/smol/248dcca3e287537d29d455e93b562beedc7132d1/state/lang/reader.rkt | racket | #lang s-exp syntax/module-reader
smol/state/semantics
| |
4cc3aa287d8f3a706ea23d0e9133db5555b61cf59cf260ac0328a4c7ee08aa27 | jeroanan/rkt-coreutils | human-size.rkt | #lang typed/racket/base
Copyright 2020
; See COPYING for details
(provide human-readable-byte-size)
(define (get-human-readable-size [byte-size : Integer]
[unit-size : Integer]
[unit-symbol : String])
(let* ([whole-things (floor (/ byte-size uni... | null | https://raw.githubusercontent.com/jeroanan/rkt-coreutils/571629d1e2562c557ba258b31ce454add2e93dd9/src/repl/util/human-size.rkt | racket | See COPYING for details | #lang typed/racket/base
Copyright 2020
(provide human-readable-byte-size)
(define (get-human-readable-size [byte-size : Integer]
[unit-size : Integer]
[unit-symbol : String])
(let* ([whole-things (floor (/ byte-size unit-size))]
[remain... |
62c85627e92aef4dcda38e14fc3d39efc61b7396a6393bb99071757bed72712d | rescript-lang/rescript-compiler | bytes.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/45d8bbdb515ae6b3cfc35f8363b13635d66a4be6/jscomp/stdlib-406/bytes.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Byte sequence operations
WARNING : Some functions in this file are duplicated in string.ml for
... |
96b4b95de47c784b931b26e2e661b0b258f3ef89393c0be359242fe260ffaf9a | fetburner/compelib | warshallFloyd.ml | module F
(Vertices : sig
type t
type vertex
val iter : (vertex -> unit) -> t -> unit
end)
(Weight : sig
type t
val min : t -> t -> t
val ( + ) : t -> t -> t
val is_finite : t -> bool
end)
(SquareMatrix : sig
type t
type elt = Weight.t
type key = Vertices.vertex
val ... | null | https://raw.githubusercontent.com/fetburner/compelib/d8fc5d9acd04e676c4d4d2ca9c6a7140f1b85670/lib/graph/warshallFloyd.ml | ocaml | module F
(Vertices : sig
type t
type vertex
val iter : (vertex -> unit) -> t -> unit
end)
(Weight : sig
type t
val min : t -> t -> t
val ( + ) : t -> t -> t
val is_finite : t -> bool
end)
(SquareMatrix : sig
type t
type elt = Weight.t
type key = Vertices.vertex
val ... | |
700114fbce4dd1baf71c30be61969ac81fe2000e5aed228f0d9fe03714e9df4b | rotty/spells | delimited-readers.scm | delimited-readers.scm -- unit tests for delimited-readers.scm
Copyright ( C ) 2005 , 2008 , 2009 < >
Author : < >
Start date : Fri Nov 06 , 2005 14:32
;; This program is free software, you can redistribute it and/or
modify it under the terms of the new - style BSD license .
You should have receive... | null | https://raw.githubusercontent.com/rotty/spells/e237bfa3aa4cc5be111423093239a3b4a13c5fb1/tests/delimited-readers.scm | scheme | This program is free software, you can redistribute it and/or
program. If not, see <>.
Commentary:
Code: | delimited-readers.scm -- unit tests for delimited-readers.scm
Copyright ( C ) 2005 , 2008 , 2009 < >
Author : < >
Start date : Fri Nov 06 , 2005 14:32
modify it under the terms of the new - style BSD license .
You should have received a copy of the BSD license along with this
(define (make-line... |
3967665866ebb3be12f27d2504e31f08902dcacd7f6a61799ac8e3d34e3d47be | webyrd/untitled-relational-interpreter-book | operating-systems-supported.scm | unix
windows
| null | https://raw.githubusercontent.com/webyrd/untitled-relational-interpreter-book/247e29afd224586c39c1983e042524c7cc9fe17b/latex/slatex/dialects/operating-systems-supported.scm | scheme | unix
windows
| |
9c688bead0163475c163f8e5950ca9a78429e0904373bb181ac4fdf44d50a1dc | ashinn/alschemist | generate-nasm.scm | ;loading this file populates the tests directory with .asm files and
;calls nasm to assemble them.
;note: the files for seg.scm brt.scm isn't included with this
;Need mzscheme for this atm.
(require (lib "process.ss"))
(define (andmap p lst)
(call-with-current-continuation
(lambda (lose)
(let iter ((lst l... | null | https://raw.githubusercontent.com/ashinn/alschemist/13d7105c1291a881b8d8d69c8e60e045428c04b1/jkode/sassy/tests/generate-nasm.scm | scheme | loading this file populates the tests directory with .asm files and
calls nasm to assemble them.
note: the files for seg.scm brt.scm isn't included with this
Need mzscheme for this atm.
(for-each (lambda (x) (gen-file x #t)) opcode-files) |
(require (lib "process.ss"))
(define (andmap p lst)
(call-with-current-continuation
(lambda (lose)
(let iter ((lst lst))
(cond ((null? lst) '())
((p (car lst)) => (lambda (this) (cons this (iter (cdr lst)))))
(else (lose #f)))))))
(define opcode-files
(list
"tests/mem-ref.scm"
... |
2f86870fe60146fbfaabcb574f50bc5def6605e5faefbb1e0b1187d89e1dc22a | quarklang/QUARK | builtin.ml | (***** list of built-in functions and their interfaces *****)
module A = Ast
module T = Type
(* system-reserved temporary variable prefix *)
let forbidden_prefix = "_QUARK_"
let wrap basic_type = A.DataType(basic_type)
NoneType is a placeholder : len works with any array type
let any_array = A.ArrayType(A... | null | https://raw.githubusercontent.com/quarklang/QUARK/9d57e336ed594347b85df8af825518a8331f8733/quark/builtin.ml | ocaml | **** list of built-in functions and their interfaces ****
system-reserved temporary variable prefix
return arg_types[], return_type
fraction numerator/denominator
complex real/imag parts
**** math section ****
**** matrix section ****
matrix generation
**** qureg section ****
**** quantum gate section ****
s... | module A = Ast
module T = Type
let forbidden_prefix = "_QUARK_"
let wrap basic_type = A.DataType(basic_type)
NoneType is a placeholder : len works with any array type
let any_array = A.ArrayType(A.NoneType)
NoneType is a placeholder , works with any matrix type
let any_matrix = A.MatrixType(A.NoneType)
... |
027d9c780693230d2cfd89573ceeeb864cfb15d20ddd7cee44141f138ec1d528 | ailisp/Graphic-Forms | menu-item.lisp | (in-package :graphic-forms.uitoolkit.widgets)
;;;
;;; helper functions
;;;
(defun get-menuitem-state (hmenu mid)
(cffi:with-foreign-object (mii-ptr '(:struct gfs::menuiteminfo))
(cffi:with-foreign-slots ((gfs::cbsize gfs::mask gfs::type
gfs::state gfs::id gfs::hsubmenu
... | null | https://raw.githubusercontent.com/ailisp/Graphic-Forms/1e0723d07e1e4e02b8ae375db8f3d65d1b444f11/src/uitoolkit/widgets/menu-item.lisp | lisp |
helper functions
methods
| (in-package :graphic-forms.uitoolkit.widgets)
(defun get-menuitem-state (hmenu mid)
(cffi:with-foreign-object (mii-ptr '(:struct gfs::menuiteminfo))
(cffi:with-foreign-slots ((gfs::cbsize gfs::mask gfs::type
gfs::state gfs::id gfs::hsubmenu
gfs::hbmp... |
98372238d550c1e7f6e3cf76e283f946515cefe78acac8e4cb9dc1c779b1aef9 | drewt/scmus | getopt.scm | ;;
Copyright 2014 - 2020
;;
;; 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.
;;
;; This program is distributed in ... | null | https://raw.githubusercontent.com/drewt/scmus/5041ec376cb17db463117b8fa212b16b23fe770d/src/getopt.scm | scheme |
This program is free software; you can redistribute it and/or
either version 2 of the
License, or (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 PURPOS... | Copyright 2014 - 2020
modify it under the terms of the GNU General Public License as
You should have received a copy of the GNU General Public License
(module (drewt getopt)
(mkopt
process-opts
usage
store-true
store-one
store-all
store-number)
(import scheme
(only... |
13d9c65b2ec651f09b25b5a868604c0deff3c781f3844184b526bf7a2b05cd99 | ten0s/syntaxerl | syntaxerl_terms.erl | -module(syntaxerl_terms).
-author("Dmitry Klionsky <>").
-behaviour(syntaxerl).
-export([
check_syntax/3,
output_error/1,
output_warning/1
]).
-include("check_syntax_spec.hrl").
%% ===================================================================
%% API
%% =============================================... | null | https://raw.githubusercontent.com/ten0s/syntaxerl/fc5113c68f0ce0c6ef43216e2b3483b090c6dd86/src/syntaxerl_terms.erl | erlang | ===================================================================
API
===================================================================
===================================================================
=================================================================== | -module(syntaxerl_terms).
-author("Dmitry Klionsky <>").
-behaviour(syntaxerl).
-export([
check_syntax/3,
output_error/1,
output_warning/1
]).
-include("check_syntax_spec.hrl").
check_syntax(FileName, _BaseFileName, _Debug) ->
case file:open(FileName, [read]) of
{ok, Fd} ->
R = ... |
7650d47d0a10568184df3e53755dabd2d1c0d282ffbf22788495811afb19c8fb | htm-community/clortex | persistent_neuron.clj | (ns clortex.domain.neuron.persistent-neuron
(require [clortex.protocols :refer :all]))
(extend-type datomic.query.EntityMap
PNeuron
(neuron-index [this] (:neuron/index this))
(neuron-id [this] (:neuron/uuid this))
(distal-dendrites [this] (:neuron/distal-dendrites this))
(proximal-dendrite [this] (:neuron/... | null | https://raw.githubusercontent.com/htm-community/clortex/69003a352140510f47c6b8e18ad6a98a7b5a3bba/src/clortex/domain/neuron/persistent_neuron.clj | clojure | (ns clortex.domain.neuron.persistent-neuron
(require [clortex.protocols :refer :all]))
(extend-type datomic.query.EntityMap
PNeuron
(neuron-index [this] (:neuron/index this))
(neuron-id [this] (:neuron/uuid this))
(distal-dendrites [this] (:neuron/distal-dendrites this))
(proximal-dendrite [this] (:neuron/... | |
08803ea065548dd342f65b178e7c57dc58ca411bea03668964a3a16d0a668d77 | meamy/feynman | Unitary.hs | |
Module : Unitary
Description : Extraction of Unitary path sums to circuits
Copyright : ( c ) , 2021
Maintainer :
Stability : experimental
Portability : portable
Module : Unitary
Description : Extraction of Unitary path sums to circuits
Copyright : (c) Matthew Amy, 2021
Maintainer... | null | https://raw.githubusercontent.com/meamy/feynman/2291ef5c388652dd352509da1d424e3fbd7b8da5/src/Feynman/Synthesis/Pathsum/Unitary.hs | haskell | ----------------------------------
Types
----------------------------------
| Create a bidirectional context from a mapping from IDs to indices
| Deprecated, need a type class
----------------------------------
Utilities
----------------------------------
| ID for the ith variable
| index for a qubit ID
| Comp... | |
Module : Unitary
Description : Extraction of Unitary path sums to circuits
Copyright : ( c ) , 2021
Maintainer :
Stability : experimental
Portability : portable
Module : Unitary
Description : Extraction of Unitary path sums to circuits
Copyright : (c) Matthew Amy, 2021
Maintainer... |
eca2484cf7cf427ec4b1b932d61df5f393f829636735e86b3737bfe78cb0e317 | realworldocaml/book | foreign_sources.ml | open Import
open Dune_file
module Library = Dune_file.Library
TODO : This is a strange module ; it seems to add unnecessary indirection for
accessing foreign sources . It 's worth checking if it can be simplified away .
Before this module is removed , there should be a good way to handle new types
of... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/foreign_sources.ml | ocaml | TODO: Make this more type-safe by switching to non-empty lists. | open Import
open Dune_file
module Library = Dune_file.Library
TODO : This is a strange module ; it seems to add unnecessary indirection for
accessing foreign sources . It 's worth checking if it can be simplified away .
Before this module is removed , there should be a good way to handle new types
of... |
eeb6aa115b615504dcba4c0c3a81dbb5396832c2ffc5a59cd3cc75d138dbb83e | sogaiu/alc.index-defs | paths.clj | (ns alc.index-defs.impl.paths
(:require
[clojure.java.io :as cji]
[clojure.java.shell :as cjs]
[clojure.string :as cs]))
windows 10 PATHEXT default ? :
;; .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
(defn which
[bin-name]
(let [paths (cs/split (or (System/getenv "PATH") "")
... | null | https://raw.githubusercontent.com/sogaiu/alc.index-defs/03a3c7184360c578dc8e8f42e6a453b4431b6593/src/alc/index_defs/impl/paths.clj | clojure | .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
for windows
adapted work by taylorwood
XXX: yarn over npx -- provide way to force one?
min version of shadow-cljs 2.8.53 for classpath ability | (ns alc.index-defs.impl.paths
(:require
[clojure.java.io :as cji]
[clojure.java.shell :as cjs]
[clojure.string :as cs]))
windows 10 PATHEXT default ? :
(defn which
[bin-name]
(let [paths (cs/split (or (System/getenv "PATH") "")
(re-pattern (java.io.File/pathSeparator)))
pathext... |
bd770688cc4cc3882f3478ffd4c1ea0021118cce2d8b7096a86af5a7b5d7e2fa | onedata/op-worker | transfer_rest_routes.erl | %%%--------------------------------------------------------------------
%%% This file has been automatically generated from Swagger
%%% specification - DO NOT EDIT!
%%%
( C ) 2019 - 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%----------------------... | null | https://raw.githubusercontent.com/onedata/op-worker/a06e0e0064e2cbea4706df1dc2dde12e0aa77091/src/http/rest/routes/transfer_rest_routes.erl | erlang | --------------------------------------------------------------------
This file has been automatically generated from Swagger
specification - DO NOT EDIT!
@end
--------------------------------------------------------------------
@doc
This module contains definitions of transfer REST methods.
@end
---------------... | ( C ) 2019 - 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(transfer_rest_routes).
-include("http/rest.hrl").
-export([routes/0]).
-spec routes() -> [{binary(), module(), #rest_req{}}].
routes() -> [
{<<"/spaces/:sid/transfers">>, rest_handler, ... |
d5b9873c0ae5b8964aea10dbb9b3f0921ab42ae3eb8cd0f370878ec775b16bb8 | mbutterick/quad | markup.rkt | #lang debug racket/base
;; `quadwriter/markup` was a misleading name for this dialect
;; it is now `quadwriter/html`,
;; but we will make `quadwriter/markup` work the same way for compatibility
(require "html.rkt")
(provide (all-from-out "html.rkt"))
(module reader racket/base
(require (submod "html.rkt" reader))
... | null | https://raw.githubusercontent.com/mbutterick/quad/395447f35c2fb9fc7b6199ed185850906d80811d/quadwriter/markup.rkt | racket | `quadwriter/markup` was a misleading name for this dialect
it is now `quadwriter/html`,
but we will make `quadwriter/markup` work the same way for compatibility | #lang debug racket/base
(require "html.rkt")
(provide (all-from-out "html.rkt"))
(module reader racket/base
(require (submod "html.rkt" reader))
(provide (all-from-out (submod "html.rkt" reader)))) |
5f69a235ab2801f31d5933b3df8115c539e20808169849acb7d7fae4da852c09 | spell-music/csound-expression | Osc.hs | -- | Open Sound Control.
module Csound.Control.Osc(
OscHost, OscPort, OscAddress, OscType, OscRef,
-- * Server
initOsc, listenOsc, ListenOsc, OscVal,
listenOscVal, listenOscSig, listenOscSig2,
-- * Client
sendOsc
) where
import Csound.Typed
type ListenOsc a = OscAddress -> a -> SE a
-- | List... | null | https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression/src/Csound/Control/Osc.hs | haskell | | Open Sound Control.
* Server
* Client
| Listens for continuous signal from OSC-channel
> listenOscSig host address initValue
| Listens for pair of continuous signals from OSC-channel
> listenOscSig2 host address initValue | module Csound.Control.Osc(
OscHost, OscPort, OscAddress, OscType, OscRef,
initOsc, listenOsc, ListenOsc, OscVal,
listenOscVal, listenOscSig, listenOscSig2,
sendOsc
) where
import Csound.Typed
type ListenOsc a = OscAddress -> a -> SE a
listenOscSig :: OscRef -> OscAddress -> Sig -> SE Sig
listenOscSig... |
8fb4760b9afffbfdd45a2a1f203456c9be2b82b50bc300fbfb19aaaa7207d555 | nd/bird | 4.3.10.hs | quadruples :: Int -> [(Int, Int, Int, Int)]
quadruples n = [(a, b, c, d) | a <- [1..n], b <- [a..n], c <- [1..n], d <- [c..n], square a + square b == square c + square d]
square :: Int -> Int
square a = a * a
-- I'm not quite sure what 'distinct' quadruples means. I suppose it
-- is quadruples of form (a, b, c, d) a... | null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch04/4.3.10.hs | haskell | I'm not quite sure what 'distinct' quadruples means. I suppose it
is quadruples of form (a, b, c, d) and (b, a, d, c) are not
distinct | quadruples :: Int -> [(Int, Int, Int, Int)]
quadruples n = [(a, b, c, d) | a <- [1..n], b <- [a..n], c <- [1..n], d <- [c..n], square a + square b == square c + square d]
square :: Int -> Int
square a = a * a
|
cd7ec32140ad3fcba2a85eb1a4d5a5f66679d7eb2b8425ad0ad237f0fab6fd78 | cyga/real-world-haskell | csv9.hs | -- file: ch16/csv9.hs
import Text.ParserCombinators.Parsec
csvFile = endBy line eol
line = sepBy cell (char ',')
cell = quotedCell <|> many (noneOf ",\n\r")
quotedCell =
do char '"'
content <- many quotedChar
char '"' <?> "quote at end of cell"
return content
quotedChar =
noneOf "\"... | null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch16/csv9.hs | haskell | file: ch16/csv9.hs | import Text.ParserCombinators.Parsec
csvFile = endBy line eol
line = sepBy cell (char ',')
cell = quotedCell <|> many (noneOf ",\n\r")
quotedCell =
do char '"'
content <- many quotedChar
char '"' <?> "quote at end of cell"
return content
quotedChar =
noneOf "\""
<|> try (string ... |
1a8b8615a35d78e7832ae5b426cf68eac8309076fe4e839472219fb684585209 | Kappa-Dev/KappaTools | locality.ml | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/777835b82f449d3d379713df76ff25fd5926b762/core/dataStructures/locality.ml | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
type position = { chr: int; line: int }
type range = { file : string ;
from_position: position;
to_position: position }
type t = range
type 'a annot = 'a * t
type 'a maybe = ?pos:t -> 'a
let of_pos start_lo... |
c4b526c681f2292326bcbcae9ed2676a10e8341e543a1861783e5546ff35bdfc | jiujiu1123/defensive-to-contracts | main.rkt | #lang racket
(require "chspans.rkt")
(require "definitions.rkt")
(require "syntax-to-contract.rkt")
(require "textedit.rkt")
(define/contract (contract-infos-on-path path)
(-> path-string? (listof func-contract-info?))
(define path-str (if (string? path)
path
(path->s... | null | https://raw.githubusercontent.com/jiujiu1123/defensive-to-contracts/f64d8cb80a17fb981eb8269ef15f1fdb2f4d190b/main.rkt | racket | #lang racket
(require "chspans.rkt")
(require "definitions.rkt")
(require "syntax-to-contract.rkt")
(require "textedit.rkt")
(define/contract (contract-infos-on-path path)
(-> path-string? (listof func-contract-info?))
(define path-str (if (string? path)
path
(path->s... | |
3f667b93a533d316a16189676f39c59d1121894d2d53affcae98471d8e72d47f | bhaskara/programmable-reinforcement-learning | calisp-io-int-observer.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; calisp/obs/calisp-io-int-observer.lisp - defines <calisp-io-int-observer>,
;; the kind of observer used by the io interface
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package calisp)
... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/concurrent-alisp/obs/calisp-io-int-observer.lisp | lisp |
calisp/obs/calisp-io-int-observer.lisp - defines <calisp-io-int-observer>,
the kind of observer used by the io interface
Definitions
methods
|
(in-package calisp)
(defvar *hist* nil
"When the IO interface is running, holds the trajectory of joint states seen during execution. This provides a quick way to generate joint state objects - just use the IO interface to get where you want, then stop and use the last item of *hist*. Set to a fresh vecto... |
2c8080663637238b899899a7e881417583fce5438546128f7ed5d0c631488be9 | NorfairKing/validity | Containers.hs | module Data.GenValidity.Containers
( module Containers,
)
where
import Data.GenValidity.Map as Containers
import Data.GenValidity.Sequence as Containers
import Data.GenValidity.Set as Containers
import Data.GenValidity.Tree as Containers
| null | https://raw.githubusercontent.com/NorfairKing/validity/86a824729519c154c23f0757f2ce4b9ab93b675a/genvalidity-containers/src/Data/GenValidity/Containers.hs | haskell | module Data.GenValidity.Containers
( module Containers,
)
where
import Data.GenValidity.Map as Containers
import Data.GenValidity.Sequence as Containers
import Data.GenValidity.Set as Containers
import Data.GenValidity.Tree as Containers
| |
c640c0071685cb8f54e44d2687d8f7fcef888aa83185b9003317b766c097edc6 | seckcoder/iu_c311 | racket-lazy-demo1.rkt | #lang racket
(require (prefix-in s: lazy)
(prefix-in s: "./lazy.rkt"))
(s:! ((s:! s:foo)))
(let ((v (s:flatmap (lambda (v)
(list v))
s:ones)))
(s:car (s:! v))
(s:! (s:cdr (s:! v))))
| null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/logic/racket-lazy-demo1.rkt | racket | #lang racket
(require (prefix-in s: lazy)
(prefix-in s: "./lazy.rkt"))
(s:! ((s:! s:foo)))
(let ((v (s:flatmap (lambda (v)
(list v))
s:ones)))
(s:car (s:! v))
(s:! (s:cdr (s:! v))))
| |
880b5b5d2d9ab4f946f7009e16e389099c9cd9d70a79f4dcb65bf86bc9380369 | lantiga/redlock-clj | core.clj | (ns redlock-clj.core
(:require [taoensso.carmine :as car :refer (wcar)]))
(def unlock-script
"if redis.call ('get',KEYS[1]) == ARGV [1] then
return redis.call ('del',KEYS[1])
else
return 0
end")
(defn- quorum
[n-tot]
(-> n-tot (quot 2) (+ 1)))
(defn- lock-instance!
[server resource valu... | null | https://raw.githubusercontent.com/lantiga/redlock-clj/97a1add654bd4330979c377f4ea636ce741e8807/src/redlock_clj/core.clj | clojure | (ns redlock-clj.core
(:require [taoensso.carmine :as car :refer (wcar)]))
(def unlock-script
"if redis.call ('get',KEYS[1]) == ARGV [1] then
return redis.call ('del',KEYS[1])
else
return 0
end")
(defn- quorum
[n-tot]
(-> n-tot (quot 2) (+ 1)))
(defn- lock-instance!
[server resource valu... | |
95abd0016ea23ea6993231782593d4e7b68c77e338ad3b8172d6d745622cbd0e | efcasado/behaviours2 | dummy_module_tests.erl | %%%========================================================================
%%% File: dummy_module_tests.erl
%%%
%%% Unit tests for the 'echo_server' module.
%%%
%%%
Author : < >
Date : February , 2015
%%%
%%%-- LICENSE -------------------------------------------------------------
The MIT License ( MIT )
%%... | null | https://raw.githubusercontent.com/efcasado/behaviours2/95190c212d0c28a89a62b451005e211c71176c7f/tests/dummy_module_tests.erl | erlang | ========================================================================
File: dummy_module_tests.erl
Unit tests for the 'echo_server' module.
-- LICENSE -------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software ... | Author : < >
Date : February , 2015
The MIT License ( MIT )
Copyright ( c ) 2015
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
in all copie... |
666a7bd59abccc1f6fc96289cc829d1edbdc673d33ea941c0f47c8081341119b | samply/blaze | api_test_perf.clj | (ns blaze.db.api-test-perf
(:require
[blaze.db.api :as d]
[blaze.db.kv :as kv]
[blaze.db.kv.mem]
[blaze.db.node]
[blaze.db.resource-handle-cache]
[blaze.db.resource-store :as rs]
[blaze.db.resource-store.kv :as rs-kv]
[blaze.db.search-param-registry]
[blaze.db.tx-cache]
[blaze.... | null | https://raw.githubusercontent.com/samply/blaze/ccfad24c890c25a87ba4e3cde035ba8dbfd4d239/modules/db/test-perf/blaze/db/api_test_perf.clj | clojure | (ns blaze.db.api-test-perf
(:require
[blaze.db.api :as d]
[blaze.db.kv :as kv]
[blaze.db.kv.mem]
[blaze.db.node]
[blaze.db.resource-handle-cache]
[blaze.db.resource-store :as rs]
[blaze.db.resource-store.kv :as rs-kv]
[blaze.db.search-param-registry]
[blaze.db.tx-cache]
[blaze.... | |
59e724fbce132d68be31c75523f4d91dc98f2f5efa3af95fd24257edff4eea44 | RJ/mochiweb-websockets | mochiweb_html.erl | @author < >
2007 Mochi Media , Inc.
@doc Loosely tokenizes and generates parse trees for HTML 4 .
-module(mochiweb_html).
-export([tokens/1, parse/1, parse_tokens/1, to_tokens/1, escape/1,
escape_attr/1, to_html/1]).
%% This is a macro to placate syntax highlighters..
-define(QUOTE, $\").
-define(S... | null | https://raw.githubusercontent.com/RJ/mochiweb-websockets/aded564a1a647157258d54f346bbb5231b07550e/src/mochiweb_html.erl | erlang | This is a macro to placate syntax highlighters..
@type html_node() = {string(), [html_attr()], [html_node() | string()]}
@type html_attr() = {string(), string()}
@type html_token() = html_data() | start_tag() | end_tag() | inline_html() | html_comment() | html_doctype()
@type html_data() = {data, string(), Whitesp... | @author < >
2007 Mochi Media , Inc.
@doc Loosely tokenizes and generates parse trees for HTML 4 .
-module(mochiweb_html).
-export([tokens/1, parse/1, parse_tokens/1, to_tokens/1, escape/1,
escape_attr/1, to_html/1]).
-define(QUOTE, $\").
-define(SQUOTE, $\').
-define(ADV_COL(S, N),
S#decode... |
bacb3c088e58d40f8eba3cf787a4ce911d0f0c7af13d02c5c929773eeb05d7d4 | MercuryTechnologies/ghc-specter | Session.hs | module GHCSpecter.Render.Session (
render,
) where
import Concur.Core (Widget)
import Concur.Replica (
classList,
onClick,
style,
)
import Control.Lens (to, (^.))
import Data.IntMap qualified as IM
import Data.List (partition)
import Data.Maybe (fromMaybe, isJust)
import Data.Text qualified as T
import Data.T... | null | https://raw.githubusercontent.com/MercuryTechnologies/ghc-specter/d911e610e0ee0fb43497dad9e762fec2abbf9e08/daemon/src/GHCSpecter/Render/Session.hs | haskell | | Top-level render function for the Session tab. | module GHCSpecter.Render.Session (
render,
) where
import Concur.Core (Widget)
import Concur.Replica (
classList,
onClick,
style,
)
import Control.Lens (to, (^.))
import Data.IntMap qualified as IM
import Data.List (partition)
import Data.Maybe (fromMaybe, isJust)
import Data.Text qualified as T
import Data.T... |
ee4164e08038d13009e2536a77126d3d299c1f931bdfa7ac143e926a993c20c4 | ghuysmans/ocaml-fet | activities.mli | module Tag : sig
type t = [`Activity_tag] No_plus.t
val of_string : string -> t
end
type t = private {
students: Class.t Plus.t;
subject: string;
teachers: Teacher.t Plus.t;
tags: Tag.t Plus.t;
duration: (int * int list) option;
min_days: int option;
weight: float option;
consecutive: bool option;
... | null | https://raw.githubusercontent.com/ghuysmans/ocaml-fet/e1f2ce9e500e16e6d181baf9e440ede21d740ef7/lib/activities.mli | ocaml | module Tag : sig
type t = [`Activity_tag] No_plus.t
val of_string : string -> t
end
type t = private {
students: Class.t Plus.t;
subject: string;
teachers: Teacher.t Plus.t;
tags: Tag.t Plus.t;
duration: (int * int list) option;
min_days: int option;
weight: float option;
consecutive: bool option;
... | |
a9001a9493ef1dc714896ff1a4fecacad441cfed921f7979120a18943c111ce4 | Shirakumo/kandria | helpers.lisp | (in-package #:org.shirakumo.fraf.kandria)
(define-pool kandria)
(define-pool sound :base "sound/")
(define-pool music :base "music/")
(defvar *install-root* NIL)
(defun set-pool-paths-from-install (install)
(setf *install-root* install)
(pushnew *install-root* cffi:*foreign-library-directories* :test #'equalp)
... | null | https://raw.githubusercontent.com/Shirakumo/kandria/0eafe60b5f50c18980a6acc977dc45987e8e26c1/helpers.lisp | lisp | (in-package #:org.shirakumo.fraf.kandria)
(define-pool kandria)
(define-pool sound :base "sound/")
(define-pool music :base "music/")
(defvar *install-root* NIL)
(defun set-pool-paths-from-install (install)
(setf *install-root* install)
(pushnew *install-root* cffi:*foreign-library-directories* :test #'equalp)
... | |
4213cfaa1b31b129eec7585ab024be82c78143aafa55091565b90c8bbe86532e | eyedouble/couchdb | couchdb_databases_tests.erl | -module(couchdb_databases_tests).
-include_lib("eunit/include/eunit.hrl").
-include ("../src/dev.hrl" ).
-include("../../test_helper.hrl").
%
% HELPER
%
init() ->
{ok, _} = application:ensure_all_started(couchdb),
{ok, Server} = couchdb:server_record(<<":5984">>),
[ catch couchdb_databases:delete(Serv... | null | https://raw.githubusercontent.com/eyedouble/couchdb/39830e536e803dfb492bfdb8b3644839cdd7e356/test/sections/couchdb_databases/couchdb_databases_tests.erl | erlang |
HELPER
TESTS
Bulk Docs
| -module(couchdb_databases_tests).
-include_lib("eunit/include/eunit.hrl").
-include ("../src/dev.hrl" ).
-include("../../test_helper.hrl").
init() ->
{ok, _} = application:ensure_all_started(couchdb),
{ok, Server} = couchdb:server_record(<<":5984">>),
[ catch couchdb_databases:delete(Server, MockDb) || ... |
89cc0d39a5bfd01686a3bd0902394e8eac22857411f96ad9d1c09946577b65a6 | caisah/sicp-exercises-and-examples | ex.3.4.scm | ;; Modify the make-account procedure of Ex.3.3 by adding another local state variable
so that if an account is accessed more than seven consecutive times with an incorrect
;; password int invokes the procedure call-the cops.
(define (make-account balance password)
(define wrong-tries 0)
(define (call-the-cops)
... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/3.1.1-local_state_variables/ex.3.4.scm | scheme | Modify the make-account procedure of Ex.3.3 by adding another local state variable
password int invokes the procedure call-the cops. | so that if an account is accessed more than seven consecutive times with an incorrect
(define (make-account balance password)
(define wrong-tries 0)
(define (call-the-cops)
"I just dialed 911. The cops know who you are!")
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance (... |
794633a0c325e5b334181511052be4f135b560c59dcf0abd4684bd1973e39ab0 | jbracker/supermonad | MainSupermonad.hs |
# LANGUAGE TypeOperators #
# LANGUAGE RebindableSyntax #
-- Requires for instances
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
-- Use the supermonad plugin.
{-# OPTIONS_GHC -fplugin Control.Supermonad.Plugin #-}
# OPTIONS_GHC -fno - warn - orphans #
-- Remove this so compilation creates a prop... | null | https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/examples/monad/session/MainSupermonad.hs | haskell | Requires for instances
Use the supermonad plugin.
# OPTIONS_GHC -fplugin Control.Supermonad.Plugin #
Remove this so compilation creates a proper executable. |
# LANGUAGE TypeOperators #
# LANGUAGE RebindableSyntax #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module MainPolymonad ( main ) where
import Control.Supermonad.Prelude
import Control.Monad.Indexed
( IxPointed(..), (>>>=) )
import Data.Functor.Index... |
4930b623ab90829126a9d3d79207bd33421a526cb4f6237d954115664bd06ef3 | brandonbloom/metaclj | transform.clj | (ns metaclj.impl.transform
(:require [metaclj.impl.env :as env]
[metaclj.impl.parse :refer [parse head syntax?]]))
(defn rename [sym]
(gensym (str sym "$")))
(defn meta-macro? [{:keys [origin value]}]
(and (= origin :namespace) (-> value meta :meta-macro)))
(defn macro? [{:keys [origin value]}]
(... | null | https://raw.githubusercontent.com/brandonbloom/metaclj/444106fe5c1f35e4fd056f8011df0096550e7b40/src/metaclj/impl/transform.clj | clojure | XXX (expansion? value) (transform (assoc ast :f (:expr value)))
XXX use meta | (ns metaclj.impl.transform
(:require [metaclj.impl.env :as env]
[metaclj.impl.parse :refer [parse head syntax?]]))
(defn rename [sym]
(gensym (str sym "$")))
(defn meta-macro? [{:keys [origin value]}]
(and (= origin :namespace) (-> value meta :meta-macro)))
(defn macro? [{:keys [origin value]}]
(... |
750541720f359b05164ffccdda27a2a08fd12ac71fe5da583bbb7cabd9d3e51a | lsrcz/grisette | Traversable.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
-- |
Module : . Lib . Control .
Copyright : ( c ) 2021 - 2023
-- License : BSD-3-Clause (see the LICENSE file)
--
-- Maintainer :
-- Stability : Experimental
Portability : GHC only
module Gri... | null | https://raw.githubusercontent.com/lsrcz/grisette/51d492f60fb37b74a626b591ec4c7ed128fa6217/src/Grisette/Lib/Data/Traversable.hs | haskell | # LANGUAGE RankNTypes #
|
License : BSD-3-Clause (see the LICENSE file)
Maintainer :
Stability : Experimental | # LANGUAGE ScopedTypeVariables #
# LANGUAGE Trustworthy #
Module : . Lib . Control .
Copyright : ( c ) 2021 - 2023
Portability : GHC only
module Grisette.Lib.Data.Traversable
* mrg * variants for operations in " Data . "
mrgTraverse,
mrgSequenceA,
mrgFor,
mrgMapM,
mrg... |
9e2c8df99a542c7187d17f41fcd6dd3584708b42c52906a7b7f7bd98f996fbfc | c-cube/trustee | logger.ml |
module Fmt = CCFormat
type t = {
buf: Buffer.t;
fmt: Format.formatter;
lock: Mutex.t;
mutable chans: out_channel list;
}
let create () : t =
let buf = Buffer.create 128 in
let fmt = Format.formatter_of_buffer buf in
let lock = Mutex.create() in
Fmt.set_color_tag_handling fmt;
{ buf; fmt; lock; chan... | null | https://raw.githubusercontent.com/c-cube/trustee/e783ab401026792d453ebe9b9d1bf936dee8b4db/src/opentheory/logger.ml | ocaml | output content of [self.buf] |
module Fmt = CCFormat
type t = {
buf: Buffer.t;
fmt: Format.formatter;
lock: Mutex.t;
mutable chans: out_channel list;
}
let create () : t =
let buf = Buffer.create 128 in
let fmt = Format.formatter_of_buffer buf in
let lock = Mutex.create() in
Fmt.set_color_tag_handling fmt;
{ buf; fmt; lock; chan... |
17c6759df74b590291a494632ce220c5baee76cb808cc1b97e6b80215ed4e6c7 | tonyday567/mvc-todo | Controllers.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - type - defaults #
module Todo.Controllers where
import Todo.Vanilla
( docElement
, onWindow
, on
, delegate
, Element(..)
, keyCode
, itemId
, getHash
, elementOf
, getValue
, JSVal
... | null | https://raw.githubusercontent.com/tonyday567/mvc-todo/13b2e52f1169c77caf528d3ce74901ad6f06eec6/src/Todo/Controllers.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - type - defaults #
module Todo.Controllers where
import Todo.Vanilla
( docElement
, onWindow
, on
, delegate
, Element(..)
, keyCode
, itemId
, getHash
, elementOf
, getValue
, JSVal
, toJSVal)
import MVC hiding (... |
fbbc8ebb4200bedcebc0261c7af158877b2ec65f3693b31f320091d19999ea39 | haskellari/splitmix | Initialization.hs | module Main (main) where
import Control.Monad (forM_, replicateM)
import Data.List (tails)
import Test.HUnit (assertFailure)
import qualified System.Random.SplitMix as SM
import qualified System.Random.SplitMix32 as SM32
main :: IO ()
main = do
g64 <- replicateM 10 (fmap show SM.initSMGen)
putStrLn ... | null | https://raw.githubusercontent.com/haskellari/splitmix/f89a4bb6a5f87565d15e88c3b3c0023546bbd0ff/tests/Initialization.hs | haskell | module Main (main) where
import Control.Monad (forM_, replicateM)
import Data.List (tails)
import Test.HUnit (assertFailure)
import qualified System.Random.SplitMix as SM
import qualified System.Random.SplitMix32 as SM32
main :: IO ()
main = do
g64 <- replicateM 10 (fmap show SM.initSMGen)
putStrLn ... | |
00a043bc922159abf34fee1ac47e99dbac8c5ebb818ab1546c86e82b064c9a2e | ocsigen/ocaml-eliom | tcallback.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/callback/tcallback.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1995 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
external mycallback1 : ('a -> 'b) -> 'a -> 'b = "mycallback1"
external mycallback2 : ('a -> 'b -> 'c) -> ... |
880b98e7205896be1fcdd1ab51374772141fbd8d24017c6ec7a5df00a4dae2d9 | input-output-hk/plutus-apps | Generators.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeFamilies #-}
module Plutus.Script.Utils.V2.Generators
( alwaysSucceedValidator
, alwaysSucceedValidatorHash
, alwaysSucceedPolicy
, PV1.someTokenValue
) where
import Plutus.V2.Ledger.Api qualified as PV2
import Plutu... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/5ff40dafcdb07483442093efb4eaa39d12f34880/plutus-script-utils/src/Plutus/Script/Utils/V2/Generators.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies # | # LANGUAGE TemplateHaskell #
module Plutus.Script.Utils.V2.Generators
( alwaysSucceedValidator
, alwaysSucceedValidatorHash
, alwaysSucceedPolicy
, PV1.someTokenValue
) where
import Plutus.V2.Ledger.Api qualified as PV2
import PlutusTx qualified
import Plutus.Script.Utils.V1.Generators qualified ... |
f2735eac8308faee882ef2369fd59241ba25e0bd171a1b99877e2057a32deb20 | typeclasses/assoc-list | Concept.hs | module Data.AssocList.List.Concept
(
-- * Association list type
AssocList
-- * Related modules
$ relatedModules
-- * Exception
, MissingAssocListKey (..)
) where
-- base
import Control.Exception (Exception)
import Data.Typeable (Typeable)
import Prelude (Eq, Show)
$... | null | https://raw.githubusercontent.com/typeclasses/assoc-list/c22ff8ba2057545015bccf24d71a14358b01627e/assoc-list/src/Data/AssocList/List/Concept.hs | haskell | * Association list type
* Related modules
* Exception
base
on the keys
* "Data.AssocList.List.Equivalence" - Most of the same functions as
the @Eq@ module, but with an @Equivalence@ parameter instead of an
@Eq@ constraint
* "Data.AssocList.List.Predicate" - Most of the same functions as the
@Eq@ modul... | module Data.AssocList.List.Concept
(
AssocList
$ relatedModules
, MissingAssocListKey (..)
) where
import Control.Exception (Exception)
import Data.Typeable (Typeable)
import Prelude (Eq, Show)
$ relatedModules
* " Data . AssocList . List . that involve @Eq@ constraints
... |
2af755f4ad67d4e53c8d41ac9866f9380612a8a06643343a376a4fd334c79cc2 | ryanpbrewster/haskell | penultimate_word.hs | -- penultimate_word.hs
- Write a program which finds the next - to - last word in a string .
-
- Input sample :
-
- Your program should accept as its first argument a path to a filename . Input example is the following
-
- some line with text
- another line
- Each line has more than one word ... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/penultimate_word.hs | haskell | penultimate_word.hs |
- Write a program which finds the next - to - last word in a string .
-
- Input sample :
-
- Your program should accept as its first argument a path to a filename . Input example is the following
-
- some line with text
- another line
- Each line has more than one word .
-
- Output samp... |
c9dd6093a0defcb2d03ee2a90653991b495e08fa8cdc8843102d780c3cc9482e | mzp/coq-for-ipad | frx_req.ml | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of Objective Caml
(* *)
, , and ... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/otherlibs/labltk/frx/frx_req.ml | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of Objective Caml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
a74875397162c680870b0901ce33b468f609d4c17c8fdd162202c374341a04e1 | backtracking/mlpost | pgf.ml | (**************************************************************************)
(* *)
Copyright ( C ) Johannes Kanig ,
, and
(* *)
(* This software is f... | null | https://raw.githubusercontent.com/backtracking/mlpost/e82db2d3766f24392956478496fa26c8837c1fef/src/pgf.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C ) Johannes Kanig ,
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
open Point_lib
open Matrix
module P = Picture_lib
module S = Spline_lib
open Dviinterp
let fprintf = F... |
a8c838d283aa8773ddba0e5705852bd00a1939a12e37aab7dc51491ee2327ae7 | adventuring/tootsville.net | slash-version.lisp | ;;;; -*- lisp -*-
;;;
src / endpoints / slash - version.lisp is part of
;;;
Copyright © 2008 - 2017 Bruce - Robert Pocock ; © 2018 - 2021 The
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
;;;
This program is Free Software : you can redistribute it and/or
mo... | null | https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/endpoints/slash-version.lisp | lisp | -*- lisp -*-
© 2018 - 2021 The
either version 3 of
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
Affero General Public License for more det... | src / endpoints / slash - version.lisp is part of
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
This program is Free Software : you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
the License , or ( at your option ) any later... |
e73c152ef53e81c84deeb8b553c84758ed2bc4b29400cd4f2814fefe13533a16 | Zilliqa/scilla | Datatypes.mli |
This file is part of scilla .
Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd.
scilla is free software : you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at you... | null | https://raw.githubusercontent.com/Zilliqa/scilla/011323ac5da48ee16890b71424e057ffbc4216da/src/base/Datatypes.mli | ocaml | ********************************************************
********************************************************
A tagged constructor
constructor name
How many arguments it takes
An Algebraic Data Type
type name
type parameters
supported constructors
Mapping for constructors' types
The arity of the... |
This file is part of scilla .
Copyright ( c ) 2018 - present Zilliqa Research Pvt . Ltd.
scilla is free software : you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at you... |
dbaf25583df3ac660f0f5df17c0c149f8b2b25fe35cca4450b03d3479923ace1 | clojure-lsp/clojure-lsp | b.clj | (ns sample-test.api.clean-ns.b)
(def a nil)
(def b nil)
(def c nil)
| null | https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/fe232a719707258ee53d72bf44166d5149e6ee0b/cli/integration-test/sample-test/src/sample_test/api/clean_ns/b.clj | clojure | (ns sample-test.api.clean-ns.b)
(def a nil)
(def b nil)
(def c nil)
| |
63557f12e5b8414589d7542f93912b39626b87f0a017fa3d5fcae60ee532cf96 | NorfairKing/smos | Gen.hs | # OPTIONS_GHC -fno - warn - orphans #
module Smos.Calendar.Import.UnresolvedEvent.Gen where
import Data.GenValidity
import Smos.Calendar.Import.Static.Gen ()
import Smos.Calendar.Import.TimeZone.Gen ()
import Smos.Calendar.Import.UnresolvedEvent
import Smos.Calendar.Import.UnresolvedTimestamp.Gen ()
import Smos.Data.... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos-calendar-import/test/Smos/Calendar/Import/UnresolvedEvent/Gen.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Smos.Calendar.Import.UnresolvedEvent.Gen where
import Data.GenValidity
import Smos.Calendar.Import.Static.Gen ()
import Smos.Calendar.Import.TimeZone.Gen ()
import Smos.Calendar.Import.UnresolvedEvent
import Smos.Calendar.Import.UnresolvedTimestamp.Gen ()
import Smos.Data.... | |
4579ad4a4568aca98ee72895e27252569b08f09f710df9d96a8964a4aaf8024c | athensresearch/athens | web.clj | (ns athens.self-hosted.components.web
(:require
[athens.common-events :as common-events]
[athens.common-events.schema :as schema]
[athens.common.logging :as log]
[athens.self-hosted.clients :as clients]
[athens.self-hosted.web.api :as api]
[athens.s... | null | https://raw.githubusercontent.com/athensresearch/athens/0a35b46f0b38680ef2faeb2591893e55dbf19ab1/src/clj/athens/self_hosted/components/web.clj | clojure | WebSocket handlers
Notify clients after removing the one that left.
TODO: we should be able to validate the serialized event without deserializing it, but
we also need to build a rejected event to pass back to the client, and to do that we need
the :event/id, which we only get after deserializing the event.
I thi... | (ns athens.self-hosted.components.web
(:require
[athens.common-events :as common-events]
[athens.common-events.schema :as schema]
[athens.common.logging :as log]
[athens.self-hosted.clients :as clients]
[athens.self-hosted.web.api :as api]
[athens.s... |
bd4e2c6f09f9d5c06a13539fd7ade2efa0c9a74e306e72b02362f56b596a8ba2 | DeathKing/Hit-DataStructure-On-Scheme | test.scm | ;;; Tests.
;;;
;;; All tests should be write here.
(load-option 'format)
(load "thread-tree.scm")
(define t
(make-tree 'A
(make-tree 'B (make-leaf 'D)
(make-tree 'E (make-leaf 'H) '()))
(make-tree 'C (make-tree 'F (make-leaf 'I)
(make-leaf 'J))
... | null | https://raw.githubusercontent.com/DeathKing/Hit-DataStructure-On-Scheme/11677e3c6053d6c5b37cf0509885f74ab5c2bab9/experiment2/test.scm | scheme | Tests.
All tests should be write here. |
(load-option 'format)
(load "thread-tree.scm")
(define t
(make-tree 'A
(make-tree 'B (make-leaf 'D)
(make-tree 'E (make-leaf 'H) '()))
(make-tree 'C (make-tree 'F (make-leaf 'I)
(make-leaf 'J))
(make-tree 'G '() (make-leaf 'K)))))
(defin... |
f1bc4dcd5a19575188b026ac019d5c6b0b792e000c4a0df16850e1dc3b2cb077 | babashka/pod-registry | mysql.clj | #!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'org.babashka/mysql "0.1.1")
(require '[pod.babashka.mysql :as mysql])
start mysql : docker run --rm --name = test - mysql -p 3306:3306 -i --env="MYSQL_ROOT_PASSWORD = mypassword " mysql
(def conn {:dbtype "mysql"
:user "root"
... | null | https://raw.githubusercontent.com/babashka/pod-registry/0869ab530ad0d61c99874adff168bdb8ad70c72f/examples/mysql.clj | clojure | #!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'org.babashka/mysql "0.1.1")
(require '[pod.babashka.mysql :as mysql])
start mysql : docker run --rm --name = test - mysql -p 3306:3306 -i --env="MYSQL_ROOT_PASSWORD = mypassword " mysql
(def conn {:dbtype "mysql"
:user "root"
... | |
e50ef0b2b4068a6159f99d3cfbfd497b19b20727d32005261ac212ab84329b28 | jessitron/qconsf-22 | hipstershop_payment_service_client.erl | %%%-------------------------------------------------------------------
@doc Client module for grpc service hipstershop . PaymentService .
%% @end
%%%-------------------------------------------------------------------
%% this module was generated and should not be modified manually
-module(hipstershop_payment_servic... | null | https://raw.githubusercontent.com/jessitron/qconsf-22/53df65c9c33ebaee33b7bf67304a89882709aee9/src/featureflagservice/src/hipstershop_payment_service_client.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
this module was generated and should not be modified manually
@doc Unary RPC | @doc Client module for grpc service hipstershop . PaymentService .
-module(hipstershop_payment_service_client).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("grpcbox/include/grpcbox.hrl").
-define(is_ctx(Ctx), is_tuple(Ctx) andalso element(1, Ctx) =:= ctx).
-define(SERVICE, 'hipstershop.Payme... |
f0ebf0c51a9514bc67ec4663ae59b4b131a01552d6e1ce97a31adef1c98cf0e4 | sysbio-bioinf/avatar | progress_view.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 2.0 ( -v20.html )
; 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 ... | null | https://raw.githubusercontent.com/sysbio-bioinf/avatar/cbf9968485f96fb61725aaa7381dba53624d6189/src/clojure/avatar/ui/dialogs/progress_view.clj | clojure | 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 remove this notice, or any other, from this software.
progress... | Copyright ( c ) . All rights reserved .
Eclipse Public License 2.0 ( -v20.html )
(ns avatar.ui.dialogs.progress-view
(:refer-clojure :exclude [update])
(:require
[clj-jfx.core :as jfx]
[avatar.algorithms.progress-tracker :as progress]
[avatar.util :as u]
[clojure.stacktrace :as st]
[avata... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.