_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 |
|---|---|---|---|---|---|---|---|---|
49166f76c125460917bc4f18f2fe76bd78218846af3433df5e6898264263c2df | district0x/cljs-web3-next | utils.cljs | (ns cljs-web3-next.utils
(:require [camel-snake-kebab.core :as cs :include-macros true]
[camel-snake-kebab.extras :refer [transform-keys]]
[cljs.core.async :refer [>! chan]]
[oops.core :refer [ocall oget oapply]]
[clojure.string :as string])
(:require-macros [cljs.cor... | null | https://raw.githubusercontent.com/district0x/cljs-web3-next/a473ac9c21d994ecb6abfb4899ef5474d5dfc669/src/cljs_web3_next/utils.cljs | clojure | Prevent weird bug in advanced optimisations | (ns cljs-web3-next.utils
(:require [camel-snake-kebab.core :as cs :include-macros true]
[camel-snake-kebab.extras :refer [transform-keys]]
[cljs.core.async :refer [>! chan]]
[oops.core :refer [ocall oget oapply]]
[clojure.string :as string])
(:require-macros [cljs.cor... |
3e89b99a6ec73f97c60545b086137e5165c0fffde2ecac7982ad4ba71ce685e5 | hcvst/erlang-dns | ed_udp_handler_sup.erl | %%%----------------------------------------------------------------------------
@doc Erlang DNS ( EDNS ) supervisor of lookup servers
@author v. Stockhausen < >
%%% @end
%%%----------------------------------------------------------------------------
-module(ed_udp_handler_sup).
-behaviour(supervisor).
%% API
... | null | https://raw.githubusercontent.com/hcvst/erlang-dns/cac34b16d565d228a11acfad670d7bba321a3ddc/src/ed_udp_handler_sup.erl | erlang | ----------------------------------------------------------------------------
@end
----------------------------------------------------------------------------
API
behaviour callbacks
============================================================================
API
====================================================... | @doc Erlang DNS ( EDNS ) supervisor of lookup servers
@author v. Stockhausen < >
-module(ed_udp_handler_sup).
-behaviour(supervisor).
-export([start_link/0, handle/1]).
-export([init/1]).
-define(SERVER, ?MODULE).
( ) - > { ok , Pid::pid ( ) }
start_link() ->
supervisor:start_link({local, ?SERVER}, ... |
65d83bd7e646033ba9dcf2ce38b2ac681026a10f0a8c46d279091bcb828e4f92 | quil/quil-examples | 05_random_scribble.clj | (ns quil-sketches.gen-art.05-random-scribble
(:require [quil.core :refer :all]
[quil.helpers.seqs :refer [range-incl]]
[quil.helpers.drawing :refer [line-join-points]]))
;; Example 5 - Random Scribble
;; Taken from Section 3.2, p55
;; void setup() {
size(500 , 100 ) ;
) ;
stroke... | null | https://raw.githubusercontent.com/quil/quil-examples/9ff9d5578d93682af29d9a080b917a19f8deafc8/src/quil_sketches/gen_art/05_random_scribble.clj | clojure | Example 5 - Random Scribble
Taken from Section 3.2, p55
void setup() {
smooth();
float lastx = -999;
float lasty = -999;
x < = width - borderx ; x + = step ) {
y = bordery + random(height - 2* bordery);
if(lastx > -999) {
}
lastx = x;
lasty = y;
}
} | (ns quil-sketches.gen-art.05-random-scribble
(:require [quil.core :refer :all]
[quil.helpers.seqs :refer [range-incl]]
[quil.helpers.drawing :refer [line-join-points]]))
(defn rand-y
[border-y]
(+ border-y (rand (- (height) (* 2 border-y)))))
(defn setup []
(background 255)
(strok... |
098dcd9acb3bd5d20a50ceb53694637dea3e4648d2642050951fa7c54d189a65 | uwplse/Cassius | just_list.rkt | ; FACT(A, B): (>= (- (bottom B) (top A)) 0)
THEOREM : ( > = ( - ( bottom ( last list ) ) ( top ( first list ) ) ) 0 )
- base : FACT(inductive - base , inductive - base ) ) ; 3 children ( first , base , last )
- thm : FACT(indcutive - header , inductive - footer ) = > THEOREM ; 4 children ( first , header , footer... | null | https://raw.githubusercontent.com/uwplse/Cassius/edcb8302c43b7b149280504c00672d8133219b44/bench/just_list.rkt | racket | FACT(A, B): (>= (- (bottom B) (top A)) 0)
3 children ( first , base , last )
4 children ( first , header , footer , last )
5 children ( first , header , footer , step , last )
base
mystery elements go here
base
mystery elements go here
mystery elements go her
ind
mystery elements go here | THEOREM : ( > = ( - ( bottom ( last list ) ) ( top ( first list ) ) ) 0 )
(define-stylesheet base
((tag html) (display block))
((tag body) (display block))
((tag ul) (display block))
((tag li) (display list-item))
((tag body)
:browser
(margin-top (px 8))
(margin-right (px 8))
(margin-... |
e825f011b34c6c5c9eb2d4b63378997b94f10d71e9eb45d20fb47472f11d3bbf | bubba/racket-llvm | main.rkt | #lang racket
(require ffi/unsafe
ffi/unsafe/define)
(require "module.rkt"
"types.rkt"
"builder.rkt"
"jit.rkt"
"pass-manager.rkt")
(provide (all-from-out
"module.rkt"
"types.rkt"
"builder.rkt"
"jit.rkt"
"pass-manager.rk... | null | https://raw.githubusercontent.com/bubba/racket-llvm/f638818154bf0d9e24af3cbc227d03fe335e3c6d/main.rkt | racket | #lang racket
(require ffi/unsafe
ffi/unsafe/define)
(require "module.rkt"
"types.rkt"
"builder.rkt"
"jit.rkt"
"pass-manager.rkt")
(provide (all-from-out
"module.rkt"
"types.rkt"
"builder.rkt"
"jit.rkt"
"pass-manager.rk... | |
e86d949031f2433446010e197c96b07702871f60ba2004f91afff7d9afdfb283 | DerekCuevas/interview-cake-clj | project.clj | (defproject single-riffle-shuffle "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:main ^:skip-aot single-riffle-shuffle.core
:target-path "target/%s"
:profiles {:uberjar {... | null | https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/single-riffle-shuffle/project.clj | clojure | (defproject single-riffle-shuffle "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:main ^:skip-aot single-riffle-shuffle.core
:target-path "target/%s"
:profiles {:uberjar {... | |
04e7634b54af2094479617c2cdd3a378947405a2dc732b1a555f4728fb06339c | SNePS/SNePS2 | innet.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*-
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : innet.lisp , v 1.2 2013/08/28 19:07:25 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of this file ar... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/sneps/fns/innet.lisp | lisp | Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*-
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for the specific language gov
erning rights and limitations... |
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : innet.lisp , v 1.2 2013/08/28 19:07:25 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS IS " bas... |
967f8467e497708ab01383b6ba772a264918873d9879f66d7fb1075b59e6d651 | FlowerWrong/mblog | mod_srpc.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/socket_dist/mod_srpc.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
io:format("server closed connection~n"), | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(mod_srpc).
-export([start/3, rpc/4]).
-import(lists, [member/2]).
-import(lib_chan_mm, [send/2, close/1]).
start(MM, _Client, Allow) ->
server_loop(MM, Allow).
server_loop(MM, Allow) ->
receive
{chan... |
b7c0380b7788b5567349ed1db348c7d782a11175d4f1489269006310572f9440 | dmitryvk/sbcl-win32-threads | array.lisp | ;;;; various array operations that are too expensive (in space) to do
;;;; inline
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public doma... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/assembly/mips/array.lisp | lisp | various array operations that are too expensive (in space) to do
inline
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information. |
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!VM")
Note : ALLOCATE - VECTOR is now implemented as a VOP .
|
fb4f3478f5d4c23e66d1fa978e848f41aaaff8e26ae7f94cee90469886ee92d6 | devops-ru/delivery-pipeline-training | core_test.clj | (ns app-monitoring.core-test
(:require [clojure.test :refer :all]
[app-monitoring.parser :refer :all]
[app-monitoring.core :refer :all]))
(def nginx-access
Linux x86_64 ) AppleWebKit/537.36 ( KHTML , like Gecko ) Ubuntu Chromium/49.0.2623.87 Chrome/49.0.2623.87 Safari/537.36\ " "
{:ip "... | null | https://raw.githubusercontent.com/devops-ru/delivery-pipeline-training/2a9ea3a3f1c1c0eca56dbe21beeeefc9755cec50/rieman/test/app_monitoring/core_test.clj | clojure | (ns app-monitoring.core-test
(:require [clojure.test :refer :all]
[app-monitoring.parser :refer :all]
[app-monitoring.core :refer :all]))
(def nginx-access
Linux x86_64 ) AppleWebKit/537.36 ( KHTML , like Gecko ) Ubuntu Chromium/49.0.2623.87 Chrome/49.0.2623.87 Safari/537.36\ " "
{:ip "... | |
6c5d1ffe2bd5031c525c87a70457f12cc957c74035e0c28d4b81882d8b62441f | ocamllabs/ocaml-modular-implicits | list.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/stdlib/list.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
* List operations .
Some function... |
f91838280436c0cc2696b5132b377e321ff255e44267c58d7d59821848ca54f2 | froydnj/ironclad | tiger.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
tiger.lisp -- implementation of the Tiger digest function
(in-package :crypto)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defconstant +tiger-wordsize+
#-(and sbcl x86-64)
32
#+(and sbcl x86-64)
64)
(defconstant +tiger-block-n-words+
(if (= +tiger... | null | https://raw.githubusercontent.com/froydnj/ironclad/fe88483bba68eac4db3b48bb4a5a40035965fc84/src/digests/tiger.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
Fill with 0 bit padding
Create new fully 0 padded block
Add 64bit message bit length
Flush last block
Done, remember digest for later calls | tiger.lisp -- implementation of the Tiger digest function
(in-package :crypto)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defconstant +tiger-wordsize+
#-(and sbcl x86-64)
32
#+(and sbcl x86-64)
64)
(defconstant +tiger-block-n-words+
(if (= +tiger-wordsize+ 32)
16
8))
(defconstant ... |
84ac3405e8968ed7ed4b446c5175bba31d3e408b290c0ec5747016d718887b3e | ejgallego/coq-lsp | coq_lsp.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * INRIA , CNRS and contributors - Copyright 1999 - 2018
(* <O___,, * (see CREDITS file for the list of authors) *)
\VV/ * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-lsp/70a3d4d41192671ca710775c98adfba4cfd5fae7/controller/coq_lsp.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
<O___,, * (see CREDITS file for the list of authors)
// * This file is distributed under the terms of the
* (see LICENSE file for... | v * INRIA , CNRS and contributors - Copyright 1999 - 2018
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser General Public License Version 2.1
Copyright 2019 MINES ParisTech -- ... |
21764883efc96b8218e882bf07631b7fa4f6b379f6d7872e99e5fc083b334505 | binaryage/cljs-oops | helpers.clj | (ns oops.helpers
"Various helpers for our Clojure code."
(:refer-clojure :exclude [gensym])
(:require [oops.cuerdas :as cuerdas]
[clojure.pprint :refer [pprint]]))
(defn indent-text [s count]
(let [prefix (cuerdas/repeat " " count)]
(->> s
(cuerdas/lines)
(map #(str prefix %))... | null | https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/src/lib/oops/helpers.clj | clojure | taken from cljs.core
taken from cljs.core | (ns oops.helpers
"Various helpers for our Clojure code."
(:refer-clojure :exclude [gensym])
(:require [oops.cuerdas :as cuerdas]
[clojure.pprint :refer [pprint]]))
(defn indent-text [s count]
(let [prefix (cuerdas/repeat " " count)]
(->> s
(cuerdas/lines)
(map #(str prefix %))... |
3e4c24498794916d629f24bb54bd126a70cffe9030beb1f3d79ec4f5061bb686 | kana/sicp | ex-4.50.scm | Exercise 4.50 . Implement a new special form ramb that is like amb except
;;; that it searches alternatives in a random order, rather than from left to
right . Show how this can help with 's problem in exercise 4.49 .
(load "./sec-4.3.2.scm")
(load "./sec-4.3.3.scm")
; To generate random sentences which consis... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-4.50.scm | scheme | that it searches alternatives in a random order, rather than from left to
To generate random sentences which consist of randomly structured words, all
use of amb in the parser must be replaced with ramb. To avoid a massive
copy, I modify amb to act as ramb.
*changed* | Exercise 4.50 . Implement a new special form ramb that is like amb except
right . Show how this can help with 's problem in exercise 4.49 .
(load "./sec-4.3.2.scm")
(load "./sec-4.3.3.scm")
(use gauche.sequence)
(define (analyze-amb exp)
(let ((cprocs (map analyze (amb-choices exp))))
(lambda (env succ... |
b31dca56ef229920c5b2904131519c6d3a61031bdda1eaa715b2ab7f7a06a95e | joshrotenberg/clj-wordnik | wordlists.clj | (ns wordnik.api.wordlists
(:use wordnik.core))
;; Functions for accessing the "wordlists" call.
;;
;; See #!/wordlists for more information
;; and supported arguments.
(defmacro def-wordnik-wordlists-method
[name request-method & rest]
(let [resource (str "wordLists.json")]
`(def-wordnik-method ~name ~reque... | null | https://raw.githubusercontent.com/joshrotenberg/clj-wordnik/a24a17f040cb29942080913585fc1b2b43681f41/src/wordnik/api/wordlists.clj | clojure | Functions for accessing the "wordlists" call.
See #!/wordlists for more information
and supported arguments.
wordlists - Create a wordlist | (ns wordnik.api.wordlists
(:use wordnik.core))
(defmacro def-wordnik-wordlists-method
[name request-method & rest]
(let [resource (str "wordLists.json")]
`(def-wordnik-method ~name ~request-method ~resource ~@rest)))
(def-wordnik-wordlists-method wordlists :post)
|
9178a0ac85884442d8391395a4c3cd3efde4415509eb3e0f8bce59950c9a80ec | troy-west/apache-kafka-number-stations-clj | system.clj | (ns numbers.system
(:require [clojure.tools.logging :as log]
[numbers.compute :as compute]
[numbers.http :as http])
(:gen-class))
(defn start!
[port]
(http/start! port (compute/start!)))
(defn -main
[& args]
(Thread/setDefaultUncaughtExceptionHandler
(reify Thread$UncaughtExcept... | null | https://raw.githubusercontent.com/troy-west/apache-kafka-number-stations-clj/d38b8ef57c38c056b41e1d24a2b8671479113300/src/numbers/system.clj | clojure | (ns numbers.system
(:require [clojure.tools.logging :as log]
[numbers.compute :as compute]
[numbers.http :as http])
(:gen-class))
(defn start!
[port]
(http/start! port (compute/start!)))
(defn -main
[& args]
(Thread/setDefaultUncaughtExceptionHandler
(reify Thread$UncaughtExcept... | |
0dbd4b352b8a287cd8e6ed40fd4184bd93c0c66347a97eeb53c314afcff4d207 | dongcarl/guix | iso-codes.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2016 , 2019 < >
Copyright © 2018 < >
;;;
;;; 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
... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/iso-codes.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2016 , 2019 < >
Copyright © 2018 < >
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 iso-codes)
#:use-modul... |
219f644bdd2a1ef1a1490782dd3dc4b52d7fe675c134f173ba7b2fd3cf0e4efb | realworldocaml/book | test_while.ml | open Core
open Ppxlib
let loc = Location.none
let print_expr expr =
Pprintast.string_of_structure [%str let () = [%e expr]] |> print_string
;;
let%expect_test "while%bind expansion" =
Ppx_let_expander.expand
Ppx_let_expander.bind
Ppx_let_expander.Extension_kind.default
~modul:None
[%expr
wh... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_let/test/inline/test_while.ml | ocaml | open Core
open Ppxlib
let loc = Location.none
let print_expr expr =
Pprintast.string_of_structure [%str let () = [%e expr]] |> print_string
;;
let%expect_test "while%bind expansion" =
Ppx_let_expander.expand
Ppx_let_expander.bind
Ppx_let_expander.Extension_kind.default
~modul:None
[%expr
wh... | |
7fe94088c2699653b04666dbcaa9e72f415296b7c1cdc04c9b9c31ca8c894e3e | jordanthayer/ocaml-search | sliding_tiles_interfaces.ml | *
@author jtd7
@since 2010 - 09 - 13
A collection of interfaces to the sliding tiles problem
@author jtd7
@since 2010-09-13
A collection of interfaces to the sliding tiles problem
*)
module ST = Sliding_tiles
module STI = Sliding_tiles_inst
module STH = Sliding_heuristics
let default... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/sliding_tiles/sliding_tiles_interfaces.ml | ocaml | * [default_interface cost_name inst limit] makes the default
search interface.
* [default_interface cost_name inst limit] makes the default
search interface.
* [default_interface cost_name inst limit] makes the default
search interface.
* [default_interface cost_name inst limit] makes the default
... | *
@author jtd7
@since 2010 - 09 - 13
A collection of interfaces to the sliding tiles problem
@author jtd7
@since 2010-09-13
A collection of interfaces to the sliding tiles problem
*)
module ST = Sliding_tiles
module STI = Sliding_tiles_inst
module STH = Sliding_heuristics
let default... |
f517c932c65e750b284b46d87de44912c0d453ffe51b775bd1709e025f9dfbc8 | BSeppke/vigracket | filters.rkt | #lang racket
(require vigracket/config)
(require vigracket/helpers)
(require scheme/foreign)
(unsafe!)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # Generic... | null | https://raw.githubusercontent.com/BSeppke/vigracket/077734ab5376e6bbf5600eb813225428d02838c0/filters.rkt | racket | #lang racket
(require vigracket/config)
(require vigracket/helpers)
(require scheme/foreign)
(unsafe!)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # Generic... | |
5ed665126fd493c3c0d843f0163c1383b1367ba21481428a2a615592fe02b755 | Quid2/top | DocSpec.hs | module Main where
import Data.List ( isSuffixOf )
import System.FilePath.Find
import Test.DocTest
main :: IO ()
main = find always ( ( extension = = ? " .hs " ) & & ? exceptFiles [ " Data / Convertible / Base.hs","Data / Convertible / Utils.hs","Data / Convertible ... | null | https://raw.githubusercontent.com/Quid2/top/0f8dfa54d977053d02396e914c00b84cc1c1c498/test/DocSpec.hs | haskell | module Main where
import Data.List ( isSuffixOf )
import System.FilePath.Find
import Test.DocTest
main :: IO ()
main = find always ( ( extension = = ? " .hs " ) & & ? exceptFiles [ " Data / Convertible / Base.hs","Data / Convertible / Utils.hs","Data / Convertible ... | |
83a64e4acad8963336800db8e92c48ace0dfbbb8a1969a53505c154e2dd77780 | mainland/language-c-quote | Quote.hs | -- |
-- Module : Language.C.Quote
Copyright : ( c ) 2010 - 2011 Harvard University
( c ) 2011 - 2013
: ( c ) 2013 - 2015 Drexel University
-- License : BSD-style
Maintainer :
--
There are five modules that provide quasiquoters , each for a different C
vari... | null | https://raw.githubusercontent.com/mainland/language-c-quote/c7a1ad5833b5567e7d746f4640624b16d61d2d94/Language/C/Quote.hs | haskell | |
Module : Language.C.Quote
License : BSD-style
extensions and, 'Language.C.Quote.ObjC' parses C99 plus a subset of Objective-C
expressions that use data constructors that must be in scope where the
quasiquoted expression occurs. You will be safe if you add the following
imports to any module using ... | Copyright : ( c ) 2010 - 2011 Harvard University
( c ) 2011 - 2013
: ( c ) 2013 - 2015 Drexel University
Maintainer :
There are five modules that provide quasiquoters , each for a different C
variant . ' Language . C.Quote . C ' parses C99 , ' Language . C.Quote . GC... |
90e55dca70adb9c16be4bf9fb52deab4e8b676446d45e081923c2dea5cfbdcb8 | DogLooksGood/holdem | game_test.clj | (ns poker.game-test
(:require
[poker.game :as sut]
[poker.game.model :as model]
[clojure.test :as t]
[poker.utils.test-system :refer [wrap-test-system]]
[clojure.core.async :as a])
(:import clojure.lang.ExceptionInfo))
(t/use-fixtures :each wrap-test-system)
(t/deftest start-game
... | null | https://raw.githubusercontent.com/DogLooksGood/holdem/bc0f93ed65cab54890c91f78bb95fe3ba020a41f/test/clj/poker/game_test.clj | clojure | (ns poker.game-test
(:require
[poker.game :as sut]
[poker.game.model :as model]
[clojure.test :as t]
[poker.utils.test-system :refer [wrap-test-system]]
[clojure.core.async :as a])
(:import clojure.lang.ExceptionInfo))
(t/use-fixtures :each wrap-test-system)
(t/deftest start-game
... | |
7f8b2d47f21b9e107ab6da612645a9ac522bcceca7666636446205ff09c62be8 | OCamlPro/ocaml-benchs | cohttp_async_bench.ml | open Core.Std
open Async.Std
open Cohttp_async
let main n p =
let server () =
Server.(create (Tcp.on_port p)
(fun ~body address request -> respond_with_string "Ok!"))
in
let get_n n =
let rec inner = function
| n when n <= 0 -> Deferred.unit
| n ->
Client.(get @@ Uri.o... | null | https://raw.githubusercontent.com/OCamlPro/ocaml-benchs/98047e112574e6bf55137dd8058f227a9f40281b/cohttp/cohttp_async_bench.ml | ocaml | open Core.Std
open Async.Std
open Cohttp_async
let main n p =
let server () =
Server.(create (Tcp.on_port p)
(fun ~body address request -> respond_with_string "Ok!"))
in
let get_n n =
let rec inner = function
| n when n <= 0 -> Deferred.unit
| n ->
Client.(get @@ Uri.o... | |
ee0a7e361bd352f9bd406b8704b3d165ec5e8ba71a39ac1468fa34972c27a23e | haskell-suite/haskell-names | Types.hs | # LANGUAGE MultiParamTypeClasses #
module Types where
data A
= B A
| C A
| D { d :: A, e :: A }
type X = A
class C a where
f :: X -> A
| null | https://raw.githubusercontent.com/haskell-suite/haskell-names/795d717541484dbe456342a510ac8e712e1f16e4/tests/annotations/Types.hs | haskell | # LANGUAGE MultiParamTypeClasses #
module Types where
data A
= B A
| C A
| D { d :: A, e :: A }
type X = A
class C a where
f :: X -> A
| |
6cfdd5df9636006d6b0dfa9997af66f859b5a5f7580860b884f31a043588643e | wireless-net/erlang-nommu | snmpm_mpd.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2012 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publ... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/snmp/src/manager/snmpm_mpd.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitati... | Copyright Ericsson AB 2004 - 2012 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(snmpm_mpd).
-export([init/1,
... |
44ac0e013412a82efad69c2b65a14d016e3ce3e10f500a9c4403a2b6304e9a82 | cbaggers/cepl | events.lisp | (in-package :cepl.events)
;; direct sdl helpers
(defmacro case-events ((event &key (method :poll) (timeout nil))
&body event-handlers)
`(let (,(when (symbolp event) `(,event (sdl2:new-event))))
(loop :until (= 0 (sdl2:next-event ,event ,method ,timeout)) :do
(case (sdl2::get-eve... | null | https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/protocode/_/events.lisp | lisp | direct sdl helpers
basic stuff
(defun def-e-> (name &rest nodes)
)
(defun e-map (function event)
(funcall function event))
(defun e-tcase (bindings event)
event))
(def-e-> thrash-events
(e-map #'sdl->cepl-evt) (e-tcase ((:keyboard-event filter-combos player-kb-input)
... | (in-package :cepl.events)
(defmacro case-events ((event &key (method :poll) (timeout nil))
&body event-handlers)
`(let (,(when (symbolp event) `(,event (sdl2:new-event))))
(loop :until (= 0 (sdl2:next-event ,event ,method ,timeout)) :do
(case (sdl2::get-event-type ,event)
... |
a9788acfb2cbf4f785a4bcb32b10486be5545e8e943e1b6863d9a5c5c2cc1a84 | serioga/clojure-benhcmarks | lazy_map.clj | (ns clojure-benchmarks.lazy-map
(:require [lazy-map.core :as m])
(:import (clojure.lang Delay IDeref IFn IKeywordLookup ILookup ILookupThunk)))
(set! *warn-on-reflection* true)
;;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
(def -m1 {:x :value})
(def -m2 (m/... | null | https://raw.githubusercontent.com/serioga/clojure-benhcmarks/26336bdf116986ebecace6d4bed55cbce70f16e7/src/clojure_benchmarks/lazy_map.clj | clojure | ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Execution time mean : 5,747938 ns
Execution time std-deviation : 0,196149 ns
Execution time std-deviation : 0,376985 ns
Execution time mean : -0,787393 ns
Execution time mean... | (ns clojure-benchmarks.lazy-map
(:require [lazy-map.core :as m])
(:import (clojure.lang Delay IDeref IFn IKeywordLookup ILookup ILookupThunk)))
(set! *warn-on-reflection* true)
(def -m1 {:x :value})
(def -m2 (m/lazy-map {:x :value}))
(def -m3 (let [^Delay -k (delay :value)]
(reify
ILook... |
a77b52cf8afe74cc39007034316cae6a54a8dc50b56ae0f462debe7c568c20bf | mjul/zeromq-tutorial | project.clj | (defproject zeromq-tutorial "1.0.0-SNAPSHOT"
:description "ZeroMQ tutorial"
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
[org.clojars.mikejs/clojure-zmq "2.0.7-SNAPSHOT"]
[org.zmq/jzmq "2.0.6-SNAPSHOT"]]
:native-deps [[org.cl... | null | https://raw.githubusercontent.com/mjul/zeromq-tutorial/6744a7eb5d66fb1cabb13b838e717ec5775af8ee/project.clj | clojure | This sets the 'java.library.path' property | (defproject zeromq-tutorial "1.0.0-SNAPSHOT"
:description "ZeroMQ tutorial"
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
[org.clojars.mikejs/clojure-zmq "2.0.7-SNAPSHOT"]
[org.zmq/jzmq "2.0.6-SNAPSHOT"]]
:native-deps [[org.cl... |
bedc03f6fbc9e6d7b8afc0c94ea2575f57bb00ceb6366a6cf2fc5d315ce8233c | aryx/xix | file.ml | open Common
open Plan9 (* for the fields *)
module N = Plan9
(*****************************************************************************)
(* Prelude *)
(*****************************************************************************)
(*****************************************************************************)
(*... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/windows/file.ml | ocaml | for the fields
***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Types and constants
*******************************************... | open Common
module N = Plan9
type fid = Protocol_9P.fid
type filecode =
| Dir of dir
| File of devid
and dir =
' / ' old : was called Qdir in rio - C
| Root
' /xxx '
and devid =
| WinName
| Mouse
| Cons
| ConsCtl
| WinId
| Text
type fileid = filecode * Window.wid
type ... |
23de05e1b0b05ca51aeba86b4ead267b07c6db2a021eaa1eaf80bad8650c69f7 | LambdaHack/LambdaHack | Misc.hs | # LANGUAGE DeriveGeneric #
-- | Hacks that haven't found their home yet.
module Game.LambdaHack.Common.Misc
( FontDefinition(..), HintingMode(..), FontSet(..)
, makePhrase, makeSentence, squashedWWandW
, appDataDir
, xM, xD, minusM, minusM1, minusM2, oneM, tenthM
, show64With2
, workaroundOnMainThreadMVar
... | null | https://raw.githubusercontent.com/LambdaHack/LambdaHack/0692cb6326eec5382269afa10bf2e3ff4585f5a2/engine-src/Game/LambdaHack/Common/Misc.hs | haskell | | Hacks that haven't found their home yet.
^ filename, size, hinting mode
^ extra cell extension
^ size ignored for bitmap fonts and no hinting
irregular word sets.
this is both countable and uncountable, but I use it here
only as uncountable, do I overwrite the default
as @CardinalWs@.
The parts are not sorte... | # LANGUAGE DeriveGeneric #
module Game.LambdaHack.Common.Misc
( FontDefinition(..), HintingMode(..), FontSet(..)
, makePhrase, makeSentence, squashedWWandW
, appDataDir
, xM, xD, minusM, minusM1, minusM2, oneM, tenthM
, show64With2
, workaroundOnMainThreadMVar
) where
import Prelude ()
import Game.Lambd... |
e46a215b145b9052142db7266c3da840994a56e0cf9f78f9fe4cb7a6811b29be | bhauman/cljs-test-display | core_test.cljs | (ns cljs-testing.core-test
(:require
[cljs.test :refer [deftest is testing]]))
(defn this-throws-an-error [msg]
(throw (js/Error. msg)))
(deftest test-a
(testing "a should be like b"
(is (= 45 (reduce + (range 10))) "This should work")
(is (= 45 (reduce + (range 10))))
(is (= 45 (reduce + (range ... | null | https://raw.githubusercontent.com/bhauman/cljs-test-display/727a08d298b1ce380de4c8f0145254b95eb957cd/test/cljs_testing/core_test.cljs | clojure | (ns cljs-testing.core-test
(:require
[cljs.test :refer [deftest is testing]]))
(defn this-throws-an-error [msg]
(throw (js/Error. msg)))
(deftest test-a
(testing "a should be like b"
(is (= 45 (reduce + (range 10))) "This should work")
(is (= 45 (reduce + (range 10))))
(is (= 45 (reduce + (range ... | |
c58f9af5c4918646e32e7a6137009e5795ac8c17549af8460e651260d248111c | jumarko/web-development-with-clojure | project.clj | ;---
Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
; courses, books, articles, and the like. Contact us if you are in doubt.
; We make no guarantees that this code is fit fo... | null | https://raw.githubusercontent.com/jumarko/web-development-with-clojure/dfff6e40c76b64e9fcd440d80c7aa29809601b6b/code/oauth-example/project.clj | clojure | ---
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
(defproject oauth-example "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:dependencies [[org.clojure/... |
56713a79c14d06f4177e5677062b44066305a686d94a50288d5e6d91a4cd6dbf | expipiplus1/vulkan | Promoted_From_VK_KHR_shader_atomic_int64.hs | {-# language CPP #-}
No documentation found for Chapter " Promoted_From_VK_KHR_shader_atomic_int64 "
module Vulkan.Core12.Promoted_From_VK_KHR_shader_atomic_int64 ( PhysicalDeviceShaderAtomicInt64Features(..)
, StructureType(..)
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Core12/Promoted_From_VK_KHR_shader_atomic_int64.hs | haskell | # language CPP #
| VkPhysicalDeviceShaderAtomicInt64Features - Structure describing
features supported by VK_KHR_shader_atomic_int64
= Members
This structure describes the following features:
= Description
If the 'PhysicalDeviceShaderAtomicInt64Features' structure is included
in the @pNext@ chain of the
str... | No documentation found for Chapter " Promoted_From_VK_KHR_shader_atomic_int64 "
module Vulkan.Core12.Promoted_From_VK_KHR_shader_atomic_int64 ( PhysicalDeviceShaderAtomicInt64Features(..)
, StructureType(..)
... |
99f7339eb8b2b54324545ab911a2d83d62c3eb59836b2a6ff3e0af4cf2c11cb1 | aryx/xix | stack.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_core/collections/todo/stack.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
$ I d : stack.mli , v 1.8 1997/10/31 12:59:29 doligez Exp $
Module [ Stack ] : last - in first - out stacks... |
f1476b53da31e22a02bb08e64e9593bb08f7aeb802701cd55dc18e3fe8cc2c63 | incoherentsoftware/defect-process | DummyCollisionProjectile.hs | module Player.MovementSkill.All.TeleportSkill.DummyCollisionProjectile
( mkDummyCollisionProjectile
) where
import Control.Monad.IO.Class (MonadIO)
import Data.Maybe (fromMaybe)
import qualified Data.Set as S
import Collision.Hitbox
import Id
import Msg
import Projectile
import Util
import World.S... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Player/MovementSkill/All/TeleportSkill/DummyCollisionProjectile.hs | haskell | calculate swept collision box between current and intended teleport position | module Player.MovementSkill.All.TeleportSkill.DummyCollisionProjectile
( mkDummyCollisionProjectile
) where
import Control.Monad.IO.Class (MonadIO)
import Data.Maybe (fromMaybe)
import qualified Data.Set as S
import Collision.Hitbox
import Id
import Msg
import Projectile
import Util
import World.S... |
355a60fdf71453ab58cab9e5f28226a43d5626dd5cbe8ea248ff3e2ae21fcf40 | glondu/belenios | pages_common.mli | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2022
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/5306402c15c6a76438b13b8b9da0f45d02a0563d/src/web/server/common/pages_common.mli | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2022
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
6b453b57f930648e58d5b15e253118b7d9b15dfe2d19d0093c8de272bfd0f5a9 | fogus/minderbinder | weight.clj | (ns minderbinder.weight
(:require [minderbinder.core :refer (defunits-of)]))
(defunits-of weight :kilogram
"WiP"
:kg #{:kilograms :kilogram :grave}
:g 1/1000
:gram #{:grams :g}
:mg [1/1000 :g]
:mg #{:milligrams :milligram}
:hg [100 :grams]
:hg #{:hectograms :hectogram}
:dg [1/10 :g]
:dg #{:d... | null | https://raw.githubusercontent.com/fogus/minderbinder/35b10b279b241fbeab38f63af568e6302f40930a/src/minderbinder/weight.clj | clojure | Celestial bodies | (ns minderbinder.weight
(:require [minderbinder.core :refer (defunits-of)]))
(defunits-of weight :kilogram
"WiP"
:kg #{:kilograms :kilogram :grave}
:g 1/1000
:gram #{:grams :g}
:mg [1/1000 :g]
:mg #{:milligrams :milligram}
:hg [100 :grams]
:hg #{:hectograms :hectogram}
:dg [1/10 :g]
:dg #{:d... |
70cbd6414d7ea0cb59ac63688d0666f4f7b6cf243402c09529800fffbe55aeb5 | mfp/ocaml-sqlexpr | sqlexpr_sqlite.ml |
open Printf
module Option = Sqlexpr_utils.Option
exception Error of string * exn
exception Sqlite_error of string * Sqlite3.Rc.t
let tx_id_counter = ref 0
let curr_thread_id () = Thread.id (Thread.self ())
let raise_thread_error ?msg expected =
let actual = curr_thread_id () in
let s =
sprintf
"Tryin... | null | https://raw.githubusercontent.com/mfp/ocaml-sqlexpr/5b22129a837d43df189bb29aa1d594412075e4f6/src/sqlexpr_sqlite.ml | ocaml | pgocaml_prof wants to see a connect entry
the format used by PGOcaml
accept a reversed list of params
TODO: use params or remove it.
FIXME: raise?
different modules having the same type db = single_worker_db will have
* different mutex_tbl tables, so must create the mutex lazily
the list of params is... |
open Printf
module Option = Sqlexpr_utils.Option
exception Error of string * exn
exception Sqlite_error of string * Sqlite3.Rc.t
let tx_id_counter = ref 0
let curr_thread_id () = Thread.id (Thread.self ())
let raise_thread_error ?msg expected =
let actual = curr_thread_id () in
let s =
sprintf
"Tryin... |
c5f407a85aeb9e136b35f9301262eaa7cbb178bc8735b369b041e55f52332e8f | dparis/gen-phzr | render_texture.cljs | (ns phzr.impl.accessors.pixi.render-texture)
(def render-texture-get-properties
{:base-texture "baseTexture"
:crop "crop"
:frame "frame"
:height "height"
:is-tiling "isTiling"
:no-frame "noFrame"
:renderer "renderer"
:requires-re-tint "requiresReTint"
:requires-update "requiresUpdate"
:res... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/pixi/render_texture.cljs | clojure | (ns phzr.impl.accessors.pixi.render-texture)
(def render-texture-get-properties
{:base-texture "baseTexture"
:crop "crop"
:frame "frame"
:height "height"
:is-tiling "isTiling"
:no-frame "noFrame"
:renderer "renderer"
:requires-re-tint "requiresReTint"
:requires-update "requiresUpdate"
:res... | |
5f1ffb7ea74e14301a582e06a9a23e9328f0b74df52b835ed0684555fa462c5e | sternenseemann/gopher-proxy | Params.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module GopherProxy.Params
( Params (..)
, params
, helpfulParams
) where
import qualified Data.ByteString as BS
import Data.Maybe (fromMaybe)
import Data.Monoid ((<>))
import Data.Text (Text (), pack)
import Data.Text.Encoding
import Network.Mi... | null | https://raw.githubusercontent.com/sternenseemann/gopher-proxy/919640476c6b9ab19d120318e18692fa3651e167/src/GopherProxy/Params.hs | haskell | # LANGUAGE OverloadedStrings #
Thanks enum! <3 | # LANGUAGE DeriveGeneric #
module GopherProxy.Params
( Params (..)
, params
, helpfulParams
) where
import qualified Data.ByteString as BS
import Data.Maybe (fromMaybe)
import Data.Monoid ((<>))
import Data.Text (Text (), pack)
import Data.Text.Encoding
import Network.Mime (MimeType (), defaultMimeType)
i... |
61736a92a87d925fffa88f8a3e5a3ece588aabce6bc684e84958b1d1cc5a265a | aggieben/weblocks | sequence-view.lisp |
(in-package :weblocks-test)
(deftest-html render-object-view-impl-empty-sequence-1
(render-object-view-impl nil (make-instance 'sequence-view) nil)
(:div :class "view sequence empty"
(:div :class "extra-top-1" "<!-- empty -->")
(:div :class "extra-top-2" "<!-- empty -->")
(:div :class "extra-top-3" "<!-- emp... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/views/sequence-view.lisp | lisp |
(in-package :weblocks-test)
(deftest-html render-object-view-impl-empty-sequence-1
(render-object-view-impl nil (make-instance 'sequence-view) nil)
(:div :class "view sequence empty"
(:div :class "extra-top-1" "<!-- empty -->")
(:div :class "extra-top-2" "<!-- empty -->")
(:div :class "extra-top-3" "<!-- emp... | |
e8f45d1600e2eef166982029bd2f980424f88f756eb25aa521cb9fac25bba508 | craigl64/clim-ccl | exclcmac.lisp | -*- Mode : common - lisp ; Package : ; Base : 10 ; Lowercase : Yes -*-
;;;
CLX -- exclcmac.cl
;;; This file provides for inline expansion of some functions.
;;;
Copyright ( c ) 1989 Franz Inc , Berkeley , Ca .
;;;
;;; Permission is granted to any individual or institution to use, copy,
;;; modify, and ... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/xlib/exclcmac.lisp | lisp | Package : ; Base : 10 ; Lowercase : Yes -*-
This file provides for inline expansion of some functions.
Permission is granted to any individual or institution to use, copy,
modify, and distribute this software, provided that this complete
copyright and permission notice is maintained, intact, in all c... | CLX -- exclcmac.cl
Copyright ( c ) 1989 Franz Inc , Berkeley , Ca .
(in-package :xlib)
(excl:defcmacro card8p (x)
(let ((xx (gensym)))
`(let ((,xx ,x))
(declare (optimize (speed 3) (safety 0))
(fixnum ,xx))
(and (excl:fixnump ,xx) (> #.(expt 2 8) ,xx) (>= ,xx 0)))))
(excl:defcmacro card16p ... |
5354c740f42f8ba5c24dd51e5e5d6af3c301c68eba7f6245bd05b78672143334 | CompSciCabal/SMRTYPRTY | turtles-and-ferns.rkt | #lang racket
;; this requires some patience
(require graphics/turtles)
(require graphics/turtle-examples)
(turtles)
(turn 8)
(turn 80)
(split (turn/radians (/ pi 2)))
(split (turn/radians (/ pi 2)))
(split (turn/radians (/ pi 2)))
(split (turn/radians (/ pi 2)))
(split (turn/radians (/ pi 2.5)))
(split (turn/radians ... | null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/experiments/ynasser/fractals/turtles-and-ferns.rkt | racket | this requires some patience | #lang racket
(require graphics/turtles)
(require graphics/turtle-examples)
(turtles)
(turn 8)
(turn 80)
(split (turn/radians (/ pi 2)))
(split (turn/radians (/ pi 2)))
(split (turn/radians (/ pi 2)))
(split (turn/radians (/ pi 2)))
(split (turn/radians (/ pi 2.5)))
(split (turn/radians (/ pi 2.5)))
(split (turn/radia... |
ca497263967113113ccbea149e1ee2666326d1514b4ac9e790005120014c6864 | deepmarker/xxh | discover.ml | module C = Configurator.V1
let () =
C.main ~name:"libxxhash" (fun c ->
let default : C.Pkg_config.package_conf =
{libs= ["-lxxhash"]; cflags= []} in
let conf =
match C.Pkg_config.get c with
| None -> default
| Some pc -> (
match C.Pkg_config.query pc ~package:"li... | null | https://raw.githubusercontent.com/deepmarker/xxh/2d66ed30ce712e94502271585a8c23841ae22327/lib/config/discover.ml | ocaml | module C = Configurator.V1
let () =
C.main ~name:"libxxhash" (fun c ->
let default : C.Pkg_config.package_conf =
{libs= ["-lxxhash"]; cflags= []} in
let conf =
match C.Pkg_config.get c with
| None -> default
| Some pc -> (
match C.Pkg_config.query pc ~package:"li... | |
739ccc27f82bfef939b9d1928afd46502c91f172d624ae23cfa36677b3de6005 | morpheusgraphql/morpheus-graphql | Test.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
module Case.LocalGlobal.Test
( test,
)
where
import Case.LocalGlobal.Api
i... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/b025f1b6e9f449145a1df2c3282492a2111624d5/morpheus-graphql-client/test/Case/LocalGlobal/Test.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
module Case.LocalGlobal.Test
( test,
)
where
import Case.LocalGlobal.Api
import Data.Aeson
import Data.Morphe... |
d8f612082138b4e3a4a10c45201dd656a858442ead5917ffc56ccb593e855b72 | grin-compiler/ext-stg-interpreter-presentation-demos | Main.hs | # LANGUAGE CPP #
-- -----------------------------------------------------------------------------
--
Main.hs , part of
--
( c ) 1995 - 2000 , 2003
--
-- ----------------------------------------------------------------------------}
module Main (main) where
import AbsSyn
import CharSet
import DFA
import DFAMin... | null | https://raw.githubusercontent.com/grin-compiler/ext-stg-interpreter-presentation-demos/f4b1a3b3ab746146859a1512f910e9e62c62a0e6/demo-03-alex/alex-3.2.5/src/Main.hs | haskell | -----------------------------------------------------------------------------
----------------------------------------------------------------------------}
We need to force every file we open to be read in
as UTF8
We need to force every file we write to be written
to as UTF8
`main' decodes the command line ar... | # LANGUAGE CPP #
Main.hs , part of
( c ) 1995 - 2000 , 2003
module Main (main) where
import AbsSyn
import CharSet
import DFA
import DFAMin
import NFA
import Info
import Map ( Map )
import qualified Map hiding ( Map )
import Output
import ParseMonad ( runP )
import Parser
import Scan
import Util ( hline )
imp... |
1c8bc62ddf910ab827473173971a6a922cabcc0eb7988e1b9e7379c626b01ae3 | glguy/advent2017 | Day05.hs | |
Module : Main
Description : Day 5 solution
Copyright : ( c ) , 2017
License : ISC
Maintainer :
Module : Main
Description : Day 5 solution
Copyright : (c) Eric Mertens, 2017
License : ISC
Maintainer :
-}
module Main where
import Advent (getInput)
import ... | null | https://raw.githubusercontent.com/glguy/advent2017/fed4592b076d255297dbddf2a183c70d6d0acfa4/execs/Day05.hs | haskell | | Parse input as lines of integers.
>>> parseInput "-2\n-1\n0\n1\n2\n"
[-2,-1,0,1,2]
| Update rules
| Compute the number of steps until the program terminates given
an update rule.
^ update rule
^ initial program
^ steps required | |
Module : Main
Description : Day 5 solution
Copyright : ( c ) , 2017
License : ISC
Maintainer :
Module : Main
Description : Day 5 solution
Copyright : (c) Eric Mertens, 2017
License : ISC
Maintainer :
-}
module Main where
import Advent (getInput)
import ... |
a50f1922576afda12a21ddfe2d02315425dc5e29df36bbcd60f93b11821dc1f4 | htmfilho/minimily | folder.clj | (ns minimily.documents.model.folder
(:require [hugsql.core :as hugsql]
[minimily.utils.database :as db]
[minimily.utils.string :as s]))
(hugsql/def-sqlvec-fns "minimily/documents/model/sql/folder.sql")
(def table :folder)
(defn find-parents ... | null | https://raw.githubusercontent.com/htmfilho/minimily/e29ef10156a831c99b25d13783e8d1a412a273c9/src/minimily/documents/model/folder.clj | clojure | (ns minimily.documents.model.folder
(:require [hugsql.core :as hugsql]
[minimily.utils.database :as db]
[minimily.utils.string :as s]))
(hugsql/def-sqlvec-fns "minimily/documents/model/sql/folder.sql")
(def table :folder)
(defn find-parents ... | |
ace6a1acbfd395ea500db634fa4de3cad37b06f40f710573ed1c608f6e407834 | michaelnisi/feeder | atom.erl |
-module(atom).
-export([wanted/0]).
wanted() -> {{
feed,
<<"John Doe">>,
<<"urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6">>,
undefined,
undefined,
<<"/">>,
undefined,
undefined,
<<"Example Feed">>,
<<"Sun, 18 May 2014 16:13:31 GMT">>,
<<"/">>}, [
{
entry,
undefined,
[<<"robot">>,<<"nuclea... | null | https://raw.githubusercontent.com/michaelnisi/feeder/de2004cb954a5a70390a680e2cb0ed697dfcfd27/test/feeder_SUITE_data/atom.erl | erlang |
-module(atom).
-export([wanted/0]).
wanted() -> {{
feed,
<<"John Doe">>,
<<"urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6">>,
undefined,
undefined,
<<"/">>,
undefined,
undefined,
<<"Example Feed">>,
<<"Sun, 18 May 2014 16:13:31 GMT">>,
<<"/">>}, [
{
entry,
undefined,
[<<"robot">>,<<"nuclea... | |
c045ca2c460c3f9d8c167e83ae3763f4cb26bfff7da07f3f83df95bff013bddc | andrewthad/quickcheck-classes | Ord.hs | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wall #
module Test.QuickCheck.Classes.Ord
( ordLaws
) where
import Data.Proxy (Proxy)
import Test.QuickCheck hiding ((.&.))
import Test.QuickCheck.Classes.Internal (Laws(..))
-- | Tests the following properties:
--
-- [/Antisymmetry/]
-- @a ≤ b ∧ b ≤ a ⇒ a = b@... | null | https://raw.githubusercontent.com/andrewthad/quickcheck-classes/0fc6c0602bc6875cdbde34cbdbcf229a175af62f/quickcheck-classes-base/src/Test/QuickCheck/Classes/Ord.hs | haskell | | Tests the following properties:
[/Antisymmetry/]
@a ≤ b ∧ b ≤ a ⇒ a = b@
[/Transitivity/]
@a ≤ b ∧ b ≤ c ⇒ a ≤ c@
[/Totality/]
Technically, this tests something a little stronger than it is supposed to.
But that should be alright since this additional strength is implied by | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -Wall #
module Test.QuickCheck.Classes.Ord
( ordLaws
) where
import Data.Proxy (Proxy)
import Test.QuickCheck hiding ((.&.))
import Test.QuickCheck.Classes.Internal (Laws(..))
@a ≤ b ∨ a > b@
ordLaws :: (Ord a, Arbitrary a, Show a) => Proxy a -> Laws
ordLaws p... |
80a6ab6d664d23166d2d8fb094ad64d6821d519130ce4f54323c3dc9ec2f7d80 | Hans-Halverson/myte | runner.ml | open Myte_test
let regexp_matches regexp name =
try
let _ = Str.search_forward regexp name 0 in
true
with
| Not_found -> false
let should_run ~filter ~exclude name =
let is_filtered =
match filter with
| None -> true
| Some filter -> regexp_matches filter name
in
let is_excluded =
... | null | https://raw.githubusercontent.com/Hans-Halverson/myte/04c91ff8b0d44e7f65acaf6c223401741a4c0143/test/test/runner.ml | ocaml | open Myte_test
let regexp_matches regexp name =
try
let _ = Str.search_forward regexp name 0 in
true
with
| Not_found -> false
let should_run ~filter ~exclude name =
let is_filtered =
match filter with
| None -> true
| Some filter -> regexp_matches filter name
in
let is_excluded =
... | |
dcfbea296f1dfdf5bd2a10cdee8e0c9fb20a55c2421973c9067cdc4f933f3fc6 | d-plaindoux/transept | lexeme.ml | type t =
| Float of float
| String of string
| Char of char
| Ident of string
| Keyword of string
| Spaces of string
| Special of char
module Make (Parser : Transept_specs.PARSER with type e = t) = struct
open Parser
let spaces = any >>= (function Spaces v -> return v | _ -> fail)
let any = opt s... | null | https://raw.githubusercontent.com/d-plaindoux/transept/8567803721f6c3f5d876131b15cb301cb5b084a4/lib/transept_genlex/lexeme.ml | ocaml | type t =
| Float of float
| String of string
| Char of char
| Ident of string
| Keyword of string
| Spaces of string
| Special of char
module Make (Parser : Transept_specs.PARSER with type e = t) = struct
open Parser
let spaces = any >>= (function Spaces v -> return v | _ -> fail)
let any = opt s... | |
f8f76dfeee5d739b344ac6456041cffa2a2e05b9531ceae50bd4db04c35ef39a | silky/fashion | WaveAxis.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Nvds.Designs.WaveAxis where
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
pattern :: Diagram B -> Diagram B
pattern d = t
where
sizes = map exp [0.1, 0.2 ..... | null | https://raw.githubusercontent.com/silky/fashion/2b01d1e5c385fe99e8e54f5828114551e9c8e309/Wave-Axis/src/Nvds/Designs/WaveAxis.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE NoMonomorphismRestriction # | # LANGUAGE FlexibleContexts #
module Nvds.Designs.WaveAxis where
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
pattern :: Diagram B -> Diagram B
pattern d = t
where
sizes = map exp [0.1, 0.2 .. 10]
sizes = [ 0.1 , 0.2 .. 1 ]
t = mconcat (imap im sizes)
im k s = if... |
9562580e04f75b47a6ed90bc5c2e194831638be43bf01bf5876ee30ef3ed1915 | ujamjar/hardcaml | graph.ml |
* hardcaml - hardware design in OCaml
*
* ( c ) 2014 MicroJamJar Ltd
*
* Author(s ):
* Description :
*
* hardcaml - hardware design in OCaml
*
* (c) 2014 MicroJamJar Ltd
*
* Author(s):
* Description:
*
*)
open Printf
open Utils
open Signal.Types
open Signal.Comb
open Circuit
... | null | https://raw.githubusercontent.com/ujamjar/hardcaml/65f32f543348e81cbb7f6d0e77f1f1203bf4e335/src/graph.ml | ocaml |
match names signal with
| [] -> "_" ^ Int64.to_string (uid signal)
| h::t -> h
create a suitable fanout mapping
add these signals to the visited set
filter out already visited signals, and outputs
create set of uids of nodes at this rank
create the output level and add it to t... |
* hardcaml - hardware design in OCaml
*
* ( c ) 2014 MicroJamJar Ltd
*
* Author(s ):
* Description :
*
* hardcaml - hardware design in OCaml
*
* (c) 2014 MicroJamJar Ltd
*
* Author(s):
* Description:
*
*)
open Printf
open Utils
open Signal.Types
open Signal.Comb
open Circuit
... |
fc9ad52624b517aa475ccd4f50308d0cc230e44d8624b51efb83228582e895a7 | YoshikuniJujo/test_haskell | VulkanPhysicalDeviceEnum.hs | # OPTIONS_GHC -Wall -fno - warn - tabs #
module VulkanPhysicalDeviceEnum where
import MakeEnum
make :: IO ()
make = createFile' "/usr/include/vulkan/vulkan_core.h"
"PhysicalDevice.Enum" ["Data.Word"]
[("Type", "VkPhysicalDeviceType", ["Show", "Eq", "Storable"])] []
| null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/6ea44c1048805a62979669c185ab32ba9f4d2e02/themes/gui/vulkan/try-vulkan-middle/tools/VulkanPhysicalDeviceEnum.hs | haskell | # OPTIONS_GHC -Wall -fno - warn - tabs #
module VulkanPhysicalDeviceEnum where
import MakeEnum
make :: IO ()
make = createFile' "/usr/include/vulkan/vulkan_core.h"
"PhysicalDevice.Enum" ["Data.Word"]
[("Type", "VkPhysicalDeviceType", ["Show", "Eq", "Storable"])] []
| |
7c0fe22587de57a63b46c81d733f4b67844b6dec1a863601ac67e834a2512beb | obsidiansystems/rhyolite | Class.hs | {-| Description: Class for modal creators
A class for widget that can have modals. A concrete implementation is in
"Reflex.Dom.Modal.Base".
-}
{-# Language DefaultSignatures #-}
{-# Language FlexibleInstances #-}
# Language MultiParamTypeClasses #
{-# Language TypeFamilies #-}
module Reflex.Dom.Modal.Class where
imp... | null | https://raw.githubusercontent.com/obsidiansystems/rhyolite/cc1da4f8b8038f3d54e88246e2b69d5ed438782a/widgets/src/Reflex/Dom/Modal/Class.hs | haskell | | Description: Class for modal creators
A class for widget that can have modals. A concrete implementation is in
"Reflex.Dom.Modal.Base".
# Language DefaultSignatures #
# Language FlexibleInstances #
# Language TypeFamilies #
| The class of monads supporting a 'tellModal' operation which will open a modal
that sta... |
# Language MultiParamTypeClasses #
module Reflex.Dom.Modal.Class where
import Control.Monad.Reader (MonadReader (ask), ReaderT (..))
import Control.Monad.Trans (MonadTrans (lift))
import Obelisk.Route.Frontend (RoutedT, askRoute, runRoutedT)
import Reflex (Event, EventWriterT, Reflex)
class HasModal t m where
typ... |
4f5dfbb9e3beedfb0de214e777d7e218bb908a0587b082ee42c7b6f31cc6e708 | DrearyLisper/aoc-2021 | Day10.hs | module Day10 where
import Data.List
isOpenBracket :: Char -> Bool
isOpenBracket x = x `elem` ['(', '[', '{', '<']
isCloseBracket :: Char -> Bool
isCloseBracket x = x `elem` [')', ']', '}', '>']
leftBracket :: Char -> Char
leftBracket ')' = '('
leftBracket ']' = '['
leftBracket '}' = '{'
leftBracket '>' = '<'
right... | null | https://raw.githubusercontent.com/DrearyLisper/aoc-2021/e6e593750ccdfe920342d0216f7c7efc711b5396/10/Day10.hs | haskell | module Day10 where
import Data.List
isOpenBracket :: Char -> Bool
isOpenBracket x = x `elem` ['(', '[', '{', '<']
isCloseBracket :: Char -> Bool
isCloseBracket x = x `elem` [')', ']', '}', '>']
leftBracket :: Char -> Char
leftBracket ')' = '('
leftBracket ']' = '['
leftBracket '}' = '{'
leftBracket '>' = '<'
right... | |
36976e645dac10e1aa30e5f8268a4869b09e19fc01fb9f4047b9828c92221603 | felipereigosa/mock-mechanics | compiler.clj | (ns mockmechanics.core
(:require [clojure.set :refer [difference union map-invert]]
[mockmechanics.library.vector :as vector]))
(defn create-tab-instructions [writer tab part-name part seen-pins]
(let [connections (filter #(= (:tab (second %)) tab)
(:connections part))]
... | null | https://raw.githubusercontent.com/felipereigosa/mock-mechanics/93070a789f5b24a7b34643bc11f47f8cf6112f8d/src/mockmechanics/replayer/compiler.clj | clojure | (ns mockmechanics.core
(:require [clojure.set :refer [difference union map-invert]]
[mockmechanics.library.vector :as vector]))
(defn create-tab-instructions [writer tab part-name part seen-pins]
(let [connections (filter #(= (:tab (second %)) tab)
(:connections part))]
... | |
076fb85fe409f6e98c53def9b377cff54f6c00009a8acbebc766f6f3fec303a2 | jyh/metaprl | ma_decidable__equality.mli | extends Nuprl_decidable__equality
| null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/ma_decidable__equality.mli | ocaml | extends Nuprl_decidable__equality
| |
22bd8944a6320639d5611c510eab27fa8deefbb089968487a032e5f314055308 | reflectionalist/S9fES | time-ops.scm | Scheme 9 from Empty Space , Function Library
By , 2010
; Placed in the Public Domain
;
( time - add ) = = > list
( time - subtract ) = = > list
( time - difference ) = = > list
( time - before ? ) = = > boolean
( time - after ? ) = = > boolean
;
; (load-fro... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/ext/time-ops.scm | scheme | Placed in the Public Domain
(load-from-library "time-ops.scm")
details.
not matter, the difference is always positive.
==> #t | Scheme 9 from Empty Space , Function Library
By , 2010
( time - add ) = = > list
( time - subtract ) = = > list
( time - difference ) = = > list
( time - before ? ) = = > boolean
( time - after ? ) = = > boolean
TIME - ADD adds the < interval > LIST2 to t... |
5af7d27413a73bb4534f2affac54cc1343e6ff17a7efe42d8a06ff2baf0d5c9f | softwarelanguageslab/maf | R5RS_ad_all-5.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 1
* negated predicates : 1
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((bubble-sort (lambda (vector)
(letrec ((swap (lambda (vector index1 index2)
(let ((temp (vector-ref vector index1)))
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_ad_all-5.scm | scheme | Changes:
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 1
* swaps : 1
* negated predicates : 1
(letrec ((bubble-sort (lambda (vector)
(letrec ((swap (lambda (vector index1 index2)
(let ((temp (vector-ref vector index1)))
(vector-set! v... |
e9e13f6b1b6e2e7c9ae9ed1ec8a7b0023a4cdcd3af11b0d3498e112dc683690d | sbcl/sbcl | compiler.impure.lisp | ;;;; This file is for compiler tests which have side effects (e.g.
executing DEFUN ) but which do n't need any special side - effecting
environmental stuff ( e.g. DECLAIM of particular optimization
;;;; settings). Similar tests which *do* expect special settings may
be in files compiler-1.impure.lisp , compiler-2... | null | https://raw.githubusercontent.com/sbcl/sbcl/4415641bfecf3fc8a4aebe14ce2085687963a0f1/tests/compiler.impure.lisp | lisp | This file is for compiler tests which have side effects (e.g.
settings). Similar tests which *do* expect special settings may
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CR... | executing DEFUN ) but which do n't need any special side - effecting
environmental stuff ( e.g. DECLAIM of particular optimization
be in files compiler-1.impure.lisp , compiler-2.impure.lisp , etc .
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU ... |
2e05304b6023e41ebbc90bc376ac5c1ca9f0c6e10847b12b835dc38a72820f55 | Chadtech/elmish-wasm | Part.hs | module Part
( Part(..)
, read
, write
)
where
import Text.Regex.Posix
import Data.List.Split (splitOn)
import qualified Function
import Line (Line)
import qualified Line
import Result (Result(..), Problem(..))
import qualified Result
import Prelude hiding (read)
import qualified Util
import qualif... | null | https://raw.githubusercontent.com/Chadtech/elmish-wasm/001463453ffbc2a6bc21803b00b7ed242ad4ffbd/src/Part.hs | haskell | WRITE -- | module Part
( Part(..)
, read
, write
)
where
import Text.Regex.Posix
import Data.List.Split (splitOn)
import qualified Function
import Line (Line)
import qualified Line
import Result (Result(..), Problem(..))
import qualified Result
import Prelude hiding (read)
import qualified Util
import qualif... |
f64e75b694a765f1f9a935da14953ab121d0b0053fa44b813446995fd308a2c6 | monadbobo/ocaml-core | float.ml | open Sexplib.Std
open Bin_prot.Std
module Sexp = Sexplib.Sexp
module String = Core_string
open Core_printf
module T = struct
type t = float with sexp, bin_io
let compare (x : t) y = compare x y
let equal (x : t) y = x = y
let hash (x : t) = Hashtbl.hash_param 1 1 x
end
include T
type outer = t with bin_io,sex... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/float.ml | ocaml | alias for use by sub-modules
float too big to round reliably to int | open Sexplib.Std
open Bin_prot.Std
module Sexp = Sexplib.Sexp
module String = Core_string
open Core_printf
module T = struct
type t = float with sexp, bin_io
let compare (x : t) y = compare x y
let equal (x : t) y = x = y
let hash (x : t) = Hashtbl.hash_param 1 1 x
end
include T
let to_float x = x
let of_flo... |
5899823b304c649553ee44946793f2546ca743695f3d43d070e792fc31ab0e37 | pallix/tikkba | svgbrowser.clj | Copyright © 2010 Fraunhofer Gesellschaft
Licensed under the EPL V.1.0
(ns ^{:doc "This namespace wraps org.apache.batik.apps.svgbrowser.*
and provides helper functions"}
tikkba.apps.svgbrowser
(:use clojure.pprint)
(:require [tikkba.utils.dom :as dom])
(:import (javax.swing.undo AbstractUndoabl... | null | https://raw.githubusercontent.com/pallix/tikkba/86fda7f97c3b1ff835f02c2b1c0337f3e134fd2c/src/tikkba/apps/svgbrowser.clj | clojure |
helper functions
| Copyright © 2010 Fraunhofer Gesellschaft
Licensed under the EPL V.1.0
(ns ^{:doc "This namespace wraps org.apache.batik.apps.svgbrowser.*
and provides helper functions"}
tikkba.apps.svgbrowser
(:use clojure.pprint)
(:require [tikkba.utils.dom :as dom])
(:import (javax.swing.undo AbstractUndoabl... |
a76bc74d3429941f2a8af43d82198ace9bf16e7e6ec79f0ff29123a4e607fb78 | OCamlPro/liquidity | liquidFromMicheline.ml | (****************************************************************************)
(* Liquidity *)
(* *)
Copyright ( C ) 2017 - 2020 OCamlPro SAS
(* ... | null | https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/without-dune-network/liquidFromMicheline.ml | ocaml | **************************************************************************
Liquidity
... | Copyright ( C ) 2017 - 2020 OCamlPro SAS
it under the terms of the GNU General Public License as published by
... |
65bbd240c6073d0cd939562482fb109c3abe6c72797843635e8ac6c296354cf1 | walmartlabs/schematic | schematic.clj | Copyright ( c ) 2017 - present , Walmart Inc.
;;;
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, sof... | null | https://raw.githubusercontent.com/walmartlabs/schematic/9d2eb16eb3550f06d3030b3b0ff9d519b803f88a/src/com/walmartlabs/schematic.clj | clojure |
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 permiss... | Copyright ( c ) 2017 - present , Walmart Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.walmartlabs.schematic
(:require [clojure.pprint]
[com.stuartsierra.dependency :as dep]
[com.stuartsierra.component :as component]
[com.walmartlabs.schemat... |
faf51fa2c525b60df8f2eed00041f3736ecf059e350a048e377188aa4f63500e | gerritjvv/kafka-fast | response.clj | (ns kafka-clj.response
(:require [clojure.tools.logging :refer [info error]]
[kafka-clj.buff-utils :refer [read-short-string]])
(:import
[io.netty.buffer ByteBuf]
(java.io DataInputStream)))
(defrecord ResponseEnd [])
(defrecord ProduceResponse [correlation-id topic partition error-code offset]... | null | https://raw.githubusercontent.com/gerritjvv/kafka-fast/fd149d8744c8100b2a8f4d09f1a251812e7baf6a/kafka-clj/src/kafka_clj/response.clj | clojure | correlation id
broker array len
partition
error-code
offset
need to run doall to force strinct reading of the stream
otherwise flatten can cause out of order reads
need to use doall here otherwise flatten can cause out of order reads | (ns kafka-clj.response
(:require [clojure.tools.logging :refer [info error]]
[kafka-clj.buff-utils :refer [read-short-string]])
(:import
[io.netty.buffer ByteBuf]
(java.io DataInputStream)))
(defrecord ResponseEnd [])
(defrecord ProduceResponse [correlation-id topic partition error-code offset]... |
3a8f84f052caebc9881358c98ec427017058677f5e3b3725b91a40fbc270947f | ghcjs/ghcjs-dom | CSSStyleRule.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.CSSStyleRule
(js_setSelectorText, setSelectorText, js_getSelectorText,
getSelec... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/CSSStyleRule.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.CSSStyleRule
(js_setSelectorText, setSelectorText, js_getSelectorText,
getSelectorText, getSelectorTextUnsafe, getSelectorTextUnchecked,
js_getStyle, getStyle, CSSStyleRu... |
637ecff4bf0f951bce73e308d0f2c20b5107bb123be91ce8cba4545ea764b6ce | dfinity/motoko | escape.mli | (* This (or a type like this) could move into the IDL AST *)
type label = Nat of Lib.Uint32.t | Id of string
val escape : string -> string
val escape_num : Lib.Uint32.t -> string
val escape_method : Source.region -> string -> string
val unescape : string -> label
val unescape_hash : string -> Lib.Uint32.t
val unescape_... | null | https://raw.githubusercontent.com/dfinity/motoko/09056ec47f6b3e321b30e5b6229d7dab2e5f4257/src/idllib/escape.mli | ocaml | This (or a type like this) could move into the IDL AST | type label = Nat of Lib.Uint32.t | Id of string
val escape : string -> string
val escape_num : Lib.Uint32.t -> string
val escape_method : Source.region -> string -> string
val unescape : string -> label
val unescape_hash : string -> Lib.Uint32.t
val unescape_method : string -> string
val needs_candid_quote : string -> ... |
8c8dff780f22a5439a439f32d374929f0f871785184f572837fe7db0ce10d51d | vshaxe/hxparser | version.ml | let version_extra = None
| null | https://raw.githubusercontent.com/vshaxe/hxparser/8621d5e44805b6d664654d15737faf6a3a4a18fa/src/version.ml | ocaml | let version_extra = None
| |
1927852b31e7996a2142412652504c7575d62431dd388944d4d00e7faa2d20ba | ocaml-flambda/flambda-backend | flow_acc.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and ... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/92dbdba868235321a48916b8f1bb3f04ee884d3f/middle_end/flambda2/simplify/flow/flow_acc.mli | ocaml | ************************************************************************
OCaml
... | and , OCamlPro
Copyright 2021 - -2021 OCamlPro SAS
the GNU Lesser General Public License version 2.1 , with the
type t = Flow_types.Acc.t
val print : Format.formatter -> t -> unit
val extend_args_with_extra_args : t -> t
* A nam... |
38f6ba597af3dea9418c50a4cf0c65d5bcdbfe397ceeee0a36bd292fa6ee7249 | zkincaid/duet | expPolynomial.mli | (** Operations on exponential polynomials. Exponential-polynomials are
expressions of the form [E ::= x | lambda | lambda^x | E*E | E+E]
where [lambda] is a rational *)
open Syntax
type t
val pp : Format.formatter -> t -> unit
val show : t -> string
val equal : t -> t -> bool
val add : t -> t -> t
val mul : t... | null | https://raw.githubusercontent.com/zkincaid/duet/d204e01acc3662477abe664e8c24ce4e8abc73e9/srk/src/expPolynomial.mli | ocaml | * Operations on exponential polynomials. Exponential-polynomials are
expressions of the form [E ::= x | lambda | lambda^x | E*E | E+E]
where [lambda] is a rational
* [compose_left_affine f a b] computes the function [lambda x. f (ax + b)]
* [term_of srk t f] computes a term representing [f(t)].
* Vectors with ... | open Syntax
type t
val pp : Format.formatter -> t -> unit
val show : t -> string
val equal : t -> t -> bool
val add : t -> t -> t
val mul : t -> t -> t
val negate : t -> t
val zero : t
val one : t
val of_polynomial : Polynomial.QQX.t -> t
val of_exponential : QQ.t -> t
val scalar : QQ.t -> t
val scalar_mul : ... |
db1e52b4fd939b8175023e498a8865ff674792fbdd982f91dcf8d463e38aa429 | samrushing/irken-compiler | t_plat2.scm | ;; -*- Mode: Irken -*-
(include "lib/core.scm")
(include "lib/pair.scm")
(include "lib/posix.scm")
(uname)
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t_plat2.scm | scheme | -*- Mode: Irken -*- |
(include "lib/core.scm")
(include "lib/pair.scm")
(include "lib/posix.scm")
(uname)
|
e28293d6c0e2f298b7ac251d8b6a90efaa0949ee67032df714e0f6b6ebd1e7f7 | geophf/1HaskellADay | Connection.hs | module Store.SQL.Connection where
-
We 're basically rewriting Store . SQL.Connection . Good module , if you only have
one database to manage , but now I have multiple SQL databases , so I have to
make all these functions confirgurable .
-
We're basically rewriting Store.SQL.Connection. Good module, if you onl... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Store/SQL/Connection.hs | haskell | }
let's codify which databases we're talking about here:
these functions get your database's information from the environment
and with those we can do this:
and with that we can do this:
('cutesies' is a technical term) | module Store.SQL.Connection where
-
We 're basically rewriting Store . SQL.Connection . Good module , if you only have
one database to manage , but now I have multiple SQL databases , so I have to
make all these functions confirgurable .
-
We're basically rewriting Store.SQL.Connection. Good module, if you onl... |
45102edd5531c6ee848d9dd4cee006fc28d2f4cbcfd8345fbb3c09c2cbc787fc | heraldry/heraldicon | details.cljs | (ns heraldicon.frontend.library.arms.details
(:require
[cljs.core.async :refer [go]]
[com.wsscode.async.async-cljs :refer [<?]]
[heraldicon.config :as config]
[heraldicon.context :as c]
[heraldicon.entity.arms :as entity.arms]
[heraldicon.frontend.attribution :as attribution]
[heraldicon.frontend... | null | https://raw.githubusercontent.com/heraldry/heraldicon/7bf9a40f8bca8a3ea04cea7f57c52ae970ed0bb9/src/heraldicon/frontend/library/arms/details.cljs | clojure | (ns heraldicon.frontend.library.arms.details
(:require
[cljs.core.async :refer [go]]
[com.wsscode.async.async-cljs :refer [<?]]
[heraldicon.config :as config]
[heraldicon.context :as c]
[heraldicon.entity.arms :as entity.arms]
[heraldicon.frontend.attribution :as attribution]
[heraldicon.frontend... | |
a100373ef188430c7bbc7ef5bfb8a18be337c64f88a97d4be316f27be226cf90 | input-output-hk/rscoin-haskell | Gen.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
-- | Arbitrary instances for full testing.
module Test.RSCoin.Full.Gen
( genValidAction... | null | https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/test/Test/RSCoin/Full/Gen.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE Rank2Types #
# LANGUAGE ScopedTypeVariables #
| Arbitrary instances for full testing.
| Generate sequence of actions which can be applied to empty context
(created using mkTestContext) and are guaranteed to be executed
without fails. | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Test.RSCoin.Full.Gen
( genValidActions
) where
import Data.Bifunctor (first)
import Data.Either.Combinators (mapRight)
import qualified Data.Int... |
255c180553bc6ebc0794b4fd2e738961c829f8658687bd06f226d10f248c9789 | bwo/monads | test_state.clj | (ns monads.test-state
(:require [monads.core :refer :all]
[monads.types :as t :refer [fst snd]]
[monads.state :as s]
[monads.maybe :as m]
[monads.util :as u]
[expectations :refer [expect]]))
(defn when-state [pred action]
(mdo st <- get-state
(u/mw... | null | https://raw.githubusercontent.com/bwo/monads/a3fdfa1414dc6efae39ea289022f14449119da89/test/monads/test_state.clj | clojure | (ns monads.test-state
(:require [monads.core :refer :all]
[monads.types :as t :refer [fst snd]]
[monads.state :as s]
[monads.maybe :as m]
[monads.util :as u]
[expectations :refer [expect]]))
(defn when-state [pred action]
(mdo st <- get-state
(u/mw... | |
d520e8976a56647e560efe0f6e570adea2411ca5c7bdbf4986e9a4ecdadf307a | DavidAlphaFox/RabbitMQ | 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, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/src/file_handle_cache.erl | erlang | 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 /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
A File Handle C... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
174a7c296f6ecb572f4228046215c99c08055a2e7be5a9b6ab94b1c762164d42 | ubf/ubf | ubf_plugin_stateless.erl | %%% The MIT License
%%%
Copyright ( C ) 2011 - 2016 by < >
Copyright ( C ) 2002 by
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without li... | null | https://raw.githubusercontent.com/ubf/ubf/c876f684fbd4959548ace1eb1cfc91941f93d377/src/ubf_plugin_stateless.erl | erlang | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above... | Copyright ( C ) 2011 - 2016 by < >
Copyright ( C ) 2002 by
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
682ff222884eba94ded68de6d49694c0001a432e74dd737afcb9a7e2712b5cac | softwarelanguageslab/maf | R5RS_gabriel_puzzle-4.scm | ; Changes:
* removed : 2
* added : 11
* swaps : 7
* negated predicates : 1
* swapped branches : 4
* calls to i d fun : 11
(letrec ((my-iota (lambda (n)
@sensitivity:FA
(letrec ((__do_loop (lambda (n list)
@sensitivity:FA
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gabriel_puzzle-4.scm | scheme | Changes: | * removed : 2
* added : 11
* swaps : 7
* negated predicates : 1
* swapped branches : 4
* calls to i d fun : 11
(letrec ((my-iota (lambda (n)
@sensitivity:FA
(letrec ((__do_loop (lambda (n list)
@sensitivity:FA
... |
519ae0c2608902e7709c8e6023a8b9e5067e5f563af3979ffe7d46b2ff060688 | inria-parkas/sundialsml | upvseither.ml |
let root_dir = ref Sundials.RootDirs.Increasing
let args = [
("-e", Arg.Unit
(fun () -> root_dir := Sundials.RootDirs.IncreasingOrDecreasing),
"Use either instead of up()");
]
let _ = Arg.parse args
(fun _ -> ()) "upvseither: test different types of root detection"
(* indices *)
let x = 0
let x... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/0c46b0c6c067677af6ef8006260b9e697cc0562b/examples/ocaml/misc/upvseither.ml | ocaml | indices
simulation |
let root_dir = ref Sundials.RootDirs.Increasing
let args = [
("-e", Arg.Unit
(fun () -> root_dir := Sundials.RootDirs.IncreasingOrDecreasing),
"Use either instead of up()");
]
let _ = Arg.parse args
(fun _ -> ()) "upvseither: test different types of root detection"
let x = 0
let x_i = 1.0
let ... |
42e6eb111322f3916644d5ee2cbd3ff5362afe58b84260707ef711fce3c969dd | donut/OCamURL-server | delete.ml |
open Lib_model
open Lwt.Infix
open Util
let alias db_connect name =
let query = "DELETE FROM alias WHERE name = ? LIMIT 1" in
execute db_connect query [| `String name |] lwt_unit | null | https://raw.githubusercontent.com/donut/OCamURL-server/87738c1a0bbfc2c848f9f4e2052cacc81a176489/lib/db/delete.ml | ocaml |
open Lib_model
open Lwt.Infix
open Util
let alias db_connect name =
let query = "DELETE FROM alias WHERE name = ? LIMIT 1" in
execute db_connect query [| `String name |] lwt_unit | |
d22c1ec99e2c059753d3ba592eeed5434fef4799a3c5ff751ff0c4e9237e3370 | ocaml-ppx/ppx | hashable.ml | module type S = sig
type t
val equal : t -> t -> bool
val hash : t -> int
end
| null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/stdppx/hashable.ml | ocaml | module type S = sig
type t
val equal : t -> t -> bool
val hash : t -> int
end
| |
53a885ba552eee43b99ac13607cce9f5d8e32ad56475cdb7e0efc65eef8e7c4b | koto-bank/lbge | misc.lisp | (in-package :lbge.application)
;;; Engine supports a number of command line options you can
pass to the sbcl interpreter .
;;; --app-root - absolute path to the application root.
;;; Various components (e.g. asset facility) depend on it.
(defun get-arg-helper (arg args)
(if (or (null args)
(null (cdr ar... | null | https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/application/misc.lisp | lisp | Engine supports a number of command line options you can
--app-root - absolute path to the application root.
Various components (e.g. asset facility) depend on it. | (in-package :lbge.application)
pass to the sbcl interpreter .
(defun get-arg-helper (arg args)
(if (or (null args)
(null (cdr args)))
nil
(if (string= arg (car args))
(cadr args)
(get-arg-helper arg (cdr args)))))
(defun get-arg (arg)
"Find runtime option with name `arg'"
(get-a... |
63aac3f5e2ec5ab2fb0982e291640737e6572cab50b2a9d6aabef2949f737d7d | mhuebert/chia | core_test.cljs | (ns chia.db.core-test
(:require [cljs.test :refer-macros [deftest is testing]]
[chia.db.core :as d :include-macros true]
[chia.reactive :as r])
(:require-macros [chia.db.test-helpers :refer [throws]]))
(deftest basic
(let [db (d/create {})
tx-log (atom [])]
(is (satisfies? cl... | null | https://raw.githubusercontent.com/mhuebert/chia/74ee3ee9f86efbdf81d8829ab4f0a44d619c73d3/db/test/chia/db/core_test.cljs | clojure | cardinality single
cardinality many | (ns chia.db.core-test
(:require [cljs.test :refer-macros [deftest is testing]]
[chia.db.core :as d :include-macros true]
[chia.reactive :as r])
(:require-macros [chia.db.test-helpers :refer [throws]]))
(deftest basic
(let [db (d/create {})
tx-log (atom [])]
(is (satisfies? cl... |
01b7030f0845ffbf00202fd4852b73d8986c05996d39a94ae4cbd823d77f4edb | Gbury/dolmen | maps.ml |
module type S = Dolmen_intf.Map.S
module Make(Ord : Map.OrderedType) = struct
include Map.Make(Ord)
let find_exn = find
let find_opt k t =
match find k t with
| res -> Some res
| exception Not_found -> None
let find_add k f t =
update k (fun o -> Some (f o)) t
end
module Int = Make(Int)
... | null | https://raw.githubusercontent.com/Gbury/dolmen/21bfd8d221b39dfd72a7938a09a6b2ae85b3c391/src/standard/maps.ml | ocaml |
module type S = Dolmen_intf.Map.S
module Make(Ord : Map.OrderedType) = struct
include Map.Make(Ord)
let find_exn = find
let find_opt k t =
match find k t with
| res -> Some res
| exception Not_found -> None
let find_add k f t =
update k (fun o -> Some (f o)) t
end
module Int = Make(Int)
... | |
2d6de82661d81628acbe2f15c58c0fa3e467152feff4b10c3cb6eca3d8c4344b | michaelschade/hs-stripe | Card.hs | {-# LANGUAGE OverloadedStrings #-}
module Web.Stripe.Card
( Card(..)
, RequestCard(..)
, CardChecks(..)
, CardCheckResult(..)
, rCardKV
, deleteCard
) where
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mzero, liftM)
import Control.Mona... | null | https://raw.githubusercontent.com/michaelschade/hs-stripe/64b58415ccc567b00171b34470e93400cb9e79fd/src/Web/Stripe/Card.hs | haskell | # LANGUAGE OverloadedStrings #
| Represents a credit card in the Stripe system.
| Represents a credit car (with full details) that is used as input to the
Stripe API.
^ Highly recommended to supply
| Turns a 'RequestCard' into a list of key-value pairs that can be submitted
to the Stripe API in a query.
Requ... |
module Web.Stripe.Card
( Card(..)
, RequestCard(..)
, CardChecks(..)
, CardCheckResult(..)
, rCardKV
, deleteCard
) where
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mzero, liftM)
import Control.Monad.Error (MonadIO)
import ... |
dd93912aa1ad06dc23bcd902c378f24867cf6bc13b7fbdbdfdd42feda8d92068 | 8c6794b6/guile-tjit | runtime.scm |
Copyright ( C ) 2009 , 2010 , 2011 Free Software Foundation , Inc.
;;;
;;; This library 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... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/language/elisp/runtime.scm | scheme |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See... |
Copyright ( C ) 2009 , 2010 , 2011 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module (language elisp ... |
b918db2dae98595cadbb4e8223d49da8e1b439cdc8d1f768cf203cfb23ea7ae3 | jprupp/json-rpc | concurrent-client.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
import Control.Monad
import Control.Monad.Logger
import Data.Aeson
import Data.Aeson.Types hiding (Error)
import Data.Conduit.Network
import qualified Data.Foldable as F
import Data.... | null | https://raw.githubusercontent.com/jprupp/json-rpc/e143462dce04e380ddc53cf6c19e1fcc8a89440c/examples/concurrent-client.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
import Control.Monad
import Control.Monad.Logger
import Data.Aeson
import Data.Aeson.Types hiding (Error)
import Data.Conduit.Network
import qualified Data.Foldable as F
import Data.Maybe
import qualified Data.Text ... |
b6d3c02a6706889a46be776ee2b6a7ccf4b69bc0c520f3dcf86d2b0c69fc1095 | marcinjangrzybowski/cubeViz2 | ConcreteCell.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module ConcreteCell where
import Abstract
import Syntax
import Drawing.Base
import Drawing.Color
import Data.Maybe
import Data.Either
import Data.Function
import Control.Applicative
... | null | https://raw.githubusercontent.com/marcinjangrzybowski/cubeViz2/1fd14aba878a74a3ed45f48e6915ddfe4a1a822c/src/ConcreteCell.hs | haskell | primitivePieceLoop2Bd :: Bool -> (Float , Float) -> Piece -> [Smplx]
primitivePieceLoop2Bd mirror x y | (getDim y == 0) = []
| otherwise =
[ init (primitivePieceLoop2 mirror x y) , tail (primitivePieceLoop2 mirror x y) ]
(bdSmplxs, bdSmplxs2) = primitivePieceLoop2Bd undefined (par1Loop2 , pa... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module ConcreteCell where
import Abstract
import Syntax
import Drawing.Base
import Drawing.Color
import Data.Maybe
import Data.Either
import Data.Function
import Control.Applicative
... |
c337089c793f375a8a6597ca11084ee275f035398d513684400451a30a8e7cd8 | inhabitedtype/ocaml-aws | listInventoryEntries.mli | open Types
type input = ListInventoryEntriesRequest.t
type output = ListInventoryEntriesResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/listInventoryEntries.mli | ocaml | open Types
type input = ListInventoryEntriesRequest.t
type output = ListInventoryEntriesResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
a30f5a90e17c9852105e5e0a83bb4f878f9071799f81cfb9835ed0c3f2cfe877 | EveryTian/Haskell-Codewars | roman-numerals-encoder.hs | -numerals-encoder
module RomanNumerals where
import Data.Maybe (fromMaybe)
solution :: Integer -> String
solution = fromMaybe "" . numerals . fromIntegral
numerals :: Int -> Maybe String
numerals n
| n <= 0 || n > 3999 = Nothing
| n < 10 = Just $ numeral n 'I' 'V' 'X'
| n < 100 = Just $ numeral (n... | null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/4kyu/roman-numerals-encoder.hs | haskell | -numerals-encoder
module RomanNumerals where
import Data.Maybe (fromMaybe)
solution :: Integer -> String
solution = fromMaybe "" . numerals . fromIntegral
numerals :: Int -> Maybe String
numerals n
| n <= 0 || n > 3999 = Nothing
| n < 10 = Just $ numeral n 'I' 'V' 'X'
| n < 100 = Just $ numeral (n... | |
9d3c296db2a5822aa2b2ed3ff983b0062a1839b08ec668e8c2ebca6b01407c07 | seabre/inviteyoself | layout.clj | (ns inviteyoself.layout
(:require [selmer.parser :as parser]
[clojure.string :as s]
[ring.util.response :refer [content-type response]]
[compojure.response :refer [Renderable]]
[environ.core :refer [env]]))
(def template-path "templates/")
(deftype RenderableTemplate ... | null | https://raw.githubusercontent.com/seabre/inviteyoself/53356aa400384a0df38621a489fc2d94dfc15362/src/inviteyoself/layout.clj | clojure | If we're not inside a serlvet environment (for
example when using mock requests), then
.getContextPath might not exist | (ns inviteyoself.layout
(:require [selmer.parser :as parser]
[clojure.string :as s]
[ring.util.response :refer [content-type response]]
[compojure.response :refer [Renderable]]
[environ.core :refer [env]]))
(def template-path "templates/")
(deftype RenderableTemplate ... |
cf2b174ae7f229a3e98a1d94d47efd564f59177d103dc7d07201dbcdb5852705 | binsec/haunted | exploration_type.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
(* VERIMAG... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/dse/path_exploration/exploration_type.mli | ocaml | ************************************************************************
VERIMAG
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
Lesser General Public License as published by the Free Software
Foundation , version 2.1 .
See the GNU Le... |
83915249e443916c943b64d1708de08f08a3f2a37159554088b5d79f98e5d831 | YoshikuniJujo/test_haskell | Type.hs | module Gpu.Vulkan.Ext.DebugUtils.Messenger.Type where
import qualified Gpu.Vulkan.Ext.DebugUtils.Messenger.Middle as M
newtype M sm = M M.M deriving Show
| null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/12868ec17842d422a50b5329b37710550d42216a/themes/gui/vulkan/try-my-vulkan-snd/src/Gpu/Vulkan/Ext/DebugUtils/Messenger/Type.hs | haskell | module Gpu.Vulkan.Ext.DebugUtils.Messenger.Type where
import qualified Gpu.Vulkan.Ext.DebugUtils.Messenger.Middle as M
newtype M sm = M M.M deriving Show
| |
d0c817481aa14d4d5da38ab6ac7cae3e7e616f555a630a08b419b1389633fddb | achirkin/vulkan | Utils.hs | {-# LANGUAGE Strict #-}
module Lib.Utils
( VulkanException (..), handleAllErrors, throwingVK, throwVKMsg
, withCStringList
, asListVK
) where
import Control.Exception
import Control.Monad (when)
import Foreign.C.String
import Foreign.Marshal.Alloc
impo... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-examples/Lib/Utils.hs | haskell | # LANGUAGE Strict #
| Use this to throw all exceptions in this project
| Handle any error and return default value
| Throw VulkanException if something goes wrong
| Throw VulkanException without error code
| Use list of haskell strings as @Ptr CString@
| Get size of action output and then get the result,
perfo... | module Lib.Utils
( VulkanException (..), handleAllErrors, throwingVK, throwVKMsg
, withCStringList
, asListVK
) where
import Control.Exception
import Control.Monad (when)
import Foreign.C.String
import Foreign.Marshal.Alloc
import Foreign.Mar... |
7f62e15ebeacbdb90c796af1d42c08eca9e351057c25265ea325c08b9525bfbd | AdaCore/why3 | doc_html.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/src/why3doc/doc_html.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
open Format
val print_header : formatter -> ?title:string -> ?css:string -> unit -> unit
val print_footer ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.