_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 |
|---|---|---|---|---|---|---|---|---|
04fd66ef8be15179715459c3cc84561b67a775d026fa0b03f5900c51963eae9c | bmeurer/ocamljit2 | printf.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
and , projet Cris... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/stdlib/printf.mli | ocaml | *********************************************************************
Objective Caml
... | and , 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
$ Id$
val fprintf : out_channel -> ('a, out_c... |
b4d8580294d13dc4c8b868d8d63611889dc1ea6baf38b3d35e52cc697b439679 | ariesteam/aries | water_tanzania.clj | Copyright 2011 The ARIES Consortium ( )
;;;
;;; This file is part of ARIES.
;;;
;;; ARIES is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;; (at your option) any later... | null | https://raw.githubusercontent.com/ariesteam/aries/b3fafd4640f4e7950fff3791bc4ea4c06ee4dcdf/plugins/org.integratedmodelling.aries.core/models/water_tanzania.clj | clojure |
This file is part of ARIES.
ARIES is free software: you can redistribute it and/or modify it
(at your option) any later version.
ARIES is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ... | Copyright 2011 The ARIES Consortium ( )
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
Water supply model for the Great Ruaha River Basin , Tanzania
(ns co... |
1a02e006a93727301f62b9e8774c07a7e130fb35acb6c48bbe9b396d5722570c | uw-unsat/leanette-popl22-artifact | model-completion.rkt | #lang racket
(require
racket/hash
(only-in rosette terms constant? model sat)
(only-in rosette/base/core/type solvable-default get-type))
(provide complete)
; Returns a completion of the given solution that
; binds the provided constants to default concrete values.
; If no constants are provided, it uses the s... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-4/neutrons/therapyControl-symbolic/model-completion.rkt | racket | Returns a completion of the given solution that
binds the provided constants to default concrete values.
If no constants are provided, it uses the set of all constants
that are present in the current term-cache. | #lang racket
(require
racket/hash
(only-in rosette terms constant? model sat)
(only-in rosette/base/core/type solvable-default get-type))
(provide complete)
(define complete
(case-lambda
[(sol)
(complete sol (filter constant? (terms)))]
[(sol consts)
(match sol
[(model bindings)
... |
fc594c8c314d4b806fb6e53cfa5f758a1efca1005b0676e578bdadcee307c472 | igorhvr/bedlam | srfi-18.scm | ; SISC implementation of SRFI-18
;
; Compliance issues:
; thread-terminate!,
; relies on interrupts to be enabled (using the sisc.interrupts
; system property)
;
Time objects
(define (time->seconds to) (time-second to))
(define (seconds->time seconds) (make-time time-utc 0 seconds))
(define (time->ms to)
(cond [... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-cvs/src/sisc/modules/srfi/srfi-18.scm | scheme | SISC implementation of SRFI-18
Compliance issues:
thread-terminate!,
relies on interrupts to be enabled (using the sisc.interrupts
system property)
Threading
Condition Variables
Threading |
Time objects
(define (time->seconds to) (time-second to))
(define (seconds->time seconds) (make-time time-utc 0 seconds))
(define (time->ms to)
(cond [(number? to) (inexact->exact (* 1000 to))]
[(time? to) (+ (* (time-second to) 1000)
(quotient (time-nanosecond to) 1000))]
[... |
6dad6c159445d18d1e192ed9e2a503ba8d42b8a2c7a355170561dbec79f29aa8 | cassiel/thi-ng-geom-starter | server.clj | (ns thi-ng-geom-starter.server
(:require [clojure.java.io :as io]
[compojure.core :refer [ANY GET PUT POST DELETE defroutes]]
[compojure.route :refer [resources]]
[ring.middleware.defaults :refer [wrap-defaults api-defaults]]
[ring.middleware.gzip :refer [wrap-gzip]]
... | null | https://raw.githubusercontent.com/cassiel/thi-ng-geom-starter/f32a8a195f1b95da5e4e44228174b8db8a26fb87/src/clj/thi_ng_geom_starter/server.clj | clojure | (ns thi-ng-geom-starter.server
(:require [clojure.java.io :as io]
[compojure.core :refer [ANY GET PUT POST DELETE defroutes]]
[compojure.route :refer [resources]]
[ring.middleware.defaults :refer [wrap-defaults api-defaults]]
[ring.middleware.gzip :refer [wrap-gzip]]
... | |
2e345455371769d538197ebce2aee3e3e0e31941388df953e3a842077c0fc369 | tanders/cluster-engine | 06.heuristic-rules-interface.lisp | (in-package cluster-engine)
(defclass heuristic-rule ()
((layer :type array :initform (make-array 1) :reader get-heuristic-rule :writer set-heuristic-rule)))
(defun make-heuristic-rule-instance (hrule-vector)
(let ((this-instance (make-instance 'heuristic-rule)))
(set-heuristic-rule hrule-vector this-instance... | null | https://raw.githubusercontent.com/tanders/cluster-engine/064ad4fd107f8d9a3dfcaf260524c2ab034c6d3f/sources/06.heuristic-rules-interface.lisp | lisp | remove locked engines from backtrack routes from rules
calculate how many rules in each engine
-----------------
create heuristic-rule array
fill rule array
metric engine
all other cases
set metric grid
set beat structure
rhythm engine
set onsets
I think the append is not necessary
set notecount
all other cases
set... | (in-package cluster-engine)
(defclass heuristic-rule ()
((layer :type array :initform (make-array 1) :reader get-heuristic-rule :writer set-heuristic-rule)))
(defun make-heuristic-rule-instance (hrule-vector)
(let ((this-instance (make-instance 'heuristic-rule)))
(set-heuristic-rule hrule-vector this-instance... |
acca5504afa6cbb7ba633a718e84252549122815b907857f36a36a8157e14769 | tonyg/kali-scheme | env.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
; Accessing packages
(define (environment-ref package name)
(carefully (package-lookup package name)
(lambda (loc)
(if (location-assigned? loc)
(contents loc)
(error "u... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/rts/env.scm | scheme | Accessing packages
Interaction environment
Scheme report environment. Should be read-only; fix later.
A cheat.
Make an infinite tower of packages for syntax.
structs should be a non-null list of structures that should be
opened at EVERY level of the tower.
(set-reflective-tower-maker! p (lambda (clauses id) ..... | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
(define (environment-ref package name)
(carefully (package-lookup package name)
(lambda (loc)
(if (location-assigned? loc)
(contents loc)
(error "uninitialized variable... |
666143f9b80c561ca1fafd1d4c58c6a5f3d6e7ef519eb0d7d688ca34911e7651 | jjmeyer0/gt | suggest-syntax-bug3.ml | (* auto-generated by gt *)
open Bug3_util;;
type dummy = Dummy
and deref = | Deref of pd * deref_deref_id0 * string
and deref_deref_id0 = pd * ( string) list;;
pd stands for pos ( position ) and extradata
let rec dummy () = ()
and pd_deref : deref -> pd = function
| Deref (d,_,_) -> d
and pd_deref_deref_id0 ... | null | https://raw.githubusercontent.com/jjmeyer0/gt/c0c7febc2e3fd532d44617f663b224cc0b9c7cf2/tests/suggest-syntax-bug3.ml | ocaml | auto-generated by gt |
open Bug3_util;;
type dummy = Dummy
and deref = | Deref of pd * deref_deref_id0 * string
and deref_deref_id0 = pd * ( string) list;;
pd stands for pos ( position ) and extradata
let rec dummy () = ()
and pd_deref : deref -> pd = function
| Deref (d,_,_) -> d
and pd_deref_deref_id0 : deref_deref_id0 -> pd = f... |
ba50a356b6c7b9e4f657d139545f746465d46a669318659a169c8d65d4d80c42 | heyoka/faxe | esp_sum.erl | Date : 09.12.16 - 18:02
Ⓒ 2016 heyoka
-module(esp_sum).
-author("Alexander Minichmair").
-behavior(esp_stats).
%% API
-export([execute/2, options/0]).
options() ->
esp_stats:get_options() ++ [{module, atom, ?MODULE}].
execute({_Tss, Values}, _Opts) ->
lager:debug("execute with: ~p",[Values]),
{first, l... | null | https://raw.githubusercontent.com/heyoka/faxe/e539afe8b62790a6037914751deef7d815be11a2/apps/faxe/src/components/stats/esp_sum.erl | erlang | API
basic_test() ->
?assertEqual(22, execute([10,2,2,2,6])). | Date : 09.12.16 - 18:02
Ⓒ 2016 heyoka
-module(esp_sum).
-author("Alexander Minichmair").
-behavior(esp_stats).
-export([execute/2, options/0]).
options() ->
esp_stats:get_options() ++ [{module, atom, ?MODULE}].
execute({_Tss, Values}, _Opts) ->
lager:debug("execute with: ~p",[Values]),
{first, lists:su... |
5629017c63bad3110868f3bce761f64e520174338440c5429341940ca8010534 | TheClimateCorporation/boomhauer | speechlet_request_handler_test.clj | (ns com.climate.boomhauer.speechlet-request-handler-test
(:use [clojure.test])
(:import [com.climate.boomhauer BoomhauerSpeechletRequestHandler]))
(deftest implementation
(testing "does it construct properly"
(is (not (nil? (BoomhauerSpeechletRequestHandler.))))))
| null | https://raw.githubusercontent.com/TheClimateCorporation/boomhauer/b42a8ee43d51d5deded0145ec19634e222a11d78/src/test/clojure/com/climate/boomhauer/speechlet_request_handler_test.clj | clojure | (ns com.climate.boomhauer.speechlet-request-handler-test
(:use [clojure.test])
(:import [com.climate.boomhauer BoomhauerSpeechletRequestHandler]))
(deftest implementation
(testing "does it construct properly"
(is (not (nil? (BoomhauerSpeechletRequestHandler.))))))
| |
cee4801601d71bcef97a2c735b21b9a18f5dc9251f193b15b40d29863569ec48 | kupl/VeriSmart-public | leaking.ml | open Query
open Lang
open Vlang
open Report
open Global
open Semantics
safety condition : @TU[rcv ] \/ @Invested[rcv ] > = eth to be sent
let collect_queries : vformula -> Path.t -> stmt -> query list
= fun vf path stmt ->
match stmt with
| Call (lvop,Lv (MemberAccess (e,fname,_,_)),args,_,_,loc,_)
when is_... | null | https://raw.githubusercontent.com/kupl/VeriSmart-public/99be7ba88b61994f1ed4c0d3a8e6a6db0f790431/src/checker/leaking.ml | ocaml | open Query
open Lang
open Vlang
open Report
open Global
open Semantics
safety condition : @TU[rcv ] \/ @Invested[rcv ] > = eth to be sent
let collect_queries : vformula -> Path.t -> stmt -> query list
= fun vf path stmt ->
match stmt with
| Call (lvop,Lv (MemberAccess (e,fname,_,_)),args,_,_,loc,_)
when is_... | |
8bebec5f92cb31dc35f4580a12f3c5d9629226659ecca6da62f085fc7809904f | zack-bitcoin/verkle | ed25519.erl | -module(ed25519).
this version is in erlang for testing and documentation purposes .
-export([
using integers in a finite field
fsqrt/1, fadd/2, fsub/2, fmul/2, finv/1,
fneg/1,
fgen_point/0,
fencode_point/1,%to32 byte format
fdecode_point/1,
faffine2extended/1,
... | null | https://raw.githubusercontent.com/zack-bitcoin/verkle/f6a2f7d4783532d094fa358bdddabb2ce04181d7/src/crypto/ed25519.erl | erlang | to32 byte format
montgomery encoded version
-on_load(init/0).
defined in C.
finite field the curve is defined over
this is how many points exist on the curve.
-(121665/121666)
generator point.
sqrt -1
B = feq(P, ?faffine_zero),
B = fis_affine_zero(P),
if
B -> ?fzero_point;
true ->
end;
io:fwrite("f is affine z... | -module(ed25519).
this version is in erlang for testing and documentation purposes .
-export([
using integers in a finite field
fsqrt/1, fadd/2, fsub/2, fmul/2, finv/1,
fneg/1,
fgen_point/0,
fdecode_point/1,
faffine2extended/1,
fextended2affine_batch/1,
... |
35e8651117369330fa00c71e1532b3ae3f4e5d7fd4092953b43365c5357a3e6b | DavidAlphaFox/RabbitMQ | rabbit_event.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/rabbit_event.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.
----------------... | 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... |
03403b869637e8ebb83fe96e4886be229437e31ffd6b92ab2bbc0516ba958817 | ghc/packages-haskeline | Internal.hs | module System.Console.Haskeline.Internal
( debugTerminalKeys ) where
import System.Console.Haskeline (defaultSettings, outputStrLn)
import System.Console.Haskeline.Command
import System.Console.Haskeline.InputT
import System.Console.Haskeline.LineState
import System.Console.Haskeline.Monads
import System.Console.H... | null | https://raw.githubusercontent.com/ghc/packages-haskeline/5f16b76168f13c6413413386efc44fb1152048d5/System/Console/Haskeline/Internal.hs | haskell |
It loops indefinitely; every time a key is pressed, it will
Pressing Ctrl-C will stop the loop.
file. For details, see: <>
| module System.Console.Haskeline.Internal
( debugTerminalKeys ) where
import System.Console.Haskeline (defaultSettings, outputStrLn)
import System.Console.Haskeline.Command
import System.Console.Haskeline.InputT
import System.Console.Haskeline.LineState
import System.Console.Haskeline.Monads
import System.Console.H... |
af395eb999bd34c1c51164c1b06f84a34f83c8d646b4519392d893f69a11807a | nuprl/gradual-typing-performance | manual-class.rkt | #lang scheme/base
(require "../decode.rkt"
"../struct.rkt"
"../scheme.rkt"
"../search.rkt"
"../basic.rkt"
"../manual-struct.rkt"
"qsloc.rkt"
scheme/serialize
scheme/stxparam
"manual-utils.rkt"
"manual-style.rkt"
"manual-s... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/scribble-lib/scribble/private/manual-class.rkt | racket | #lang scheme/base
(require "../decode.rkt"
"../struct.rkt"
"../scheme.rkt"
"../search.rkt"
"../basic.rkt"
"../manual-struct.rkt"
"qsloc.rkt"
scheme/serialize
scheme/stxparam
"manual-utils.rkt"
"manual-style.rkt"
"manual-s... | |
7611664bd26507ae78b84eee11facd171a56c13c90be13cd6b8ae71b7de5e499 | ksrky/Plato | Bundle.hs | # LANGUAGE TupleSections #
module Plato.Typing.Bundle where
import Plato.Syntax.Typing
import Plato.Types.Error
import Plato.Types.Location
import Plato.Types.Name
import Plato.Types.Name.Global
import Control.Exception.Safe
import Control.Monad.Reader
tmp : ( ModuleName , Level )
mkValue :: MonadThrow m => GlbNam... | null | https://raw.githubusercontent.com/ksrky/Plato/02b1a043efa92cf2093ff7d721a607d8abe9d876/src/Plato/Typing/Bundle.hs | haskell | tmp: Local
| Renaming | # LANGUAGE TupleSections #
module Plato.Typing.Bundle where
import Plato.Syntax.Typing
import Plato.Types.Error
import Plato.Types.Location
import Plato.Types.Name
import Plato.Types.Name.Global
import Control.Exception.Safe
import Control.Monad.Reader
tmp : ( ModuleName , Level )
mkValue :: MonadThrow m => GlbNam... |
b8eb23c028e476c592b94b6cbe1893bd6deff71fd2b2006bd91298856ebfa654 | yetibot/yetibot | weather.clj | (ns yetibot.commands.weather
(:require
[clojure.spec.alpha :as s]
[clj-http.client :as http.client]
[taoensso.timbre :refer [info warn error]]
[yetibot.core.config :refer [get-config]]
[yetibot.core.hooks :refer [cmd-hook]]
[yetibot.models.postal-code :refer [chk-postal-code]]
[yetibot.com... | null | https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/weather.clj | clojure | (ns yetibot.commands.weather
(:require
[clojure.spec.alpha :as s]
[clj-http.client :as http.client]
[taoensso.timbre :refer [info warn error]]
[yetibot.core.config :refer [get-config]]
[yetibot.core.hooks :refer [cmd-hook]]
[yetibot.models.postal-code :refer [chk-postal-code]]
[yetibot.com... | |
5c845bfb04fc83d1c8fe7ec43a967e2280aecc03aac53659deb26722a3dfbd34 | maximedenes/native-coq | tactic_option.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/tactics/tactic_option.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
put
get
print | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Proof_type
open Tacexpr
... |
5d218ce1be5101e11516b8ad19d0dc5f8d74d4d11a1ff455f49ddd77725beb93 | mikeflynn/gmail-clj | core.clj | (ns gmail-clj.core
(:require [org.httpkit.client :as http]
[cheshire.core :as json]
[clojure.walk :as walk]
[clojure.data.codec.base64 :as b64])
(:import (javax.mail Session Address Message Message$RecipientType)
(javax.mail.internet MimeMessage InternetAddress)
... | null | https://raw.githubusercontent.com/mikeflynn/gmail-clj/70b3fef5ef3518cc2623b22adc75c33ab89cb86b/src/gmail_clj/core.clj | clojure | (.addRecipient Message$RecipientType/BCC (address (:bcc msg)))
Users.messages
Users.threads | (ns gmail-clj.core
(:require [org.httpkit.client :as http]
[cheshire.core :as json]
[clojure.walk :as walk]
[clojure.data.codec.base64 :as b64])
(:import (javax.mail Session Address Message Message$RecipientType)
(javax.mail.internet MimeMessage InternetAddress)
... |
2489c6a69b955747b6aee8e37a974f5e3000981a94fc5a2a6889ce12f3aec9b9 | bwo/monads | cont.clj | (ns monads.cont
(:require [monads.core :refer :all]
[monads.types :as types :refer [if-instance cond-instance]])
(:use [monads.util :only [curryfn]])
(:import [monads.types Returned Mplus Bind]))
(set! *warn-on-reflection* true)
(deftype C [v c]
Object
(toString [this]
(with-out-str (print [... | null | https://raw.githubusercontent.com/bwo/monads/a3fdfa1414dc6efae39ea289022f14449119da89/src/monads/cont.clj | clojure | after
this reorg-plus is here in case we fall through reorg-binds right
away. We can't call reorg-plus in reorg-binds in the else branch
overflows. | (ns monads.cont
(:require [monads.core :refer :all]
[monads.types :as types :refer [if-instance cond-instance]])
(:use [monads.util :only [curryfn]])
(:import [monads.types Returned Mplus Bind]))
(set! *warn-on-reflection* true)
(deftype C [v c]
Object
(toString [this]
(with-out-str (print [... |
767b3514929ec321ac7484abcd0fc3b0ef1ef3efc84774d0aab1dba4a6050752 | erlangonrails/devdb | learner.erl | @copyright 2009 , 2010 fuer Informationstechnik Berlin ,
onScale solutions GmbH
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/paxos/learner.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | @copyright 2009 , 2010 fuer Informationstechnik Berlin ,
onScale solutions GmbH
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc Part of a generic Paxos - Consensus implem... |
ee5e7204e1ae5e34a49feb7d6d695cadb823c920bc21e8d127c2cc5b379f9934 | wargrey/w3s | xml.rkt | #lang typed/racket/base
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; / ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(provide (all-defin... | null | https://raw.githubusercontent.com/wargrey/w3s/ce6ef2f019b32be6b458cfd8aca2b48ecbf7a5b5/sgml/xml.rkt | racket |
/ ;;;
| #lang typed/racket/base
(provide (all-defined-out) (all-from-out "dtd.rkt" "xexpr.rkt"))
(provide (all-from-out "digitama/namespace.rkt" "digitama/whitespace.rkt" "digitama/datatype.rkt"))
(provide XML-DTD xml-load-relative-system-entity)
(provide (struct-out XML-Document) read-xml-document xml-document-normalize xml... |
3231f2d487dceaa09f850236f053cadc717187186db5d18f9edcf299e273a7fe | blancas/eisen | trans.clj | Copyright ( c ) 2013 . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; ... | null | https://raw.githubusercontent.com/blancas/eisen/ec44756b5653c108647215cb56f2fa01a71fd0f0/src/main/clojure/blancas/eisen/trans.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
+--... | Copyright ( c ) 2013 . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns ^{:doc "The Eisen Translator."
:author "Armando Blancas"}
blancas.eisen.trans
(:use [clojure.set :only (difference)]
[blancas.morph.core :only (monad seqm)]
[blancas.morph.monads :only (either)]
[blancas.... |
f5b94669c48fe0941c0e7a57037e7bea201415c61f74ae2732274ea114670b58 | statebox/cql | Mapping.hs |
SPDX - License - Identifier : AGPL-3.0 - only
This file is part of ` statebox / cql ` , the categorical query language .
Copyright ( C ) 2019 <
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free So... | null | https://raw.githubusercontent.com/statebox/cql/b155e737ef4977ec753e44790f236686ff6a4558/src/Language/CQL/Mapping.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE ExplicitForAll #
# LANGUAGE FlexibleContexts #
# LANGUAGE ImpredicativeTypes #
# LANGUAGE LiberalTypeSynonyms #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
# LAN... |
SPDX - License - Identifier : AGPL-3.0 - only
This file is part of ` statebox / cql ` , the categorical query language .
Copyright ( C ) 2019 <
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free So... |
357dc00e3a57d009a3270a1d35eb73b07e2c3d9129b0e45cabdcc553c0214d4c | rowangithub/DOrder | seq4.ml | let rec loopa i k n =
if i < n then loopa (i+1) (k+1) n
else k
let rec loopb i k n =
if i < n then (assert (k > 0); loopb (i+1) (k-1)) n
else k
let rec loopc i k n =
if i < n then (loopc (i+1) (k-1) n)
else ()
let main n m =
let i = 0 in
let k = 0 in
let k = loopa i k n in
let k = loopa i k m in
... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/invgen/seq4.ml | ocaml | let rec loopa i k n =
if i < n then loopa (i+1) (k+1) n
else k
let rec loopb i k n =
if i < n then (assert (k > 0); loopb (i+1) (k-1)) n
else k
let rec loopc i k n =
if i < n then (loopc (i+1) (k-1) n)
else ()
let main n m =
let i = 0 in
let k = 0 in
let k = loopa i k n in
let k = loopa i k m in
... | |
8d8ccdc717a5810d09d886faad41fe7e4261fe923c4dd8f66afd98708ba2eb14 | pawurb/haskell-pg-extras | AllLocks.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module PGExtras.Queries.AllLocks (allLocksSQL, displayAllLocks) where
import PGExtras.Helpers (maybeText, maybeInt, maybeBool, maybeZonedTime)
import Database.PostgreSQL.Simple
import Text.RawString.QQ
import qualified Data.Text as Text
import Data.Time (Zon... | null | https://raw.githubusercontent.com/pawurb/haskell-pg-extras/1cddde5f784c6fa2286dd0090389237925918bd8/src/PGExtras/Queries/AllLocks.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
module PGExtras.Queries.AllLocks (allLocksSQL, displayAllLocks) where
import PGExtras.Helpers (maybeText, maybeInt, maybeBool, maybeZonedTime)
import Database.PostgreSQL.Simple
import Text.RawString.QQ
import qualified Data.Text as Text
import Data.Time (ZonedTime)
import Control.Monad (forM_... |
8d0793311d139592f72debe29d9d8a0ffea9d433e768ad746af68a2c7d515d98 | henryw374/tools.jvm | jvm.clj | (ns com.widdindustries.tools.jvm
(:require [clojure.stacktrace :as stck])
(:import (java.lang.management ManagementFactory
ClassLoadingMXBean
BufferPoolMXBean
MemoryType
MemoryPoolMXBe... | null | https://raw.githubusercontent.com/henryw374/tools.jvm/9b884a17957b06654b61c426feb7788511891f31/src/com/widdindustries/tools/jvm.clj | clojure | (ns com.widdindustries.tools.jvm
(:require [clojure.stacktrace :as stck])
(:import (java.lang.management ManagementFactory
ClassLoadingMXBean
BufferPoolMXBean
MemoryType
MemoryPoolMXBe... | |
61a8649ce5796ce291d3fd8945a95542787c9d1a3731ea3b11c3df9c9fc8076c | wireapp/wire-server | Auth.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE NumericUnderscores #
# OPTIONS_GHC -Wno - incomplete - patterns #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribu... | null | https://raw.githubusercontent.com/wireapp/wire-server/e3c199f2583de7b8b5e61a10c8185c21d2a7da91/services/brig/test/integration/API/User/Auth.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE NumericUnderscores #
# OPTIONS_GHC -Wno - incomplete - patterns #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either versi... |
5cc1c640be9df3f7d08cb4a758dfa46e96c5c49c1d403a58e9af39eafab74038 | kit-ty-kate/visitors | VisitorsRuntime.ml | (* This file provides useful / reasonable visitor methods for many of the
built-in types of OCaml. *)
(* The classes defined in this file are automatically inherited by
auto-generated visitors. If this is not desired, this behavior can be
turned off at generation time by specifying [nude = true]. *)
(* Some ... | null | https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/runtime/VisitorsRuntime.ml | ocaml | This file provides useful / reasonable visitor methods for many of the
built-in types of OCaml.
The classes defined in this file are automatically inherited by
auto-generated visitors. If this is not desired, this behavior can be
turned off at generation time by specifying [nude = true].
Some of the code ... |
For compatibility with OCaml 4.02 , we take the type [ ( ' a , ' b ) result ] from
the package [ result ] . This type appeared in the standard library in OCaml
4.03 .
the package [result]. This type appeared in the standard library in OCaml
4.03. *)
open Result
let rec array_equal eq i n xs1 x... |
7eb747abfa0c2ab27d5af9e14aa51e031bb49630543d4e3f9b0f8b83cdceaedd | kana/sicp | ex-3.55.scm | Exercise 3.55 . Define a procedure partial - sums that takes as argument
a stream S and returns the stream whose elements are S0 , S0 + S1 , S0 + S1
+ S2 , .... For example , ( partial - sums integers ) should be the stream 1 , 3 ,
6 , 10 , 15 , ....
(define (partial-sums s)
(if (stream-null? s)
0
... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-3.55.scm | scheme | Exercise 3.55 . Define a procedure partial - sums that takes as argument
a stream S and returns the stream whose elements are S0 , S0 + S1 , S0 + S1
+ S2 , .... For example , ( partial - sums integers ) should be the stream 1 , 3 ,
6 , 10 , 15 , ....
(define (partial-sums s)
(if (stream-null? s)
0
... | |
48cdcb482493a73c10f3434fff2a5bfb49748ec5684cc4c035c64a96a32c8b37 | roswell/roswell | install-asdf.lisp | (roswell:include "list-asdf")
(defpackage :roswell.install.asdf
(:use :cl :roswell.install :roswell.util :roswell.list.asdf :roswell.locations))
(in-package :roswell.install.asdf)
(defun help (argv)
(format *error-output* "no options for asdf~%")
(cons t argv))
(defun asdf-install (argv)
(let* ((version (getf... | null | https://raw.githubusercontent.com/roswell/roswell/bdc4a133ce1d621ba9f1c62d7130eec37422256b/lisp/install-asdf.lisp | lisp | (roswell:include "list-asdf")
(defpackage :roswell.install.asdf
(:use :cl :roswell.install :roswell.util :roswell.list.asdf :roswell.locations))
(in-package :roswell.install.asdf)
(defun help (argv)
(format *error-output* "no options for asdf~%")
(cons t argv))
(defun asdf-install (argv)
(let* ((version (getf... | |
2885c69ecb51156907ac68fcffdc19ba3ffc0822eaa2d0af55d89ea00bc274a5 | racket/typed-racket | with-syntax.rkt | #lang typed/racket/shallow
(require racket/syntax)
(: f : -> (Syntaxof Any))
(define (f)
(with-syntax* ([(x ...) (list 1 2 3)])
#`(#,(syntax +) x ...)))
| null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/with-syntax.rkt | racket | #lang typed/racket/shallow
(require racket/syntax)
(: f : -> (Syntaxof Any))
(define (f)
(with-syntax* ([(x ...) (list 1 2 3)])
#`(#,(syntax +) x ...)))
| |
b6441914af9a69128318a100f5efe04a4a1c25f862801bc9aa1b24c96356e081 | roman/TicTacToe | Tests.hs | module Controller.Tests
(
tests
)
where
import Control.Monad (forM)
import Test.Framework (Test)
import Test.Framework.Providers.HUnit (testCase)
import Test.HUnit (assertEqual, assertBool)
import Prelude hiding (Left, Right)
import Model.Matrix
import Internal.Controller
tests :: [Test]
tests = [
... | null | https://raw.githubusercontent.com/roman/TicTacToe/3e8b4b35e7da25ee8b83fe26268fe356aeb94791/tests/suite/Controller/Tests.hs | haskell | X
O
X
O
X | module Controller.Tests
(
tests
)
where
import Control.Monad (forM)
import Test.Framework (Test)
import Test.Framework.Providers.HUnit (testCase)
import Test.HUnit (assertEqual, assertBool)
import Prelude hiding (Left, Right)
import Model.Matrix
import Internal.Controller
tests :: [Test]
tests = [
... |
353d0d90ac403abb1bcce2cc4af48138ebb84598ba784a284c64f1b38dbe84f2 | okuoku/nausicaa | compile-all.ikarus.sps | ;;;
Part of : / Zlib
Contents : compile script for Ikarus Scheme
;;;Date: Wed Dec 31, 2008
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2008 - 2010 < >
;;;
;;;This program is free software: you can redistribute it and/or modify
;;;it under the terms of the GNU General Public License as published by
the Free Softwa... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/zlib/src/libraries/compile-all.ikarus.sps | scheme |
Date: Wed Dec 31, 2008
Abstract
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without eve... | Part of : / Zlib
Contents : compile script for Ikarus Scheme
Copyright ( c ) 2008 - 2010 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public License
(import
(only (compression zl... |
1402764657802657d76394f09cc89c1fb448cebee73519c7b01c63b1262ad0d0 | haas/harmtrace | Parser.hs | {-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
# LANGUAGE OverlappingInstances #
{-# LANGUAGE ScopedTypeVariables #-}
---------------------------------------------... | null | https://raw.githubusercontent.com/haas/harmtrace/e250855a3bb6e5b28fe538c728f707cf82ca9fd3/src/HarmTrace/Models/Parser.hs | haskell | # LANGUAGE TypeOperators #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
------------------------------------------------------------------------------
|
License : GPL3
Stability : experimental
Portab... | # LANGUAGE FlexibleInstances #
# LANGUAGE OverlappingInstances #
Module : HarmTrace . Models . Parser
Copyright : ( c ) 2010 - 2012 Universiteit Utrecht , 2012 University of Oxford
Maintainer : ,
module HarmTrace.Models.Parser (
ParseG (..)
... |
e24a646187942ce4d920a89b69fa5d4d9bf49a023779882fab4468fe407119b3 | charlesetc/feather | example.ml | open! Base
open! Stdio
open Feather
open Feather.Infix
let __ () =
cat "dune" |. rg "feather" |> stdout_to_stderr |. echo "hi" |. sort
> "/tmp/out" |. uniq |. rg "h" |> run
let __ () =
match ls "." < devnull |> fzf with
| Some s -> printf "hi there: %s\n" s
| None -> printf "got nothing\n"
let __ () = proc... | null | https://raw.githubusercontent.com/charlesetc/feather/17a22dbc2414be12973d6d2d0246a2cdec28d400/example/example.ml | ocaml | open! Base
open! Stdio
open Feather
open Feather.Infix
let __ () =
cat "dune" |. rg "feather" |> stdout_to_stderr |. echo "hi" |. sort
> "/tmp/out" |. uniq |. rg "h" |> run
let __ () =
match ls "." < devnull |> fzf with
| Some s -> printf "hi there: %s\n" s
| None -> printf "got nothing\n"
let __ () = proc... | |
a19b36376d3c7f32ece5c5858e0896e246abf1bbac445564bdcedb45e7ae9ee1 | intermine/bluegenes-old | handler.clj | (ns bluegenes.handler
(:use ring.middleware.json
[taoensso.timbre :only (info debug)])
(:require [compojure.core :refer [GET defroutes context]]
[compojure.handler :as handler]
[ring.util.response :refer [file-response response]]
[ring.middleware.resource :refer [wrap-res... | null | https://raw.githubusercontent.com/intermine/bluegenes-old/5b719c7ac83a7340e0ff65790cf42413c15fb7e9/src/clj/bluegenes/handler.clj | clojure | Disabling database connection for now.
(mount/start)
wrap-log-request | (ns bluegenes.handler
(:use ring.middleware.json
[taoensso.timbre :only (info debug)])
(:require [compojure.core :refer [GET defroutes context]]
[compojure.handler :as handler]
[ring.util.response :refer [file-response response]]
[ring.middleware.resource :refer [wrap-res... |
a4f91c53191180ebc0c9926bd1e40c6997f575e71a93782eb094451bf3fd8346 | lexi-lambda/hackett | info.rkt | #lang info
(define scribblings
'(["hackett/main.scrbl" (multi-page) (language) "hackett"]))
(define test-omit-paths
'[#rx"\\.scrbl$"])
| null | https://raw.githubusercontent.com/lexi-lambda/hackett/e90ace9e4a056ec0a2a267f220cb29b756cbefce/hackett-doc/scribblings/info.rkt | racket | #lang info
(define scribblings
'(["hackett/main.scrbl" (multi-page) (language) "hackett"]))
(define test-omit-paths
'[#rx"\\.scrbl$"])
| |
0e1237bacc2ae5774c4c6fd09efcaf8cfc1b5b19d4a0ea1a559f113ee4a3183b | spechub/Hets | Leo2.hs | |
Module : ./TPTP / Prover / Leo2.hs
Description : Interface for the Leo - II Prover .
Copyright : ( c ) of Magdeburg 2017
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < >
Stability : provisional
Portability : non - portable ( imports Logic )
Module ... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/TPTP/Prover/Leo2.hs | haskell | ^ logical part containing the input Sign and axioms and possibly
goals that have been proved earlier as additional axioms
^ configuration to use
^ True means save TPTP file
^ goal to prove
^ (retval, configuration with proof status and complete output)
timeout executable to quit it by force it af... | |
Module : ./TPTP / Prover / Leo2.hs
Description : Interface for the Leo - II Prover .
Copyright : ( c ) of Magdeburg 2017
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < >
Stability : provisional
Portability : non - portable ( imports Logic )
Module ... |
0114498d7c14354e3da905eb529ad0dcbebe616ade6b8e38f28b94fc5587231c | maranget/hevea | count.ml | (***********************************************************************)
(* *)
(* HEVEA *)
(* *)
, projet , INRIA R... | null | https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/count.ml | ocaml | *********************************************************************
HEVEA
... | , projet , INRIA Rocquencourt
Copyright 2012 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
module type S = sig
type key
type count
val empty : count
val incr : key -> count -> count
val fold : (key -... |
3d3e460f33e38dff5dd2bf455a2a4b5662f73a88f7caffe7323142d7cb368bda | xapi-project/xen-api | xmlpp.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/5c9c44c6d40a9930f454722c9cd09c7079ec814e/ocaml/libs/xml-light2/xmlpp.ml | ocaml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | |
d39b618d3900b8ebd2b336fcfac4daca8c13b0ba8b4f18f4c80bb73c7cb9e42d | conreality/conreality | stomp.mli | (* This is free and unencumbered software released into the public domain. *)
#if OCAMLVERSION < 4020
type bytes = string
#endif
module Command : sig
type t =
| CONNECTED
| MESSAGE
| RECEIPT
| ERROR
| CONNECT
| SEND
| SUBSCRIBE
| UNSUBSCRIBE
| ACK
| NACK
| BEGIN
| COM... | null | https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/messaging/stomp.mli | ocaml | This is free and unencumbered software released into the public domain. |
#if OCAMLVERSION < 4020
type bytes = string
#endif
module Command : sig
type t =
| CONNECTED
| MESSAGE
| RECEIPT
| ERROR
| CONNECT
| SEND
| SUBSCRIBE
| UNSUBSCRIBE
| ACK
| NACK
| BEGIN
| COMMIT
| ABORT
| DISCONNECT
val of_string : string -> t
val to_string... |
431ab0b82502e5954ee710eb54724267ce811da7e3e210bc3aea24d2b6b07bfb | Liutos/Project-Euler | pro67.lisp | (ql:quickload "iterate")
(ql:quickload "cl-ppcre")
(defpackage :pro67
(:use :cl :iterate :cl-ppcre))
(in-package :pro67)
(defparameter *aux*
(make-array '(100 100) :initial-element nil))
(defun read-array ()
(let ((ary (make-array '(100 100) :initial-element 0))
(i 0))
(iterate (for row in-file "triangle... | null | https://raw.githubusercontent.com/Liutos/Project-Euler/dd59940099ae37f971df1d74c4b7c78131fd5470/lisp/pro67.lisp | lisp | (ql:quickload "iterate")
(ql:quickload "cl-ppcre")
(defpackage :pro67
(:use :cl :iterate :cl-ppcre))
(in-package :pro67)
(defparameter *aux*
(make-array '(100 100) :initial-element nil))
(defun read-array ()
(let ((ary (make-array '(100 100) :initial-element 0))
(i 0))
(iterate (for row in-file "triangle... | |
33a4d3d75769fd60e274eea2d2c76fe2bbfff9fa5a3a6ae7ec244843edbb0892 | snoyberg/photosorter | Incoming.hs | # LANGUAGE NoImplicitPrelude #
module Incoming where
import Language.Fay.Prelude
import Language.Fay.JQuery
import Language.Fay.DOM
import Language.Fay.FFI
import Language.Fay.Yesod
import SharedTypes
main :: Fay ()
main = ready $ do
select "button.add-new-post" >>= onClick (\e -> do
eventSource e >>= hi... | null | https://raw.githubusercontent.com/snoyberg/photosorter/c02cf37094d24762ceca4c05fe89580a4be0bec1/fay/Incoming.hs | haskell | # LANGUAGE NoImplicitPrelude #
module Incoming where
import Language.Fay.Prelude
import Language.Fay.JQuery
import Language.Fay.DOM
import Language.Fay.FFI
import Language.Fay.Yesod
import SharedTypes
main :: Fay ()
main = ready $ do
select "button.add-new-post" >>= onClick (\e -> do
eventSource e >>= hi... | |
bb50d9931e60d13d70e7a531c2a3fe6e6563dc9c48e7afa5075087cb61c9225e | adamConnerSax/knit-haskell | EffectStack.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE OverloadedStrings #
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE Rank2Types ... | null | https://raw.githubusercontent.com/adamConnerSax/knit-haskell/08a2fb7567844b9b948712cb53bd5cc6f6e1eb95/src/Knit/Report/EffectStack.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE GADTs #
# LANGUAGE PolyKinds #
# LANGUAGE Rank2Types #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
* Knit documents
* helpers
* Constraints for ... | # LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
|
Module : Knit . Report . EffectStack
Description : Knit effects stack , interpreters and configurat... |
2dbf97ce1da793864b3a61d44f499afdefe10e13a5eab73b994085c9e50aee5b | mstepniowski/project-euler | euler_008.clj | Solution to Project Euler problem 8
Find the greatest product of five consecutive digits in the 1000 - digit number .
(ns com.stepniowski.euler-008)
(def *number* (concat "73167176531330624919225119674426574742355349194934"
"96983520312774506326239578318016984801869478851843"
"858615607891129494954... | null | https://raw.githubusercontent.com/mstepniowski/project-euler/01d64aa46b21d96fc5291fdf216bf4bad8249029/src/com/stepniowski/euler_008.clj | clojure | Solution to Project Euler problem 8
Find the greatest product of five consecutive digits in the 1000 - digit number .
(ns com.stepniowski.euler-008)
(def *number* (concat "73167176531330624919225119674426574742355349194934"
"96983520312774506326239578318016984801869478851843"
"858615607891129494954... | |
119d07c363a6f5b3cea6d55bd3404a4e78b1f0116d942dd4fd3872daca96ac1b | cartazio/tlaps | p_simplify.ml |
* proof / simplify.ml --- simplify proofs
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* proof/simplify.ml --- simplify proofs
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
Revision.f "$Rev: 33188 $";;
open Ext
open Property
open Expr.T
open Expr.Subst
... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/proof/p_simplify.ml | ocaml | the following at_expand function is not efficient because it reparses the proof tree
let anonymize x = assign x Props.step (Named (step_number stepno, "_a" ^ string_of_int (Std.unique ()), true)) in
cannot have a Ditto here
let suff = anonymize suff in
let suff = anonymize suff in
we do prime normalization i... |
* proof / simplify.ml --- simplify proofs
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* proof/simplify.ml --- simplify proofs
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
Revision.f "$Rev: 33188 $";;
open Ext
open Property
open Expr.T
open Expr.Subst
... |
9e9ee0c760601060a372456ea25eee81dbe5eaa47a300f1b864545a462d03fed | exercism/common-lisp | practice-exercise-conversion.lisp | (mapcar #'ql:quickload '("yason" "alexandria"))
(defun keywordize (str)
(intern (string-upcase str) :keyword))
(defun practice-exercise-directories (&optional (top-level *default-pathname-defaults*))
(directory (merge-pathnames "./exercises/practice/**" top-level)))
(defun config-file-pathname (dir) (merge-pathn... | null | https://raw.githubusercontent.com/exercism/common-lisp/285146d3e398ff2a0c5e2e4a7adc437366e77ad3/src/one-off-scripts/practice-exercise-conversion.lisp | lisp | (mapcar #'ql:quickload '("yason" "alexandria"))
(defun keywordize (str)
(intern (string-upcase str) :keyword))
(defun practice-exercise-directories (&optional (top-level *default-pathname-defaults*))
(directory (merge-pathnames "./exercises/practice/**" top-level)))
(defun config-file-pathname (dir) (merge-pathn... | |
10f7c986d7cfc379db3f730f618d5ce53b0f7b36ef7965024947228bb99ee784 | goblint/analyzer | abortUnless.ml | (** An analysis checking whether a function only returns if its only argument has a non-zero value. *)
open Prelude.Ana
open Analyses
module Spec =
struct
include Analyses.DefaultSpec
let name () = "abortUnless"
module D = BoolDomain.MustBool
module C = Lattice.Unit
let context _ _ = ()
(* transfer fun... | null | https://raw.githubusercontent.com/goblint/analyzer/3fc209f2b3bdcc44c40e3c30053a2fa64368ff2e/src/analyses/abortUnless.ml | ocaml | * An analysis checking whether a function only returns if its only argument has a non-zero value.
transfer functions
should not happen, ctx.local should always be false in this case |
open Prelude.Ana
open Analyses
module Spec =
struct
include Analyses.DefaultSpec
let name () = "abortUnless"
module D = BoolDomain.MustBool
module C = Lattice.Unit
let context _ _ = ()
let assign ctx (lval:lval) (rval:exp) : D.t =
false
let branch ctx (exp:exp) (tv:bool) : D.t =
ctx.local
... |
3f4cdfb25f2f60a2dcde9595bf093e1f60ce98eb7331c0d53ca1ac5e6ad104bb | hexlet-codebattle/battle_asserts | apply_discount.clj | (ns battle-asserts.issues.apply-discount
(:require [clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["collections"])
(def description
{:en "Create a function that applies `discounts` to every `price` of the products in the array and calculate sum of whole payment. If after applying the `disc... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/94dbb426bf8b97921e7c6f50f177c5b7369ced1d/src/battle_asserts/issues/apply_discount.clj | clojure | (ns battle-asserts.issues.apply-discount
(:require [clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["collections"])
(def description
{:en "Create a function that applies `discounts` to every `price` of the products in the array and calculate sum of whole payment. If after applying the `disc... | |
83847bf9bfd117f82d26bf360405d817529538d86080380dc77aa4990dc1b80d | gtk2hs/gtk2hs | Docs.hs | module Docs (
ApiDoc,
ModuleDoc(..),
noModuleDoc,
DocSection(..),
FuncDoc(..),
ParamDoc(..),
PropDoc(..),
SignalDoc(..),
DocPara(..),
DocParaSpan(..),
extractDocumentation
) where
import qualified Text.XML.HaXml as Xml
import Prelude hiding (elem)
import Data.Char (isUpper, isSpace)
import Dat... | null | https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/tools/apiGen/src/Docs.hs | haskell | -----------------------------------------------------------------------------
Types representing the content of the documentation XML file
-----------------------------------------------------------------------------
these docs apply to this object
sometimes a better index entry
the main description
any additional... | module Docs (
ApiDoc,
ModuleDoc(..),
noModuleDoc,
DocSection(..),
FuncDoc(..),
ParamDoc(..),
PropDoc(..),
SignalDoc(..),
DocPara(..),
DocParaSpan(..),
extractDocumentation
) where
import qualified Text.XML.HaXml as Xml
import Prelude hiding (elem)
import Data.Char (isUpper, isSpace)
import Dat... |
76e5c34a794c7ccb3582d9ef9022442774b9fbde205becd4d5af32b2df0997da | UBTECH-Walker/WalkerSimulationFor2020WAIC | URDFConfiguration.lisp | ; Auto-generated. Do not edit!
(cl:in-package baxter_core_msgs-msg)
;//! \htmlinclude URDFConfiguration.msg.html
(cl:defclass <URDFConfiguration> (roslisp-msg-protocol:ros-message)
((time
:reader time
:initarg :time
:type cl:real
:initform 0)
(link
:reader link
:initarg :link
:type... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/baxter_core_msgs/msg/URDFConfiguration.lisp | lisp | Auto-generated. Do not edit!
//! \htmlinclude URDFConfiguration.msg.html |
(cl:in-package baxter_core_msgs-msg)
(cl:defclass <URDFConfiguration> (roslisp-msg-protocol:ros-message)
((time
:reader time
:initarg :time
:type cl:real
:initform 0)
(link
:reader link
:initarg :link
:type cl:string
:initform "")
(joint
:reader joint
:initarg :joint... |
4fcf35bde09d7f0f5a30040b8e27f3bfc7e44a2af22142d109f9b910a45a20f0 | janegca/htdp2e | Exercise-149-convertEuro.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-149-convertEuro) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2h... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/02-ArbitrarilyLargeData/Exercise-149-convertEuro.rkt | racket | about the language level of this file in a form that our tools can easily process.
Design the function convert-euro, which converts a list of US$ amounts
into a list of € amounts. Look up the current exchange rate on the web.
exchange rate and a list of US$ amounts and converts the latter into a
list of € amoun... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-149-convertEuro) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repea... |
1dd6f800b7b6bf70aca9643a958fe77761d38155d29ea203a093ba870ee6af0f | FarmLogs/geojson | validate.clj | (ns geojson.test.validate
(:require [clojure.test :refer :all]
[geojson.validate :refer :all]))
(deftest test-valid-coordinates?
(let [valid-coordinates? @#'geojson.validate/valid-coordinates?]
(are [depth coords] (true? (valid-coordinates? depth coords))
1 [1 2]
2 [[1 2]]
... | null | https://raw.githubusercontent.com/FarmLogs/geojson/a21338f24ca2b16128c24ff1d163b69ca207c77f/test/geojson/test/validate.clj | clojure | Some edge cases
Features
Some edge cases
nil coordinates
string coords
incorrect coordinates
linear ring violations
bad collections | (ns geojson.test.validate
(:require [clojure.test :refer :all]
[geojson.validate :refer :all]))
(deftest test-valid-coordinates?
(let [valid-coordinates? @#'geojson.validate/valid-coordinates?]
(are [depth coords] (true? (valid-coordinates? depth coords))
1 [1 2]
2 [[1 2]]
... |
30507e03ea1ac70aaeaf0fce9eb9e2ffe3f264366748bba30590d04ad1c2fc3e | liebke/zookeeper-clj | project.clj | (defproject zookeeper-clj "0.10.0"
:description "A Clojure DSL for Apache ZooKeeper"
:dependencies [[org.clojure/clojure "1.11.1"]
[org.apache.zookeeper/zookeeper "3.8.0"]
[commons-codec "1.15"]
[org.apache.curator/curator-test "5.2.1" :scope "test"]]
:repositori... | null | https://raw.githubusercontent.com/liebke/zookeeper-clj/138d4c867b35358cbb85cd103f7aae271635c585/project.clj | clojure | (defproject zookeeper-clj "0.10.0"
:description "A Clojure DSL for Apache ZooKeeper"
:dependencies [[org.clojure/clojure "1.11.1"]
[org.apache.zookeeper/zookeeper "3.8.0"]
[commons-codec "1.15"]
[org.apache.curator/curator-test "5.2.1" :scope "test"]]
:repositori... | |
9603b07bc0d704015c9eb27d74f89e4ff1398ac23a3768f4962b831d729ef1cb | rabbitmq/khepri | export_helper.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright © 2022 - 2023 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(export_helper).
-export([open_write/1,
... | null | https://raw.githubusercontent.com/rabbitmq/khepri/3527362ad9f59cff36231eb4e7b34dc066aa0f50/test/export_helper.erl | erlang | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright © 2022 - 2023 VMware , Inc. or its affiliates . All rights reserved .
-module(export_helper).
-export([open_write/1,
wr... | |
3a8f12eaef77d677a5ee1b8253ec0202499de124cc159ccf52680c5185c010bf | gerlion/secure-e-voting-with-coq | ElectionGuard_t.mli | Auto - generated from " ElectionGuard.atd "
[@@@ocaml.warning "-27-32-35-39"]
type pkproof = { commitment: string; challenge: string; response: string }
type trustee_public_key = { public_key: string; proof: pkproof }
type commitment = { public_key: string; ciphertext: string }
type proof = { commit... | null | https://raw.githubusercontent.com/gerlion/secure-e-voting-with-coq/c85f58f5759b960cc9d90a96fe7970e038523a9a/ElectionGuard/OCaml/ElectionGuard_t.mli | ocaml | Auto - generated from " ElectionGuard.atd "
[@@@ocaml.warning "-27-32-35-39"]
type pkproof = { commitment: string; challenge: string; response: string }
type trustee_public_key = { public_key: string; proof: pkproof }
type commitment = { public_key: string; ciphertext: string }
type proof = { commit... | |
c4b556b7752dbeb2a027e09428f7171d09a08b66504e32fb8d07b1162deb3ad6 | arenadotio/pgx | pgx.ml | PG'OCaml is a set of OCaml bindings for the PostgreSQL database .
*
* PG'OCaml - type safe interface to PostgreSQL .
* Copyright ( C ) 2005 - 2009 and other authors .
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
... | null | https://raw.githubusercontent.com/arenadotio/pgx/de8a45d1cf45b9019ed72397fda49e510771f3be/pgx/src/pgx.ml | ocaml | We get a message from postgres that we didn't expect. Almost always a bug
in our bindings
end of list
p
X
S
H
P
E
B
CS
DS
Check the string doesn't contain '\0' characters.
no limit on rows
Send all parameters as text.
NULL
Send back all results as text.
In_channel wrapping socket.
... | PG'OCaml is a set of OCaml bindings for the PostgreSQL database .
*
* PG'OCaml - type safe interface to PostgreSQL .
* Copyright ( C ) 2005 - 2009 and other authors .
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
... |
60122d2bce6f7597cd4019182a18eaff325c5e3ba4dded7d7dfb6460bf10533b | cj1128/sicp-review | 2.40.scm | pair ( i , j ) where 1 < = j < i < = n
(define (unique-pairs n)
(define (flatmap proc seq)
(fold-right append '() (map proc seq)))
(define (make-range start end)
(if (> start end)
'()
(cons start
(make-range (+ start 1) end))))
(flatmap
(lambda (i)
(map (lambda (... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-2/2.2/2.40.scm | scheme | pair ( i , j ) where 1 < = j < i < = n
(define (unique-pairs n)
(define (flatmap proc seq)
(fold-right append '() (map proc seq)))
(define (make-range start end)
(if (> start end)
'()
(cons start
(make-range (+ start 1) end))))
(flatmap
(lambda (i)
(map (lambda (... | |
1006fc084a7adcfb89ff42fe569de73d63b8c4c8ce2e72bf3d56a5fd7f5c5629 | sweirich/trellys | OpSem.hs | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleContexts , TupleSections ,
ViewPatterns #
ViewPatterns #-}
# OPTIONS_GHC -Wall -fno - warn - unused - matches #
| The operational semantics for core . This module currently has been
-- defined in just-in-time fashion, and should be repla... | null | https://raw.githubusercontent.com/sweirich/trellys/63ea89d8fa09929c23504665c55a3d909fe047c5/zombie-trellys/src/Language/Trellys/OpSem.hs | haskell | defined in just-in-time fashion, and should be replaced with an
implementation that systematically defines the operational semantics.
Stuff used for debugging.
-------------------------------------------------------------
Erasing core terms.
-------------------------------------------------------------
construct... | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleContexts , TupleSections ,
ViewPatterns #
ViewPatterns #-}
# OPTIONS_GHC -Wall -fno - warn - unused - matches #
| The operational semantics for core . This module currently has been
module Language.Trellys.OpSem
(join, cbvStep, cbvNSte... |
5e0d534e275c0b90b7acd061d5619f333af60198c5bab1d390d8fb3265f48658 | jubnzv/iec-checker | dump.ml | open Core
module S = Syntax
type dump_scheme = {
version: string; (** Scheme version *)
functions: S.function_decl list;
function_blocks: S.fb_decl list;
programs: S.program_decl list;
configurations: S.configuration_decl list;
types: S.derived_ty_decl list;
environments: Env.t list;
cfgs: Cfg.t list;
... | null | https://raw.githubusercontent.com/jubnzv/iec-checker/ea3c217cda56dfb8a84e85773876d58e358fc499/src/core/dump.ml | ocaml | * Scheme version | open Core
module S = Syntax
type dump_scheme = {
functions: S.function_decl list;
function_blocks: S.fb_decl list;
programs: S.program_decl list;
configurations: S.configuration_decl list;
types: S.derived_ty_decl list;
environments: Env.t list;
cfgs: Cfg.t list;
} [@@deriving to_yojson]
let create_dump... |
4bbbb68641dddf8ef394a80cdc51c8c5c9a65bb760a03aaf5fde5c0b75284324 | libguestfs/virt-v2v | output_qemu.mli | virt - v2v
* Copyright ( C ) 2009 - 2021 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | null | https://raw.githubusercontent.com/libguestfs/virt-v2v/7f16a93b424253d8c4c738c3c53b56598215689d/output/output_qemu.mli | ocaml | * [-o qemu] output mode. | virt - v2v
* Copyright ( C ) 2009 - 2021 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... |
11a0f5d8aa9d8c90adb08acb66f8a7b58dc9c2279c5b6263fb3380f29b6b0664 | Kappa-Dev/KappaTools | superargTk.notk.ml | LablTK GUI for option selection .
Copyright ( C ) 2006
Light Version ( )
This LIGHT version does not require labltk
Copyright (C) Antoine Mine' 2006
Light Version (Jerome Feret)
This LIGHT version does not require labltk
*)
exception Exit of string list
(* MAIN *)
(* **** *)
... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/cli/superargTk.notk.ml | ocaml | MAIN
**** | LablTK GUI for option selection .
Copyright ( C ) 2006
Light Version ( )
This LIGHT version does not require labltk
Copyright (C) Antoine Mine' 2006
Light Version (Jerome Feret)
This LIGHT version does not require labltk
*)
exception Exit of string list
let parse ?title (a:S... |
01a3e132cfd7a229d59ecdc3af48047c38a9cb249c96a9615a886ce21aeb764e | rmloveland/scheme48-0.53 | data.scm | ; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; This is file data.scm.
; Requires DEFINE-ENUMERATION macro.
;;;; Data representations
; This implementation of the data representations is particularly
tuned for byte - addressable machines with... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/vm/data.scm | scheme | -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
This is file data.scm.
Requires DEFINE-ENUMERATION macro.
Data representations
This implementation of the data representations is particularly
Good representations for other kinds of machines would necessarily
look quite different; e.g. on a word-addressed m... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
tuned for byte - addressable machines with 4 bytes per word .
A descriptor is represented as an integer whose low two bits are
(define tag-field-width 2)
(define data-field-width (- bits-per-cell tag-field-width))
(define (make-descriptor tag data... |
8168530ab619350b4421cc21a0cd7f8113adf7db0febb15bc7e7c3432d91cacb | passy/rss-markdown-proxy | CLI.hs | module Lib.CLI
( cliMain
) where
import qualified Data.Text.Lazy as T
import Lib (fetchFeed, transformRSS)
import System.Environment (getArgs)
cliMain :: IO ()
cliMain = do
[url] <- getArgs
rss <- T.unpack <$> fetchFeed url
transformRSS rss >>= putStrLn
| null | https://raw.githubusercontent.com/passy/rss-markdown-proxy/71f08e8eda84701b23e369affbe59da3d9f5d53d/src/Lib/CLI.hs | haskell | module Lib.CLI
( cliMain
) where
import qualified Data.Text.Lazy as T
import Lib (fetchFeed, transformRSS)
import System.Environment (getArgs)
cliMain :: IO ()
cliMain = do
[url] <- getArgs
rss <- T.unpack <$> fetchFeed url
transformRSS rss >>= putStrLn
| |
6978d83dc8bd90c8a261d3f2682dfa71191a321c6995d1e55bdcca24cc0c433a | racket/web-server | add-soft.rkt | #lang web-server
(define interface-version 'stateless)
(provide start interface-version)
(define softie
(soft-state
"submit"))
;; get-number-from-user: string -> number
;; ask the user for a number
(define (gn msg)
(let ([req
(send/suspend/url
(lambda (k-url)
(response/xexpr
... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/default-web-root/htdocs/lang-servlets/add-soft.rkt | racket | get-number-from-user: string -> number
ask the user for a number | #lang web-server
(define interface-version 'stateless)
(provide start interface-version)
(define softie
(soft-state
"submit"))
(define (gn msg)
(let ([req
(send/suspend/url
(lambda (k-url)
(response/xexpr
`(html (head (title ,(format "Get ~a number" msg)))
... |
532284a51b63d46a07a0d406941304f21ed4bd02ce1b73a801543abea56a6802 | danieljharvey/mimsa | Bindings.hs | {-# LANGUAGE OverloadedStrings #-}
module Repl.Actions.Bindings
( doAddBinding,
doListBindings,
)
where
import Data.Text (Text)
import qualified Language.Mimsa.Actions.Modules.Bind as Actions
import Language.Mimsa.Core
import Language.Mimsa.Modules.Pretty
import Language.Mimsa.Types.Error
import Language.Mims... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/564c32cc28d990c9e686f63533a9e30c3736aee4/repl/repl/Repl/Actions/Bindings.hs | haskell | # LANGUAGE OverloadedStrings #
| add a binding to the global repl module
add the new binding
show test results
| what is in the current implicit repl module
output to console |
module Repl.Actions.Bindings
( doAddBinding,
doListBindings,
)
where
import Data.Text (Text)
import qualified Language.Mimsa.Actions.Modules.Bind as Actions
import Language.Mimsa.Core
import Language.Mimsa.Modules.Pretty
import Language.Mimsa.Types.Error
import Language.Mimsa.Types.Project
import Repl.Helpers... |
2ba6eded88d87df4af4d5020f7864064732b05aae6e44579ecc15f85c426af36 | helium/miner | miner_dkg_handler.erl | %%%-------------------------------------------------------------------
%% @doc
%% == miner dkg_handler ==
%% @end
%%%-------------------------------------------------------------------
-module(miner_dkg_handler).
-behavior(relcast).
-export([init/1, handle_message/3, handle_command/2, callback_message/3, serialize/1,... | null | https://raw.githubusercontent.com/helium/miner/d371d6cdaf03dd529805bcce3d368aabe7ec1ff4/src/handlers/miner_dkg_handler.erl | erlang | -------------------------------------------------------------------
@doc
== miner dkg_handler ==
@end
-------------------------------------------------------------------
get the fun used to sign things with our swarm key
report a state here
we did the thing
ok, here's where it gets interesting. We completed the ... | -module(miner_dkg_handler).
-behavior(relcast).
-export([init/1, handle_message/3, handle_command/2, callback_message/3, serialize/1, deserialize/1, restore/2]).
-record(state,
{
n :: non_neg_integer(),
f :: non_neg_integer(),
t :: non_neg_integer(),
id :: non_neg_integer(... |
ced3594cf8ab9edc0b808ee7487412cd68a01cd80350e1e9aee8f992b9321a19 | parapluu/Concuerror | rush_hour.erl | -module(rush_hour).
-export([solve/3, solve/2, print/2, print_path/2, translate/1, toml/2,
test_2workers/0, test_2workers_small/0, test_3workers/0, test/2]).
-export([next_entries/2, winning/2, reverse_step/2,
compress/2, get_decomp_key/2, decompress/3]).
-export([test_2workers_benchmark/0]).
%% TODO: validate in... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/bounding_tests/src/manolis/rush_hour.erl | erlang | TODO: validate input? (in intermediate form?)
TODO: separate hash handling from closed set name
TODO: distributed hash table (closed + open set)
TODO: batch assign work
TODO: use a queue from stdlib for open set(s)
PropEr predicates
-include_lib("proper/include/proper.hrl").
-export([all_states_are_solvable_p... | -module(rush_hour).
-export([solve/3, solve/2, print/2, print_path/2, translate/1, toml/2,
test_2workers/0, test_2workers_small/0, test_3workers/0, test/2]).
-export([next_entries/2, winning/2, reverse_step/2,
compress/2, get_decomp_key/2, decompress/3]).
-export([test_2workers_benchmark/0]).
TODO : visible has... |
2665917630216abf818b3c897d3a3fabff717035808f954cc74e0fb1cf3230d6 | haslab/HAAP | Tarefa1_2017li1g186.hs | module Tarefa1_2017li1g186 where
import LI11718
testesT1 :: [Caminho]
testesT1 = []
constroi :: Caminho -> Mapa
constroi c = undefined | null | https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/examples/plab/svn/2017li1g186/src/Tarefa1_2017li1g186.hs | haskell | module Tarefa1_2017li1g186 where
import LI11718
testesT1 :: [Caminho]
testesT1 = []
constroi :: Caminho -> Mapa
constroi c = undefined | |
a4fd4864cedc8a280746ad0953015d50cdc87dfef6b63074d3f784f6add48d48 | fission-codes/fission | Lazy.hs | # OPTIONS_GHC -fno - warn - orphans #
module Fission.Internal.Orphanage.ByteString.Lazy () where
import qualified RIO.ByteString.Lazy as Lazy
import Servant.API
import Fission.Prelude
instance MimeRender PlainText Lazy.ByteString where
mimeRender _proxy = identity
instance FromJSON Lazy.ByteS... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-core/library/Fission/Internal/Orphanage/ByteString/Lazy.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Fission.Internal.Orphanage.ByteString.Lazy () where
import qualified RIO.ByteString.Lazy as Lazy
import Servant.API
import Fission.Prelude
instance MimeRender PlainText Lazy.ByteString where
mimeRender _proxy = identity
instance FromJSON Lazy.ByteS... | |
8763834accf054b5b1d83bb9d2e2302f80ae05b710c602869d1a606326997fe2 | rtoy/cmucl | local-call-type.lisp | (defun ! (n)
(declare (integer n))
(if (zerop n)
1
(* (! (1- n)) n)))
(defun ! (n res)
(declare (integer n res))
(if (zerop n)
res
(! (1- n) (* n res))))
| null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/tests/local-call-type.lisp | lisp | (defun ! (n)
(declare (integer n))
(if (zerop n)
1
(* (! (1- n)) n)))
(defun ! (n res)
(declare (integer n res))
(if (zerop n)
res
(! (1- n) (* n res))))
| |
9e1b5cfd9d20ca66a28ea479a1cb2572c927d1b3ea47a9d3e0ff0b977c68aba1 | schibsted/spid-tech-docs | markdown.clj | (ns spid-docs.pimp.markdown
(:require [me.raynes.cegdown :as md]))
(def pegdown-options ;;
[:autolinks :fenced-code-blocks :strikethrough])
(defn render
"Transforms markdown into HTML."
[s]
(if s (md/to-html s pegdown-options) ""))
(defn render-inline
"Like render, but strips away the paragraph. Useful ... | null | https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/src/spid_docs/pimp/markdown.clj | clojure | (ns spid-docs.pimp.markdown
(:require [me.raynes.cegdown :as md]))
[:autolinks :fenced-code-blocks :strikethrough])
(defn render
"Transforms markdown into HTML."
[s]
(if s (md/to-html s pegdown-options) ""))
(defn render-inline
"Like render, but strips away the paragraph. Useful when you want
to allow... | |
d2b8d73c5350e69e62c93ed9d05d340b4bcff4ea8214340c2eb8958161997186 | jtdaugherty/vty | VerifyUsingMockTerminal.hs | module VerifyUsingMockTerminal where
import Verify.Graphics.Vty.Prelude
import Verify.Graphics.Vty.Picture
import Verify.Graphics.Vty.Image
import Verify.Graphics.Vty.Attributes
import Verify.Graphics.Vty.Span
import Verify.Graphics.Vty.Output
import Graphics.Vty.Output
import Graphics.Vty.Output.Interface
import Gra... | null | https://raw.githubusercontent.com/jtdaugherty/vty/a4cb4cfc386a4bc0e46921d878b808e76567ebc9/tests/programs/VerifyUsingMockTerminal.hs | haskell | create an image that contains just the character T repeated for a
single row
The mock output string that represents the output bytes a single
line containing the T string: Followed by h - 1 lines of a change
to the background attribute and then the background character
create an image that contains the character ... | module VerifyUsingMockTerminal where
import Verify.Graphics.Vty.Prelude
import Verify.Graphics.Vty.Picture
import Verify.Graphics.Vty.Image
import Verify.Graphics.Vty.Attributes
import Verify.Graphics.Vty.Span
import Verify.Graphics.Vty.Output
import Graphics.Vty.Output
import Graphics.Vty.Output.Interface
import Gra... |
b37c13d2e1ee9310cbd7c125ae5d4c1c0b6b0eeed55ecde7c001bfcecda9365a | mit-plv/riscv-semantics | GcdExpr.hs | module Platform.GcdExpr where
import Prelude
gcdState addr = if ( addr == 0) then 17719
else if ( addr == 4) then 17847
else if ( addr == 8) then 4556179
else if ( addr == 12) then 337155
else if ( addr == 16) then 370051
else if ( addr == 20) then 20971759
else if ( addr == 24) then 17847
else if ( addr == 28) ... | null | https://raw.githubusercontent.com/mit-plv/riscv-semantics/1c0da3cac9d3f8dd813d26c0d2fbaccbb2210313/src/Platform/GcdExpr.hs | haskell | module Platform.GcdExpr where
import Prelude
gcdState addr = if ( addr == 0) then 17719
else if ( addr == 4) then 17847
else if ( addr == 8) then 4556179
else if ( addr == 12) then 337155
else if ( addr == 16) then 370051
else if ( addr == 20) then 20971759
else if ( addr == 24) then 17847
else if ( addr == 28) ... | |
d7a08301d8ed5cb216e0e8a8d7c0d18b8bd25a75a0abd7ae85b1ec82b41a4ecd | haskellari/splitmix | GenMix32.hs | {-# LANGUAGE RankNTypes #-}
-- cabal v2-build generate-mix32 && $(cabal-plan list-bin generate-mix32)
module Main (main) where
import Prelude ()
import Prelude.Compat
import Control.Applicative ((<|>))
import Control.Monad (ap, liftM)
import Control.Monad.Trans.State (State, evalState, get, put)
imp... | null | https://raw.githubusercontent.com/haskellari/splitmix/f89a4bb6a5f87565d15e88c3b3c0023546bbd0ff/tools/src/GenMix32.hs | haskell | # LANGUAGE RankNTypes #
cabal v2-build generate-mix32 && $(cabal-plan list-bin generate-mix32)
-----------------------------------------------------------------------------
Expr
-----------------------------------------------------------------------------
Combinators we use in the expression
Other combinators
-----... | module Main (main) where
import Prelude ()
import Prelude.Compat
import Control.Applicative ((<|>))
import Control.Monad (ap, liftM)
import Control.Monad.Trans.State (State, evalState, get, put)
import Data.Bits (shiftL, shiftR, xor, (.&.))
import Data.Foldable (toList)
i... |
4fbcf8138356e0639d9e8b6bd2c2db13a73e4031b7b9cea25233bb8eb9a2e574 | esl/MongooseIM | graphql_token_SUITE.erl | -module(graphql_token_SUITE).
-compile([export_all, nowarn_export_all]).
-import(common_helper, [unprep/1]).
-import(distributed_helper, [require_rpc_nodes/1, mim/0]).
-import(graphql_helper, [execute_command/4, execute_user_command/5, user_to_bin/1,
get_ok_value/2, get_err_code/1, get_err_ms... | null | https://raw.githubusercontent.com/esl/MongooseIM/d5abdd699fbdd81f89d87341745b112e87a80b1e/big_tests/tests/graphql_token_SUITE.erl | erlang | User tests
User test cases mod_token not configured
Domain admin tests
External domain user
Non-existing domain
External domain user
Non-existing domain
Admin tests
Admin test cases token not configured
Commands | -module(graphql_token_SUITE).
-compile([export_all, nowarn_export_all]).
-import(common_helper, [unprep/1]).
-import(distributed_helper, [require_rpc_nodes/1, mim/0]).
-import(graphql_helper, [execute_command/4, execute_user_command/5, user_to_bin/1,
get_ok_value/2, get_err_code/1, get_err_ms... |
3205fffafda84741c86c693b7704c57e6bc6dbc0e0c9a83b83d5363c4331b7e1 | lispbuilder/lispbuilder | window.lisp |
(in-package #:rm)
(define-condition pipe-not-specified-error (error)
((self :initarg :self :reader self)))
(defclass generic-window (node)
((pipe
:accessor pipe
:initform nil
:initarg :pipe)
(scenes
:accessor scenes
:initform nil)
(default-scene
:initform nil)
(width
:initfor... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-openrm/openrm/window.lisp | lisp | :scene (make-instance 'scene)
(unless (rm-cffi::rm-pipe-set-window (fp (pipe self)) (hwnd self)
(slot-value self 'width) (slot-value self 'height))
(error 'pipe-set-window-error :self (pipe self)))
(unless (rm-cffi::rm-pipe-set-window-size (fp (pipe self))
... |
(in-package #:rm)
(define-condition pipe-not-specified-error (error)
((self :initarg :self :reader self)))
(defclass generic-window (node)
((pipe
:accessor pipe
:initform nil
:initarg :pipe)
(scenes
:accessor scenes
:initform nil)
(default-scene
:initform nil)
(width
:initfor... |
f2afb5f09b79f8af5783db2b95177620a3ce72127e54d165ee932d587988f28b | NicklasBoto/funQ | Skel.hs | Haskell module generated by the BNF converter
module Parser.Skel where
import qualified Parser.Abs
type Err = Either String
type Result = Err String
failure :: Show a => a -> Result
failure x = Left $ "Undefined case: " ++ show x
transFunVar :: Parser.Abs.FunVar -> Result
transFunVar x = case x of
Parser.Abs.F... | null | https://raw.githubusercontent.com/NicklasBoto/funQ/7692abfbb914c07ccb1050b952af1d539604f152/src/Parser/Skel.hs | haskell | Haskell module generated by the BNF converter
module Parser.Skel where
import qualified Parser.Abs
type Err = Either String
type Result = Err String
failure :: Show a => a -> Result
failure x = Left $ "Undefined case: " ++ show x
transFunVar :: Parser.Abs.FunVar -> Result
transFunVar x = case x of
Parser.Abs.F... | |
e8f77c38d52ed39eb8b5f1776c1d50518f052d4a650b8bf1a77b656d7a6f1865 | Kakadu/lablqml | program.ml | open Printf
open Lablqml
let () = Printexc.record_backtrace true
class myitem cppObj =
object (self)
inherit Item.item cppObj as super
method getname () = "Vasya"
method getage () = 11
end
let main () =
let cppObj = Item.create_item () in
let item = new myitem cppObj in
let controller_cppobj... | null | https://raw.githubusercontent.com/Kakadu/lablqml/f7ab835913b36bd93741dfc2c1df9fef8f7011e6/demos/obj_test/program.ml | ocaml | open Printf
open Lablqml
let () = Printexc.record_backtrace true
class myitem cppObj =
object (self)
inherit Item.item cppObj as super
method getname () = "Vasya"
method getage () = 11
end
let main () =
let cppObj = Item.create_item () in
let item = new myitem cppObj in
let controller_cppobj... | |
a4ae8f85d22d62e243d1e9158fdfc57f76548113e3e2c9dbbc41720daa4bafcd | cj1128/sicp-review | 2.60.scm | ; this procedure is the same as the non-duplicate set.
; we still have to iterate the whole list.
(define (element-of-set? x set)
(cond
((null? set) #f)
((equal? x (car set)) #t)
(else (element-of-set? (cdr set)))))
; this procedure is simplified and only takes constant time
(define (adjoin-set x set)
... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-2/2.3/2.60.scm | scheme | this procedure is the same as the non-duplicate set.
we still have to iterate the whole list.
this procedure is simplified and only takes constant time
this procedure is simplified too
If we don't care the memory usage and want faster
adjoin-set and union-set operations, we can use
this representation. | (define (element-of-set? x set)
(cond
((null? set) #f)
((equal? x (car set)) #t)
(else (element-of-set? (cdr set)))))
(define (adjoin-set x set)
(cons x set))
(define (union-set set1 set2)
(append set1 set2))
|
ee1fc74174aca295a01e93e1df7910bc6eaa760db0ba7442c807ba589476fd96 | gilith/hol-light | combinations.ml | (* ========================================================================= *)
(* Binomial coefficients and relation to number of combinations. *)
(* ========================================================================= *)
prioritize_num();;
(* --------------------------------------------------------... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/100/combinations.ml | ocaml | =========================================================================
Binomial coefficients and relation to number of combinations.
=========================================================================
-------------------------------------------------------------------------
Binomial coeffi... |
prioritize_num();;
let binom = define
`(!n. binom(n,0) = 1) /\
(!k. binom(0,SUC(k)) = 0) /\
(!n k. binom(SUC(n),SUC(k)) = binom(n,SUC(k)) + binom(n,k))`;;
let BINOM_LT = prove
(`!n k. n < k ==> (binom(n,k) = 0)`,
INDUCT_TAC THEN INDUCT_TAC THEN REWRITE_TAC[binom; ARITH; LT_SUC; LT] THEN
ASM_SIMP_TAC[AR... |
cf1b74d0c8f25d12c1ea68ce0ee4b299901f31a5bce7376a70f8549cde6324f7 | serokell/servant-util | Getters.hs | {-# LANGUAGE TypeInType #-}
-- | Filter getters.
--
-- Allows to get a value passed by user to a manual filter.
-- Extracing auto filters is not allowed as soon as they are too complex
-- to make anything useful with them anyway.
module Servant.Util.Combinators.Filtering.Getters
( manualFilterValue
) where
im... | null | https://raw.githubusercontent.com/serokell/servant-util/3dff2de34cce90c4d1dab68e03d30f8939fd52ca/servant-util/src/Servant/Util/Combinators/Filtering/Getters.hs | haskell | # LANGUAGE TypeInType #
| Filter getters.
Allows to get a value passed by user to a manual filter.
Extracing auto filters is not allowed as soon as they are too complex
to make anything useful with them anyway.
| Extract a value from manual filter.
Probably this function should return @Maybe filter@ instead,
bu... |
module Servant.Util.Combinators.Filtering.Getters
( manualFilterValue
) where
import Universum
import GHC.TypeLits (ErrorMessage (..), KnownSymbol, TypeError)
import Servant.Util.Combinators.Filtering.Base
import Servant.Util.Common
type family UnManualFilter (fk :: FilterKind k) :: k where
UnManualFil... |
34d9f78cd9e1f6ba61ea4348d204fa199e92de5c2f6d9a4dfa3422de92e3d407 | dbuenzli/brr | test_gl.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The brr programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... | null | https://raw.githubusercontent.com/dbuenzli/brr/87424a8ea11cdcecd157ae0dcbb40ddd095a953b/test/test_gl.ml | ocaml | Shaders
WebGL setup
Wait for layout! | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The brr programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... |
f1080e0c3b08bc264cb1c6594e759675957f6d32ce48651054e2ba38e1f9a5ca | kelamg/HtDP2e-workthrough | ex501.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex501) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Accumulators/ex501.rkt | racket | about the language level of this file in a form that our tools can easily process.
N -> Number
adds n to pi without using +
N -> Number
adds n to pi without using +
N N -> Number
accumulator a is the number when
(- n n0) is added to pi | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex501) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(check-within (add-to-pi 2) (+ 2 pi) 0.001)
(define (a... |
d42e8f0edbeb7d64550e7e9517dff50d52c0defec7f705521be926d4e3ecf1f8 | Opetushallitus/ataru | email_util.clj | (ns ataru.email.email-util)
(def from-address "")
(defn- filter-template-params
[template-params guardian?]
(cond-> template-params
guardian? (dissoc :application-url :content-ending)))
(defn- make-email-for-applicant-or-guardian
[email-data render-file-fn guardian?]
(when (seq (:recipients email-data))
... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/c8475fa3fa6c0122cd8838733f8fe9ec8fe9e0f5/src/clj/ataru/email/email_util.clj | clojure | (ns ataru.email.email-util)
(def from-address "")
(defn- filter-template-params
[template-params guardian?]
(cond-> template-params
guardian? (dissoc :application-url :content-ending)))
(defn- make-email-for-applicant-or-guardian
[email-data render-file-fn guardian?]
(when (seq (:recipients email-data))
... | |
3b6802fc153b30d6304507825956bc9ed8cf7b35817e99148a854adcf7dbf56a | skanev/playground | 22.scm | SICP exercise 3.22
;
; Instead of representing the queue as a pair of pointes, we can build a queue
; as a procedure with local state. The local state will consist of pointers to
; the beginning and the end of an ordinary list. Thus, the make-queue
; procedure will have the form
;
; (define (make-queue)
; (let ((fr... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/22.scm | scheme |
Instead of representing the queue as a pair of pointes, we can build a queue
as a procedure with local state. The local state will consist of pointers to
the beginning and the end of an ordinary list. Thus, the make-queue
procedure will have the form
(define (make-queue)
(let ((front-ptr ...)
(rear-p... | SICP exercise 3.22
(require r5rs/init)
(define (empty-queue? queue) ((queue 'empty?)))
(define (front-queue queue) ((queue 'front)))
(define (insert-queue! queue item) ((queue 'insert) item))
(define (delete-queue! queue) ((queue 'delete)))
(define (make-queue)
(let ((front-ptr '())
(rear-ptr '()))
(... |
668a6a60f1e1695b114aba4021e056865bbd1ce6e03c56dba9c27b5ed51a48b6 | luc-tielen/eclair-lang | Error.hs | # LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - orphans #
module Eclair.Error
( EclairError(..)
, Issue(..)
, Location(..)
, Pos(..)
, handleErrorsCLI
, errorToIssues
, renderIssueMessage
) where
import qualified Data.Map as M
import qualified Text.Megaparsec as P
import Data.List (part... | null | https://raw.githubusercontent.com/luc-tielen/eclair-lang/7fddbbfd3c52f524778153fd767684b7b119eb9d/lib/Eclair/Error.hs | haskell | Handle errors when running in the CLI.
A single position in the code. 0-based!
# UNPACK #
# UNPACK #
Actual location in the code (a range).
Contains the file, start and end of the position.
# UNPACK #
# UNPACK #
A helper type for referring to an issue at a location.
separate issues for most flexibility and fine-g... | # LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - orphans #
module Eclair.Error
( EclairError(..)
, Issue(..)
, Location(..)
, Pos(..)
, handleErrorsCLI
, errorToIssues
, renderIssueMessage
) where
import qualified Data.Map as M
import qualified Text.Megaparsec as P
import Data.List (part... |
988bf291f583dfbf1e9ac7a387ed346f147bc6202da1bc49ff37f5bbb9b9ee49 | techascent/tech.ml.dataset | readers.clj | (ns ^:no-doc tech.v3.dataset.readers
(:require [tech.v3.dataset.protocols :as ds-proto]
[ham-fisted.api :as hamf])
(:import [tech.v3.datatype Buffer]))
(defn value-reader
"Return a reader that produces a reader of column values per index.
Options:
:copying? - Default to false - When true row val... | null | https://raw.githubusercontent.com/techascent/tech.ml.dataset/c12b5fc850159e514f37e1486930a5544c36d6ef/src/tech/v3/dataset/readers.clj | clojure | (ns ^:no-doc tech.v3.dataset.readers
(:require [tech.v3.dataset.protocols :as ds-proto]
[ham-fisted.api :as hamf])
(:import [tech.v3.datatype Buffer]))
(defn value-reader
"Return a reader that produces a reader of column values per index.
Options:
:copying? - Default to false - When true row val... | |
7d61963e644637cafd8fd25c4ce89185c53e9877edbd965491b884a08d90bb2c | c4-project/c4f | global.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/config/test/global.mli | ocaml | * Tests and test data over the 'global' configuration struct.
* [global] evaluates to a sample global configuration. | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
000533197964a91050688b5090e44275d1c0cb9823ddd4f7abb7296bb6420040 | NorfairKing/the-notes | Main.hs | module Geometry.Main where
import Notes
import Geometry.AffineSpaces
geometry :: Note
geometry = chapter "Geometry" $ do
affineSpaces
| null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Geometry/Main.hs | haskell | module Geometry.Main where
import Notes
import Geometry.AffineSpaces
geometry :: Note
geometry = chapter "Geometry" $ do
affineSpaces
| |
32da4b676f000152a87659dfd06ccbfd2cf12b116e96619697574d2632c5ca1c | fujita-y/ypsilon | 128.scm | #!nobacktrace
(define-library (srfi 128)
(export comparator? comparator-ordered? comparator-hashable?
make-comparator
make-pair-comparator make-list-comparator make-vector-comparator
make-eq-comparator make-eqv-comparator make-equal-comparator
boolean-hash char-hash char-ci-has... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/c68af44bad59eb26114c060d1689d8fe65cc895f/sitelib/srfi/128.scm | scheme | #!nobacktrace
(define-library (srfi 128)
(export comparator? comparator-ordered? comparator-hashable?
make-comparator
make-pair-comparator make-list-comparator make-vector-comparator
make-eq-comparator make-eqv-comparator make-equal-comparator
boolean-hash char-hash char-ci-has... | |
c031907f9eb1be71e48604740a230b6c555c157ff030b0c5a68f69fa2458ac7d | vollcheck/aoc | day08.clj | (ns y22.day08
(:require [clojure.set :as set]
[core :refer [load-input parse-int]]
[purity :refer [defpure]]))
(defn make-grid [in]
(mapv #(mapv parse-int %) in))
(defn get-tree-value [grid x y]
(-> grid
(nth y)
(nth x)))
(defn get-row-left [grid x y]
(let [row (nth grid y... | null | https://raw.githubusercontent.com/vollcheck/aoc/72b488d95a816fcc324f28bafb0f898dc40988e3/src/y22/day08.clj | clojure | TODO: lint it properly | (ns y22.day08
(:require [clojure.set :as set]
[core :refer [load-input parse-int]]
[purity :refer [defpure]]))
(defn make-grid [in]
(mapv #(mapv parse-int %) in))
(defn get-tree-value [grid x y]
(-> grid
(nth y)
(nth x)))
(defn get-row-left [grid x y]
(let [row (nth grid y... |
f39c0cdcf3ef972b85671d6f0cbd74b464ab92d3f56df5e068c095e79aaa7f9d | system-f/list-zipper | ListZipper.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeFamilies #
module Data.ListZipper(
-- * data types
ListZipper(..)
, ListZipperOp(..)
, ListZipperOp'
-- * lenses and prisms
, AsListZipper(.... | null | https://raw.githubusercontent.com/system-f/list-zipper/9dc9e58520ef2af3d2f5344427b23046e0502efb/src/Data/ListZipper.hs | haskell | * data types
* lenses and prisms
* traversals
* make zippers
* rezip
* indices
* movement
* insertion
* deletion
* modifcation
* focus position
* get context
* list zipper state operations
* list zipper state operations
-- | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeFamilies #
module Data.ListZipper(
ListZipper(..)
, ListZipperOp(..)
, ListZipperOp'
, AsListZipper(..)
, HasListZipper(..)
, HasListZipperO... |
57e89e9c6bcc39a4e264f1ae8fb7a8a22717c1d570a88580f06edb914792531d | greglook/blocks | store.clj | (ns ^:no-doc blocks.store
"Block storage protocols. Typically, clients of the library should use the
API wrapper functions in `blocks.core` instead of using these methods
directly."
(:require
[blocks.data :as data]
[clojure.string :as str]
[manifold.deferred :as d]
[manifold.executor :as mx]
... | null | https://raw.githubusercontent.com/greglook/blocks/c962d4431c05ac686a0cd1145e05bc0a0e0c4d7d/src/blocks/store.clj | clojure | ## Stream Utilities
Propagate error on the stream.
Determine if block matches query criteria.
Ignore any blocks which don't match the algorithm.
Drop blocks until an id later than `after`.
Terminate the stream if block is later than `before` or `limit`
blocks have already been returned.
Otherwise, pass the bloc... | (ns ^:no-doc blocks.store
"Block storage protocols. Typically, clients of the library should use the
API wrapper functions in `blocks.core` instead of using these methods
directly."
(:require
[blocks.data :as data]
[clojure.string :as str]
[manifold.deferred :as d]
[manifold.executor :as mx]
... |
22d6cf812cbfbfb9f06bec2dc0085797ef97e945840e7ff988b2e0e80d442189 | boomerang-lang/boomerang | toplevel.mli | (******************************************************************************)
The Harmony Project
(******************************************************************************)
Copyright ( C ) 2007 and ... | null | https://raw.githubusercontent.com/boomerang-lang/boomerang/b42c2bfc72030bbe5c32752c236c0aad3b17d149/lib/toplevel.mli | ocaml | ****************************************************************************
****************************************************************************
This library is free software; you can redistribute it and/or
modify it u... | The Harmony Project
Copyright ( C ) 2007 and
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later ... |
54d650a9b3ba1c1f894348b534b9a96171d208e14d207e7fb19c3680eef07480 | joinr/spork | neighborhood.clj | ;;A namespace for defining common neighborhood functions for solutions.
;;Flexing the ideas present in the presentation of generic solutions from
;;__spork.opt.representations__ , we can define general neighborhood functions
;;for any representation.
(ns spork.opt.neighborhood
(:require [spork.opt [representation :a... | null | https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/opt/neighborhood.clj | clojure | A namespace for defining common neighborhood functions for solutions.
Flexing the ideas present in the presentation of generic solutions from
__spork.opt.representations__ , we can define general neighborhood functions
for any representation.
Generic Neighborhoods
=====================
Given a solution representation, ... | (ns spork.opt.neighborhood
(:require [spork.opt [representation :as rep]]
[spork.util [vectors :as v] [stats :as stats]]))
(defn random-neighbor
"Generates a random neighbor based on the solution's normalized encoding.
This is equivalent to drawing from a uniform distribution n times, one for
... |
2f581eba19f6a341de5a88ef243352b16507d275505dcb8465c148a9b9be20ad | JHU-PL-Lab/jaylang | search_graph.ml | open Core
open Dj_common
type ('node, 'leaf) gate =
| Open
| Wrong
| End of 'leaf
| One of 'node
| And of 'node * 'node
| One_and_orlist of 'node * 'node list
| Orlist_of_pair of ('node * 'node) list
[@@deriving sexp_of, compare, equal]
let fmap_gate node leaf gate =
let loop = function
| Open -> ... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/dbmc/graph/search_graph.ml | ocaml | and gate =
| Open
| Mismatch
| Done of Concrete_stack.t
(* | Discard of t ref
| Alias of t ref
| To_first of t ref
| Para_local of (t ref * t ref) list
| Para_nonlocal of (t ref * t ref) list
let init_node key_map key node =
Hashtbl.add_exn key_map ~key ~data:node ;
... | open Core
open Dj_common
type ('node, 'leaf) gate =
| Open
| Wrong
| End of 'leaf
| One of 'node
| And of 'node * 'node
| One_and_orlist of 'node * 'node list
| Orlist_of_pair of ('node * 'node) list
[@@deriving sexp_of, compare, equal]
let fmap_gate node leaf gate =
let loop = function
| Open -> ... |
436e1463335315badd83bb3530a206c97811e00dd26e6a46b795e09d239c620a | roryk/bcbio.rnaseq | test_setup.clj | (ns bcbio.rnaseq.test-setup
(:require
[bcbio.rnaseq.test-setup :refer :all]
[me.raynes.fs :as fs]
[clojure.walk :as walk]
[clojure.java.shell :refer [sh]]
[bcbio.rnaseq.config :refer [load-yaml setup-config alter-config!]]
[clj-yaml.core :refer [generate-string]]
[clojure.java.io :as io]
[clj-... | null | https://raw.githubusercontent.com/roryk/bcbio.rnaseq/66c629eb737c9a0096082d6683657bf9d89eb271/test/bcbio/rnaseq/test_setup.clj | clojure | (ns bcbio.rnaseq.test-setup
(:require
[bcbio.rnaseq.test-setup :refer :all]
[me.raynes.fs :as fs]
[clojure.walk :as walk]
[clojure.java.shell :refer [sh]]
[bcbio.rnaseq.config :refer [load-yaml setup-config alter-config!]]
[clj-yaml.core :refer [generate-string]]
[clojure.java.io :as io]
[clj-... | |
809fdc1c258320763bb788e2048ac623145ae8f7a5e26866474610217a8a083b | hiroeorz/arduino-erlang | arduino_app.erl | -module(arduino_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
arduino_sup:... | null | https://raw.githubusercontent.com/hiroeorz/arduino-erlang/6e62be37148ebc1d8472f8189b2e99564681b2e6/src/arduino_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(arduino_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
arduino_sup:start_link().
stop(_State) ->
ok.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.