_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 |
|---|---|---|---|---|---|---|---|---|
b60a360252da0b1580e7ae2e230d4a34305f08598be2bf1a8804e45ace9baeeb | frenetic-lang/netkat-automata | Frenetic_Decide_Ast.mli | open Core.Std
open Frenetic_Decide_Util
module FieldMap : sig
include Map.S with type Key.t = Field.t
end
type packet = Value.t FieldMap.t with sexp,compare
type point = packet * packet with sexp, compare
val packet_to_string : packet -> string
val point_to_string : point -> string
module PacketSet : sig
includ... | null | https://raw.githubusercontent.com/frenetic-lang/netkat-automata/a4c3809e40e7c2ce500182043a74131ac9c19579/src/Frenetic_Decide_Ast.mli | ocaml | open Core.Std
open Frenetic_Decide_Util
module FieldMap : sig
include Map.S with type Key.t = Field.t
end
type packet = Value.t FieldMap.t with sexp,compare
type point = packet * packet with sexp, compare
val packet_to_string : packet -> string
val point_to_string : point -> string
module PacketSet : sig
includ... | |
78ab43ee3d1099948a5e9bc322db454b7dd65781835e5e6f0b563fdc8ee55c2b | Clojure2D/clojure2d-examples | quad.clj | (ns rt4.the-next-week.ch07b.quad
(:require [fastmath.core :as m]
[rt4.the-next-week.ch07b.hittable :as hittable]
[rt4.the-next-week.ch07b.aabb :as aabb]
[fastmath.vector :as v]
[rt4.the-next-week.ch07b.interval :as interval]
[rt4.the-next-week.ch07b.ray :as ... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch07b/quad.clj | clojure | (ns rt4.the-next-week.ch07b.quad
(:require [fastmath.core :as m]
[rt4.the-next-week.ch07b.hittable :as hittable]
[rt4.the-next-week.ch07b.aabb :as aabb]
[fastmath.vector :as v]
[rt4.the-next-week.ch07b.interval :as interval]
[rt4.the-next-week.ch07b.ray :as ... | |
efcf83b11a528300fe0549a3fd79cbb4c9646c3f457fd52064b91a187be82708 | Bogdanp/koyo | logging.rkt | #lang racket/base
(require koyo/logging
racket/file
racket/port
rackunit)
(provide logging-tests)
(define logging-tests
(test-suite
"logging"
(test-suite
"start-logger"
(test-case "logs to a file until stopped"
(define filename (make-temporary-file))
(call-wit... | null | https://raw.githubusercontent.com/Bogdanp/koyo/93f3fd06ee596a62bb0b286cb6290a800e911154/koyo-test/koyo/logging.rkt | racket | #lang racket/base
(require koyo/logging
racket/file
racket/port
rackunit)
(provide logging-tests)
(define logging-tests
(test-suite
"logging"
(test-suite
"start-logger"
(test-case "logs to a file until stopped"
(define filename (make-temporary-file))
(call-wit... | |
c38ebd4407b4c4fdd3ce6eddac6e87019c7e7611c5275779b72fdff0f53c5482 | JacobGabrielson/cl-rogue | move.lisp | ;;;; Hero movement commands
@(#)move.c 3.26 ( Berkeley ) 6/15/81
(in-package :cl-rogue)
(defun do-run (ch)
"Start the hero running."
(setf running t
*after* nil
runch ch))
(defun do-move (dy dx)
"Check to see that a move is legal. If it is, handle the
consequences (fighting, picking u... | null | https://raw.githubusercontent.com/JacobGabrielson/cl-rogue/ecc0eba9224313cbc7f8003c15e35dbb0d2b57eb/move.lisp | lisp | Hero movement commands
Do a confused move (maybe)
Check if he tried to move off the screen or make an illegal
diagonal move, and stop him if he did.
COPY-STRUCTURE for paranoia
Figure out how to display a secret door.
If the room is a dark room, we might want to remove
monsters and the like from it (since they ... | @(#)move.c 3.26 ( Berkeley ) 6/15/81
(in-package :cl-rogue)
(defun do-run (ch)
"Start the hero running."
(setf running t
*after* nil
runch ch))
(defun do-move (dy dx)
"Check to see that a move is legal. If it is, handle the
consequences (fighting, picking up, etc."
(setf firstmove n... |
bd3d48fa3ee0f6889e441dd3b723a1c34782319693f65d533422253ea944f7a1 | hypernumbers/LuvvieScript | basic_ifmod.erl | -module(basic_ifmod).
-compile(export_all).
if_fn() ->
N = 5,
if
N > 5 ->
ok;
N =< 5 ->
dont
end.
| null | https://raw.githubusercontent.com/hypernumbers/LuvvieScript/d10da50e0719ff26690749570c75e1e614214381/test/not_passing/src/basic_ifmod.erl | erlang | -module(basic_ifmod).
-compile(export_all).
if_fn() ->
N = 5,
if
N > 5 ->
ok;
N =< 5 ->
dont
end.
| |
f79ba3c7dc84138699803f2fe8f689642d6eb6004f54cdee8b35f314b68efa6a | BranchTaken/Hemlock | test_ex.ml | open! Basis.Rudiments
open! Basis
open Real
let test () =
let rec fn ts = begin
match ts with
| [] -> ()
| t :: ts' -> begin
File.Fmt.stdout
|> Fmt.fmt "ex "
|> fmt ~alt:true ~radix:Radix.Hex t
|> Fmt.fmt " -> "
|> fmt ~alt:true ~radix:Radix.Hex (ex t)
|> F... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/real/test_ex.ml | ocaml | open! Basis.Rudiments
open! Basis
open Real
let test () =
let rec fn ts = begin
match ts with
| [] -> ()
| t :: ts' -> begin
File.Fmt.stdout
|> Fmt.fmt "ex "
|> fmt ~alt:true ~radix:Radix.Hex t
|> Fmt.fmt " -> "
|> fmt ~alt:true ~radix:Radix.Hex (ex t)
|> F... | |
4d98b7e45d5c234df2db927a385680de077690198ee33f02cbb6172953441f38 | ucsd-progsys/nate | arch.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/asmcomp/sparc/arch.ml | ocaml | *********************************************************************
Objective Caml
... | , 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 Q Public License version 1.0 .
$ I d : arch.ml , v 1.8 2002/11/29 15... |
56c939a43ed046436b52fded5689ada7feb9ce532c244ff9951a11c82084cf97 | genenetwork/guix-bioinformatics | machine-learning.scm | (define-module (gn packages machine-learning)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages machine-learning))
(define-public tensorflow-native
(package
(inherit tensorflow)
(name "tensorflow-native")
(arguments
... | null | https://raw.githubusercontent.com/genenetwork/guix-bioinformatics/9e1e668e4f9f9e2b595620fda831da0525db4095/gn/packages/machine-learning.scm | scheme | ((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'hardcode-multicore-usage
(lambda _
(substitute* "tensorflow/core/protobuf/config.proto"
( ( " num_threads = 1 " ) " num_threads = 28 " ) ; 56/2 for penguin2
( ( " intra_op_parallelism_threads = 2 " )
; "intra_op_parallelism_th... | (define-module (gn packages machine-learning)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages machine-learning))
(define-public tensorflow-native
(package
(inherit tensorflow)
(name "tensorflow-native")
(arguments
... |
f1e51631ffabb67c68e2d593fc814716b1b2c2e4580672a260f591fc7369c371 | stelcodes/nuzzle | site.clj | (ns site
(:require
[nuzzle.core :as nuzz]))
(defn render-page [{:nuzzle/keys [title index render-content get-pages] :as _page}]
[:html
[:head [:title title]
;; Add link to CSS file /css/main.css (must be in overlay directory)
[:link {:href "/css/main.css" :rel "stylesheet"}]]
[:body
[:h1... | null | https://raw.githubusercontent.com/stelcodes/nuzzle/d65806b39dd60350d9583b3b79712ac047360112/examples/ash-ketchum-blog/site.clj | clojure | Add link to CSS file /css/main.css (must be in overlay directory)
into relative URL strings when used for an :href value
Here we make a function that creates a render-content function that turns markdown files into hiccup | (ns site
(:require
[nuzzle.core :as nuzz]))
(defn render-page [{:nuzzle/keys [title index render-content get-pages] :as _page}]
[:html
[:head [:title title]
[:link {:href "/css/main.css" :rel "stylesheet"}]]
[:body
[:h1 title]
(when index
[:ul (for [url index
:let [{:nuzzl... |
050270c740e1706d5bf59c233283114a77dcf2c81af7dd2172982fd40cf8ff81 | ZHaskell/z-botan | PubKey.hs | |
Module : Z.Crypto . PubKey
Description : Public Key Cryptography
Copyright : , 2021
, 2021
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
This module is used for Public key cryptography . Public key cryptography ( also called a... | null | https://raw.githubusercontent.com/ZHaskell/z-botan/425669b50c88750a8316d44868b5139ef65b2c5d/Z/Crypto/PubKey.hs | haskell | * Asymmetric cryptography algorithms
* Key generation and manipulation
* Encrypt & Decrypt
* Sign & verify
* Key agreement
* RSA specific
* constants
* re-exports
* internal
-------------
Key Types --
-------------
| Public key cryptography algorithms.
^ RSA key of the given size, namely n bits, support enc... | |
Module : Z.Crypto . PubKey
Description : Public Key Cryptography
Copyright : , 2021
, 2021
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
This module is used for Public key cryptography . Public key cryptography ( also called a... |
adf685167aa59a73f0c3261717b0fee24aa6eb54eb6fc29e6300e1892a245e5a | KMahoney/squee | InferError.hs | module Cli.Pretty.InferError where
import qualified Data.Text as T
import Data.Text.Prettyprint.Doc
import Data.Text.Prettyprint.Doc.Render.Terminal
import qualified Squee.Types.Unify as Type
import qualified Squee.Types.Infer as Type
import qualified Squee.Types.PrettyPrint as Type
import qualified Squee.AST as AST... | null | https://raw.githubusercontent.com/KMahoney/squee/b2ebad2ec6f3c866398600793d0a231edc8c23e4/src/Cli/Pretty/InferError.hs | haskell | module Cli.Pretty.InferError where
import qualified Data.Text as T
import Data.Text.Prettyprint.Doc
import Data.Text.Prettyprint.Doc.Render.Terminal
import qualified Squee.Types.Unify as Type
import qualified Squee.Types.Infer as Type
import qualified Squee.Types.PrettyPrint as Type
import qualified Squee.AST as AST... | |
e3d36c790829d160969af9603520d8cd9e5dfa81df3d28ec48124fdcae16e8c0 | tomjridge/tjr_simple_earley | earley_optcomp_config.ml | [%%define PROFILING_ENABLED true]
[%%define LOGGING_ENABLED true]
| null | https://raw.githubusercontent.com/tomjridge/tjr_simple_earley/ca558e0e7f4ddba4cd6573bf180710cd02f25ba4/src/earley_optcomp_config.ml | ocaml | [%%define PROFILING_ENABLED true]
[%%define LOGGING_ENABLED true]
| |
d4f15646a35ff76e4fc23d6f9c02df875d59d5b25aaada375d5c1ccc8400b893 | deadtrickster/prometheus.erl | prometheus_boolean_tests.erl | -module(prometheus_boolean_tests).
-include_lib("eunit/include/eunit.hrl").
-include("prometheus_model.hrl").
prometheus_format_test_() ->
{foreach,
fun prometheus_eunit_common:start/0,
fun prometheus_eunit_common:stop/1,
[fun test_registration/1,
fun test_errors/1,
fun test_set/1,
fun test_to... | null | https://raw.githubusercontent.com/deadtrickster/prometheus.erl/b7cdd4fe70127aee738993c649e8c853718ea52a/test/eunit/metric/prometheus_boolean_tests.erl | erlang | basic name/labels/help validations test
boolean specific errors,
mf/arity errors | -module(prometheus_boolean_tests).
-include_lib("eunit/include/eunit.hrl").
-include("prometheus_model.hrl").
prometheus_format_test_() ->
{foreach,
fun prometheus_eunit_common:start/0,
fun prometheus_eunit_common:stop/1,
[fun test_registration/1,
fun test_errors/1,
fun test_set/1,
fun test_to... |
39a7f8c969e909b6080210f186be478ec119760d0c8289f88d6fd3ef96a8749e | samuelrivas/moka | moka_mod_utils_tests.erl | Copyright ( c ) 2012 , < >
%%% All rights reserved.
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%% * Redistributions of source code must retain the above copyright
%%% notice, this list of conditio... | null | https://raw.githubusercontent.com/samuelrivas/moka/92521e43d1d685794f462ed49403c99baeae0226/test/unit/moka_mod_utils_tests.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistr... | Copyright ( c ) 2012 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTI... |
b3ce1130eb172b8c28bb78fb964bea21c48f5b3b9603951c43bfef4a65e0ad5f | mzp/coq-for-ipad | glFunc.ml | $ I d : , v 1.7 2000/04/12 07:40:23 garrigue Exp $
open Gl
external accum : op:[`accum|`load|`add|`mult|`return] -> float -> unit
= "ml_glAccum"
external alpha_func : cmp_func -> ref:clampf -> unit = "ml_glAlphaFunc"
type sfactor = [
`zero
| `one
| `dst_color
| `one_minus_dst_color
| `src_alpha
... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/otherlibs/lablGL/glFunc.ml | ocaml | $ I d : , v 1.7 2000/04/12 07:40:23 garrigue Exp $
open Gl
external accum : op:[`accum|`load|`add|`mult|`return] -> float -> unit
= "ml_glAccum"
external alpha_func : cmp_func -> ref:clampf -> unit = "ml_glAlphaFunc"
type sfactor = [
`zero
| `one
| `dst_color
| `one_minus_dst_color
| `src_alpha
... | |
27228b24c837956b37502baf9278b82c8f8a54053e93411800b374ee60ed7129 | digitallyinduced/ihp | Schema.hs | module IHP.IDE.SchemaDesigner.Controller.Schema where
import IHP.ControllerPrelude
import IHP.IDE.ToolServer.Types
import IHP.IDE.SchemaDesigner.View.Schema.Code
import IHP.IDE.SchemaDesigner.View.Schema.Error
import IHP.IDE.SchemaDesigner.View.Schema.GeneratedCode
import IHP.IDE.SchemaDesigner.View.Schema.SchemaUpda... | null | https://raw.githubusercontent.com/digitallyinduced/ihp/18f104da69c526ff9e8ad3a6cdaedc6d39afb38c/IHP/IDE/SchemaDesigner/Controller/Schema.hs | haskell | module IHP.IDE.SchemaDesigner.Controller.Schema where
import IHP.ControllerPrelude
import IHP.IDE.ToolServer.Types
import IHP.IDE.SchemaDesigner.View.Schema.Code
import IHP.IDE.SchemaDesigner.View.Schema.Error
import IHP.IDE.SchemaDesigner.View.Schema.GeneratedCode
import IHP.IDE.SchemaDesigner.View.Schema.SchemaUpda... | |
73ce9e7672609666bc12e1d9ba38bce4b37f9ed4d1c39e2b738e6344c3611bbb | alonsodomin/haskell-schema | Algebra.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperators #-}
module Data.Schema.PrettyPrint.Internal.Algebra (
SchemaDoc (..)
, ToSchemaDoc (..)
, toSchem... | null | https://raw.githubusercontent.com/alonsodomin/haskell-schema/4f12bda9550e83000b9f886c1c12a8becb6ad7d7/hschema-prettyprinter/src/Data/Schema/PrettyPrint/Internal/Algebra.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
| Defines the transformation of schema `s a` into a `SchemaDoc a` | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Data.Schema.PrettyPrint.Internal.Algebra (
SchemaDoc (..)
, ToSchemaDoc (..)
, toSchemaDoc'
, SchemaLayout (..)
, ToSchemaLayout (..)
, toSchemaL... |
39539f151535afc4bd1cb50cc521ae4d9bb0027b1fa28b8df73f06002199ab42 | acid-state/safecopy | SafeCopy.hs | # LANGUAGE CPP #
#ifdef SAFE_HASKELL
# LANGUAGE Trustworthy #
#endif
-----------------------------------------------------------------------------
-- |
Module : Data . SafeCopy
Copyright : PublicDomain
--
-- Maintainer :
Portability : non - portable ( uses GHC extensions )
--
SafeCopy extends... | null | https://raw.githubusercontent.com/acid-state/safecopy/c64dcd85c1cb538ad3f7e2f3378949eacd6685d9/src/Data/SafeCopy.hs | haskell | ---------------------------------------------------------------------------
|
Maintainer :
to include nested version control. Nested version control means that you
can change the definition and binary format of a type nested deep within
other types without problems.
= Migration
Consider this scenario. You... | # LANGUAGE CPP #
#ifdef SAFE_HASKELL
# LANGUAGE Trustworthy #
#endif
Module : Data . SafeCopy
Copyright : PublicDomain
Portability : non - portable ( uses GHC extensions )
SafeCopy extends the parsing and serialization capabilities of Data . Serialize
data Contacts = Contacts [ ( Name , Address ... |
d944e32b4457ff2079225d7e03aefa77f66f433f1f5f99e45b0fc72ae023224b | ocaml-sf/learn-ocaml-corpus | solution.ml | (* The empty random access list. *)
let empty : 'a . 'a seq =
Nil
(* Example random access lists. *)
let test24 : int seq =
Zero (One ((2, 4), Nil))
let digits : int seq =
Zero (
One ((0, 1),
Zero (
One ((((2, 3), (4, 5)), ((6, 7), (8, 9))),
Nil
))))
(* Measuring the length of a sequence. *)
let r... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/random_access_lists/solution.ml | ocaml | The empty random access list.
Example random access lists.
Measuring the length of a sequence.
Inserting an element in front of a sequence.
Extracting the head of a sequence.
Accessing the [i]-th element for reading.
cannot happen; [i] is within bounds
Accessing the [i]-th element for updating.
cannot ... |
let empty : 'a . 'a seq =
Nil
let test24 : int seq =
Zero (One ((2, 4), Nil))
let digits : int seq =
Zero (
One ((0, 1),
Zero (
One ((((2, 3), (4, 5)), ((6, 7), (8, 9))),
Nil
))))
let rec length : 'a . 'a seq -> int =
fun xs ->
match xs with
| Nil -> 0
| Zero ... |
57001043f676638950cdffef2e544de3f5c05f1b24f0e7bac47ac9a8da370a4f | funcool/rxhttp | project.clj | (defproject funcool/rxhttp "1.0.0-SNAPSHOT"
:description "A stream based http client for Clojure and ClojureScript"
:url ""
:license {:name "MPL 2.0" :url "-US/MPL/2.0/"}
:source-paths ["src"]
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.9.946" ... | null | https://raw.githubusercontent.com/funcool/rxhttp/a108cf526569ea4a5a019eb233680e2af600b37c/project.clj | clojure | (defproject funcool/rxhttp "1.0.0-SNAPSHOT"
:description "A stream based http client for Clojure and ClojureScript"
:url ""
:license {:name "MPL 2.0" :url "-US/MPL/2.0/"}
:source-paths ["src"]
:dependencies [[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.9.946" ... | |
399d0fa497de55ee442a19c49c41f23e66b634c8847fa7decd99566708bced15 | clojure/core.typed | statistics.clj | Copyright ( c ) , contributors .
;; 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/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/jvm/statistics.clj | clojure | 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
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns clojure.core.typed.checker.jvm.statistics
(:require [clojure.core.typed.checker.var-env :as var-env]
[clojure.core.typed.checker.jvm.check-ns-clj :as chk-ns-clj]
[clojure.core.typed.contract-utils :as con]
[clojure.core.typed.checker... |
fa26a5c07a649c588e06715e949ce02343eba18e815cace89411aa08c2aab4a4 | vsedach/Parenscript | macros.lisp | Copyright 2005
Copyright 2005 - 2006 Edward
Copyright 2006
Copyright 2010 - 2012
Copyright 2010 - 2013
Copyright 2012 , 2014
SPDX - License - Identifier : BSD-3 - Clause
;;; Redistribution and use in source and binary forms, with or
;;; without modification, are permitted provided that the f... | null | https://raw.githubusercontent.com/vsedach/Parenscript/b8dd346d482b730a052902be1af724b16c6f2979/src/macros.lisp | lisp | Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other mate... | Copyright 2005
Copyright 2005 - 2006 Edward
Copyright 2006
Copyright 2010 - 2012
Copyright 2010 - 2013
Copyright 2012 , 2014
SPDX - License - Identifier : BSD-3 - Clause
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce... |
7fdd058da9858b905034a330143ea6d0ac9dd8cd46a627d74caf820c4baadc31 | simmone/racket-simple-qr | dark-module.rkt | #lang racket
(provide (contract-out
[get-dark-point (-> exact-nonnegative-integer? pair?)]
))
(define (get-dark-point version)
(cons (+ (* 4 version) 10) 9))
| null | https://raw.githubusercontent.com/simmone/racket-simple-qr/904f1491bc521badeafeabd0d7d7e97e3d0ee958/simple-qr/share/dark-module.rkt | racket | #lang racket
(provide (contract-out
[get-dark-point (-> exact-nonnegative-integer? pair?)]
))
(define (get-dark-point version)
(cons (+ (* 4 version) 10) 9))
| |
ccee8c052f2d75aeb1a9ddb5af505355fef5b198d8f5dd28a123788a8a2c2813 | alvatar/spheres | arguments.scm | ;;!!! Argument processing for command-line programs
.author Per Eckerdal , for the Blackhole module system
.author , 2013 - 2015
(define (arguments/error . args)
(let ((err (current-error-port)))
(display "Program argument error: " err)
(for-each
(lambda (arg)
(display arg err)
(di... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/os/arguments.scm | scheme | !!! Argument processing for command-line programs
.parameter args List of arguments to process
.parameter options List of options following this structure:
(#\f 1 "file"))
Example:
(define (main . args)
(let ((commands
`(("install" ,@install-cmd)
("help" ,@help-cmd)
("set" ,@... | .author Per Eckerdal , for the Blackhole module system
.author , 2013 - 2015
(define (arguments/error . args)
(let ((err (current-error-port)))
(display "Program argument error: " err)
(for-each
(lambda (arg)
(display arg err)
(display " " err))
args)
(display "\n") err)
... |
8b9ae0d01cb3aad1043a210367e4fa643fbc7b557d913af1bd3508adfad9c01a | Bogdanp/racket-lua | realm.rkt | #lang racket/base
(provide
lua-realm)
(define lua-realm 'lua)
| null | https://raw.githubusercontent.com/Bogdanp/racket-lua/5d273b2a3396bd341583220aeebf40add501282c/lua-lib/private/realm.rkt | racket | #lang racket/base
(provide
lua-realm)
(define lua-realm 'lua)
| |
311e1ef5a36c61f2ca30932e82842dd3a5a447f108b62d5ee3487b5652118bcb | manuel-serrano/hop | date.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / hopscript / date.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/d39336c2ca1f2f6939be8a24f99feeb9a70cc008/hopscript/date.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* -international.org/ecma... | * serrano / prgm / project / hop / hop / hopscript / date.scm * /
* Author : * /
* Creation : Fri Sep 20 10:47:16 2013 * /
* Last change : Thu Aug 26 15:10:42 2021 ( serrano ) * /
* Copy... |
4b46c747ad62625f0092741d50cf67da8f777c90cf3bfad28265eeb2e09bcf3d | fhsgoncalves/metabase-sparksql-databricks-driver | connection.clj | (ns metabase.driver.connection
(:require [clojure.reflect])
(:import [java.sql ResultSet SQLException]))
(defmacro decorator
[clazz proto & fs]
(let [proto-name (gensym "proto")
methods (->> (clojure.reflect/reflect (resolve clazz))
:members
(filter #(instance?... | null | https://raw.githubusercontent.com/fhsgoncalves/metabase-sparksql-databricks-driver/186cc847db80e8754f1adfcb0b8920de2c2300a8/src/metabase/driver/connection.clj | clojure | these are our own definitions
this is where we delegate to the prototype | (ns metabase.driver.connection
(:require [clojure.reflect])
(:import [java.sql ResultSet SQLException]))
(defmacro decorator
[clazz proto & fs]
(let [proto-name (gensym "proto")
methods (->> (clojure.reflect/reflect (resolve clazz))
:members
(filter #(instance?... |
7915d83b27a8fd1d3252aae7ccc45e1cca83cc14a9a16ba11ad485acc2483ef8 | music-suite/music-suite | Score.hs |
# LANGUAGE TypeFamilies , ConstraintKinds , FlexibleContexts #
module Main where
import Control.Lens (_1, _2)
import Music.Prelude
import qualified Data.List
import qualified Data.Ord
import Util
A slight variation on the famous RCS quartet movement .
Medium ( MC - sized ! ) orchestra . Treat instruments * ind... | null | https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/examples/pieces/CrawfordSeeger/Score.hs | haskell | Some example "chords"
--- |
# LANGUAGE TypeFamilies , ConstraintKinds , FlexibleContexts #
module Main where
import Control.Lens (_1, _2)
import Music.Prelude
import qualified Data.List
import qualified Data.Ord
import Util
A slight variation on the famous RCS quartet movement .
Medium ( MC - sized ! ) orchestra . Treat instruments * ind... |
90048731902a46e1d814af4081af799a33d72c63400deefb87137b1b28526097 | vseloved/cl-nlp | user.lisp | ( c ) 2013 - 2017 Vsevolod Dyomkin
(in-package #:nlp-user)
(named-readtables:in-readtable rutilsx-readtable)
;;; end-user utilies
(defun grep (word string &key (width 25) pass-newlines limit)
"Print all (or LIMIT) WORD occurances in STRING with the surrounding
context up to WIDTH chars. If PASS-NEWLINES isn'... | null | https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/src/user.lisp | lisp | end-user utilies
print header
print rows
| ( c ) 2013 - 2017 Vsevolod Dyomkin
(in-package #:nlp-user)
(named-readtables:in-readtable rutilsx-readtable)
(defun grep (word string &key (width 25) pass-newlines limit)
"Print all (or LIMIT) WORD occurances in STRING with the surrounding
context up to WIDTH chars. If PASS-NEWLINES isn't set, the context
... |
671684a20534369bb156775a5a9f0de2f38b75958f7f65c7768b66759d6a18ff | haskell-compat/base-compat | Compat.hs | # LANGUAGE CPP , NoImplicitPrelude , PackageImports #
module Data.Type.Coercion.Compat (
#if MIN_VERSION_base(4,7,0)
module Base
#endif
) where
#if MIN_VERSION_base(4,7,0)
import "base-compat" Data.Type.Coercion.Compat as Base
#endif
| null | https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat-batteries/src/Data/Type/Coercion/Compat.hs | haskell | # LANGUAGE CPP , NoImplicitPrelude , PackageImports #
module Data.Type.Coercion.Compat (
#if MIN_VERSION_base(4,7,0)
module Base
#endif
) where
#if MIN_VERSION_base(4,7,0)
import "base-compat" Data.Type.Coercion.Compat as Base
#endif
| |
c5422ab28973e845ea01239e2fb16973f2331f2b20f396e4c63781d6c4e3c0de | marick/fp-oo | t_dynamic.clj | (ns sources.t-dynamic
(:use midje.sweet))
(load-file "sources/dynamic.clj")
(fact "Anything"
(let [instance (send-to Anything :new)]
(send-to instance :class-name ) => 'Anything
(send-to instance :class) => Anything)
(send-to Anything :class-name) => 'Klass
(send-to Anything :class) => Klass
(sen... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/test/sources/t_dynamic.clj | clojure | These are global so that we can see that adding modules
affects existing instances. | (ns sources.t-dynamic
(:use midje.sweet))
(load-file "sources/dynamic.clj")
(fact "Anything"
(let [instance (send-to Anything :new)]
(send-to instance :class-name ) => 'Anything
(send-to instance :class) => Anything)
(send-to Anything :class-name) => 'Klass
(send-to Anything :class) => Klass
(sen... |
8b72441c67f8a4113bef21eb965f9f6969108b4bd0ffef4a9d59c6394cddcbfe | erlangonrails/devdb | util_SUITE.erl | 2008 - 2010 fuer Informationstechnik Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, ... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/test/util_SUITE.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2008 - 2010 fuer Informationstechnik Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@version $ I d : 906 2010 - 07 - 23 14:09:20Z schuett $
-module(util_SUITE).
-author('').
-vsn('$Id... |
03bb1a48645d755cc82874952813e16c405a6e8d303aea0238ac46d72095b905 | theodormoroianu/SecondYearCourses | LambdaChurch_20210415164233.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415164233.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
62649842d550b9851f36979ab88c3ed5888cc54891e3732d35533d136c417929 | typedclojure/typedclojure | minimal_clj_test.clj | (ns typed-example.minimal-clj-test
(:require [typed.clojure :as t]
[clojure.core.typed.errors :as err]
[clojure.test :refer [deftest is]]))
(deftest minimal-clj-test
(is (err/top-level-type-error-thrown? (eval `(t/cns 'typed-example.minimal-clj))))
(is (err/top-level-type-error-thrown? (t... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/b67795220d68f4f8282485dfa6fb3f6444d7b1ae/example-projects/minimal-clj/test/typed_example/minimal_clj_test.clj | clojure | (ns typed-example.minimal-clj-test
(:require [typed.clojure :as t]
[clojure.core.typed.errors :as err]
[clojure.test :refer [deftest is]]))
(deftest minimal-clj-test
(is (err/top-level-type-error-thrown? (eval `(t/cns 'typed-example.minimal-clj))))
(is (err/top-level-type-error-thrown? (t... | |
cf322088427b73cd9fc5198343d1c624b7a795f003a2e960e78d0528414c4684 | AccelerateHS/accelerate-examples | Dump.hs |
module Common.Dump ( dumpWorld, printWorld )
where
import Common.Body
import Common.World
import System.IO
import Data.List
import Text.Printf
import qualified Data.Array.Accelerate as A
-- | Dump the bodies in a world to a file.
--
dumpWorld :: World -> FilePath -> IO ()
dumpWorld world filePat... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/n-body/Common/Dump.hs | haskell | | Dump the bodies in a world to a file.
| Print the bodies in a world to stdout
| Write a world to a handle
| Write a single body to a handle
| Right justify a doc, padding with a given character.
|
module Common.Dump ( dumpWorld, printWorld )
where
import Common.Body
import Common.World
import System.IO
import Data.List
import Text.Printf
import qualified Data.Array.Accelerate as A
dumpWorld :: World -> FilePath -> IO ()
dumpWorld world filePath
= withFile filePath WriteMode
$ \h -> hW... |
0465232703719903ba0190feead39aa4114ca2b0c1055809f22f9d74765d1d11 | unclebob/AdventOfCode2021 | core.clj | (ns day18.core
(:require [clojure.string :as string]
[clojure.math.combinatorics :as combo]))
(defn parse-line [input]
(read-string input))
(defn- cs->s [cs]
(apply str cs))
(defn get-token [s]
(if (empty? s)
nil
(let [s (.trim s)
num (re-find #"^\d+" s)]
(if (nil? num)
... | null | https://raw.githubusercontent.com/unclebob/AdventOfCode2021/8c2068dfbfdbe64955038eed89cede155351a6af/day18/src/day18/core.clj | clojure | (ns day18.core
(:require [clojure.string :as string]
[clojure.math.combinatorics :as combo]))
(defn parse-line [input]
(read-string input))
(defn- cs->s [cs]
(apply str cs))
(defn get-token [s]
(if (empty? s)
nil
(let [s (.trim s)
num (re-find #"^\d+" s)]
(if (nil? num)
... | |
804443e6166bf787802b39898a71c8c92fe5dda87c7fe0315f3ad4b1dab7b893 | haskus/packages | Color.hs | module Haskus.Graphics.Color
( stdObs1931
, stdObs1964
, stdIlluminantA
, stdIlluminantD65
, daylightComponents
)
where
import Data.Ratio
-- | Note [Colors]
-- ~~~~~~~~~~~~~~~
--
-- Source:
-- *
-- *
-- *
--
-- Visible spectrum
-- ================
--
360 nm - > 830 nm in standard air ... | null | https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-graphics/src/lib/Haskus/Graphics/Color.hs | haskell | | Note [Colors]
~~~~~~~~~~~~~~~
Source:
*
*
*
Visible spectrum
================
The frequence of a color is stable across the different physical environment
the water).
=================================
Characterise a light source: radiant power emitted by the light source at
each wave... | module Haskus.Graphics.Color
( stdObs1931
, stdObs1964
, stdIlluminantA
, stdIlluminantD65
, daylightComponents
)
where
import Data.Ratio
360 nm - > 830 nm in standard air ( dry air at 15 ° C and 103125 Pa )
while the wavelength is n't ( e.g. 800 nm is red in the air but 600 nm is red in
Spect... |
cfe76b97ae89183d4567c21459393725385d7473554db30db5000a34c681e42a | ferdinand-beyer/vscode-babashka-tasks | info.clj | (ns tasks.info)
(def github-url "-beyer/vscode-babashka-tasks")
(def version "0.1.1")
| null | https://raw.githubusercontent.com/ferdinand-beyer/vscode-babashka-tasks/d7209112aa8a42d842e138c253cae691e78e9f61/dev/tasks/info.clj | clojure | (ns tasks.info)
(def github-url "-beyer/vscode-babashka-tasks")
(def version "0.1.1")
| |
ed03d72d7fbfeffcd2446c32688536370425332b06a17dbbe56fee0d968fe250 | janestreet/ppx_enumerate | ppx_enumerate.ml | open Base
open Ppxlib
open Ast_builder.Default
let name_of_type_name = function
| "t" -> "all"
| type_name -> "all_of_" ^ type_name
let name_of_type_variable str =
"_" ^ name_of_type_name str
(* Utility functions *)
let enumeration_type_of_td td =
let init =
let tp = core_type_of_type_declaration td in
... | null | https://raw.githubusercontent.com/janestreet/ppx_enumerate/0f7ea7bacfcefeb6c03bcad1cb7033756ae8c5ae/src/ppx_enumerate.ml | ocaml | Utility functions
constrain body rather than pattern | open Base
open Ppxlib
open Ast_builder.Default
let name_of_type_name = function
| "t" -> "all"
| type_name -> "all_of_" ^ type_name
let name_of_type_variable str =
"_" ^ name_of_type_name str
let enumeration_type_of_td td =
let init =
let tp = core_type_of_type_declaration td in
let loc = tp.ptyp_loc ... |
178b5a9251fa21507d94a4fe90f45849887def16967461ad80e1a844e0aa6bc9 | nuprl/gradual-typing-performance | middleman.rkt | #lang racket/base
(require "endpoint.rkt")
(provide (all-from-out "endpoint.rkt"))
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/tools/summarize/test/require-transitive/untyped/middleman.rkt | racket | #lang racket/base
(require "endpoint.rkt")
(provide (all-from-out "endpoint.rkt"))
| |
f8572a43acf8b1ed93280fa2a3174cfce6089a1fb1d83e37f82c131ab11af489 | coccinelle/coccinelle | stdLabels.mli | module Array :
sig
external length : 'a array -> int = "%array_length"
external get : 'a array -> int -> 'a = "%array_safe_get"
external set : 'a array -> int -> 'a -> unit = "%array_safe_set"
external make : int -> 'a -> 'a array = "caml_make_vect"
external create : int -> 'a -> 'a array = "caml_make_vect"
... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/57cbff0c5768e22bb2d8c20e8dae74294515c6b3/bundles/stdcompat/stdcompat-current/interfaces/4.00/stdLabels.mli | ocaml | module Array :
sig
external length : 'a array -> int = "%array_length"
external get : 'a array -> int -> 'a = "%array_safe_get"
external set : 'a array -> int -> 'a -> unit = "%array_safe_set"
external make : int -> 'a -> 'a array = "caml_make_vect"
external create : int -> 'a -> 'a array = "caml_make_vect"
... | |
b5b9b10e2f7c357ebe1063e4cbf5f09d57c0c361374c620133b1420f345165eb | parapluu/Concuerror | assert_tip.erl | @doc Two processes registering with the same name .
@author < >
-module(assert_tip).
-export([scenarios/0]).
-export([exceptional/0]).
-export([test/0]).
-include_lib("eunit/include/eunit.hrl").
scenarios() ->
[{test, inf, dpor}].
exceptional() ->
fun(_Expected, Actual) ->
Cmd = "grep \"you can u... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/assert_tip.erl | erlang | @doc Two processes registering with the same name .
@author < >
-module(assert_tip).
-export([scenarios/0]).
-export([exceptional/0]).
-export([test/0]).
-include_lib("eunit/include/eunit.hrl").
scenarios() ->
[{test, inf, dpor}].
exceptional() ->
fun(_Expected, Actual) ->
Cmd = "grep \"you can u... | |
a6cbc4753fa10d0f120d1827c846f2a4857c1954ce48997e13bf80eaad665865 | MaskRay/OJHaskell | 2.hs | main = print $ sum $ filter even $ takeWhile (<= 4000000) fib
where fib = 1 : 1 : zipWith (+) fib (tail fib)
| null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/2.hs | haskell | main = print $ sum $ filter even $ takeWhile (<= 4000000) fib
where fib = 1 : 1 : zipWith (+) fib (tail fib)
| |
ee539a2e7c7dcc12f8e07d2d1b0f5329470f9721bab43ee241377320466c49bc | alanz/ghc-exactprint | Defer03.hs | module Main where
a :: Int
a = 'p'
main :: IO ()
main = print "No errors!"
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/Defer03.hs | haskell | module Main where
a :: Int
a = 'p'
main :: IO ()
main = print "No errors!"
| |
3d7319b8bf2f34c0064d78cae1cdee18eaa03221b8c65005393f0eeb19a3deb2 | tjammer/raylib-ocaml | textures_rectangle.ml | let width = 800
let height = 450
let position = Raylib.Vector2.create 350.0 280.0
let max_frame_speed = 14
let setup () =
let open Raylib in
init_window width height "raylib [textures] example - texture rectangle";
let scarfy = load_texture "resources/scarfy.png" in
let frame_rec =
Rectangle.create 0.0 0.0... | null | https://raw.githubusercontent.com/tjammer/raylib-ocaml/76955c30d0a776138daeb93bfc73b104aefc6f6d/examples/textures/textures_rectangle.ml | ocaml | let width = 800
let height = 450
let position = Raylib.Vector2.create 350.0 280.0
let max_frame_speed = 14
let setup () =
let open Raylib in
init_window width height "raylib [textures] example - texture rectangle";
let scarfy = load_texture "resources/scarfy.png" in
let frame_rec =
Rectangle.create 0.0 0.0... | |
21bdcf7b7bbfef587c8cdc971e89f550fa6dbaf019e2d420eaaf0d3ed56032a3 | ucsd-progsys/liquidhaskell | UnboundAbsRef.hs | @ LIQUID " --expect - error - containing = apply unbound abstract refinement ` p ` " @
-- ISSUE: this "crashes" without a decent source location
-- You can fix this with the signature `ide :: forall <p :: a -> Prop>. a<p> -> a<p>`
-- but it would be nice to have an error message that pinpoints the location.
-- -progs... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/UnboundAbsRef.hs | haskell | ISSUE: this "crashes" without a decent source location
You can fix this with the signature `ide :: forall <p :: a -> Prop>. a<p> -> a<p>`
but it would be nice to have an error message that pinpoints the location.
-progsys/liquidhaskell/issues/655
@ ide :: a<p> -> a<p> @ | @ LIQUID " --expect - error - containing = apply unbound abstract refinement ` p ` " @
module UnboundAbsRef where
ide x = x
|
4c55916bb01f8fa22baa0a224a29d658112bc296b28805ebfb28ca06e551828d | jarcane/clojurice | migration.clj | ;;;; migration.clj - app.migration
;;; The lifecycle component and handler for database migrations
(ns app.migration
(:require [com.stuartsierra.component :as component]
[ragtime.jdbc :as jdbc]
[ragtime.repl :as repl]))
;; The main lifecycle component for handling migrations.
(defrecord Mig... | null | https://raw.githubusercontent.com/jarcane/clojurice/5036946040031e55479a825f3e438bd447111ba0/src/clj/app/migration.clj | clojure | migration.clj - app.migration
The lifecycle component and handler for database migrations
The main lifecycle component for handling migrations. |
(ns app.migration
(:require [com.stuartsierra.component :as component]
[ragtime.jdbc :as jdbc]
[ragtime.repl :as repl]))
(defrecord Migrations [db-conf migrations]
component/Lifecycle
(start [component]
(let [config {:datastore (jdbc/sql-database db-conf)
:migration... |
338d4f58531e6a98eb3bc210516c7b17424506fd34389ea7da02310224155a52 | cubicle-model-checker/cubicle | translation.ml | (*----------------- Begin manually edited ------------------*)
open Ast
open Global
open Format
module P = Pretty
open Why3
(* TODO: Use Decl.known_map DONE *)
(*---------------------------- Theories ---------------------------*)
let env, config =
(* reads the Why3 config file *)
let config : Whyconf... | null | https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/why/extraction_api/translation.ml | ocaml | ----------------- Begin manually edited ------------------
TODO: Use Decl.known_map DONE
---------------------------- Theories ---------------------------
reads the Why3 config file
the [main] section of the config file
map.Map theory
ref.Ref module
int.Int theory
---------------- Formulas to why da... |
open Ast
open Global
open Format
module P = Pretty
open Why3
let env, config =
let config : Whyconf.config = Whyconf.read_config None in
let main : Whyconf.main = Whyconf.get_main config in
let env : Env.env = Env.create_env (Whyconf.loadpath main) in
env, config
let find th s = Theory.ns_find_ls th.Th... |
c5be8d35c0779ddb70d88e8d4ed385f106828f0cebeb76bac1e92deb86753ef4 | haskellfoundation/matchmaker | Main.hs | module Main where
import Test.Hspec
import qualified DB.OrganisationSpec as OrganisationSpec
import qualified DB.UserSpec as UserSpec
import qualified Web.AccountCreationSpec as AccountCreationSpec
import qualified RepositorySpec as RepositorySpec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
UserSpe... | null | https://raw.githubusercontent.com/haskellfoundation/matchmaker/9cc7ea5e9376dd19c6a45b39267cc23fede72f85/test/Main.hs | haskell | module Main where
import Test.Hspec
import qualified DB.OrganisationSpec as OrganisationSpec
import qualified DB.UserSpec as UserSpec
import qualified Web.AccountCreationSpec as AccountCreationSpec
import qualified RepositorySpec as RepositorySpec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
UserSpe... | |
33923ad7cf9dce8372f2d6bc42b49d39d00b5cfec988345a3ed35048a67ef08e | lynaghk/hicada | compiler.clj | (ns hicada.compiler
"
Hicada - Hiccup compiler aus dem Allgaeu
NOTE: The code for has been forked like this:
weavejester/hiccup -> r0man/sablono -> Hicada.
Note about :array-children? :
Go read the React.createElement() function, it's very short and easy to understand.
Do you see how the children are ju... | null | https://raw.githubusercontent.com/lynaghk/hicada/e6e2b45b162bb4ee3dc275020141c210d2299d55/src/hicada/compiler.clj | clojure | TODO: We should take &env around everything and also expect it as an argument.
If you also want to camelcase string map keys, add string? here:
A fn that will get [tag attr children] and return
[tag attr children] just before emitting.
camelcase style
React native style:
camelcase style
Special optimization: Fo... | (ns hicada.compiler
"
Hicada - Hiccup compiler aus dem Allgaeu
NOTE: The code for has been forked like this:
weavejester/hiccup -> r0man/sablono -> Hicada.
Note about :array-children? :
Go read the React.createElement() function, it's very short and easy to understand.
Do you see how the children are ju... |
d043bc53427f0880c37e34e662818111e108582121b9f10997d0b5ca9d86e91b | dedbox/racket-neuron | drawings.rkt | #lang racket/base
(require pict
pict/convert
racket/class
racket/draw
racket/function
racket/match
scribble/base
(only-in scribble/core make-style)
(only-in scribble/html-properties make-css-addition)
(only-in scribble/manual racket))
(p... | null | https://raw.githubusercontent.com/dedbox/racket-neuron/a8ecafec0c6398c35423348cb02ec229869c8b15/neuron-doc/scribblings/drawings.rkt | racket | (define full-width-style
(make-style
(list (make-css-addition "scribblings/full-width.css"))))
Drawings
Document Structure
Exchanger Operations | #lang racket/base
(require pict
pict/convert
racket/class
racket/draw
racket/function
racket/match
scribble/base
(only-in scribble/core make-style)
(only-in scribble/html-properties make-css-addition)
(only-in scribble/manual racket))
(p... |
ec2ea15288e414775c569abdcd791b85b9159657e4e3e81452c962f518b0575d | nuprl/gradual-typing-performance | main.rkt | #lang racket/base
(require
benchmark-util
"gregor-structs.rkt"
)
(require (only-in "date.rkt"
date=? ;(-> Date Date Boolean)]
date ;(->* (Natural) (Month Natural) Date)]
date->iso8601 ;(-> Date String)]
))
(require (only-in "time.rkt"
time=? ;(-> Time Time Boolean)]
time->iso8601 ;(-> Time Str... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/unsafe/gregor/untyped/main.rkt | racket | (-> Date Date Boolean)]
(->* (Natural) (Month Natural) Date)]
(-> Date String)]
(-> Time Time Boolean)]
(-> Time String)]
(-> DateTime DateTime Boolean)]
(-> DateTime DateTime Boolean)]
(->* (Natural) (Month Natural Natural Natural Natural Natural) DateTime)]
(-> DateTime Time)]
(-> DateTime Date)]
(-> DateTime String)... | #lang racket/base
(require
benchmark-util
"gregor-structs.rkt"
)
(require (only-in "date.rkt"
))
(require (only-in "time.rkt"
( - > * ( Integer ) ( Integer Integer Integer ) Time ) ]
))
(require (only-in "datetime.rkt"
))
(require (only-in "moment.rkt"
( - > * ( Natural ) ( Month Natural Natural Natural Natural N... |
ac32ea0ad14921be76914a99e5375c727ad56055b3fc6b2e1b564f33b373536f | mirage/orm | stress_mutate.ml | pp camlp4orf
type t = { a : int; mutable b : int } with orm
open OUnit
open Printf
open Test_utils
let name = "stress_mutate.db"
let test_mutate () =
let db = t_init name in
let t1 = { a=1; b=0 } in
for i= 0 to 4000 do
t1.b <- i;
t_save db t1;
done
let suite = [
"stress_mutate" >:: test_mutate;
]... | null | https://raw.githubusercontent.com/mirage/orm/24c2e0e3157853b2328d09feacdbe637e34d354c/lib_test/stress_mutate.ml | ocaml | pp camlp4orf
type t = { a : int; mutable b : int } with orm
open OUnit
open Printf
open Test_utils
let name = "stress_mutate.db"
let test_mutate () =
let db = t_init name in
let t1 = { a=1; b=0 } in
for i= 0 to 4000 do
t1.b <- i;
t_save db t1;
done
let suite = [
"stress_mutate" >:: test_mutate;
]... | |
d1506fbe193684dc21ec5000e67eea84e5fa50dd59769642b3491946c6e1191e | day8/re-frame-debux | project.clj | (defproject example "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/clojurescript "1.10.764"
:exclusions [com.google.javascript/closure-compiler-unshaded
org.clojure/google-closure-library
org.... | null | https://raw.githubusercontent.com/day8/re-frame-debux/382b8dc98bb7cd205abd8b8f5f7e2075ebb82c56/example/project.clj | clojure | (defproject example "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/clojurescript "1.10.764"
:exclusions [com.google.javascript/closure-compiler-unshaded
org.clojure/google-closure-library
org.... | |
396d1c55d30bcdf831d1c4fc6b029dd337ee274e0e8c248122118f2234629797 | rvantonder/CryptOSS | css.ml | open Tyxml.Html
let (!) path = link ~rel:[`Stylesheet] ~href:path ()
let cdn =
[ !""
; !""
; !""
] @ [
Unsafe.data {|<meta name="google" value="notranslate">|}
] @ [
Unsafe.data {|
<head profile="">
<link rel="icon"
type="image/png"
href="../static/favicon.png">
|}
]
... | null | https://raw.githubusercontent.com/rvantonder/CryptOSS/acd931433f70fd097930b2e62a294af6d31a2a77/site/css.ml | ocaml | open Tyxml.Html
let (!) path = link ~rel:[`Stylesheet] ~href:path ()
let cdn =
[ !""
; !""
; !""
] @ [
Unsafe.data {|<meta name="google" value="notranslate">|}
] @ [
Unsafe.data {|
<head profile="">
<link rel="icon"
type="image/png"
href="../static/favicon.png">
|}
]
... | |
5d161958b68ea8da6c4590137f511c201ccede1d24ee7767fefb440c2fee974c | elaforge/karya | All.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Hardcoded scale map .
This is to scales as Derive . Call . All is to calls .
This is to scales as Derive.Call.All is to calls.
-}
module Derive.Scale.All (lookup_scale, ... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Derive/Scale/All.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| (scale_id, pattern, doc)
| This is the hardcoded scale map. It is merged with the static config
scale map at startup. | Copyright 2013
| Hardcoded scale map .
This is to scales as Derive . Call . All is to calls .
This is to scales as Derive.Call.All is to calls.
-}
module Derive.Scale.All (lookup_scale, docs, scales, shadowed) where
import qualified Data.Map as Map
import qualified Util.Maps as Maps
import qualifi... |
216844417662f1b723394695df4fd26f31280d4b1fcce33bc6efd2a8a77387aa | Funky-Punky/FPV_SS22_Repetitorium | test.ml | open OUnit
open Assignment
let print_string = Some (fun x -> x)
let enqueue_dequeue_tests =
[
( "enueue and dequeue one element" >:: fun _ ->
let q = MyQueue.create_queue () in
MyQueue.enqueue q 1;
assert_equal (Some 1) (MyQueue.dequeue_opt q) );
( "enueue and dequeue four elements" >:: fu... | null | https://raw.githubusercontent.com/Funky-Punky/FPV_SS22_Repetitorium/098ea18ae35e41bec1cc6b658c1944d89becbb99/ocaml/side_effects_exceptions_file-management_threads/queue/test/test.ml | ocaml | open OUnit
open Assignment
let print_string = Some (fun x -> x)
let enqueue_dequeue_tests =
[
( "enueue and dequeue one element" >:: fun _ ->
let q = MyQueue.create_queue () in
MyQueue.enqueue q 1;
assert_equal (Some 1) (MyQueue.dequeue_opt q) );
( "enueue and dequeue four elements" >:: fu... | |
587e141772ae802f6e280e538605cbda25f2cae99fc6b356ee813036435f1a3b | stevenvar/OMicroB | listLabels.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/stevenvar/OMicroB/e4324d0736ac677b3086741dfdefb0e46775642b/src/stdlib/listLabels.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* List operations .
Some functions are flagged as not tail - recursive . A tail - recursive
... |
260623a3e0b6b09a560f8fe3e617210a5230fb9614413307f453c9fb1f53ce9e | manshengyang/minikanren-ocaml | main.ml | open Mk
open Ck
open Fd
let print_sep name =
print_string (Printf.sprintf "=========%s========\n" name)
let print_s = List.iter (fun t -> print_string ((string_of_logic_term t) ^ "\n"))
let test ?limit:(limit = -1) name f =
let _ = print_sep name in
let q = fresh () in
let s = run limit q (f q) in
print_s ... | null | https://raw.githubusercontent.com/manshengyang/minikanren-ocaml/b99f943b4ca6de2d194ee74a414fd33b67fc5e99/main.ml | ocaml | open Mk
open Ck
open Fd
let print_sep name =
print_string (Printf.sprintf "=========%s========\n" name)
let print_s = List.iter (fun t -> print_string ((string_of_logic_term t) ^ "\n"))
let test ?limit:(limit = -1) name f =
let _ = print_sep name in
let q = fresh () in
let s = run limit q (f q) in
print_s ... | |
bec7b088409d9381d2c627e853897c8f9ada12dfe2be6df28326527f8df6c20a | foreverbell/project-euler-solutions | 43.hs |
import Data.List (permutations, tails)
-- somehow a bit slow
check :: [Integer] -> Integer -> Bool
check [] x = True
check (y:ys) x
| (x `mod` 1000) `mod` y == 0 = check ys (x `div` 10)
| otherwise = False
main = print $ sum $ filter (check [17,13,11,7,5,3,2]) candidate
where candidate = [ read x :: Inte... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/43.hs | haskell | somehow a bit slow |
import Data.List (permutations, tails)
check :: [Integer] -> Integer -> Bool
check [] x = True
check (y:ys) x
| (x `mod` 1000) `mod` y == 0 = check ys (x `div` 10)
| otherwise = False
main = print $ sum $ filter (check [17,13,11,7,5,3,2]) candidate
where candidate = [ read x :: Integer | x <- (permutatio... |
fe00999c5bbc110caaf5f8c55c3e9d86e0930a67e730127a372de2ccca7cfc1b | zytedata/sctools | home.cljs | (ns sctools.home
(:require ["@mui/material/AppBar" :default AppBar]
["@mui/material/Button" :default Button]
["@mui/material/Divider" :default Divider]
["@mui/material/Icon" :default Icon]
["@mui/material/IconButton" :default IconButton]
["@mui/material/List... | null | https://raw.githubusercontent.com/zytedata/sctools/f63cdfea6699a52248fafecac3980a766eee0f62/src/sctools/home.cljs | clojure | Capture the history object into the db so we can call
push/replace state later. | (ns sctools.home
(:require ["@mui/material/AppBar" :default AppBar]
["@mui/material/Button" :default Button]
["@mui/material/Divider" :default Divider]
["@mui/material/Icon" :default Icon]
["@mui/material/IconButton" :default IconButton]
["@mui/material/List... |
32975ceadafa57537ce2f8d870b677d8ab9e7dd6d8ccc3a9aca6731e5e5fbf69 | plops/cl-cpp-generator | cp.lisp | by < > , 2016 - 2017 .
;;;;
;;;; Permission is hereby granted, free of charge, to any person
;;;; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software without restriction ,
;;;; including without limitation the rights to use, copy, modify, merge,
p... | null | https://raw.githubusercontent.com/plops/cl-cpp-generator/a0bba0a6e0e8f34e3e4459508ada1cd0036d9068/cp.lisp | lisp |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
IN NO EVEN... | by < > , 2016 - 2017 .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
MERCH... |
e914c5225fa5f0ea1e919b56cd0e6a5fc30443a150c40ec4d4d1d9bd6bc8c609 | bpiel/guildsman | composite_dataset2.clj | (in-ns 'com.billpiel.guildsman.ops.composite)
;; TODO include :pkgs in macro plans
;; TODO weird macro double-naming thing
TODO do n't scope one - op macros below
(defn- set-ds-props
[plan fields size]
"fields: [{:name :field1 :type :float :shape [1]} ...]"
(update plan :xprops
merge
{:ds... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/src/clj/com/billpiel/guildsman/ops/composite_dataset2.clj | clojure | TODO include :pkgs in macro plans
TODO weird macro double-naming thing
TODO multiply to get size? unless -1, then use original size????
uneccesary??
TODO I'd rather components be an & args thing | (in-ns 'com.billpiel.guildsman.ops.composite)
TODO do n't scope one - op macros below
(defn- set-ds-props
[plan fields size]
"fields: [{:name :field1 :type :float :shape [1]} ...]"
(update plan :xprops
merge
{:ds-fields fields
:ds-size size}))
(defn- copy-ds-props
[target {:... |
21d7ca77bd98db2c9b00b23f0f03f45b9365dd4b04c3ca84e5bbc498541ad676 | sgbj/MaximaSharp | dbsi1e.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/numerical/slatec/dbsi1e.lisp | lisp | Compiled by f2cl version:
"f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $"
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':simple-array)
(:array-slicing nil) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl6.l , v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $ "
" macros.l , v fceac53... |
8f3911679a4a488db2d58372ad0e19f32884b4b4df36a1fec2e3c54dd3715cd4 | ghcjs/ghcjs | chan001.hs | import Test.QuickCheck
import System.IO.Unsafe
import Control.Concurrent.Chan
import Control.Concurrent
import Control.Monad
data Action = NewChan | ReadChan | WriteChan Int | IsEmptyChan | ReturnInt Int
| ReturnBool Bool
deriving (Eq,Show)
main = do
t <- myThreadId
forkIO (threadDelay 10000... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/pkg/base/Concurrent/chan001.hs | haskell | just in case we deadlock
| import Test.QuickCheck
import System.IO.Unsafe
import Control.Concurrent.Chan
import Control.Concurrent
import Control.Monad
data Action = NewChan | ReadChan | WriteChan Int | IsEmptyChan | ReturnInt Int
| ReturnBool Bool
deriving (Eq,Show)
main = do
t <- myThreadId
forkIO (threadDelay 10000... |
d5382d117877181cf5c784de5187f03fc490db80da27a07ddecb1180c18a34b7 | thheller/shadow-cljs | cli_check.clj | (ns shadow.cljs.devtools.server.cli-check
(:import [java.lang ProcessHandle]))
(defn attach [ppid]
(let [pho (ProcessHandle/of (Long/valueOf ppid))]
(when (.isPresent pho)
(let [ph (.get pho)]
(-> (.onExit ph)
(.thenRun (fn []
;; this will trigger the regular s... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/main/shadow/cljs/devtools/server/cli_check.clj | clojure | this will trigger the regular shutdown hooks | (ns shadow.cljs.devtools.server.cli-check
(:import [java.lang ProcessHandle]))
(defn attach [ppid]
(let [pho (ProcessHandle/of (Long/valueOf ppid))]
(when (.isPresent pho)
(let [ph (.get pho)]
(-> (.onExit ph)
(.thenRun (fn []
(System/exit 0)))
))))... |
eac04d10d0a8196102342a3e3f764cef6a112786cf25e92671e985cd26e06308 | abcdw/rde | base.scm | (define-module (gnu home-services base)
#:use-module (gnu home services)
#:use-module (gnu services)
#:use-module (ice-9 match)
#:export (home-generic-service)
#:re-export (simple-service))
(define* (home-generic-service
name
#:key
(description "An auxiliary service.")
(files '())
(pa... | null | https://raw.githubusercontent.com/abcdw/rde/5b8605f421d0b8a9569e43cb6f7e651e7a8f7218/src/gnu/home-services/base.scm | scheme | (define-module (gnu home-services base)
#:use-module (gnu home services)
#:use-module (gnu services)
#:use-module (ice-9 match)
#:export (home-generic-service)
#:re-export (simple-service))
(define* (home-generic-service
name
#:key
(description "An auxiliary service.")
(files '())
(pa... | |
e250a473cd7553d9c46a34ff973ae5354c4d82c19f88d7badf6993e1dfd4a65a | S8A/htdp-exercises | ex385.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 ex385) (read-case-sensitive #t) (teachpacks ((lib "batch-io.rkt" "teachpack" "2htdp"))) (h... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex385.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex385) (read-case-sensitive #t) (teachpacks ((lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "batch-io.rkt" "te... |
8d2e7fedad5e1cd3a78f0a826dce41d5868185a383caccc59b11d3e9c1246052 | chenyukang/eopl | queues.scm |
(define empty-queue
(lambda ()
'()))
(define empty? null?)
(define enqueue
(lambda (q val)
(append q (list val))))
(define dequeue
(lambda (q f)
(f (car q) (cdr q))))
| null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch5/base/queues.scm | scheme |
(define empty-queue
(lambda ()
'()))
(define empty? null?)
(define enqueue
(lambda (q val)
(append q (list val))))
(define dequeue
(lambda (q f)
(f (car q) (cdr q))))
| |
bf2e174abb4e154c32263d6da137fe993b588bf4fa3f4eab5ac42396f74f7c91 | dgtized/shimmers | motion_of_insects.cljs | (ns shimmers.sketches.motion-of-insects
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.common.quil :as cq]
[shimmers.math.probability :as p]
[shimmers.math.vector :as v]
[shimmers.math.verlet-particles :as vp]
[shimm... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/motion_of_insects.cljs | clojure | (ns shimmers.sketches.motion-of-insects
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.common.quil :as cq]
[shimmers.math.probability :as p]
[shimmers.math.vector :as v]
[shimmers.math.verlet-particles :as vp]
[shimm... | |
e87c6df774427952eb5c88bcbe82a79d583b2c687269584983b0d1ed466d8c4d | racket/math | logistic-dist.rkt | #lang typed/racket/base
(require racket/performance-hint
racket/promise
"../../flonum.rkt"
"../unsafe.rkt"
"dist-struct.rkt"
"utils.rkt")
(provide fllogistic-pdf
fllogistic-cdf
fllogistic-inv-cdf
fllogistic-sample
Logistic-Dist logistic-... | null | https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/distributions/logistic-dist.rkt | racket | ===================================================================================================
Distribution object | #lang typed/racket/base
(require racket/performance-hint
racket/promise
"../../flonum.rkt"
"../unsafe.rkt"
"dist-struct.rkt"
"utils.rkt")
(provide fllogistic-pdf
fllogistic-cdf
fllogistic-inv-cdf
fllogistic-sample
Logistic-Dist logistic-... |
c303b86dbae276b32e3d548a8215fdbdc95f36bc8919075e41b7f1e102f85cf8 | fragnix/fragnix | GHC.Integer.hs | {-# LINE 1 "GHC.Integer.hs" #-}
# LANGUAGE CPP #
# LANGUAGE MagicHash #
# LANGUAGE NoImplicitPrelude #
... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/builtins/integer-gmp/GHC.Integer.hs | haskell | # LINE 1 "GHC.Integer.hs" #
|
Module : GHC.Integer.Type
License : BSD3
Stability : provisional
The 'Integer' type.
operations.
* Conversion to other integral types
* Arithmetic operations
* Comparison predicates
** 'Int#'-boolean valued versions of comparision predicates
| These operations ... |
# LANGUAGE CPP #
# LANGUAGE MagicHash #
# LANGUAGE NoImplicitPrelude #
... |
db6c1d5f4a2ce0eec627a2f40d5e7c47c324bcdeb11ef26d3743fb0c8a6c6b3e | softwarelanguageslab/maf | R5RS_scp1_same-structure-2.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((atom? (lambda (x)
(not (pair? x))))
(same-structure? (lambda (l1 l2)
(if (if (atom? l1) (atom? l2) #f)
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_same-structure-2.scm | scheme | Changes:
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
(letrec ((atom? (lambda (x)
(not (pair? x))))
(same-structure? (lambda (l1 l2)
(if (if (atom? l1) (atom? l2) #f)
#t
(if (let ((__or_... |
47bb665577a631f0b24a10ae3b71b06c37a83863e21af74bad48f3f417576c28 | MarcusPlieninger/HtDP_2e_solutions | HtDP_2e_Exercise_020.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_20) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib... | null | https://raw.githubusercontent.com/MarcusPlieninger/HtDP_2e_solutions/1b25b01ee950034c43cc9a907c4eabae2b5e4dbc/HtDP_2e_Exercise_020.rkt | racket | about the language level of this file in a form that our tools can easily process.
Assume i is a number between 0 (inclusive) and the length of the given string (exclusive).
(define (string-delete str i)
(if (or (= i 0) (< i (string-length str)));not assuming anything
(string-append (substring str 0 i) (substr... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname HtDP_2e_Exercise_20) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decim... |
0f1f847ee2ad5b8a7b1335488f6314e9c6c07d5816c6448e8201ea88155f2a78 | janestreet/memtrace_viewer_with_deps | siphash.mli | include Base.Hash.S with type seed = string and type hash_value = int
* [ Siphash ] uses first 16 chars of the [ seed ] string to initialize / reset the hash
state , padding it to the right with zero bytes if it 's too short . The rest of the
string is discarded .
state, padding it to the right with z... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/ppx_hash/runtime-lib/siphash/siphash.mli | ocaml | include Base.Hash.S with type seed = string and type hash_value = int
* [ Siphash ] uses first 16 chars of the [ seed ] string to initialize / reset the hash
state , padding it to the right with zero bytes if it 's too short . The rest of the
string is discarded .
state, padding it to the right with z... | |
2b60311a1942533b939c4c14ccdf31f08b16e9a99cb0a60dae6249a150984b15 | tmfg/mmtis-national-access-point | validation.cljs | (ns ote.ui.validation
"OTE field validation.
A field schema can define a vector of validation rules to apply.
A validation rule is either a function which takes the value to validate
and the whole form data and returns either `nil` (no errors) or a human
readable string description of the validation errors.
... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/cljs/ote/ui/validation.cljs | clojure | validate-rule multimethod implements validation rule checking by keyword name
Parameters:
name = the keyword name of the field
data = the field value
row = the whole form/row (so that rules can be relations between fields)
table = when used in a grid, the whole grid data containing all rows
Valid Finnish Busines... | (ns ote.ui.validation
"OTE field validation.
A field schema can define a vector of validation rules to apply.
A validation rule is either a function which takes the value to validate
and the whole form data and returns either `nil` (no errors) or a human
readable string description of the validation errors.
... |
a259f50e37ba2d954d679112854f07ce6f2fdf92bceb88346addc7beb93b49e0 | mjstewart/rejig | Settings.hs | module Rejig.Settings
where
data ImportDeclQualifiedStyleSource
= QualifiedPre
| QualifiedPost
deriving (Show, Eq)
data SourceLang
= Haskell
| Daml
deriving (Show, Eq)
data Input
= FileInput FilePath
| StdInput String
-- ^ Additional text is to help with any error reporting to describe
-- wha... | null | https://raw.githubusercontent.com/mjstewart/rejig/f359cfba44196671df5210da714e07a5ba64263c/src/Rejig/Settings.hs | haskell | ^ Additional text is to help with any error reporting to describe
what the input is associated to, eg file name. | module Rejig.Settings
where
data ImportDeclQualifiedStyleSource
= QualifiedPre
| QualifiedPost
deriving (Show, Eq)
data SourceLang
= Haskell
| Daml
deriving (Show, Eq)
data Input
= FileInput FilePath
| StdInput String
deriving (Show, Eq)
data Settings = Settings
{ _sInput :: Input
, _ssrcLa... |
0dd43c7a51b47df6cfd2b72745de4e755368909cbfaae66e897bae82f9cc8c4a | crategus/cl-cffi-gtk | color-chooser-dialog.lisp | Example Color Chooser Dialog ( 2021 - 6 - 5 )
;;;;
;;;; Clicking on the drawing area opens a color chooser dialog to select a
;;;; background color for the drawing area. The default palettes are replaced
;;;; for this color chooser dialog.
(in-package :gtk-example)
(let ((message "Click to change the background col... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/b613a266a5f8e7f477b66a33d4df84fbed3dc7bc/demo/gtk-example/color-chooser-dialog.lisp | lisp |
Clicking on the drawing area opens a color chooser dialog to select a
background color for the drawing area. The default palettes are replaced
for this color chooser dialog.
Draw the background color and a hint on the drawing area
Paint the current color on the drawing area
Print a hint on the drawing area
Crea... | Example Color Chooser Dialog ( 2021 - 6 - 5 )
(in-package :gtk-example)
(let ((message "Click to change the background color.")
(bg-color (gdk-rgba-parse "White"))
Color palette with 9 Red RGBA colors
(palette1 (list (gdk-rgba-parse "IndianRed")
(gdk-rgba-parse "LightCoral")
... |
a4e065e8f69468e00589841638bc5ae4cb31e4b84ea30b207089bcd24edc543c | LightAndLight/cbpv | Typecheck.hs | # language DataKinds , GADTs #
# language BangPatterns #
{-# language FlexibleContexts #-}
# language LambdaCase #
{-# language OverloadedStrings #-}
# language RankNTypes #
# language TemplateHaskell #
module Typecheck where
import Control.Lens.Getter (view)
import Control.Lens.Review ((#))
import Control.Lens.Setter... | null | https://raw.githubusercontent.com/LightAndLight/cbpv/8c54deb312eb873c8e21e886aef42e515f9a93e5/src/Typecheck.hs | haskell | # language FlexibleContexts #
# language OverloadedStrings # | # language DataKinds , GADTs #
# language BangPatterns #
# language LambdaCase #
# language RankNTypes #
# language TemplateHaskell #
module Typecheck where
import Control.Lens.Getter (view)
import Control.Lens.Review ((#))
import Control.Lens.Setter (locally)
import Control.Lens.TH (makeClassyPrisms, makeLenses, make... |
0108dff91f84577c8e83ba6da4f4243ee4f006dea060d2ba5681ed94b6cffe16 | kkirstein/ocaml-imgproc | ops.ml | vim : set ft = ts=2 :
*
Ops
Module with some basic image processing functions
@deprecated These function will go to dedicated modules
in future releases .
Author : < >
Ops
Module with some basic image processing functions
@deprecated These function ... | null | https://raw.githubusercontent.com/kkirstein/ocaml-imgproc/9bea2475b2a534c28d436174f789046a8b12ed14/lib/ops.ml | ocaml | extract single line from given image | vim : set ft = ts=2 :
*
Ops
Module with some basic image processing functions
@deprecated These function will go to dedicated modules
in future releases .
Author : < >
Ops
Module with some basic image processing functions
@deprecated These function ... |
45f25411a43f4bb792da5b8a433a15cc6b2e6371a9d03296cbb4365d63b605f6 | alex-gutev/tridash | html.lisp | ;;;; html.lisp
;;;;
;;;; Tridash Programming Language.
Copyright ( C ) 2020
;;;;
;;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;;; (at your opti... | null | https://raw.githubusercontent.com/alex-gutev/tridash/48853919257f512893b5d041afe5d609c48ecd0a/src/backends/wasm/html.lisp | lisp | html.lisp
Tridash Programming Language.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTI... | Copyright ( C ) 2020
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package :tridash.backend.wasm)
(defvar *module-loader-path* "backends/wasm... |
706dede7fb88d3082062580d6a09fef49ccd10996d1c4a7207795434d7ad58dc | ananthakumaran/eopl | 22.clj | Using the define - datatype , implement the stack datatype of ex 2.4
(ns eopl.chap-2.22
(:use clojure.test)
(:use eopl.core.define-datatype))
(defn any? [x]
true)
(define-datatype stack stack?
(empty-stack)
(non-empty-stack
(top any?)
(queue stack?)))
(defn push [s x]
(non-empty-stack x s))
(de... | null | https://raw.githubusercontent.com/ananthakumaran/eopl/876d6c2e44865e2c89a05a683d99a289c71f1487/src/eopl/chap_2/22.clj | clojure | Using the define - datatype , implement the stack datatype of ex 2.4
(ns eopl.chap-2.22
(:use clojure.test)
(:use eopl.core.define-datatype))
(defn any? [x]
true)
(define-datatype stack stack?
(empty-stack)
(non-empty-stack
(top any?)
(queue stack?)))
(defn push [s x]
(non-empty-stack x s))
(de... | |
9f05ab741b41d5d7255a3640d3a5e842532f8cf7b6455ad4e5e2eddcd0f4316b | alexandersgreen/qio-haskell | Qft.hs |
| This module provides an implementation of the Quantum Fourier Transform
in .
module QIO.Qft where
import Data.Monoid as Monoid
import QIO.QioSyn
import QIO.Qio
import QIO.Qdata
| Defines the unitary the represents appliying a Quantum Fourier Transform
-- to the given quantum register.
qft :: [Qbit] -> U
qft... | null | https://raw.githubusercontent.com/alexandersgreen/qio-haskell/2525f5bad5f2f5f278da6cdc4771b08650109d04/QIO/Qft.hs | haskell | to the given quantum register.
| The definition of the QFT unitary makes use of an accumulator, to repeatedly
apply smaller QFTs to the tail of the given quantum register.
need to change this into a conQRec???
e.g. qft [Qbit 0]
= condQ [Qbit 0] (\(b:bs) -> uhad 0 `mappend` mempty)
| The rotation used in the QFT i... |
| This module provides an implementation of the Quantum Fourier Transform
in .
module QIO.Qft where
import Data.Monoid as Monoid
import QIO.QioSyn
import QIO.Qio
import QIO.Qdata
| Defines the unitary the represents appliying a Quantum Fourier Transform
qft :: [Qbit] -> U
qft qs = condQ qs (\bs -> qftAcu qs b... |
7828a0086ccbdababc895b23d06fd115f77f2b4d69fe8724334ca5b97e918412 | cac-t-u-s/om-sharp | boxpatch.lisp | ;============================================================================
; om#: visual programming language for computer-assisted music composition
;============================================================================
;
; This program is free software. For information on usage
; and redistribution, see... | null | https://raw.githubusercontent.com/cac-t-u-s/om-sharp/74aa97891177de1d167aa5963be00f0d453a3bcd/src/visual-language/patch/boxpatch.lisp | lisp | ============================================================================
om#: visual programming language for computer-assisted music composition
============================================================================
This program is free software. For information on usage
and redistribution, see the "... | File author :
(in-package :om)
(defclass OMBoxPatch (OMBoxAbstraction) ())
(defmethod special-box-p ((name (eql 'patch))) t)
(defmethod special-box-p ((name (eql 'p))) t)
(defmethod get-box-class ((self OMPatch)) 'OMBoxPatch)
(defmethod omNG-make-special-box ((reference (eql 'patch)) pos &optional init-args)
... |
ef7d969297287ca52ca7d02d5cdd52822b3df098e33500b3d4b13e0e74a5fbac | TurtleKitty/Vaquero | sys.scm |
(define global-arg-pair
(vaquero-cli-args (command-line-arguments)))
(define shell-exec
(lambda (cmd)
(string-chomp (read-string #f (process cmd)))))
(define sys-env
(let ((get-env-ht (lambda () (alist->hash-table (get-environment-variables)))))
(vaquero-object
(list
'type ... | null | https://raw.githubusercontent.com/TurtleKitty/Vaquero/e1ea4cebf82e7de9cbdbdde4b9db5e5cc040eb71/interpreter/sys.scm | scheme |
(define global-arg-pair
(vaquero-cli-args (command-line-arguments)))
(define shell-exec
(lambda (cmd)
(string-chomp (read-string #f (process cmd)))))
(define sys-env
(let ((get-env-ht (lambda () (alist->hash-table (get-environment-variables)))))
(vaquero-object
(list
'type ... | |
beb30c0bf4bdf5182ec87b0d888080e6cf6f0ee4775c498a99190662371021e3 | xsc/claro | application.cljc | (ns claro.runtime.application
(:require [claro.runtime.state :as state]))
(defn apply-resolved-batches
[state resolvable->value]
(let [apply-fn (state/opt state :apply-fn)
value (state/value state)]
(apply-fn value resolvable->value)))
| null | https://raw.githubusercontent.com/xsc/claro/16db75b7a775a14f3b656362e8ee4f65dd8b0d49/src/claro/runtime/application.cljc | clojure | (ns claro.runtime.application
(:require [claro.runtime.state :as state]))
(defn apply-resolved-batches
[state resolvable->value]
(let [apply-fn (state/opt state :apply-fn)
value (state/value state)]
(apply-fn value resolvable->value)))
| |
3854be3048c7c3e2340136d2429ebc6149b3daf508e3fbf4d9520741fc00010d | ha-mo-we/Racer | rolebox.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*-
Copyright ( c ) 1998 - 2014 ,
, , .
;;; All rights reserved.
Racer is distributed under the following BSD 3 - clause license
;;; Redistribution and use in source and binary forms, with or without
;;; modi... | null | https://raw.githubusercontent.com/ha-mo-we/Racer/d690841d10015c7a75b1ded393fcf0a33092c4de/source/rolebox.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*-
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright notice,
... |
Copyright ( c ) 1998 - 2014 ,
, , .
Racer is distributed under the following BSD 3 - clause license
Neither the name Racer nor the names of its contributors may be used
CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING ,
VOLKER HAARSLEV , RALF MOELLER , NOR FOR ANY
... |
5194d02dad44d0a831d6e8d038769143169ca33ae30298591b9a96d15ebe3e9f | morazanm/fsm | mtape-tm.rkt |
(module mttm racket
(require "constants.rkt" "misc.rkt" "word.rkt")
(provide make-mttm
mttm-get-states
mttm-get-sigma
mttm-get-start
mttm-get-finals
mttm-get-rules
mttm-what-am-i
mttm-get-accept
mttm-apply
mttm-show-... | null | https://raw.githubusercontent.com/morazanm/fsm/0a7e96e8d69cda7d22b8496375d5c792cd5d320d/fsm-core/private/mtape-tm.rkt | racket | Assume: Rules are for k tapes
(display (format "PATHS: ~s\n" paths))
if not a lang recog halt
if lang recog add 'accept
else add 'reject
(dd (display (format "reads: ~s\n" reads)))
(display (format "reads: ~a\n" reads))
(display (format "rule: ~a\n" r))
(display (format "currs: ~a\n" currstate))
(dd (display (forma... |
(module mttm racket
(require "constants.rkt" "misc.rkt" "word.rkt")
(provide make-mttm
mttm-get-states
mttm-get-sigma
mttm-get-start
mttm-get-finals
mttm-get-rules
mttm-what-am-i
mttm-get-accept
mttm-apply
mttm-show-... |
d7fd4582e5b3b6f9b2764dc3a3afd79c4062af168985d5859fd0fbe9781b3ed8 | google-research/dex-lang | Occurrence.hs | Copyright 2022 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- -source/licenses/bsd
{-# LANGUAGE StrictData #-}
# LANGUAGE UndecidableInstances #
module Occurrence where
import Prelude hiding (abs, iterate, max, sum)
import Prelude quali... | null | https://raw.githubusercontent.com/google-research/dex-lang/2e7bcda20a853e0764dc53991d495ae94e9a24b2/src/lib/Occurrence.hs | haskell |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
-source/licenses/bsd
# LANGUAGE StrictData #
=== Use Analysis ===
know whether inlining it is guaranteed to conserve work and code
size.
is more subtle. Inlining the computation of x into
for i. x
inlinin... | Copyright 2022 Google LLC
# LANGUAGE UndecidableInstances #
module Occurrence where
import Prelude hiding (abs, iterate, max, sum)
import Prelude qualified
import Control.Monad.State.Strict
import Data.Hashable
import Data.IntMap.Strict qualified as M
import Data.List (foldl')
import Data.Store (Store (..))
impor... |
7bda3d1268536ff1ac6bf5d1841fcd60ee61370d29a916497809bd2c849132b1 | HCADatalab/powderkeg | docker.clj | (ns powderkeg.docker
(:require [powderkeg.core :as keg]
[clojure.test :refer :all]
[clojure.java.shell :refer [sh]]
[clojure.string :as s]))
(defmacro timing [log-prefix & body]
`(do
(println (str ~log-prefix " starting"))
(let [start# (System/currentTimeMillis)
... | null | https://raw.githubusercontent.com/HCADatalab/powderkeg/5629e9314d0f5bd7db0b33bcf1683a45a8303c54/test/powderkeg/docker.clj | clojure | (ns powderkeg.docker
(:require [powderkeg.core :as keg]
[clojure.test :refer :all]
[clojure.java.shell :refer [sh]]
[clojure.string :as s]))
(defmacro timing [log-prefix & body]
`(do
(println (str ~log-prefix " starting"))
(let [start# (System/currentTimeMillis)
... | |
122d771ef8c68fc568bf689fefc2d3d89e431e1f9dbcea045ad2941e9377e7e2 | cxphoe/SICP-solutions | 3.75.rkt | (define (make-zero-crossings input-stream last-value last-avpt)
(let ((avpt (/ (+ (stream-car input-stream) last-value) 2)))
(cons-stream (sign-change-detector avpt last-avpt)
(make-zero-crossings (stream-cdr input-stream)
(stream-car input-stream)
... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%203-Modeling%20with%20Mutable%20Data/5.Stream/3.75.rkt | racket | (define (make-zero-crossings input-stream last-value last-avpt)
(let ((avpt (/ (+ (stream-car input-stream) last-value) 2)))
(cons-stream (sign-change-detector avpt last-avpt)
(make-zero-crossings (stream-cdr input-stream)
(stream-car input-stream)
... | |
d775460e80fc661a4ec5f26f0a0616e389651d97999b993930dd16a00bd2101d | jeffshrager/biobike | load.lisp | ;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: user; -*-
(in-package :cl-user)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | |
;;; | Permission is... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Analysis/load.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: user; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and a... |
(in-package :cl-user)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject t... |
627cd5b1233cfa19f4d99672ba84088038e3f3ad2e986c844de3bae0ad099289 | folivetti/Category4Programmers | Monoids.hs | class Monoid' m where
mempty' :: m
mappend' :: m -> m -> m
instance Monoid' Int where
mempty' = 1
mappend' = (*)
main = do
let x = 2 :: Int
y = 3 :: Int
print (mappend' x y)
| null | https://raw.githubusercontent.com/folivetti/Category4Programmers/b002b7eeeddf272ca94bd2467db535e0ad268176/CategoriesExamples/Monoids.hs | haskell | class Monoid' m where
mempty' :: m
mappend' :: m -> m -> m
instance Monoid' Int where
mempty' = 1
mappend' = (*)
main = do
let x = 2 :: Int
y = 3 :: Int
print (mappend' x y)
| |
f9cfef508dacf41464c8cfd4f8975457a79f8cde1969fe848e9d0d618d31e018 | LuKC1024/stacker | utilities.rkt | #lang racket
(provide (all-defined-out))
(require racket/sandbox)
(define (eval-in-stacker/smol program)
(parameterize ([sandbox-output 'string]
[sandbox-eval-limits (list 10 #f)]
[sandbox-propagate-exceptions #f]
(sandbox-path-permissions
(list*
... | null | https://raw.githubusercontent.com/LuKC1024/stacker/7e154ef19a4722628a7d02e660fe18f3cbf6cd69/tests/utilities.rkt | racket | sandbox-propagate-exceptions fails to catch some errors (e.g. `(defvar equal? equal?)`) | #lang racket
(provide (all-defined-out))
(require racket/sandbox)
(define (eval-in-stacker/smol program)
(parameterize ([sandbox-output 'string]
[sandbox-eval-limits (list 10 #f)]
[sandbox-propagate-exceptions #f]
(sandbox-path-permissions
(list*
... |
3120321f6e3af1cbfafe9a82e196371e3d287416a6fc617ea63ce5789b93dbef | janestreet/hardcaml | cyclesim_float_ops_intf.ml | open! Base
module type Real = sig
val database : Combinational_ops_database.t
val ( +: ) : Signal.t -> Signal.t -> Signal.t
val ( -: ) : Signal.t -> Signal.t -> Signal.t
val ( *: ) : Signal.t -> Signal.t -> Signal.t
val ( /: ) : Signal.t -> Signal.t -> Signal.t
val ( %: ) : Signal.t -> Signal.t -> Signal.t... | null | https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/src/cyclesim_float_ops_intf.ml | ocaml | open! Base
module type Real = sig
val database : Combinational_ops_database.t
val ( +: ) : Signal.t -> Signal.t -> Signal.t
val ( -: ) : Signal.t -> Signal.t -> Signal.t
val ( *: ) : Signal.t -> Signal.t -> Signal.t
val ( /: ) : Signal.t -> Signal.t -> Signal.t
val ( %: ) : Signal.t -> Signal.t -> Signal.t... | |
1c729303e339b36e1401c707f3a3105d6ca4ca7c0fb8359cb6c09a0ba1298331 | tsloughter/kuberl | kuberl_v2beta1_metric_status.erl | -module(kuberl_v2beta1_metric_status).
-export([encode/1]).
-export_type([kuberl_v2beta1_metric_status/0]).
-type kuberl_v2beta1_metric_status() ::
#{ 'external' => kuberl_v2beta1_external_metric_status:kuberl_v2beta1_external_metric_status(),
'object' => kuberl_v2beta1_object_metric_status:kuberl_v2beta1... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v2beta1_metric_status.erl | erlang | -module(kuberl_v2beta1_metric_status).
-export([encode/1]).
-export_type([kuberl_v2beta1_metric_status/0]).
-type kuberl_v2beta1_metric_status() ::
#{ 'external' => kuberl_v2beta1_external_metric_status:kuberl_v2beta1_external_metric_status(),
'object' => kuberl_v2beta1_object_metric_status:kuberl_v2beta1... | |
36910513f96f8563e2b4160aa6956279d469b38cc26989c27672d07c1acd8813 | edgurgel/poxa-erlang | poxa.erl | -module(poxa).
-export([start/0]).
start() ->
ok = application:start(crypto),
ok = application:start(ranch),
ok = application:start(cowboy),
ok = application:start(gproc),
ok = application:start(erlsha2),
ok = lager:start(),
ok = application:start(poxa).
| null | https://raw.githubusercontent.com/edgurgel/poxa-erlang/27eb8671b772a0cb0880782d9b69230690fd28f4/src/poxa.erl | erlang | -module(poxa).
-export([start/0]).
start() ->
ok = application:start(crypto),
ok = application:start(ranch),
ok = application:start(cowboy),
ok = application:start(gproc),
ok = application:start(erlsha2),
ok = lager:start(),
ok = application:start(poxa).
| |
9d9e80d973a52653c30fa5d19baec2c1cabe4368c5dcf9f2491f1622ee7d0048 | phoityne/haskell-debug-adapter | ControlSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Haskell.Debug.Adapter.ControlSpec where
import Test.Hspec
import Data.Aeson
import Control.Concurrent (threadDelay)
import qualified System.IO as S
import Control.Concurrent.Async
import Data.Default
import Spec.Utility
import qualified Haskell.DAP as DAP
import Haskell.Deb... | null | https://raw.githubusercontent.com/phoityne/haskell-debug-adapter/901a0174fea5c9c6dceb39a03bc54c5d704737e9/test/Haskell/Debug/Adapter/ControlSpec.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
module Haskell.Debug.Adapter.ControlSpec where
import Test.Hspec
import Data.Aeson
import Control.Concurrent (threadDelay)
import qualified System.IO as S
import Control.Concurrent.Async
import Data.Default
import Spec.Utility
import qualified Haskell.DAP as DAP
import Haskell.Debug.Adapter.Control
spec :: Spec
sp... |
12ff01f077475ae735736c3da77beefe162ea7adecea1299a15a94cb155ccd6b | webyrd/mediKanren | process-db.rkt | #lang racket
;; Racket code to process the osteoporosis database, turning it into classy (but unnormalized) s-expressions using Racket.
;; -lang.org/csv-reading/index.html
;; -reading/
;; -to-download-and-parse-a-csv-file-in-racket
(require (planet neil/csv:2:0) net/url)
change me to point to your directory !
... | null | https://raw.githubusercontent.com/webyrd/mediKanren/a2b80ea94f66bcdd4305b9369ad4184c2afe9829/attic/code/process-db.rkt | racket | Racket code to process the osteoporosis database, turning it into classy (but unnormalized) s-expressions using Racket.
-lang.org/csv-reading/index.html
-reading/
-to-download-and-parse-a-csv-file-in-racket | #lang racket
(require (planet neil/csv:2:0) net/url)
change me to point to your directory !
(define ncats_proposal-location "/Users/webyrd/github/")
(define iver-url
(string->url
(string-append "file://" ncats_proposal-location "ncats_proposal/ncats-proof-of-concept/raw-data/semmedVER30_A_clean.C0029456... |
0badfe48070c421255db245a5c70f5ae0dae6451024a19cf9e3647171e3ff531 | racket/typed-racket | submodule-struct-1.rkt | #;
(exn-pred exn:fail:contract? #rx"shape-check")
#lang typed/racket/shallow
;; Send a non-struct value across,
;; expect shape-check error
(module u racket/base
(struct posn [x y])
(define origin 'not-posn)
(provide origin (struct-out posn)))
(require/typed 'u
(#:struct posn ((x : Real) (y : Real)))
(ori... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/fail/shallow/submodule-struct-1.rkt | racket |
Send a non-struct value across,
expect shape-check error | (exn-pred exn:fail:contract? #rx"shape-check")
#lang typed/racket/shallow
(module u racket/base
(struct posn [x y])
(define origin 'not-posn)
(provide origin (struct-out posn)))
(require/typed 'u
(#:struct posn ((x : Real) (y : Real)))
(origin posn))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.