_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 |
|---|---|---|---|---|---|---|---|---|
d053219e8d1d7e2b814716a8666e6b6f155e2b2df5a2ece9d144af904207fffe | andreer/lispbox | asdf-extensions.lisp | (defpackage :com.gigamonkeys.asdf-extensions
(:use :cl :asdf)
(:export :register-source-directory))
(in-package :com.gigamonkeys.asdf-extensions)
;;; Method for finding ASD files that doesn't depend on symlinks.
(defvar *top-level-directories* ())
(defun sysdef-crawl-directories (system)
(let ((name (asdf::c... | null | https://raw.githubusercontent.com/andreer/lispbox/215de614dc7ba693b5578f6b149465aa47718f60/asdf-extensions.lisp | lisp | Method for finding ASD files that doesn't depend on symlinks.
Build FASLs into a implementation specific directory.
Static files
so we have to inline it here.
`dirname' should simply be a pathname that
form just the way we want.
OpenMCl by default doesn't return subdirectories at all. But
when prodded to do so... | (defpackage :com.gigamonkeys.asdf-extensions
(:use :cl :asdf)
(:export :register-source-directory))
(in-package :com.gigamonkeys.asdf-extensions)
(defvar *top-level-directories* ())
(defun sysdef-crawl-directories (system)
(let ((name (asdf::coerce-name system)))
(block found
(flet ((found-p (file)... |
b4be1623722433b8720811dca7e58ee935ecee3f985409f31957e56b584ccbf8 | GaloisInc/cryptol | Env.hs | -- |
Module : . Eval . Env
Copyright : ( c ) 2013 - 2016 Galois , Inc.
-- License : BSD3
-- Maintainer :
-- Stability : provisional
-- Portability : portable
# LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
module Cryptol.Eval.Env ... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/8cca24568ad499f06032c2e4eaa7dfd4c542efb6/src/Cryptol/Eval/Env.hs | haskell | |
License : BSD3
Maintainer :
Stability : provisional
Portability : portable
# LANGUAGE DeriveAnyClass #
Evaluation Environment ------------------------------------------------------
| Evaluation environment with no bindings
| Bind a variable in the evaluation environment.
| Bind a variable to a va... | Module : . Eval . Env
Copyright : ( c ) 2013 - 2016 Galois , Inc.
# LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE DeriveGeneric #
module Cryptol.Eval.Env where
import Cryptol.Backend
import Cryptol.Eval.Prims
import Cryptol.Eval.Type
import Cryptol.Eval.Value
import Cryptol.ModuleSystem.... |
cf15deac3f6b6201f8881132a698b8dbf4a3d39b5241e03fea7070b17c64f632 | synduce/Synduce | count_lt.ml | * @synduce -NB -n 10
type 'a tree =
| Leaf of 'a
| Node of 'a * 'a tree * 'a tree
type 'a tree_memo =
| MLeaf of int * 'a
| MNode of int * 'a * 'a tree_memo * 'a tree_memo
let rec is_memo_count_lt_2 = function
| MLeaf (n, a) -> n >= 0 && if a < 2 then n = 1 else n = 0
| MNode (n, a, l, r) ->
n >= 0
... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/constraints/memo/count_lt.ml | ocaml | * @synduce -NB -n 10
type 'a tree =
| Leaf of 'a
| Node of 'a * 'a tree * 'a tree
type 'a tree_memo =
| MLeaf of int * 'a
| MNode of int * 'a * 'a tree_memo * 'a tree_memo
let rec is_memo_count_lt_2 = function
| MLeaf (n, a) -> n >= 0 && if a < 2 then n = 1 else n = 0
| MNode (n, a, l, r) ->
n >= 0
... | |
f339f7c8949ac78af726ec497a3ee0d06f70d7462f7bd43730f2c5f9f844b231 | tmattio/dream-encoding | accept.mli | From -httpadapter/blob/master/src/http.mli
Copyright ( c ) 2019 < >
Permission to use , copy , modify , and distribute this software for any purpose
with or without fee is hereby granted , provided that the above copyright
notice and this permission notice appear in all copies .
THE SOF... | null | https://raw.githubusercontent.com/tmattio/dream-encoding/0085ff4115f66723bd35d275f98c14075ffa7327/lib/accept.mli | ocaml | * Accept-Encoding HTTP header parsing and generation
* Lists, annotated with qualities. | From -httpadapter/blob/master/src/http.mli
Copyright ( c ) 2019 < >
Permission to use , copy , modify , and distribute this software for any purpose
with or without fee is hereby granted , provided that the above copyright
notice and this permission notice appear in all copies .
THE SOF... |
1653028e89dfe36179bbf3fe18df6b5184f67975f543759693dfdf726b192e73 | pedestal/samples | behavior.clj | Copyright 2013 Relevance , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; 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 licens... | null | https://raw.githubusercontent.com/pedestal/samples/caaf04afe255586f8f4e1235deeb0c1904179355/chat/chat-client/app/src/chat_client/behavior.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.
T... | Copyright 2013 Relevance , Inc.
Eclipse Public License 1.0 ( )
(ns ^:shared chat-client.behavior
(:require [clojure.string :as string]
[io.pedestal.app :as app]
[io.pedestal.app.dataflow :as d]
[io.pedestal.app.util.platform :as platform]
[io.pedestal.a... |
b76376bfc692b1643bb15f05ac0673bb49f908818f6e738db4fa01a7512a5d81 | bldl/magnolisp | type-infer.rkt | #lang racket/base
#|
|#
(require racket/contract/base
racket/dict
racket/function
racket/list
racket/match
racket/set
"ir-ast.rkt"
"ir-transform.rkt"
"strategy-stratego.rkt"
"strategy.rkt"
"util.rkt")
;;;
;;; utilities
;;;
(... | null | https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/type-infer.rkt | racket |
utilities
Augments type expression `t` with the type facts available in `h`.
Intended for more informative reporting of type errors.
generics specialization
the particular instantiation of the relevant universal type
parameters.
init with fresh type variables
referring to a fresh type variable. Fo... | #lang racket/base
(require racket/contract/base
racket/dict
racket/function
racket/list
racket/match
racket/set
"ir-ast.rkt"
"ir-transform.rkt"
"strategy-stratego.rkt"
"strategy.rkt"
"util.rkt")
(define (lookup-def-from-defs d... |
62c3c35ab81110aea8ae9200d4af9abdde1537058899ca8c8a3fbc878fe12c55 | iskandr/parakeet-retired | SSA_Analysis.ml | (* pp: -parser o pa_macro.cmo *)
open Base
open PhiNode
open TypedSSA
type direction = Forward | Backward
(* 'a = environment, *)
(* 'b = information about value nodes *)
(* 'c = information about exp nodes *)
type ('a, 'b) helpers = {
eval_block : 'a -> block -> 'a * bool;
eval_stmt : 'a -> stmt_node -> 'a opti... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/SSA/SSA_Analysis.ml | ocaml | pp: -parser o pa_macro.cmo
'a = environment,
'b = information about value nodes
'c = information about exp nodes
should analysis be repeated until environment stops changing?
by default don't do anything to the env
evaluate rhs for possible side effects
evaluate for side effects |
open Base
open PhiNode
open TypedSSA
type direction = Forward | Backward
type ('a, 'b) helpers = {
eval_block : 'a -> block -> 'a * bool;
eval_stmt : 'a -> stmt_node -> 'a option;
eval_values : 'a -> value_node list -> 'b list;
iter_exp_children : 'a -> exp_node -> unit;
iter_values : 'a -> value_node lis... |
c93793458221f3859b9540f6eee3c4780783071ae4aa6465ad6445619fb61bf9 | dyzsr/ocaml-selectml | main.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/lex/main.ml | 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
open Syntax
let ml_automata = ref false
let source_name = ref None
let output_name = ref None
let usag... |
b08f5da5ee85f7dbdbc4d60bd973cd55870f6a755d2b8cfbd56d3262331cd35e | stathissideris/positano | fun.clj | (ns positano.integration-test4.fun)
(defn baz [x]
(inc x))
(defn bar [x]
(* (baz (/ x 2.0)) 3))
(defn foo
"I don't do a whole lot."
[x]
(println "Hello, World!")
(bar (first x)))
| null | https://raw.githubusercontent.com/stathissideris/positano/ca5126714b4bcf108726d930ab61a875759214ae/test/positano/integration_test4/fun.clj | clojure | (ns positano.integration-test4.fun)
(defn baz [x]
(inc x))
(defn bar [x]
(* (baz (/ x 2.0)) 3))
(defn foo
"I don't do a whole lot."
[x]
(println "Hello, World!")
(bar (first x)))
| |
76879b83726fb72b98ff5b9ce0d78c6488e9c965ca6f3487c62bfa6ae1da3c83 | gregr/ina | extended-test.scm | ((require language:base module:base-primitive module:base language:extended
premodule module:premodule module-apply namespace-link* test))
(define ns (namespace-link* '() (list module:base-primitive module:base)))
(define name=>lang (list (cons 'base language:base)
(cons 'extended la... | null | https://raw.githubusercontent.com/gregr/ina/5e0a5b7ec44c8c9575b22ce5c394f7a96b766545/nscheme/old/old-5/lib/extended-test.scm | scheme | ((require language:base module:base-primitive module:base language:extended
premodule module:premodule module-apply namespace-link* test))
(define ns (namespace-link* '() (list module:base-primitive module:base)))
(define name=>lang (list (cons 'base language:base)
(cons 'extended la... | |
60f4d02bc614a3c06479ebc67d1efa64c0d67c755b914a130a0ca5c6415f922e | backtracking/ocaml-bazaar | arrays.ml |
(** Additional functions over arrays *)
let build n f =
if n = 0 then [||] else
let a = Array.make n (f (fun _ -> invalid_arg "build") 0) in
for i = 1 to n - 1 do
let get j = if j < 0 || j >= i then invalid_arg "build"; a.(j) in
a.(i) <- f get i
done;
a
type color = Undefined | Inprogress | Defined... | null | https://raw.githubusercontent.com/backtracking/ocaml-bazaar/e7bab112f29840593c3b59b70162af73a7d6a607/arrays.ml | ocaml | * Additional functions over arrays
sentinel |
let build n f =
if n = 0 then [||] else
let a = Array.make n (f (fun _ -> invalid_arg "build") 0) in
for i = 1 to n - 1 do
let get j = if j < 0 || j >= i then invalid_arg "build"; a.(j) in
a.(i) <- f get i
done;
a
type color = Undefined | Inprogress | Defined
let fix n f =
let a = ref [||] in
... |
17ac9dc003ed550a4f3f226c9a3c0f38fc3afaf36ffe75a40996a949eb506bce | ghcjs/ghcjs | num010.hs |
module Main(main) where
main = sequence_ [ f x y | x <- [0,
1000,
> 2 ^ 32
> 2 ^ 64
-1000,
< -2 ^ 32
< -2 ^ 64
, y <- [0, -10, 10] ]
f :: Integer -> Int -> IO ()
f x y = do putStrLn "------------------------"
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/pkg/base/Numeric/num010.hs | haskell | let f :: Float
f = encodeFloat x y
(xf, yf) = decodeFloat f
print f
print xf
print yf |
module Main(main) where
main = sequence_ [ f x y | x <- [0,
1000,
> 2 ^ 32
> 2 ^ 64
-1000,
< -2 ^ 32
< -2 ^ 64
, y <- [0, -10, 10] ]
f :: Integer -> Int -> IO ()
f x y = do putStrLn "------------------------"
... |
8daed808e2453f1aaa06727d01df592fe0a023ff6d8f28a717219a80fd2eea53 | alanz/ghc-exactprint | MatchSemis.hs | module MatchSemis where
{
a 0 = 1;
a _ = 2;
}
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/103bc706c82300639985a15ba6cf762316352c92/tests/examples/ghc92/MatchSemis.hs | haskell | module MatchSemis where
{
a 0 = 1;
a _ = 2;
}
| |
97928c828c5015980a743a91ebb11a394995a6302d9a336f8849f0374747c7b2 | agda/agda | Definitions.hs | {-# LANGUAGE GADTs #-}
| Preprocess ' Agda . Syntax . Concrete . Declaration 's , producing ' NiceDeclaration 's .
--
-- * Attach fixity and syntax declarations to the definition they refer to.
--
-- * Distribute the following attributes to the individual definitions:
-- @abstract@,
-- @... | null | https://raw.githubusercontent.com/agda/agda/c71e83595629789b963fa5a8a1c42180f05a6956/src/full/Agda/Syntax/Concrete/Definitions.hs | haskell | # LANGUAGE GADTs #
* Attach fixity and syntax declarations to the definition they refer to.
* Distribute the following attributes to the individual definitions:
@abstract@,
@instance@,
@postulate@,
@primitive@,
@private@,
termination pragmas.
* Expand ... |
| Preprocess ' Agda . Syntax . Concrete . Declaration 's , producing ' NiceDeclaration 's .
* Gather the function clauses belonging to one function definition .
first constructor for the data sig in question occured
all as a fundef at the position in the block where the first such fun
when ... |
c4f1c4c534e478e2344ee893005c99382336b06c2febc5f0448257b72666bb8b | clojure-lsp/clojure-lsp | pod_test.clj | (ns clojure-lsp.pod-test
(:require
[babashka.pods :as pods]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :refer [deftest is testing]]))
(def pod-spec (if (= "native" (System/getenv "CLOJURE_LSP_TEST_ENV"))
["../clojure-lsp"]
(if (str/starts-with? (System... | null | https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/7a10a24affb6bdb50ab34c61b4dbbc98aeb6ee3f/cli/pod-test/clojure_lsp/pod_test.clj | clojure | (ns clojure-lsp.pod-test
(:require
[babashka.pods :as pods]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :refer [deftest is testing]]))
(def pod-spec (if (= "native" (System/getenv "CLOJURE_LSP_TEST_ENV"))
["../clojure-lsp"]
(if (str/starts-with? (System... | |
970f64bbbd065d30ee6cf961b2ef0715fa8cfd08b164fca415b6b1f9baa8c664 | imitator-model-checker/imitator | AlgoBCCoverDistributedSubdomainStatic.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : Classical Beh... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/AlgoBCCoverDistributedSubdomainStatic.mli | ocaml | **********************************************************
Modules
**********************************************************
**********************************************************
Class definition
**********************************************************
*******************************************************... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : Classical Beh... |
0b8e3c2d6c016396560543b7fa80630dc1768cd96919e452385f5c3e9783990f | kelamg/HtDP2e-workthrough | ex166.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 ex166) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Arbitrarily-Large-Data/ex166.rkt | racket | about the language level of this file in a form that our tools can easily process.
A (piece of) Work is a structure:
interpretation (make-work n r h) combines the name
– '()
– (cons Work Low)
interpretation an instance of Low represents the
hours worked for a number of employees
A Paycheck is a structure:
-... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex166) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct work [employee rate hours])
( make - work Stri... |
97ccc6e06424218b04b4d9bd24626258bed48c0482d273efd1c4195c873a9e58 | Decentralized-Pictures/T4L3NT | state.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/lib_time_measurement/runtime/state.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
4d19a1426b80b4574d0be6a8750db4793985f433a747140942d8a7afeb0ec46d | byorgey/AoC | 25.hs | #!/usr/bin/env stack
-- stack --resolver lts-18.18 script
import Control.Arrow ((***), (>>>))
import Data.Array.Unboxed (UArray, (!))
import qualified Data.Array.Unboxed as U
import Data.Function (on)
import Data.List (findIndex, groupBy)
import Data... | null | https://raw.githubusercontent.com/byorgey/AoC/d496593ec5c6487e180d1df4457ef8764ba30af2/2021/25/25.hs | haskell | stack --resolver lts-18.18 script
---------------------------------------------------------- | #!/usr/bin/env stack
import Control.Arrow ((***), (>>>))
import Data.Array.Unboxed (UArray, (!))
import qualified Data.Array.Unboxed as U
import Data.Function (on)
import Data.List (findIndex, groupBy)
import Data.Maybe (fromJust)
main = int... |
c0b2280b7b6d3f6dc242860497be8dc504a71cf5ce44146a7becadc1d1d1da89 | racket/typed-racket | pr226-variation-2.rkt | #lang typed/racket/optional
Chaperoned struct predicates must be wrapped in a contract .
;; (Even though `struct-predicate-procedure?` will return
;; true for these values)
(module untyped racket
(struct s ())
(define s?? (chaperone-procedure s? (lambda (x) (x) x)))
;; provide enough names to trick #:struct
... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/optional/pr226-variation-2.rkt | racket | (Even though `struct-predicate-procedure?` will return
true for these values)
provide enough names to trick #:struct | #lang typed/racket/optional
Chaperoned struct predicates must be wrapped in a contract .
(module untyped racket
(struct s ())
(define s?? (chaperone-procedure s? (lambda (x) (x) x)))
(provide s struct:s (rename-out [s?? s?])))
(require/typed 'untyped
[#:struct s ()])
(define (fail-if-called)
(error 'pr2... |
b7cdeb2a7e5abfff4d122ea57686f7b4e0bc193c6aa13b1b94f88b6d32ccc93a | FundingCircle/fc4-framework | model_test.clj | (ns fc4.dsl.model-test
(:require [clojure.test :refer [deftest]]
[fc4.dsl.model :as dm]
[fc4.test-utils :refer [check]]))
(deftest parse-file (check `dm/parse-file 100))
(deftest validate-parsed-file (check `dm/validate-parsed-file 100))
20 is a really low number of test cases , but it tak... | null | https://raw.githubusercontent.com/FundingCircle/fc4-framework/674af39e7edb2cbfd3e1941e6abe80fd87d93bed/test/fc4/dsl/model_test.clj | clojure | worth looking into speeding up this test. | (ns fc4.dsl.model-test
(:require [clojure.test :refer [deftest]]
[fc4.dsl.model :as dm]
[fc4.test-utils :refer [check]]))
(deftest parse-file (check `dm/parse-file 100))
(deftest validate-parsed-file (check `dm/validate-parsed-file 100))
20 is a really low number of test cases , but it tak... |
7e747ee5ff0629bd55fa6689b06436b89aed770fcc6218de73cfd426c0a2ef4e | babashka/babashka | main.clj | (ns my.main
(:require [my.impl1 :as impl1] ;; my.impl is already loaded, so it will not be loaded again (normally)
;; but my.impl2 also loads my.impl
[my.impl2]))
;; top-level requires are also supported
(require '[my.impl3 :refer [foo]])
(defn -main [& args]
;; this function is defined no... | null | https://raw.githubusercontent.com/babashka/babashka/3dfc15f5a40efaec07cba991892c1207a352fab4/test-resources/babashka/uberscript/src/my/main.clj | clojure | my.impl is already loaded, so it will not be loaded again (normally)
but my.impl2 also loads my.impl
top-level requires are also supported
this function is defined non-top-level and may cause problems
this should just return args | (ns my.main
[my.impl2]))
(require '[my.impl3 :refer [foo]])
(defn -main [& args]
(foo)
(impl1/impl-fn args))
|
f6b2ab95182a21a29fdb6240497f3b41c62ca54ba62004e205bf976da0ee215a | Factual/s3-journal | s3_journal_test.clj | (ns s3-journal-test
(:require
[clojure.java.shell :as sh]
[byte-streams :as bs]
[clojure.test :refer :all]
[s3-journal :as s]
[s3-journal.s3 :as s3])
(:import
[com.amazonaws.services.s3.model
GetObjectRequest
S3Object]
[com.amazonaws.services.s3
AmazonS3Client]))
(defn so... | null | https://raw.githubusercontent.com/Factual/s3-journal/5a09abd47d9595b3ae8df35c665ad806a9dffd8e/test/s3_journal_test.clj | clojure | (ns s3-journal-test
(:require
[clojure.java.shell :as sh]
[byte-streams :as bs]
[clojure.test :refer :all]
[s3-journal :as s]
[s3-journal.s3 :as s3])
(:import
[com.amazonaws.services.s3.model
GetObjectRequest
S3Object]
[com.amazonaws.services.s3
AmazonS3Client]))
(defn so... | |
990e2e8f233f4d4fcc6ed48c1d0f84da06d1d80bfa8d111c5d725a60e25c5e08 | jumarko/clojure-experiments | 02_inventory_management.clj | (ns advent-of-clojure.2018.02-inventory-management
""
(:require [clojure.test :refer [deftest testing is]]
[advent-of-clojure.2018.input :as io]))
Inventory management system
Year 1518 : Warehouse boxes
Puzzle 1 : Count checksum of candidate boxes
;;; Simply scan find number of boxes with an ID... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/advent_of_code/advent_2018/02_inventory_management.clj | clojure | Simply scan find number of boxes with an ID containing any of letters repeating twice;
--------
===============================================================================
let's start with frequencies
what if I use only vals and make them sets?
sum twos
let's put it together
first create a skeleton + simpl... | (ns advent-of-clojure.2018.02-inventory-management
""
(:require [clojure.test :refer [deftest testing is]]
[advent-of-clojure.2018.input :as io]))
Inventory management system
Year 1518 : Warehouse boxes
Puzzle 1 : Count checksum of candidate boxes
then multiply these two numbers together
(d... |
943a6b529ec00cdbc2f51d204985fcbbef6c1efa143706d96d57506599ea94af | erlang/otp | core_alias_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2007 - 2021 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/93f444c27ec2a3a9001ea9d0930d8d19432628e5/lib/compiler/test/core_alias_SUITE.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 2007 - 2021 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(core_alias_SUITE).
-export([all/0, suite/0, groups/0,init_per_suite/1, end_per_suite/1,
init_per_gr... |
08882cdfa2db3d19497eb3945c9b1fedccb25ff7e646dd880b7dcf36da107618 | Emmanuel-PLF/facile | fcl_fdArray.mli | (***********************************************************************)
(* *)
FaCiLe
A Functional Constraint Library
(* ... | null | https://raw.githubusercontent.com/Emmanuel-PLF/facile/3b6902e479019c25b582042d9a02152fec145eb0/lib/fcl_fdArray.mli | ocaml | *********************************************************************
under the terms of the GNU Lesser Gener... | FaCiLe
A Functional Constraint Library
, , LOG , CENA
Copyright 2004 CENA . All rights reserved . This file is distributed
$ I d : , v 1.15 2003/02/03 15:50:48 brisset Exp $
va... |
9f802fe58191d52e93762eb14d913049f0b597c0d2c1d58cac861e1f5ca2d552 | ocaml-ppx/ocamlformat | test_indent.ml | open Ocamlformat_lib
let read_file f = Stdio.In_channel.with_file f ~f:Stdio.In_channel.input_all
let partial_let = read_file "../passing/tests/partial.ml"
let normalize_eol = Eol_compat.normalize_eol ~line_endings:`Lf
module Partial_ast = struct
let tests_indent_range =
let test name ~input:source ~range ~ex... | null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/39c6197eb2a8f27d7fd64035f5fb6a52a598845c/test/unit/test_indent.ml | ocaml | open Ocamlformat_lib
let read_file f = Stdio.In_channel.with_file f ~f:Stdio.In_channel.input_all
let partial_let = read_file "../passing/tests/partial.ml"
let normalize_eol = Eol_compat.normalize_eol ~line_endings:`Lf
module Partial_ast = struct
let tests_indent_range =
let test name ~input:source ~range ~ex... | |
22163754ea4e691e65ae928f01c984ef7c2cd52dfcd94c772f144246b8c630a4 | kafka4beam/kafka_protocol | kpro_schema_tests.erl | Copyright ( c ) 2018 - 2021 , Klarna Bank AB ( publ )
%%%
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 a... | null | https://raw.githubusercontent.com/kafka4beam/kafka_protocol/f0100ada6c318377f55502b9d9cd6d7043f5b930/test/kpro_schema_tests.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language go... | Copyright ( c ) 2018 - 2021 , Klarna Bank AB ( publ )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(kpro_schema_tests).
-include_lib("eunit/include/eunit.hrl").
all_test() ->
lists:foreach(fun test_api/1... |
aca8c78c8a1c3435ceea38d8c1a41e0614676a828e5f0b75b136c30aadd2dc0e | isovector/algebra-checkers | Suggestions.hs | {-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskellQuotes #-}
module AlgebraCheckers.Suggestions where
import AlgebraCheckers.Patterns
import AlgebraCheckers.Ppr
import AlgebraCheckers.Unification
import Control.Monad
import Data.Char
import Data.Data
import Data.Generics.Schemes (listify)
import Data... | null | https://raw.githubusercontent.com/isovector/algebra-checkers/40ed33d23ff36a78cef133d02cd9e44e4f7101f9/src/AlgebraCheckers/Suggestions.hs | haskell | # LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskellQuotes # |
module AlgebraCheckers.Suggestions where
import AlgebraCheckers.Patterns
import AlgebraCheckers.Ppr
import AlgebraCheckers.Unification
import Control.Monad
import Data.Char
import Data.Data
import Data.Generics.Schemes (listify)
import Data.Group
import Data.List
import Data.Maybe
import Data.Semigroup
import Data.Tr... |
e1a9a650a835c87243117d9a1d4f2d40e80918aee8b7d71b1e0d2c3b0c4742fd | metametadata/clj-fakes | runner.cljs | (ns unit.runner
(:require [cljs.test]
[doo.runner :refer-macros [doo-tests]]
[unit.context]
[unit.args-matcher]
[unit.optional-fake]
[unit.fake]
[unit.recorded-fake]
[unit.unused-fakes-self-test]
[unit.unchecked-fakes-self... | null | https://raw.githubusercontent.com/metametadata/clj-fakes/d928ddfd11b150b1cd2df5621265c447bf42395a/test/unit/runner.cljs | clojure | (ns unit.runner
(:require [cljs.test]
[doo.runner :refer-macros [doo-tests]]
[unit.context]
[unit.args-matcher]
[unit.optional-fake]
[unit.fake]
[unit.recorded-fake]
[unit.unused-fakes-self-test]
[unit.unchecked-fakes-self... | |
b737da42cc68767551b7e76ae369d14d13ed8e805129752dfcbd1f06a9a89c1f | amnh/poy5 | nonaddCS.mli | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/nonaddCS.mli | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
173a0a5abfcdecb7609c496502149f8be26947cf1a25cef2ea6662ba1ac9309a | swarmpit/swarmpit | common.cljs | (ns swarmpit.component.common
(:refer-clojure :exclude [list])
(:require [material.icon :as icon]
[material.components :as comp]
[material.component.chart :as chart]
[material.component.list.basic :as list]
[swarmpit.component.state :as state]
[swarmpit.co... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/cljs/swarmpit/component/common.cljs | clojure | (ns swarmpit.component.common
(:refer-clojure :exclude [list])
(:require [material.icon :as icon]
[material.components :as comp]
[material.component.chart :as chart]
[material.component.list.basic :as list]
[swarmpit.component.state :as state]
[swarmpit.co... | |
e2984ba6e19ab0f000a0ec3ac57d8d2af7a1e470fea1150aa68dc9b6ee5c4e0c | lemmih/lhc | Case2.hs | module Case2 where
x = case x of
x -> x
y :: ()
y = case y of
y -> y
z :: ()
z = case z of
() -> ()
| null | https://raw.githubusercontent.com/lemmih/lhc/53bfa57b9b7275b7737dcf9dd620533d0261be66/haskell-crux/tests/Case2.hs | haskell | module Case2 where
x = case x of
x -> x
y :: ()
y = case y of
y -> y
z :: ()
z = case z of
() -> ()
| |
0c826a66d4344c58b25fbe67f488ff1763797f1a4ee131626767c34954a78d32 | jackfirth/rebellion | converter.rkt | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[converter? predicate/c]
[make-converter
(->* ((-> any/c any/c) (-> any/c any/c))
(#:name (or/c interned-symbol? #false))
converter?)]
[convert-forward (-> converter? any/c any/c)]
[convert-backward (-> converter? any/... | null | https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/base/converter.rkt | racket | @------------------------------------------------------------------------------
Core API
@------------------------------------------------------------------------------
Contracts
@------------------------------------------------------------------------------
Built-in converters and converter utilities | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[converter? predicate/c]
[make-converter
(->* ((-> any/c any/c) (-> any/c any/c))
(#:name (or/c interned-symbol? #false))
converter?)]
[convert-forward (-> converter? any/c any/c)]
[convert-backward (-> converter? any/... |
bcb762f093e487586b048796db2c3368dbeb0fe02338cebde0cb0f0afe08d52d | deadcode/Learning-CL--David-Touretzky | 8.36.lisp | (defun count-odd (x)
(cond ((null x) 0)
((oddp (first x))
(+ 1 (count-odd (rest x))))
(t (count-odd (rest x)))))
(let ((test1 '(count-odd '(4 5 6 7 8)))
(test2 '(count-odd '(0 2 4 6 8)))
(test3 '(count-odd '())))
(format t "~s = ~s~%" test1 (eval test1))
(format t "... | null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%208/8.36.lisp | lisp | (defun count-odd (x)
(cond ((null x) 0)
((oddp (first x))
(+ 1 (count-odd (rest x))))
(t (count-odd (rest x)))))
(let ((test1 '(count-odd '(4 5 6 7 8)))
(test2 '(count-odd '(0 2 4 6 8)))
(test3 '(count-odd '())))
(format t "~s = ~s~%" test1 (eval test1))
(format t "... | |
b890755dda044ae6e4a9fb4e0e10803dd9921f07d1f9275d47e9e0ac87478cac | Limmen/erl_pengine | table_mngr.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2017 ,
%% @doc table_mngr server. Only purpose to maintain the ETS-table with
%% all the active slave-pengines and add fault-tolerance in case
%% the pengine_master dies. This process have very low-chance of crashing
%% d... | null | https://raw.githubusercontent.com/Limmen/erl_pengine/fde53184609036a1ebec5d8bd61766da1d8e3aab/src/table_mngr.erl | erlang | -------------------------------------------------------------------
@doc table_mngr server. Only purpose to maintain the ETS-table with
all the active slave-pengines and add fault-tolerance in case
the pengine_master dies. This process have very low-chance of crashing
due to its limited purpose.
@end
-------------... | @author < >
( C ) 2017 ,
-module(table_mngr).
-author('Kim Hammar <>').
-behaviour(gen_server).
-include("records.hrl").
-export([start_link/0, handover/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-type table_mngr_s... |
8fa3d26458add58e8078c641a59993ec4ba6421447cc756d8386e312616eabbf | CloudI/CloudI | parse_trans_codegen.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% --------------------------------------------------
This file is provided to you 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 a... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_parse_trans/src/parse_trans_codegen.erl | erlang | --------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@author : ... |
fd9ab06d0bd2d9fc2d0e1e169d219bd8bb632e16c6532d7b71b11dd66a34ceb4 | coq/coq | notationextern.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/681cd76e5117c18ec2dc8545f8f63c381a00ec0e/interp/notationextern.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
64c6a83d1f09c3ef895555677cf55043d21e2f44d1b1b1d46d086dc742409e6f | fujita-y/digamma | ctak.scm | CTAK -- A version of the TAK procedure that uses continuations .
(define (ctak x y z)
(call-with-current-continuation
(lambda (k) (ctak-aux k x y z))))
(define (ctak-aux k x y z)
(if (not (< y x))
(k z)
(call-with-current-continuation
(lambda (k)
(ctak-aux
k
(c... | null | https://raw.githubusercontent.com/fujita-y/digamma/5a31f9fd67737fd857ada643d5548155a2ed0e76/bench/gambit-benchmarks/ctak.scm | scheme | CTAK -- A version of the TAK procedure that uses continuations .
(define (ctak x y z)
(call-with-current-continuation
(lambda (k) (ctak-aux k x y z))))
(define (ctak-aux k x y z)
(if (not (< y x))
(k z)
(call-with-current-continuation
(lambda (k)
(ctak-aux
k
(c... | |
49ffd1a54d2baa4f0e32e07d5ec372629cdfada58b2aeec8ffe916543c56591a | mk270/archipelago | node.mli |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2013
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | null | https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/model/node.mli | ocaml |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2013
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | |
e083622b7d278abc225918bee269bbce5511e81bea28b5ef59fc21e813c6eb5b | creswick/cabal-dev | Main.hs | Copyright ( c ) 2011 Galois , Inc
module Main
( main )
where
import Data.Char ( isSpace, isLetter )
import Data.List ( intercalate, transpose )
import Data.Maybe ( listToMaybe )
import Data.Version ( showVersion )
import Control.Monad ( unless )
import System.Exit ( exitWith, ExitCode(..) )
import System.Environ... | null | https://raw.githubusercontent.com/creswick/cabal-dev/bb1fb44a00cf053ea142617a31b5e2f2c189866b/src/Main.hs | haskell | installed into the sandbox are found
|Format a table
^Column separator
^Table rows (each cell may have more than
^Lines of output
|Wrap a String of text to lines shorter than the specified number.
This function has heuristics for human-readability, such as
avoiding splitting in the middle of words when possibl... | Copyright ( c ) 2011 Galois , Inc
module Main
( main )
where
import Data.Char ( isSpace, isLetter )
import Data.List ( intercalate, transpose )
import Data.Maybe ( listToMaybe )
import Data.Version ( showVersion )
import Control.Monad ( unless )
import System.Exit ( exitWith, ExitCode(..) )
import System.Environ... |
3952b0e31504f486a59db8d2fae79d13a5b4d3bd15c04707defc79acd87cd995 | chaoxu/mgccl-haskell | pe1.hs | result = sum [n| n<-[1..999],n `mod` 3 == 0 || n `mod` 5==0]
| null | https://raw.githubusercontent.com/chaoxu/mgccl-haskell/bb03e39ae43f410bd2a673ac2b438929ab8ef7a1/pe/pe1.hs | haskell | result = sum [n| n<-[1..999],n `mod` 3 == 0 || n `mod` 5==0]
| |
ee841ba9a3275facf51e34d8954e50b366051ea8874da8c70b14973d3d6be204 | PeterDWhite/Osker | Test3.hs | Copyright ( c ) , 2003
Copyright ( c ) OHSU , 2003
module Main where
--Haskell imports
import Monad
-- Test imports
import TestSupport
Braid imports
import qualified BraidExternal as B
import qualified BraidInternal as BI
The hub of the level 1 braid
-- This is not a lifted thread.
-- Argument is the maxim... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Braid/Test3.hs | haskell | Haskell imports
Test imports
This is not a lifted thread.
Argument is the maximum number of loops | Copyright ( c ) , 2003
Copyright ( c ) OHSU , 2003
module Main where
import Monad
import TestSupport
Braid imports
import qualified BraidExternal as B
import qualified BraidInternal as BI
The hub of the level 1 braid
hubl1 :: Int -> B.Braid Gs Ls ()
hubl1 loops =
do { tid <- B.myThreadId
; B.putStr... |
16c2128e46288c19552de809139150d742792a96d22ea98016cc1bd05badda39 | well-typed/large-records | R090.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.HListBaseline.Sized.R090 where
import Bench.Types
import Bench.HList
import Common.HListOfSize.HL090
hlist :: HList Fiel... | null | https://raw.githubusercontent.com/well-typed/large-records/551f265845fbe56346988a6b484dca40ef380609/large-records-benchmarks/bench/typelet/Experiment/HListBaseline/Sized/R090.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings #
00 .. 09 | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.HListBaseline.Sized.R090 where
import Bench.Types
import Bench.HList
import Common.HListOfSize.HL090
hlist :: HList Fields
hlist =
MkT 00
:* MkT 01
:* MkT 02
:* MkT 03
:* MkT 04
:* MkT 05
:* MkT 06
:* MkT 07
... |
b2de174892853f04040e5ae50c56dfc639b3fdf0989fc88c75c7b0ba480a7e49 | zeniuseducation/poly-euler | p144.clj | (ns alfa.special.p144
(:require
[clojure.set :refer [union difference intersection subset?]]
[clojure.core.reducers :as r]
[clojure.string :refer [split-lines]]
[alfa.common :refer :all]
[clojure.string :as cs]))
(defn atan [l] (Math/atan l))
(defn tan [l] (Math/tan l))
(def PI Math/PI)
(declare... | null | https://raw.githubusercontent.com/zeniuseducation/poly-euler/734fdcf1ddd096a8730600b684bf7398d071d499/Alfa/src/alfa/special/p144.clj | clojure | (ns alfa.special.p144
(:require
[clojure.set :refer [union difference intersection subset?]]
[clojure.core.reducers :as r]
[clojure.string :refer [split-lines]]
[alfa.common :refer :all]
[clojure.string :as cs]))
(defn atan [l] (Math/atan l))
(defn tan [l] (Math/tan l))
(def PI Math/PI)
(declare... | |
2a6e7f957ab703ac9e793a014b1ac112baa6a1a80119baaabeb5b42ec078d1f5 | typeclasses/dsv | LookupErrorUtf8.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE DerivingStrategies , DeriveAnyClass #
module DSV.LookupErrorUtf8
( LookupErrorUtf8 (..)
) where
import DSV.IO
import DSV.Prelude
-- | The general concept of what can go wrong when you look up the position of a particular element in a list.
data LookupErrorUtf8
= Lookup... | null | https://raw.githubusercontent.com/typeclasses/dsv/ae4eb823e27e4c569c4f9b097441985cf865fbab/dsv/library/DSV/LookupErrorUtf8.hs | haskell | | The general concept of what can go wrong when you look up the position of a particular element in a list.
^ There is /no/ matching element.
^ There are /more than one/ matching elements. | # LANGUAGE NoImplicitPrelude #
# LANGUAGE DerivingStrategies , DeriveAnyClass #
module DSV.LookupErrorUtf8
( LookupErrorUtf8 (..)
) where
import DSV.IO
import DSV.Prelude
data LookupErrorUtf8
^ Found one matching element , but it is not a valid UTF-8 string .
deriving stock (Eq, Show)
deriving anyclass Exc... |
f9f6b92cfa1d724049d9611f93f93a4613679723e10d861d8472eb6e83220ffd | weyrick/roadsend-php | re-extensions.scm | ; ***** BEGIN LICENSE BLOCK *****
Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , 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 ; either version 2.1... | null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/runtime/ext/standard/re-extensions.scm | scheme | ***** BEGIN LICENSE BLOCK *****
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
either version 2.1
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
of the License , or ( at your option ) any later version .
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 51 Franklin Street , Fifth... |
40d7ac6eb771c8a94071054ccab9aee69cc6c603862a96e6e80165298ca7d328 | NorfairKing/cursor | Delete.hs | # LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
module Cursor.Tree.Delete
( treeCursorDeleteSubTreeAndSelectPrevious,
treeCursorDeleteSubTreeAndSelectNext,
treeCursorDeleteSubTreeAndSelectAbove,
treeCursorRemoveSubTree,
treeCursorDeleteSubTree,
treeCursorDeleteElemAndSelectPrevious,
tr... | null | https://raw.githubusercontent.com/NorfairKing/cursor/ff27e78281430c298a25a7805c9c61ca1e69f4c5/cursor/src/Cursor/Tree/Delete.hs | haskell | # LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
module Cursor.Tree.Delete
( treeCursorDeleteSubTreeAndSelectPrevious,
treeCursorDeleteSubTreeAndSelectNext,
treeCursorDeleteSubTreeAndSelectAbove,
treeCursorRemoveSubTree,
treeCursorDeleteSubTree,
treeCursorDeleteElemAndSelectPrevious,
tr... | |
0a2dbd6d7673dd7885cddc7d79fe8087ab041a2d6295169f9c8e98bace857e04 | Eduap-com/WordMat | sprdet.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/src/sprdet.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
THIS IS THE N... |
(in-package :maxima)
(macsyma-module sprdet)
(declare-top (special x *ptr* *ptc* *blk* $ratmx ml* *detsign* rzl*))
(defun sprdet (ax n)
(declare (fixnum n))
(setq ax (get-array-pointer ax))
(prog ((j 0) rodr codr bl det (dm 0) (r 0) (i 0))
(declare (fixnum i j dm r))
(setq det 1)
(setq *ptr* ... |
bdb73f5efb22bf1cb4c8963cb9f5d559011e1c2d1d65954fdf0c010f8dc6ff8c | prg-titech/baccaml | mtj-call.ml | let print_array arr = print_string " [ " ; ( fun a - > print_int a ;
print_string " ; " ) ; print_string " ] " in
let debug stack pc sp = print_array stack ; print_newline ( ) ; print_string
" pc : " ; print_int pc ; print_newline ( ) ; print_string " sp : " ; print_int sp ;
print_newline ( ) ;... | null | https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/etc/mtj-call.ml | ocaml | debug stack pc sp;
Add
Sub
CALL
JUMP_IF_ZERO
POP1
PUSH
HALT
return 5
return 10
return 1
return 0 | let print_array arr = print_string " [ " ; ( fun a - > print_int a ;
print_string " ; " ) ; print_string " ] " in
let debug stack pc sp = print_array stack ; print_newline ( ) ; print_string
" pc : " ; print_int pc ; print_newline ( ) ; print_string " sp : " ; print_int sp ;
print_newline ( ) ;... |
c3bcd1a4a5992130a693ee57e2ab608c4eabaa20d62defb0abf2efc6198dce4f | earl-ducaine/cl-garnet | motif-scrolling-window.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*-
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
The Garnet User Interface Development Environment . ; ;
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;; This code ... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/gadgets/motif-scrolling-window.lisp | lisp | Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
This code was written as part of the Garnet project at ;;
;
;
please contact to be put on t... |
$ Id$
contains two optional scroll bars
inside of , or NIL
: Foreground - Color ( default = Motif - gray ) - the color of the
Scroll Bar slots
: h - page - incr - default jumps one page
: v - page - incr - default jumps one page
update first )
Designed and writte... |
f1c5d46d5191abf63c504899b8bdc0a0aa9fd02caef545bf9e473baddb9ebf86 | mfikes/fifth-postulate | ns361.cljs | (ns fifth-postulate.ns361)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns361.cljs | clojure | (ns fifth-postulate.ns361)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
71768bef7433ef4d7a97f37f5555d11a0a42b6abc45df555926369067fe00950 | facundoolano/clojure-gettext | core.clj | (ns gettext.core
(:require [carica.core :refer [config]]
[clojure.test :refer [function?]]))
; Load text source from project.clj
(if (config :gettext-source)
(require [(symbol (namespace (config :gettext-source)))]))
(def ^:dynamic *text-source* (eval (config :gettext-source)))
(defn gettext
"Look u... | null | https://raw.githubusercontent.com/facundoolano/clojure-gettext/56356a71b1e4765d4f72c2ac74b3316a59cf99a1/src/gettext/core.clj | clojure | Load text source from project.clj
handy aliases | (ns gettext.core
(:require [carica.core :refer [config]]
[clojure.test :refer [function?]]))
(if (config :gettext-source)
(require [(symbol (namespace (config :gettext-source)))]))
(def ^:dynamic *text-source* (eval (config :gettext-source)))
(defn gettext
"Look up the given key in the current text ... |
97e4c1b8f61f2fd81475fd36667fcfba8913baf75c64fbb210adb469113b3da1 | bazqux/bazqux-urweb | QueryParser.hs | module Lib.QueryParser where
import Lib.ElasticSearch
import qualified Data.ByteString.Lazy.Char8 as BL
import qualified Data.ByteString.Char8 as B
import qualified Data.Text as T
import qualified Data.Aeson as JSON
-- data Primitive = Term T.Text | Phrase T.Text | Range T.Text T.Text
-- data Syntax t = T t | And [Sy... | null | https://raw.githubusercontent.com/bazqux/bazqux-urweb/bf2d5a65b5b286348c131e91b6e57df9e8045c3f/crawler/Lib/QueryParser.hs | haskell | data Primitive = Term T.Text | Phrase T.Text | Range T.Text T.Text
data Syntax t = T t | And [Syntax t] | Or [Syntax t] | Not (Syntax t)
data Query = Syntax QueryBase
надо указывать AND | module Lib.QueryParser where
import Lib.ElasticSearch
import qualified Data.ByteString.Lazy.Char8 as BL
import qualified Data.ByteString.Char8 as B
import qualified Data.Text as T
import qualified Data.Aeson as JSON
data QueryBase = Primitive Primitive | Field T.Text ( Syntax Primitive )
data Q
= Term T.Text
... |
28bfd82a38db8052b05cf7a92df459d76c1072b863bf4e6e36494e9804f1c540 | mjambon/dune-deps | Disambiguate.ml |
Disambiguate path - like names .
Disambiguate path-like names.
*)
open Printf
(* This splits the string wherever there's a slash or a backslash.
It ignores leading and trailing slashes, which should be fine for our
application.
*)
let parse_path =
let re = Str.regexp "[/\\]+" in
fun s ->
Str.... | null | https://raw.githubusercontent.com/mjambon/dune-deps/48897a338bcbf91b57fccbed883497f050870b92/src/lib/Disambiguate.ml | ocaml | This splits the string wherever there's a slash or a backslash.
It ignores leading and trailing slashes, which should be fine for our
application.
This table stores clusters of paths, where the key is the name
that we want to be unique in the end.
name full path rest of the path... |
Disambiguate path - like names .
Disambiguate path-like names.
*)
open Printf
let parse_path =
let re = Str.regexp "[/\\]+" in
fun s ->
Str.split re s
Ensure each path has at least one component .
Reverse it so that the file name comes first .
Ensure each path has at least one compon... |
658b473ec1f9382bca37da2fc4b983e3025d6102830a949728dcaa0fdc43600c | reflectionalist/S9fES | string-find-last.scm | Scheme 9 from Empty Space , Function Library
By , 2009,2010
; Placed in the Public Domain
;
( string - find - last ) = = > string | # f
( string - ci - find - last ) = = > string | # f
( string - find - last - word ) = = > string | # f
( string - ci - find - last - word ... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/string-find-last.scm | scheme | Placed in the Public Domain
(load-from-library "string-find-last.scm")
string STRING2. Return the last substring of STRING2 beginning
STRING-CI-FIND-LAST performs the same function, but ignores case.
STRING-FIND-LAST-WORD (STRING-CI-FIND-LAST-WORD) differs from
STRING-FIND-LAST (STRING-CI-FIND-LAST) in that i... | Scheme 9 from Empty Space , Function Library
By , 2009,2010
( string - find - last ) = = > string | # f
( string - ci - find - last ) = = > string | # f
( string - find - last - word ) = = > string | # f
( string - ci - find - last - word ) = = > string | # f
Fin... |
8c32e039344d462cc4d211e0d76c99d832155903c66eb53d6011c8962956f8d9 | nasa/pvslib | nasalib.lisp | (defparameter *nasalib-version* "7.1.0 (08/20/20)")
| null | https://raw.githubusercontent.com/nasa/pvslib/2be465b36f4d884c33cbd49a37939c4664db74eb/RELEASE/nasalib.lisp | lisp | (defparameter *nasalib-version* "7.1.0 (08/20/20)")
| |
659842d161f0c4fbbb944883babc175c74b7a4f65507af45f78d0d01f75ffa92 | nathanmarz/cascalog | def.clj | Copyright ( c ) . 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/nathanmarz/cascalog/deaad977aa98985f68f3d1cc3e081d345184c0c8/cascalog-math/src/cascalog/math/contrib/def.clj | clojure | 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 this notice, or an... | Copyright ( c ) . All rights reserved . The use and
scgilardi ( gmail )
17 May 2008
(ns
#^{:author "Stephen C. Gilardi",
:doc "def.clj provides variants of def that make including doc strings and
making private definitions more succinct."}
cascalog.math.contrib.def)
(defmacro defvar
"Defines... |
577e0325def2aac7ae63aee569926bb1410c9f3f0474cf3bedea524dc68d5c37 | UBTECH-Walker/WalkerSimulationFor2020WAIC | _package_joint_test.lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(HEADER-VAL
HEADER
POSITION-VAL
POSITION
SPEED-VAL
SPEED
)) | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/msg/_package_joint_test.lisp | lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(HEADER-VAL
HEADER
POSITION-VAL
POSITION
SPEED-VAL
SPEED
)) | |
ff96ca16219a6d45fdcb1b3bac9d5dec8da1d70267e09ac3febe9d15a9514a38 | jjmeyer0/gt | grammaru.mli | module Grammaru :
sig
type highlights = string * (string * string list) list
type symbolu = string
type elementu =
Esymbolu of symbolu
| Eoptionu of elementu list list
| Erepetitionu of elementu list list * string * string
type productionu =
Productionu of string * string *... | null | https://raw.githubusercontent.com/jjmeyer0/gt/c0c7febc2e3fd532d44617f663b224cc0b9c7cf2/src/grammaru.mli | ocaml | module Grammaru :
sig
type highlights = string * (string * string list) list
type symbolu = string
type elementu =
Esymbolu of symbolu
| Eoptionu of elementu list list
| Erepetitionu of elementu list list * string * string
type productionu =
Productionu of string * string *... | |
54370e31c5966e85f3ca223b88ed02b9046e0b8a4a32af8e4ba535234c108b5d | bondy-io/bondy | bondy_bridge_relay_server.erl | %% =============================================================================
%% bondy_bridge_relay_server.erl -
%%
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the... | null | https://raw.githubusercontent.com/bondy-io/bondy/570cea3c79714e6db0d1ce64169eb43e2c94c54d/apps/bondy/src/bondy_bridge_relay_server.erl | erlang | =============================================================================
bondy_bridge_relay_server.erl -
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 WARR... | Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
< pre><code class="mermaid " >
active -- > active : rcv(data|ping ) | snd(data|pong )
idle -- > i... |
99c02ea2cd8be4ab766abfc526d9c894ac516ace804672287545f3cb54781b71 | quoll/life | core.cljc | (ns life.core
(:require [clojure.core.matrix :refer [emap reshape array rotate add]]
[life.matrix :refer [nbool takeof and* or* =x power-limit]]
[clojure.core.matrix.operators :as m]
#?(:clj [life.display :refer :all])
#?(:clj [life.pic :refer :all])))
(def init #{1 2 ... | null | https://raw.githubusercontent.com/quoll/life/f6647351990c076bc3e699989ba32293ea009314/src/life/core.cljc | clojure | (ns life.core
(:require [clojure.core.matrix :refer [emap reshape array rotate add]]
[life.matrix :refer [nbool takeof and* or* =x power-limit]]
[clojure.core.matrix.operators :as m]
#?(:clj [life.display :refer :all])
#?(:clj [life.pic :refer :all])))
(def init #{1 2 ... | |
e0167a95497b8d2f489194b3e1ec6c067275b72f00885e6b15ed948ea44eeb5c | kupl/LearnML | patch.ml | let rec fold (f : 'b -> 'a -> 'a) (l : 'b list) (a : int) =
match l with [] -> a | hd :: tl -> f hd (fold f tl a)
let rec max (lst : int list) : int =
fold
(fun (__s7 : int) (__s8 : int) -> if __s8 >= __s7 then __s8 else __s7)
lst min_int
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/max/sub17/patch.ml | ocaml | let rec fold (f : 'b -> 'a -> 'a) (l : 'b list) (a : int) =
match l with [] -> a | hd :: tl -> f hd (fold f tl a)
let rec max (lst : int list) : int =
fold
(fun (__s7 : int) (__s8 : int) -> if __s8 >= __s7 then __s8 else __s7)
lst min_int
| |
a95c7dd474931aa0356c4fe807528c02b2a2f76e72ea18cf50663b746fc2d41c | shop-planner/shop3 | basic-example.lisp | (in-package :shop-user)
; This extremely simple example shows some of the most essential
features of SHOP2 .
(defdomain basic-example (
(:operator (!pickup ?a) () () ((have ?a)))
(:operator (!drop ?a) ((have ?a)) ((have ?a)) ())
(:method (swap ?x ?y)
((have ?x))
((!drop ?x) (!pickup ?y))
((have ... | null | https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/toy/basic-example.lisp | lisp | This extremely simple example shows some of the most essential | (in-package :shop-user)
features of SHOP2 .
(defdomain basic-example (
(:operator (!pickup ?a) () () ((have ?a)))
(:operator (!drop ?a) ((have ?a)) ((have ?a)) ())
(:method (swap ?x ?y)
((have ?x))
((!drop ?x) (!pickup ?y))
((have ?y))
((!drop ?y) (!pickup ?x)))))
(defproblem problem1 basic... |
0cde820decebe9d74dd9d4ad67a80e0765ce99d17836a907d4d207846507424d | vouillon/osm | table.ml | OSM tools
* Copyright ( C ) 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your opti... | null | https://raw.githubusercontent.com/vouillon/osm/5b06ed6fc6c508b8187209628cf02129a119b50a/database/table.ml | ocaml | **
assert (l1 - i1 + l2 - i2 = l - i);
; for j = i to l - 1 do
Format.printf "%Ld " a.{j}
done;
Format.printf "@."
for i = 0 to len - 1 do
Format.printf "%Ld " a1.{i1 + i}
done;
Format.printf "@.";
;for i = 0 to len - 1 do
Format.printf "%Ld " a2.{i2 + i}
done;
Format.printf "@."
if i mod 10000 = 0 then Form... | OSM tools
* Copyright ( C ) 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your opti... |
4423bc9fc78a96fe44a07b197a2961b1817827005d461c2c5267766c0f03abf2 | webnf/webnf | base.cljs | (ns webnf.mui.base
(:require
[om.core :as om]))
(defn state-setter [owner key]
(fn [e]
(om/set-state! owner key (.. e -target -value))))
| null | https://raw.githubusercontent.com/webnf/webnf/6a2ccaa755e6e40528eb13a5c36bae16ba4947e7/cljs/src/webnf/mui/base.cljs | clojure | (ns webnf.mui.base
(:require
[om.core :as om]))
(defn state-setter [owner key]
(fn [e]
(om/set-state! owner key (.. e -target -value))))
| |
670323529ac8c36bb50a1295a04cf06cc333e622b96b55152188cb28af77de4a | UU-ComputerScience/uhc | mod1.hs | -- import single export
module Main
where
import Imp1.Exp1
i2 = i1
main = i2
| null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/20/mod1.hs | haskell | import single export |
module Main
where
import Imp1.Exp1
i2 = i1
main = i2
|
211c3f98fc2cea06c46364da885694688039043f4cb2c9ca16a58047351ba528 | techascent/tvm-clj | node.clj | (ns tvm-clj.impl.node
(:require [tvm-clj.impl.base :refer [make-tvm-jna-fn
device-type->int
device-id->int
ptr-ptr
check-call
->... | null | https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/node.clj | clojure | Force generation of global functions
it is done for you."
Like a regular node except we do not free these nodes
We do not free rvalue nodes coming from other places.
punt if it is already a node | (ns tvm-clj.impl.node
(:require [tvm-clj.impl.base :refer [make-tvm-jna-fn
device-type->int
device-id->int
ptr-ptr
check-call
->... |
fc3b0a1a13733421249d07d8c04125902c6d53c164bc96fb21ef7e733a1880ac | aaltodsg/instans | datetime.lisp | -*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*-
;;;
Author : ( )
;;;
(in-package #:instans)
(define-class datetime ()
((time :initarg :time :accessor datetime-time)
(usec :initarg :usec :accessor datetime-usec)
(year :initform nil :initarg :year)
(month :initform nil :in... | null | https://raw.githubusercontent.com/aaltodsg/instans/5ffc90e733e76ab911165f205ba57a7b3b200945/src/sparql/datetime.lisp | lisp | Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*-
nil | Author : ( )
(in-package #:instans)
(define-class datetime ()
((time :initarg :time :accessor datetime-time)
(usec :initarg :usec :accessor datetime-usec)
(year :initform nil :initarg :year)
(month :initform nil :initarg :month)
(day :initform nil :initarg :day)
(hours :initform nil :initarg :ho... |
26c7337f826933ebdcb25d625a24692d73c3514c279206eebb0e06f011e4ce09 | mzp/coq-ide-for-ios | reductionops.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/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/pretyping/reductionops.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
Reduction Functions.
*********... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : reductionops.mli 13... |
d13f1f240c5bed0051e042b69827ca1b3bf60cf30ab278adbd83c426f2d4a940 | plum-umd/fundamentals | defns.rkt | #lang racket
(provide (all-defined-out))
(define m1-date "Oct 1")
(define m2-date "Nov 5")
(define final-date "Dec 13, 4--6 pm (ATL 1113)")
(define semester "fall")
(define year "2018")
(define courseno "CMSC 131A")
(define elms-url "")
| null | https://raw.githubusercontent.com/plum-umd/fundamentals/eb01ac528d42855be53649991a17d19c025a97ad/1/www/defns.rkt | racket | #lang racket
(provide (all-defined-out))
(define m1-date "Oct 1")
(define m2-date "Nov 5")
(define final-date "Dec 13, 4--6 pm (ATL 1113)")
(define semester "fall")
(define year "2018")
(define courseno "CMSC 131A")
(define elms-url "")
| |
75a5517f3735b0a922a75eacf144537ef98053a2ebe9c17c66bf860786c43817 | rescript-lang/rescript-compiler | belt_HashSet.mli | Copyright ( C ) 2018 Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/c3fcc430360079546a6aabd2b2770303480f8486/jscomp/others/belt_HashSet.mli | ocaml | * The type of hash tables from type `'a` to type `'b`.
* Order unspecified.
* Order unspecified. | Copyright ( C ) 2018 Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .... |
54899ea01fc059271bd0f651d5b72f95bba175892ccfb2ca5b22007192d0bc6f | eeng/mercurius | channel_based_pub_sub.clj | (ns mercurius.core.infrastructure.messaging.channel-based-pub-sub
(:require [clojure.core.async :refer [put! chan close! go-loop <! sliding-buffer]]
[clojure.string :as str]
[taoensso.timbre :as log]
[mercurius.core.adapters.messaging.pub-sub :refer [PubSub]]
[mercurius... | null | https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/core/infrastructure/messaging/channel_based_pub_sub.clj | clojure | (ns mercurius.core.infrastructure.messaging.channel-based-pub-sub
(:require [clojure.core.async :refer [put! chan close! go-loop <! sliding-buffer]]
[clojure.string :as str]
[taoensso.timbre :as log]
[mercurius.core.adapters.messaging.pub-sub :refer [PubSub]]
[mercurius... | |
05415063f52dea1f40fc5b8e0bb9ffd1b7a0185236f4e46bb3b03f9b912e02ff | fujita-y/ypsilon | syntmp.scm | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
;;; See LICENSE file for terms and conditions of use.
(define collect-rename-ids
(lambda (template ranks)
(let ((ids (collect-unique-macro-ids template)))
(let loop ((lst ids))
(if (null? lst)
lst
... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/a67923c74a369ec369ab0545c52b014bacabbcd3/heap/boot/macro/syntmp.scm | scheme | See LICENSE file for terms and conditions of use.
consumed exhausted return
#t #t --> #f error, different size of matched subform
#t #f --> remains more variable to reveal | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
(define collect-rename-ids
(lambda (template ranks)
(let ((ids (collect-unique-macro-ids template)))
(let loop ((lst ids))
(if (null? lst)
lst
(if (assq (car lst) ranks)
(loop (cdr... |
fb3473f4d0272f75a0063419eed6646358148bf58b3f2e9589909e35ef770ec1 | MLstate/opalang | bslGeneration.ml |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libbsl/bslGeneration.ml | ocaml | * A boolean to say if we want to generate the Plugin and the
Loader file. these files are used to link statically a plugin
with an executable, so that there is no need to load dynamically
a .bypass file for being able to load bypasses of a given plugin.
Currently, the static mode is used only ... |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
d84f0965f35ef6179935df64c8a1f94c205b0a30e1717d83b6254bec4d0d7c66 | jabber-at/ejabberd-contrib | fusco_protocol.erl | %%%=============================================================================
( C ) 2013 , Erlang Solutions Ltd
@author < >
%%% @doc
%%%
%%% @end
%%%=============================================================================
-module(fusco_protocol).
-copyright("2013, Erlang Solutions Ltd.").
-include("fus... | null | https://raw.githubusercontent.com/jabber-at/ejabberd-contrib/d5eb036b786c822d9fd56f881d27e31688ec6e91/ejabberd_auth_http/deps/fusco/src/fusco_protocol.erl | erlang | =============================================================================
@doc
@end
=============================================================================
Latency is here defined as the time from the start of packet transmission to the start of packet reception
API
TEST
RFC 6265
NOTE: Return what we ... | ( C ) 2013 , Erlang Solutions Ltd
@author < >
-module(fusco_protocol).
-copyright("2013, Erlang Solutions Ltd.").
-include("fusco.hrl").
-define(SIZE(Data, Response), Response#response{size = Response#response.size + byte_size(Data)}).
-define(RECEPTION(Data, Response), Response#response{size = byte_size(Data... |
457d63eefffebf61eaa30e05a68fe4dd75c761edc83f1e782bcc04503b5152be | 2600hz/kazoo | knm_options.erl | %%%-----------------------------------------------------------------------------
( C ) 2015 - 2020 , 2600Hz
%%% @doc
@author
@author
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 /.
... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/knm_options.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
api
api
|false
------------------------------------------------------------------------------
@doc
@end
---------------------------------------------... | ( C ) 2015 - 2020 , 2600Hz
@author
@author
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 /.
-module(knm_options).
-export([assign_to/1, assign_to/2, set_assign_to/2
,auth_by... |
731c276a1a6600422735c84b99324773a277ad7d02a542af0d0ac1a5b21cd010 | hoodunit/grub | util.cljc | (ns grub.util)
(defn map-by-key [key coll]
(->> coll
(map (fn [a] [(keyword (get a key)) a]))
(into {})))
(defn rand-str [n]
(let [chars "0123456789abcdefghijklmnopqrstuvwxyz"
rand-index #(rand-int (count chars))]
(->> (repeatedly n rand-index)
(map #(.charAt chars %))
... | null | https://raw.githubusercontent.com/hoodunit/grub/6e47218c34a724d1123717997eac5e196a5bba9b/src/cljc/grub/util.cljc | clojure | (ns grub.util)
(defn map-by-key [key coll]
(->> coll
(map (fn [a] [(keyword (get a key)) a]))
(into {})))
(defn rand-str [n]
(let [chars "0123456789abcdefghijklmnopqrstuvwxyz"
rand-index #(rand-int (count chars))]
(->> (repeatedly n rand-index)
(map #(.charAt chars %))
... | |
aa84a32cd3c24febcbb1970785d5c27382da8e9da701c2328479bea7987f552c | mirage/ocaml-asl | reporter.ml |
* Copyright ( c ) 2015 Unikernel Systems
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS "... | null | https://raw.githubusercontent.com/mirage/ocaml-asl/95732a5d3a4f066ba14477e0621f3d946aff2ad4/examples/reporter.ml | ocaml |
* Copyright ( c ) 2015 Unikernel Systems
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS "... | |
6f369e213829d4d2252102d2bfb24ca3efb2321c41e6da4f68f31402961d1b7b | archaelus/tsung | ts_mysql.erl | Created : July 2008 by < >
From : ts_pgsql.erl by < >
Note : Based on erlang - mysql by < >
%%
%%% This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either ... | null | https://raw.githubusercontent.com/archaelus/tsung/b4ea0419c6902d8bb63795200964d25b19e46532/src/tsung/ts_mysql.erl | erlang |
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 PARTICULAR PURPOSE. See the
GNU General ... | Created : July 2008 by < >
From : ts_pgsql.erl by < >
Note : Based on erlang - mysql by < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
You should have received a copy of the GNU G... |
7252d2e7423ca60831c6518152c7edf00acc3d3008ff3347f3cd59cb5b6316bd | steveshogren/cis-194-yorgey-course | DateStuff.hs | module DateStuff (ExpectedDays, generateLastNDays , getTime, makeDateString) where
import Control.Monad(liftM2, liftM)
import System.Locale (defaultTimeLocale)
import Data.Time (formatTime, showGregorian, addDays, localDay, getCurrentTime, getCurrentTimeZone, utcToLocalTime)
import Control.Applicative ((<$>))
type Ex... | null | https://raw.githubusercontent.com/steveshogren/cis-194-yorgey-course/01592a39cdacccaba0438b1cc3c9e176b1b098b2/DateStuff.hs | haskell | module DateStuff (ExpectedDays, generateLastNDays , getTime, makeDateString) where
import Control.Monad(liftM2, liftM)
import System.Locale (defaultTimeLocale)
import Data.Time (formatTime, showGregorian, addDays, localDay, getCurrentTime, getCurrentTimeZone, utcToLocalTime)
import Control.Applicative ((<$>))
type Ex... | |
3d0d109754377bd8c8f3f2fee70f31272a58c1be889aec43be8d2ee844a183a9 | logicblocks/salutem | checks.clj | (ns salutem.core.checks
"Provides constructors, predicates and evaluation functions for checks."
(:require
[clojure.core.async :as async]
[tick.alpha.api :as t]
[cartus.core :as log]
[cartus.null :as cartus-null]
[salutem.core.results :as results]))
(defn- check
([check-name check-fn]
(check... | null | https://raw.githubusercontent.com/logicblocks/salutem/9854c151b69c80c481f48d8be7ee7273831cb79b/core/src/salutem/core/checks.clj | clojure | note, check
note, check
defaults to an empty map.
| (ns salutem.core.checks
"Provides constructors, predicates and evaluation functions for checks."
(:require
[clojure.core.async :as async]
[tick.alpha.api :as t]
[cartus.core :as log]
[cartus.null :as cartus-null]
[salutem.core.results :as results]))
(defn- check
([check-name check-fn]
(check... |
71a4f7113be4061951109c4327a5c30b15013a9e26a37935428d0e93431f20c4 | janestreet/async_kernel | job.mli | open! Core
open! Import
type t = Types.Job.t [@@deriving sexp_of]
| null | https://raw.githubusercontent.com/janestreet/async_kernel/9575c63faac6c2d6af20f0f21ec535401f310296/src/job.mli | ocaml | open! Core
open! Import
type t = Types.Job.t [@@deriving sexp_of]
| |
88eb8e425266fd45f7fa13a961f6d1594cb1663c5d6886eb90cd1038dce61ee2 | acl2/acl2 | operations.lisp | C Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "C")
(i... | null | https://raw.githubusercontent.com/acl2/acl2/44f76f208004466a9e6cdf3a07dac98b3799817d/books/kestrel/c/language/operations.lisp | lisp |
see @(tsee test-scalar-value) for details."))
| C Library
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "C")
(include-book "scalar-operations")
(include-book "array-operations")
(include-book "struc... |
40d49c7698214b2250734ee23ce7d06c96cff661286a3319e71579951dc495ef | jimcrayne/jhc | tc191.hs | {-# OPTIONS -fglasgow-exts #-}
-- This only typechecks if forall-hoisting works ok when
-- importing from an interface file. The type of Twins.gzipWithQ
-- is this:
-- type GenericQ r = forall a. Data a => a -> r
-- gzipWithQ :: GenericQ (GenericQ r) -> GenericQ (GenericQ [r])
-- It's kept this way in the interfa... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/uncat/tc191.hs | haskell | # OPTIONS -fglasgow-exts #
This only typechecks if forall-hoisting works ok when
importing from an interface file. The type of Twins.gzipWithQ
is this:
type GenericQ r = forall a. Data a => a -> r
gzipWithQ :: GenericQ (GenericQ r) -> GenericQ (GenericQ [r])
It's kept this way in the interface file for brevi... |
module Foo where
import Data.Generics.Basics
import Data.Generics.Aliases
import Data.Generics.Twins(gzipWithQ)
| Generic equality : an alternative to
geq :: Data a => a -> a -> Bool
geq x y = geq' x y
where
geq' :: GenericQ (GenericQ Bool)
geq' x y = (toConstr x == toConstr y)
&& ... |
b4f04b89c347a00e67bd7b0ea9d11dfc785e2549338ddaddd81378d1fbc2fd9c | marigold-dev/deku | parse.mli | type 'a start =
| Module : (Script.var option * Script.definition) start
| Script : Script.script start
| Script1 : Script.script start
exception Syntax of Source.region * string
val parse : string -> Lexing.lexbuf -> 'a start -> 'a (* raises Syntax *)
val string_to_script : string -> Script.script (* raises Sy... | null | https://raw.githubusercontent.com/marigold-dev/deku/a26f31e0560ad12fd86cf7fa4667bb147247c7ef/deku-c/interpreter/text/parse.mli | ocaml | raises Syntax
raises Syntax
raises Syntax | type 'a start =
| Module : (Script.var option * Script.definition) start
| Script : Script.script start
| Script1 : Script.script start
exception Syntax of Source.region * string
|
f80cb24ebb89f551850e50434d54c46c79d7e95340dc2879fe86ee587e482536 | bobzhang/fan | meta.ml |
t str_item {:str| external $i : $t = "gho" $x $y "gho" |} ;
- : Ast.str_item =
`External
(, "\\$:i", `Ant (, "\\$ctyp:t"), `LCons ("gho", `Ant (, "\\$str_list:x")))
t str_item {:str| external $i : $t = "gho" $x $y "gho" |} |> ME.meta_str_item _loc ;
- : FanAst.expr =
`ExApp
(,
`ExApp
(,
... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/testr/meta.ml | ocaml | A file demonstrate how meta works
came from $(int:"32")
directly dump will cause an error here |
t str_item {:str| external $i : $t = "gho" $x $y "gho" |} ;
- : Ast.str_item =
`External
(, "\\$:i", `Ant (, "\\$ctyp:t"), `LCons ("gho", `Ant (, "\\$str_list:x")))
t str_item {:str| external $i : $t = "gho" $x $y "gho" |} |> ME.meta_str_item _loc ;
- : FanAst.expr =
`ExApp
(,
`ExApp
(,
... |
acef2ee20c3228b3dffa252ade6e9e9819b715cde47fdf12921cec65c408c5e1 | aryx/xix | main.ml | (*
* todo:
* - make it an independent program and a library (so avoid some forks)
* - compare to ?
*)
| null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/macroprocessor/main.ml | ocaml |
* todo:
* - make it an independent program and a library (so avoid some forks)
* - compare to ?
| |
d0c0595a74584124770640f7f98c3e8816bcf7438524363e67afa45bb2b81f0b | fold-lang/pratt | Pratt.ml |
let inspect pp =
Format.fprintf Fmt.stderr "@[%a@.@]" pp
let log fmt =
Format.kfprintf (fun f -> Format.pp_print_newline f ()) Fmt.stderr fmt
let constantly x _ = x
let (<<) f g = fun x -> f (g x)
let is_some = function Some _ -> true | None -> false
let flip f x y = f y x
(* TODO: When failing show the so-far ... | null | https://raw.githubusercontent.com/fold-lang/pratt/8a8d2fd439e5e30b5ae587bd71e810c8bc6adf42/src/Pratt.ml | ocaml | TODO: When failing show the so-far parsed result.
XXX: What if p consumes input?
| Error Empty -> q input
| Error e -> Error e
Infix tokens can only be a valid prefix if they are directly defined
as such. If the token has a led definition it is not consumed,
otherwise the term parser is call... |
let inspect pp =
Format.fprintf Fmt.stderr "@[%a@.@]" pp
let log fmt =
Format.kfprintf (fun f -> Format.pp_print_newline f ()) Fmt.stderr fmt
let constantly x _ = x
let (<<) f g = fun x -> f (g x)
let is_some = function Some _ -> true | None -> false
let flip f x y = f y x
type 'a fmt = Format.formatter -> 'a ... |
38ddb4c845495194ea81edc45bffc9ac69ea5d35d6a371196a37ee6e27fd3efb | gvannest/piscine_OCaml | eu_dist.ml | let eu_dist (a:float array) (b:float array) : float =
let diff (x:float) (y:float) = x -. y
in
let square (x:float) = x *. x
in
let sum (x:float) (y:float) = x +. y
in
let sroot ( n : float ) =
let p = 0.0001 in
let rec loop x = match x * . x with
| m when m >... | null | https://raw.githubusercontent.com/gvannest/piscine_OCaml/2533c6152cfb46c637d48a6d0718f7c7262b3ba6/d05/ex05/eu_dist.ml | ocaml | let eu_dist (a:float array) (b:float array) : float =
let diff (x:float) (y:float) = x -. y
in
let square (x:float) = x *. x
in
let sum (x:float) (y:float) = x +. y
in
let sroot ( n : float ) =
let p = 0.0001 in
let rec loop x = match x * . x with
| m when m >... | |
faca4399ae138a3f47826203563c20dc00a6678577c26ffb29c08a798a5d070b | tezos/tezos-mirror | dal_helpers.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/39e976ad6eae6446af8ca17ef4a63475ab9fe2b9/src/proto_016_PtMumbai/lib_protocol/test/helpers/dal_helpers.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
656aeb311885e1f47366dfbe3516ce1a570c99a248756a0c2501f5501a6e089d | GaloisInc/cryptol | AST.hs | -- |
Module : Cryptol . . AST
Copyright : ( c ) 2013 - 2016 Galois , Inc.
-- License : BSD3
-- Maintainer :
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE Safe #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveFoldable #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/f8b55439467abe3e7427b80edc37ff95a13de62b/src/Cryptol/Parser/AST.hs | haskell | |
License : BSD3
Maintainer :
Stability : provisional
Portability : portable
# LANGUAGE Safe #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveTraversable #
# LANGUAGE OverloadedStrings #
* Names
* Types
* Declarations
* Interactive
* Expressions
* Positions
* Pretty-printing
AST -----------------... | Module : Cryptol . . AST
Copyright : ( c ) 2013 - 2016 Galois , Inc.
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE PatternGuards #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleInstances #
module Cryptol.Parser.AST
Ident, mkIdent, mkInfix, isInfix... |
cc3390515bc8ee025ddc8aab45a8cf4186cd35015f98dd58ed468e2b9e76b424 | bufferswap/ViralityEngine | annotations.lisp | (in-package #:virality)
(defmacro define-annotation (name &key
(getter
'(lambda (value component)
(declare (ignore component)
value)))
... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/core-early/annotations.lisp | lisp | (in-package #:virality)
(defmacro define-annotation (name &key
(getter
'(lambda (value component)
(declare (ignore component)
value)))
... | |
5ff1ac211b6b8c4b7aec6cd865a5eda8487eff95ce0c08d4ef79674caa6dd32f | dgtized/shimmers | ellipse.cljs | (ns shimmers.scratch.ellipse
"Experiments in clipping part of an ellipse into a bounded-box."
(:require
[shimmers.math.equations :as eq]
[thi.ng.geom.core :as g]
[thi.ng.geom.rect :as rect]
[thi.ng.geom.vector :as gv]
[thi.ng.math.core :as tm]))
(defn clockwise-intercept [center bounds]
(let [midp... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/scratch/ellipse.cljs | clojure | (ns shimmers.scratch.ellipse
"Experiments in clipping part of an ellipse into a bounded-box."
(:require
[shimmers.math.equations :as eq]
[thi.ng.geom.core :as g]
[thi.ng.geom.rect :as rect]
[thi.ng.geom.vector :as gv]
[thi.ng.math.core :as tm]))
(defn clockwise-intercept [center bounds]
(let [midp... | |
e8f6248f962d9a23b5eb128b1f6581799af4300a7f141cac017113cafe0c7952 | mjsottile/publicstuff | Driver.hs | | diffusion limited aggregation , take 1
--
mjsottile\@computer.org
import DLA.Vec3
import DLA.KDTree
import DLA.Rmonad
import DLA.Params
import DLA.ConfigurationReader
import Debug.Trace
import System.Exit
import System.Environment (getArgs)
import System.Random.Mersenne.Pure64
type DLANode = KDTreeNode Int
--
... | null | https://raw.githubusercontent.com/mjsottile/publicstuff/46fccc93cc62eb9de46186f53012381750fbb17b/dla3d/unoptimized-haskell/DLA/Driver.hs | haskell |
draw a random number and see if the particle sticks
where does a particle start given the step size, multipliers, and current
size of the aggregate
where does a particle die given the current state of things
walk a single particle
particles already part of the aggregate
aggregate, and if so, did w... | | diffusion limited aggregation , take 1
mjsottile\@computer.org
import DLA.Vec3
import DLA.KDTree
import DLA.Rmonad
import DLA.Params
import DLA.ConfigurationReader
import Debug.Trace
import System.Exit
import System.Environment (getArgs)
import System.Random.Mersenne.Pure64
type DLANode = KDTreeNode Int
sticks... |
d65696b986ed67c50287e52738899dc0f5ffbc8bd781356931824fe0761bbdbc | robert-stuttaford/bridge | debug.clj | (ns bridge.web.debug
(:require [bridge.web.template :as web.template]
[buddy.auth :as buddy]
[clojure.pprint :as pprint]
[clojure.string :as str]
[bridge.config :as config]))
(defn pprint-str [val]
(binding [clojure.pprint/*print-right-margin* 120]
(with-out-str ... | null | https://raw.githubusercontent.com/robert-stuttaford/bridge/867d81354457c600cc5c25917de267a8e267c853/src/bridge/web/debug.clj | clojure | (ns bridge.web.debug
(:require [bridge.web.template :as web.template]
[buddy.auth :as buddy]
[clojure.pprint :as pprint]
[clojure.string :as str]
[bridge.config :as config]))
(defn pprint-str [val]
(binding [clojure.pprint/*print-right-margin* 120]
(with-out-str ... | |
63fb313b49ab1f5b8501936c90f1b80227411ce6cb90b76272d3cf90e8e6d7d4 | astrada/google-drive-ocamlfuse | testBuffering.ml | open OUnit
open GapiMonad
let print_array arr =
let len = Bigarray.Array1.dim arr in
let r = Bytes.make len ' ' in
for i = 0 to len - 1 do
r.[i] <- arr.{i}
done;
Bytes.to_string r
let session =
{
GapiConversation.Session.curl = GapiCurl.Initialized;
config = GapiConfig.default;
auth = Gapi... | null | https://raw.githubusercontent.com/astrada/google-drive-ocamlfuse/7e22d03d6faeb76fb5b9306cf9a3562abad16461/test/testBuffering.ml | ocaml | open OUnit
open GapiMonad
let print_array arr =
let len = Bigarray.Array1.dim arr in
let r = Bytes.make len ' ' in
for i = 0 to len - 1 do
r.[i] <- arr.{i}
done;
Bytes.to_string r
let session =
{
GapiConversation.Session.curl = GapiCurl.Initialized;
config = GapiConfig.default;
auth = Gapi... | |
1f5783153482425cd063c37df0235b6dc778131ba478b3b1d7f83227ed7697be | clojurecup2014/parade-route | teststm.clj | Copyright ( c ) . 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/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/samples/stm/teststm.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 ) . All rights reserved .
Author :
Simple test of the STM .
( f1 )
(ns clojure.teststm)
(defn sleep [time-ms] (System.Threading.Thread/Sleep time-ms))
(def a (ref #{}))
(def b (ref #{}))
(def cycle-continue true)
(defn make-future [id]
(future
(try
(loop [n 0]
(dosy... |
ce3f04ac2e2ce2ec075eee2bb83c5b9b023abc09714f7e469e35e5845d55a4ca | program-repair-project/bug-localizer | bugDesc.ml | module F = Format
type t = {
program : string;
compiler_type : string;
test_cases : string list;
test_time_limit : int;
}
let find : string -> Yojson.Safe.t -> Yojson.Safe.t =
fun name -> function
| `Assoc l -> List.find (function n, _ -> n = name) l |> snd
| _ -> raise Not_found
let to_string = functio... | null | https://raw.githubusercontent.com/program-repair-project/bug-localizer/370c4b42d14fca67337683eb819b2e2b60f4ed14/src/bugDesc.ml | ocaml | module F = Format
type t = {
program : string;
compiler_type : string;
test_cases : string list;
test_time_limit : int;
}
let find : string -> Yojson.Safe.t -> Yojson.Safe.t =
fun name -> function
| `Assoc l -> List.find (function n, _ -> n = name) l |> snd
| _ -> raise Not_found
let to_string = functio... | |
7ebf379c976cfbc45a9911ba0b174ff0e68df0e0489d313d415f617316da2a84 | ucsd-progsys/liquidhaskell | ExactGADT7.hs | {-@ LIQUID "--expect-any-error" @-}
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
{-@ LIQUID "--prune-unsorted" @-}
{-@ LIQUID "--no-adt" @-}
{-@ LIQUID "--exact-data-con" @-}
module ExactGADT7 where
data Some a where
SomeBool :: Bool -> Some Bool
SomeInt :: Int -> Some Int
{-@ measure isBool @... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/ExactGADT7.hs | haskell | @ LIQUID "--expect-any-error" @
# LANGUAGE GADTs #
@ LIQUID "--prune-unsorted" @
@ LIQUID "--no-adt" @
@ LIQUID "--exact-data-con" @
@ measure isBool @
@ type Thing = { v: Some Bool | isBool v } @
@ a :: Thing @
@ b :: {v: Some Int | isBool v} @ | # LANGUAGE KindSignatures #
module ExactGADT7 where
data Some a where
SomeBool :: Bool -> Some Bool
SomeInt :: Int -> Some Int
isBool :: Some a -> Bool
isBool (SomeBool _) = True
isBool (SomeInt _) = False
a = SomeBool True
b = SomeInt 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.