_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 |
|---|---|---|---|---|---|---|---|---|
be49a02be786327e38ddc0ccfeb63d305dc41675643fb6a7417cb40b6c0e1f78 | YoshikuniJujo/funpaala | sumN1.hs | sumN :: Integer -> Integer
sumN n = sum [0 .. n]
sum3N :: Integer -> Integer
sum3N n = sum $ map (* 3) [0 .. n]
sum3N5 :: Integer -> Integer
sum3N5 n = sum . map (* 3) $ filter ((/= 0) . (`mod` 5)) [0 .. n]
| null | https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/10_repetition/sumN1.hs | haskell | sumN :: Integer -> Integer
sumN n = sum [0 .. n]
sum3N :: Integer -> Integer
sum3N n = sum $ map (* 3) [0 .. n]
sum3N5 :: Integer -> Integer
sum3N5 n = sum . map (* 3) $ filter ((/= 0) . (`mod` 5)) [0 .. n]
| |
cb1c09bb351572e1bed98f4c0177d36fe05d4e3caab552bbfb1244f02fc366d7 | dmitryvk/sbcl-win32-threads | stack.lisp | ;;;; This file implements the stack analysis phase in the compiler. We
;;;; analyse lifetime of dynamically allocated object packets on stack
;;;; and insert cleanups where necessary.
;;;;
Currently there are two kinds of interesting stack packets : UVLs ,
;;;; whose use and destination lie in different blocks, and L... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/stack.lisp | lisp | This file implements the stack analysis phase in the compiler. We
analyse lifetime of dynamically allocated object packets on stack
and insert cleanups where necessary.
whose use and destination lie in different blocks, and LVARs of
constructors of dynamic-extent objects.
more information.
public domain. The s... | Currently there are two kinds of interesting stack packets : UVLs ,
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!C")
(defun find-pushed-lvars (block)
... |
024c96448c344bd0eccdad0908b47847f5ed996aae7e86149b5b3a23e6d19a69 | otabat/couchbase-clj | client.clj | (ns couchbase-clj.client
(:import [java.net URI]
[java.util Collection]
[java.util.concurrent TimeUnit Future]
[net.spy.memcached CASValue]
[net.spy.memcached.internal GetFuture BulkGetFuture OperationFuture]
[net.spy.memcached.transcoders Transcoder]
... | null | https://raw.githubusercontent.com/otabat/couchbase-clj/5f975dc85d0eec554034eefa9d97f1ee7ad9e84a/src/couchbase_clj/client.clj | clojure | TODO: Seems not working
[clj-client k]
TODO: Not working
(get-min-reconnect-interval [clj-client] "Get the min reconnect interval.")
TODO: APIs not provided?
(get-obs-poll-interval [clj-client])
(get-obs-poll-max [clj-client])
(async-get-views [clj-client design-doc]
"Asynchronously get a Vector of views.
Return ... | (ns couchbase-clj.client
(:import [java.net URI]
[java.util Collection]
[java.util.concurrent TimeUnit Future]
[net.spy.memcached CASValue]
[net.spy.memcached.internal GetFuture BulkGetFuture OperationFuture]
[net.spy.memcached.transcoders Transcoder]
... |
b638c54523fe04b76eb70ac8cdb343e426185d598db636b952363a608bd8c764 | aws-beam/aws-erlang | aws_amplifybackend.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc AWS Amplify Admin API
-module(aws_amplifybackend).
-export([clone_backend/4,
clone_backend/5,
create_backend/2,
create_backend/3,
create_backend_api/3,
create_backend_api/4,
... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_amplifybackend.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc AWS Amplify Admin API
====================================================================
API
====================================================================
@doc This operation clones an existing backend.
Backends are automatically created at the time of app ... | See -beam/aws-codegen for more details .
-module(aws_amplifybackend).
-export([clone_backend/4,
clone_backend/5,
create_backend/2,
create_backend/3,
create_backend_api/3,
create_backend_api/4,
create_backend_auth/3,
create_backend_auth/4,
creat... |
45f5949ea5f2e52ce25838c8d2c27f3573ccf15b251680561dbfb59583fa9cde | amnh/poy5 | pdfdraft.ml | (* \chaptertitle{Pdfdraft}{Make Draft Documents} *)
(* Make a PDF suitable for draft printing by replacing its images by crossed
boxes. Summary: pdfdraft \texttt{input.pdf} \texttt{output.pdf}.*)
open Utility
(* Predicate on an xobject: true if an image xobject. *)
let isimage pdf (_, xobj) =
Pdf.lookup_direct pdf ... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/camlpdf-0.3/pdfdraft.ml | ocaml | \chaptertitle{Pdfdraft}{Make Draft Documents}
Make a PDF suitable for draft printing by replacing its images by crossed
boxes. Summary: pdfdraft \texttt{input.pdf} \texttt{output.pdf}.
Predicate on an xobject: true if an image xobject.
Given a set of resources for a page, and the name of a resource, determine if
... |
open Utility
let isimage pdf (_, xobj) =
Pdf.lookup_direct pdf "/Subtype" xobj = Some (Pdf.Name "/Image")
let xobject_isimage pdf resources name =
match resources with
| Pdf.Dictionary _ ->
begin match Pdf.lookup_direct pdf "/XObject" resources with
| Some xobjects ->
isimage pdf ("", Pdf... |
0ca8fd5fd260004935d5bfaa22c3d7ebdfeba608def97b250f095235d751e251 | own-pt/cl-krr | tptp.lisp | Copyright 2016 IBM
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;; -2.0
;; Unless required by applicable law or agreed to in writing, software
distributed under the Licens... | null | https://raw.githubusercontent.com/own-pt/cl-krr/d21ce3c385ecb0b5b51bd2b6491a082532f9867c/tptp.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permis... | Copyright 2016 IBM
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package #:suo-kif)
(defun binary-logical-formula-tptp (l)
(ecase (car l)
(|and| (format nil "(~{~a~^ & ~})" (mapcar #'formula-tptp (cdr l))))
(|or| (format nil "(~{~a~^ | ~})" (mapcar #'formula-tptp (cdr l))))... |
df1e8c67bca1add5658e73a0cf7f93751f7db8667ee35970533269ac01a47986 | backtracking/ocamlgraph | prim.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/src/prim.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
module ty... |
4f0448502c6dd21d5f19a52a69ec8ae899a5e715954270d5c0562d86937050f1 | erlangonrails/devdb | file_handle_cache.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITH... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/rabbitmq-server-1.8.0/src/file_handle_cache.erl | erlang | compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
All Rights Reserved.
Contributor(s): __________________________... | The contents of this file are subject to the Mozilla 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 "
The Original Code is RabbitMQ .
The Initial Developers of the Original Code are LShift Ltd ,... |
cbec615018c11fb07b481776956cdc13ba0b59f4cf2e2ee4d040a7022b8fce0f | binaryage/cljs-devtools | main.cljs | (ns devtools.main
(:require [devtools.core]
[devtools.dead-code.core]))
| null | https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/test/src/dead-code-no-mention/devtools/main.cljs | clojure | (ns devtools.main
(:require [devtools.core]
[devtools.dead-code.core]))
| |
6f2632712bb7b8536f54cc689af6d0d8cc527a2b1fe7642098a7c7b91a4e2360 | mfp/oraft | oraft.mli | * Implentation of the RAFT consensus algorithm .
*
* Refer to
* " In Search of an Understandable Consensus Algorithm " , and * Ousterhout , Stanford University . ( Draft of October 7 , 2013 ) .
* [ ]
*
*
* Refer to
* "In Search of an Understandable Consensus Algorithm", Diego Ongaro and J... | null | https://raw.githubusercontent.com/mfp/oraft/cf7352eb8f1324717d47dc294a058c857ebef9eb/src/oraft.mli | ocaml | last log entry included in msg we respond to
index of log entry preceding those in
message we respond to | * Implentation of the RAFT consensus algorithm .
*
* Refer to
* " In Search of an Understandable Consensus Algorithm " , and * Ousterhout , Stanford University . ( Draft of October 7 , 2013 ) .
* [ ]
*
*
* Refer to
* "In Search of an Understandable Consensus Algorithm", Diego Ongaro and J... |
3e862bfdb97235edf7eedfcfdefd52cbb38bb13b696be671a27f0b6e1163373a | Elzair/nazghul | player.scm | ;;============================================================================
This defines the gob for the player party in haxima .
;;----------------------------------------------------------------------------
Generic functions
(define (player-has? key)
(not (null? (tbl-get (gob (kern-get-player)) key))))
(d... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/player.scm | scheme | ============================================================================
----------------------------------------------------------------------------
Update older versions of saved games with new player gob fields.
update the dtable
none
player
men
cave goblin
accursed
monsters
hill trolls
wood spiders
o... | This defines the gob for the player party in haxima .
Generic functions
(define (player-has? key)
(not (null? (tbl-get (gob (kern-get-player)) key))))
(define (player-get key)
(tbl-get (gob (kern-get-player)) key))
(define (player-set! key val)
( tbl - set ! ( gob ( kern - get - player ) ) key ) )
(tbl-s... |
bf76042628510e082c149a71ed6e83bf08d91ee3e79794b1f5ba0d0e9c945b63 | ulises/sliver | util.clj | (ns sliver.util
(:require [bytebuffer.buff :refer [pack byte-buffer]])
(:import [java.nio ByteBuffer]
[java.security MessageDigest]))
(defn flip-pack
[size fmt bytes-seq]
(.flip ^ByteBuffer (apply pack (byte-buffer size) fmt bytes-seq)))
(defn gen-challenge []
(rand-int Integer/MAX_VALUE))
(defn... | null | https://raw.githubusercontent.com/ulises/sliver/a0b600e157e41298f026e030868465b618fbd73c/src/sliver/util.clj | clojure | (ns sliver.util
(:require [bytebuffer.buff :refer [pack byte-buffer]])
(:import [java.nio ByteBuffer]
[java.security MessageDigest]))
(defn flip-pack
[size fmt bytes-seq]
(.flip ^ByteBuffer (apply pack (byte-buffer size) fmt bytes-seq)))
(defn gen-challenge []
(rand-int Integer/MAX_VALUE))
(defn... | |
578a83f50188953c5aa8e1c0cd58ec0243268c28f88fb36e45f7e34fb7eadddf | patrikja/AFPcourse | Families.hs | # LANGUAGE TypeFamilies , GADTs #
module Families where
type Nat = Int
The " " function can be simulated using type families
type family Silly n :: *
type instance Silly Zero = Bool
type instance Silly (Suc Zero) = Nat
type instance Silly (Suc (Suc n)) = (Silly n , Silly (Suc n))
-- But note tha... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L13/src/Families.hs | haskell | But note that the argument n is a type, not a natural number.
Thus we cannot pattern match on it to define "silly".
Some simple functions
Providing a Nil case would be a type error
Does the definition look familiar?
We have no predefined addition types, so we have to define it
Nothing is stopping us from strange... | # LANGUAGE TypeFamilies , GADTs #
module Families where
type Nat = Int
The " " function can be simulated using type families
type family Silly n :: *
type instance Silly Zero = Bool
type instance Silly (Suc Zero) = Nat
type instance Silly (Suc (Suc n)) = (Silly n , Silly (Suc n))
The family ... |
933b81a6865a9254f98ab8952731ccbc632ce26c9279491149e7cd9565be85f6 | hasufell/hsfm | Dialogs.hs | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... | null | https://raw.githubusercontent.com/hasufell/hsfm/322c766ae534fb21e3427d2845011123ddb90952/src/HSFM/GUI/Gtk/Dialogs.hs | haskell | }
-------------------
[ Dialog popups ]--
-------------------
|Pops up an error Dialog with the given String.
|Asks the user for confirmation and returns True/False.
|Shows the about dialog from the help menu.
|Carry out an IO action with a confirmation dialog.
If the user presses "No", then do nothing.
|Execute ... | -
HSFM , a written in Haskell .
Copyright ( C ) 2016
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation .
This program is distributed in the hope that it will be useful ,
but... |
032339a1baa2cab0981b4ef7dcea12294ea869545a6138704406f01a2ba40566 | tategakibunko/jingoo | test.ml | open OUnit2
let () =
run_test_tt_main ("jingoo" >::: [ Test_runtime.suite
; Test_output.suite
; Test_parser.suite
; Test_dead_code_elimination.suite
])
| null | https://raw.githubusercontent.com/tategakibunko/jingoo/1ed8f036c8f37294f282fe147f767bbd11a5386d/tests/test.ml | ocaml | open OUnit2
let () =
run_test_tt_main ("jingoo" >::: [ Test_runtime.suite
; Test_output.suite
; Test_parser.suite
; Test_dead_code_elimination.suite
])
| |
a1bc0beef0c977c19ba2e1c5ce650c0c3b1b748943460da016aa222f0d0bf1f5 | rescript-lang/rescript-compiler | cmij_cache.mli | type t = { module_names : string array; module_data : bytes array }
type cmi_data = Cmi_format.cmi_infos
type cmj_data = { values : Js_cmj_format.keyed_cmj_value array; pure : bool }
val marshal_cmi_data : cmi_data -> bytes
val marshal_cmj_data : cmj_data -> bytes
val unmarshal_cmi_data : bytes -> cmi_data
val unmarsh... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/81a3dc63ca387b2af23fed297db283254ae3ab20/jscomp/cmij/cmij_cache.mli | ocaml | type t = { module_names : string array; module_data : bytes array }
type cmi_data = Cmi_format.cmi_infos
type cmj_data = { values : Js_cmj_format.keyed_cmj_value array; pure : bool }
val marshal_cmi_data : cmi_data -> bytes
val marshal_cmj_data : cmj_data -> bytes
val unmarshal_cmi_data : bytes -> cmi_data
val unmarsh... | |
e7252e09ca7464ecc24e34362dab2d43c24c8371de63a8cfee4ac136fa8f7c55 | tmattio/spin | cmd_new.ml | open Spin
let run ~ignore_config ~use_defaults ~template ~path =
let open Result.Syntax in
let path = Option.value path ~default:Filename.current_dir_name in
let* () =
try
match Sys.readdir path with
| [||] ->
Ok ()
| _ ->
Error
(Spin_error.failed_to_generate "The ... | null | https://raw.githubusercontent.com/tmattio/spin/5aad207960ded083a948cf0aea2d5fd2eb5dd555/bin/commands/cmd_new.ml | ocaml | Command line interface | open Spin
let run ~ignore_config ~use_defaults ~template ~path =
let open Result.Syntax in
let path = Option.value path ~default:Filename.current_dir_name in
let* () =
try
match Sys.readdir path with
| [||] ->
Ok ()
| _ ->
Error
(Spin_error.failed_to_generate "The ... |
ad3945c4e33069350f81eaa7932b3228a07787ac005b0d86527a486c343b35ff | tsahyt/clingo-haskell | Solving.hs | module Clingo.Solving
(
ResultReady(..),
MonadSolve(..),
solverClose,
withModel
)
where
import Control.Monad.IO.Class
import Control.Monad.Catch
import Clingo.Model (MonadModel)
import Clingo.Internal.Types
import Foreign.Ptr
import Foreign.Marshal.Utils
import Clingo.Internal.Utils
import qualified Cl... | null | https://raw.githubusercontent.com/tsahyt/clingo-haskell/083c84aae63565067644ccaa72223a4c12b33b88/src/Clingo/Solving.hs | haskell | | Get the next solve result.
| Get the next model if it exists.
| Wait for the specified time to check if the result is ready.
| Discard the last model and start search for the next.
| Stop the running search and block until done.
| Convenience method to get a models. Provide a callback function which is called w... | module Clingo.Solving
(
ResultReady(..),
MonadSolve(..),
solverClose,
withModel
)
where
import Control.Monad.IO.Class
import Control.Monad.Catch
import Clingo.Model (MonadModel)
import Clingo.Internal.Types
import Foreign.Ptr
import Foreign.Marshal.Utils
import Clingo.Internal.Utils
import qualified Cl... |
80025a5b6b5e5a0d1fb5ab932114994362856457316979a58e1dcf6b1ded0542 | coccinelle/herodotos | rowDisplacement.ml | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/coccinelle/herodotos/5da230a18962ca445ed2368bc21abe0a8402e00f/menhirLib/rowDisplacement.ml | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the GNU Library General Pu... |
e762f8d9449c79bfd5a1f40f0f800958b798c4d2227ad07b372d7bfd9365b658 | mzp/bs-lwt | ppx_lwt.mli | Lightweight thread library for OCaml
*
* Module Ppx_lwt
* Copyright ( C ) 2014 , .
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with linking exceptions ... | null | https://raw.githubusercontent.com/mzp/bs-lwt/f37a3c47d038f4efcd65912c41fab95d1e6633ce/lwt/src/ppx/ppx_lwt.mli | ocaml | * Ppx syntax extension for Lwt | Lightweight thread library for OCaml
*
* Module Ppx_lwt
* Copyright ( C ) 2014 , .
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with linking exceptions ... |
bfff548b8d3cd17fea88463ed87048ece6156f718b895568ad160d3197a1994f | racket/web-server | soft.rkt | #lang racket/base
(require racket/contract
racket/match
racket/local
racket/serialize)
(define-serializable-struct soft-state-record (thnk))
(define-struct some (value))
(define *soft-state-cache*
(make-weak-hash))
(define (make-soft-state thnk)
(make-soft-state-record thnk))
(define ... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/lang/soft.rkt | racket | #lang racket/base
(require racket/contract
racket/match
racket/local
racket/serialize)
(define-serializable-struct soft-state-record (thnk))
(define-struct some (value))
(define *soft-state-cache*
(make-weak-hash))
(define (make-soft-state thnk)
(make-soft-state-record thnk))
(define ... | |
0043ad785ee4348942628c295f68fb896adef2e03da04008b8b4317e1c2c52ae | b0-system/brzo | a.ml |
let revolt () = print_endline "Revolt!"
let () = match !Sys.interactive with
| true -> ()
| false ->
let open Cmdliner in
let revolt_t = Term.(const revolt $ const ()) in
Term.exit @@ Term.eval (revolt_t, Term.info "revolt")
| null | https://raw.githubusercontent.com/b0-system/brzo/79d316a5024025a0112a8569a6335241b4620da8/examples/ocaml-ext-deps/a.ml | ocaml |
let revolt () = print_endline "Revolt!"
let () = match !Sys.interactive with
| true -> ()
| false ->
let open Cmdliner in
let revolt_t = Term.(const revolt $ const ()) in
Term.exit @@ Term.eval (revolt_t, Term.info "revolt")
| |
f208d6f4b4576ccfba05b29eade163e72becb872c6cf9c10b94aac1cd6a8bc0c | racket/typed-racket | no-bound-fl.rkt | #lang typed/racket/optional
(: fold-left (All (a b ...) ((a b ... -> a) a (Listof b) ... -> a)))
(define (fold-left f a . bss)
(if (ormap null? bss)
a
(apply fold-left
f
(apply f a (map car bss))
(map cdr bss))))
| null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/optional/no-bound-fl.rkt | racket | #lang typed/racket/optional
(: fold-left (All (a b ...) ((a b ... -> a) a (Listof b) ... -> a)))
(define (fold-left f a . bss)
(if (ormap null? bss)
a
(apply fold-left
f
(apply f a (map car bss))
(map cdr bss))))
| |
8eb01ebada1295f6454c4de81ef9211870499bfcc8d72ffbd0979b758981dfa1 | smallhadroncollider/taskell | Utility.hs | module Taskell.Data.Utility where
updateLast :: (a -> a) -> [a] -> [a]
updateLast _ [] = []
updateLast f [k] = [f k]
updateLast f (y : ys) = y : updateLast f ys | null | https://raw.githubusercontent.com/smallhadroncollider/taskell/fb7feee61a4538869b76060651cf5c3bc2fcf3fd/src/Taskell/Data/Utility.hs | haskell | module Taskell.Data.Utility where
updateLast :: (a -> a) -> [a] -> [a]
updateLast _ [] = []
updateLast f [k] = [f k]
updateLast f (y : ys) = y : updateLast f ys | |
845a354a641cdc9a23c8cb2795f36d8098ea81f33613840c159b21be3564000d | well-typed-lightbulbs/ocaml-esp32 | cow.ml | type t = int
let c = 1
let moo _t = () [@@inline never]
| null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-dynlink-private/plugin2b/cow.ml | ocaml | type t = int
let c = 1
let moo _t = () [@@inline never]
| |
2498150b6de7d184654c82e3f7a681aaedfc78e9ae5f50b961cb5021512b3ed9 | Smoltbob/Caml-Est-Belle | farmgen.ml | let print_arm l =
let s = (Fparser.toplevel Flexer.token l) in
print_string (Fsyntax.to_arm_top s); print_newline ()
let file f =
let inchan = open_in f in
try
print_arm (Lexing.from_channel inchan);
close_in inchan
with e -> (close_in inchan; raise e)
let () =
let files = ref [] in
... | null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/compiler/farmgen.ml | ocaml | let print_arm l =
let s = (Fparser.toplevel Flexer.token l) in
print_string (Fsyntax.to_arm_top s); print_newline ()
let file f =
let inchan = open_in f in
try
print_arm (Lexing.from_channel inchan);
close_in inchan
with e -> (close_in inchan; raise e)
let () =
let files = ref [] in
... | |
0698f1191e62ccea63f758355b72c3895d11b297dea147e7c3296495c68a07f9 | thi-ng/ws-ldn-1 | webgl.cljs | (ns ws-ldn-1.ui.day3.webgl
"WebGL reagent example: Interactive gear mesh generator & animation
Demonstrates usage of React component lifecycle stages and how to
dynamically update parts of the WebGL scene via UI controls."
(:require
[reagent.core :as r]
[thi.ng.geom.webgl.core :as gl]
[thi.ng.geom.w... | null | https://raw.githubusercontent.com/thi-ng/ws-ldn-1/090c851cc699f0f994779ddc09275fc1718400a8/src-cljs-day3-2/ws_ldn_1/ui/day3/webgl.cljs | clojure | record current time stamp (used as reference for animation)
extract keys from app state
new timebased rotation matrix (base for both gears)
multiplying matrices = transforming coordinate systems
clear background & depth buffer
retrigger update fn in next render cycle
setup viewport
kick off update loop
:displa... | (ns ws-ldn-1.ui.day3.webgl
"WebGL reagent example: Interactive gear mesh generator & animation
Demonstrates usage of React component lifecycle stages and how to
dynamically update parts of the WebGL scene via UI controls."
(:require
[reagent.core :as r]
[thi.ng.geom.webgl.core :as gl]
[thi.ng.geom.w... |
869521bbd84ca0d3617d91c47a90a24fb2d551b88e85124c0aadc8eca91239e8 | PeterDWhite/Osker | UserTrap.hs | Copyright ( C ) , 2001 , 2002 , 2003
Copyright ( c ) OHSU , 2001 , 2002 , 2003
module UserTrap ( UserTrap (..) ) where
----------------------------------------------------------------------
-- The trap message defines the requests and response of the trap
-- handler thread
--------------------------------------... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Posix/UserTrap.hs | haskell | --------------------------------------------------------------------
The trap message defines the requests and response of the trap
handler thread
--------------------------------------------------------------------
Haskell imports
For inputs from the user process | Copyright ( C ) , 2001 , 2002 , 2003
Copyright ( c ) OHSU , 2001 , 2002 , 2003
module UserTrap ( UserTrap (..) ) where
import qualified Dynamic as DYN
import Dynamic ( TyCon, Typeable, mkTyCon, typeOf, mkAppTy )
imports
import qualified SystemCall as SC
import qualified SystemCallOptions as SCO
data UserTr... |
2143065f71b07e58d5a95d4aec5e523224a9dae477b564a54e613a8885f0f092 | RefactoringTools/HaRe | Where2.hs | module LiftToToplevel.Where1 where
import Data.Tree.DUAL.Internal
import Data.Semigroup
import Data.List.NonEmpty (NonEmpty (..))
import qualified Data.List.NonEmpty as NEL
unpack = undefined
foldDUALNE :: (Semigroup d, Monoid d)
=> (d -> l -> r) -- ^ Process a leaf datum along with the
... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/LiftToToplevel/Where2.hs | haskell | ^ Process a leaf datum along with the
accumulation of @d@ values along the
path from the root
^ Combine results at a branch node
^ Process an internal d node
^ Process an internal datum | module LiftToToplevel.Where1 where
import Data.Tree.DUAL.Internal
import Data.Semigroup
import Data.List.NonEmpty (NonEmpty (..))
import qualified Data.List.NonEmpty as NEL
unpack = undefined
foldDUALNE :: (Semigroup d, Monoid d)
^ Replace @LeafU@ nodes
-> DUALTreeNE d u a l -> r
foldDUALNE =... |
fff5d5d3b4c37b599cca219b3445b8834ac1fd5f6703de43b6a7b3ccdefd06c5 | jvf/scalaris | yaws_revproxy.erl | %%%-------------------------------------------------------------------
%%% File : yaws_revproxy.erl
%%% Author : <>
%%% Description : reverse proxy
%%%
Created : 3 Dec 2003 by < >
%%%-------------------------------------------------------------------
-module(yaws_revproxy).
-include("../include/yaws.hrl").... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/contrib/yaws/src/yaws_revproxy.erl | erlang | -------------------------------------------------------------------
File : yaws_revproxy.erl
Author : <>
Description : reverse proxy
-------------------------------------------------------------------
reverse proxy implementation.
the socket opened on the backend server
"Connection:" header value:
"keep-... | Created : 3 Dec 2003 by < >
-module(yaws_revproxy).
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
-export([out/1]).
the revproxy internal state
the socket type : ssl | nossl
}).
-define(proxy_keepalive, false).
Initialize the ... |
8b404c028044b20c42469ede107d57ab3dd6cff1a96647292a7a578a76a09268 | xsc/claro | error_test.clj | (ns claro.data.error-test
(:require [clojure.test.check
[properties :as prop]
[generators :as gen]
[clojure-test :refer [defspec]]]
[claro.data.error :refer :all]))
;; ## Operations
(def err
#(error (str %2) {:current-value %1}))
(def operations
{`+ +
`- ... | null | https://raw.githubusercontent.com/xsc/claro/16db75b7a775a14f3b656362e8ee4f65dd8b0d49/test/claro/data/error_test.clj | clojure | ## Operations
## Tests | (ns claro.data.error-test
(:require [clojure.test.check
[properties :as prop]
[generators :as gen]
[clojure-test :refer [defspec]]]
[claro.data.error :refer :all]))
(def err
#(error (str %2) {:current-value %1}))
(def operations
{`+ +
`- -
`* *
... |
dd131c0c1a7b505da55f35835aa9dc0a0b0928f707395551069b3492137cf5b6 | aspiwack/porcupine | TaskPipeline.hs | module System.TaskPipeline
( module System.TaskPipeline.PTask
, module System.TaskPipeline.PorcupineTree
, module System.TaskPipeline.VirtualFileAccess
, module System.TaskPipeline.Options
, module System.TaskPipeline.Repetition
, module Data.Locations.LogAndErrors
) where
import Data.Locations... | null | https://raw.githubusercontent.com/aspiwack/porcupine/23dcba1523626af0fdf6085f4107987d4bf718d7/porcupine-core/src/System/TaskPipeline.hs | haskell | module System.TaskPipeline
( module System.TaskPipeline.PTask
, module System.TaskPipeline.PorcupineTree
, module System.TaskPipeline.VirtualFileAccess
, module System.TaskPipeline.Options
, module System.TaskPipeline.Repetition
, module Data.Locations.LogAndErrors
) where
import Data.Locations... | |
79a177233578631d0f70fc67d2be790558345e43fdc4a30b5e219cbfad309990 | jafingerhut/clojure-benchmarks | knucleotide.clj-14-for-clj13.clj | The Computer Language Benchmarks Game
;; /
contributed by
(ns knucleotide
(:gen-class))
(set! *warn-on-reflection* true)
;; Handle slight difference in function name between Clojure 1.2.0 and
;; 1.3.0-alpha* ability to use type hints to infer fast bit
;; operations.
(defmacro my-unchecked-inc-int [& ar... | null | https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/knucleotide/knucleotide.clj-14-for-clj13.clj | clojure | /
Handle slight difference in function name between Clojure 1.2.0 and
1.3.0-alpha* ability to use type hints to infer fast bit
operations.
parallelism as specified by the parameter num-threads. Uses
my-lazy-map instead of map from core.clj, since that version of map
can use unwanted additional parallelism for... | The Computer Language Benchmarks Game
contributed by
(ns knucleotide
(:gen-class))
(set! *warn-on-reflection* true)
(defmacro my-unchecked-inc-int [& args]
(if (and (== (*clojure-version* :major) 1)
(== (*clojure-version* :minor) 2))
`(unchecked-inc ~@args)
`(unchecked-inc-int ~@args... |
07833a8489b36df4f791569108718e2fa848fa5287cba894fe15f8c4dbed2096 | erlang/erlide_kernel | erlide_user.erl | ` ` 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 Public License along with this software. If not, it can be
%% retrieved via the world wide... | null | https://raw.githubusercontent.com/erlang/erlide_kernel/763a7fe47213f374b59862fd5a17d5dcc2811c7b/common/apps/erlide_common/src/erlide_user.erl | erlang | 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 via the world wide web at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
u... | ` ` 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 "
The Initial Developer of the Original Code is Ericsson Utvecklings AB .
Portions created by Eri... |
59f4008201d12488540f81f6dfbc0281ed7375911dda1ca07739524a46ab7204 | opencog/learn | disjunct-stats-p6.scm | ;
; disjunct-stats-p6.scm
;
; Assorted ad-hoc collection of tools for understanding the
word - disjunct MI distribution . This is an extract of the
earlier , 2017 - era disjunct-stats.scm file , redone for Part Six
; of the diary, i.e. with newer datasets.
;
Copyright ( c ) 2022 Linas Vepstas
(use-modules (sr... | null | https://raw.githubusercontent.com/opencog/learn/64eb5a2d27b1fc4bd2ff76e6909f7b73a003a723/learn-lang-diary/utils/disjunct-stats-p6.scm | scheme |
disjunct-stats-p6.scm
Assorted ad-hoc collection of tools for understanding the
of the diary, i.e. with newer datasets.
---------------------------------------------------------------------
Ranking and printing utilities
---------------------------------------------------------------------
------------- | word - disjunct MI distribution . This is an extract of the
earlier , 2017 - era disjunct-stats.scm file , redone for Part Six
Copyright ( c ) 2022 Linas Vepstas
(use-modules (srfi srfi-1))
(define pca (make-pseudo-cset-api))
(define psa (add-pair-stars pca))
(define psf (add-pair-freq-api psa))
(define psu ... |
c34f1cf631792e8a2c2fe224ccea0420ee2b6c5746be7c246bad826d2c0f5ee3 | RedPRL/algaett | Locate.ml | open Earley_core
let lexing_position i c =
Lexing.{
pos_fname = Input.filename i;
pos_lnum = Input.line_num i;
pos_bol = Input.line_offset i;
pos_cnum = Input.line_offset i + c;
(* XXX: How to do UTF-8 here? Should be possible with Input.utf8_col_num. *)
}
let locate i1 c1 i2 c2 =
Elaborator... | null | https://raw.githubusercontent.com/RedPRL/algaett/5685e49608aaf230f5691f3e339cd2bd3acb6ec9/src/parser/Locate.ml | ocaml | XXX: How to do UTF-8 here? Should be possible with Input.utf8_col_num. | open Earley_core
let lexing_position i c =
Lexing.{
pos_fname = Input.filename i;
pos_lnum = Input.line_num i;
pos_bol = Input.line_offset i;
pos_cnum = Input.line_offset i + c;
}
let locate i1 c1 i2 c2 =
Elaborator.Syntax.{
start = lexing_position i1 c1;
stop = lexing_position i2 c2;
... |
9595a2935daa331dd5021910f4389c6fc32670e4ccb5fc85d6de5072e588303c | nikomatsakis/a-mir-formality | crate-decl.rkt | #lang racket
(require redex/reduction-semantics
"../grammar.rkt"
"crate-item.rkt"
)
(provide crate-decl-rules
)
(define-metafunction formality-decl
Generate the complete set of rules that result from ` CrateDecl `
when checking the crate ` CrateId ` .
;;
NB : This assumes th... | null | https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/71be4d5c4bd5e91d326277eaedd19a7abe3ac76a/racket-src/decl/decl-to-clause/crate-decl.rkt | racket |
clauses. This will eventually not suffice, e.g., with
auto traits. But this helper is private, so we can refactor
that later. | #lang racket
(require redex/reduction-semantics
"../grammar.rkt"
"crate-item.rkt"
)
(provide crate-decl-rules
)
(define-metafunction formality-decl
Generate the complete set of rules that result from ` CrateDecl `
when checking the crate ` CrateId ` .
NB : This assumes that we... |
5692c1c99493420c69d23ba0e26b8655a8f7330368f353878516d2a9b3f049e6 | hasktorch/hasktorch | Autograd.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Torch.Autograd where
import Foreign.ForeignPtr
import GHC.Generics
import System.IO.Unsafe
import Torch.Internal.Cast
import Torch.Internal.Class
import qualified Torch.Internal.Managed... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/0e942d6af90585662463c913acfbbe8036644cb1/hasktorch/src/Torch/Autograd.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Torch.Autograd where
import Foreign.ForeignPtr
import GHC.Generics
import System.IO.Unsafe
import Torch.Internal.Cast
import Torch.Internal.Class
import qualified Torch.Internal.Managed... | |
98d3a3e34820451b460a002e87eef501b78ed4535c106448d6052eaea4fb3641 | erlangonrails/devdb | tester_value_collector.erl | Copyright 2010 fuer Informationstechnik Berlin
%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writi... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/test/tester_value_collector.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language go... | Copyright 2010 fuer Informationstechnik Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author : < >
Created : 30 April 2010 by < >
@author < >
2010 fuer Informationstechnik Berli... |
896a357c6d7760a5583daa5061e3996eaf8a7e9557916360e7e969b7516e037c | Opetushallitus/ataru | url_helper.clj | (ns ataru.config.url-helper
(:require [ataru.config.core :refer [config]]
[clojure.pprint :as pprint]
[taoensso.timbre :as log])
(:import (fi.vm.sade.properties OphProperties)))
TODO component if not too much work ?
(def ^fi.vm.sade.properties.OphProperties url-properties (atom nil))
(de... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/clj/ataru/config/url_helper.clj | clojure | (ns ataru.config.url-helper
(:require [ataru.config.core :refer [config]]
[clojure.pprint :as pprint]
[taoensso.timbre :as log])
(:import (fi.vm.sade.properties OphProperties)))
TODO component if not too much work ?
(def ^fi.vm.sade.properties.OphProperties url-properties (atom nil))
(de... | |
a2656c182d31f11a720528fe2d21bd225adf0adea7d152dca648d25e48a36e72 | kmi/irs | saved-new.lisp | Mode : Lisp ; Package :
Author :
The Open University
(in-package "OCML")
(in-ontology british-ethnic-groups-ontology)
| null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/british-ethnic-groups-ontology/saved-new.lisp | lisp | Package : |
Author :
The Open University
(in-package "OCML")
(in-ontology british-ethnic-groups-ontology)
|
91f7182f86d18125ca1373ad84967f27d3353f9cd2bdd56ca4b07068c7ef8cef | orionsbelt-battlegrounds/obb-rules | boozer.cljc | (ns ^{:added "1.9"
:author "Pedro Santos"}
obb-rules.units.boozer
"Metadata information for the Boozer unit")
(def metadata
{:name "boozer"
:code "bz"
:attack 3200
:after-hit [[:strikeback]]
:defense 2800
:range 5
:value 68
:bonus {:attack {:displacement {:air 4000}}}
:type :mech... | null | https://raw.githubusercontent.com/orionsbelt-battlegrounds/obb-rules/97fad6506eb81142f74f4722aca58b80d618bf45/src/obb_rules/units/boozer.cljc | clojure | (ns ^{:added "1.9"
:author "Pedro Santos"}
obb-rules.units.boozer
"Metadata information for the Boozer unit")
(def metadata
{:name "boozer"
:code "bz"
:attack 3200
:after-hit [[:strikeback]]
:defense 2800
:range 5
:value 68
:bonus {:attack {:displacement {:air 4000}}}
:type :mech... | |
a1a39065967f76a6b40b8578b2e11d2f4493a1f066afab61ede92e5ccc7c0bfe | instedd/planwise | auth.clj | (ns planwise.boundary.auth)
(defprotocol Auth
(find-auth-token [service scope user-ident])
(create-jwe-token [service user-ident]))
| null | https://raw.githubusercontent.com/instedd/planwise/1bc2a5742ae3dc377dddf1f9e9bb60f0d2f59084/src/planwise/boundary/auth.clj | clojure | (ns planwise.boundary.auth)
(defprotocol Auth
(find-auth-token [service scope user-ident])
(create-jwe-token [service user-ident]))
| |
aa9352631b48f0dfabb2bffbe3f4f62bd3d10cdd2b2885bb9d00f0be2a81af93 | Kappa-Dev/KappaTools | list_tokens.mli | val local_trace:bool
module Int_Set_and_Map:SetMap.S with type elt = int
val scan_compil:
Remanent_parameters_sig.parameters ->
Exception_without_parameter.method_handler ->
(Ckappa_sig.agent, Ckappa_sig.mixture, Ckappa_sig.mixture, 'a,
Ckappa_sig.mixture Ckappa_sig.rule)
Ast.comp... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/b34ac13c13faf0b784d328ad61c9fc2338ae2fc6/core/KaSa_rep/frontend/list_tokens.mli | ocaml | val local_trace:bool
module Int_Set_and_Map:SetMap.S with type elt = int
val scan_compil:
Remanent_parameters_sig.parameters ->
Exception_without_parameter.method_handler ->
(Ckappa_sig.agent, Ckappa_sig.mixture, Ckappa_sig.mixture, 'a,
Ckappa_sig.mixture Ckappa_sig.rule)
Ast.comp... | |
f9177dbb4d23082b22d23b9728ed11d9a78dab1329ac516d73f3f2c135d7380c | kingcons/advent-of-code | day11.lisp | (mgl-pax:define-package :aoc.2021.11
(:nicknames :2021.11)
(:use :cl :aoc.util :mgl-pax)
(:import-from :aoc.parsers #:parse-grid)
(:import-from :alexandria
#:define-constant
#:hash-table-keys)
(:import-from :serapeum #:op))
(in-package :2021.11)
(defsummary (:title "Dumbo Oct... | null | https://raw.githubusercontent.com/kingcons/advent-of-code/aba6714d47760ba720fd9a6ae27d25588237c149/src/2021/day11.lisp | lisp | (mgl-pax:define-package :aoc.2021.11
(:nicknames :2021.11)
(:use :cl :aoc.util :mgl-pax)
(:import-from :aoc.parsers #:parse-grid)
(:import-from :alexandria
#:define-constant
#:hash-table-keys)
(:import-from :serapeum #:op))
(in-package :2021.11)
(defsummary (:title "Dumbo Oct... | |
24764d12ed9e5514af8f757a2b4884dfa3f9a03542d117d355d49be264887063 | kirkedal/rfun-interp | MainRFun.hs | ---------------------------------------------------------------------------
--
Module :
Copyright : , 2017
-- License : AllRightsReserved
--
Maintainer : < >
-- Stability : none?
-- Portability : ?
--
-- |Main execution of RFun17 interpreter
--
-----------------------------------... | null | https://raw.githubusercontent.com/kirkedal/rfun-interp/c5297be7ab07c92e9d489c642cd987ed646e78c8/src/MainRFun.hs | haskell | -------------------------------------------------------------------------
License : AllRightsReserved
Stability : none?
Portability : ?
|Main execution of RFun17 interpreter
--------------------------------------------------------------------------- | Module :
Copyright : , 2017
Maintainer : < >
module Main (main) where
import Parser
import Ast
import PrettyPrinter
import TypeCheck
import Interp
import System.Environment
import System.Exit
main :: IO ()
main =
do
args <- getArgs
case args of
(filename : program : v... |
a4c6c509752ea6c7ef0e5b1254aaba5af3abfeee9d19e59827c44011d9063402 | caribou/caribou-core | assets.clj | (ns caribou.test.assets
(:require [caribou.asset :as asset]
[aws.sdk.s3 :as s3]
[clojure.test :as test :refer [is testing deftest]]
[clojure.string :as string]
[caribou.config :as config]
[clojure.java.io :as io]))
;;; integration test of our s3 compatibili... | null | https://raw.githubusercontent.com/caribou/caribou-core/6ebd9db4e14cddb1d6b4e152e771e016fa9c55f6/test/caribou/test/assets.clj | clojure | integration test of our s3 compatibility | (ns caribou.test.assets
(:require [caribou.asset :as asset]
[aws.sdk.s3 :as s3]
[clojure.test :as test :refer [is testing deftest]]
[clojure.string :as string]
[caribou.config :as config]
[clojure.java.io :as io]))
(deftest sanity
(is true))
(defn to-st... |
075866bf285e138ee6e07a81985745a886d0e38c7654422c6b4eb52e0304a424 | jonasseglare/geex | jvm.clj | (ns geex.core.jvm
"Platform specific code needed by the compiler"
(:require [bluebell.utils.ebmd :as ebmd]
[bluebell.utils.ebmd.ops :as eops]
[bluebell.utils.ebmd.type :as type]
[geex.ebmd.type :as etype]
[geex.core.seed :as seed]))
------- Common type signature... | null | https://raw.githubusercontent.com/jonasseglare/geex/f1a48c14c983c054c91fb221b91f42de5fa8eee0/src/clj/geex/core/jvm.clj | clojure | Get a type signature that can be compiled | (ns geex.core.jvm
"Platform specific code needed by the compiler"
(:require [bluebell.utils.ebmd :as ebmd]
[bluebell.utils.ebmd.ops :as eops]
[bluebell.utils.ebmd.type :as type]
[geex.ebmd.type :as etype]
[geex.core.seed :as seed]))
------- Common type signature... |
1619cc7772ebc20f986c0027bb85527d88a2273ba419b29b0508104108855238 | cedlemo/OCaml-GI-ctypes-bindings-generator | Proxy_address.ml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "g_proxy_address_new" (ptr Inet_address.t_typ @-> uint16_t @-> string @-> string @-> uint16_t @-> string_opt @-> string_opt @-> returning (ptr Socket_address.t_typ))
let get_destination_hostname =
foreign "g_proxy_address... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gio/Proxy_address.ml | ocaml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "g_proxy_address_new" (ptr Inet_address.t_typ @-> uint16_t @-> string @-> string @-> uint16_t @-> string_opt @-> string_opt @-> returning (ptr Socket_address.t_typ))
let get_destination_hostname =
foreign "g_proxy_address... | |
829df6284f5733d32a4ea62c02e0a5f34d6684b1ead8fe866020f29d1285d28e | AeneasVerif/aeneas | Assumed.ml | * This module contains various utilities for the assumed functions .
Note that [ Box::free ] is peculiar : we do n't really handle it as a function ,
because it is legal to free a box whose boxed value is [ ⊥ ] ( it often
happens that we move a value out of a box before freeing this box ) .
Sem... | null | https://raw.githubusercontent.com/AeneasVerif/aeneas/b191070501ceafdd49c999385c4410848249fe18/compiler/Assumed.ml | ocaml | * A few utilities
* Region 'a of id 0
* Type parameter [T] of id 0
* [fn<T>(&'a mut T, T) -> T]
The signature fields
<'a>
[{<'a>}]
<T>
&'a mut T
T
T
* [fn<T>(T) -> Box<T>]
<T>
T
Box<T>
<T>
Box<T>
()
* Helper for [Box::deref_shared] and [Box::deref_mut].
Returns:
[fn<'a, T>(&'a... | * This module contains various utilities for the assumed functions .
Note that [ Box::free ] is peculiar : we do n't really handle it as a function ,
because it is legal to free a box whose boxed value is [ ⊥ ] ( it often
happens that we move a value out of a box before freeing this box ) .
Sem... |
9ab0f9de56396757e194fc95c6ce7edfb1b3119a75bb547fd38c0b10673a42bc | cyverse-archive/DiscoveryEnvironmentBackend | app.clj | (ns metadactyl.routes.domain.app
(:use [common-swagger-api.schema :only [->optional-param describe]]
[metadactyl.routes.params]
[metadactyl.routes.domain.app.rating]
[metadactyl.routes.domain.tool :only [Tool]]
[schema.core :only [Any defschema optional-key recursive]])
(:import [jav... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/routes/domain/app.clj | clojure | (ns metadactyl.routes.domain.app
(:use [common-swagger-api.schema :only [->optional-param describe]]
[metadactyl.routes.params]
[metadactyl.routes.domain.app.rating]
[metadactyl.routes.domain.tool :only [Tool]]
[schema.core :only [Any defschema optional-key recursive]])
(:import [jav... | |
15b242462e166adbee41448e012f02c242a7ed6f5cd46ec9a297f0a5c0c4c592 | gedge-platform/gs-broker | eetcd_cluster.erl | -module(eetcd_cluster).
%% API
-include("eetcd.hrl").
-export([new/1, with_timeout/2]).
-export([member_list/1]).
-export([member_add/2, member_add_as_learner/2]).
-export([member_remove/2]).
-export([member_update/3]).
-export([member_promote/2]).
@doc MemberList lists the current cluster membership .
... | null | https://raw.githubusercontent.com/gedge-platform/gs-broker/c4c1ad39e563537d46553eae1363317cf75aff26/broker-server/deps/eetcd/src/eetcd_cluster.erl | erlang | API
<dl>
<dd>
```
:eetcd_cluster.new(connName)
|> :eetcd_cluster.with_timeout(6000)
|> :eetcd_cluster.member_list()
'''
</dd> </dl>
{@link eetcd_cluster:with_timeout/2} {@link eetcd_cluster:new/1}
@end
<dl>
<dd> `eetcd_cluster:member_add(ConnName, [":2380"])'</dd>
<dd>
```
:eetcd_cluster.... | -module(eetcd_cluster).
-include("eetcd.hrl").
-export([new/1, with_timeout/2]).
-export([member_list/1]).
-export([member_add/2, member_add_as_learner/2]).
-export([member_remove/2]).
-export([member_update/3]).
-export([member_promote/2]).
@doc MemberList lists the current cluster membership .
< dt ... |
65a7f31d296c6983406d86223ebcc022c24299c6cdb7fc3963e20d70332c7c1d | fluree/ledger | collections.clj | (ns fluree.db.ledger.docs.schema.collections
(:require [clojure.test :refer :all]
[fluree.db.test-helpers :as test]
[fluree.db.ledger.docs.getting-started.basic-schema :as basic]
[fluree.db.api :as fdb]
[clojure.core.async :as async]
[clojure.string :as str]... | null | https://raw.githubusercontent.com/fluree/ledger/254a5a6e03291f81db1837e2a8b13e447d6342ce/test/fluree/db/ledger/docs/schema/collections.clj | clojure | (ns fluree.db.ledger.docs.schema.collections
(:require [clojure.test :refer :all]
[fluree.db.test-helpers :as test]
[fluree.db.ledger.docs.getting-started.basic-schema :as basic]
[fluree.db.api :as fdb]
[clojure.core.async :as async]
[clojure.string :as str]... | |
1aac554a1c55df6540a183d89fdf150a87dbff70f6cb5c18276b2f9a138e8047 | input-output-hk/cardano-addresses | ValidationSpec.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
module Command.Script.ValidationSpec
( spec
) where
import Prelude
import Cardano.Address.Script
( ErrRecommendedValidateScript (..)
, ErrValidateScript (..)
, ValidationLevel (..)
, prettyErrValidateScript
)
i... | null | https://raw.githubusercontent.com/input-output-hk/cardano-addresses/27eed933b67064542879729cb8a34b8a4ae69ed2/command-line/test/Command/Script/ValidationSpec.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
module Command.Script.ValidationSpec
( spec
) where
import Prelude
import Cardano.Address.Script
( ErrRecommendedValidateScript (..)
, ErrValidateScript (..)
, ValidationLevel (..)
, prettyErrValidateScript
)
i... | |
d7fb1609ca702c32ce9f4b28cab421a069c7d660e61c35224c1779812f2ead1e | yesodweb/path-pieces | main.hs | {-# Language ScopedTypeVariables #-}
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Test.Hspec
import Test.Hspec.QuickCheck(prop)
import Test.QuickCheck
import Web.PathPieces
import qualified Data.Text as T
import Data.Maybe (fromJust)
import FileLocation ( debug )
instance Arbitrary T.Text where
... | null | https://raw.githubusercontent.com/yesodweb/path-pieces/d6052afa5f6b26c127dbb8361e5042d73529a2a9/test/main.hs | haskell | # Language ScopedTypeVariables # | # OPTIONS_GHC -fno - warn - orphans #
module Main where
import Test.Hspec
import Test.Hspec.QuickCheck(prop)
import Test.QuickCheck
import Web.PathPieces
import qualified Data.Text as T
import Data.Maybe (fromJust)
import FileLocation ( debug )
instance Arbitrary T.Text where
arbitrary = fmap T.pack arbitrary
... |
dd4ba69c2e4e7c39b3da80d80fb51823e100ea0c7d0abd1bd56efbfd77c2152f | aeolus-project/zephyrus | json_v1_v.ml | Auto - generated from " json_v1.atd "
(** Type definition for syntax version. *)
(** Type definitions for naming. *)
type version = Json_versions_t.version
type component_type_name = Json_v1_t.component_type_name
type port_name = Json_v1_t.port_name
type component_name = Json_v1_t.component_name
type package_n... | null | https://raw.githubusercontent.com/aeolus-project/zephyrus/0b52de4038bbab724e6a9628430165a7f09f77ae/src/atd/json_v1_v.ml | ocaml | * Type definition for syntax version.
* Type definitions for naming.
atd conflict
atd conflict
* Type definitions for Configuration.
atd implementation
atd repositories
atd provide_resources
atd packages_installed
atd cost
atd component_type_workaround
atd requirer
atd provider
atd locations
atd bindings | Auto - generated from " json_v1.atd "
type version = Json_versions_t.version
type component_type_name = Json_v1_t.component_type_name
type port_name = Json_v1_t.port_name
type component_name = Json_v1_t.component_name
type package_name = Json_v1_t.package_name
type repository_name = Json_v1_t.repository_name
... |
e8da853e59392b3205752d98e6443d273f3e336776772f9e7ec46ba4c04d4b53 | kolmodin/hinotify | Utils.hs | {-# LANGUAGE OverloadedStrings #-}
module Utils where
import Control.Concurrent.Chan
import Control.Exception
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC8
import Data.String
import System.Directory ( removeDirectoryRecursive )
import System.Environment
import System.Exit
impor... | null | https://raw.githubusercontent.com/kolmodin/hinotify/d225a1aacce290f054917177c17ce5f097421ec0/tests/Utils.hs | haskell | # LANGUAGE OverloadedStrings # | module Utils where
import Control.Concurrent.Chan
import Control.Exception
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC8
import Data.String
import System.Directory ( removeDirectoryRecursive )
import System.Environment
import System.Exit
import System.INotify
import System.Pos... |
75149fe65a4d6ce0c23eeac7d0e9d0582ed20050b539dbe391d686181bc77f24 | haskell-servant/example-servant-minimal | App.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE TypeOperators #
module App where
import Data.Aeson
import GHC.Generics
import Network.Wai
import Network.Wai.Handler.Warp
import Servant
import System.IO
-- * api
type Ite... | null | https://raw.githubusercontent.com/haskell-servant/example-servant-minimal/9df20dd272dd0b6ed73191b62afc489b6d30f95e/src/App.hs | haskell | * api
* app
* item | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE TypeOperators #
module App where
import Data.Aeson
import GHC.Generics
import Network.Wai
import Network.Wai.Handler.Warp
import Servant
import System.IO
type ItemApi =
... |
00ec36267bc5eca45f42880979cbb404945d874c3dcd886d8b33f23db64e8796 | wdebeaum/step | pajamas.lisp | ;;;;
;;;; w::pajamas
;;;;
(define-words :pos W::n
:words (
(w::pajamas
(senses
((LF-PARENT ONT::attire)
(meta-data :origin caloy3 :entry-date 20070330 :change-date nil :comments nil)
;(TEMPL mass-PRED-TEMPL)
(TEMPL COUNT-PRED-3p-TEMPL)
(syntax (W::morph (:forms (-none))))
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/pajamas.lisp | lisp |
w::pajamas
(TEMPL mass-PRED-TEMPL) |
(define-words :pos W::n
:words (
(w::pajamas
(senses
((LF-PARENT ONT::attire)
(meta-data :origin caloy3 :entry-date 20070330 :change-date nil :comments nil)
(TEMPL COUNT-PRED-3p-TEMPL)
(syntax (W::morph (:forms (-none))))
)
)
)
))
|
8d2ff9cbb7bb79a23b0a5db5c6f189934849d4fd0dae897b92955f33905d435b | ocaml-multicore/parafuzz | functors.ml | (* TEST
* setup-ocamlc.byte-build-env
** ocamlc.byte
flags = "-dlambda -dno-unique-ids"
*** check-ocamlc.byte-output
*)
module type S = sig
val foo : int -> int
end
module O (X : S) = struct
let cow x = X.foo x
let sheep x = 1 + cow x
end [@@inline always]
module F (X : S) (Y : S) = struct
let... | null | https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/functors/functors.ml | ocaml | TEST
* setup-ocamlc.byte-build-env
** ocamlc.byte
flags = "-dlambda -dno-unique-ids"
*** check-ocamlc.byte-output
|
module type S = sig
val foo : int -> int
end
module O (X : S) = struct
let cow x = X.foo x
let sheep x = 1 + cow x
end [@@inline always]
module F (X : S) (Y : S) = struct
let cow x = Y.foo (X.foo x)
let sheep x = 1 + cow x
end [@@inline always]
module type S1 = sig
val bar : int -> int
val foo : int -... |
ab1add92f9937a77133cb170ecd0717974289e5ad9c48eae3eef7805080bf5d0 | strymonas/strymonas-ocaml | benchmark_streaming.ml |
# require " streaming " ; ;
open Streaming ; ;
let st = Source.array [ |1;2;3;4;5;6;7;8;9;10| ] in
Stream.from ( Source.zip st st )
| > Stream.fold ( fun ( z1,z2 ) ( ) - > ( z1+x1 , z2+x2 ) ) ( 0,0 )
- -labs.github.io/streaming/streaming/index.html#what's-the-difference-between-sources-and-streams ?
" ... | null | https://raw.githubusercontent.com/strymonas/strymonas-ocaml/b45ab87c62e5bb845ff4a989064f30ed6b468f6d/benchmarks/benchmark_streaming.ml | ocaml | Arrays used for benchmarking
perfS2 "zipAfterFlatMap_streaming" vZaF vZaF
zipWith_after_flatMap options;
perfS2 "runLengthDecoding_streaming" v v
decoding options;
~save:true |
# require " streaming " ; ;
open Streaming ; ;
let st = Source.array [ |1;2;3;4;5;6;7;8;9;10| ] in
Stream.from ( Source.zip st st )
| > Stream.fold ( fun ( z1,z2 ) ( ) - > ( z1+x1 , z2+x2 ) ) ( 0,0 )
- -labs.github.io/streaming/streaming/index.html#what's-the-difference-between-sources-and-streams ?
" ... |
bb344ee9449d7af24d00c5f0ab3b6dd44c9542c22a6ec152b906905058c70157 | hyperfiddle/electric | ui_inputs.cljc | (ns geoffrey.ui-inputs
(:require [hyperfiddle.api :as hf]))
(def set-input!
#?(:cljs (fn [!needle]
(fn [^js event]
(reset! !needle (.. event -target -value))))))
(def *inputs (volatile! {}))
(defn get-input! [input]
(get @*inputs (.-id input)))
(defn new-input! [initial-value onCha... | null | https://raw.githubusercontent.com/hyperfiddle/electric/e633dc635cf84e0a2320b664ba722b696ce0067b/scratch/geoffrey/2021/ui_inputs.cljc | clojure | (ns geoffrey.ui-inputs
(:require [hyperfiddle.api :as hf]))
(def set-input!
#?(:cljs (fn [!needle]
(fn [^js event]
(reset! !needle (.. event -target -value))))))
(def *inputs (volatile! {}))
(defn get-input! [input]
(get @*inputs (.-id input)))
(defn new-input! [initial-value onCha... | |
1e0c5acd0466fc087d2d9ccc1c2d24cdcaf20c21a8129920bf5647b9b38ee921 | PEZ/reagent-bidi-accountant-example | user.clj | (ns routing-example.user
(:use [figwheel-sidecar.repl-api :as ra]))
(defn start []
(ra/start-figwheel!)
(ra/cljs-repl "dev"))
(defn stop []
(ra/stop-figwheel!))
| null | https://raw.githubusercontent.com/PEZ/reagent-bidi-accountant-example/de0ffe9ca5eb0a83e6bedea741b4335feb0ee255/dev/routing_example/user.clj | clojure | (ns routing-example.user
(:use [figwheel-sidecar.repl-api :as ra]))
(defn start []
(ra/start-figwheel!)
(ra/cljs-repl "dev"))
(defn stop []
(ra/stop-figwheel!))
| |
d2fd03b9fb25c984719c73e87a58401c9a36f5ef97d6d1b7ca11235db26abfd9 | Kraks/MyPLZoo | stlc-infer.rkt | #lang racket
;; Type Inference for Simply Typed Lambda Calculus
< >
(require rackunit)
(require racket/set)
(require "share.rkt")
;; Expressions
(struct NumE (n) #:transparent)
(struct BoolE (b) #:transparent)
(struct IdE (id) #:transparent)
(struct PlusE (l r) #:transparent)
(struct MultE (l r) #:transparent)... | null | https://raw.githubusercontent.com/Kraks/MyPLZoo/60203b7be9dafde04065eadf5a17200fc360cf26/stlc-infer.rkt | racket | Type Inference for Simply Typed Lambda Calculus
Expressions
Types
Values
Environment & Type Environment
Fresh Number Generator
Type Inference
Interpreter
Tests
λf.λu.u (f u) :: ((a -> b) -> a) -> (a -> b) -> b
λx.λy.x (x y) :: (a -> a) -> a -> a
λx.λy.x (y x) :: (a -> b) -> ((a -> b) -> a) -> b
λx.λy.y (y ... | #lang racket
< >
(require rackunit)
(require racket/set)
(require "share.rkt")
(struct NumE (n) #:transparent)
(struct BoolE (b) #:transparent)
(struct IdE (id) #:transparent)
(struct PlusE (l r) #:transparent)
(struct MultE (l r) #:transparent)
(struct LamE (arg body) #:transparent)
(struct AppE (fun arg) #:t... |
0def5a56e9a9593f593e2508ae3f92951ffda54254e19b06f63323f25733dd2b | jeffshrager/biobike | help-utils.lisp | -*- Package : help ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :help)
;;; +=========================================================================+
| Copyright ( c ) 2002 - 2006 JP , , |
;;; | |
;;; ... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Help/help-utils.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :help)
| Copyright ( c ) 2002 - 2006 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to ... |
b1109a888ba8f719fb633ec730885dfb3e783f35b0add26ac42e5a8c3fb81f48 | facebook/flow | file_sig_sig.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/f7d50bb772462888b27b5dbf9acf7d079eb1ff5f/src/parser_utils/file_sig_sig.ml | ocaml | In Flow, every file creates a single module, but may also include declared
* modules. This data structure describes all such modules.
*
* If a declared module with the same name appears twice, the last one will be
* represented here.
*
* This representation is a bit broad, because implementation file... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
e2e3ebd3f326d136dad7270027c24107d0acffce4e27ea91691cc08e8c156c81 | Haskell-Things/HSlice | Util.hs | {- ORMOLU_DISABLE -}
HSlice .
- Copyright 2020
-
- This program is free software : you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation , either version 3 of the License , or
- ( at your option ) any lat... | null | https://raw.githubusercontent.com/Haskell-Things/HSlice/3d1f6ebcac919d1c774a581fa41233ff4fe60ee4/tests/GoldenSpec/Util.hs | haskell | ORMOLU_DISABLE
----------------------------------------------------------------------------
| Construct a golden test for rendering the given object to javascript
suitable for dropping into /
results. Subsequent test runs will compare their result to the cached one.
This is valuable for ensuring representations ... |
HSlice .
- Copyright 2020
-
- This program is free software : you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation , either version 3 of the License , or
- ( at your option ) any later version .
-
... |
2a665dc467466b37d2da1b0eb7b0fcff8274f1c6261fd4ab6094cc836ebd516e | meagtan/99-lisp-problems | p95-p96.lisp | ;;;; Language processing
(in-package #:99-lisp-problems)
;;; p95
(defun full-words (number &optional (base 10))
"Print NUMBER in full words. Example: (full-words 175) => \"one-seven-five\"."
(format nil "~{~a~^-~}" (mapcar #'digit-word (digits number base))))
(defun digits (number &optional (base 10) acc)
"Re... | null | https://raw.githubusercontent.com/meagtan/99-lisp-problems/82bd35b1c161aaba37306332505700c26721296c/src/90-99%20misc/p95-p96.lisp | lisp | Language processing
p95
p22
could be made into a format directive, but clearer this way
add rem to list only if nonzero
p22
p96
Extending the above predicate for general syntax diagrams as in the problem
A syntax diagram can be represented as a directed graph, expressed in readable list form, that transitions fr... |
(in-package #:99-lisp-problems)
(defun full-words (number &optional (base 10))
"Print NUMBER in full words. Example: (full-words 175) => \"one-seven-five\"."
(format nil "~{~a~^-~}" (mapcar #'digit-word (digits number base))))
(defun digits (number &optional (base 10) acc)
"Return the digits of NUMBER as a li... |
8ae4be745be0a1344418e2f741b979039162d650b70715587572bd24820d749e | racket/web-server | add-formlets2.rkt | #lang racket/base
(require web-server/servlet
web-server/formlets)
(provide (all-defined-out))
(define interface-version 'v1)
(define timeout +inf.0)
; request-number : str -> num
(define (request-number which-number)
(send/formlet
(formlet
(#%# "Enter the " ,which-number " number to add: "
... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/default-web-root/htdocs/servlets/examples/add-formlets2.rkt | racket | request-number : str -> num | #lang racket/base
(require web-server/servlet
web-server/formlets)
(provide (all-defined-out))
(define interface-version 'v1)
(define timeout +inf.0)
(define (request-number which-number)
(send/formlet
(formlet
(#%# "Enter the " ,which-number " number to add: "
,{input-int . => . the-number}... |
4a7c69c7ff65454c23df4c5a617f00db6b070322cf1b5707f623a3df4ef86f8f | taybin/lethink | lethink_sup.erl | @private
-module(lethink_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% ================================================... | null | https://raw.githubusercontent.com/taybin/lethink/f90986dde34f5910c82d5e6bb5e541d7a6fd0c03/src/lethink_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... | @private
-module(lethink_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
-spec start_link() -> any().
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-spec init([]) -> {ok,{{super... |
4a5cf63b944f74300c4f861cfa54900799a1d52ef3ee899b624cbd8d6b4e2137 | tezos/tezos-mirror | node.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/213f7dc936ae6c63d4b20b2ea895fcffcefd8002/src/lib_shell/node.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2018 - 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , W... |
2ac1238cf55bd046b75224a536537855411f735cc745d7aeae1bb1e44d2f1c44 | metabase/metabase | common.clj | (ns metabase.sync.sync-metadata.fields.common
"Schemas and functions shared by different `metabase.sync.sync-metadata.fields.*` namespaces."
(:require
[metabase.sync.interface :as i]
[metabase.sync.util :as sync-util]
[metabase.util :as u]
[metabase.util.i18n :refer [trs]]
[metabase.util.schema :as s... | null | https://raw.githubusercontent.com/metabase/metabase/e6aad38a1fd2ed55f61bf9c0b1ae3b3e57f543b1/src/metabase/sync/sync_metadata/fields/common.clj | clojure | (ns metabase.sync.sync-metadata.fields.common
"Schemas and functions shared by different `metabase.sync.sync-metadata.fields.*` namespaces."
(:require
[metabase.sync.interface :as i]
[metabase.sync.util :as sync-util]
[metabase.util :as u]
[metabase.util.i18n :refer [trs]]
[metabase.util.schema :as s... | |
ed64c394ba23c393661a0e328b1ec2b3f564a7bf66cbfc18d53abb48e0308ed8 | mmottl/lacaml | utils.ml | File : utils.ml
Copyright ( C ) 2001-
email :
WWW :
email :
WWW : /~liam
email :
WWW : /
email :
WWW : none
This library is free software ; you can redistribute it and/or
modify it under the terms of ... | null | https://raw.githubusercontent.com/mmottl/lacaml/2e01c0747e740e54ab9a23ea59b29ea0d929b50f/src/utils.ml | ocaml | * General auxiliary functions
* Preallocated strings (names)
* Range checking
* Valueless vector checking and allocation functions (do not require a
vector value as argument
* [calc_vec_min_dim ~n ~ofs ~inc] @return minimum vector dimension given
offset [ofs], increment [inc], and operation size [n] for a v... | File : utils.ml
Copyright ( C ) 2001-
email :
WWW :
email :
WWW : /~liam
email :
WWW : /
email :
WWW : none
This library is free software ; you can redistribute it and/or
modify it under the terms of ... |
5b6bf378672e76e38255bab5753dfbc47777ca6ddaffaa66b85d2f3eca51deba | davidlazar/ocaml-semantics | match-or04.ml | match (2, 7) with _, (2|6) -> 1 | (1|2), (3|7) -> 0 | (2,7) -> 2 | _ -> 3
| null | https://raw.githubusercontent.com/davidlazar/ocaml-semantics/6f302c6b9cced0407d501d70ad25c2d2aefbb77d/tests/unit/match-or04.ml | ocaml | match (2, 7) with _, (2|6) -> 1 | (1|2), (3|7) -> 0 | (2,7) -> 2 | _ -> 3
| |
84d8e44eee6bd7a059c48af2e6fd770bd47150f9ea4a1983d0eb0f4384bc3cc6 | garrigue/labltk | timer.mli | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of OCaml
(* *)
, , and ... | null | https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/support/timer.mli | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of OCaml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
acb3bd507d9d771e28eaac60a68a2c2d343819dbf7f8fc8b2913f5fe77117477 | Clozure/ccl-tests | fill.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Oct 12 19:44:45 2002
Contains : Tests on FILL
(in-package :cl-test)
(deftest fill.error.1
(signals-error (fill 'a 'b) type-error)
t)
(deftest fill.error.2
(signals-error (fill) program-error)
t)
(deftest fill.error.3
(signals-error (fill (list 'a... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/fill.lsp | lisp | -*- Mode: Lisp -*-
Fill on arrays
fill on arrays of fixnums
Tests on arrays with fill pointers
Tests on strings
Tests for bit vectors
Test of :allow-other-keys
Tests of evaluation order | Author :
Created : Sat Oct 12 19:44:45 2002
Contains : Tests on FILL
(in-package :cl-test)
(deftest fill.error.1
(signals-error (fill 'a 'b) type-error)
t)
(deftest fill.error.2
(signals-error (fill) program-error)
t)
(deftest fill.error.3
(signals-error (fill (list 'a 'b)) program-error)
t... |
4bccd1baf5e01e42c950d034cb77d12d878339f077e4bc4f07242a30891425fa | jbclements/sxml | parse-error.rkt | #lang racket/base
(require racket/contract/base
syntax/readerr
"errors-and-warnings.rkt")
(provide/contract
[parser-error
(->* (port?) () #:rest list? any)]
[ssax:warn
(->* (port?) () #:rest list? any)])
; This code provides informative error messages
for SSAX ( S)XML parser .
;===========... | null | https://raw.githubusercontent.com/jbclements/sxml/d3b8570cf7287c4e06636e17634f0f5c39203d52/sxml/ssax/parse-error.rkt | racket | This code provides informative error messages
==============================================================================
Error handler
According to the SSAX convention this function
location of the error in input file.
Other parameters are considered as error messages,
they are printed to stderr as is.
map ... | #lang racket/base
(require racket/contract/base
syntax/readerr
"errors-and-warnings.rkt")
(provide/contract
[parser-error
(->* (port?) () #:rest list? any)]
[ssax:warn
(->* (port?) () #:rest list? any)])
for SSAX ( S)XML parser .
accepts the port as its first argument which is used for
... |
0bf31292fffa02a7f48ed1c236d5ccb9d2f8c1df199473a19668bb2d63408d2e | klarna/jesse | jesse_error.erl | %%%=============================================================================
Copyright 2014 Klarna AB
%%
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
%%
%% Unles... | null | https://raw.githubusercontent.com/klarna/jesse/830738e8a03413851cc48a55a5e70f459391cc00/src/jesse_error.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... | Copyright 2014 Klarna AB
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@doc Json schema validation module .
This module is the core of jesse , it implements the validation functionality
-module(jesse_error).
-export... |
87d11e38ac557cc656c456b6f5180cd3dbfe30d5dfa0edc26c6aea635b9e367d | evilmartians/foundry | udb_data.ml | let data : Codepoint.t array = [||]
| null | https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/vendor/ucs/lib/udb_data.ml | ocaml | let data : Codepoint.t array = [||]
| |
28a95df3fcb224e0ccb5444b6b8c4df39355a538892cc1510d17fa8eff615843 | dongcarl/guix | stenography.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2020 < >
Copyright © 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; ei... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/stenography.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2020 < >
Copyright © 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages stenography)
#:use-module (guix build-system python)
#:... |
82d3ab949d8f564fb34dff17feceee69b362cd7369167bfc66dd1acd20fcd141 | ptal/AbSolute | box.mli | Copyright 2019 AbSolute Team
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
This prog... | null | https://raw.githubusercontent.com/ptal/AbSolute/469159d87e3a717499573c1e187e5cfa1b569829/src/domains/box/box.mli | ocaml | * Box are an event-based abstract domain and must be encapsulated in an `Event_loop`.
The `closure` operator is the identity function since it is decomposed in many tasks
handled by `Event_loop`.
* `project_vardom box v` projects the domain of the variable `v`. | Copyright 2019 AbSolute Team
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
This prog... |
2aefd95e7052585cd94158ea163cb21a64a40c5d4c3f5012238c791eb5a479c1 | korya/efuns | xdebug.mli | (***********************************************************************)
(* *)
(* ____ *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/xlib/xdebug.mli | ocaml | *********************************************************************
____
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
val debug_flag : bool ref
val print : string -> unit
|
b41f1ed80687b79815c9116e044658b4e3d3edcd68d47f4039c9b7641f4f43df | geophf/1HaskellADay | Endpoint.hs | module Wikidata.Query.Endpoint where
-
WHEW ! Has querying the wikidata endpoint gotten easier or what ? ! ?
Just submit your SPARQL query using the sparql function and you 'll ge back
a ByteString response as JSON . Decoding the JSON is on you .
-
WHEW! Has querying the wikidata endpoint gotten easier or wha... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Wikidata/Query/Endpoint.hs | haskell | } | module Wikidata.Query.Endpoint where
-
WHEW ! Has querying the wikidata endpoint gotten easier or what ? ! ?
Just submit your SPARQL query using the sparql function and you 'll ge back
a ByteString response as JSON . Decoding the JSON is on you .
-
WHEW! Has querying the wikidata endpoint gotten easier or wha... |
e2407bdd6d141895ca058741896b8bb7c4f68eaaca0026660421daa14b79f4f6 | 45deg/distributed-xfrp | graphviz.ml | open Syntax
open Module
TODO : Fix this after ` codegen ` works .
let concat_map = Codegen.concat_map
let indent = Codegen.indent
let concat_map = Codegen.concat_map
let indent = Codegen.indent
*)
let concat_map s f l = String.concat s (List.map f l)
let indent n s = String.make n '\t' ^ s
let colors =
["#1... | null | https://raw.githubusercontent.com/45deg/distributed-xfrp/e1d4594e27c89c9ba4147e0bbf5ef44e39630409/src/graphviz.ml | ocaml |
indent 1 "{ rank = source; " ^ String.concat "; " xmod.source ^ "; }\n" ^
indent 1 "{ rank = sink; " ^ String.concat "; " xmod.sink ^ "; }" ^
| open Syntax
open Module
TODO : Fix this after ` codegen ` works .
let concat_map = Codegen.concat_map
let indent = Codegen.indent
let concat_map = Codegen.concat_map
let indent = Codegen.indent
*)
let concat_map s f l = String.concat s (List.map f l)
let indent n s = String.make n '\t' ^ s
let colors =
["#1... |
316b48640f48ebf38c94ad520697b374a1b0d50596f04ac81695c6d568c492fd | jkk/formative | parse_test.cljc | (ns formative.parse-test
#?(:cljs (:require-macros [cemerick.cljs.test :refer [is are deftest testing run-tests]]
[formative.macros :refer [with-fallback]]))
(:require [formative.parse :as fp]
[formative.util :as fu]
#?(:clj [formative.parse :refer [with-fallback]... | null | https://raw.githubusercontent.com/jkk/formative/e1b69161c05438a48d3186bd2eb5126377ffe2e3/test/formative/parse_test.cljc | clojure | (run-tests) | (ns formative.parse-test
#?(:cljs (:require-macros [cemerick.cljs.test :refer [is are deftest testing run-tests]]
[formative.macros :refer [with-fallback]]))
(:require [formative.parse :as fp]
[formative.util :as fu]
#?(:clj [formative.parse :refer [with-fallback]... |
b78b0a07ab8c9ba4fbf217a9951bc206b9a07a383c92d26b227b2410d7ec5406 | rescript-lang/rescript-compiler | mlSyntax.ml | test ml file
let () = print_endline "hello world"
let unicode = "🙈 😅 🙌"
let d = {|Sehr Schön|}
| null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e87d6b52b7a78207c1fecfaba672523003e1dc3e/res_syntax/tests/api/mlSyntax.ml | ocaml | test ml file
let () = print_endline "hello world"
let unicode = "🙈 😅 🙌"
let d = {|Sehr Schön|}
| |
0629484cb7e993f631012b024ee1901d442d2b45bd85d46c25f55d2817fae52c | ocharles/zero-to-quake-3 | Input.hs | # language LambdaCase #
# language RecordWildCards #
module Quake3.Input where
sdl2
import qualified SDL
import qualified SDL.Event
zero - to - quake-3
import qualified Quake3.Model
eventToAction :: SDL.Event -> Maybe Quake3.Model.Action
eventToAction =
eventPayloadToAction . SDL.Event.eventPayload
eventPa... | null | https://raw.githubusercontent.com/ocharles/zero-to-quake-3/6fe4ef61955b8a816369cf70c0edd2cacfd911db/src/Quake3/Input.hs | haskell | # language LambdaCase #
# language RecordWildCards #
module Quake3.Input where
sdl2
import qualified SDL
import qualified SDL.Event
zero - to - quake-3
import qualified Quake3.Model
eventToAction :: SDL.Event -> Maybe Quake3.Model.Action
eventToAction =
eventPayloadToAction . SDL.Event.eventPayload
eventPa... | |
2eb72d6f314d05fa68663bd710a9fb8eecfb23427b227537bceba2c947c794c9 | zyrolasting/polyglot | vcomps.rkt | #lang racket/base
(require racket/list polyglot)
(provide (all-defined-out))
(define (page title initial-page-tx)
`(html (head (title ,title)
(meta ((charset "utf-8")))
(meta ((name "viewport") (content "width=device-width, initial-scale=1")))
; polyglot counts styles.cs... | null | https://raw.githubusercontent.com/zyrolasting/polyglot/d27ca7fe90fd4ba2a6c5bcd921fce89e72d2c408/polyglot-lib/polyglot/private/skel/functional/vcomps.rkt | racket | polyglot counts styles.css as a dependency.
Note that this returns an application element. `polyglot` will do another pass if
it sees that application elements produce more application elements. This makes
it possible to generate more sophisticated content in terms of code...
...such as code samples combined with ... | #lang racket/base
(require racket/list polyglot)
(provide (all-defined-out))
(define (page title initial-page-tx)
`(html (head (title ,title)
(meta ((charset "utf-8")))
(meta ((name "viewport") (content "width=device-width, initial-scale=1")))
(link ((rel "stylesheet") (... |
54949225160f5f04a24d290b841a70b89a71ad3f89a556a3bef4b4a9ea1bbbed | ghcjs/jsaddle-dom | SVGFEMergeNodeElement.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGFEMergeNodeElement
(getIn1, SVGFEMergeNodeElement(..), gTypeSVGFEMergeNodeElement)
where
import Prelude (... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGFEMergeNodeElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGFEMergeNodeElement
(getIn1, SVGFEMergeNodeElement(..), gTypeSVGFEMergeNodeElement)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, real... |
d017cf5b0285b1b803d7b6439598f838d55066d52f665ab718208c4a3da9f075 | arbor/antiope | Orphans.hs | # OPTIONS_GHC -fno - warn - orphans #
module Antiope.Orphans where
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Resource (ResourceT)
import Network.AWS (MonadAWS (..))
instance MonadAWS m => MonadAWS (ResourceT m) where
liftAWS = lift . liftAWS
| null | https://raw.githubusercontent.com/arbor/antiope/86ad3df07b8d3fd5d2c8bef4111a73b85850e1ba/antiope-core/src/Antiope/Orphans.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Antiope.Orphans where
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Resource (ResourceT)
import Network.AWS (MonadAWS (..))
instance MonadAWS m => MonadAWS (ResourceT m) where
liftAWS = lift . liftAWS
| |
fb7803c5e2c652a5e6ffedeeea907e744f380415ccc35aad5303b3b513e9556c | roehst/tapl-implementations | syntax.mli | module Syntax : syntax trees and associated support functions
open Support.Pervasive
open Support.Error
(* Data type definitions *)
type ty =
TyTop
| TyArr of ty * ty
| TyRecord of (string * ty) list
| TyBool
type term =
TmVar of info * int * int
| TmAbs of info * string * ty * term
| TmApp of in... | null | https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/joinexercise/syntax.mli | ocaml | Data type definitions
Contexts
Shifting and substitution
Printing
Misc | module Syntax : syntax trees and associated support functions
open Support.Pervasive
open Support.Error
type ty =
TyTop
| TyArr of ty * ty
| TyRecord of (string * ty) list
| TyBool
type term =
TmVar of info * int * int
| TmAbs of info * string * ty * term
| TmApp of info * term * term
| TmRecor... |
6b1f80f7bcb19f143570b8a3f859d70e28d767688819643a8bcde15849e0a68b | stevana/coroutine-state-machines | Main.hs | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DerivingStrategies #
# LANGUAGE ScopedTypeVariables #
module Main where
import Control.Concurrent
import Control.Concurrent.Async
import Control.Concurrent.STM
import Control.Concurrent.STM.TQueue
import Control.Monad
import Control.Monad.IO.Class
impo... | null | https://raw.githubusercontent.com/stevana/coroutine-state-machines/c832a54415d5e91b93fa1c6cc677d757bd4b2c76/test/Main.hs | haskell | ----------------------------------------------------------------------
NOTE: Assumes that the server is running.
Adds some entropy to the possible interleavings.
NOTE: Assumes that the server is running.
Rerun a couple of times, to avoid being lucky with the interleavings. | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DerivingStrategies #
# LANGUAGE ScopedTypeVariables #
module Main where
import Control.Concurrent
import Control.Concurrent.Async
import Control.Concurrent.STM
import Control.Concurrent.STM.TQueue
import Control.Monad
import Control.Monad.IO.Class
impo... |
0fd99cedf38d2e4c3c88152e8387d60b5af9956e732e4914ea862fcf75a2634b | Eonblast/Scalaxis | api_dht.erl | 2007 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
d... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/api_dht.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2007 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(api_dht).
-author('').
-vsn('$Id$').
|
ed6fa8b5656e8b71a7d6d95e30061a6f0fa303248dd3c9b6d849eeab6b9d277f | ejgallego/coq-serapi | ser_xml_datatype.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_xml_datatype.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 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright 2016 MINES ParisT... |
e8d5f87bda43d530c93bad52802262343e30265bb8f4ff288e69cc3939c19d70 | albertoruiz/easyVision | combi2.hs | import EasyVision
drift r a b = r .* a |+| (1-r) .* b
main = run $ camera
~> float . grayscale
~~> scanl1 (drift 0.9)
>>= observe "drift" id
| null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/old/tutorial/combi2.hs | haskell | import EasyVision
drift r a b = r .* a |+| (1-r) .* b
main = run $ camera
~> float . grayscale
~~> scanl1 (drift 0.9)
>>= observe "drift" id
| |
e0ff5b9066928a687035c161f577954180b38b38e2ba6963478d1aa965d1e1ca | hipsleek/hipsleek | minisat.ml | #include "xdebug.cppo"
open VarGen
open Globals
open GlobProver
open Gen.Basic
open Cpure
(* open Rtc_new_stable *)
(* open Rtc_new_algorithm *)
open Rtc_algorithm
module StringSet = Set.Make(String)
(* Global settings *)
let minisat_timeout_limit = 15.0
let test_number = ref 0
let last_test_number = ref 0
let minis... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/minisat.ml | ocaml | open Rtc_new_stable
open Rtc_new_algorithm
Global settings
minisat
"-pre"
"cryptominisat"
"-pre"
valid value is: cnf
**************************************************************
TRANSLATE CPURE FORMULA TO PROBLEM IN CNF FORMAT
***************... | #include "xdebug.cppo"
open VarGen
open Globals
open GlobProver
open Gen.Basic
open Cpure
open Rtc_algorithm
module StringSet = Set.Make(String)
let minisat_timeout_limit = 15.0
let test_number = ref 0
let last_test_number = ref 0
let minisat_restart_interval = ref (-1)
let log_all_flag = ref false
let is_minisat_ru... |
7f4dc1e45bc5c7d4316769cb12c2ba2563676155c4763d1d6ad3de11ea991f07 | input-output-hk/ouroboros-network | ExitPolicy.hs | {-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
# LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE NamedFieldPuns #
module Ouroboros.Network.ExitPolicy
( ReconnectDelay (..)
, ExitPolicy (..)
, stdExitPolicy
, ReturnPolicy
, alwaysCleanReturnPolicy
) whe... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/b9959087bfd72837c02b8b33ba04175e4ff8b186/ouroboros-network/src/Ouroboros/Network/ExitPolicy.hs | haskell | # LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
It ought to be derived via 'Quiet' but 'Difftime' lacks 'Generic' instance.
| 'ReturnPolicy' allows to compute reconnection delay from value return by
a mini-protocol. If a mini-protocol returned with an error 'epErrorDelay'
is used.
... | # LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE NamedFieldPuns #
module Ouroboros.Network.ExitPolicy
( ReconnectDelay (..)
, ExitPolicy (..)
, stdExitPolicy
, ReturnPolicy
, alwaysCleanReturnPolicy
) where
import Control.Monad.Class.MonadTime
import Data.Semigroup (Max ... |
0f2a04a1c0a30379fe1d5e5c4aba37c5c8bfd106ae58c6a99a1a867648af83de | FranklinChen/learn-you-some-erlang | cases_tests.erl | -module(cases_tests).
-include_lib("eunit/include/eunit.hrl").
insert_test_() ->
[?_assertEqual([1], cases:insert(1,[])),
?_assertEqual([1], cases:insert(1,[1])),
?_assertEqual([1,2], cases:insert(1,[2]))].
beach_test_() ->
[?_assertEqual('favorable', cases:beach({celsius, 20})),
?_as... | null | https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/tests/cases_tests.erl | erlang | -module(cases_tests).
-include_lib("eunit/include/eunit.hrl").
insert_test_() ->
[?_assertEqual([1], cases:insert(1,[])),
?_assertEqual([1], cases:insert(1,[1])),
?_assertEqual([1,2], cases:insert(1,[2]))].
beach_test_() ->
[?_assertEqual('favorable', cases:beach({celsius, 20})),
?_as... | |
915190d2018a2f9e142b1ed0e6cf1cce76687919ec78bc6ab92885625960fe86 | pforpallav/school | lab1pset.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname pset1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/pforpallav/school/60f19dce52f6fb8e416df73c924132da6ac7fa01/CPSC110/lab1pset.rkt | racket | about the language level of this file in a form that our tools can easily process.
| The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname pset1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
CPSC 110 , 2010 - 2011 T1 , Problem Set 1
NAME : _ _ _ _ _ _ _ ... |
81fd10b7b56f079320501d6141b7d5deb2dd2fe5782ae447be1fb40c4c24b983 | plumatic/grab-bag | pubsub.clj | (ns web.pubsub
(:use plumbing.core)
(:require
[plumbing.accumulators :as accumulators]
[plumbing.error :as err]
[plumbing.graph :as graph]
[plumbing.logging :as log]
[plumbing.new-time :as new-time]
[plumbing.parallel :as parallel]
[plumbing.resource :as resource]
[store.bucket :as bucket]
... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/web/src/web/pubsub.clj | clojure |
Private helpers
Broker (shared between pub and sub)
topic --> [callback]
Subscribing
Publishing
ensure entries in local bucket
delete stale entries
topic --> pub-args
topic --> {service-id {:f fn (optional-key :res) PCloseable :spec-atom ...}}
A few async tools for combining and transforming subscribers. | (ns web.pubsub
(:use plumbing.core)
(:require
[plumbing.accumulators :as accumulators]
[plumbing.error :as err]
[plumbing.graph :as graph]
[plumbing.logging :as log]
[plumbing.new-time :as new-time]
[plumbing.parallel :as parallel]
[plumbing.resource :as resource]
[store.bucket :as bucket]
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.