_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 |
|---|---|---|---|---|---|---|---|---|
79e295285289ba9670963b938fd6e6590c4153119b5bb67691cbb5a32da4bb74 | Clojure2D/clojure2d-examples | hittable_list.clj | (ns rt4.the-next-week.ch05f.hittable-list
(:require [rt4.the-next-week.ch05f.interval :as interval]
[rt4.the-next-week.ch05f.hittable :as hittable]
[rt4.the-next-week.ch05f.aabb :as aabb]))
(defprotocol HittableListProto
(add [hittable-list object]))
(defrecord HittableList [objects bbox]
... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch05f/hittable_list.clj | clojure | (ns rt4.the-next-week.ch05f.hittable-list
(:require [rt4.the-next-week.ch05f.interval :as interval]
[rt4.the-next-week.ch05f.hittable :as hittable]
[rt4.the-next-week.ch05f.aabb :as aabb]))
(defprotocol HittableListProto
(add [hittable-list object]))
(defrecord HittableList [objects bbox]
... | |
9e98d6146c9a80e3e5910d84f6dcc3d37eddcc1458094d96e3104d05319c43f4 | objmagic/jaw | leftist_heap.ml | Leftist Heap with invariants enforced by GADT
open Nat
module type OrderedType = sig
type t
val compare: t -> t -> int
end
module type HEAP = sig
type elt
type t
val empty : t
val merge : t -> t -> t
val insert : elt -> t -> t
val find_min : t -> elt option
val delete_min : t -> t option
end
mod... | null | https://raw.githubusercontent.com/objmagic/jaw/70020b909c4ece6ee0ab20febe754a8fa9c32637/leftist_heap.ml | ocaml | shape enforced leftist tree
the rank of left child is at least as large as the rank of right sibling
test codes | Leftist Heap with invariants enforced by GADT
open Nat
module type OrderedType = sig
type t
val compare: t -> t -> int
end
module type HEAP = sig
type elt
type t
val empty : t
val merge : t -> t -> t
val insert : elt -> t -> t
val find_min : t -> elt option
val delete_min : t -> t option
end
mod... |
994b017f45fafa2f2015a62c4a88df38d0c1cbeafe5e4d07859a86d08db1a966 | ashinn/chibi-scheme | server.scm | Copyright ( c ) 2012 . All rights reserved .
;; BSD-style license:
(define default-max-requests 10000)
(define (make-socket-listener-thunk listener port)
(lambda ()
(let ((addr (get-address-info #f port)))
(cond
((accept listener
(address-info-address addr)
(a... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/chibi/net/server.scm | scheme | BSD-style license: | Copyright ( c ) 2012 . All rights reserved .
(define default-max-requests 10000)
(define (make-socket-listener-thunk listener port)
(lambda ()
(let ((addr (get-address-info #f port)))
(cond
((accept listener
(address-info-address addr)
(address-info-address-len... |
8a9ccac9f6b557c11577f92819c496d56c18adedb801516766a3c471fab14015 | haskellfoundation/error-message-index | MissingSpaceTypeApplication.hs | # LANGUAGE TypeApplications #
module MissingSpaceTypeApplication where
f :: (forall a. a -> b) -> (Int -> b)
f x = x@Int
| null | https://raw.githubusercontent.com/haskellfoundation/error-message-index/26c5c12c279eb4a997b1ff17eea46f1e86b046ab/message-index/messages/GHC-84077/example1/before/MissingSpaceTypeApplication.hs | haskell | # LANGUAGE TypeApplications #
module MissingSpaceTypeApplication where
f :: (forall a. a -> b) -> (Int -> b)
f x = x@Int
| |
44a5f7265fdf500075448a6b0e84490725466b46d2eebc3621e7e947da3dc5db | facebook/infer | Buck2Java.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/3fe18cc8550a5849c426ffc7a78e573d0ef7756f/infer/src/integration/Buck2Java.mli | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
ad5821fc3a93c41b8e5f175e4cc2ee7213f20199685931564db1fc994bf85aca | 3b/3bgl-misc | xterm2.lisp | #++(asdf:load-systems '3bgl-misc)
(defpackage #:xterm-texture
(:use :cl :basecode))
(in-package #:xterm-texture)
(defparameter *command* "xterm -b 0 -into ~d &")
#++
(defparameter *command* "xterm -b 0 -into ~d -e screen -xRR embed &")
#++
(defparameter *command* "xterm -b 0 -into ~d -e emacs -nw &")
#++
(defparamet... | null | https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/xembed/xterm2.lisp | lisp | todo: add rest of these
GLX_BACK_LEFT_EXT 0x20E0
GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
GLX_BACK_EXT GLX_BACK_LEFT_EXT
GLX_AUX0_EXT 0x20E2
GLX_AUX3_EXT 0x20E5
GLX_AUX5_EXT 0x20E7
GLX_AUX6_EXT ... | #++(asdf:load-systems '3bgl-misc)
(defpackage #:xterm-texture
(:use :cl :basecode))
(in-package #:xterm-texture)
(defparameter *command* "xterm -b 0 -into ~d &")
#++
(defparameter *command* "xterm -b 0 -into ~d -e screen -xRR embed &")
#++
(defparameter *command* "xterm -b 0 -into ~d -e emacs -nw &")
#++
(defparamet... |
40cd880bd84a4613d9c4b1dfb22776981cd801179bd5788fe3869e2dd58f82ea | nasser/magic | line_number_examples.clj | (ns clojure.test-clojure.compilation.line-number-examples
"Example code taken from Paul Stadig and updated by Daniel Solano Gómez.
Original source at:
-line-numbers/blob/master/src/clojure_line_numbers/core.clj"
(:import (clojure.lang PersistentHashMap)))
(defrecord Thing [field ^long primitive])
(defn in... | null | https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/tests/clojure/test_clojure/compilation/line_number_examples.clj | clojure | ^java.util.Map
String/copyValueOf
Long/parseLong
This code formatting is intentional. | (ns clojure.test-clojure.compilation.line-number-examples
"Example code taken from Paul Stadig and updated by Daniel Solano Gómez.
Original source at:
-line-numbers/blob/master/src/clojure_line_numbers/core.clj"
(:import (clojure.lang PersistentHashMap)))
(defrecord Thing [field ^long primitive])
(defn in... |
cf1f1489c87d8dbac796e5ba84254a27a35b72f478b56ffcbf3c47f70f3734ab | racket/math | fibonacci.rkt | #lang typed/racket/base
(provide make-fibonacci
fibonacci
make-modular-fibonacci
modular-fibonacci)
(: generator : Integer Integer Natural Natural Natural -> Integer)
(define (generator a b p q count)
SICP ex . 1.19
(cond
[(zero? count) b]
[(even? count)
(generator a b
... | null | https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/number-theory/fibonacci.rkt | racket | #lang typed/racket/base
(provide make-fibonacci
fibonacci
make-modular-fibonacci
modular-fibonacci)
(: generator : Integer Integer Natural Natural Natural -> Integer)
(define (generator a b p q count)
SICP ex . 1.19
(cond
[(zero? count) b]
[(even? count)
(generator a b
... | |
e6ff8eb1ba02d2007f5b3a6e8cfc2482095b95aa8e0c945e34c1dc192bc384fd | bennn/dissertation | data.rkt | #lang racket
(struct posn (x y))
(struct block (x y color))
(struct tetra (center blocks))
(struct world (tetra blocks))
(define (posn=? p1 p2)
(and (= (posn-x p1) (posn-x p2))
(= (posn-y p1) (posn-y p2))))
(provide
(struct-out block)
(struct-out posn)
(struct-out tetra)
(struct-out world)
posn=?)
#;
(... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/tetris/untyped/data.rkt | racket | #lang racket
(struct posn (x y))
(struct block (x y color))
(struct tetra (center blocks))
(struct world (tetra blocks))
(define (posn=? p1 p2)
(and (= (posn-x p1) (posn-x p2))
(= (posn-y p1) (posn-y p2))))
(provide
(struct-out block)
(struct-out posn)
(struct-out tetra)
(struct-out world)
posn=?)
(pro... | |
e5f5b546c7c92716ddf6fde928ca71512f8cfb6012671f168d9ccd2d6ef0c0d7 | SKA-ScienceDataProcessor/RC | Worker.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE TemplateHaskell #
module Worker where
import Control.Concurrent (threadDelay)
import Control.Applicative
import Control.Monad
import Control.Monad.Trans.Except
import Control.Distributed.Process
import Control.Distributed.Process.Closure
impo... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS1/distributed-dot-product/Worker.hs | haskell | # LANGUAGE BangPatterns #
--------------------------------------------------------------
Dot product
--------------------------------------------------------------
| Worker for dot product
--------------------------------------------------------------
--------------------------------------------------------------
... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Worker where
import Control.Concurrent (threadDelay)
import Control.Applicative
import Control.Monad
import Control.Monad.Trans.Except
import Control.Distributed.Process
import Control.Distributed.Process.Closure
import Control.Distributed.Process.Se... |
af31729fbcd03038d847732722d42a8cab531098492e7f8386d1eda4d17ca7a3 | processone/tsung | ts_test_user_server.erl | %%%-------------------------------------------------------------------
%%% File : ts_test_user_server.erl
Author : < >
%%% Description :
%%%
Created : 20 Mar 2005 by < >
%%%-------------------------------------------------------------------
-module(ts_test_user_server).
-compile(export_all).
-include_l... | null | https://raw.githubusercontent.com/processone/tsung/e9babe2acfb4298e3b51bd56886561b052979884/src/test/ts_test_user_server.erl | erlang | -------------------------------------------------------------------
File : ts_test_user_server.erl
Description :
------------------------------------------------------------------- | Author : < >
Created : 20 Mar 2005 by < >
-module(ts_test_user_server).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
-include_lib("ts_profile.hrl").
-include_lib("ts_config.hrl").
test()->
ok.
next_test() ->
myset_env(),
ts_user_server:start(),
ts_user_server:reset(100... |
652f9665a3028f45b03639e54b5a2c6b586a41300b10a70dc9b2a57371d2ba12 | TristeFigure/shuriken | colon_suffix.clj | (ns shuriken.reader-macros.colon-suffix
(:use clojure.pprint)
(:require [reader-macros.core :refer [set-macro-character lisp-readers]]
[shuriken.monkey-patch :refer [java-patch
require-from-dependent-namespaces]])
(:import [clojure.lang LispReader]
... | null | https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/src/shuriken/reader_macros/colon_suffix.clj | clojure | (set-macro-character \: (fn [reader _colon _ _]
))
| (ns shuriken.reader-macros.colon-suffix
(:use clojure.pprint)
(:require [reader-macros.core :refer [set-macro-character lisp-readers]]
[shuriken.monkey-patch :refer [java-patch
require-from-dependent-namespaces]])
(:import [clojure.lang LispReader]
... |
79b6535f12579522eaa4323084e0f8bec5887aa9da49739662a16c4f73aeca9b | ghc/hsc2hs | CrossCodegen.hs | # LANGUAGE NoMonomorphismRestriction #
module CrossCodegen where
A special cross - compilation mode for hsc2hs , which generates a .hs
file without needing to run the executables that the C compiler
outputs .
Instead , it uses the output of compilations only -- specifically ,
whether compilation fails . ... | null | https://raw.githubusercontent.com/ghc/hsc2hs/0b44990f0282755b75091838363ad4a1f4cb245d/CrossCodegen.hs | haskell | specifically ,
specifically,
and a state counter for unique filename generation.
equivalent to ErrorT String (StateT Int (ReaderT TestMonadEnv IO))
IO exception, which isn't great but shouldn't matter for now
since only the test count is stored there.
prints the string to stdout if verbose mode is enabled.
Mai... | # LANGUAGE NoMonomorphismRestriction #
module CrossCodegen where
A special cross - compilation mode for hsc2hs , which generates a .hs
file without needing to run the executables that the C compiler
outputs .
whether compilation fails . This is the same trick that autoconf uses
when cross compiling ; if ... |
9fc6e8ef5b41d396fbed9e793491374602a01eb737d51f292e9eef782bf55f22 | kallisti-dev/hs-webdriver | Monad.hs | # LANGUAGE FlexibleContexts , TypeFamilies , GeneralizedNewtypeDeriving ,
MultiParamTypeClasses , CPP , UndecidableInstances , ConstraintKinds #
MultiParamTypeClasses, CPP, UndecidableInstances, ConstraintKinds #-}
module Test.WebDriver.Monad
( WD(..), runWD, runSession, finallyClose,... | null | https://raw.githubusercontent.com/kallisti-dev/hs-webdriver/ea594ce8720c9e11f053b2567f250079f0eac33b/src/Test/WebDriver/Monad.hs | haskell | hides some "unused import" warnings
NOTE: session is not automatically closed when complete. If you want this behavior, use 'finallyClose'.
Example:
|A finalizer ensuring that the session is always closed at the end of
|Exception handler that closes the session when an
asynchronous exception is thrown, but othe... | # LANGUAGE FlexibleContexts , TypeFamilies , GeneralizedNewtypeDeriving ,
MultiParamTypeClasses , CPP , UndecidableInstances , ConstraintKinds #
MultiParamTypeClasses, CPP, UndecidableInstances, ConstraintKinds #-}
module Test.WebDriver.Monad
( WD(..), runWD, runSession, finallyClose,... |
76836a269bf5d967d0717309aa05e2a6646d6fc239005ab4f6e236d0b27fc4f6 | jochu/swank-clojure | swank_arglists.clj | (ns swank.commands.contrib.swank-arglists
(:use (swank util core commands)))
((slime-fn 'swank-require) :swank-c-p-c)
pos starts at 1 bc 0 is function name
(defn position-in-arglist? [arglist pos]
(or (some #(= '& %) arglist)
(<= pos (count arglist))))
( position - in - arglist ? ' [ x y ] 2 )
;; => tr... | null | https://raw.githubusercontent.com/jochu/swank-clojure/b08daf866488b449a44ba8df6e5ae17a3515ef57/src/swank/commands/contrib/swank_arglists.clj | clojure | => true
i.e. not rest args
(highlight-position '[x y] 0)
=> [===> x <=== y]
=> ([===> x <===] [x & more])
defnk's arglists format is (a b) instead of ([a b])
problem?
(dbg raw-specs)
(dbg options)
display arglists for function being applied unless on top of apply | (ns swank.commands.contrib.swank-arglists
(:use (swank util core commands)))
((slime-fn 'swank-require) :swank-c-p-c)
pos starts at 1 bc 0 is function name
(defn position-in-arglist? [arglist pos]
(or (some #(= '& %) arglist)
(<= pos (count arglist))))
( position - in - arglist ? ' [ x y ] 2 )
(defn h... |
be74f352d8a8e5f08cc26f878ef669de85e047f42ed2871b0b4af12f192f5805 | aryx/xix | hooks.ml | open Types
module Scheduler = struct
(* less: opti: direct call, but mutual dependency problem *)
let (sched: (unit -> unit) ref) = ref (fun () ->
failwith "sched() not defined"
)
less : opti : use direct Proc_.t ref instead of pid
let (ready: (pid -> unit) ref) = ref (fun p ->
failwith "ready() n... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/kernel/core/hooks.ml | ocaml | less: opti: direct call, but mutual dependency problem
todo: take rendez vous
todo: take rendez vous | open Types
module Scheduler = struct
let (sched: (unit -> unit) ref) = ref (fun () ->
failwith "sched() not defined"
)
less : opti : use direct Proc_.t ref instead of pid
let (ready: (pid -> unit) ref) = ref (fun p ->
failwith "ready() not defined"
)
let (sleep: ((unit -> bool) -> unit) ref) ... |
9a5dab603615899185f2157075ee61eff3ba3b0c3eb69a6f0aab76b1f40a6619 | melange-re/melange | atomic.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/stdlib-412/stdlib_modules/atomic.mli | ocaml | ************************************************************************
OCaml
... | , University of Cambridge
, projet Partout , INRIA Paris - Saclay
Copyright 2020 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* This module provides a purely sequential ... |
79c0e517a17b365db415123e576e2ee84150675d57f46e9e60d350e4e1eb3f0a | kovasb/gamma | api.cljs | (ns gamma.api
(:refer-clojure
:exclude [aget
not
not=
or
set
*
+
-
<
>
<=
>=
==
max
min
mod
and
if
f... | null | https://raw.githubusercontent.com/kovasb/gamma/3c9edcfdfc392103b0e78edba3ca930a60746fd1/src/gamma/api.cljs | clojure | operators
expecting a parameterized type
already have determined the concrete parameter
need to determine concrete parameter
type is within the parameterized range
not expected a parameterized type
Special-case the depth-range swizzles since their length
doesn't follow the standard rules | (ns gamma.api
(:refer-clojure
:exclude [aget
not
not=
or
set
*
+
-
<
>
<=
>=
==
max
min
mod
and
if
f... |
e43dd61a5071fd487b0d846bc7cbebb557a15ddec781d4b394f0f37855a7c537 | lispnik/cl-http | xml-error.lisp | ;;; -*- package: ("XML-PARSER") -*-
#|
<DOCUMENTATION>
<DESCRIPTION>
a framework for validation and form constraints.
</DESCRIPTION>
</DOCUMENTATION>
|#
(in-package :XML-PARSER)
(define-condition xml-error (simple-error) ())
(define-condition xml-validity-error (xml-error) ())
(define-condition xml-form-error (xml-er... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/contrib/janderson/xml-1998-02-27/xml-error.lisp | lisp | -*- package: ("XML-PARSER") -*-
<DOCUMENTATION>
<DESCRIPTION>
a framework for validation and form constraints.
</DESCRIPTION>
</DOCUMENTATION>
(form-error 'test "this is to test ~a and ~a." 'form 'errors) |
(in-package :XML-PARSER)
(define-condition xml-error (simple-error) ())
(define-condition xml-validity-error (xml-error) ())
(define-condition xml-form-error (xml-error) ())
(define-condition xml-cell-error (xml-error cell-error) ())
(defMethod xml-validity-error
((context t) message &rest args)
(if (x... |
e1528cad6dd4c1fdaf04a16868d386c7eef829b8994b9cd93599e158bd20afc1 | plumatic/grab-bag | monitor.clj | (ns monitoring.monitor
(:use plumbing.core)
(:require
[clojure.set :as set]
[plumbing.logging :as log]
[plumbing.parallel :as parallel]
[plumbing.timing :as timing]
[flop.stats :as stats]
[aws.ec2 :as ec2]
[aws.elb :as elb]))
(defn map-similarity [val-sim? m1 m2]
(let [common (set/intersect... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/service/monitoring/src/monitoring/monitor.clj | clojure | run all the monitors with at most 3 at a time, keeping only the fails | (ns monitoring.monitor
(:use plumbing.core)
(:require
[clojure.set :as set]
[plumbing.logging :as log]
[plumbing.parallel :as parallel]
[plumbing.timing :as timing]
[flop.stats :as stats]
[aws.ec2 :as ec2]
[aws.elb :as elb]))
(defn map-similarity [val-sim? m1 m2]
(let [common (set/intersect... |
a915a311813c43ba78494218d0af82a037d3abba76bef926055de18e0c951a3a | input-output-hk/cardano-sl | NodeIPC.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -Wall #-}
module Cardano.NodeIPC (startNodeJsIPC) where
import Control.Arrow ((>>>))
import C... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/node-ipc/src/Cardano/NodeIPC.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -Wall # | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
module Cardano.NodeIPC (startNodeJsIPC) where
import Control.Arrow ((>>>))
import Control.Concurrent (forkIO)
import Control.Monad.Reader (MonadReader)
import Data.Aeson (FromJSON (parseJSON), ToJSON (toEncoding... |
8e4eda4d4ae5fe45f8b20d17ab201272b2eab6f92338dfffdde2912bf2026081 | RokLenarcic/clj-rest-client | core_test.clj | (ns clj-rest-client.core-test
(:require [clojure.test :refer :all]
[clj-rest-client.core :as c]
[clojure.walk :as walk]))
(c/defrest {"abc" {:get (get-0 [])}
"cde" (get-1 [x any?])
"yyy" (get-2 [y any?] {::other y})
"zzz/{mm}/yy" {:get (get-3 [x any? ^:body... | null | https://raw.githubusercontent.com/RokLenarcic/clj-rest-client/716ab51315499096c59db3a7349a60a7e41d35e0/test/clj_rest_client/core_test.clj | clojure | (ns clj-rest-client.core-test
(:require [clojure.test :refer :all]
[clj-rest-client.core :as c]
[clojure.walk :as walk]))
(c/defrest {"abc" {:get (get-0 [])}
"cde" (get-1 [x any?])
"yyy" (get-2 [y any?] {::other y})
"zzz/{mm}/yy" {:get (get-3 [x any? ^:body... | |
4b3c01ea99952862aeb117d334d61f4bf394ad539f9884da49208aaacb485d3b | joinr/spork | examples.clj | ;;A collection of examples to explore the gui features of spork. Currently
;;empty - specific examples are in other files.
(ns spork.cljgui.examples
(:use [spork.cljgui.components.swing]
[spork.cljgui.asyncdrawing]
[spork.cljgui.events base observe native]))
| null | https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/obe/cljgui/examples/examples.clj | clojure | A collection of examples to explore the gui features of spork. Currently
empty - specific examples are in other files. | (ns spork.cljgui.examples
(:use [spork.cljgui.components.swing]
[spork.cljgui.asyncdrawing]
[spork.cljgui.events base observe native]))
|
7de1544c7b62a6dfaebfbcd96b00b355c93f1bb411193e707bba9edc1335befe | olsner/sedition | TNFA.hs | # LANGUAGE RecordWildCards #
Based on , " A Closer Look at TDFA "
-- Conversion of tagged regex to Tagged Non-Deterministic Finite Automata.
module TNFA where
import Control.Monad.Trans.State.Strict
import qualified Data.Map as M
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as S
-- import D... | null | https://raw.githubusercontent.com/olsner/sedition/ead2a56f90e470669f0ab05f6878c6e54b9c3e26/TNFA.hs | haskell | Conversion of tagged regex to Tagged Non-Deterministic Finite Automata.
import Debug.Trace
following steps, but maybe that means the construction should stop using
the same data type?
any outgoing non-epsilon transitions or are the final state.
should only be "intermediate" steps within epsilonClosure, not includ... | # LANGUAGE RecordWildCards #
Based on , " A Closer Look at TDFA "
module TNFA where
import Control.Monad.Trans.State.Strict
import qualified Data.Map as M
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as S
import TaggedRegex
newtype StateId = S Int deriving (Ord, Eq)
instance Show StateId ... |
1f1c3bd4242dc29b0e5e41099e619c681960b5e9eb064233e374d60e95758e8b | MyPost/cassius | put_in.clj | (ns cassius.api.connection.put-in
(:require [ribol.core :refer [raise manage on]]
[cassius.schema.outline :as sch]
[cassius.data.outline :as c]
[cassius.net.command
[keyspace :as ksp]
[column-family :as cf]
[insert :refer [insert]]
... | null | https://raw.githubusercontent.com/MyPost/cassius/7b5f550fa8e8f825d4ecd7ba6a0d34c5ff606a7c/src/cassius/api/connection/put_in.clj | clojure | (ns cassius.api.connection.put-in
(:require [ribol.core :refer [raise manage on]]
[cassius.schema.outline :as sch]
[cassius.data.outline :as c]
[cassius.net.command
[keyspace :as ksp]
[column-family :as cf]
[insert :refer [insert]]
... | |
b510880cd74e2404853d387092416192d094ac7537ce9bb53fa7648e437fb2f2 | antoniogarrote/hiccup-rdfa | vocabularies.clj | (ns hiccup-rdfa.vocabularies)
(def rdf-vocabulary
{:prefix "-rdf-syntax-ns#"
:namespace "rdf"
:classes '("List" "Alt" "Seq" "Bag" "Statement" "Property")
:properties '("rest" "first" "value" "object" "predicate" "subject" "type")})
(def rdfs-vocabulary
{:prefix "-schema#"
:namespace ... | null | https://raw.githubusercontent.com/antoniogarrote/hiccup-rdfa/a9964660f91c24975dbd3e9ea4d25b3eb5ec1f31/src/hiccup_rdfa/vocabularies.clj | clojure | (ns hiccup-rdfa.vocabularies)
(def rdf-vocabulary
{:prefix "-rdf-syntax-ns#"
:namespace "rdf"
:classes '("List" "Alt" "Seq" "Bag" "Statement" "Property")
:properties '("rest" "first" "value" "object" "predicate" "subject" "type")})
(def rdfs-vocabulary
{:prefix "-schema#"
:namespace ... | |
f1ac759796388d15773ce1773f8e1c3b81444d1065f130073c219759ff57daa0 | ChillkroeteTTS/fischer | multivariate_gaussian_model.clj | (ns fischer.models.multivariate-gaussian-model
(:require [fischer.model :as m]
[fischer.anomaly-detection :as ad]))
(defrecord MultivariateGaussianModel []
m/Model
(train [_ feature-vectors] (ad/multivariate-train feature-vectors))
(scores [_ feature-vectors mu-and-sigma] (ad/multivariate-scores fe... | null | https://raw.githubusercontent.com/ChillkroeteTTS/fischer/2f479ac0d410f536f5bd89659d7f69113422784a/src/clj/fischer/models/multivariate_gaussian_model.clj | clojure | (ns fischer.models.multivariate-gaussian-model
(:require [fischer.model :as m]
[fischer.anomaly-detection :as ad]))
(defrecord MultivariateGaussianModel []
m/Model
(train [_ feature-vectors] (ad/multivariate-train feature-vectors))
(scores [_ feature-vectors mu-and-sigma] (ad/multivariate-scores fe... | |
73124e6fabf84b9f2e0f7b1269c42e2ae00485a7bf89999378f4a54109edbf9c | mrijkeboer/euuid | euuid_util.erl | %% -------------------------------------------------------------------
euuid_util.erl - Erlang UUID utilities module
%%
@author < >
2011
%% @version {@vsn}, {@date}, {@time}
@doc Erlang UUID utilities module .
%% @end
%%
The MIT license .
%%
Copyright ( c ) 2011
%%
%% Permission is hereby granted, f... | null | https://raw.githubusercontent.com/mrijkeboer/euuid/f9d435128d7840d55a7b504ab82f5033c381833f/src/euuid_util.erl | erlang | -------------------------------------------------------------------
@version {@vsn}, {@date}, {@time}
@end
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
rights to use, copy, modify, merge, publish, distribu... | euuid_util.erl - Erlang UUID utilities module
@author < >
2011
@doc Erlang UUID utilities module .
The MIT license .
Copyright ( c ) 2011
deal in the Software without restriction , including without limitation the
sell copies of the Software , and to permit persons to whom the Software is
all ... |
92d1ff87221da39891567abf1307e75e4707c1187b0f01ea3d6b8661e44650cc | jpmonettas/clindex | specs.clj | (ns clindex.specs
(:require [clojure.spec.alpha :as s]
[clojure.tools.namespace.find :as ns-find]))
(s/def :file/path string?)
(s/def :datomic/fact any?)
;;;;;;;;;;;;;;;;;;;;;;
Scanner projects ; ;
;;;;;;;;;;;;;;;;;;;;;;
(s/def :project/name symbol?)
TODO figure this out
(s/def :mvn/version string?... | null | https://raw.githubusercontent.com/jpmonettas/clindex/77097d80a23aa85d2ff50e55645a1452f2dcb3c0/src/clindex/specs.clj | clojure |
;
Scanner namespaces ;;
| (ns clindex.specs
(:require [clojure.spec.alpha :as s]
[clojure.tools.namespace.find :as ns-find]))
(s/def :file/path string?)
(s/def :datomic/fact any?)
(s/def :project/name symbol?)
TODO figure this out
(s/def :mvn/version string?)
(s/def :project/paths (s/coll-of string?))
(s/def :project/dependen... |
f2fdc75993c347644b9b7cc67656cbb424d6c477dc2bdf0c96fc27cc0e19f8bd | darrenldl/oali | user_sls_template.ml | let gen ~user_name = Printf.sprintf {|user_info:
user_name: %s
|} user_name
| null | https://raw.githubusercontent.com/darrenldl/oali/d5fd4b2da61aa8bc21863af6bf352d1ac63de8f3/src/user_sls_template.ml | ocaml | let gen ~user_name = Printf.sprintf {|user_info:
user_name: %s
|} user_name
| |
028637b52256ad3c23ed10b21d25cbf279910587b6e902b93c0f7e622e0e0e49 | albertoruiz/easyVision | ToyProblems.hs | -----------------------------------------------------------------------------
|
Module : Classifier . ToyProblems
Copyright : ( c ) 2006 - 7
License : GPL - style
Maintainer : ( aruiz at um dot es )
Stability : very provisional
Portability : hmm ...
Some 2D toy probl... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/classifier/src/Classifier/ToyProblems.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
| interlaced S-shapes
| concentric semicircles
| 3 concentric rings (nonconvex solution)
| concentric rings
| very simple problem
| simple multiclass problem
... | |
Module : Classifier . ToyProblems
Copyright : ( c ) 2006 - 7
License : GPL - style
Maintainer : ( aruiz at um dot es )
Stability : very provisional
Portability : hmm ...
Some 2D toy problems useful for testing classifiers .
Module : Classifier.ToyProblems
... |
32d6ba01039b2e31628887a87209c07a7943f7810e8a0875db3fc498c950c11e | tkych/lisp-dojo | 024.lisp | Last modified : 2013 - 10 - 15 19:01:08 tkych
(define-practice
:id 024
:name rotate
:level 1
:problem "
ROTATE n list => result-list
Make function ROTATE.
It rotates a list N places to the left.
Examples:
(rotate 3 '()) => ()
(rotate 3 '(a b c d e f g h)) => (D ... | null | https://raw.githubusercontent.com/tkych/lisp-dojo/ba83d025bc03101eec43ec6be44585d7b076caf6/practices/024.lisp | lisp | Last modified : 2013 - 10 - 15 19:01:08 tkych
(define-practice
:id 024
:name rotate
:level 1
:problem "
ROTATE n list => result-list
Make function ROTATE.
It rotates a list N places to the left.
Examples:
(rotate 3 '()) => ()
(rotate 3 '(a b c d e f g h)) => (D ... | |
87b491c518ba4ebeef4688833a4425ac5bce889211b407b228d543bf4825ce60 | PEZ/rich4clojure | problem_148.clj | (ns rich4clojure.medium.problem-148
(:require [hyperfiddle.rcf :refer [tests]]))
;; = The Big Divide =
By 4Clojure user :
;; Difficulty: Medium
;; Tags: [math]
;;
;; Write a function which calculates the sum of all
natural numbers under n ( first argument ) which are
evenly divisible by at least one of a and... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/2ccfac041840e9b1550f0a69b9becbdb03f9525b/src/rich4clojure/medium/problem_148.clj | clojure | = The Big Divide =
Difficulty: Medium
Tags: [math]
Write a function which calculates the sum of all
Note: Some test cases have a very large n, so the most
obvious solution will exceed the time limit.
Share your solution, and/or check how others did it:
| (ns rich4clojure.medium.problem-148
(:require [hyperfiddle.rcf :refer [tests]]))
By 4Clojure user :
natural numbers under n ( first argument ) which are
evenly divisible by at least one of a and b ( second and
third argument ) . Numbers a and b are guaranteed to be
coprimes .
(def __ :tests-will-fail)
(... |
46eeff26136a1bf29303f297ba8fbdaf0901d0672133be33ecd1c69d22e3f286 | facebookarchive/pfff | highlight_java.ml |
*
* Copyright ( C ) 2010 , 2012 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_java/analyze/highlight_java.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Helpers
************************************************************************... |
*
* Copyright ( C ) 2010 , 2012 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file... |
e03ba859a532ccf79eab4bf944a583cf71762c8a29335ebd1d440f97c4ef33a2 | microsoft/SLAyer | NSHashSet.mli | Copyright ( c ) Microsoft Corporation . All rights reserved .
(** Imperative sets of hashed values. *)
module HashSet : sig
type 'a t
val create : int -> 'a t
val add : 'a t -> 'a -> unit
val remove : 'a t -> 'a -> unit
val cardinal : 'a t -> int
val mem : 'a t -> 'a -> bool
val iter : ('a -> uni... | null | https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/Library/NSHashSet.mli | ocaml | * Imperative sets of hashed values. | Copyright ( c ) Microsoft Corporation . All rights reserved .
module HashSet : sig
type 'a t
val create : int -> 'a t
val add : 'a t -> 'a -> unit
val remove : 'a t -> 'a -> unit
val cardinal : 'a t -> int
val mem : 'a t -> 'a -> bool
val iter : ('a -> unit) -> 'a t -> unit
val exists : ('a -> ... |
ccb9e73a1b31806a172d9ae2a69f5989b5d7e7efad5a1bd5355f6e9f55f741b7 | sealchain-project/sealchain | Conv.hs | # LANGUAGE LambdaCase #
-- | Convert to and from V1 types
module Cardano.Wallet.WalletLayer.Kernel.Conv (
-- * From V1 to kernel types
fromRootId
, fromAccountId
, fromAssuranceLevel
, fromRedemptionCode
, fromRedemptionCodePaper
-- * From kernel types to V1 types
, toAccountId
, toRootId
, to... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/wallet/src/Cardano/Wallet/WalletLayer/Kernel/Conv.hs | haskell | | Convert to and from V1 types
* From V1 to kernel types
* From kernel types to V1 types
* Custom errors
* Convenience re-exports
import Pos.Client.Txp.Util (InputSelectionPolicy (..))
(InputGrouping (..))
----------------------------------------------------------------------------... | # LANGUAGE LambdaCase #
module Cardano.Wallet.WalletLayer.Kernel.Conv (
fromRootId
, fromAccountId
, fromAssuranceLevel
, fromRedemptionCode
, fromRedemptionCodePaper
, toAccountId
, toRootId
, toAccount
, toWallet
, toAddress
, toCardanoAddress
, toAssuranceLevel
, toSyncState
,
, Inva... |
63577a3187cfff081f2f2b21dd1533d8df559fd172c1e5178ecf3541351d2543 | zotonic/zotonic | z_development_dbtrace.erl | @author < >
2020
%% @doc Toggle database trace on/off
Copyright 2020
%%
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... | null | https://raw.githubusercontent.com/zotonic/zotonic/747cf0003d62b338798cfe69aed505fc14c3edcb/apps/zotonic_mod_development/src/support/z_development_dbtrace.erl | erlang | @doc Toggle database trace on/off
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 t... | @author < >
2020
Copyright 2020
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_development_dbtrace).
-export([
event/2,
set_tracing/2,
copy_from_session/1,
is_tracing/1
]).
-i... |
5a70ffe84ada537c118b36cb51c80e3a624e4b8da5f77d23498d48f6c48d8942 | herd/herdtools7 | infoAlign.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/litmus/infoAlign.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2020 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
20be14fdc45b7f7f078b0f7299c1f590af00b1cc27b4e447d06b78b4cc25986d | finnishtransportagency/harja | tarkastukset.cljs | (ns harja.views.urakka.laadunseuranta.tarkastukset
(:require [reagent.core :refer [atom] :as r]
[cljs.core.async :refer [<! >! chan]]
[harja.pvm :as pvm]
[harja.loki :refer [log]]
[harja.domain.oikeudet :as oikeudet]
[harja.tiedot.navigaatio :as nav]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/779762435f8c06128cac5a84e388d7b2c9f25faf/src/cljs/harja/views/urakka/laadunseuranta/tarkastukset.cljs | clojure | (ns harja.views.urakka.laadunseuranta.tarkastukset
(:require [reagent.core :refer [atom] :as r]
[cljs.core.async :refer [<! >! chan]]
[harja.pvm :as pvm]
[harja.loki :refer [log]]
[harja.domain.oikeudet :as oikeudet]
[harja.tiedot.navigaatio :as nav]
... | |
e4f3132e182a0ad66163d8148d31ff83062700649a5206550077a5a88a238069 | pcapriotti/optparse-applicative | Types.hs | module Options.Applicative.Help.Types (
ParserHelp (..)
, renderHelp
) where
import Data.Semigroup
import Prelude
import Options.Applicative.Help.Chunk
import Options.Applicative.Help.Pretty
data ParserHelp = ParserHelp
{ helpError :: Chunk Doc
, helpSuggestions :: Chunk Doc
, helpHeader :: Chunk Doc
... | null | https://raw.githubusercontent.com/pcapriotti/optparse-applicative/8edc41994984cbfdfc1ee960e4d4d112cfccbc11/src/Options/Applicative/Help/Types.hs | haskell | | Convert a help text to 'String'. | module Options.Applicative.Help.Types (
ParserHelp (..)
, renderHelp
) where
import Data.Semigroup
import Prelude
import Options.Applicative.Help.Chunk
import Options.Applicative.Help.Pretty
data ParserHelp = ParserHelp
{ helpError :: Chunk Doc
, helpSuggestions :: Chunk Doc
, helpHeader :: Chunk Doc
... |
1732abdbf5d9dde31139e1870a9783514236da7a0986c554e1ded24e449aae2c | MinaProtocol/mina | account_timing.ml | open Core_kernel
open Mina_transaction_logic
open Currency
open Mina_base
open Mina_numbers
type txn_result = (Account.Timing.t, Error.t) Result.t
[@@deriving compare, sexp]
let init_min_bal a =
Option.value ~default:Balance.zero @@ Account.initial_minimum_balance a
let cliff_time a =
Option.value ~default:Globa... | null | https://raw.githubusercontent.com/MinaProtocol/mina/de518438b11adfa166fba6ba7e702a71900ecbc4/src/lib/transaction_logic/test/account_timing.ml | ocaml | These tests verify basic invariants of timed accounts' behaviour.
This is done very simply by exercising the function which determines
whether a transaction is valid. See the Account_timing modules in
transaction_snakrs/test library for testing these rules with
constructing actual transactions and applying... | open Core_kernel
open Mina_transaction_logic
open Currency
open Mina_base
open Mina_numbers
type txn_result = (Account.Timing.t, Error.t) Result.t
[@@deriving compare, sexp]
let init_min_bal a =
Option.value ~default:Balance.zero @@ Account.initial_minimum_balance a
let cliff_time a =
Option.value ~default:Globa... |
ff4a18c8237d65058d3063ac63bb697b68466aeeb2f87545679f3c227adb8fed | TOTBWF/teenytt | Nat.hs | | Refiner rules for .
module TeenyTT.Elaborator.Refiner.Nat
( formation
, zero
, suc
, literal
, elim
) where
import TeenyTT.Base.Ident
import TeenyTT.Core.Domain qualified as D
import TeenyTT.Core.Splice qualified as Splice
import TeenyTT.Core.Syntax qualified as S
import TeenyTT.Core.TermBuilder qual... | null | https://raw.githubusercontent.com/TOTBWF/teenytt/b1363fe78183bb13ea447056a10ef1eac72dbff1/src/TeenyTT/Elaborator/Refiner/Nat.hs | haskell | | Refiner rules for .
module TeenyTT.Elaborator.Refiner.Nat
( formation
, zero
, suc
, literal
, elim
) where
import TeenyTT.Base.Ident
import TeenyTT.Core.Domain qualified as D
import TeenyTT.Core.Splice qualified as Splice
import TeenyTT.Core.Syntax qualified as S
import TeenyTT.Core.TermBuilder qual... | |
f6af1670e346ee9fe77f68764b5b1b8cd61b3a89444cb2d98b01d22cd097ac51 | runeksvendsen/bitcoin-payment-channel | MonadConf.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module PaymentChannel.Internal.Types.MonadConf where
import Bitcoin.Types
import Control.Monad.Reader
import Control.Monad.Trans.Reader (Reader, runReader)
import PaymentChannel.Internal.Config
newtype MonadConf a = MonadConf (Reader... | null | https://raw.githubusercontent.com/runeksvendsen/bitcoin-payment-channel/3d2ee56c027571d1a86092c317640e5eae7adde3/src/PaymentChannel/Internal/Types/MonadConf.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
module PaymentChannel.Internal.Types.MonadConf where
import Bitcoin.Types
import Control.Monad.Reader
import Control.Monad.Trans.Reader (Reader, runReader)
import PaymentChannel.Internal.Config
newtype MonadConf a = MonadConf (Reader... | |
d564e9c9b03e52f0020351a44cec14295ad403ef0f899d372034436b52737921 | GaloisInc/cryptol | InstantiateModule.hs | {-# Language FlexibleInstances, PatternGuards #-}
{-# Language BlockArguments #-}
-- | Assumes that local names do not shadow top level names.
module Cryptol.ModuleSystem.InstantiateModule
( instantiateModule
) where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
i... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/f8b55439467abe3e7427b80edc37ff95a13de62b/src/Cryptol/ModuleSystem/InstantiateModule.hs | haskell | # Language FlexibleInstances, PatternGuards #
# Language BlockArguments #
| Assumes that local names do not shadow top level names.
XXX: Should we simplify constraints in the instantiated modules?
If so, we also need to adjust the constraint parameters on terms appropriately,
especially when working with dictionarie... | module Cryptol.ModuleSystem.InstantiateModule
( instantiateModule
) where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import MonadLib(ReaderT,runReaderT,ask)
import Cryptol.Utils.Panic(panic)
import Cryptol.Utils.Ident... |
f5da67da5aaf840a7332b1aee9a82474b4bc2d10b69fccb2634fabba22345c47 | cs136/seashell | password-tunnel.rkt | #lang typed/racket
Seashell 's authentication and communications backend .
Copyright ( C ) 2013 - 2015 The Seashell Maintainers .
;;
;; 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 ... | null | https://raw.githubusercontent.com/cs136/seashell/17cc2b0a6d2cdac270d7168e03aa5fed88f9eb02/src/collects/seashell/tunnel/password-tunnel.rkt | racket |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
See also 'ADDITIONAL TERMS' at the end of the included LICENSE file.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTAB... | #lang typed/racket
Seashell 's authentication and communications backend .
Copyright ( C ) 2013 - 2015 The Seashell Maintainers .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU ... |
7660308a10b7b424121e8fbebdbc1c34fc662ddd2478e815d2fc639be02635a2 | AbstractMachinesLab/caramel | printtyp.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and ,... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/upstream/ocaml_408/typing/printtyp.ml | ocaml | ************************************************************************
OCaml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Ctype
open Format
open Longident
open Path
open Asttypes
open Types
open Btype
open Outcometree
module... |
e0ae1a61e9fa3c90547b96b54000dcad7fcfa59fe933f516e70e37b90ffb620a | clojars/clojars-web | config.clj | (ns clojars.config
(:require
[aero.core :as aero]
[clojure.java.io :as io]
[cognitect.aws.client.api :as aws]))
(defn- ssm-client
[]
(aws/client {:api :ssm}))
(defn- throw-on-error
[v]
(if (some? (:cognitect.anomalies/category v))
(throw (ex-info "SSM request failed" v))
v))
(defn- get-par... | null | https://raw.githubusercontent.com/clojars/clojars-web/7e5723025251c7f301d56fcfb004c7634a39f686/src/clojars/config.clj | clojure | (ns clojars.config
(:require
[aero.core :as aero]
[clojure.java.io :as io]
[cognitect.aws.client.api :as aws]))
(defn- ssm-client
[]
(aws/client {:api :ssm}))
(defn- throw-on-error
[v]
(if (some? (:cognitect.anomalies/category v))
(throw (ex-info "SSM request failed" v))
v))
(defn- get-par... | |
a714c1d6f8d98d9a802ce1d0ce164570654a864c234771aeed74886dcf5ebf9f | BranchTaken/Hemlock | test_bit_pop_bit_clz_bit_ctz.ml | open! Basis.Rudiments
open! Basis
open U64
let test () =
let rec test_u64s = function
| [] -> ()
| u :: us' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_{pop,clz,ctz} "
|> fmt ~alt:true ~zpad:true ~width:16L ~radix:Radix.Hex u
|> Fmt.fmt " -> "
|> Uns.pp (bit_pop u)
... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u64/test_bit_pop_bit_clz_bit_ctz.ml | ocaml | open! Basis.Rudiments
open! Basis
open U64
let test () =
let rec test_u64s = function
| [] -> ()
| u :: us' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_{pop,clz,ctz} "
|> fmt ~alt:true ~zpad:true ~width:16L ~radix:Radix.Hex u
|> Fmt.fmt " -> "
|> Uns.pp (bit_pop u)
... | |
4f772f4564d10695299201857d8efc7998f494fd8a91c52f18567c1697d1a4cb | jaked/ocamljs | stdlib_printf.ml | open OUnit
let tests = "Stdlib_printf" >::: [
"1" >:: begin fun () -> assert_equal (Printf.sprintf "%d %i %n %l %L %N" 1 2 3 4 5 6) "1 2 3 4 5 6" end;
"2" >:: begin fun () -> assert_equal (Printf.sprintf "%u %x %X %o" 10 12 13 14) "10 c D 16" end;
"3" >:: begin fun () -> assert_equal (Printf.sprintf "%s %S" "foo... | null | https://raw.githubusercontent.com/jaked/ocamljs/378080ff1c8033bb15ed2bd29bf1443e301d7af8/test/stdlib/stdlib_printf.ml | ocaml | open OUnit
let tests = "Stdlib_printf" >::: [
"1" >:: begin fun () -> assert_equal (Printf.sprintf "%d %i %n %l %L %N" 1 2 3 4 5 6) "1 2 3 4 5 6" end;
"2" >:: begin fun () -> assert_equal (Printf.sprintf "%u %x %X %o" 10 12 13 14) "10 c D 16" end;
"3" >:: begin fun () -> assert_equal (Printf.sprintf "%s %S" "foo... | |
3a350cfd6b7b16e6c7741e803fb13408dc221a777016c2281d4dfaf92c9627ef | appleshan/cl-http | computations.lisp | -*- Mode : LISP ; Package : lambda - ir ; BASE : 10 ; SYNTAX : ansi - common - lisp -*-
( C ) Copyright 1997 , ( ) .
;;; All Rights Reserved.
;;;
;;;
;;;-------------------------------------------------------------------
;;;
;;; Basic framework for computation objects
;;;
;; Static computation objects ... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lambda-ir/computations.lisp | lisp | Package : lambda - ir ; BASE : 10 ; SYNTAX : ansi - common - lisp -*-
All Rights Reserved.
-------------------------------------------------------------------
Basic framework for computation objects
Static computation objects are expected to be computed infrequently.
Dynamic computation objects are expect... |
( C ) Copyright 1997 , ( ) .
(in-package :lambda-ir)
(defgeneric propagate-arguments (computations)
(:documentation "Generates a list of all arguments needed for the sub-computations contained in COMPUTATIONS."))
(defmethod propagate-arguments ((computation base-computation-type))
(with-slots (expected-a... |
f18249adbbc50061640a640d89f3dd4837fe5f6e73e24b2950e643bb99ea69d7 | drewolson/aoc-hs | Main.hs | module Main
( main,
)
where
import Aoc.Runner.Args (Args (..))
import Aoc.Runner.Args qualified as Args
import Aoc.Runner.Year2021 qualified as Year2021
import Aoc.Runner.Year2022 qualified as Year2022
readInput :: Args -> IO String
readInput Args {year, day} = readFile $ "./data/" <> show year <> "/day" <> padde... | null | https://raw.githubusercontent.com/drewolson/aoc-hs/ae968d9fed00213de704bae079759bdd7427c862/aoc-runner/app/Main.hs | haskell | module Main
( main,
)
where
import Aoc.Runner.Args (Args (..))
import Aoc.Runner.Args qualified as Args
import Aoc.Runner.Year2021 qualified as Year2021
import Aoc.Runner.Year2022 qualified as Year2022
readInput :: Args -> IO String
readInput Args {year, day} = readFile $ "./data/" <> show year <> "/day" <> padde... | |
d95ad410d159cb2d98353ea0ef0812274171d92a5ba6e1b474200e77aa56bd8a | gedge-platform/gedge-platform | rabbit_mgmt_wm_permissions_user.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_wm_permissions_user).
-expor... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_wm_permissions_user.erl | erlang |
-------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_permissions_user).
-export([ini... |
a2023149da359942644ef69d898b7f3d3c30e8477034c6f64e43f6ad10ce5f98 | abarbu/android-kawa | hello.scm | (require 'android-defs)
(define-namespace Log "class:android.util.Log")
(activity hello1
(on-create-view
(Log:i "kawa" "i")
(Log:d "kawa" "d")
(Log:e "kawa" "e")
(android.widget.TextView
(this)
text: "Hello, Android from Kawa Scheme!")))
(activity hello2
(on-create-view
(android.widget.Lin... | null | https://raw.githubusercontent.com/abarbu/android-kawa/3e7b5dc46bdda436e64f70e71f37a0a7e74e7e5f/KawaHello/src/kawa/android/hello.scm | scheme | (require 'android-defs)
(define-namespace Log "class:android.util.Log")
(activity hello1
(on-create-view
(Log:i "kawa" "i")
(Log:d "kawa" "d")
(Log:e "kawa" "e")
(android.widget.TextView
(this)
text: "Hello, Android from Kawa Scheme!")))
(activity hello2
(on-create-view
(android.widget.Lin... | |
ec4fd14aa0aa91e9eedcd7b6b1fa5afae0f864dfefd09825d50d38b017a2f65d | kyleburton/clj-lfsr | core.clj | (ns com.github.kyleburton.clj-lfsr.core
(:import [java.math BigInteger]))
TODO : looks like BigInteger can do all the operations we want / need
ditch the bitset and just use BigInteger
NB : byte - positions start at 1 not 0
(defn make-mask [byte-positions]
(reduce #(.setBit ^BigInteger %1 (dec %2))
... | null | https://raw.githubusercontent.com/kyleburton/clj-lfsr/3d37d7116ad8ae565cb9e771659a98a608a4574b/src/com/github/kyleburton/clj_lfsr/core.clj | clojure | (class (make-mask [0 1 2]))
| (ns com.github.kyleburton.clj-lfsr.core
(:import [java.math BigInteger]))
TODO : looks like BigInteger can do all the operations we want / need
ditch the bitset and just use BigInteger
NB : byte - positions start at 1 not 0
(defn make-mask [byte-positions]
(reduce #(.setBit ^BigInteger %1 (dec %2))
... |
0d0a4101c01616c2dfc71cddd57a48d53283aa4eb5aaa77b6adac6f9bd869936 | finnishtransportagency/harja | sanktioraportti_yhteiset.clj | (ns harja.palvelin.raportointi.raportit.sanktioraportti-yhteiset
(:require
[harja.domain.laadunseuranta.sanktio :as sanktiot-domain]
[harja.domain.yllapitokohde :as yllapitokohteet-domain]
[clojure.string :as str]
[clojure.set :as set]
[harja.kyselyt.konversio :as konv]
[harja.kyselyt.urakan-t... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/e54f1e98af6dfaad959cc915c93f63619ba4c4ed/src/clj/harja/palvelin/raportointi/raportit/sanktioraportti_yhteiset.clj | clojure | A-ryhmän eri toimenpiteiden rivit
"Ei tarvita sanktiotyyppiä"
"Ei tarvita sanktiotyyppiä"
"Ei tarvita sanktiotyyppiä"
Sanktiotaulukko
Arvonvähennystaulukko | (ns harja.palvelin.raportointi.raportit.sanktioraportti-yhteiset
(:require
[harja.domain.laadunseuranta.sanktio :as sanktiot-domain]
[harja.domain.yllapitokohde :as yllapitokohteet-domain]
[clojure.string :as str]
[clojure.set :as set]
[harja.kyselyt.konversio :as konv]
[harja.kyselyt.urakan-t... |
2628dcd987b95f53201b169a395ce285f40e47779a8e814a191f38a1f86e919a | janestreet/hardcaml | build_mode.mli | (** Specify whether to configure the hardware for simulation or synthesis. *)
open Base
type t =
| Simulation
| Synthesis
[@@deriving sexp_of, compare, equal]
val of_string : string -> t
| null | https://raw.githubusercontent.com/janestreet/hardcaml/a9b1880ca2fb1a566eac66d935cacf344ec76b13/src/build_mode.mli | ocaml | * Specify whether to configure the hardware for simulation or synthesis. |
open Base
type t =
| Simulation
| Synthesis
[@@deriving sexp_of, compare, equal]
val of_string : string -> t
|
66144d0c4e758368431aef519fc6cf059adf2fb00beb9bf856aabbe7649eec60 | pirapira/coq2rust | equality.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/tactics/equality.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
true = support rewriting depend... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Evd... |
32bb0cf9e056521afb1a2b9f60078e952f5af9e0a76337e20bcdda47c3bb894e | deadpendency/deadpendency | OverallReport.hs | # OPTIONS_GHC -fno - warn - orphans #
module Common.HtmlReport.Instances.OverallReport () where
import Common.HtmlReport.HtmlReport
import Common.HtmlReport.HtmlReportDecodeError
import Common.HtmlReport.HtmlReportTextual
import Common.HtmlReport.Instances.AppVersion ()
import Common.HtmlReport.Instances.DependencyFa... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/HtmlReport/Instances/OverallReport.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Common.HtmlReport.Instances.OverallReport () where
import Common.HtmlReport.HtmlReport
import Common.HtmlReport.HtmlReportDecodeError
import Common.HtmlReport.HtmlReportTextual
import Common.HtmlReport.Instances.AppVersion ()
import Common.HtmlReport.Instances.DependencyFa... | |
3e1ddf97e5ef467363d2770de4b71424a82dc4f06af419029b3138886f0d9915 | monadic-xyz/ipfs | API.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
-- | AUTOGENERATED
module Network.IPFS.API where
import Data.Aeson (Value)
import Data.ByteString (ByteString)
import qualified Data.ByteString.Lazy as L (ByteString)
import Data.Text (Text)
import Network.IPFS.API.Types
im... | null | https://raw.githubusercontent.com/monadic-xyz/ipfs/b56c0af905e371c231d52f86f2586d473941afec/ipfs-api/gen/Network/IPFS/API.hs | haskell | | AUTOGENERATED
| Add a file or directory to ipfs.
Response example:
> {
> "Name": "<string>"
> }
Add directory paths recursively. Default: false.
Write minimal output.
Write only final hash.
Write no output.
Stream progress data.
Only chunk and hash - do not write to disk.
Wrap files with a director... | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Network.IPFS.API where
import Data.Aeson (Value)
import Data.ByteString (ByteString)
import qualified Data.ByteString.Lazy as L (ByteString)
import Data.Text (Text)
import Network.IPFS.API.Types
import Serv... |
1f41028f3c82d7ecd09866d1fbd087b8c611abb11d5765cc113f3375b68196e4 | wfleming/codeclimate-shellcheck | CLI.hs | module CLI where
import Options.Applicative
--------------------------------------------------------------------------------
-- | Represents arguments that can be passed to the CLI.
data CLIOpts = CLIOpts { configPath :: Maybe FilePath
, envPath :: Maybe FilePath
}
----... | null | https://raw.githubusercontent.com/wfleming/codeclimate-shellcheck/99266bd6863824bbd3b4d793e34cea0a6659df13/app/CLI.hs | haskell | ------------------------------------------------------------------------------
| Represents arguments that can be passed to the CLI.
------------------------------------------------------------------------------
| Parses CLIOpts and adds description when generating help text.
-----------------------------------------... | module CLI where
import Options.Applicative
data CLIOpts = CLIOpts { configPath :: Maybe FilePath
, envPath :: Maybe FilePath
}
cliOpts :: ParserInfo CLIOpts
cliOpts =
info (helper <*> cliOptsParser)
(fullDesc
<> progDesc "Print ShellCheck results as CodeCli... |
ed3a865c0780b1d75189a6ac5bcb56db74c4c2559d0687b99305c7f647523a7d | liquidz/antq | url_test.clj | (ns antq.util.url-test
(:require
[antq.util.url :as sut]
[clojure.test :as t]))
(t/deftest ensure-tail-slash-test
(t/is (= "foo/" (sut/ensure-tail-slash "foo")))
(t/is (= "foo/" (sut/ensure-tail-slash "foo/"))))
(t/deftest ensure-git-https-url-test
(t/is (= "/"
(sut/ensure-git-https-url "")))... | null | https://raw.githubusercontent.com/liquidz/antq/a6e13c61f21f4a14828c55e7d3760df9210d3c75/test/antq/util/url_test.clj | clojure | (ns antq.util.url-test
(:require
[antq.util.url :as sut]
[clojure.test :as t]))
(t/deftest ensure-tail-slash-test
(t/is (= "foo/" (sut/ensure-tail-slash "foo")))
(t/is (= "foo/" (sut/ensure-tail-slash "foo/"))))
(t/deftest ensure-git-https-url-test
(t/is (= "/"
(sut/ensure-git-https-url "")))... | |
60bb339e5c19a34648841676a533d9032181cdafc213d47dbc442fbdaea46b5f | zouv/erlbte | n_random_selector.erl | %% Author: zouv
Date : 2016 - 09 - 26
%% Doc: Random Selector Node
-module(n_random_selector).
-behaviour(bte_node_behaviour).
-include("common.hrl").
-record(r_data, {
tick_children = []
}).
-export([
node_name/0,
init/1,
execute/3
]).
node_name() ->
"RandomSelector".
init(_Parameters) ->
#r_data{}... | null | https://raw.githubusercontent.com/zouv/erlbte/dad129dafdbbac11b38c7d10f0f0b4d49555f427/src/composites/n_random_selector.erl | erlang | Author: zouv
Doc: Random Selector Node | Date : 2016 - 09 - 26
-module(n_random_selector).
-behaviour(bte_node_behaviour).
-include("common.hrl").
-record(r_data, {
tick_children = []
}).
-export([
node_name/0,
init/1,
execute/3
]).
node_name() ->
"RandomSelector".
init(_Parameters) ->
#r_data{}.
execute(BteStatus, Node, IsFromStack) ->
... |
f4319fb56fa54bd6ad1023d8f0eb90b7e52ec770a0f4692fad27461452729aa6 | lojic/LearningRacket | parallel-letter-frequency-test.rkt | #lang racket
I had trouble running this from w / in , so I tested from the commandline via :
; raco test parallel-letter-frequency-test.rkt
(require "parallel-letter-frequency.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define alphabet "abcdefghijklmnopqrstuvwxyz")
(define alpha-hash (make-immu... | null | https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/exercism.io/parallel-letter-frequency/parallel-letter-frequency-test.rkt | racket | raco test parallel-letter-frequency-test.rkt | #lang racket
I had trouble running this from w / in , so I tested from the commandline via :
(require "parallel-letter-frequency.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define alphabet "abcdefghijklmnopqrstuvwxyz")
(define alpha-hash (make-immutable-hash (map (λ (c) (cons c 1)) (string->lis... |
8f9137bc301daf824765a6fcd9fc8b392fd041a3c6328a8f52566476f19de5fc | Factual/skuld | aae.clj | (ns skuld.aae
"Active-anti-entropy service. This watches over local partitions and
continually synchronizes their data with their peers."
(:use clojure.tools.logging)
(:require [skuld.vnode :as vnode]
[skuld.net :as net]
[merkle.kv.linear :as merkle]
[clj-helix.route :as rout... | null | https://raw.githubusercontent.com/Factual/skuld/79599f9b13aee35c680183d6bf9e2fcbfde1d7c7/src/skuld/aae.clj | clojure | Diff against our local collection.
false otherwise."
false otherwise."
Get remote tree
Compute diffs
Send updates
Register handler | (ns skuld.aae
"Active-anti-entropy service. This watches over local partitions and
continually synchronizes their data with their peers."
(:use clojure.tools.logging)
(:require [skuld.vnode :as vnode]
[skuld.net :as net]
[merkle.kv.linear :as merkle]
[clj-helix.route :as rout... |
f88cdfa43525adcd1173c1af89f74cfa0f69e541806bea0d4935535990bbcfd2 | ekmett/algebra | Class.hs | # LANGUAGE MultiParamTypeClasses , FlexibleInstances #
module Numeric.Quadrance.Class
( Quadrance(..)
) where
import Data.Int
import Data.Word
import Numeric.Additive.Class
import Numeric.Algebra.Class
import Numeric.Algebra.Unital
import Numeric.Rig.Class
import Numeric.Natural
import Prelude hiding ((+),(*))
--... | null | https://raw.githubusercontent.com/ekmett/algebra/12dd33e848f406dd53d19b69b4f14c93ba6e352b/src/Numeric/Quadrance/Class.hs | haskell | a module with a computable squared norm | # LANGUAGE MultiParamTypeClasses , FlexibleInstances #
module Numeric.Quadrance.Class
( Quadrance(..)
) where
import Data.Int
import Data.Word
import Numeric.Additive.Class
import Numeric.Algebra.Class
import Numeric.Algebra.Unital
import Numeric.Rig.Class
import Numeric.Natural
import Prelude hiding ((+),(*))
cl... |
9c91ac74ef06dd7e189cee0afc1f85361d2b91121893c5505d89cd9d41713af7 | dyzsr/ocaml-selectml | load_path.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/utils/load_path.ml | ocaml | ************************************************************************
OCaml
... | , Jane Street Europe
Copyright 2018 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
open Local_store
module STbl = Misc.Stdlib.String.Tbl
type registry = string STbl.t
let files : registry ... |
c8f60c6fd40a985313be69513be770d98d953cb2bba2e89c7b1cc8770df161ec | openmusic-project/openmusic | lists.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you can redist... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9661f6467a75e11d86254d3e4a75ab4293273f81/OPENMUSIC/code/projects/basicproject/functions/lists.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
=================... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License ... |
8b0df7810bbce6c931080116709b8c2f8d8e6f708b16953062d3d26daf0aba06 | akiss/akiss | rewriting.mli | (****************************************************************************)
(* Akiss *)
Copyright ( C ) 2011 - 2014 Baelde , Ciobaca , Delaune , Kremer
(* *)
... | null | https://raw.githubusercontent.com/akiss/akiss/5577c6bb31e463c18c1cb05430e344a2734c8407/src/rewriting.mli | ocaml | **************************************************************************
Akiss
This program is free software; you can redistribute it and/or modify
(at your option) an... | Copyright ( C ) 2011 - 2014 Baelde , Ciobaca , Delaune , Kremer
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
You should have received a copy of the GNU General Public License along
with ... |
45da762f60a6caac90e3790803adfa8b5416d9732c5d339372c0a0f169a61eef | cnuernber/charred | coerce.clj | (ns charred.coerce
"Coercions to specific java types."
(:import [java.util Iterator NoSuchElementException]
[java.util.function Supplier Function BiFunction Consumer Predicate BiConsumer]
[java.util.stream Stream]
[clojure.lang IFn]))
(set! *warn-on-reflection* true)
(defn- faile... | null | https://raw.githubusercontent.com/cnuernber/charred/bfe0cae26eba0aec1402b2cce7a1f5a33fbf84e7/src/charred/coerce.clj | clojure | (ns charred.coerce
"Coercions to specific java types."
(:import [java.util Iterator NoSuchElementException]
[java.util.function Supplier Function BiFunction Consumer Predicate BiConsumer]
[java.util.stream Stream]
[clojure.lang IFn]))
(set! *warn-on-reflection* true)
(defn- faile... | |
4739c22d77e8cad5e191f59635f27d3b4e233f49ff2f46a21bdf0573d029508f | wireless-net/erlang-nommu | wxScrolledWindow.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxScrolledWindow.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxScrolledWindow).
-include("wxe.... |
69569b9daf8831e8e21d56e323422ac9554484947dee1735cb93fc92c24cdf5c | alanz/incremental-play | Repetitive2.hs | # OPTIONS_GHC -w #
{-# OPTIONS -XMagicHash -XBangPatterns -XTypeSynonymInstances -XFlexibleInstances -cpp #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DeriveFoldable #
module Repetitive2 where
import Data.Char
import Data.Foldable
import Data.Maybe
import Data.List
import Data.Tree
import qualified Data.Bits as B... | null | https://raw.githubusercontent.com/alanz/incremental-play/b7b8df2858adaf8637179f009e4ce30dc9fa4751/generated-parsers/Repetitive2.hs | haskell | # OPTIONS -XMagicHash -XBangPatterns -XTypeSynonymInstances -XFlexibleInstances -cpp #
# LANGUAGE OverloadedStrings #
# NOINLINE happyExpListPerState #
[(ActionEntry,0,-3,1,2,[(1,4),(2,3)]),(ActionEntry,1,0,0,1,[(2,3)]),(ActionEntry,2,-8,7,4,[(4,5),(5,6),(6,7),(11,8)]),(ActionEntry,3,0,0,1,[(17,-1)]),(ActionEntry,4,-4... | # OPTIONS_GHC -w #
# LANGUAGE DeriveFoldable #
module Repetitive2 where
import Data.Char
import Data.Foldable
import Data.Maybe
import Data.List
import Data.Tree
import qualified Data.Bits as Bits
import Data.Text.Prettyprint.Doc
import Data.Text.Prettyprint.Doc.Render.Terminal
import qualified Data.Array as Happy_Dat... |
1d9b84892d4f7adaf52645444e804a8f6a5542bfca801b4464ff986e954f5518 | fetburner/Coq2SML | scheme.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/plugins/extraction/scheme.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
val scheme_descr : Miniml.lan... |
f809fcd213b5174ae431e70a44b9a8dfc9aa66a62272fb97f306dd67ada1d070 | ocaml-community/calendar | calendar.ml | (**************************************************************************)
(* *)
(* This file is part of Calendar. *)
(* *)
Copyright... | null | https://raw.githubusercontent.com/ocaml-community/calendar/a447a88ae3c1e9873e32d2a95d3d3e7c5ed4a7da/src/calendar.ml | ocaml | ************************************************************************
This file is part of Calendar.
... | Copyright ( C ) 2003 - 2011
Lesser General Public License version 2.1 as published by the
Free Software Foundation , with a special linking exception ( usual
See the GNU Lesser General Public Licence version 2.1 for more
include Calendar_builder.Make(Date)(Time)
module Precise = C... |
3cedc0b4712593298501507a3c264c9baf64cf59bcecf1398f5d888927aa4f98 | clarkhillm/Hawkmoth | worker2.clj | (ns
^{:author cWX205128}
framework.worker.worker2
(:use [framework.properties])
)
(defn work [name]
(loop [step 0]
(recur
(do
(+ step 1)))))
| null | https://raw.githubusercontent.com/clarkhillm/Hawkmoth/608767bb86c380fadaf12f9201e2198e5766eabb/src/framework/worker/worker2.clj | clojure | (ns
^{:author cWX205128}
framework.worker.worker2
(:use [framework.properties])
)
(defn work [name]
(loop [step 0]
(recur
(do
(+ step 1)))))
| |
c10d2be8a3be41a6efe483088900d7fdfd688a763b3b743f04f6d3382d37e774 | athos/Bigmouth | salmon.clj | (ns bigmouth.routes.salmon
(:require [bigmouth.interaction :as interaction]
[bigmouth.models.account :as account]
[bigmouth.models.keystore :as keystore]
[bigmouth.salmon :as salmon]
[bigmouth.specs :as specs]
[bigmouth.webfinger :as webfinger]
[... | null | https://raw.githubusercontent.com/athos/Bigmouth/d7a43cc0317175eabb3be22a1211caf34011eb2e/src/bigmouth/routes/salmon.clj | clojure | (ns bigmouth.routes.salmon
(:require [bigmouth.interaction :as interaction]
[bigmouth.models.account :as account]
[bigmouth.models.keystore :as keystore]
[bigmouth.salmon :as salmon]
[bigmouth.specs :as specs]
[bigmouth.webfinger :as webfinger]
[... | |
f68e8a52421d0ca627adbd2ec1ae5bbbd8509110137b06f5240b5a157f3c899a | cheshire/onumerical | test_expression_f.ml | open Core.Std
open OUnit2
module Expression = Expression_f.Make(Str_var)(Float_number)
let tests = "expressions" >::: [
"main" >:: (fun _ ->
let a = Expression.of_assoc_list_and_const
[("x", 1.0); ("z", 2.0)] 5.0 in
let b = Expression.of_assoc_list_and_const
[("x", -1.0); (... | null | https://raw.githubusercontent.com/cheshire/onumerical/2ebe77edb61c761f1e1397dc37369f2cdc8021f7/tests/test_expression_f.ml | ocaml | open Core.Std
open OUnit2
module Expression = Expression_f.Make(Str_var)(Float_number)
let tests = "expressions" >::: [
"main" >:: (fun _ ->
let a = Expression.of_assoc_list_and_const
[("x", 1.0); ("z", 2.0)] 5.0 in
let b = Expression.of_assoc_list_and_const
[("x", -1.0); (... | |
54f2a865c8247d5c3bfb005fd6f4f81b37a1c0b9e8a370e9dfbd07a825162e05 | alexandroid000/improv | Int16MultiArray.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Std_msgs.Int16MultiArray where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBina... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Std_msgs/Ros/Std_msgs/Int16MultiArray.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Std_msgs.Int16MultiArray where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import qualified GHC.Generics as G
i... |
8346d6ee491d587d6f1953be580d14e1e58ab2596cfe35933fb38796068daab0 | tek/polysemy-hasql | DeriveNewtypePartialTest.hs | # options_ghc -Wno - redundant - constraints #
module Polysemy.Hasql.Test.Tree.DeriveNewtypePartialTest where
import Path (File, Path, Rel)
import Polysemy.Db.Data.FieldId (FieldId (NamedField))
import Polysemy.Db.Data.PartialField (Partially)
import Polysemy.Db.Data.Rep (Auto, Prim, Rep)
import Polysemy.Db.Kind.Data... | null | https://raw.githubusercontent.com/tek/polysemy-hasql/443ccf348bb8af0ec0543981d58af8aa26fc4c10/packages/hasql/test/Polysemy/Hasql/Test/Tree/DeriveNewtypePartialTest.hs | haskell | # options_ghc -Wno - redundant - constraints #
module Polysemy.Hasql.Test.Tree.DeriveNewtypePartialTest where
import Path (File, Path, Rel)
import Polysemy.Db.Data.FieldId (FieldId (NamedField))
import Polysemy.Db.Data.PartialField (Partially)
import Polysemy.Db.Data.Rep (Auto, Prim, Rep)
import Polysemy.Db.Kind.Data... | |
641a6ed2bdd0a256ab254a16bbe5ae6a7419536e671735825dcd55f4bd814adb | BnMcGn/snakes | tests.lisp | ;;;; -*- lisp -*-
(defpackage #:snakes-test
(:shadowing-import-from #:snakes #:repeat)
(:use #:cl #:snakes #:fiveam #:iterate #:snakes))
(in-package :snakes-test)
(eval-when (:compile-toplevel :load-toplevel :execute)
(def-suite snakes-test))
(in-suite snakes-test)
(defvar data '(1 2 3 4 5))
(test with-y... | null | https://raw.githubusercontent.com/BnMcGn/snakes/8c7eae579bb24539dbd584a81a1049f3d3ff8bf8/tests.lisp | lisp | -*- lisp -*- |
(defpackage #:snakes-test
(:shadowing-import-from #:snakes #:repeat)
(:use #:cl #:snakes #:fiveam #:iterate #:snakes))
(in-package :snakes-test)
(eval-when (:compile-toplevel :load-toplevel :execute)
(def-suite snakes-test))
(in-suite snakes-test)
(defvar data '(1 2 3 4 5))
(test with-yield
(is (functi... |
ad7013af0a34f3ae1042b2e6fbd710b9059b0a206536d7bc92e275a9f1172642 | deadcode/Learning-CL--David-Touretzky | 6.33.lisp | (setf books '((war-and-peace . leo-tostoy)
(alice-in-wonderland . lewis-carol)
(odyssey . homer)
(divine-comedy . dante-alighieri)
(romeo-and-juliet . william-shakespeare)))
(defun who-wrote (book)
(cdr (assoc book books)))
(defun wrote-what (author)
... | null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%206/6.33.lisp | lisp | (setf books '((war-and-peace . leo-tostoy)
(alice-in-wonderland . lewis-carol)
(odyssey . homer)
(divine-comedy . dante-alighieri)
(romeo-and-juliet . william-shakespeare)))
(defun who-wrote (book)
(cdr (assoc book books)))
(defun wrote-what (author)
... | |
550316c198c54fe298bf0c011305d90960cca79ee61f56fd38ecbcfa7274c6e9 | dbtoaster/dbtoaster-a5 | Heuristics.ml | *
A module for deciding on how to materialize a given ( delta ) query . It is used
by the Compiler module to produce a Plan.plan_t datastructure .
Driven by a set of heuristics rules , this module provides
two main functions :
{ ul
{ - { b should_update } decides wheth... | null | https://raw.githubusercontent.com/dbtoaster/dbtoaster-a5/6436110ad283378085a935ecca69080b7127467b/src/compiler/Heuristics.ml | ocaml | ****************************************************************************
****************************************************************************
* Obtain the human-readable representation of the optional event parameter.
It calls Schema.string_of_event if the event is passed.
****************************... | *
A module for deciding on how to materialize a given ( delta ) query . It is used
by the Compiler module to produce a Plan.plan_t datastructure .
Driven by a set of heuristics rules , this module provides
two main functions :
{ ul
{ - { b should_update } decides wheth... |
005954d5b308cf85daaf01c89a1553d7b699518b136f1b9dd11bb636f1298a1a | herd/herdtools7 | prettyConf.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/1b71583abe08dba21f09c1a7d56961a912d704c6/herd/prettyConf.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2012 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
83785f457600e2fa99c5f6761239a63ae088834a755fd9c6cd8fa6dc0f1d877d | expipiplus1/vulkan | Main.hs | module Main where
import Control.Exception ( mapException )
import qualified Data.List as List
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Data.Text as T
import Data... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/615f3350e71cccfe8f46129fbdb126b26cafe1e8/generate-new/vma/Main.hs | haskell | --------------------------------------------------------------
--------------------------------------------------------------
TODO: is there anything sensible to put in here
--------------------------------------------------------------
--------------------------------------------------------------
TODO: This may be... | module Main where
import Control.Exception ( mapException )
import qualified Data.List as List
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Data.Text as T
import Data... |
19869df842fb9a538671b4e57ffb4ab408f7eef36722da2835326df1e1e5df8a | cloverage/cloverage | source.clj | (ns cloverage.source
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.namespace.file :as ns.file]
[clojure.tools.reader :as r]
[clojure.tools.reader.reader-types :as rt])
(:import clojure.lang.RT
[java.io File InputStreamReader Pus... | null | https://raw.githubusercontent.com/cloverage/cloverage/dba7d72547748cf494f2bbc784b8a70ed8d9901f/cloverage/src/cloverage/source.clj | clojure | -> \"cloverage/source.clj\""
io/resource will return nil if the file doesn't exist
->
We assume the default charset is set correctly
`read-form` will return `nil` at the end of the file so keep reading forms until we run out | (ns cloverage.source
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.namespace.file :as ns.file]
[clojure.tools.reader :as r]
[clojure.tools.reader.reader-types :as rt])
(:import clojure.lang.RT
[java.io File InputStreamReader Pus... |
debb095647be670ada3b24bb471f773a46930249be2b0398870b8e30c5cfef3a | hazardfn/valvex | valvex_app.erl | %%%---------------------------------------------------------------------------------------------------------------------
@doc app
%% @end
%%%---------------------------------------------------------------------------------------------------------------------
-module(valvex_app).
-behaviour(application).
%% Appli... | null | https://raw.githubusercontent.com/hazardfn/valvex/ee48e83169ba999167bd137d5a01fe80da76fd5f/src/valvex_app.erl | erlang | ---------------------------------------------------------------------------------------------------------------------
@end
---------------------------------------------------------------------------------------------------------------------
Application callbacks
=======================================================... | @doc app
-module(valvex_app).
-behaviour(application).
-export([start/0, start/2, stop/1]).
start() ->
application:start(valvex).
start(_StartType, _StartArgs) ->
case application:get_all_env(valvex) of
[] -> valvex_sup:start_link();
_Options ->
{ok, Queues} = get_setting(valvex... |
cc6b9ad5905e8023d8d4dd3ae5566924da45c9172af382ede92b17a2a1dd2519 | Hans-Halverson/myte | installation.ml | type error =
| NoInstallationFound
| MalformedInstallation of string * string
let mytepath_env_variable = "MYTEPATH"
let installation_error_help_message =
"\n\nThere may have been an error during installation. Reinstall Myte or provide a path to a valid Myte installation by setting the `$MYTEPATH` environment v... | null | https://raw.githubusercontent.com/Hans-Halverson/myte/6f32bbb1dcc0fd63fb5bb50d3ec75192f6f1ba0e/src/common/installation.ml | ocaml | Verify that all necessary directories exist
Verify that all the necessary runtime directories exist | type error =
| NoInstallationFound
| MalformedInstallation of string * string
let mytepath_env_variable = "MYTEPATH"
let installation_error_help_message =
"\n\nThere may have been an error during installation. Reinstall Myte or provide a path to a valid Myte installation by setting the `$MYTEPATH` environment v... |
938fce3107ac83501b72904b966fb0cafb23834717154a049434a0a2d4e5e357 | macourtney/Conjure | test_controller.clj | (ns controllers.test-controller
(:use [conjure.flow.base]))
(def-action show
(println "In the show controller.")
"") | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_plugin/test/controllers/test_controller.clj | clojure | (ns controllers.test-controller
(:use [conjure.flow.base]))
(def-action show
(println "In the show controller.")
"") | |
e22e80b70e8f9943298a7c0af7c904ec6f1d09e3966393177fc162dda46981bc | plt-amy/ahc | lang.ml | open import "prelude.ml"
module S = import "data/set.ml"
module M = import "data/map.ml"
type expr =
| Ref of string
| App of expr * expr
| Lam of string * expr
| Case of expr * list (string * list string * expr)
| If of expr * expr * expr
| Lit of int
| Let of list (string * expr) * expr
let app... | null | https://raw.githubusercontent.com/plt-amy/ahc/5595b4946a2cd17c31f1877d3914d77a97cafb1e/lang.ml | ocaml | open import "prelude.ml"
module S = import "data/set.ml"
module M = import "data/map.ml"
type expr =
| Ref of string
| App of expr * expr
| Lam of string * expr
| Case of expr * list (string * list string * expr)
| If of expr * expr * expr
| Lit of int
| Let of list (string * expr) * expr
let app... | |
7aedbe75102c0bb76cefb251ff380c40e7b62825b88d1f76803b13d3a37ba3cb | kees-/arena-graph | flavor.cljs | (ns kees.arena-graph.rf.flavor
(:require [re-frame.core :as re-frame :refer [reg-event-db reg-event-fx]]
[kees.arena-graph.rf.console :as console]))
;; ========== REDUNDANT ========================================================
(reg-event-db
::set-initialized
(fn [db _]
(assoc db :initialized? tru... | null | https://raw.githubusercontent.com/kees-/arena-graph/ad5840d14772184d16306e685e36a3b5f449d5ed/src/kees/arena_graph/rf/flavor.cljs | clojure | ========== REDUNDANT ========================================================
Hm...
A subtle nudge about what size of channel may work better.
========== EVENT HANDLING =================================================== | (ns kees.arena-graph.rf.flavor
(:require [re-frame.core :as re-frame :refer [reg-event-db reg-event-fx]]
[kees.arena-graph.rf.console :as console]))
(reg-event-db
::set-initialized
(fn [db _]
(assoc db :initialized? true)))
(reg-event-db
::set-busy
(fn [db [_ bool]]
(-> db
(assoc :worki... |
7d0d3e0022237c81cf4840c67a405a8969f13bb7b1b5134325f5d87f6233c316 | BioHaskell/hPDB | ParseMASTER.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
-- | Parsing MASTER records.
module Bio.PDB.EventParser.ParseMASTER(parseMASTER)
where
import Prelude hiding(String)
import qualified Data.ByteString.Char8 as BS
import Bio.PDB.EventParser.PDBEvents
import Bio.PDB.EventParser.PDBParsingAbstraction... | null | https://raw.githubusercontent.com/BioHaskell/hPDB/5be747e2f2c57370b498f4c11f9f1887fdab0418/Bio/PDB/EventParser/ParseMASTER.hs | haskell | # LANGUAGE OverloadedStrings #
| Parsing MASTER records.
------------- {{{ MASTER records
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
}
| Fields of the MASTER record
deprecated
| Parses a MASTER ... | # LANGUAGE ScopedTypeVariables #
module Bio.PDB.EventParser.ParseMASTER(parseMASTER)
where
import Prelude hiding(String)
import qualified Data.ByteString.Char8 as BS
import Bio.PDB.EventParser.PDBEvents
import Bio.PDB.EventParser.PDBParsingAbstractions
-
COLUMNS DATA TYPE FIELD DEFINITION... |
e8f0b8390abca749acf625b45cce699bb8f527b88c2554f5ec56fe96be9f7711 | dalaing/little-languages | Infer.hs | module Components.Term.Note.Infer where
import Control.Lens (preview, review)
import Common.Recursion (MaybeStep(..))
import Common.Term.Infer
import Components.Type.Note.Data
import Components.Term.Note.Data
inferTmNoted :: ( WithNoteTerm n ty tm
, WithNoteType n ty
, Monad m
... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-modular/src/Components/Term/Note/Infer.hs | haskell | module Components.Term.Note.Infer where
import Control.Lens (preview, review)
import Common.Recursion (MaybeStep(..))
import Common.Term.Infer
import Components.Type.Note.Data
import Components.Term.Note.Data
inferTmNoted :: ( WithNoteTerm n ty tm
, WithNoteType n ty
, Monad m
... | |
03b70708efdf57afdcc50c5d1c35f6d25b930f7b599791ccce70b69c2f14fb93 | satori-com/mzbench | mzb_compiler.erl | -module(mzb_compiler).
-export([compile/2]).
-include_lib("mzbench_language/include/mzbl_types.hrl").
compile(Pools, Env) ->
ReplaceFun =
fun (_Name, unbound, Acc) -> {nochange, Acc};
(Name, Value, Acc) ->
FunName = erlang:list_to_atom(Name),
NewOp = #operation... | null | https://raw.githubusercontent.com/satori-com/mzbench/02be2684655cde94d537c322bb0611e258ae9718/node/apps/mzbench/src/mzb_compiler.erl | erlang | -module(mzb_compiler).
-export([compile/2]).
-include_lib("mzbench_language/include/mzbl_types.hrl").
compile(Pools, Env) ->
ReplaceFun =
fun (_Name, unbound, Acc) -> {nochange, Acc};
(Name, Value, Acc) ->
FunName = erlang:list_to_atom(Name),
NewOp = #operation... | |
b3358bcd2a4729fcb52ec896c1ecec53557f4e1f0b9817a140ef5abe4f085d8e | hakaru-dev/hakaru | Disintegrate.hs | # LANGUAGE OverloadedStrings
, PatternGuards
, TypeOperators
, DataKinds
, GADTs
, KindSignatures
, FlexibleContexts
, RankNTypes
, CPP #
, PatternGuards
, TypeOperators
, DataKinds
... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/commands/Disintegrate.hs | haskell | ++ "\nGiven\n" ++ show a
| Use a list of variables to wrap lambdas around a given term | # LANGUAGE OverloadedStrings
, PatternGuards
, TypeOperators
, DataKinds
, GADTs
, KindSignatures
, FlexibleContexts
, RankNTypes
, CPP #
, PatternGuards
, TypeOperators
, DataKinds
... |
1754f78d5e221e7e5e4ad5e5edc149f16cf1711427a85dff6dd4e2e65aa6f909 | hopv/homusat | types.mli | (* Intersection types *)
module Sigma : X.Set.S with type elt = int
module Tau : sig
type t = int
type raw = Sigma.t list * LTS.state
val encode : raw -> t
val decode : t -> raw
end
(* Type environment *)
module Gamma = Id.IdMap
(* Set of type environments *)
module Theta : X.Set.S with type elt = Sigm... | null | https://raw.githubusercontent.com/hopv/homusat/cc05711a3f9d45b253b83ad09a2d0288115cc4f4/types.mli | ocaml | Intersection types
Type environment
Set of type environments
Map from tau to something |
module Sigma : X.Set.S with type elt = int
module Tau : sig
type t = int
type raw = Sigma.t list * LTS.state
val encode : raw -> t
val decode : t -> raw
end
module Gamma = Id.IdMap
module Theta : X.Set.S with type elt = Sigma.t Gamma.t
module Epsilon : X.Map.S with type key = int
val register_states :... |
82b4e6ec2b78e5fd3f625fb70f57aab31a838dbf70e5051886fbc564e5cb9fef | input-output-hk/cardano-explorer | Run.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Explorer.DB.Run
( getBackendGhci
, ghciDebugQuery
, runDbAction
, runDbHandleLogger
, runDbIohkLogging
, runDbNoLogging
, runDbStdoutLogging
) where
import Cardano.BM.Data.LogItem (LogObject (.... | null | https://raw.githubusercontent.com/input-output-hk/cardano-explorer/3abcb32339edac7c2397114a1d170cc76b82e9b6/cardano-explorer-db/src/Explorer/DB/Run.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
| Run a DB action logging via the provided Handle.
The 'runSqlConnWithIsolation' function starts a transaction, runs the 'dbAction'
and then commits the transaction.
| Run a DB action logging via iohk-monitoring-framework.
| Run a DB action without any lo... | # LANGUAGE LambdaCase #
module Explorer.DB.Run
( getBackendGhci
, ghciDebugQuery
, runDbAction
, runDbHandleLogger
, runDbIohkLogging
, runDbNoLogging
, runDbStdoutLogging
) where
import Cardano.BM.Data.LogItem (LogObject (..), LOContent (..), PrivacyAnnotation (..), mkLOMeta)
import ... |
d04cd02c726ce1b86ba0fcc9fcb9294e3f6f026d46ba72904906b2e99ac9a29f | jacquev6/General | Bool.ml | type t = bool
let of_string = OCSP.bool_of_string
let try_of_string s =
Exception.or_none (lazy (of_string s))
let to_string = OCSP.string_of_bool
let repr = OCSP.string_of_bool
let xor x y =
match (x, y) with
| (true, false) | (false, true) -> true
| (true, true) | (false, false) -> false
module O = st... | null | https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Foundations/Bool.ml | ocaml | type t = bool
let of_string = OCSP.bool_of_string
let try_of_string s =
Exception.or_none (lazy (of_string s))
let to_string = OCSP.string_of_bool
let repr = OCSP.string_of_bool
let xor x y =
match (x, y) with
| (true, false) | (false, true) -> true
| (true, true) | (false, false) -> false
module O = st... | |
8510b8b63539a26d716112a310cb474dfb662b64594fc65d0ca70170bb4872b8 | locusmath/locus | op.clj | (ns locus.set.quiver.relation.ternary.op
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.con.core.setpart :refer :all]
[locus.set.quiver.relation.binary.product :refer :all... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/quiver/relation/ternary/op.clj | clojure | A number of mathematical constructions have different representations based upon the
different topoi that they are embedded in. A binary operation can be expressed either in
terms of the topoi of sets or functions. It can be expressed as a set of ordered triples
or a function on ordered pairs. This file provides su... | (ns locus.set.quiver.relation.ternary.op
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.con.core.setpart :refer :all]
[locus.set.quiver.relation.binary.product :refer :all... |
962776c42b4a0ff394f8250babc98391bd2c1917e4f311a4922496e3771a1ef7 | mivoq/hunpos | main.ml | print_endline "Hello world" | null | https://raw.githubusercontent.com/mivoq/hunpos/0f0f775039fa749e67711c07ac681a16c0979349/ocaml-cmake/examples/hello_world/main.ml | ocaml | print_endline "Hello world" | |
ebfff470a8efa450abeda2a428868cf91914732fc5995fd46d4b14bb1e5d4cda | emqx/emqtt | emqtt_quic_stream.erl | %%-------------------------------------------------------------------------
Copyright ( c ) 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of ... | null | https://raw.githubusercontent.com/emqx/emqtt/b906aa411d2215d549f8c21cce6b60fd51c0fa4c/src/emqtt_quic_stream.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 exp... | Copyright ( c ) 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqtt_quic_stream).
-ifndef(BUILD_WITHOUT_QUIC).
-include_lib("quicer/include/quicer.hrl").
-ex... |
31d6c83055c18ffc4511de1ba0955a3744d600e50308c17bd7a6b53905325837 | tweag/asterius | T14497.hs | module Main (main) where
import System.Timeout
fuc :: Integer -> Integer
fuc 0 = 1
fuc n = n * fuc (n - 1)
main :: IO ()
main = do
let x = fuc 30000
timeout 1000 (print x)
print (x > 0)
| null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/rts/T14497.hs | haskell | module Main (main) where
import System.Timeout
fuc :: Integer -> Integer
fuc 0 = 1
fuc n = n * fuc (n - 1)
main :: IO ()
main = do
let x = fuc 30000
timeout 1000 (print x)
print (x > 0)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.