_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 |
|---|---|---|---|---|---|---|---|---|
2c8d91eb84582c460d4da7f26b757cbe9b3da2dbf763fd54ff24db49dfd559e4 | TaylanUB/scheme-srfis | derived.body.scm | Copyright ( C ) ( 2007 ) . All Rights Reserved .
Made an R7RS library by , Copyright ( C ) 2014 .
;;; 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 , inclu... | null | https://raw.githubusercontent.com/TaylanUB/scheme-srfis/2d2b306e7a20a7155f639001a02b0870d5a3d3f7/srfi/41/derived.body.scm | scheme | Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
furnished to do so, subject to the following conditions:
The above copyright notice and t... | Copyright ( C ) ( 2007 ) . All Rights Reserved .
Made an R7RS library by , Copyright ( C ) 2014 .
deal in the Software without restriction , including without limitation the
sell copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Softwar... |
75414318e723e17f4ae2e90a8dcf25789a05539dcb67ff165802c069032b61f8 | Chream/mockingbird | all.lisp | ;;;; mockingbird/t/all.lisp
(in-package :cl-user)
(uiop:define-package :mockingbird/t/all
(:nicknames :mb.test)
(:use :closer-common-lisp)
(:use-reexport :mockingbird/t/functions
:mockingbird/t/methods)
(:documentation
""))
(in-package :mb.test)
| null | https://raw.githubusercontent.com/Chream/mockingbird/bf56e15faf8684fb96bd8094bd76c2d1b966c0ae/t/all.lisp | lisp | mockingbird/t/all.lisp |
(in-package :cl-user)
(uiop:define-package :mockingbird/t/all
(:nicknames :mb.test)
(:use :closer-common-lisp)
(:use-reexport :mockingbird/t/functions
:mockingbird/t/methods)
(:documentation
""))
(in-package :mb.test)
|
4669bde92599c277e8a6f622035134b2021fe8f1538ec22c7dbdf4778b95aa3f | dtgoitia/civil-autolisp | DeleteObjectFromBlock.lsp | Credit to ; ;
For ; ;
for the Recursive Routine ; ;
;; Me for tweaking it for you ;;
(defun c:fxb (/ blockName doc FLST)
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)) )
(setq
blockName (cdr (assoc 2 (entget (car (entsel "\nSelect block: ")))))
FLST nil
)
(fix1 bloc... | null | https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/Dump%20folder/DeleteObjectFromBlock.lsp | lisp | ;
;
;
Me for tweaking it for you ;;
Get entity name of blockName
Get next object within the drawing object table
(print (entget blockEntityName))
If the next object is an INSERT object
If true, get the name block and pass it as argument to "fix1" (recursive)
If false, check if next object is a dimension, if it... | (defun c:fxb (/ blockName doc FLST)
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)) )
(setq
blockName (cdr (assoc 2 (entget (car (entsel "\nSelect block: ")))))
FLST nil
)
(fix1 blockName)
(vl-cmdf "regen")
(prin1)
)
(defun fix1 (blockName / blockEntityName)
If the blockN... |
52b97d4c3fab21e384a4a7024ffe9da3245fb61a20f0e442a593e628ac4f96f5 | FrankC01/clasew | examples7.clj | (ns
^{:author "Frank V. Castellucci"
:doc "Identities Examples (Multi-Application)"}
clasew.examples7
(:require [clojure.pprint :refer :all]
[clasew.outlook :as outlook]
[clasew.contacts :as contacts]
[clasew.identities :as ident]
[clasew.ast-utils :as astu]))... | null | https://raw.githubusercontent.com/FrankC01/clasew/1e5a444bccd4f34c68a1e5d1ec2121a36fd8c959/dev/src/clasew/examples7.clj | clojure |
Sample ease of use forms
Setup a number of fictional contacts for demonstration
Create new individuals
Uncomment to run
(print-sample :contacts (ident/add-individuals oxnard sally))
(print-sample :outlook (ident/add-individuals oxnard sally))
(p (run-sample :contacts (ident/add-individuals oxnard sally)))
(p (r... | (ns
^{:author "Frank V. Castellucci"
:doc "Identities Examples (Multi-Application)"}
clasew.examples7
(:require [clojure.pprint :refer :all]
[clasew.outlook :as outlook]
[clasew.contacts :as contacts]
[clasew.identities :as ident]
[clasew.ast-utils :as astu]))... |
5735877d9bf226232057ee4476bc1265dd2f06e7325da4f24424bee8ca1ab2f4 | CatalaLang/catala | print.mli | This file is part of the Catala compiler , a specification language for tax
and social benefits computation rules . Copyright ( C ) 2020 , contributor :
< >
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
use this file except in compliance with the License . ... | null | https://raw.githubusercontent.com/CatalaLang/catala/d371df85a9c1de441674a8e2c73b5db10f1b96a9/compiler/scopelang/print.mli | ocaml | * [true] for debug printing
* [true] for debug printing | This file is part of the Catala compiler , a specification language for tax
and social benefits computation rules . Copyright ( C ) 2020 , contributor :
< >
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
use this file except in compliance with the License . ... |
1a4b6dec1dec8635df88a792e78327c0ca776b4e8aa28f85914b277332095e16 | ChrisPenner/eve | Listeners.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE RankNTypes #-}
module Eve.Internal.Listeners
( HasEvents
, dispatchEvent
, dispatchEvent_
, dispatchLocalEvent
, dispatchLocalEvent_
, dispatchEventAsync
, addListener
, addListener_
, addLoca... | null | https://raw.githubusercontent.com/ChrisPenner/eve/6081b1ff13229b93e5e5a4505fd23aa0a25c96b1/src/Eve/Internal/Listeners.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Registers an action to be performed directly following the Initialization phase.
| Registers an action to be performed BEFORE each async event is processed phase.
| Registers an action to be performed AFTER each event phase.
| Registers an action to be run before shutdo... | # LANGUAGE ExistentialQuantification #
# LANGUAGE ScopedTypeVariables #
module Eve.Internal.Listeners
( HasEvents
, dispatchEvent
, dispatchEvent_
, dispatchLocalEvent
, dispatchLocalEvent_
, dispatchEventAsync
, addListener
, addListener_
, addLocalListener
, addLocalListener_
, removeListener... |
5c4c57c36aeaaf5d54e3b7f5673c8156f6179754dec81c5a3df5e609ad6dfda0 | haskell/cabal | Assignment.hs | module Distribution.Solver.Modular.Assignment
( Assignment(..)
, PAssignment
, FAssignment
, SAssignment
, toCPs
) where
import Prelude ()
import Distribution.Solver.Compat.Prelude hiding (pi)
import qualified Data.Array as A
import qualified Data.List as L
import qualified Data.Map as M
impo... | null | https://raw.githubusercontent.com/haskell/cabal/6896c6aa0e4804913aaba0bbbe00649e18f17bb8/cabal-install-solver/src/Distribution/Solver/Modular/Assignment.hs | haskell | | A (partial) package assignment. Qualified package names
are associated with instances.
| A (partial) assignment of variables.
| Delivers an ordered list of fully configured packages.
TODO: This function is (sort of) ok. However, there's an open bug
w.r.t. unqualification. There might be several different insta... | module Distribution.Solver.Modular.Assignment
( Assignment(..)
, PAssignment
, FAssignment
, SAssignment
, toCPs
) where
import Prelude ()
import Distribution.Solver.Compat.Prelude hiding (pi)
import qualified Data.Array as A
import qualified Data.List as L
import qualified Data.Map as M
impo... |
2049ea68d4d1ff3d3aaea6bc4a65f2b84a887707817b57522c618f12659148b5 | penpot/penpot | main.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.srepl.main
"A collection of adhoc fixes scripts."
#_:clj-kondo/ignore
(:require
[app.common.l... | null | https://raw.githubusercontent.com/penpot/penpot/b2b224e5a73cfd5a5642e050e731bb401732f6f1/backend/src/app/srepl/main.clj | clojure |
Copyright (c) KALEIDOS INC | 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 /.
(ns app.srepl.main
"A collection of adhoc fixes scripts."
#_:clj-kondo/ignore
(:require
[app.common.logging :as l]
[app.common.ppri... |
ef7d0af2c1c46dc1aa2e69c32c2de2399fc082c43336c8bf9a3856343c44208d | wilkerlucio/multi-timer | timer.cljs | (ns com.wsscode.multi-timer.components.timer
(:require [fulcro.client.primitives :as fp]
[com.wsscode.multi-timer.ui :as ui]
[clojure.spec.alpha :as s]
[fulcro.client.mutations :as mutations]))
(s/def ::id uuid?)
(s/def ::sections (s/coll-of (s/keys)))
(s/def ::record-start pos-in... | null | https://raw.githubusercontent.com/wilkerlucio/multi-timer/efd2c04dc7f25249368bdabadc2a76d54a9bb5f8/src/com/wsscode/multi_timer/components/timer.cljs | clojure | (ns com.wsscode.multi-timer.components.timer
(:require [fulcro.client.primitives :as fp]
[com.wsscode.multi-timer.ui :as ui]
[clojure.spec.alpha :as s]
[fulcro.client.mutations :as mutations]))
(s/def ::id uuid?)
(s/def ::sections (s/coll-of (s/keys)))
(s/def ::record-start pos-in... | |
1d87fe60d9870a2f8ca1c65206c0e983b12b1495dfeedafc51b2045a5601e689 | steshaw/PLAR | skolems.ml | (* ========================================================================= *)
(* Illustration of Skolemizing a set of formulas *)
(* *)
Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
(* =... | null | https://raw.githubusercontent.com/steshaw/PLAR/c143b097d1028963f4c1d24f45a1a56c8b65b838/skolems.ml | ocaml | =========================================================================
Illustration of Skolemizing a set of formulas
========================================================================= | Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
let rec rename_term tm =
match tm with
Fn(f,args) -> Fn("old_"^f,map rename_term args)
| _ -> tm;;
let rename_form = onformula rename_term;;
let rec skolems fms corr =
match fms with
[] -> [],corr
| (p::ofms) ->
let p... |
39c3063c49912597f7311c00957e126e57aa3a1880f6f158533f4d5cec219976 | OCamlPro/OCamlPro-OCaml-Branch | poly.ml | $ I d : poly.ml 9396 2009 - 10 - 26 07:11:36Z garrigue $
(*
Polymorphic methods are now available in the main branch.
Enjoy.
*)
(* Tests for explicit polymorphism *)
open StdLabels;;
type 'a t = { t : 'a };;
type 'a fold = { fold : 'b. f:('b -> 'a -> 'b) -> init:'b -> 'b };;
let f l = { fold = List.fold_left ... | null | https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/testsuite/tests/typing-poly/poly.ml | ocaml |
Polymorphic methods are now available in the main branch.
Enjoy.
Tests for explicit polymorphism
printer is wrong on the next (no official syntax)
Type variable scope
PR#1374
usage avant instance
various old bugs
PR#1607
PR#1731
Full polymorphism if we do not expand
Loose polymorphism if we e... | $ I d : poly.ml 9396 2009 - 10 - 26 07:11:36Z garrigue $
open StdLabels;;
type 'a t = { t : 'a };;
type 'a fold = { fold : 'b. f:('b -> 'a -> 'b) -> init:'b -> 'b };;
let f l = { fold = List.fold_left l };;
(f [1;2;3]).fold ~f:(+) ~init:0;;
class ['b] ilist l = object
val l = l
method add x = {< l = x :: l >}
... |
eb5def9610f2b8be3c11e97b5d7a5a13e383742c69b4c2317f67ebf805e4292b | softwarelanguageslab/maf | R5RS_WeiChenRompf2019_the-little-schemer_ch6-2.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((atom? (lambda (x)
(if (not (pair? x)) (not (null? x)) #f)))
(numbered? (lambda (aexp)
(<change>
()
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_WeiChenRompf2019_the-little-schemer_ch6-2.scm | scheme | Changes:
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 1
* swaps : 0
* negated predicates : 1
(letrec ((atom? (lambda (x)
(if (not (pair? x)) (not (null? x)) #f)))
(numbered? (lambda (aexp)
(<change>
()
aexp)
(if (atom? ae... |
26b7247fbfa14c39b242b5546623cad7b0516f61b23a8a02db821e872fc6f2fc | biocaml/phylogenetics | test_felsenstein.ml | * Tests of the felsenstein implementation . The results are compared to bppml
to check correctness . A variety of models and problem sizes are used to generate
trees and alignments which are submitted to our felsenstein implementation and
bppml .
to check correctness. A variety of models and probl... | null | https://raw.githubusercontent.com/biocaml/phylogenetics/e225616a700b03c429c16f760dbe8c363fb4c79d/tests/test_felsenstein.ml | ocaml | * Tests of the felsenstein implementation . The results are compared to bppml
to check correctness . A variety of models and problem sizes are used to generate
trees and alignments which are submitted to our felsenstein implementation and
bppml .
to check correctness. A variety of models and probl... | |
efa6351845cd5ffb6ada31598e109b20b714a9356a8864313999c7c82e24d982 | VERIMAG-Polyhedra/VPL | FMapAVL.ml | open Datatypes
open FMapList
open Nat0
type __ = Obj.t
let __ = let rec f _ = Obj.repr f in Obj.repr f
module Raw =
functor (I:Int.Int) ->
functor (X:OrderedType.OrderedType) ->
struct
type key = X.t
type 'elt tree =
| Leaf
| Node of 'elt tree * key * 'elt * 'elt tree * I.t
(** val tree_rect :
'a... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/extracted/FMapAVL.ml | ocaml | * val tree_rect :
'a2 -> ('a1 tree -> 'a2 -> key -> 'a1 -> 'a1 tree -> 'a2 -> I.t -> 'a2)
-> 'a1 tree -> 'a2 *
* val height : 'a1 tree -> I.t *
* val empty : 'a1 tree *
* val is_empty : 'a1 tree -> bool *
* val create : 'a1 tree -> key -> 'a1 -> 'a1 tree -> 'a1 tree *
* val assert_false : 'a1 tree -> key ->... | open Datatypes
open FMapList
open Nat0
type __ = Obj.t
let __ = let rec f _ = Obj.repr f in Obj.repr f
module Raw =
functor (I:Int.Int) ->
functor (X:OrderedType.OrderedType) ->
struct
type key = X.t
type 'elt tree =
| Leaf
| Node of 'elt tree * key * 'elt * 'elt tree * I.t
let rec tree_rect f f0 = fu... |
248a932694e20f07b2e0e2dcc39b029c27b9e222b08a665ff0bcdb0250c2ab46 | exercism/babashka | project.clj | (defproject interest-is-interesting "0.1.0-SNAPSHOT"
:description "interest-is-interesting exercise."
:url "-is-interesting"
:dependencies [[org.clojure/clojure "1.10.0"]]) | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/concept/interest-is-interesting/project.clj | clojure | (defproject interest-is-interesting "0.1.0-SNAPSHOT"
:description "interest-is-interesting exercise."
:url "-is-interesting"
:dependencies [[org.clojure/clojure "1.10.0"]]) | |
bbca70312dbd25ba6c1d09d32891a006a2c7407c5c5dfb884663f0333f0ce977 | HunterYIboHu/htdp2-solution | ex219-going-on.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex219-going-on) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeati... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter2/Section13-project-list/ex219-going-on.rkt | racket | about the language level of this file in a form that our tools can easily process.
graphic constants
physical constants
data difinitions
a Segment is a Posn represent the segment's current position
(make-worm p los d f) p is the current position of the head of worm,
los is a list of "connected" segments, the d i... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex219-going-on) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/universe)
(require 2htdp/image)
(de... |
98b391819f5d2b034a876a2fefd96df294ad8272d372c92d0c0d2ce11cb5ddcc | clash-lang/clash-compiler | Signed.hs | |
Copyright : ( C ) 2021 - 2022 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Random generation of Signed numbers .
Copyright : (C) 2021-2022, QBayLogic B.V.
License : BSD2 (see the file LICENSE)
Maintainer : QBayLogic B.V. <>
Random generation of... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/ba4765139ea0728546bf934005d2d9b77e48d8c7/clash-prelude-hedgehog/src/Clash/Hedgehog/Sized/Signed.hs | haskell | # LANGUAGE GADTs # | |
Copyright : ( C ) 2021 - 2022 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Random generation of Signed numbers .
Copyright : (C) 2021-2022, QBayLogic B.V.
License : BSD2 (see the file LICENSE)
Maintainer : QBayLogic B.V. <>
Random generation of... |
7ec82064c8e81b81033667d06589d087cad1e2fb9a6f03ebe3b2ce9b7710251b | Ekatereana/CommonLispWorks | where.lisp |
(defun get_operation (symbol value)
(cond
((string= symbol "=")
(cond
((numberp value) #'=)
((stringp value) #'string=)))
((string= symbol ">")
(cond
((numberp value) #'>)
((stringp value) #'string>)))
((string= symbol "<")
(cond
((numberp value) #'<)
... | null | https://raw.githubusercontent.com/Ekatereana/CommonLispWorks/13111f7c45ec4d672dfdf3689ba22554d5c60727/where.lisp | lisp | get list of conditions
get id-s of column that would be compare
get operations for all conditions
get result table by intersection of all tables that we have |
(defun get_operation (symbol value)
(cond
((string= symbol "=")
(cond
((numberp value) #'=)
((stringp value) #'string=)))
((string= symbol ">")
(cond
((numberp value) #'>)
((stringp value) #'string>)))
((string= symbol "<")
(cond
((numberp value) #'<)
... |
f9500933cc31090960cc3bb3b4f024f7670f3e7e432fe53554110147baac0937 | 2600hz/kazoo | knm_inum.erl | %%%-----------------------------------------------------------------------------
( C ) 2011 - 2020 , 2600Hz
%%% @doc Carrier for inums
@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... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/carriers/knm_inum.erl | erlang | -----------------------------------------------------------------------------
@doc Carrier for inums
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc
@end
------------------------------------------... | ( C ) 2011 - 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_inum).
-behaviour(knm_gen_carrier).
-export([info/0]).
-export([is_local/0]).... |
eaea0eb5299d2e873543e481e1cd59fcf4ceb546d2c7d99ed27d5129f2b575dc | lmj/lparallel | defpun.lisp | Copyright ( c ) 2014 , . 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 c... | null | https://raw.githubusercontent.com/lmj/lparallel/9c11f40018155a472c540b63684049acc9b36e15/src/defpun.lisp | lisp |
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.
* Redistributions in binary... | Copyright ( c ) 2014 , . All rights reserved .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR T... |
13ab1008c14b0585ce84e0775507af41ed6f1d67cebb85791431e3bb01d5416a | asdr/easyweb | _view.lisp | (in-package :common-lisp-user)
(defpackage :(% TMPL_VAR APPLICATION_NAME %).view
(:use #:cl
#:easyweb
#:easyweb.html
#:hunchentoot))
(in-package :(% TMPL_VAR APPLICATION_NAME %).view)
(let ((easyweb::*application-name* "(% TMPL_VAR APPLICATION_NAME %)"))
(defview index-page/get
:url-pattern (:prefix "/... | null | https://raw.githubusercontent.com/asdr/easyweb/b259358a5f5e146b233b38d5e5df5b85a5a479cd/template-app/_view.lisp | lisp | (in-package :common-lisp-user)
(defpackage :(% TMPL_VAR APPLICATION_NAME %).view
(:use #:cl
#:easyweb
#:easyweb.html
#:hunchentoot))
(in-package :(% TMPL_VAR APPLICATION_NAME %).view)
(let ((easyweb::*application-name* "(% TMPL_VAR APPLICATION_NAME %)"))
(defview index-page/get
:url-pattern (:prefix "/... | |
d973ce076d6ef5ec188aa09fa606dc433a99da905c6203ac714e60d6ea2a0f74 | MisakaCenter/RayTracer.ml | Aarect.ml | open Base
open Vec
open Ray
open Hittable
open Utils
open Core
open Float
open Aabb
class xy_rect _x0 _x1 _y0 _y1 _k (m : hit_record material_meta pointer) =
object
inherit hittable
val mutable x0:float = _x0
val mutable x1:float = _x1
val mutable y0:float = _y0
val mutable y1:float = _y1
va... | null | https://raw.githubusercontent.com/MisakaCenter/RayTracer.ml/07bacba1ae3f46e1055465a7b79af5cfbf5d2010/lib/Aarect.ml | ocaml | open Base
open Vec
open Ray
open Hittable
open Utils
open Core
open Float
open Aabb
class xy_rect _x0 _x1 _y0 _y1 _k (m : hit_record material_meta pointer) =
object
inherit hittable
val mutable x0:float = _x0
val mutable x1:float = _x1
val mutable y0:float = _y0
val mutable y1:float = _y1
va... | |
7b3dc10c4293759258c588c7dca16903b1f721019410c6711a211d3b390e3409 | ept/compsci | tick5.ml | ML ASSESSED EXERCISES . TICK 5 SUBMISSION FROM M.A. KLEPPMANN
Estimated time : 1h . Actual time : 40 mins .
(* Part 1: A function f(m) that returns another function which adds
m onto a given parameter. *)
fun plus(m:int) = (fn n => m+n);
(* This is equivalent to writing: *)
fun plus m n: int = m+n;
val su... | null | https://raw.githubusercontent.com/ept/compsci/ed666bb4cf52ac2af5c2d13894870bdc23dca237/ml/tick5.ml | ocaml | Part 1: A function f(m) that returns another function which adds
m onto a given parameter.
This is equivalent to writing:
or, to be a bit crazier:
or, to complete the craziness: | ML ASSESSED EXERCISES . TICK 5 SUBMISSION FROM M.A. KLEPPMANN
Estimated time : 1h . Actual time : 40 mins .
fun plus(m:int) = (fn n => m+n);
fun plus m n: int = m+n;
val succ = plus 1;
succ is now a function that returns the successor to its argument
passed , i.e. the argument plus 1 .
passed, i.e... |
43a265baac6f9ee09e97fbee4286e1f785a510dac38b2bf038a219119796ddac | synrc/nitro | element_meter.erl | -module(element_meter).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-compile(export_all).
render_element(Record) when Record#meter.show_if==false -> [<<>>];
render_element(Record) ->
List = [
%global
{<<"accesskey">>, Record#meter.accesskey},
{<<"class">>, Record#m... | null | https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/form/element_meter.erl | erlang | global
spec | -module(element_meter).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-compile(export_all).
render_element(Record) when Record#meter.show_if==false -> [<<>>];
render_element(Record) ->
List = [
{<<"accesskey">>, Record#meter.accesskey},
{<<"class">>, Record#meter.class},
... |
989ab636406a38afc8c15cc34d6630d40687c72edee1712b3d869941f45f212b | ocaml-batteries-team/batteries-included | odoc_batteries_factored.ml | (*From OCamlDoc*)
open Odoc_info;;
open Odoc_info.Value
open Odoc_info.Module
open Odoc_info.Type
open Odoc_info.Class
open Odoc_info.Exception
(*module StringSet = Odoc_html.StringSet*)
module StringSet = Set.Make(String);;
warning "Loading factored";;
(*From the base library*)
open List
(** {1 Tools}*)
* two nam... | null | https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/f143ef5ec583d87d538b8f06f06d046d64555e90/build/odoc_batteries_factored.ml | ocaml | From OCamlDoc
module StringSet = Odoc_html.StringSet
From the base library
* {1 Tools}
* Return the basename in a path.
[end_of_name "A.B.C.D.E.t"] produces ["t"]
* Print an [info option]
* {1 Configuration}
* A list of primitive type names for which we should rather link
to the corresponding module
* The li... | open Odoc_info;;
open Odoc_info.Value
open Odoc_info.Module
open Odoc_info.Type
open Odoc_info.Class
open Odoc_info.Exception
module StringSet = Set.Make(String);;
warning "Loading factored";;
open List
* two names into a module path .
[ concat a b ] is [ a^" . "^b ] if neither [ a ]
nor [ b ] is empty... |
4c7ff72d24bd73742f684a8543f8ff07884aca5401cb7542d1ec7bfa4fc0b148 | pauleve/pint | an_cli.ml |
open PintTypes
open AutomataNetwork
let parse_local_state an data =
let sig_ls = An_input.parse_string An_parser.local_state data
in
resolve_sig_ls an sig_ls
let parse_sls_list = An_input.parse_string An_parser.local_state_list
let parse_local_state_list an data =
let sls = parse_sls_list data
in
List.m... | null | https://raw.githubusercontent.com/pauleve/pint/7cf943ec60afcf285c368950925fd45f59f66f4a/anlib/an_cli.ml | ocaml | *
Input options
*
*
Main usage
* |
open PintTypes
open AutomataNetwork
let parse_local_state an data =
let sig_ls = An_input.parse_string An_parser.local_state data
in
resolve_sig_ls an sig_ls
let parse_sls_list = An_input.parse_string An_parser.local_state_list
let parse_local_state_list an data =
let sls = parse_sls_list data
in
List.m... |
9993815f51fb59f6d46bb768578c555e06bd78a3a14b5eec943b5b16e480d7d0 | TyOverby/mono | types.ml | This file defines the mutually recursive types at the heart of Async . The functions
associated with the types are defined in the corresponding file(s ) for each module .
This file should define only types , not functions , since functions defined inside the
recursive modules are not inlined .
... | null | https://raw.githubusercontent.com/TyOverby/mono/5ce4569fc6edf6564d29d37b66d455549df1e497/vendor/janestreet-async_kernel/src/types.ml | ocaml | * [repr] exists so that we may hide the implementation of a [Bvar.t], and then add a
phantom type to it upstream. Without this, the phantom type variable would allow
for anything to be coerced in and out, since it is unused. | This file defines the mutually recursive types at the heart of Async . The functions
associated with the types are defined in the corresponding file(s ) for each module .
This file should define only types , not functions , since functions defined inside the
recursive modules are not inlined .
... |
3771a8cee68753d133ae01639fa9ae24eb24dfa5bf8adf8f0f819ba6a836181a | zalando/friboo | http.clj | (ns org.zalando.stups.friboo.system.http
(:require [io.sarnowski.swagger1st.executor :as s1stexec]
[io.clj.logging :refer [with-logging-context]]
[ring.util.response :as r]
[org.zalando.stups.friboo.ring :as ring]
[org.zalando.stups.friboo.log :as log]
[io.s... | null | https://raw.githubusercontent.com/zalando/friboo/5e312365a57535b0197fd787bd95ffafe6c3f4aa/src/org/zalando/stups/friboo/system/http.clj | clojure | Security handler types according to /#securitySchemeObject
Refer to default-middlewares object below for middleware lists
Create context from the YAML definition on the classpath, optionally provide validation flag
Some middleware will need to access the component later
User can provide additional handlers to be e... | (ns org.zalando.stups.friboo.system.http
(:require [io.sarnowski.swagger1st.executor :as s1stexec]
[io.clj.logging :refer [with-logging-context]]
[ring.util.response :as r]
[org.zalando.stups.friboo.ring :as ring]
[org.zalando.stups.friboo.log :as log]
[io.s... |
351c38f15c8a76330170830b7babedfc5e9a2dc8608ef762359a3a90bf405202 | typeable/compaREST | GitHub.hs | module Control.Monad.Freer.GitHub
( GitHub (..),
runGitHub,
sendGitHub,
)
where
import Control.Monad.Freer
import Control.Monad.Freer.Error
import Control.Monad.IO.Class
import Data.Aeson
import GitHub hiding (Error)
import qualified GitHub as GH
data GitHub r where
SendGHRequest :: FromJSON x => Reques... | null | https://raw.githubusercontent.com/typeable/compaREST/6d8a67339c0e7b20a6c721eec7a2db093a0311fc/github-action/Control/Monad/Freer/GitHub.hs | haskell | module Control.Monad.Freer.GitHub
( GitHub (..),
runGitHub,
sendGitHub,
)
where
import Control.Monad.Freer
import Control.Monad.Freer.Error
import Control.Monad.IO.Class
import Data.Aeson
import GitHub hiding (Error)
import qualified GitHub as GH
data GitHub r where
SendGHRequest :: FromJSON x => Reques... | |
078c0204ef21b5b59b6b492849ae7311fcbb07c7aa0df100ac250dbcae68f9d3 | metaocaml/ber-metaocaml | t210-setfield2.ml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
type t = {
mutable a : int;
mutable b : int;
mutable c : int;... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t210-setfield2.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
type t = {
mutable a : int;
mutable b : int;
mutable c : int;... | |
112b4a1d35dd9541650f9505b4a361c83c70f901ca34e5ce1c2cc8a28833c7e4 | smallmelon/sdzmmo | data_skill.erl |
%%%---------------------------------------
%%% @Module : data_skill
@Author : xyao
%%% @Email :
@Created : 2010 - 08 - 20 10:46:47
%%% @Description: 自动生成
%%%---------------------------------------
-module(data_skill).
-export([get/2, get_ids/1]).
-include("record.hrl").
get_ids(1) ->
[101101,... | null | https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/data/data_skill.erl | erlang | ---------------------------------------
@Module : data_skill
@Email :
@Description: 自动生成
---------------------------------------
|
@Author : xyao
@Created : 2010 - 08 - 20 10:46:47
-module(data_skill).
-export([get/2, get_ids/1]).
-include("record.hrl").
get_ids(1) ->
[101101,101102,101201,102101,102301,103101,103301,104301,105101,105301,106101];
get_ids(2) ->
[301101,301102,301201,302301,302501,303101,303301,304101,305101,3055... |
765e34bd5c8c7307bafb04c6a4a29344aa13de7f161e699982c444e705eb5b0e | tsloughter/kuberl | kuberl_v1_pod_template_list.erl | -module(kuberl_v1_pod_template_list).
-export([encode/1]).
-export_type([kuberl_v1_pod_template_list/0]).
-type kuberl_v1_pod_template_list() ::
#{ 'apiVersion' => binary(),
'items' := list(),
'kind' => binary(),
'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta()
}.
encode(#{ 'api... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_pod_template_list.erl | erlang | -module(kuberl_v1_pod_template_list).
-export([encode/1]).
-export_type([kuberl_v1_pod_template_list/0]).
-type kuberl_v1_pod_template_list() ::
#{ 'apiVersion' => binary(),
'items' := list(),
'kind' => binary(),
'metadata' => kuberl_v1_list_meta:kuberl_v1_list_meta()
}.
encode(#{ 'api... | |
e60f23224fc50220cb2a9d9381090785fa204548aa5f2095e39dbd6b661d66d1 | jaredly/reason-language-server | switch.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/406/switch.mli | ocaml | ************************************************************************
OCaml
... | , projet , INRIA Rocquencourt
Copyright 2000 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type 'a shared = Shared of 'a | Single of 'a
type 'a t_store =
{act_get : unit -> 'a array ;
act_ge... |
a51c4e1268d96d50cc680deee38a5c4847d9a8f6557e46f094fe48feab48ad56 | vraid/earthgen | flvector3.rkt | #lang typed/racket
(provide (all-defined-out))
(require "flvector3-local.rkt"
math/flonum)
(: flvector3-zero (-> FlVector))
(define (flvector3-zero)
(flvector 0.0 0.0 0.0))
(: flvector3-zero? (FlVector -> Boolean))
(define (flvector3-zero? v)
(zero? (flvector3-length-squared v)))
(: flvector3-negative... | null | https://raw.githubusercontent.com/vraid/earthgen/208ac834c02208ddc16a31aa9e7ff7f91c18e046/package/vraid/math/flvector3.rkt | racket | #lang typed/racket
(provide (all-defined-out))
(require "flvector3-local.rkt"
math/flonum)
(: flvector3-zero (-> FlVector))
(define (flvector3-zero)
(flvector 0.0 0.0 0.0))
(: flvector3-zero? (FlVector -> Boolean))
(define (flvector3-zero? v)
(zero? (flvector3-length-squared v)))
(: flvector3-negative... | |
2618ee28f69c995eacae7e16a70a9b307bfd538761ecffe6d23c4c3491ee7d69 | biocad/servant-openapi3 | OpenApi.hs | -- |
Module : Servant . OpenApi
License : BSD3
Maintainer : < >
-- Stability: experimental
--
-- This module provides means to generate and manipulate
OpenApi specification for servant APIs .
--
OpenApi is a project used to describe and document RESTful APIs .
--
The OpenApi specification ... | null | https://raw.githubusercontent.com/biocad/servant-openapi3/f7d5491cd16f6cd390244a53c18c4c781c75b995/src/Servant/OpenApi.hs | haskell | |
Stability: experimental
This module provides means to generate and manipulate
Additional utilities can also take advantage of the resulting files, such as testing tools.
* How to use this library
$howto
** Generate @'OpenApi'@
$generate
** Annotate
$annotate
** Test
$test
** Serve
$serve
* @'HasO... | Module : Servant . OpenApi
License : BSD3
Maintainer : < >
OpenApi specification for servant APIs .
OpenApi is a project used to describe and document RESTful APIs .
The OpenApi specification defines a set of files required to describe such an API .
These files can then be used by the Open... |
c2f2332b3bd780383e731da0c5d92434386dbeeb8a0686bbf7d5b6f52465db8b | tqtezos/minter-sdk | Util.hs | {-# OPTIONS_GHC -Wno-redundant-constraints #-}
module Test.Swaps.Util
( originateFA2
, originateWithAdmin
, originateSwap
, originateAllowlistedSwap
, originateAllowlistedBurnSwap
, originateAllowlistedFeeSwap
, originateChangeBurnAddressSwap
, originateOffchainCollections
, originateOffchainSwap
,... | null | https://raw.githubusercontent.com/tqtezos/minter-sdk/6239f6ee8435977085c00c194224d4223386841a/packages/minter-contracts/test-hs/Test/Swaps/Util.hs | haskell | # OPTIONS_GHC -Wno-redundant-constraints #
| Originate the swaps contract.
| Originate the allowlisted swaps contract.
| Originate the allowlisted burn swaps contract.
| Originate the allowlisted burn swaps contract and admin for it.
| Originate the allowlisted burn swaps contract.
| Originate the allowlisted bur... |
module Test.Swaps.Util
( originateFA2
, originateWithAdmin
, originateSwap
, originateAllowlistedSwap
, originateAllowlistedBurnSwap
, originateAllowlistedFeeSwap
, originateChangeBurnAddressSwap
, originateOffchainCollections
, originateOffchainSwap
, originateOffchainSwapBurnFee
, originateOffcha... |
d6fa14fc2b02c58d832c76d26710b8acb9a871b43f785817c1758875d6da5aaa | ghcjs/jsaddle-dom | SVGFEDiffuseLightingElement.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGFEDiffuseLightingElement
(getIn1, getSurfaceScale, getDiffuseConstant, getKernelUnitLengthX,
getKernelUn... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGFEDiffuseLightingElement.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGFEDiffuseLightingElement
(getIn1, getSurfaceScale, getDiffuseConstant, getKernelUnitLengthX,
getKernelUnitLengthY, SVGFEDiffuseLightingElement(..),
gTypeSVGFEDiffuseLightingElement)
where
... |
3ba06499e9e2ebcf06c45e968ec4444548ce6e0f2743d1dd93eadb14435ed485 | containium/containium | mail.clj | 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 /.
(ns containium.systems.mail
"A mail sending system."
(:require [containium.systems :refer (require-system Startable)]
[containi... | null | https://raw.githubusercontent.com/containium/containium/dede4098de928bed9ce8fccfc0a3891655ee162e/systems/mail/src/containium/systems/mail.clj | clojure | The public API | 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 /.
(ns containium.systems.mail
"A mail sending system."
(:require [containium.systems :refer (require-system Startable)]
[containi... |
66dc1d6de88738dc75aa11be781776905b1b975c50e7ddea69b2d8e10f941b16 | robert-spurrier/robokit | midi.clj | (ns robokit.midi
(:require [overtone.midi.file :as midi])
(:import [javax.sound.midi.spi MidiFileWriter]
[javax.sound.midi
Sequence
Track
MidiEvent
MidiMessage
ShortMessage
MetaMessage
SysexMessage
MidiSystem]... | null | https://raw.githubusercontent.com/robert-spurrier/robokit/ea81cfd37223c0c067e67c405598bc25c594d61d/src/robokit/midi.clj | clojure | (ns robokit.midi
(:require [overtone.midi.file :as midi])
(:import [javax.sound.midi.spi MidiFileWriter]
[javax.sound.midi
Sequence
Track
MidiEvent
MidiMessage
ShortMessage
MetaMessage
SysexMessage
MidiSystem]... | |
49db6be223e747ae3310459ffbe5b022dee7560d24e329a960b6a49f74025a43 | stackbuilders/inflections-hs | CamelCase.hs | -- |
Module : Text . Inflections . . CamelCase
Copyright : © 2016
License : MIT
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
Parser for camel case “ symbols ” .
# LANGUAGE CPP #
# LANGUAGE DataKinds #
{-# LANGUAGE Overl... | null | https://raw.githubusercontent.com/stackbuilders/inflections-hs/5f731cba9bc03cc128f7f4aa8486b09eafe2786d/Text/Inflections/Parse/CamelCase.hs | haskell | |
Stability : experimental
Portability : portable
# LANGUAGE OverloadedStrings #
>>> bar <- mkAcronym "bar"
>>> parseCamelCase [bar] "FooBarBazz"
Right [Word "Foo",Acronym "Bar",Word "Bazz"]
>>> parseCamelCase [] "foo_bar_bazz"
unexpected '_'
expecting end of input, lowercase letter, or uppercase lette... | Module : Text . Inflections . . CamelCase
Copyright : © 2016
License : MIT
Maintainer : < >
Parser for camel case “ symbols ” .
# LANGUAGE CPP #
# LANGUAGE DataKinds #
module Text.Inflections.Parse.CamelCase
( parseCamelCase )
where
# if MIN_VERSION_b... |
58e3d6d3126a820ca80b806bccf7e8b0fd574a0f52b39981def517d3df778e65 | LPCIC/matita | boxPp.ml | Copyright ( C ) 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of the GNU... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/content_pres/boxPp.ml | ocaml | string_space
children fit in a row
break needed, re-render using a Box.V
let indent_header = if indent then string_indent else "" in | Copyright ( C ) 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of the GNU... |
754be4173757a61d81c4d1fd80037518916b2b719aa5aec99968e8a3df6253aa | mitsuchi/mud | TypeEval.hs | -- 型評価
module TypeEval where
import Control.Monad (forM_)
import Control.Monad.Except
import Data.Char
import Data.IORef
import Data.List (find, intercalate)
import Data.Map ((!?))
import qualified Data.Map as Map hid... | null | https://raw.githubusercontent.com/mitsuchi/mud/48c08a2847b6f3efcef598806682da7efca2449d/src/TypeEval.hs | haskell | 型評価
リストの型は、要素すべてと同じ型。ひとつでも違う型があるとエラー。
複式の型は最後の式の型なので、途中が違う型でもいい
本体の型が返り値の型と一致する必要がある
関数が再帰的に定義される可能性があるので、いま定義しようとしてる関数を先に型環境に登録しちゃう
本体の型が返り値の型と一致する必要がある
プリミティブな環境で、与えられた式の型を評価する
与えられた環境をコピーして新しい環境をつくり、その下で与えられた式の型を評価する
もとの環境に影響を与えないように
型環境 typeEnv と env のもとで body を評価する
マッチ式の引数の列が、与えられた型の列(マッチ式を含む関数の型)とマッチする... | module TypeEval where
import Control.Monad (forM_)
import Control.Monad.Except
import Data.Char
import Data.IORef
import Data.List (find, intercalate)
import Data.Map ((!?))
import qualified Data.Map as Map hiding (fo... |
b4f661d45115d6516c75a0b8571fe79e6ec921419fb2e64d5bce1ca03ca4f711 | RefactoringTools/HaRe | D2a.hs | module Demote.D2a where
--demote 'sumSquares' should fail as it used by module 'A2'.
sumSquares (x:xs) = sq x + sumSquares xs
sumSquares [] = 0
sq x = x ^pow
pow = 2
main = sumSquares [1..4]
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Demote/D2a.hs | haskell | demote 'sumSquares' should fail as it used by module 'A2'. | module Demote.D2a where
sumSquares (x:xs) = sq x + sumSquares xs
sumSquares [] = 0
sq x = x ^pow
pow = 2
main = sumSquares [1..4]
|
4561b60969f07d680c6b11faa36718f4aa0cfb0e511b6f55fe99d0c7c30ac412 | haskell-webgear/webgear | Body.hs | # OPTIONS_GHC -Wno - deprecations #
module Properties.Trait.Body (
tests,
) where
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.IORef (newIORef, readIORef, writeIORef)
import Data.String (fromString)
import Network.Wai (defaultRequest, requestBody)
import Test.QuickCheck (Property, allProperties, coun... | null | https://raw.githubusercontent.com/haskell-webgear/webgear/60e5547f9450aac36727e8d9980e0a8cbdb69660/webgear-server/test/Properties/Trait/Body.hs | haskell | # OPTIONS_GHC -Wno - deprecations #
module Properties.Trait.Body (
tests,
) where
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.IORef (newIORef, readIORef, writeIORef)
import Data.String (fromString)
import Network.Wai (defaultRequest, requestBody)
import Test.QuickCheck (Property, allProperties, coun... | |
284aa92dfb382fc5dc819485509497e48b6140b23d485af9ad3c3c78af9db38c | onyx-platform/onyx-benchmark | bench_plugin_test.clj | (ns onyx.plugin.bench-plugin-test
(:require [clojure.core.async :refer [chan dropping-buffer put! >! <! <!! go >!!]]
[taoensso.timbre :refer [info warn trace fatal] :as timbre]
[onyx.peer.pipeline-extensions :as p-ext]
[onyx.plugin.bench-plugin]
[onyx.static.logging-con... | null | https://raw.githubusercontent.com/onyx-platform/onyx-benchmark/bad93b27b9d7139330697616b04c31f4f040034b/test/onyx/plugin/bench_plugin_test.clj | clojure | or :task-name for an individual task | (ns onyx.plugin.bench-plugin-test
(:require [clojure.core.async :refer [chan dropping-buffer put! >! <! <!! go >!!]]
[taoensso.timbre :refer [info warn trace fatal] :as timbre]
[onyx.peer.pipeline-extensions :as p-ext]
[onyx.plugin.bench-plugin]
[onyx.static.logging-con... |
a476874bbcc3f4edfb271cde6956d199b3478de8a4a928a355db7b0e3c8cc7bb | RichiH/git-annex | MatchExpression.hs | git - annex command
-
- Copyright 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.MatchExpression where
import Command
import Annex.FileMatcher
import Types.FileMatcher
import U... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/MatchExpression.hs | haskell | When a key is provided, use its size. | git - annex command
-
- Copyright 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.MatchExpression where
import Command
import Annex.FileMatcher
import Types.FileMatcher
import U... |
937e0eef56a544d2ae4c83d1970d62962a0ee59621fc7cc12b8cf27958e7c451 | azimut/shiny | molecular.lisp | (in-package :shiny)
;; --------------------------------------------------------------------
;; The rules for the algorithm are as follows :
;;
two different note lengths need to be defined , e.g. " 4 " and " 3 "
;; a scale needs to be defined, e.g. C major (the white keys on a piano), let's say we start on t... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/lib/molecular.lisp | lisp | --------------------------------------------------------------------
The rules for the algorithm are as follows :
a scale needs to be defined, e.g. C major (the white keys on a piano), let's say we start on the E note, the list of notes will then contain : E, F, G, A, B, C
The algorithm will then function lik... | (in-package :shiny)
two different note lengths need to be defined , e.g. " 4 " and " 3 "
a pattern length needs to be defined , e.g. 4 bars
the first note of the scale ( E ) is played at the length of the first defined note length ( 4 )
each time the duration of the played note has ended , the ... |
f28b4cc627d4753f456e9026346b6a058cfc2ff3f651f05412f655096e6b5b84 | HealthSamurai/stresty | storage.cljc | (ns zframes.storage
(:require
[zframes.re-frame :as zrf]))
#?(:clj (def local-storage (atom {})))
(zrf/reg-cofx
:storage/get
(fn [coeffects k]
(assoc-in coeffects [:storage k]
#?(:clj (get @local-storage k)
:cljs (try
(some-> (js/window.localStor... | null | https://raw.githubusercontent.com/HealthSamurai/stresty/130cedde6bf53e07fe25a6b0b13b8bf70846f15a/src-ui/zframes/storage.cljc | clojure | (ns zframes.storage
(:require
[zframes.re-frame :as zrf]))
#?(:clj (def local-storage (atom {})))
(zrf/reg-cofx
:storage/get
(fn [coeffects k]
(assoc-in coeffects [:storage k]
#?(:clj (get @local-storage k)
:cljs (try
(some-> (js/window.localStor... | |
0287c6454ccbd691cde7252d8d8db07190f5ecc637ab3010d0c5602e7d3286e0 | janestreet/krb | principal.mli | open! Core
open Async
open Import
* A principal is a unique identity to which can assign tickets . Generally ,
principals are a name ( containing an arbitrary number of components
separated by ' / ' ) followed by " > " . The [ Krb ] library allows for two
kinds of principals :
User : ... | null | https://raw.githubusercontent.com/janestreet/krb/c9dbe0ec0ca646753873283dae509d07757ba546/src/principal.mli | ocaml | * [to_string] returns either <username> or <service>/<hostname>.
[of_string] is lenient to inclusion of the realm (for all principals) and full
qualification of the domain name (for service principals). We drop the provided
realm and drop a provided domain name if it matches the default domain.
* ac... | open! Core
open Async
open Import
* A principal is a unique identity to which can assign tickets . Generally ,
principals are a name ( containing an arbitrary number of components
separated by ' / ' ) followed by " > " . The [ Krb ] library allows for two
kinds of principals :
User : ... |
02ffd9a564a6d5ab6f472a0c48721b2271a2389ec4445017057d566c6cfd1ad3 | CompSciCabal/SMRTYPRTY | sequences.rkt | #lang racket
(define (filter predicate sequence)
(cond ((null? sequence) null)
((predicate (car sequence))
(cons (car sequence)
(filter predicate
(cdr sequence))))
(else (filter predicate
(cdr sequence)))))
(define (accumulate op... | null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v4/2.3/sequences.rkt | racket | Later we need to use the more general system map function.
Uncomment if you want to test below.
(define (map p sequence)
(accumulate (lambda (x y)
(cons (p x) y))
null sequence))
Later we need to use a different append.
(define (append seq1 seq2)
should be 79
(define (coun... | #lang racket
(define (filter predicate sequence)
(cond ((null? sequence) null)
((predicate (car sequence))
(cons (car sequence)
(filter predicate
(cdr sequence))))
(else (filter predicate
(cdr sequence)))))
(define (accumulate op... |
1f93052626a6ddd4bb47d3ef4d7d77d5145c2042f35e0f85bceae3bed22c2583 | jgm/pandoc-citeproc | Pandoc.hs | # LANGUAGE CPP , ScopedTypeVariables , NoImplicitPrelude #
-- | Compatibility module to work around differences in the
-- types of functions between pandoc < 2.0 and pandoc >= 2.0.
module Text.CSL.Compat.Pandoc (
writeMarkdown,
writePlain,
writeNative,
writeHtmlString,
readNative,
readHtml,
readMarkdown,
... | null | https://raw.githubusercontent.com/jgm/pandoc-citeproc/473378e588c40a6c3cb3b24330431b89cf4f81b4/compat/Text/CSL/Compat/Pandoc.hs | haskell | | Compatibility module to work around differences in the
types of functions between pandoc < 2.0 and pandoc >= 2.0. | # LANGUAGE CPP , ScopedTypeVariables , NoImplicitPrelude #
module Text.CSL.Compat.Pandoc (
writeMarkdown,
writePlain,
writeNative,
writeHtmlString,
readNative,
readHtml,
readMarkdown,
readLaTeX,
fetchItem,
pipeProcess ) where
import Prelude
import qualified Control.Exception as E
import System.Exit... |
5fcaf2ce4b4dd123f371311cd1b193eddcc68e481dbb282e33a4a41c24c62294 | c4-project/c4f | path_kind.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz/src/path_kind.mli | ocaml | * Kinds of path.
* Enumeration of kinds of path.
Most of the path producer code is uniform across all path kinds, and so
we use a single generator with a kind enumeration rather than separate
producers.
* Paths that insert a statement into a block.
* Paths that transform a statement.
* Paths that trans... | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
5518a01898e61e591dbce72b3e38f4e3e85c9705163246931e085bbf540089c1 | drapanjanas/pneumatic-tubes | subs.cljs | (ns group-chat-app.subs
(:require [re-frame.core :refer [reg-sub]]))
(reg-sub
:name
(fn [db]
(:name db)))
(reg-sub
:active-tab
(fn [db]
(:active-tab db)))
(reg-sub
:backend-connected
(fn [db]
(:backend-connected db)))
(reg-sub
:chat-room/name
(fn [db]
(get-in db [:chat-room... | null | https://raw.githubusercontent.com/drapanjanas/pneumatic-tubes/ea3834ea04e06cd2d4a03da333461a474c0475f5/examples/group-chat-app/src/group_chat_app/subs.cljs | clojure | (ns group-chat-app.subs
(:require [re-frame.core :refer [reg-sub]]))
(reg-sub
:name
(fn [db]
(:name db)))
(reg-sub
:active-tab
(fn [db]
(:active-tab db)))
(reg-sub
:backend-connected
(fn [db]
(:backend-connected db)))
(reg-sub
:chat-room/name
(fn [db]
(get-in db [:chat-room... | |
6740aca65cafeffe5fa8c049a0f02bd80aa6ed4e48c67f286f83b4ed7d8163a1 | auser/beehive | git_controller.erl | %%%-------------------------------------------------------------------
%%% File : git_controller.erl
Author :
%%% Description :
%%%
Created : Sun Nov 29 23:18:32 PST 2009
%%%-------------------------------------------------------------------
-module (git_controller).
-export ([get/2, post/2, put/2, dele... | null | https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/lib/erlang/apps/beehive/src/bh_rest/app_controllers/git_controller.erl | erlang | -------------------------------------------------------------------
File : git_controller.erl
Description :
------------------------------------------------------------------- | Author :
Created : Sun Nov 29 23:18:32 PST 2009
-module (git_controller).
-export ([get/2, post/2, put/2, delete/2]).
get(_, _Data) ->
{struct, [{"beehive", <<"app, node, bees, stats">>}]}.
post([Name, "post-receive"], Data) ->
io:format("Git post commit hook fired for ~p: ~p~n", [Name, Data]),
mis... |
9f0de320518b90c6b38c7f4381168c43eb30345dd56aa3cbaae31f4cd96f5973 | mirage/mirage-lambda | lambda_rpc.ml | module Int64 = struct
let ( lsl ) a n = Int64.shift_left (Int64.of_int a) n
let ( lsr ) a n = Int64.(to_int (shift_right a n))
let ( lor ) = Int64.logor
let ( land ) = Int64.logand
let of_int = Int64.of_int
let to_int = Int64.to_int
let ( + ) = Int64.add
let ( - ) = Int64.sub
let succ = Int64.succ
end... | null | https://raw.githubusercontent.com/mirage/mirage-lambda/a89b265b552f8b63ff725fc942f41a276fabb4f5/proto/lambda_rpc.ml | ocaml | module Int64 = struct
let ( lsl ) a n = Int64.shift_left (Int64.of_int a) n
let ( lsr ) a n = Int64.(to_int (shift_right a n))
let ( lor ) = Int64.logor
let ( land ) = Int64.logand
let of_int = Int64.of_int
let to_int = Int64.to_int
let ( + ) = Int64.add
let ( - ) = Int64.sub
let succ = Int64.succ
end... | |
bf98e5192829751133826959afdec1f2c8a9817daf37deffef019e426a6a1694 | cerner/clara-rules | test_node_sharing.cljc | #?(:clj
(ns clara.test-node-sharing
(:require [clara.tools.testing-utils :refer [def-rules-test] :as tu]
[clara.rules :refer [fire-rules
insert
insert-all
insert-unconditional!
... | null | https://raw.githubusercontent.com/cerner/clara-rules/8107a5ab7fdb475e323c0bcb39084a83454deb1c/src/test/common/clara/test_node_sharing.cljc | clojure | Replicate the same logical scenario as above in test-or-sharing-same-condition
in a single rule with a boolean :or condition.
FIXME: Log an issue for this bug and uncomment when it is resolved. Since an :or
to determine if it meets the constraints since it isn't dependent on the parent condition.
It is possible ... | #?(:clj
(ns clara.test-node-sharing
(:require [clara.tools.testing-utils :refer [def-rules-test] :as tu]
[clara.rules :refer [fire-rules
insert
insert-all
insert-unconditional!
... |
6112322d0e0c5a424c160b59b69d08dda37007c06db13dc97e0cff07eaf21730 | BillHallahan/G2 | Translation.hs | -- | Translation
-- Export module for G2.Translation.
module G2.Translation
( module G2.Translation.Haskell
, module G2.Translation.HaskellCheck
, module G2.Translation.Interface
, module G2.Translation.PrimInject
, module G2.Translation.TransTypes
) where
import G2.Translation.Haskell
import... | null | https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/src/G2/Translation.hs | haskell | | Translation
Export module for G2.Translation. | module G2.Translation
( module G2.Translation.Haskell
, module G2.Translation.HaskellCheck
, module G2.Translation.Interface
, module G2.Translation.PrimInject
, module G2.Translation.TransTypes
) where
import G2.Translation.Haskell
import G2.Translation.HaskellCheck
import G2.Translation.PrimI... |
06deefd3e65f7da91ee74d4fd832bfc7c1df2de03c94403cfe24d0a804d9327d | aws-beam/aws-erlang | aws_synthetics.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc Amazon CloudWatch Synthetics
%%
You can use Amazon CloudWatch Synthetics to continually monitor your
%% services.
%%
%% You can create and manage canaries, which are modular, lightweight scripts
%% that monitor your endpo... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_synthetics.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
services.
You can create and manage canaries, which are modular, lightweight scripts
that monitor your endpoints and APIs from the outside-in. You can set up
you check the availability and latency of your web services and
troubleshoot anomalies by investigating load ti... | See -beam/aws-codegen for more details .
@doc Amazon CloudWatch Synthetics
You can use Amazon CloudWatch Synthetics to continually monitor your
your canaries to run 24 hours a day , once per minute . The canaries help
UI , logs , and metrics . The canaries seamlessly integrate with CloudWatch
ServiceLens t... |
ed4d1eafc57a406c7d93e332be3a34bdd1146437983e7965405822c5053d368b | Shen-Language/shen-cl | overwrite.lsp | Copyright ( c ) 2010 - 2015 ,
; All rights reserved.
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
1 . Redistributions of source code must retain the above copyright
; notice, this list of conditions and the ... | null | https://raw.githubusercontent.com/Shen-Language/shen-cl/c26776641fe4b63aacfbc6013fad9c1c16974a5e/src/overwrite.lsp | lisp | All rights reserved.
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.
notice, this list of conditions and the following disclaimer in the
documentati... | Copyright ( c ) 2010 - 2015 ,
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . The name of may not be used to endorse or promote products
THIS SOFTWARE IS PROVIDED BY AS IS '' AND ANY
DISCLAIMED . IN NO EVE... |
d429a9c40247377f796dac80ebd393ea380b05577ca3d83a4a1a8a205d08b73a | eponai/sulolive | query.cljc | (ns eponai.common.database.query
(:require
[taoensso.timbre :refer [error debug trace info warn]]
[eponai.common.database :as db]
[datascript.db]
[eponai.common.parser.util :as parser]))
(defn project []
{:where '[[?e :project/uuid]]})
(defn project-with-uuid [project-uuid]
;; Harder to check if... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/common/database/query.cljc | clojure | Harder to check if it's actually a uuid.
All rates are relative USD so we need to pull what rates the user currency has,
so we can convert the rate appropriately for the user's selected currency
Convert the rate from USD to whatever currency the user has set
conversion-of-transaction-currency / conversion-of-user-... | (ns eponai.common.database.query
(:require
[taoensso.timbre :refer [error debug trace info warn]]
[eponai.common.database :as db]
[datascript.db]
[eponai.common.parser.util :as parser]))
(defn project []
{:where '[[?e :project/uuid]]})
(defn project-with-uuid [project-uuid]
{:pre [(not (string? ... |
1d6998f1e4754258ee8fad8048b6c25e91f7b770b67beb0e2f9efffb550e33ef | ocurrent/ocluster | utils.ml | open Lwt.Infix
open Capnp_rpc_lwt
module Api = Cluster_api
let speed_multiplier = 60.0
let sleep d =
Lwt_unix.sleep (Duration.to_f d /. speed_multiplier)
let submit cap ~name ~i ~pool ~urgent ~cache_hint =
let job_id = Printf.sprintf "%s-%d" name !i in
incr i;
let descr = Api.Submission.obuilder_build job_i... | null | https://raw.githubusercontent.com/ocurrent/ocluster/26939dced7239c4283cbae028cd237f8037bdf64/stress/utils.ml | ocaml | open Lwt.Infix
open Capnp_rpc_lwt
module Api = Cluster_api
let speed_multiplier = 60.0
let sleep d =
Lwt_unix.sleep (Duration.to_f d /. speed_multiplier)
let submit cap ~name ~i ~pool ~urgent ~cache_hint =
let job_id = Printf.sprintf "%s-%d" name !i in
incr i;
let descr = Api.Submission.obuilder_build job_i... | |
b5f91b17764c4f466d266d8f66ac59dd94a9ea763c509d549276fcaf50bd3862 | andrewthad/impure-containers | Maybe.hs | # LANGUAGE MagicHash #
-- | This uses some unsafe hackery.
module Data.Primitive.Array.Maybe
( MutableMaybeArray
, newMaybeArray
, readMaybeArray
, writeMaybeArray
) where
import Control.Monad.Primitive
import Data.Primitive.Array
import GHC.Exts (Any)
import ... | null | https://raw.githubusercontent.com/andrewthad/impure-containers/20f14e3c671543cbb5af142767188e5111bebc65/src/Data/Primitive/Array/Maybe.hs | haskell | | This uses some unsafe hackery.
# INLINE unsafeToMaybe # | # LANGUAGE MagicHash #
module Data.Primitive.Array.Maybe
( MutableMaybeArray
, newMaybeArray
, readMaybeArray
, writeMaybeArray
) where
import Control.Monad.Primitive
import Data.Primitive.Array
import GHC.Exts (Any)
import GHC.Prim (real... |
2f267e71222c9c7734a71ae9607b4c293959baee24e82f0a0be6cc93d043c4cb | serokell/tztime | FromLocalTime.hs | SPDX - FileCopyrightText : 2022 >
--
SPDX - License - Identifier : MPL-2.0
module Test.Data.Time.TZTime.FromLocalTime where
import Data.Time (LocalTime(..), TimeOfDay(..), TimeZone(..))
import Data.Time.Calendar.Compat (pattern YearMonthDay)
import Data.Time.TZInfo as TZI
import Data.Time.TZTime as TZT
import ... | null | https://raw.githubusercontent.com/serokell/tztime/a7bab0eb311b691c11844b8ddab39764687cd79e/test/Test/Data/Time/TZTime/FromLocalTime.hs | haskell |
See:
Therefore, the local time "2:15" is invalid.
`fromLocalTimeStrict` should return the local time shifted backwards / forwards
See: -howe-island?year=2022
See:
See:
Therefore, the local time "01:15" happens twice: once at the -5 offset
and again at the -6 offset.
`fromLocalTimeStrict` should retur... | SPDX - FileCopyrightText : 2022 >
SPDX - License - Identifier : MPL-2.0
module Test.Data.Time.TZTime.FromLocalTime where
import Data.Time (LocalTime(..), TimeOfDay(..), TimeZone(..))
import Data.Time.Calendar.Compat (pattern YearMonthDay)
import Data.Time.TZInfo as TZI
import Data.Time.TZTime as TZT
import Dat... |
0a41053478e02a69ddb2aebbc3a12283eac2e77e9f4bad24ae2ecf991ca538e7 | baryluk/ex11 | swTopLevel.erl | -module(swTopLevel).
Copyright ( C ) 2004 by ( )
%% All rights reserved.
%% The copyright holder hereby grants the rights of usage, distribution
%% and modification of this software to everyone and for any purpose, as
%% long as this license and the copyright notice above are preserved and
%% not modified. There ... | null | https://raw.githubusercontent.com/baryluk/ex11/be8abc64ab9fb50611f93d6631fc33ffdee08fdb/widgets/swTopLevel.erl | erlang | All rights reserved.
The copyright holder hereby grants the rights of usage, distribution
and modification of this software to everyone and for any purpose, as
long as this license and the copyright notice above are preserved and
not modified. There is no warranty for this software.
Display1 = rpc(Display, display... | -module(swTopLevel).
Copyright ( C ) 2004 by ( )
2004 - 01- ? ? Original version by
2004 - 02 - 15 Added support for multiple screens
< >
-include("sw.hrl").
-import(ex11_lib,
[reply/2, reply/2, rpc/2, get_display/2, get_root_of_screen/2,
xClearArea/1, xColor/2, xCreateGC/3, xDo/2, xFl... |
b4029724205d7ef19d37ef346be10ae4c72b3350944ca5def1a6a6b6460b0e42 | replikativ/datahike | index_test.cljc | (ns datahike.test.index-test
(:require
#?(:cljs [cljs.test :as t :refer-macros [is deftest testing]]
:clj [clojure.test :as t :refer [is deftest testing]])
[datahike.api :as d]
[datahike.constants :refer [e0 tx0 emax txmax]]
[datahike.datom :as dd]
[datahike.db :as db]
[datahike.ind... | null | https://raw.githubusercontent.com/replikativ/datahike/6c1468fd833ed8079b482fe934ae08f1ca2dda3c/test/datahike/test/index_test.cljc | clojure | name non-indexed, excluded from avet
TODO: implement rseek within hitchhiker tree | (ns datahike.test.index-test
(:require
#?(:cljs [cljs.test :as t :refer-macros [is deftest testing]]
:clj [clojure.test :as t :refer [is deftest testing]])
[datahike.api :as d]
[datahike.constants :refer [e0 tx0 emax txmax]]
[datahike.datom :as dd]
[datahike.db :as db]
[datahike.ind... |
d701735b08d1556b6a4dc2b2d035282dd1d9eb96eea3e4e91dfc9518137cb71a | bluejay77/MRS-NOVEL9 | timer.lisp | ;;; -*- Mode: Common-LISP -*-
;;;
0.2 18 - Mar-83 0156 000 1 ML E 18 - Mar-83
;;; timing function
;;;
perm filename TIMER.LSP[MRS , LSP ] blob sn#702139 filedate 1983 - 03 - 18
;;; generic text, type T, neo UTF8
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
... | null | https://raw.githubusercontent.com/bluejay77/MRS-NOVEL9/3a2d7a9c52b711125521444bb3eb6df7fb727017/timer.lisp | lisp | -*- Mode: Common-LISP -*-
timing function
generic text, type T, neo UTF8
; ;
; ;
------------------------------------------------------------
------------------------------------------------------------
| 0.2 18 - Mar-83 0156 000 1 ML E 18 - Mar-83
perm filename TIMER.LSP[MRS , LSP ] blob sn#702139 filedate 1983 - 03 - 18
Dr 2015 - 05 - 10
(defun runtime ()
(let ((ticks (get-internal-run-time)))
(/ (coerce ticks 'float)
(coerce internal-time-units-per-second 'float))))
(defmacro ... |
f174fc85e617cae528da26b9566519ee58e8c94a30e9ca3d5b13ab352d03e867 | tonyg/kali-scheme | interfaces.scm | Copyright ( c ) 1994 . See file COPYING .
(define-interface ps-primop-interface
(export get-prescheme-primop
(define-scheme-primop :syntax)
(define-polymorphic-scheme-primop :syntax)
(define-nonsimple-scheme-primop :syntax)
(define-scheme-cond-primop :syntax)
presche... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/prescheme/interfaces.scm | scheme | type/int7u
type/int8
type/int8u
for error messages
type-scheme-lattice-uvars
type-scheme-type
type>
type>=
lattice-type?
add-type-coercions
high level stuff | Copyright ( c ) 1994 . See file COPYING .
(define-interface ps-primop-interface
(export get-prescheme-primop
(define-scheme-primop :syntax)
(define-polymorphic-scheme-primop :syntax)
(define-nonsimple-scheme-primop :syntax)
(define-scheme-cond-primop :syntax)
presche... |
97a9f0af30b48c2c72ad7ea4f70968d6d30308a39bd79b67684285fdf1ac8f9b | haskell/cabal | Setup.hs |
module Main (main) where
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.PreProcess
import Distribution.Simple.Program
import Distribution.Types.BuildInfo
import Distribution.Verbosity
import System.Directory
ppHGen :: BuildInfo -> LocalBuildInfo -> ComponentLocalBuil... | null | https://raw.githubusercontent.com/haskell/cabal/664e17db2458b67378d0d0e3bd7de8096d5e55d0/cabal-testsuite/PackageTests/AutogenModulesToggling/Setup.hs | haskell |
module Main (main) where
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.PreProcess
import Distribution.Simple.Program
import Distribution.Types.BuildInfo
import Distribution.Verbosity
import System.Directory
ppHGen :: BuildInfo -> LocalBuildInfo -> ComponentLocalBuil... | |
301ecc887fc3ba266a49160e3f8e0e91e89fea1ea9b1d47cbe7bfec39d471cf5 | kwanghoon/polyrpc | Token.hs | module Token where
import Prelude hiding(EQ)
import TokenInterface
data Token =
END_OF_TOKEN
| OPEN_PAREN_TOKEN
| CLOSE_PAREN_TOKEN
| OPEN_BRACE_TOKEN
| CLOSE_BRACE_TOKEN
| OPEN_BRACKET_TOKEN
| CLOSE_BRACKET_TOKEN
| IDENTIFIER_TOKEN
| LOCFUN_TOKEN
| FUN_TOKEN
| FORALL_TOKEN
| EXISTS_TOKEN
... | null | https://raw.githubusercontent.com/kwanghoon/polyrpc/50bca2be26004ffd36ea059ccda7be077a0f6706/app/Token.hs | haskell | =
== | module Token where
import Prelude hiding(EQ)
import TokenInterface
data Token =
END_OF_TOKEN
| OPEN_PAREN_TOKEN
| CLOSE_PAREN_TOKEN
| OPEN_BRACE_TOKEN
| CLOSE_BRACE_TOKEN
| OPEN_BRACKET_TOKEN
| CLOSE_BRACKET_TOKEN
| IDENTIFIER_TOKEN
| LOCFUN_TOKEN
| FUN_TOKEN
| FORALL_TOKEN
| EXISTS_TOKEN
... |
b5aa567ecaa0001be664e415784abf4339892d759710e0cab954c096573f0769 | LexiFi/menhir | keyword.mli | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/sdk/keyword.mli | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
b0e021908fe225efb3613954b73a018c968ae0519eae6c8d266e4aff835937fd | brianhempel/maniposynth | primitives.ml | open Data
open
open Runtime_lib
open Runtime_base
open Runtime_stdlib
open Runtime_compiler
let exp_of_desc loc desc =
Parsetree.{ pexp_desc = desc; pexp_loc = loc; pexp_attributes = [] }
let seq_or loc = function
| [ (_, arg1); (_, arg2) ] ->
let open Parsetree in
let expr_true =
Pexp_construct ... | null | https://raw.githubusercontent.com/brianhempel/maniposynth/9092013ddcb0964348ba8902a6f48cd9763b576e/synth_stats_model/camlboot_interpreter_for_stats/primitives.ml | ocaml | Lazy
Array
TODO: records defined in different order...
Weak
Random
utils/profile.ml
utils/misc.ml
Ugly
let () = Runtime_compiler.apply_ref := Eval.apply prims | open Data
open
open Runtime_lib
open Runtime_base
open Runtime_stdlib
open Runtime_compiler
let exp_of_desc loc desc =
Parsetree.{ pexp_desc = desc; pexp_loc = loc; pexp_attributes = [] }
let seq_or loc = function
| [ (_, arg1); (_, arg2) ] ->
let open Parsetree in
let expr_true =
Pexp_construct ... |
c0e94e4c8daaf09b408bf0ed19593cacbfc6534d67498f1945d43f666a1b4604 | TerrorJack/ghc-alter | quotOverflow.hs |
import Control.Exception as E
import Data.Int
main :: IO ()
main = do putStrLn "Int8"
mapM_ p =<< (f :: IO [Either Int8 String])
putStrLn "Int16"
mapM_ p =<< (f :: IO [Either Int16 String])
putStrLn "Int32"
mapM_ p =<< (f :: IO [Either Int32 String])
putStr... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/quotOverflow.hs | haskell |
import Control.Exception as E
import Data.Int
main :: IO ()
main = do putStrLn "Int8"
mapM_ p =<< (f :: IO [Either Int8 String])
putStrLn "Int16"
mapM_ p =<< (f :: IO [Either Int16 String])
putStrLn "Int32"
mapM_ p =<< (f :: IO [Either Int32 String])
putStr... | |
1563ff8598b473e0eca9917dfc50cfb063a19824d6bf1f6e85352c0bac799339 | ppedrot/ocaml-melt | configure.ml |
(**************************************************************************)
Copyright ( c ) 2009 ,
(* All rights reserved. *)
(* *)
(* Redistribution and use in source and binary forms, wit... | null | https://raw.githubusercontent.com/ppedrot/ocaml-melt/0e58bb97e2afe2b7cadbaac906481f28cea1932e/configure.ml | ocaml | ************************************************************************
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted... |
Copyright ( c ) 2009 ,
" AS IS " AND ANY EXPRESS OR , INCLUDING , BUT NOT
LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
OWNER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
DATA , OR P... |
c74392a1e0b6b3ce9196a2bd5257bb2f3cc835492342f4437c17a714a85f6e5b | psilord/option-9 | increase-power.lisp | (in-package #:option-9)
;; TODO: increase-power needs keywords, or a &rest or something to provide
;; more context of the power increase.
;; By default, something cannot increase its own power.
(defmethod increase-power (thing)
nil)
(defmethod increase-power ((mine-muzzle mine-muzzle))
(setf (mine-count mine-muz... | null | https://raw.githubusercontent.com/psilord/option-9/44d96cbc5543ee2acbdcf45d300207ef175462bc/increase-power.lisp | lisp | TODO: increase-power needs keywords, or a &rest or something to provide
more context of the power increase.
By default, something cannot increase its own power.
We don't waste an increase of power if possible.
Recharge the shield back to full (meaning it hasn't absorbed any shots).
This is ok behavior for now, we... | (in-package #:option-9)
(defmethod increase-power (thing)
nil)
(defmethod increase-power ((mine-muzzle mine-muzzle))
(setf (mine-count mine-muzzle) 5))
(defmethod increase-power ((tf tesla-field))
(if (zerop (random 2))
(if (power-density-maxp tf)
(increase-range tf)
(increase-densit... |
00a48c9f02cb897045c01d7f99166239bd5f4809260b49c5e1184b3beffe71a5 | RyanMcG/manners | bellman_test.clj | (ns manners.bellman-test
(:require [manners.bellman :refer :all]
[clojure.test :refer :all]))
(def ^:private messages ["b" "c"])
(deftest test-prefix
(is (= ((prefix "a ") messages) ["a b" "a c"]))
(is (= ((prefix {}) messages) ["{}b" "{}c"])))
(deftest test-suffix
(is (= ((suffix " a") messages)... | null | https://raw.githubusercontent.com/RyanMcG/manners/f7872c8c68a087c5e3e55062800c5ce9658d7c78/test/manners/bellman_test.clj | clojure | (ns manners.bellman-test
(:require [manners.bellman :refer :all]
[clojure.test :refer :all]))
(def ^:private messages ["b" "c"])
(deftest test-prefix
(is (= ((prefix "a ") messages) ["a b" "a c"]))
(is (= ((prefix {}) messages) ["{}b" "{}c"])))
(deftest test-suffix
(is (= ((suffix " a") messages)... | |
e133dbc99b8ff9327cd304cddbd13ed90ae2f48d7d0b484d322e697d8925bead | EasyCrypt/easycrypt | ecField.ml | (* -------------------------------------------------------------------- *)
open EcRing
open EcBigInt.Notations
module BI = EcBigInt
(* -------------------------------------------------------------------- *)
type fexpr =
| FEc of c
| FEX of int
| FEadd of fexpr * fexpr
| FEsub of fexpr * fexpr
| FEmul of fexpr * f... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/f87695472e70c313ef2966e20979b1afcc2e543e/src/ecField.ml | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
-----------------------------------... | open EcRing
open EcBigInt.Notations
module BI = EcBigInt
type fexpr =
| FEc of c
| FEX of int
| FEadd of fexpr * fexpr
| FEsub of fexpr * fexpr
| FEmul of fexpr * fexpr
| FEopp of fexpr
| FEinv of fexpr
| FEdiv of fexpr * fexpr
| FEpow of fexpr * BI.zint
type rsplit = pexpr * pexpr * pexpr
let left ((t,_,_) :... |
9e131157772d28b2ff551af3520a47043e895fd2d334ab7f0049fb7b1581216c | janestreet/ppx_css | make_css.mli | (* bin *)
| null | https://raw.githubusercontent.com/janestreet/ppx_css/5848e1dc76b0ecf504e3b01d07d05741759cee72/inline_css/example/bin/make_css.mli | ocaml | bin | |
af9d51c4957b945456459452f7f46ef515c68235885ba74eb66fedd050bdd9b2 | angavrilov/cl-linux-debug | ptrace-grovel.lisp | ;;; -*- mode: Lisp; indent-tabs-mode: nil; -*-
(in-package :cl-linux-debug)
(include "signal.h")
(include "unistd.h")
(include "sys/ptrace.h")
(include "sys/syscall.h")
(include "sys/types.h")
(include "sys/user.h")
(include "sys/mman.h")
(include "sys/wait.h")
;; Signals
(cstruct siginfo_t "siginfo_t"
(si... | null | https://raw.githubusercontent.com/angavrilov/cl-linux-debug/879da2dcd14918bb8ffab003e934f4b01fba12ff/debugger/ptrace-grovel.lisp | lisp | -*- mode: Lisp; indent-tabs-mode: nil; -*-
Signals |
(in-package :cl-linux-debug)
(include "signal.h")
(include "unistd.h")
(include "sys/ptrace.h")
(include "sys/syscall.h")
(include "sys/types.h")
(include "sys/user.h")
(include "sys/mman.h")
(include "sys/wait.h")
(cstruct siginfo_t "siginfo_t"
(si_pid "si_pid" :type :int)
(si_status "si_status" ... |
0724f15fbe441bf4d9703cbe8534a727fb388abdb6f540c5caa7c9dbdd56b4c1 | discus-lang/ddc | CreateMainHS.hs |
module DDC.War.Create.CreateMainHS
(create)
where
import DDC.War.Create.Way
import DDC.War.Driver
import System.FilePath
import DDC.War.Job ()
import Data.Set (Set)
import qualified DDC.War.Job.CompileHS as CompileHS
import qualified DDC.War... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-tools/src/ddc-war/DDC/War/Create/CreateMainHS.hs | haskell | | Compile and run Main.hs files. |
module DDC.War.Create.CreateMainHS
(create)
where
import DDC.War.Create.Way
import DDC.War.Driver
import System.FilePath
import DDC.War.Job ()
import Data.Set (Set)
import qualified DDC.War.Job.CompileHS as CompileHS
import qualified DDC.War... |
12ae3e86822e47b085bb0e8f29bbda8011e8a8352b47981f6f7eef0f7b72cdac | coccinelle/coccinelle | ephemeron.mli | module type S =
sig
type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.14/ephemeron.mli | ocaml | module type S =
sig
type key
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
... | |
38c8962027c5ff8feec35ec253aef2a1268c7f64bd517f3ff7b7883358d7ac8b | Javran/advent-of-code | Day21.hs | module Javran.AdventOfCode.Y2019.Day21 (
) where
TODO : below are some initial ideas without further looking into detail .
Notice that the machine can only have a very limited space of state :
we have 6 registers , all of which are booleans , 2 ^ 6 = 64 states .
So I suspect this is sort of like d... | null | https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Y2019/Day21.hs | haskell | module Javran.AdventOfCode.Y2019.Day21 (
) where
TODO : below are some initial ideas without further looking into detail .
Notice that the machine can only have a very limited space of state :
we have 6 registers , all of which are booleans , 2 ^ 6 = 64 states .
So I suspect this is sort of like d... | |
b8965e4245cda2faf256f90cf95c4cded728f5c9916bdfe64e6dd3463c1c6601 | nuprl/gradual-typing-performance | make-cards.rkt | (module make-cards racket
(require racket/class
(prefix-in mred: racket/draw)
(prefix-in card-class: "card-class.rkt"))
(provide back deck-of-cards
(contract-out
[make-card (->i ([front-bm (back-bm)
(and/c (is-a?/c mred:bitmap%)
... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/gofish/base/cards/make-cards.rkt | racket | ( ( mred : get - display - backing - scale ) . > . 1 ) ) )
bg;((mred:get-display-depth) . <= . 8) | (module make-cards racket
(require racket/class
(prefix-in mred: racket/draw)
(prefix-in card-class: "card-class.rkt"))
(provide back deck-of-cards
(contract-out
[make-card (->i ([front-bm (back-bm)
(and/c (is-a?/c mred:bitmap%)
... |
5a9f108daa1ddef95663371f4c194acad6f63e2451cfc5a9dada6986006aa3af | fourier/lw-config | darkula-theme.lisp | (in-package "CL-USER")
(defun make-rgb (red green blue &optional alpha)
(color:make-rgb (/ red 255s0)
(/ green 255s0)
(/ blue 255s0)
(and alpha (/ alpha 255s0))))
(defvar *darkula-color-table*
'(:darkula-background (43 43 43)
:darkula-foreground (169 183... | null | https://raw.githubusercontent.com/fourier/lw-config/a77c92af0e9641325235055257490200a3e89714/darkula-theme.lisp | lisp | if not specified uses the :background and :foreground | (in-package "CL-USER")
(defun make-rgb (red green blue &optional alpha)
(color:make-rgb (/ red 255s0)
(/ green 255s0)
(/ blue 255s0)
(and alpha (/ alpha 255s0))))
(defvar *darkula-color-table*
'(:darkula-background (43 43 43)
:darkula-foreground (169 183... |
e9b145c7373e3f355c6133804c45f4af34d191a4a2837d33d6184f9a30ff807a | christiaanb/clash | Alu.hs | {-# LANGUAGE Arrows #-}
module Alu where
import CLasH.HardwareTypes
dontcare = Low
program = [
-- (addr, we , op )
z = r1 and t ( 0 ) ; t = r1 ( 1 )
z = r0 or t ( 1 ) ; t = r0 ( 0 )
r0 = z ( 1 )
z = r1 and t ( 0 ) ; t = r1 ( 1 )
(High, High, dontcare) -- r1 = z (0)
]
--... | null | https://raw.githubusercontent.com/christiaanb/clash/18247975e8bbd3f903abc667285e11228a640457/examples/Alu.hs | haskell | # LANGUAGE Arrows #
(addr, we , op )
r1 = z (0)
--initial_state = (Regs Low High, Low, Low)
^ State
^ (Address, Write Enable, Data)
Read
Write
Read
Write
Don't output anything useful
ALU | module Alu where
import CLasH.HardwareTypes
dontcare = Low
program = [
z = r1 and t ( 0 ) ; t = r1 ( 1 )
z = r0 or t ( 1 ) ; t = r0 ( 0 )
r0 = z ( 1 )
z = r1 and t ( 0 ) ; t = r1 ( 1 )
]
initial_state = State ( State ( 0 , 1 ) , 0 , 0 )
type Word = Unsigned D4
Register bank
type RegAddr = Bi... |
6c9ea35d8dde17a1c8b21082c1ab0ae6170c0cfcbe1a9fcdab576f7bc4495d07 | sKabYY/palestra | p41.scm | (load "lib.scm")
(define (unique-3-tuple n)
(flatmap
(lambda (k)
(map (lambda (p)
(list (car p) (cadr p) k))
(unique-pairs (- k 1))))
(enumerate-interval 1 n)))
(define (sum-s n s)
(define (sum-equal-s? tuple)
(= s (+ (car tuple) (cadr tuple) (caddr tuple))))
(filter su... | null | https://raw.githubusercontent.com/sKabYY/palestra/0906cc3a1fb786093a388d5ae7d59120f5aae16c/old1/sicp/2/p41.scm | scheme | (load "lib.scm")
(define (unique-3-tuple n)
(flatmap
(lambda (k)
(map (lambda (p)
(list (car p) (cadr p) k))
(unique-pairs (- k 1))))
(enumerate-interval 1 n)))
(define (sum-s n s)
(define (sum-equal-s? tuple)
(= s (+ (car tuple) (cadr tuple) (caddr tuple))))
(filter su... | |
1037b8939958828ef5377d8bffce68c6a49bbdaf1fe4f4230adc23f4fe81d08e | larcenists/larceny | unicode0.body.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Help procedures (not part of R6RS)
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Given an exact integer key and a vector of exact integers
; in strictly increasing order, returns the largest i such
; that element i of the vecto... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/tools/R6RS/r6rs/unicode-reference/unicode0.body.scm | scheme |
Help procedures (not part of R6RS)
Given an exact integer key and a vector of exact integers
in strictly increasing order, returns the largest i such
that element i of the vector is less than or equal to key,
or -1 if key is less than every element of the vector.
Loop invariants:
0 <= i < j <= (vector-length... |
(define (binary-search-of-vector key vec)
(define (loop i j)
(let ((mid (div (+ i j) 2)))
(cond ((= i mid)
mid)
((<= (vector-ref vec mid) key)
(loop mid j))
(else
(loop i mid)))))
(let ((hi (vector-length vec)))
(if (or (= hi 0) (< ke... |
f341845b63404ade5b4c3093f8a579c8791ef1ade93d4f304ef87d385983d3fa | puppetlabs/puppetserver | master_core.clj | (ns puppetlabs.services.master.master-core
(:require [bidi.bidi :as bidi]
[bidi.schema :as bidi-schema]
[cheshire.core :as json]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[me.raynes.fs :as fs]
[... | null | https://raw.githubusercontent.com/puppetlabs/puppetserver/2d6ca01b4b72716ca543b606f752261b969e401b/src/clj/puppetlabs/services/master/master_core.clj | clojure |
Constants
Private
SERVER-1153 - For a non-nil value, the characters '--gzip' will be
stripped from the end of the value which is returned. The '--gzip'
header for cases in which the corresponding response payload has been
used at the time this code was written (9.2.10), however, did not have this
logic to str... | (ns puppetlabs.services.master.master-core
(:require [bidi.bidi :as bidi]
[bidi.schema :as bidi-schema]
[cheshire.core :as json]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[me.raynes.fs :as fs]
[... |
38ce2af9891d92fce6d7715fb76c166d4addcbebc1fa649f2c898e4dafbd0b69 | patricoferris/ocaml-multicore-monorepo | test_entropy_collection.ml | open Lwt.Infix
module Printing_rng = struct
type g = unit
let block = 16
let create ?time:_ () = ()
let generate ~g:_ _n = assert false
let reseed ~g:_ data =
Format.printf "reseeding: %a@.%!" Cstruct.hexdump_pp data
let accumulate ~g:_ source =
let print data =
Format.printf "accumulate... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/mirage-crypto/tests/test_entropy_collection.ml | ocaml | open Lwt.Infix
module Printing_rng = struct
type g = unit
let block = 16
let create ?time:_ () = ()
let generate ~g:_ _n = assert false
let reseed ~g:_ data =
Format.printf "reseeding: %a@.%!" Cstruct.hexdump_pp data
let accumulate ~g:_ source =
let print data =
Format.printf "accumulate... | |
0b25988a6ee91b29f76703709b27f2802dee6fde6bcf8e6e30a9ad2c4a76421b | coq/coq | pretype_errors.ml | (************************************************************************)
(* * 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/cc78d97f52f85dc6321acc27daa09fb1b62c80fa/pretyping/pretype_errors.ml | 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... |
60dbbd762e4c21ee200b5984ae64d25868d8751bdd2f08de7a7af9c9918ab95a | cyga/real-world-haskell | CountEntries.hs | file : ch18 / CountEntries.hs
module CountEntries (listDirectory, countEntriesTrad) where
import System.Directory (doesDirectoryExist, getDirectoryContents)
import System.FilePath ((</>))
import Control.Monad (forM, liftM)
listDirectory :: FilePath -> IO [String]
listDirectory = liftM (filter notDots) . getDirector... | null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch18/CountEntries.hs | haskell | file : ch18 / CountEntries.hs
module CountEntries (listDirectory, countEntriesTrad) where
import System.Directory (doesDirectoryExist, getDirectoryContents)
import System.FilePath ((</>))
import Control.Monad (forM, liftM)
listDirectory :: FilePath -> IO [String]
listDirectory = liftM (filter notDots) . getDirector... | |
17f41e61497bc0bec311f1d088b9ee1e1aed3828807fe244eb127152cf9daf8e | dbuenzli/astring | test_sub.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The astring programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (... | null | https://raw.githubusercontent.com/dbuenzli/astring/ec7a266a3a680e5d246689855c639da53d713428/test/test_sub.ml | ocaml | Base functions
Stretching substrings
Appending substrings.
Predicates
Extracting substrings
Traversing
Suite | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The astring programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (... |
60fdf9086b01fc5d47432ea59839edb76d9b9dbee1602bc75d6121952f6f9f49 | MinaProtocol/mina | tick.ml | (* snark_params_nonconsensus.ml *)
[%%import "/src/config.mlh"]
[%%ifdef consensus_mechanism]
[%%error
"Snark_params_nonconsensus should not be compiled if there's a consensus \
mechanism"]
[%%endif]
open Snarkette
[%%if curve_size = 255]
(* only size we should be building nonconsensus code for *)
[%%else]
[%... | null | https://raw.githubusercontent.com/MinaProtocol/mina/465aed0f9c71268e3ebd8428f07005d253a0bde1/src/nonconsensus/snark_params/tick.ml | ocaml | snark_params_nonconsensus.ml
only size we should be building nonconsensus code for
though we have bin_io, not versioned here; this type exists for Private_key.t,
where it is versioned-asserted and its serialization tested
|
[%%import "/src/config.mlh"]
[%%ifdef consensus_mechanism]
[%%error
"Snark_params_nonconsensus should not be compiled if there's a consensus \
mechanism"]
[%%endif]
open Snarkette
[%%if curve_size = 255]
[%%else]
[%%show curve_size]
[%%error "invalid value for \"curve_size\""]
[%%endif]
[%%inject "ledger_d... |
a17d73000e8ce0699b0009ef1d648af538060e7ab6ab1e3dcf52c9a9c3c52f74 | reanimate/reanimate | showcase.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Main (main) where
import Codec.Picture
import Control.Lens ((^.),(&))
import Control.Monad
import ... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/videos/showcase/showcase.hs | haskell | stack runghc --package reanimate
# LANGUAGE ApplicativeDo #
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
rotateSphere
rotateWireSphere
introSVG
play $ drawSphere
# setDuration 15
play $ rotateWireSphere
# setDuration 2
sphereS <- newSprite $ do
-- xValue <- freezeVar sphereX
retu... | #!/usr/bin/env stack
module Main (main) where
import Codec.Picture
import Control.Lens ((^.),(&))
import Control.Monad
import Data.Fixed
import Data.Maybe
import Data.Monoid
import Data.Text (Text)
import qualified Data.Te... |
042dc2079b5c4c97ec7a34f3506f17c90d074403c50552b3e2af17b54397d6b1 | DYCI2/om-dyci2 | om-preferences.lisp | ;;;===================================================
;;;
OM - SuperVP
SuperVP sound analysis and processing for OpenMusic
;;;
Requires perliminary installation of SuperVP ( also included in AudioSculpt )
Set SuperVP path in OM preferences ( externals ) once the library is loaded .
;;;
;;;
;;; SUP... | null | https://raw.githubusercontent.com/DYCI2/om-dyci2/a51e6c51ec60ffabb799c9ee08d2173c30509ac2/om-dyci2/dependencies/OM-SuperVP%202.13/sources/om-preferences.lisp | lisp | ===================================================
SUPERVP PREFERENCES
===================================================
PREFERENCES FOR OM6
=====================================================
== PARAM FILES ===
=====================
params folder
boutons
| OM - SuperVP
SuperVP sound analysis and processing for OpenMusic
Requires perliminary installation of SuperVP ( also included in AudioSculpt )
Set SuperVP path in OM preferences ( externals ) once the library is loaded .
Integrated in the ' Externals ' tab in OM preferences
Authors : ( IRCAM - 2... |
fc32e7e5b708a48d2b7b8a50f5960db22fa79c1034640e194e7f91ca6c6cc290 | xively/clj-mqtt | unsubscribe_test.clj | (ns mqtt.packets.unsubscribe-test
(:use clojure.test
mqtt.test-helpers
mqtt.decoder
mqtt.encoder
mqtt.packets.common
mqtt.packets.unsubscribe)
(:import [io.netty.buffer Unpooled]))
(deftest unsubscribe-validate-message-test
(testing "returns when valid"
(let [packet {:... | null | https://raw.githubusercontent.com/xively/clj-mqtt/74964112505da717ea88279b62f239146450528c/test/mqtt/packets/unsubscribe_test.clj | clojure | fixed header
remaining length
message id
topic
fixed header
remaining length
message id
topics
fixed header
remaining length
message id
topic
fixed header
remaining length
message id
topic | (ns mqtt.packets.unsubscribe-test
(:use clojure.test
mqtt.test-helpers
mqtt.decoder
mqtt.encoder
mqtt.packets.common
mqtt.packets.unsubscribe)
(:import [io.netty.buffer Unpooled]))
(deftest unsubscribe-validate-message-test
(testing "returns when valid"
(let [packet {:... |
aef2198d43c73d0c0661b19b172bfc6ea6e64f9acb6a58071b2acce7646e7ef0 | tezos/tezos-mirror | test_sc_rollup_tick_repr.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/pbt/test_sc_rollup_tick_repr.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 AN... |
158da65bbdcb9fd458352f4736e7f91f109dd18674ce3b22fe41c725096a7b03 | deadtrickster/prometheus.cl | int-counter.lisp | (in-package #:prometheus)
(define-constant +counter-default+ 0)
(defclass int-counter (counter)
()
(:default-initargs :type "counter"))
(defmethod mf-make-metric ((metric int-counter) labels)
(make-instance 'int-counter-metric :labels labels))
(defstruct int-counter-storage
(value 0 :type (unsigned-byte 64)... | null | https://raw.githubusercontent.com/deadtrickster/prometheus.cl/60572b793135e8ab5a857d47cc1a5fe0af3a2d53/src/prometheus/metrics/int-counter.lisp | lisp | (in-package #:prometheus)
(define-constant +counter-default+ 0)
(defclass int-counter (counter)
()
(:default-initargs :type "counter"))
(defmethod mf-make-metric ((metric int-counter) labels)
(make-instance 'int-counter-metric :labels labels))
(defstruct int-counter-storage
(value 0 :type (unsigned-byte 64)... | |
690cca9208de59a7551a4ee8613310b022b5ae8e5b51be54c7a76ba6b6288750 | imitator-model-checker/imitator | Cache.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Laboratoire Spécification et Vérification ( ENS Cachan & CNRS , France )
* Université Paris 13 , LIPN , CNRS , France
*
* Module description ... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/Cache.mli | ocaml | * construct a cache given a hash function and the maximum size
* remove all entries
* change the size of the cache, flushing all entries
* find an item corresponding to a given key
* store an item associated with a key
(** print statistics | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Laboratoire Spécification et Vérification ( ENS Cachan & CNRS , France )
* Université Paris 13 , LIPN , CNRS , France
*
* Module description ... |
da0c037d948d73861e874765cf3abd4f8c175470517f58d283b3c57394c4980a | typeclasses/haskell-phrasebook | logging.hs | import Control.Exception.Safe (displayException, tryAny)
import Data.Foldable (fold)
import System.Directory (getPermissions, writable)
import System.Environment (getEnv)
import System.IO (hPutStr, stdout, stderr)
data Level = Info | Error
data Event = Event Level String
data Log = Log { record :: Event -> IO () }
... | null | https://raw.githubusercontent.com/typeclasses/haskell-phrasebook/61ee6a7e63e4d6fc0e86c0cb9dc2c0d9f06b9537/logging.hs | haskell | ... | import Control.Exception.Safe (displayException, tryAny)
import Data.Foldable (fold)
import System.Directory (getPermissions, writable)
import System.Environment (getEnv)
import System.IO (hPutStr, stdout, stderr)
data Level = Info | Error
data Event = Event Level String
data Log = Log { record :: Event -> IO () }
... |
3ace4a18878d82b87a18363d3aec7e10b6cef1b47e11b627ac9fb5ff0f496ad6 | benzap/eden | expression.cljc | (ns eden.std.expression
(:require
[eden.std.token :refer [TokenType token-type]]))
(defprotocol Expression
(evaluate-expression [this]))
(def EXPRESSION## ::expression)
(defn isa-expression? [obj]
(when (satisfies? TokenType obj)
(= EXPRESSION## (token-type obj))))
| null | https://raw.githubusercontent.com/benzap/eden/dbfa63dc18dbc5ef18a9b2b16dbb7af0e633f6d0/src/eden/std/expression.cljc | clojure | (ns eden.std.expression
(:require
[eden.std.token :refer [TokenType token-type]]))
(defprotocol Expression
(evaluate-expression [this]))
(def EXPRESSION## ::expression)
(defn isa-expression? [obj]
(when (satisfies? TokenType obj)
(= EXPRESSION## (token-type obj))))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.