_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 |
|---|---|---|---|---|---|---|---|---|
1770c041113145573f9188bdafd63becfbd9cecdfe1fe1510e69c0cc853f706b | nedap/speced.def | defn.cljc | (ns unit.nedap.speced.def.defn
"NOTE: all these demonstrate the following aspect documented in `:nedap.speced.def.specs/spec-metadata`:
> A defn with return value metadata for both its name and argument vector will emit spec checking for both.
In practice, that is completely optional and you are free to use 2, ... | null | https://raw.githubusercontent.com/nedap/speced.def/55053e53e749f77753294f3ee8d4639470840f8c/test/unit/nedap/speced/def/defn.cljc | clojure | in CLJS, arglists themselves don't ever get a :tag - only its members.
in CLJS, arglists themselves don't ever get a :tag - only its members. | (ns unit.nedap.speced.def.defn
"NOTE: all these demonstrate the following aspect documented in `:nedap.speced.def.specs/spec-metadata`:
> A defn with return value metadata for both its name and argument vector will emit spec checking for both.
In practice, that is completely optional and you are free to use 2, ... |
6d8a65e78bc1f27c9055555e15f0e8ec14d70a12913e0724b4a3c8d4e358241b | scheme/rx | re-subst.scm | Substitution ops with regexps
Copyright ( c ) 1998 by .
;;; These function have to be in a separate package because they use
;;; the scsh I/O function WRITE-STRING. The rest of the regexp system
;;; has no dependencies on scsh system code, and is defined independently
;;; of scsh -- which scsh, in turn, relies u... | null | https://raw.githubusercontent.com/scheme/rx/dd9037f6f9ea01019390614f6b126b7dd293798d/re-subst.scm | scheme | These function have to be in a separate package because they use
the scsh I/O function WRITE-STRING. The rest of the regexp system
has no dependencies on scsh system code, and is defined independently
of scsh -- which scsh, in turn, relies upon: pieces of scsh-level-0
use the regexp basics. So we have to split thi... | Substitution ops with regexps
Copyright ( c ) 1998 by .
(define (bogus-substring-spec? s start end)
(or (< start 0)
(< (string-length s) end)
(< end start)))
(define (write-string s . args)
(let-optionals args ((port (current-output-port))
(start 0)
(end (string-length s... |
4d2870fa567f4fb51f316832ce213134c601370f8dc15ba17680ba6f36cc9fe4 | appleshan/cl-http | cl-http-70-157.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Patch file for CL - HTTP version 70.157
;;; Reason: DEFINE-HEADER :CONTENT-LENGTH: handle multiple (erroneous) headers.
Written by JCMa , 11/25/01 01:14:13
while running on FUJI - VLM from FUJI:/usr / lib / symbolics /... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-157.lisp | lisp | Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*-
Reason: DEFINE-HEADER :CONTENT-LENGTH: handle multiple (erroneous) headers.
DOMAIN - FIXES.LISP.33 ) ,
MAILBOX - FORMAT.LISP.24 ) ,
MAILER - FIXES.LISP.15 ) ,
Patch TCP hang on close when client drops connection. (from HTTP:LISPM;SERVER;TCP-... | Patch file for CL - HTTP version 70.157
Written by JCMa , 11/25/01 01:14:13
while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5.vlod
with Open Genera 2.0 , Genera 8.5 , Lock Simple 437.0 , Version Control 405.0 ,
Compare Merge 404.0 , VC Documentation 401.0 ,
Logica... |
f99bb5d9b88bb8367ad2affeaca7d033a1d8a448b29d6ade0aca5c4e7d357d33 | racket/eopl | data-structures.rkt | #lang eopl
(require "cps-out-lang.rkt") ; for tfexp?
(provide (all-defined-out)) ; too many things to list
;;;;;;;;;;;;;;;; expressed values ;;;;;;;;;;;;;;;;
;;; an expressed value is either a number, a boolean or a procval.
(define-datatype expval expval?
(num-val
(value number?))
(bool-v... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter6/cps-lang/data-structures.rkt | racket | for tfexp?
too many things to list
expressed values ;;;;;;;;;;;;;;;;
an expressed value is either a number, a boolean or a procval.
extractors:
continuations ;;;;;;;;;;;;;;;;
the interpreter is tail-recursive, so it really doesn't do
continuation value.
procedures ;;;;;;;;;;;;;;;;
environment structures ;;;;;... | #lang eopl
(define-datatype expval expval?
(num-val
(value number?))
(bool-val
(boolean boolean?))
(proc-val
(proc proc?)))
(define expval->num
(lambda (v)
(cases expval v
(num-val (num) num)
(else (expval-extractor-error 'num v)))))
(define expval->bool
(lambda (v)
(cases... |
8b621301e1dcb049097d13a7e98c740a3b555a2a552a2ec1637daaabce834573 | mattmundell/nightshade | calendar.lisp | ;;; Calendar support.
(in-package "EXTENSIONS")
(export '(month-name short-month-name month-number short-month-number ;; FIX gregorian-*?
;;
last-day-of-gregorian-month last-day-of-julian-month
last-day-of-islamic-month last-day-of-hebrew-month
last-day-of-french-month
;;
absolute-from-gregorian gre... | null | https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/code/calendar.lisp | lisp | Calendar support.
FIX gregorian-*?
Names and numbers.
The timezone-table is incomplete but workable.
Conversions, special dates.
Approximation from below.
Search forward from the approximation.
Approximation from below.
Search forward from the approximation.
Days so far...
Non-leap days in prior years.
A... |
(in-package "EXTENSIONS")
last-day-of-gregorian-month last-day-of-julian-month
last-day-of-islamic-month last-day-of-hebrew-month
last-day-of-french-month
absolute-from-gregorian gregorian-from-absolute
absolute-from-iso iso-from-absolute
absolute-from-julian julian-from-absolute
absolute-from-is... |
11dbf69a5773d308a6f78b63eb930dff67d38233409c60b6e4999dcfb1f60698 | Netflix/PigPen | test.clj | ;;
;;
Copyright 2013 - 2015 Netflix , Inc.
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to ... | null | https://raw.githubusercontent.com/Netflix/PigPen/18d461d9b2ee6c1bb7eee7324889d32757fc7513/pigpen-core/src/main/clojure/pigpen/extensions/test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the speci... | Copyright 2013 - 2015 Netflix , Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns pigpen.extensions.test
(:require [clojure.test :refer [is]]
[clojure.data :refer [diff]]))
(set! *warn-on-reflection* true)
(defn test-diff [actual expected]
(let [d (diff expected a... |
d19b2f96894acd9f9e589da568dd38a7a210254b0bfe6ac8032c8982be616611 | atlas-engineer/nyxt | spinneret-tags.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :spinneret)
(deftag :mayberaw (body attrs &key &allow-other-keys)
"Spinneret's :raw, but with HTML escaping if BODY _does not_ look like HTML."
attrs
`(:raw (if (nyxt:html-string-p (progn ,@body))
... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/f7defd55d70239828f3b46753699574a528f8de5/source/spinneret-tags.lisp | lisp | `list*' call.
TODO: Other implementations?
More forms: def*, make-instance, slots, special forms?
symbols and would break if \\b was used.
TODO: Store the location it's defined in as a :title or link for discoverability?
-to-create-code-copy-button/
Push as many :section tags into the path, as necessary to imply... | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :spinneret)
(deftag :mayberaw (body attrs &key &allow-other-keys)
"Spinneret's :raw, but with HTML escaping if BODY _does not_ look like HTML."
attrs
`(:raw (if (nyxt:html-string-p (progn ,@body))
... |
b313771478ff245893136676ea39a450a2ce23cfe3934db8090a980159625748 | ucsd-progsys/liquidhaskell | Polypred.hs | {-@ LIQUID "--expect-any-error" @-}
module Polypred () where
import Language.Haskell.Liquid.Prelude
prop :: Int -> Bool
prop x = liquidAssertB (x == 0)
foo :: a -> Int
foo longVarName = choose 20
-- propUNSAFE = prop (foo "ker")
propSAFE = prop (foo id)
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Polypred.hs | haskell | @ LIQUID "--expect-any-error" @
propUNSAFE = prop (foo "ker") | module Polypred () where
import Language.Haskell.Liquid.Prelude
prop :: Int -> Bool
prop x = liquidAssertB (x == 0)
foo :: a -> Int
foo longVarName = choose 20
propSAFE = prop (foo id)
|
110cdb5edbac99de91c45399831d369c1c560205f4b476cb29b8b2b67f7215e9 | tweag/ormolu | line-multi-line-out.hs | x :: [Int]
x =
[ 1,
2,
somethingSomething 3
]
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/other/line-multi-line-out.hs | haskell | x :: [Int]
x =
[ 1,
2,
somethingSomething 3
]
| |
8ff4e04e9b7946d1be48cb332ee93706968fd312fd4881bef43a0ee6c5942ffc | mitsuchi/mud | Lib.hs | -- Main に直接関係するライブラリー
module Lib where
import Control.Monad.Except
import qualified Control.Monad.Trans as Trans
import Data.IORef
import Data.Map as Map hiding (foldr, take)
import Data.Void
import qualified System.Console.Haskeline as Hline
import ... | null | https://raw.githubusercontent.com/mitsuchi/mud/48c08a2847b6f3efcef598806682da7efca2449d/src/Lib.hs | haskell | Main に直接関係するライブラリー
プログラムの文字列をパースしてエラーか式を返す
until_ (== "quit") (readPrompt "> ") $ typeCheckAndEvalAndPrint env
与えられた環境とプログラム文字列をもとに、型評価して評価して結果を表示する
条件が成り立つまでモナドアクションを繰り返す
文字列を出力し、標準出力をフラッシュする
ヘルプを表示する
パースを実行する
プログラムをファイルから読み、型評価し、評価する
プログラム文字列を型評価し、評価し、結果を表示する
以下は開発用のショートカット
プログラムの文字列をパースしてエラーか式を返す
プログラムの... | module Lib where
import Control.Monad.Except
import qualified Control.Monad.Trans as Trans
import Data.IORef
import Data.Map as Map hiding (foldr, take)
import Data.Void
import qualified System.Console.Haskeline as Hline
import System.IO
import ... |
bc811acb078801bf93662842b77c8f412122f01252a6cecd45fb9ca63db38752 | paulbutcher/lein-lambda | lambda.clj | (ns {{name}}.lambda
(:require [uswitch.lambada.core :refer [deflambdafn]]
[clojure.java.io :as io]
[ring.middleware.apigw :refer [wrap-apigw-lambda-proxy]]
[cheshire.core :as cheshire]
[{{name}}.handler :refer [app]]))
(def lambda-handler (wrap-apigw-lambda-proxy app {... | null | https://raw.githubusercontent.com/paulbutcher/lein-lambda/20398b6dadeb9679d7eb258d4c47b60cd8485ff7/template/resources/leiningen/new/lambda_api/lambda.clj | clojure | (ns {{name}}.lambda
(:require [uswitch.lambada.core :refer [deflambdafn]]
[clojure.java.io :as io]
[ring.middleware.apigw :refer [wrap-apigw-lambda-proxy]]
[cheshire.core :as cheshire]
[{{name}}.handler :refer [app]]))
(def lambda-handler (wrap-apigw-lambda-proxy app {... | |
b2a8af889cc194c39483140c28e78078fe0549572f1aaeaaa6560073b05f0f82 | exoscale/clojure-kubernetes-client | v1_se_linux_options.clj | (ns clojure-kubernetes-client.specs.v1-se-linux-options
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-se-linux-options-data v1-se-linux-options)
(def v1-se-linux-options-data
{
(ds/opt :level) string?
(ds/opt :role) strin... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_se_linux_options.clj | clojure | (ns clojure-kubernetes-client.specs.v1-se-linux-options
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-se-linux-options-data v1-se-linux-options)
(def v1-se-linux-options-data
{
(ds/opt :level) string?
(ds/opt :role) strin... | |
78a19dd8eb47d5ba2858a006832c9d0a514b1996287dd04942c6dedde2c187d2 | evolutics/haskell-formatter | Input.hs | root = start
where start
-- comment
= "commented"
| null | https://raw.githubusercontent.com/evolutics/haskell-formatter/3919428e312db62b305de4dd1c84887e6cfa9478/testsuite/resources/source/comments/indentation/inherits_indentation_of_merged_line/indented_start/Input.hs | haskell | comment | root = start
where start
= "commented"
|
11ccf5572152fb5708075bf8320554e62f3acd4955a8c8d665f5325eff51e740 | jeffshrager/biobike | receive-client-messages.lisp | ;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: nvpl; -*-
(in-package :nvpl)
;;; +=========================================================================+
| Copyright ( c ) 2006 JP Massar , |
;;; | |
;;; | ... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/vplcode/receive-client-messages.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: nvpl; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and a... |
(in-package :nvpl)
| Copyright ( c ) 2006 JP Massar , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do s... |
b698026158e0d11d0ee52324f0009789f4bc44e8402bc49afe7dec816e4fbce3 | zcaudate/hara | util_test.clj | (ns hara.core.base.util-test
(:use hara.test)
(:require [hara.core.base.util :refer :all]))
^{:refer hara.core.base.util/T :added "3.0"}
(fact "Returns `true` for any combination of input `args`"
(T) => true
(T :hello) => true
(T 1 2 3) => true)
^{:refer hara.core.base.util/F :added "3.0"}
(fact "Returns `... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/core/base/util_test.clj | clojure | (ns hara.core.base.util-test
(:use hara.test)
(:require [hara.core.base.util :refer :all]))
^{:refer hara.core.base.util/T :added "3.0"}
(fact "Returns `true` for any combination of input `args`"
(T) => true
(T :hello) => true
(T 1 2 3) => true)
^{:refer hara.core.base.util/F :added "3.0"}
(fact "Returns `... | |
4aa11c4bd43f3b7655ae23a20b94da8cf70936a9452064ffa13c0cc51256a39c | TyOverby/mono | persistent_connection_kernel_intf.ml | (** An actively maintained connection to some service that eagerly and repeatedly attempts
to reconnect whenever the underlying connection is lost, until a new one can be
established. *)
open! Core
open! Async_kernel
(** The address of a service to which one can connect. E.g. [Host_and_port.t] is a
reaso... | null | https://raw.githubusercontent.com/TyOverby/mono/5ce4569fc6edf6564d29d37b66d455549df1e497/vendor/janestreet-async_kernel/persistent_connection_kernel/src/persistent_connection_kernel_intf.ml | ocaml | * An actively maintained connection to some service that eagerly and repeatedly attempts
to reconnect whenever the underlying connection is lost, until a new one can be
established.
* The address of a service to which one can connect. E.g. [Host_and_port.t] is a
reasonable choice when making a TCP connecti... |
open! Core
open! Async_kernel
module type Address = sig
type t [@@deriving equal, sexp_of]
end
module type Closable = sig
type t
val close : t -> unit Deferred.t
val is_closed : t -> bool
* [ close_finished t ] becomes determined at the same time as the result of the first
call to [ close ] . [ c... |
5d8c3339c12dd9bf7bfb886bbf4a78075994bf7203fb71174104681a0b954360 | exercism/ocaml | model.ml | open Core
type json = Yojson.Basic.t
type case = {
description: string;
parameters: (string * json) list;
property: string;
}
type test = {name: string; cases: case list}
type tests =
| Single of case list
| Suite of test list
type canonical_data = {
version: string option;
tests: tests
}
let rec js... | null | https://raw.githubusercontent.com/exercism/ocaml/89eb0bf11c58c3240f0336268aaa866d11c175e2/test-generator/lib_generator/model.ml | ocaml | open Core
type json = Yojson.Basic.t
type case = {
description: string;
parameters: (string * json) list;
property: string;
}
type test = {name: string; cases: case list}
type tests =
| Single of case list
| Suite of test list
type canonical_data = {
version: string option;
tests: tests
}
let rec js... | |
ae105253e3a64a0fc18cf4dbf5856b9c28567af3adaa5cda1e8965cce5b7913b | xmonad/xmonad-contrib | WallpaperSetter.hs | -----------------------------------
-- |
-- Module : XMonad.Hooks.WallpaperSetter
-- Description : Change the wallpapers depending on visible workspaces.
Copyright : ( c ) , 2014
-- License : BSD3
--
Maintainer : < >
-- Stability : unstable
-- Portability : unportable
--
-- Log hook which chang... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/52998657ef641429518b5fe0dc1f63385bf44f71/XMonad/Hooks/WallpaperSetter.hs | haskell | ---------------------------------
|
Module : XMonad.Hooks.WallpaperSetter
Description : Change the wallpapers depending on visible workspaces.
License : BSD3
Stability : unstable
Portability : unportable
Log hook which changes the wallpapers depending on visible workspaces.
-------------------------... | Copyright : ( c ) , 2014
Maintainer : < >
module XMonad.Hooks.WallpaperSetter (
wallpaperSetter
, WallpaperConf(..)
, Wallpaper(..)
, WallpaperList(..)
, defWallpaperConf
, defWPNamesJpg, defWPNamesPng, defWPNames
$ todo
) where
import XMonad
import XMonad.Prelude
import qualified XMonad.StackSet as S... |
ad9c6c5a08c4cfff5227be0078eab52b7d4db30502c6a20da7e14245f76226bd | Adellica/reser | reser.scm | (use srfi-1 spiffy intarweb uri-common ports data-structures)
;; construct a response object
(define (response #!key body status code reason headers)
`((body . ,body)
(status . ,status)
(code . ,code)
(reason . ,reason)
(headers . ,headers)))
;; call handler with an exception handler, and lo... | null | https://raw.githubusercontent.com/Adellica/reser/6781bfe2ca9c7738274eb38a1fd52604e214e6ad/reser.scm | scheme | construct a response object
call handler with an exception handler, and log error to request
response instead of stderr.
access domain-name string, use "*" to give everybody access
((wrap-cors-headers "*" (lambda _ (response body: "hi"))) '())
slurp entire request payload into string
<- max 16MB
===============... | (use srfi-1 spiffy intarweb uri-common ports data-structures)
(define (response #!key body status code reason headers)
`((body . ,body)
(status . ,status)
(code . ,code)
(reason . ,reason)
(headers . ,headers)))
(define ((wrap-errors handler . ports) r)
(define (error-string exn)
(conc... |
a4eea0e81864cd3d5abff18bfec7704f3bdbfdd2e8d899c5ef92ef3afe88ab81 | egison/egison-scheme | egison.scm | ;(define-module egison
; (export match-all
; match-first
; Something
; Eq
; Integer
; List
; Multiset
; ))
;(select-module egison)
(use util.match)
(use srfi-1)
(define-macro (match-all t M . clauses)
(if (eq? clauses '())
'()
(let* {[claus... | null | https://raw.githubusercontent.com/egison/egison-scheme/49188f4bcf91199a9e1d5142851a48ed2eb916e1/egison.scm | scheme | (define-module egison
(export match-all
match-first
Something
Eq
Integer
List
Multiset
))
(select-module egison)
(if (eq? rets '())
(match-first ,t ,M . ,(cdr clauses))
(car rets))))))
Utility functions
|
(use util.match)
(use srfi-1)
(define-macro (match-all t M . clauses)
(if (eq? clauses '())
'()
(let* {[clause (car clauses)]
[p (list 'quasiquote (rewrite-pattern (car clause)))]
[es (cdr clause)]}
`(append (map (lambda (ret) (apply (lambda ,(extract-pattern-variables ... |
ae2fb1f0912ec020b380b90efbaaacec4cce58f7667c6fae3f57673398d46613 | scrintal/heroicons-reagent | arrow_top_right_on_square.cljs | (ns com.scrintal.heroicons.mini.arrow-top-right-on-square)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M4.25 5.5a.75.75 0 00-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/arrow_top_right_on_square.cljs | clojure | (ns com.scrintal.heroicons.mini.arrow-top-right-on-square)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M4.25 5.5a.75.75 0 00-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0... | |
0d6063e52a6f76eafe61a39b33c07cd697815be01b946de23cd688544eda07ac | sadiqj/ocaml-esp32 | stackoverflow.ml | let rec f x =
if not (x = 0 || x = 10000 || x = 20000)
then 1 + f (x + 1)
else
try
1 + f (x + 1)
with Stack_overflow ->
print_string "x = "; print_int x; print_newline();
raise Stack_overflow
let _ =
begin
try
ignore(f 0)
with Stack_overflow ->
print_string "Stack overflow ... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/runtime-errors/stackoverflow.ml | ocaml | GPR#1289 | let rec f x =
if not (x = 0 || x = 10000 || x = 20000)
then 1 + f (x + 1)
else
try
1 + f (x + 1)
with Stack_overflow ->
print_string "x = "; print_int x; print_newline();
raise Stack_overflow
let _ =
begin
try
ignore(f 0)
with Stack_overflow ->
print_string "Stack overflow ... |
7d549ee80844bbaae3f448d2d0ae71f16326ff89fafc452e1644cc4f52064942 | dradtke/Lisp-Text-Editor | skeleton.lisp | (defpackage :doc-skeleton
(:use :cl :gtk :gdk :gobject :iter :c2mop :glib)
(:export :widget-skeleton
:widgets-chapter-skeleton
:enum-skeleton
:flags-skeleton
:all-enums
:all-flags
:enum-chapter-skeleton
:flags-chapter-skeleton
:... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/doc/skeleton.lisp | lisp | (widget-skeleton widget &key (sectioning-command "section"))
returns the texinfo string for widget (a symbol or class)
Template:
Interfaces: $(direct-interface widget)
Slots:
$(for each slot)
@item @anchor{slot.$widget.$slot}$slot. Type: $(slot-type slot). Accessor: $(slot-accessor slot). $(when (construc... | (defpackage :doc-skeleton
(:use :cl :gtk :gdk :gobject :iter :c2mop :glib)
(:export :widget-skeleton
:widgets-chapter-skeleton
:enum-skeleton
:flags-skeleton
:all-enums
:all-flags
:enum-chapter-skeleton
:flags-chapter-skeleton
:... |
ffdd45c822949a07bfd584b8225de0d8d84e11700c4c563683a877e157603aa7 | TaktInc/fake | Combinators.hs | module Fake.Combinators where
------------------------------------------------------------------------------
import Control.Monad
import Data.List
import Data.Ord
import System.Random
------------------------------------------------------------------------------
import Fake.Types
--------------------------------------... | null | https://raw.githubusercontent.com/TaktInc/fake/02d1d8219c4bf2958ee92c3b9fc9fe3fb5dd1270/src/Fake/Combinators.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
** Common g... | module Fake.Combinators where
import Control.Monad
import Data.List
import Data.Ord
import System.Random
import Fake.Types
fromRange :: Random a => (a,a) -> FGen a
fromRange rng = MkFGen (\r -> let (x,_) = randomR rng r in x)
pickAny :: Random a => FGen a
pickAny = MkFGen (\r -> let (x,_) = random r in x)
suchTh... |
986e250c86d25503ce2ebc289ff6900a5142eea7085e15a5db00b3e7c7d6a5b9 | faylang/fay | List2.hs | module List2 where
import FFI
import Prelude hiding (take)
main :: Fay ()
main = putStrLn (showList (take 5 (let ns = 1 : map' (foo 123) ns in ns)))
foo :: Double -> Double -> Double
foo x y = x * y / 2
take :: Int -> [a] -> [a]
take 0 _ = []
take n (x:xs) = x : take (n - 1) xs
map' :: (a... | null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/List2.hs | haskell | module List2 where
import FFI
import Prelude hiding (take)
main :: Fay ()
main = putStrLn (showList (take 5 (let ns = 1 : map' (foo 123) ns in ns)))
foo :: Double -> Double -> Double
foo x y = x * y / 2
take :: Int -> [a] -> [a]
take 0 _ = []
take n (x:xs) = x : take (n - 1) xs
map' :: (a... | |
a8f87529bcc6298718361d216c1e381f49a4ec4fd9b471da0e20381f6bde32d7 | kmi/irs | load.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(def-ontology physical-quantities
:type :domain
:namespace-uri "-quantities#"
:files ("physical-quantities")
:author "carlos" :allowed-editors ("nil")) | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/physical-quantities/load.lisp | lisp | Package : |
File created in WebOnto
(in-package "OCML")
(def-ontology physical-quantities
:type :domain
:namespace-uri "-quantities#"
:files ("physical-quantities")
:author "carlos" :allowed-editors ("nil")) |
0fec9a7e2246d535e33d490ca4773b7167d79260b27378c0939de9d623258add | lambdamikel/DLMAPS | spatial-index-macros.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : SPATIAL - SUBSTRATE ; Base : 10 -*-
(in-package spatial-substrate)
(defconstant +no-of-levels+ 20)
(defparameter *cur-level* -1)
(defparameter *level-modes* (make-array +no-of-levels+ :initial-element nil))
(defparameter *level-objects* (make-array +no-... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/spatial-substrate/spatial-index-macros.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : SPATIAL - SUBSTRATE ; Base : 10 -*-
relevanter Bucket ? |
(in-package spatial-substrate)
(defconstant +no-of-levels+ 20)
(defparameter *cur-level* -1)
(defparameter *level-modes* (make-array +no-of-levels+ :initial-element nil))
(defparameter *level-objects* (make-array +no-of-levels+ :initial-element nil))
(defmacro with-new-level ((level) &body body)
`(unwind-prote... |
2564d2c33aa4fbb4e7b3041d0cc2b5133aa5799b24e2d6b1c94582e497e26be9 | audreyt/openafp | MCF.hs |
module OpenAFP.Records.AFP.MCF where
import OpenAFP.Types
import OpenAFP.Internals
data MCF_ = MCF_ !N0 !Buffer2 deriving (Show, Typeable)
data MCF = MCF {
mcf_Type :: !N3
,mcf_ :: !N3
,mcf_Chunks :: ![MCF_]
} deriving (Show, Typeabl... | null | https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/AFP/MCF.hs | haskell |
module OpenAFP.Records.AFP.MCF where
import OpenAFP.Types
import OpenAFP.Internals
data MCF_ = MCF_ !N0 !Buffer2 deriving (Show, Typeable)
data MCF = MCF {
mcf_Type :: !N3
,mcf_ :: !N3
,mcf_Chunks :: ![MCF_]
} deriving (Show, Typeabl... | |
6e3b87ecb4643daa0f3e91de4cb0d22117887af2ad02c0ebeb4bb564e3f9c61c | pavankumarbn/DroneGUIROS | SetStayWithinDistance.lisp | ; Auto-generated. Do not edit!
(cl:in-package tum_ardrone-srv)
;//! \htmlinclude SetStayWithinDistance-request.msg.html
(cl:defclass <SetStayWithinDistance-request> (roslisp-msg-protocol:ros-message)
((distance
:reader distance
:initarg :distance
:type cl:float
:initform 0.0))
)
(cl:defclass Set... | null | https://raw.githubusercontent.com/pavankumarbn/DroneGUIROS/745320d73035bc50ac4fea2699e22586e10be800/devel/share/common-lisp/ros/tum_ardrone/srv/SetStayWithinDistance.lisp | lisp | Auto-generated. Do not edit!
//! \htmlinclude SetStayWithinDistance-request.msg.html
//! \htmlinclude SetStayWithinDistance-response.msg.html |
(cl:in-package tum_ardrone-srv)
(cl:defclass <SetStayWithinDistance-request> (roslisp-msg-protocol:ros-message)
((distance
:reader distance
:initarg :distance
:type cl:float
:initform 0.0))
)
(cl:defclass SetStayWithinDistance-request (<SetStayWithinDistance-request>)
())
(cl:defmethod cl:ini... |
8c551cd2e4c2c8e9edc8244754da6357b3252a7a3b7df83bc5b353c134fca7cc | shirok/Gauche | ndbm-suffixes.scm | ;;
ndbm - suffix - find out what suffix(es ) is / are used for ndbm database .
;; write out the result into a file given to the argument
;; in C source form.
(use gauche.process)
(use util.match)
(define (main args)
(match (cdr args)
[(file)
(receive (p tname) (sys-mkstemp "nd... | null | https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/ext/dbm/ndbm-suffixes.scm | scheme |
write out the result into a file given to the argument
in C source form. | ndbm - suffix - find out what suffix(es ) is / are used for ndbm database .
(use gauche.process)
(use util.match)
(define (main args)
(match (cdr args)
[(file)
(receive (p tname) (sys-mkstemp "ndbmtest")
(close-output-port p)
(sys-unlink tname)
(let1 p (run-process `("./ndbm-makedb" ... |
3fa390acaaa8927bc3ab6c5178afb731bc65a5a21c46f1524a182d1ffb197bd8 | tov/dssl2 | interface.rkt | #lang racket/base
(provide (struct-out imethod-info)
(struct-out interface-info)
reflect-interface
compare-imethod-info
interface-info-all-tokens
interface-info-all-tokens/list
check-interface-consistency)
(require "errors.rkt")
(struct imethod-info
[name ... | null | https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/private/interface.rkt | racket | syntax? - the name of the method
nat? - the number of contract parameters
nat? - the number of regular parameters
syntax? - the name of the interface
symbol? - the runtime identity of the interface
syntax? - the name of the runtime method table | #lang racket/base
(provide (struct-out imethod-info)
(struct-out interface-info)
reflect-interface
compare-imethod-info
interface-info-all-tokens
interface-info-all-tokens/list
check-interface-consistency)
(require "errors.rkt")
(struct imethod-info
#:transpare... |
081fc567d483badcf5248cbf9b90735101c5f7a7035c2221f253404e38fc98fb | Timothy-G-Griffin/cc_cl_cam_ac_uk | tests.ml |
let test_dir = "tests/"
let manifest_file = test_dir ^ "manifest.txt"
let process_line file expected =
Some(test_dir ^ file ^ ".slang", Some(expected))
let scan_line in_chan =
try
Scanf.bscanf in_chan "%s %s\n" process_line
with
| End_of_file -> None
| ex -> let _ = print_string ("U... | null | https://raw.githubusercontent.com/Timothy-G-Griffin/cc_cl_cam_ac_uk/aabaf64c997301ea69060a1b69e915b9d1031573/slang/tests.ml | ocaml |
let test_dir = "tests/"
let manifest_file = test_dir ^ "manifest.txt"
let process_line file expected =
Some(test_dir ^ file ^ ".slang", Some(expected))
let scan_line in_chan =
try
Scanf.bscanf in_chan "%s %s\n" process_line
with
| End_of_file -> None
| ex -> let _ = print_string ("U... | |
320d0defad1754a31d36c4db36f0f50cfe9974be4abc26701329c84b0a6d0d49 | AndrasKovacs/sett | Evaluation.hs |
module Evaluation (
app, appE, appI, proj1, proj2, gproj1, gproj2, projField, unpack, gunpack
, eval, quote, eval0, quote0, nf, nf0, spine, spine0, spineIn, coe, eq
, force, forceAll, forceMetas, eqSet, forceSet, unblock
, projFieldName, setRelevance, Relevance(..), appTy, proj1Ty, proj2Ty, unpackTy
, eval... | null | https://raw.githubusercontent.com/AndrasKovacs/sett/1458b1e44307d89c91c13426f9f565479c7041e3/src/Evaluation.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
| Bump the `Lvl` and get a fresh variable.
pattern synonyms
------------------------------------------------------------------------------
---------------------... |
module Evaluation (
app, appE, appI, proj1, proj2, gproj1, gproj2, projField, unpack, gunpack
, eval, quote, eval0, quote0, nf, nf0, spine, spine0, spineIn, coe, eq
, force, forceAll, forceMetas, eqSet, forceSet, unblock
, projFieldName, setRelevance, Relevance(..), appTy, proj1Ty, proj2Ty, unpackTy
, eval... |
d0f81dad8d28a7bfa5753f9c17e699d5d72b1d8612363f4b7388906244973077 | Jciel/cathedral | simple-list.lsp |
;;; @description Filter elements of a list using a callback function,
;;; @description the calback function should return T (true) for the element
@descriptione to enter the new list and nil for the element not to enter the new list .
;;;
;;; @parameters function : calback : Callback function.
;;; @paramete... | null | https://raw.githubusercontent.com/Jciel/cathedral/6d593cb3d8d85173e8630f21e38c464a687c5e10/src/list/simple-list.lsp | lisp | @description Filter elements of a list using a callback function,
@description the calback function should return T (true) for the element
@parameters function : calback : Callback function.
@parameters list : list-values : List of elements to be filtered.
@exempleDescription Example that filters a lis... |
@descriptione to enter the new list and nil for the element not to enter the new list .
@return list : List with elements filtered according to the callback function .
@exempleCode (= ( rem num 2 ) 0 ) ) ' ( 1 2 3 4 5 6 7 8 9 ) )
(defun filter(callback list-values / aux el)
(setq aux '())
(foreac... |
b878d33a15b3d9685331e154c89c2aea56fa09d8408d81931b41786d888676ed | oflatt/space-orbs | rotate-dir.rkt | #lang racket
(require pict3d rackunit pict3d/universe mzlib/string "structures.rkt")
(provide rotate-around-dir roll-to-dir dir-up-to-roll rotate-up rotate-down rotate-left rotate-right ang-between-dirs)
takes two dir and an angle - > one dir
;;rotates to-rotate around around, counterclockwise looking in the direction... | null | https://raw.githubusercontent.com/oflatt/space-orbs/3d6301e576f304a9994d42b49939ad2432069aac/client/rotate-dir.rkt | racket | rotates to-rotate around around, counterclockwise looking in the direction of around
dir and angle -> dir
finds "up" relative to a dir and roll
I use the term roll for angle/twist or rotation of the camera
gives the roll of a camera with the dir and a dir that points "up" from that dir
finds "up" with a dir and roll
fi... | #lang racket
(require pict3d rackunit pict3d/universe mzlib/string "structures.rkt")
(provide rotate-around-dir roll-to-dir dir-up-to-roll rotate-up rotate-down rotate-left rotate-right ang-between-dirs)
takes two dir and an angle - > one dir
(define (rotate-around-dir to-rotate around ang)
(transform-dir to-rotate ... |
78356ff33a16f2e3dbe665e3362934d1aa040385e15bf582af58cc3f8a3e561a | markus-git/hardware-edsl | Expression.hs | module Language.Embedded.VHDL.Monad.Expression
( and, or, xor, xnor, nand, nor
, eq, neq, lt, lte, gt, gte
, sll, srl, sla, sra, rol, ror
, add, sub, cat, neg
, mul, div, mod, rem
, exp, abs, not
, name, simple, indexed, selected, slice, attribute
, literal, number, string
, aggregate, aggregated, ass... | null | https://raw.githubusercontent.com/markus-git/hardware-edsl/d0fde93ff57a8f5c2c37e273ff3a1d2a761fc5eb/src/Language/Embedded/VHDL/Monad/Expression.hs | haskell | utility.
------------------------------------------------------------------------------
* Expressions and their sub-layers.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
** Expressions
--------------------... | module Language.Embedded.VHDL.Monad.Expression
( and, or, xor, xnor, nand, nor
, eq, neq, lt, lte, gt, gte
, sll, srl, sla, sra, rol, ror
, add, sub, cat, neg
, mul, div, mod, rem
, exp, abs, not
, name, simple, indexed, selected, slice, attribute
, literal, number, string
, aggregate, aggregated, ass... |
2e75243b5a24aa88180aac86b6c9e57f61438a7b4f9ad0d02016f2b41c78f409 | haskell-waargonaut/waargonaut | Whitespace.hs | {-# LANGUAGE CPP #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
-- |
--
Parsers and builders for whitespace characters in our JSON .
--
module Waargonaut.Types.Whitespace
(
Whitespace (..)
, WS (..)
, _WhitespaceChar
, esca... | null | https://raw.githubusercontent.com/haskell-waargonaut/waargonaut/ba1dbbc170c2279749ea29bc8aaf375bdb659ad2/src/Waargonaut/Types/Whitespace.hs | haskell | # LANGUAGE CPP #
|
$setup
>>> :set -XOverloadedStrings
>>> import Data.Either(Either (..), isLeft)
>>> import qualified Data.Digit as D
--
| Represent the different types of whitespace.
| This is a wrapper for a sequence of consecutive whitespace.
# INLINE _Wrapped' #
# INLINE (<>) #
|
Rig... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
Parsers and builders for whitespace characters in our JSON .
module Waargonaut.Types.Whitespace
(
Whitespace (..)
, WS (..)
, _WhitespaceChar
, escapedWhitespaceChar
, unescapedWhitespaceChar
,... |
ebe3790813aa479bb359931e60c1dae425ac8b382ce02982dd6d5304fcd41932 | links-lang/links | desugarPages.mli | val is_pageless : SugarTraversals.predicate
include Transform.Typeable.S
| null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/core/desugarPages.mli | ocaml | val is_pageless : SugarTraversals.predicate
include Transform.Typeable.S
| |
d827c56ec4da307f32f628a9ede397a1927262f525ec0ded026c2b9b5caaae81 | heshrobe/joshua-dist | readnnwr.lisp | ;;; -*- Mode: LISP; Package: JOSHUA-INTERNALS; Syntax: Ansi-common-lisp -*-
;;;>
;;;> *****************************************************************************************
> * * ( c ) Copyright 1989 , 1988 Symbolics , Inc. All rights reserved .
> * * Portions of font library Copyright ( c ) 1984 Bitstream , Inc. ... | null | https://raw.githubusercontent.com/heshrobe/joshua-dist/6f53f1df87a05a1a8914947d475bbef94349b466/joshua/code/readnnwr.lisp | lisp | -*- Mode: LISP; Package: JOSHUA-INTERNALS; Syntax: Ansi-common-lisp -*-
>
> *****************************************************************************************
>
> The software, data, and information contained herein are proprietary
> to keep such software, data, and information confidential and to preserve
>... | > * * ( c ) Copyright 1989 , 1988 Symbolics , Inc. All rights reserved .
> * * Portions of font library Copyright ( c ) 1984 Bitstream , Inc. All Rights Reserved .
> to , and comprise valuable trade secrets of , Symbolics , Inc. , which intends
> Symbolics , Symbolics 3600 , Symbolics 3670 ( R ) , Symbolics 3675 ( ... |
e6d84f7d60409a3cc05d97692ba8db415367d63b88ad50bb94b8e792ccda2f2e | soupi/yh | Input.hs | # LANGUAGE DeriveGeneric , DeriveAnyClass #
module Play.Engine.Input where
import Data.Tuple
import qualified SDL
import qualified Play.Engine.MySDL.MySDL as MySDL
import Play.Engine.Types
import qualified Data.Map as M
import GHC.Generics
import Control.DeepSeq
data Input
= Input
{ inputKeys :: !Keys
, respo... | null | https://raw.githubusercontent.com/soupi/yh/4cfbcc7da6f3ca5e330b7fd7d4adeacee7e2dff4/src/Play/Engine/Input.hs | haskell | # LANGUAGE DeriveGeneric , DeriveAnyClass #
module Play.Engine.Input where
import Data.Tuple
import qualified SDL
import qualified Play.Engine.MySDL.MySDL as MySDL
import Play.Engine.Types
import qualified Data.Map as M
import GHC.Generics
import Control.DeepSeq
data Input
= Input
{ inputKeys :: !Keys
, respo... | |
3e935fab07af9b54014f6ff4415ce1865495455e219c8539aa45a0d2be958a0e | Funky-Punky/FPV_SS22_Repetitorium | assignment.ml | open Thread
open Event
| null | https://raw.githubusercontent.com/Funky-Punky/FPV_SS22_Repetitorium/098ea18ae35e41bec1cc6b658c1944d89becbb99/ocaml/side_effects_exceptions_file-management_threads/queue/src/assignment.ml | ocaml | open Thread
open Event
| |
ccae834498294e30286621f1cf2381783fa6264f074f40f438b0b7b8fa106dca | leksah/leksah-server | CabalProject.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
-----------------------------------------------------------------------------
--
Module : IDE.Utils . CabalProject
Copyright : 2016 - 2016 ,
-- License : GPL
--
-- Maintainer :
-- Stability : provisional
-- Portability :
--
-- |
... | null | https://raw.githubusercontent.com/leksah/leksah-server/d4b735c17a36123dc97f79fabf1e9310d74984a6/src/IDE/Utils/CabalProject.hs | haskell | ---------------------------------------------------------------------------
License : GPL
Maintainer :
Stability : provisional
Portability :
|
---------------------------------------------------------------------------
and until features like `cabal run` exist for `cabal new-build`
Search upwards.... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
Module : IDE.Utils . CabalProject
Copyright : 2016 - 2016 ,
module IDE.Utils.CabalProject (
findProjectRoot
, projectPackages
, getCabalProjectPackages
) where
import Prelude ()
import Prelude.Compat hiding (readFile)
import Syste... |
229edded36022cec2e8829830da4339d57d4124bb0b70bb3d924461832a0eb2c | slipstream/SlipStreamServer | user_template_mitreid_registration_test.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.user-template-mitreid-registration-test
(:require
[clojure.test :refer [deftest is]]
[com.sixsq.slipstream.ssclj.resources.spec.spec-test-utils :as stu]
[com.sixsq.slipstream.ssclj.resources.spec.user-template-mitreid :as ut-mitreid]
[com.sixsq.slipstream.... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/spec/user_template_mitreid_registration_test.cljc | clojure | check the registration schema (without href)
check the create template schema (with href) | (ns com.sixsq.slipstream.ssclj.resources.spec.user-template-mitreid-registration-test
(:require
[clojure.test :refer [deftest is]]
[com.sixsq.slipstream.ssclj.resources.spec.spec-test-utils :as stu]
[com.sixsq.slipstream.ssclj.resources.spec.user-template-mitreid :as ut-mitreid]
[com.sixsq.slipstream.... |
7ba93b822cf21a593c84ccf7795b1d613f362a581f44aee0d751879ad7935d53 | mit-pdos/mcqc | Top.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Codegen.Top where
import CIR.Expr
import CIR.Decl
import Classes.Typeful
import Codegen.Rewrite
import Types.Templates
import Types.Context
import Data.MonoTraversable
import Control.Monad.State
import Data.Maybe
-- Environment monad
type Env a = ... | null | https://raw.githubusercontent.com/mit-pdos/mcqc/85b5a65f1750ffb7c2336fa4c9266cc238aeeb5e/src/Codegen/Top.hs | haskell | # LANGUAGE OverloadedStrings #
Environment monad
Remove coq_ prefix for things in Context
Link names using namelink | # LANGUAGE RecordWildCards #
module Codegen.Top where
import CIR.Expr
import CIR.Decl
import Classes.Typeful
import Codegen.Rewrite
import Types.Templates
import Types.Context
import Data.MonoTraversable
import Control.Monad.State
import Data.Maybe
type Env a = State (Context CType) a
Add types to generated CDecl b... |
8a8f7290460bc6780ddc72ac23045b6d06c647d026d0a06fa6acc0110345e81c | freedesktop/bustle | Renderer.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleContexts #
module Main where
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.HUnit
import Test.HUnit
import Control.Monad (when)
import Control.Monad.State
import qualified Data.Set as Set
import Data.Monoid
import Data.List
import ... | null | https://raw.githubusercontent.com/freedesktop/bustle/e506b5ca71e14af3d2ebd0a63c1b8d3ea0fb1795/Test/Renderer.hs | haskell | # LANGUAGE OverloadedStrings #
Tests that services visible in a log are listed as participants even if they
disconnect from the bus before the end of the log. This is a regression test
for a bug I almost introduced.
Test that incremental rendering matches all-at-once rendering
This is enough names that the log nee... | # LANGUAGE FlexibleContexts #
module Main where
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.HUnit
import Test.HUnit
import Control.Monad (when)
import Control.Monad.State
import qualified Data.Set as Set
import Data.Monoid
import Data.List
import System.Exit (exitFailure)
import DB... |
1316ac17669349228cd43ff3c812fc782710a794d5fb7197fb1b1124a242d6ae | valerauko/kitsune-alpha | activitypub.clj | (ns kitsune.handlers.activitypub
(:require [ring.util.http-response :as status]
[kitsune.db.user :as db]
[kitsune.handlers.core :refer [defhandler]]
[bark.inbox :as federator]
[kitsune.federators.follow :as follow]))
(def handler
(federator/inbox-handler
{:find-o... | null | https://raw.githubusercontent.com/valerauko/kitsune-alpha/34ca08e4013541aeaf1a5a5786f3189ff17c1a58/src/kitsune/handlers/activitypub.clj | clojure | (ns kitsune.handlers.activitypub
(:require [ring.util.http-response :as status]
[kitsune.db.user :as db]
[kitsune.handlers.core :refer [defhandler]]
[bark.inbox :as federator]
[kitsune.federators.follow :as follow]))
(def handler
(federator/inbox-handler
{:find-o... | |
4a7b6bba30b95b01ef288950142cd5722631c3eb89501abe92dea94b593a4dc0 | lispnik/iup | idle.lisp | ;;; Generated from org-mode, do not edit
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload "iup"))
(defpackage #:iup-examples.idle
(:use #:common-lisp)
(:export #:idle))
(in-package #:iup-examples.idle)
(defun idle ()
(iup:with-iup ()
(let* ((counter (iup:label :fontsize 24
... | null | https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/examples/idle.lisp | lisp | Generated from org-mode, do not edit |
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload "iup"))
(defpackage #:iup-examples.idle
(:use #:common-lisp)
(:export #:idle))
(in-package #:iup-examples.idle)
(defun idle ()
(iup:with-iup ()
(let* ((counter (iup:label :fontsize 24
:title 0
... |
099079e1e4bedda88021a5a64b94f477c965c8df37eac291de80bce399c32e91 | gvannest/piscine_OCaml | cipher.ml | let rot42 str =
let rot42_char c = match c with
| 'a' .. 'z' -> begin char_of_int((int_of_char 'a') + (((int_of_char c) - (int_of_char 'a') + 42) mod 26)) end
| 'A' .. 'Z' -> begin char_of_int((int_of_char 'A') + (((int_of_char c) - (int_of_char 'A') + 42) mod 26)) end
| _ -> c
in
S... | null | https://raw.githubusercontent.com/gvannest/piscine_OCaml/2533c6152cfb46c637d48a6d0718f7c7262b3ba6/d03/ex02/cipher.ml | ocaml | let rot42 str =
let rot42_char c = match c with
| 'a' .. 'z' -> begin char_of_int((int_of_char 'a') + (((int_of_char c) - (int_of_char 'a') + 42) mod 26)) end
| 'A' .. 'Z' -> begin char_of_int((int_of_char 'A') + (((int_of_char c) - (int_of_char 'A') + 42) mod 26)) end
| _ -> c
in
S... | |
45d3966558c4fc4ccfee683779eb58021de6d337c2e11056fc6a7665f170ad7c | mejgun/haskell-tdlib | CreateInvoiceLink.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.CreateInvoiceLink where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.InputMessageContent as InputMessageContent
import qualified Utils as U
-- |
Creates a link for the given invoice ; for bots only @invoice ... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/eba1ae3f364d43aabc4f5d2a56ffb1ffb88fe482/src/TD/Query/CreateInvoiceLink.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| |
module TD.Query.CreateInvoiceLink where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.InputMessageContent as InputMessageContent
import qualified Utils as U
Creates a link for the given invoice ; for bots only @invoice Information about the invoice of the type inp... |
e166f4f2163f4b88c5a01d3cb326e48449b8aea3ad8970af466ee95cb571fce4 | GRACeFUL-project/haskelzinc | MZBuiltIns.hs | |
Module : MZBuiltIns
Description : MiniZinc built - in predicates , tests and functions
License : < >
Stability : experimental
This module uses definitions of " Interfaces . MZAST " to provide an easy interface to
MiniZinc built - in calls . It might be missing built - in calls that ... | null | https://raw.githubusercontent.com/GRACeFUL-project/haskelzinc/e00684428f4e2072c9b1912c7036f686314b1824/src/Interfaces/MZBuiltIns.hs | haskell | * MiniZinc built-in operators
** Comparison operators
** Arithmetic operators
** Logical operators
** Set operators
** Array operators
* MiniZinc built-in calls
** Arithmetic calls
** Exponential and logarithmic calls
** Trigonometric calls
** Logical calls
** Set calls
** Array calls
** Array sorting cal... | |
Module : MZBuiltIns
Description : MiniZinc built - in predicates , tests and functions
License : < >
Stability : experimental
This module uses definitions of " Interfaces . MZAST " to provide an easy interface to
MiniZinc built - in calls . It might be missing built - in calls that ... |
f2df139464d6212bdce7cf53fa1df6ae17ebe33ae03fa25a4f3bfa1d508ff74b | tfausak/monadoc-5 | Etag.hs | module Monadoc.Type.Etag where
import qualified Data.ByteString as ByteString
import qualified Database.SQLite.Simple.FromField as Sql
import qualified Database.SQLite.Simple.ToField as Sql
import Monadoc.Prelude
import qualified Monadoc.Utility.Sql as Sql
import qualified Text.Read as Read
-- | An HTTP entity tag (E... | null | https://raw.githubusercontent.com/tfausak/monadoc-5/5361dd1870072cf2771857adbe92658118ddaa27/src/lib/Monadoc/Type/Etag.hs | haskell | | An HTTP entity tag (ETag). Values typically come from HTTP headers, so
quoted ASCII strings like @"01ef"@. Use 'fromByteString' and 'toByteString'
for conversion. | module Monadoc.Type.Etag where
import qualified Data.ByteString as ByteString
import qualified Database.SQLite.Simple.FromField as Sql
import qualified Database.SQLite.Simple.ToField as Sql
import Monadoc.Prelude
import qualified Monadoc.Utility.Sql as Sql
import qualified Text.Read as Read
this is a ' ByteString .... |
ce2398efaff70625fd5a55d1d49fa8105c0eb291d3a0e7309c9dd8bf3124217f | eccentric-j/doom-icon | resize.cljs | (ns tasks.resize
"
Based on tutorial from:
-create-your-own-custom-icons-in-10-7-5-or-later/
Usage:
npm run resize ./src/imgs/kitty-icon.png ./icons/kitty-terminal/png
"
(:require
[promesa.core :as p]
["jimp$default" :as jimp]
["path" :as path]
["fs/promises" :as fs]))
(def sizes
[512
... | null | https://raw.githubusercontent.com/eccentric-j/doom-icon/fc02927f105eabf7108a0f00605fe8356bbaa5f2/src/tasks/resize.cljs | clojure | (ns tasks.resize
"
Based on tutorial from:
-create-your-own-custom-icons-in-10-7-5-or-later/
Usage:
npm run resize ./src/imgs/kitty-icon.png ./icons/kitty-terminal/png
"
(:require
[promesa.core :as p]
["jimp$default" :as jimp]
["path" :as path]
["fs/promises" :as fs]))
(def sizes
[512
... | |
a6bf94d0abc2aac8abf6c7c9a7accbac0778ff894f49a908f4a923e9bc412725 | alezost/stumpwm-config | visual.lisp | ;;; visual.lisp --- Visual appearance: colors, fonts, mode line, ...
Copyright © 2013–2016 , 2018–2022 < >
;; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the Licens... | null | https://raw.githubusercontent.com/alezost/stumpwm-config/0e6877778d36148f3be53dbe1f81404f2892963f/visual.lisp | lisp | visual.lisp --- Visual appearance: colors, fonts, mode line, ...
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY ... |
Copyright © 2013–2016 , 2018–2022 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package :stumpwm)
(setf *colors*
0
1
2
3
4
5... |
6587aaece11b29359e3ab5f030affe0a9d38874514ea6ef8926e489b66e18933 | UCSD-PL/nano-smt | NelsonOppen.hs | -- | Nelson-Oppen Procedure for Combining Theory Solvers
module Language.Nano.SMT.NelsonOppen (theory_solver) where
import Language.Nano.SMT.Types
import Control.Monad.State
import qualified Data.HashMap.Strict as M
import qualified Data.HashSet as S
import Control.Applicative ((<... | null | https://raw.githubusercontent.com/UCSD-PL/nano-smt/0fe3be6cf5ecf82f61ea9b3b3a4047d8f72c04f1/Language/Nano/SMT/NelsonOppen.hs | haskell | | Nelson-Oppen Procedure for Combining Theory Solvers
-----------------------------------------------------------------------------
| `theory_solver` returns the `k` belonging to the conflicting `Atom`
or empty list if the conjunction of `[Atom]` is satisfiable
DiffBound.solver
-------------------------------... |
module Language.Nano.SMT.NelsonOppen (theory_solver) where
import Language.Nano.SMT.Types
import Control.Monad.State
import qualified Data.HashMap.Strict as M
import qualified Data.HashSet as S
import Control.Applicative ((<$>))
import qualified Language.Nano.SMT.CongClos as CC... |
bf925d14849b0920d413a71dc8fbe45242f631bda2a4ce6ef09a23bcdce7c744 | audreyt/openafp-utils | afp-split.hs | module Main where
import OpenAFP
import System.Exit
import qualified Data.ByteString.Char8 as C
-- Algorithm:
Gather everything up to first BPG
write out each BPG / EPG chunks
append ENG+EDT
main :: IO ()
main = do
args <- getArgs
if null args then error "Usage: afp-split file.afp 8 9 10 11 12" el... | null | https://raw.githubusercontent.com/audreyt/openafp-utils/cbc59144e07638ba9f34685aba77c867e1a766ac/afp-split.hs | haskell | Algorithm: | module Main where
import OpenAFP
import System.Exit
import qualified Data.ByteString.Char8 as C
Gather everything up to first BPG
write out each BPG / EPG chunks
append ENG+EDT
main :: IO ()
main = do
args <- getArgs
if null args then error "Usage: afp-split file.afp 8 9 10 11 12" else do
let ... |
c7f1a7d63daed0806dfda170ac3f237142574aca5763790c1b15f2ad0800051f | braidchat/braid | test_utils.clj | (ns braid.test.server.test-utils
(:require
[datomic.api :as d]
[braid.core.server.db :as db]))
(defn- db->message
[e]
{:id (:message/id e)
:content (:message/content e)
:user-id (:user/id (:message/user e))
:thread-id (:thread/id (:message/thread e))
:group-id (get-in e [:message/thread :thre... | null | https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/test/braid/test/server/test_utils.clj | clojure | (ns braid.test.server.test-utils
(:require
[datomic.api :as d]
[braid.core.server.db :as db]))
(defn- db->message
[e]
{:id (:message/id e)
:content (:message/content e)
:user-id (:user/id (:message/user e))
:thread-id (:thread/id (:message/thread e))
:group-id (get-in e [:message/thread :thre... | |
46fd08955d22238e32ce6cb4554a996b4194499e591410a6568bd01a049f7446 | cram2/cram | vector-variance-with-mean.lisp | Regression test VECTOR - VARIANCE - WITH - MEAN for GSLL , automatically generated
;;
Copyright 2009 , 2011
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publishe... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/vector-variance-with-mean.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | Regression test VECTOR - VARIANCE - WITH - MEAN for GSLL , automatically generated
Copyright 2009 , 2011
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
Y... |
3b464b757f803688962f6cce321fd6947e365b65d53199e86e3c8882e0dc5679 | codinuum/cca | UID.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in wri... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/otreediff/src/UID.ml | ocaml |
* Unique IDs
*
* UID.ml
*
|
Copyright 2012 - 2020 Codinuum Software Lab < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in wri... |
eaa5d3caa9457d04b114e0f68fd8a543965a7fdf070476167f27ab7b21d4027c | evuez/slate | Ansi.hs | module Ansi where
progress :: Double -> Int -> String
progress percent size =
makeInverse
(primary palette ++
replicate sizeCompleted ' ' ++
secondary palette ++ replicate sizeRemaining ' ')
where
size' = fromIntegral size :: Double
sizeCompleted = round $ size' * percent / 100
sizeRemain... | null | https://raw.githubusercontent.com/evuez/slate/de13732a60db23db76499ccd6699743fb940fc3f/src/Ansi.hs | haskell | module Ansi where
progress :: Double -> Int -> String
progress percent size =
makeInverse
(primary palette ++
replicate sizeCompleted ' ' ++
secondary palette ++ replicate sizeRemaining ' ')
where
size' = fromIntegral size :: Double
sizeCompleted = round $ size' * percent / 100
sizeRemain... | |
1335be30040813bd72c80f87e13dd27a7e2aa71bce82eb3c7dd615606e382079 | passy/latest-npm-version | Latest.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : Npm . Latest
Description : Fetch the latest version of an npm module .
Copyright : ( c ) , 2014
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
This is just an experiment of me porting a node module to and lear... | null | https://raw.githubusercontent.com/passy/latest-npm-version/da01dbe656b251bc47258f988282ef2d920abc9c/Npm/Latest.hs | haskell | # LANGUAGE OverloadedStrings # | |
Module : Npm . Latest
Description : Fetch the latest version of an npm module .
Copyright : ( c ) , 2014
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
This is just an experiment of me porting a node module to and learning
about Lenses and Pipes along... |
705a8c8384adda2eeb0b9ee941826f3fed5a781866cd69eb01ac2668c2fa05ba | AdaCore/why3 | why3pp_sexp-dummy.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/src/tools/why3pp_sexp-dummy.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
let why3pp_sexp _ _ =
output_string stderr "error: S-expression output unsupported\n";
exit 1
|
088f77976b442924bcdc8b8128fc071001f37f92c5912cdb536f1c7e78b63979 | exercism/common-lisp | example.lisp | (defpackage :two-bucket
(:use :cl)
(:export :measure))
(in-package :two-bucket)
(shadow 'fill)
(defclass bucket ()
((capacity :initarg :capacity
:reader capacity)
(amount :initform 0
:reader amount)
(name :initarg :name
:reader name)))
(defgeneric empty (obj)
(:documen... | null | https://raw.githubusercontent.com/exercism/common-lisp/a699b609307ebb06d11866137dc200e28bcc6fb8/exercises/practice/two-bucket/.meta/example.lisp | lisp | (defpackage :two-bucket
(:use :cl)
(:export :measure))
(in-package :two-bucket)
(shadow 'fill)
(defclass bucket ()
((capacity :initarg :capacity
:reader capacity)
(amount :initform 0
:reader amount)
(name :initarg :name
:reader name)))
(defgeneric empty (obj)
(:documen... | |
c3511c1e3b0ea2d3d15132bda31d2adaa1414d08020735546b2a5cedcbeea72e | coast-framework/db | generator.clj | (ns db.schema.generator
(:require [db.transactor :as transactor]
[helper.core :as helper]
[clojure.string :as string]
[clojure.java.io :as io]))
(defn indexes-sql []
{"sqlite" ["select
index_info.name as index_column, index_list.name index_name,
ma... | null | https://raw.githubusercontent.com/coast-framework/db/e738cd6402a89c591363ac6f3e7a6e08bcc28a0e/src/db/schema/generator.clj | clojure | (ns db.schema.generator
(:require [db.transactor :as transactor]
[helper.core :as helper]
[clojure.string :as string]
[clojure.java.io :as io]))
(defn indexes-sql []
{"sqlite" ["select
index_info.name as index_column, index_list.name index_name,
ma... | |
933fd7a2667c1a108cc8bcb000793e5614de07d7b080d265b221e5ab68538b2e | garycrawford/lein-life | lifecycle.clj | (ns {{ns-name}}.unit.components.graphite.lifecycle
(:require [midje.sweet :refer :all]
[{{ns-name}}.components.graphite.lifecycle :refer :all]
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[com.g... | null | https://raw.githubusercontent.com/garycrawford/lein-life/d55f3636950b58b02399ab32eb1f6d81ecfce823/src/leiningen/new/life/common/test/unit/components/graphite/lifecycle.clj | clojure | (ns {{ns-name}}.unit.components.graphite.lifecycle
(:require [midje.sweet :refer :all]
[{{ns-name}}.components.graphite.lifecycle :refer :all]
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[com.g... | |
bcf3384915fb0dc5965fe1dea418e0c574d14820c0cdcfea330685aef2ae03fc | 2600hz-archive/whistle | oauth_uri.erl | -module(oauth_uri).
-export([normalize/1, calate/2, encode/1]).
-export([params_from_string/1, params_to_string/1,
params_from_header_string/1, params_to_header_string/1]).
-import(lists, [concat/1]).
normalize(URI) ->
case http_uri:parse(URI) of
{Scheme, UserInfo, Host, Port, Path, _Query} ->
normali... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/oauth-1.0.1/src/oauth_uri.erl | erlang | , A, B | T], Acc) -> | -module(oauth_uri).
-export([normalize/1, calate/2, encode/1]).
-export([params_from_string/1, params_to_string/1,
params_from_header_string/1, params_to_header_string/1]).
-import(lists, [concat/1]).
normalize(URI) ->
case http_uri:parse(URI) of
{Scheme, UserInfo, Host, Port, Path, _Query} ->
normali... |
6b970f054f47c682203502ade4e28113b73a651face78aff1b7d022774e9b2f6 | blindglobe/clocc | section21.lisp | section 21 : streams -*- mode : lisp -*-
(in-package :cl-user)
(check-for-bug :section21-legacy-5
(subtypep 'stream 't)
t)
(check-for-bug :section21-legacy-9
(subtypep 'broadcast-stream 'stream)
t)
(check-for-bug :section21-legacy-13
(subtypep 'concatenated-stream 'stream)
t)
(check-for-bug :section2... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/tools/ansi-test/section21.lisp | lisp | input-stream-p
open-stream-p
read-byte
peek-char
read-char
make-concatenated-stream | section 21 : streams -*- mode : lisp -*-
(in-package :cl-user)
(check-for-bug :section21-legacy-5
(subtypep 'stream 't)
t)
(check-for-bug :section21-legacy-9
(subtypep 'broadcast-stream 'stream)
t)
(check-for-bug :section21-legacy-13
(subtypep 'concatenated-stream 'stream)
t)
(check-for-bug :section2... |
ff94319699f41ffc6977acb391364dddfe5ccc66820002221d0d8f365436c62b | scslab/hails | Router.hs | # LANGUAGE Trustworthy #
# LANGUAGE FlexibleInstances #
|
Conceptually , a route is function that , given an HTTP request , may return
an action ( something that would return a response for the client if run ) .
Routes can be concatenated -- where each route is evaluated until one
matches -- and nested . Rou... | null | https://raw.githubusercontent.com/scslab/hails/4d4dfe0cdfb7c8941a55ce882cba20d82c6d9cfd/Hails/Web/Router.hs | haskell | where each route is evaluated until one
and nested . Routes are expressed through the ' ' type class .
where each route is evaluated until one
and nested. Routes are expressed through the 'Routeable' type class.
* Example
$Example
* Common Routes
| Route handler is a fucntion from the path info, request
confi... | # LANGUAGE Trustworthy #
# LANGUAGE FlexibleInstances #
|
Conceptually , a route is function that , given an HTTP request , may return
an action ( something that would return a response for the client if run ) .
' runRoute ' transforms an instance of ' ' to a function from ' Request '
to a monadic action ( ... |
504387207c1e0de182da09b121747fce0a1dc479630e751d7d1df280013a7f60 | rambler-digital-solutions/aioriak | riak_pb_codec.erl | %% -------------------------------------------------------------------
%%
%% riak_pb_codec: Protocol Buffers encoding/decoding helpers
%%
Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use ... | null | https://raw.githubusercontent.com/rambler-digital-solutions/aioriak/06eb8defb43555599f5bf273a8478de989fb7f14/riak_pb/src/riak_pb_codec.erl | erlang | -------------------------------------------------------------------
riak_pb_codec: Protocol Buffers encoding/decoding helpers
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. Se... | Copyright ( c ) 2012 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@doc ... |
e01d13e912ced441f669df942175e8ce451b0486e75f55386b1561c048db5381 | kronkltd/jiksnu | providers.cljs | (ns jiksnu.app.providers
(:require [inflections.core :as inf]
[jiksnu.app :refer [jiksnu models]]
[jiksnu.app.protocols :refer [AppProtocol] :as p]
[jiksnu.app.provider-methods :as methods]
[jiksnu.registry :as registry]
[taoensso.timbre :as timbre]))
(def ... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src-cljs/jiksnu/app/providers.cljs | clojure | Bind to window for easy debugging
return the app | (ns jiksnu.app.providers
(:require [inflections.core :as inf]
[jiksnu.app :refer [jiksnu models]]
[jiksnu.app.protocols :refer [AppProtocol] :as p]
[jiksnu.app.provider-methods :as methods]
[jiksnu.registry :as registry]
[taoensso.timbre :as timbre]))
(def ... |
34d032de5a1b854d57efa39b12a9305481650e474e53de59775de25e42db32f8 | ocsigen/eliom | eliom_react.server.mli | Ocsigen
*
* Copyright ( C ) 2010
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at you... | null | https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_react.server.mli | ocaml | * Propagate events
occurrences from the server to the client and the other way
around. Occurrence propagation is done asynchronously.
Warning: it is not possible to catch exceptions on each channel
using Eliom_react (for example channel closed or full).
If you need an error handling, use Eliom_come... | Ocsigen
*
* Copyright ( C ) 2010
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at you... |
a6ec7e70343d82ac8a5fdd61be1c104978662f3463230ed65b97d112390f1d2d | lamdu/hypertypes | Generalize.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
-- | Generalization of type schemes
module Hyper.Unify.Generalize
( generalize
, instantiate
, GTerm (..)
, _GMono
, _GPoly
, _GBody
, W_GTerm (..)
, instantiateWi... | null | https://raw.githubusercontent.com/lamdu/hypertypes/161142e0d9f503194b85fb6f5b2a5907a1ae3783/src/Hyper/Unify/Generalize.hs | haskell | | Generalization of type schemes
| Exports for @SPECIALIZE@ pragmas.
| An efficient representation of a type scheme arising from
generalizing a unification term. Type subexpressions which are
completely monomoprhic are tagged as such, to avoid redundant
instantation and unification work
| Completely monomoprhic ... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Hyper.Unify.Generalize
( generalize
, instantiate
, GTerm (..)
, _GMono
, _GPoly
, _GBody
, W_GTerm (..)
, instantiateWith
, instantiateForAll
, ins... |
90bf4b9fc7ce30935a8f743fc640fcaadbfe98ab7b4785aec79a2dbb82c0679e | nd/sicp | constraints.scm | (define (adder a1 a2 sum)
(define (process-new-value)
(cond ((and (has-value? a1) (has-value? a2))
(set-value! sum
(+ (get-value a1) (get-value a2))
me))
((and (has-value? a1) (has-value? sum))
(set-value! a2
(- (... | null | https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch03/constraints.scm | scheme | it can calculate square of a, but cannot calculate root, because | (define (adder a1 a2 sum)
(define (process-new-value)
(cond ((and (has-value? a1) (has-value? a2))
(set-value! sum
(+ (get-value a1) (get-value a2))
me))
((and (has-value? a1) (has-value? sum))
(set-value! a2
(- (... |
31273ad6e48914b6ed075f360eefa408364b374eea0b78a37b999617f1b11c59 | mvdcamme/meta-tracing-JIT | closures.scm | (module closures racket
(provide (all-defined-out))
;
; Closures
;
(struct clo (λ ρ) #:transparent)
(struct lam (x es) #:transparent)
Checks whether two closures are equal .
(define (clo-equal? clo1 clo2)
(or (eq? clo1 clo2)
(and (clo? clo1)
(clo? clo2)
... | null | https://raw.githubusercontent.com/mvdcamme/meta-tracing-JIT/640af917e473f3793ab12791dcb2c80f617b8a0d/closures.scm | scheme |
Closures
| (module closures racket
(provide (all-defined-out))
(struct clo (λ ρ) #:transparent)
(struct lam (x es) #:transparent)
Checks whether two closures are equal .
(define (clo-equal? clo1 clo2)
(or (eq? clo1 clo2)
(and (clo? clo1)
(clo? clo2)
(equal? (lam-x (clo-λ... |
f0578b320c40c6056e5e83330107530a78eca843a0b5b766210292ebbc3487d1 | let-def/menhir | misc.ml | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/misc.ml | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the Q Public License versi... |
e0b31f19892677de2679d8f6621fc67b7de634cf783e52a7d38159086d8084fb | Gadjib/ocamlhomeworks | p6.ml | open Unix;;
let f = open_out_bin "file.txt";;
let to_utf_8 n f = if ( int_of_float ( ( 2.**32.)-1 ) ) ( int_of_float ( ( 2.**7.)-1 ) ) = 0 then output_byte f ( n land 0xFF ) else
( if ( int_of_float ( ( 2.**32.)-1 ) ) ( int_of_float ( ( 2.**15.)-1 ) ) = 0 then output_byte f ( ( n land ( 0xFF lsl 8) ) lsr 8) ;... | null | https://raw.githubusercontent.com/Gadjib/ocamlhomeworks/d5568d4830d4306ea56749f17af355bc35001eff/9%20%D0%BA%D0%BB%D0%B0%D1%81%D1%81/1%20%D1%87%D0%B5%D1%82%D0%B2%D0%B5%D1%80%D1%82%D1%8C/HW%20to%2028-09-2019/p6.ml | ocaml | open Unix;;
let f = open_out_bin "file.txt";;
let to_utf_8 n f = if ( int_of_float ( ( 2.**32.)-1 ) ) ( int_of_float ( ( 2.**7.)-1 ) ) = 0 then output_byte f ( n land 0xFF ) else
( if ( int_of_float ( ( 2.**32.)-1 ) ) ( int_of_float ( ( 2.**15.)-1 ) ) = 0 then output_byte f ( ( n land ( 0xFF lsl 8) ) lsr 8) ;... | |
c133c5dc6b6a9fa61d433491fb75afd0c2d3a00db161170f425b8e3a79336f88 | graninas/Hydra | Wrappers.hs | module Hydra.Testing.Wrappers where
import Test.Hspec (Spec, SpecWith, describe)
fastTest :: SpecWith () -> Spec
fastTest = describe "Fast"
slowTest :: SpecWith () -> Spec
slowTest = describe "Slow"
stableTest :: SpecWith a -> SpecWith a
stableTest = describe "Stable"
unstableTest :: SpecWith a -> SpecWi... | null | https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/lib/hydra-free/test-framework/Hydra/Testing/Wrappers.hs | haskell | module Hydra.Testing.Wrappers where
import Test.Hspec (Spec, SpecWith, describe)
fastTest :: SpecWith () -> Spec
fastTest = describe "Fast"
slowTest :: SpecWith () -> Spec
slowTest = describe "Slow"
stableTest :: SpecWith a -> SpecWith a
stableTest = describe "Stable"
unstableTest :: SpecWith a -> SpecWi... | |
73e6da362243ebf4536b0f61eba8535628587c4a269416f8244041b8b52c9269 | braidchat/braid | core.cljc | (ns braid.group-create.core
(:require
[clojure.string :as string]
[braid.base.api :as base]
[braid.core.common.util :refer [slugify]]
[braid.group-explore.api :as group-explore.api]
#?@(:clj
[[braid.chat.db.group :as group]
[braid.chat.predicates :as p]
[braid.core.server.db :as ... | null | https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/group_create/core.cljc | clojure | need to do a full redirect, because the sign-up flow via gateway.js
doesn't have any of the other assets
:redirect-to (routes/inbox-page-path {:group-id group-id}) | (ns braid.group-create.core
(:require
[clojure.string :as string]
[braid.base.api :as base]
[braid.core.common.util :refer [slugify]]
[braid.group-explore.api :as group-explore.api]
#?@(:clj
[[braid.chat.db.group :as group]
[braid.chat.predicates :as p]
[braid.core.server.db :as ... |
5b99af03eb96307e7897b6a0831469e8a78fffb4110d3c2e0f03651a4a07a9f0 | luminus-framework/examples | doo_runner.cljs | (ns multi-client-ws-immutant.doo-runner
(:require [doo.runner :refer-macros [doo-tests]]
[multi-client-ws-immutant.core-test]))
(doo-tests 'multi-client-ws-immutant.core-test)
| null | https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/multi-client-ws-immutant/test/cljs/multi_client_ws_immutant/doo_runner.cljs | clojure | (ns multi-client-ws-immutant.doo-runner
(:require [doo.runner :refer-macros [doo-tests]]
[multi-client-ws-immutant.core-test]))
(doo-tests 'multi-client-ws-immutant.core-test)
| |
7c845ffdd0507bf133e2eec09733c48a5b6afb56e73a7c4943b233871563440b | ocaml/ocaml | pr7269.ml | (* TEST
* expect
*)
type s = [`A | `B] and sub = [`B];;
type +'a t = T : [< `Conj of 'a & sub | `Other of string] -> 'a t;; (* ok *)
let f (T (`Other msg) : s t) = print_string msg;;
let _ = f (T (`Conj `B) :> s t);; (* warn *)
[%%expect{|
type s = [ `A | `B ]
and sub = [ `B ]
type +'a t = T : [< `Conj of 'a & sub... | null | https://raw.githubusercontent.com/ocaml/ocaml/d71ea3d089ae3c338b8b6e2fb7beb08908076c7a/testsuite/tests/typing-gadts/pr7269.ml | ocaml | TEST
* expect
ok
warn
warn
warn
warn
warn |
type s = [`A | `B] and sub = [`B];;
let f (T (`Other msg) : s t) = print_string msg;;
[%%expect{|
type s = [ `A | `B ]
and sub = [ `B ]
type +'a t = T : [< `Conj of 'a & sub | `Other of string ] -> 'a t
Line 4, characters 6-47:
4 | let f (T (`Other msg) : s t) = print_string msg;;
^^^^^^^^^^^^^^^^^^^^^^^^^^... |
72dae151446e870f930cd07bd7b200a155ce8575d315dcf4703add4e1589eb47 | dpiponi/Moodler | plusequals.hs | do
mInc <- input "+= "
case mInc of
Nothing -> return ()
Just inc -> do
let mX = readMaybe inc
case mX of
Nothing -> return ()
Just x ->
selection >>= mapM_ (\k -> do { v <- getValue k; set k (v+x)})
| null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/plusequals.hs | haskell | do
mInc <- input "+= "
case mInc of
Nothing -> return ()
Just inc -> do
let mX = readMaybe inc
case mX of
Nothing -> return ()
Just x ->
selection >>= mapM_ (\k -> do { v <- getValue k; set k (v+x)})
| |
88d2c9d1eff37beb788559e0ac2395144688cabf1b5169d6a66dd3b88ef97e9e | geophf/1HaskellADay | Solution.hs | {-# LANGUAGE OverloadedStrings #-}
module Y2016.M12.D09.Solution where
import Control.Arrow ((&&&))
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Function (on)
import Data.List (sortBy)
import Data.Maybe (fromJust)
below imports available from 1HaskellADay git repository
import C... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2016/M12/D09/Solution.hs | haskell | # LANGUAGE OverloadedStrings #
}
} |
module Y2016.M12.D09.Solution where
import Control.Arrow ((&&&))
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Function (on)
import Data.List (sortBy)
import Data.Maybe (fromJust)
below imports available from 1HaskellADay git repository
import Control.Logic.Frege (adjoin)
import ... |
c8435ed48da91fad639514dbea7e45b245fab50ba5aa1f809bfa2646b69d51e4 | chenyukang/eopl | 16.scm | (load-relative "../libs/init.scm")
(load-relative "./base/classes/test.scm")
(load-relative "./base/classes/store.scm")
(load-relative "./base/classes/data-structures.scm")
(load-relative "./base/classes/environments.scm")
(load-relative "./base/classes/lang.scm")
(load-relative "./base/classes/interp.scm")
(load-relat... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch9/16.scm | scheme | Extend the interpreter to allow over-loading based on the number
of method parameters.
won't report error when multi method found
for a method name and argument number
find-method-with-args-num with name and args-num
find-method : Sym * Sym -> Method
new cases for CLASSES language
| (load-relative "../libs/init.scm")
(load-relative "./base/classes/test.scm")
(load-relative "./base/classes/store.scm")
(load-relative "./base/classes/data-structures.scm")
(load-relative "./base/classes/environments.scm")
(load-relative "./base/classes/lang.scm")
(load-relative "./base/classes/interp.scm")
(load-relat... |
b931accdea2de800c474f22180190d325194323531e4f74070adaad89258fbf2 | oxidizing/sihl | cache.ml | open Alcotest_lwt
module Make (CacheService : Sihl.Contract.Cache.Sig) = struct
let create_and_read_cache _ () =
let%lwt () = Sihl.Cleaner.clean_all () in
let%lwt () = CacheService.set ("foo", Some "bar") in
let%lwt () = CacheService.set ("fooz", Some "baz") in
let%lwt value = CacheService.find "foo"... | null | https://raw.githubusercontent.com/oxidizing/sihl/c6786f25424c1b9f40ce656e908bd31515f1cd09/sihl-cache/test/cache.ml | ocaml | Make sure setting value that is None to None works as well | open Alcotest_lwt
module Make (CacheService : Sihl.Contract.Cache.Sig) = struct
let create_and_read_cache _ () =
let%lwt () = Sihl.Cleaner.clean_all () in
let%lwt () = CacheService.set ("foo", Some "bar") in
let%lwt () = CacheService.set ("fooz", Some "baz") in
let%lwt value = CacheService.find "foo"... |
9273b653ae4f759f1693f5e89ea9abac87dbd89fe4c751241ffc2eef1a647021 | jacekschae/learn-re-frame-course-files | recipe_page.cljs | (ns app.recipes.views.recipe-page
(:require [re-frame.core :as rf]
[app.router :as router]
[app.components.page-nav :refer [page-nav]]
[app.recipes.views.recipe-info :refer [recipe-info]]
[app.recipes.views.recipe-image :refer [recipe-image]]
[app.recipes.vi... | null | https://raw.githubusercontent.com/jacekschae/learn-re-frame-course-files/a86e6f14b89c595b4389b03459539a9544af4e1d/increments/48-message-card/src/app/recipes/views/recipe_page.cljs | clojure | (ns app.recipes.views.recipe-page
(:require [re-frame.core :as rf]
[app.router :as router]
[app.components.page-nav :refer [page-nav]]
[app.recipes.views.recipe-info :refer [recipe-info]]
[app.recipes.views.recipe-image :refer [recipe-image]]
[app.recipes.vi... | |
30d2cbac0e863fed041cdcab0ef84602369e75dea1297c290da9bfb963def6c1 | fiddlerwoaroof/lisp-sandbox | wordpress-api.lisp | (defpackage :fwoar.lisp-sandbox.wordpress-api
(:use :cl )
(:export ))
(in-package :fwoar.lisp-sandbox.wordpress-api)
(defun needs-encoding-p (char)
(not (digit-char-p char 36)))
(defun encode-char (char)
(format nil "%~2,'0X" (char-code char)))
(defun url-encode (s url _ __)
(declare (ignore _ __))
(map ... | null | https://raw.githubusercontent.com/fiddlerwoaroof/lisp-sandbox/38ff817c95af35db042faf760b477675264220d2/wordpress-api.lisp | lisp | (defpackage :fwoar.lisp-sandbox.wordpress-api
(:use :cl )
(:export ))
(in-package :fwoar.lisp-sandbox.wordpress-api)
(defun needs-encoding-p (char)
(not (digit-char-p char 36)))
(defun encode-char (char)
(format nil "%~2,'0X" (char-code char)))
(defun url-encode (s url _ __)
(declare (ignore _ __))
(map ... | |
6b2de60a9ab51da0df576925fb06ea5d6ccb877c5fe05b31ac018cf91b07c248 | informatimago/lisp | init.lisp | -*- coding : utf-8 -*-
;;;;****************************************************************************
FILE : init.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Initialization for susv3 packages.
;;;;
;;;; This fil... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/susv3/init.lisp | lisp | ****************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Initialization for susv3 packages.
This files remove some specificities from the lisp environment
and add logical pathname translations to help find the ... | -*- coding : utf-8 -*-
FILE : init.lisp
USER - INTERFACE :
( to make it more Common - Lisp ) ,
loads the package COM.INFORMATIMAGO.COMMON - LISP.CESARUM.PACKAGE ,
< PJB > < >
MODIFICATIONS
2004 - 01 - 20 < PJB > Created .
AGPL3
Copyright 2004 - 2016
it ... |
a0325414f7709f7aa38965a6089fcee5bf56d0ecf4c5909abe6d342cef50f298 | graninas/Andromeda | Guid.hs | module Andromeda.Types.Common.Guid where
import qualified Data.ByteString.Char8 as BS
type Guid = BS.ByteString
| null | https://raw.githubusercontent.com/graninas/Andromeda/6b56052bca64fc6f55a28f8001dd775a744b95bf/src/Andromeda/Types/Common/Guid.hs | haskell | module Andromeda.Types.Common.Guid where
import qualified Data.ByteString.Char8 as BS
type Guid = BS.ByteString
| |
91707cedc1b9a9664e42537f3d1c79c0d37ed21c4843edac934e355c6a9bd251 | facebook/duckling | Corpus.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Email.DE.Corpus
( corpus
, negativeCorpus
) where
... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Email/DE/Corpus.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Email.DE.Corpus
( corpus
, negativeCorpus
) where
import Data.String
import Prelude
import qualified Data.Text as Text
import Duckling.Email.Types
import Duckling.Locale
import Duckling.Resolve
import Duckling.Testing.Types
context :: Contex... |
1a866e2821223f592462e1a0eab9a5ccf2b95d7dddd1af6794ae18dc33c98c83 | votinginfoproject/data-processor | state.clj | (ns vip.data-processor.output.v3-0.state
(:require [vip.data-processor.output.xml-helpers :refer :all]
[korma.core :as korma]))
(defn ->xml [{:keys [id
name
election_administration_id]}
early-vote-site-ids]
(let [early-vote-site-nodes (map #(assoc ... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/output/v3_0/state.clj | clojure | (ns vip.data-processor.output.v3-0.state
(:require [vip.data-processor.output.xml-helpers :refer :all]
[korma.core :as korma]))
(defn ->xml [{:keys [id
name
election_administration_id]}
early-vote-site-ids]
(let [early-vote-site-nodes (map #(assoc ... | |
f7ff414bd1ff4cba8f930d90ef7db8be9481bd735e0fb361df45f5920de6c0fa | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Ordinal.UK.Rules
( rules ) wher... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ordinal/UK/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Ordinal.UK.Rules
( rules ) where
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
import Control.Monad (join)
import Data.Text (Text)
import qualified Data.Text as Text
import Prelude
import Data.String
import ... |
b15ee3163d9f36130122e99629a9f8f08fa3dd610c4e8467d96024846d42f72d | rtrusso/scp | needc.scm | ;; needc.scm
;;
;; pre-compiler tool for the (need foo/bar/baz) special-form.
;;
;; Supports (need x/y/z) syntax, and read-file-into-list-at-compile-time.
(define *needc-version* "generated by needc 02-10-2019 0.2")
(define *modules* '())
(define *root* "./")
(define *flat-module-names* #f)
(define *windows-... | null | https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/needc.scm | scheme | needc.scm
pre-compiler tool for the (need foo/bar/baz) special-form.
Supports (need x/y/z) syntax, and read-file-into-list-at-compile-time.
(display "newer? ")
(display file-name)
(display " ")
(display (fs-newer? fs *output-fs*))
(newline)
Generate script mode
Generate makefile mode
for ea... |
(define *needc-version* "generated by needc 02-10-2019 0.2")
(define *modules* '())
(define *root* "./")
(define *flat-module-names* #f)
(define *windows-mode* #f)
(define *expand-mode* #f)
(define *dir-sep* "/")
(define *output-fs* #f)
(define *output-modified* #f)
(define (read-fs file)
(let ((s (st... |
d6fde309f20c5c0a083e55d8c915dabe75313bace7fe3aca5152ba96cc1b92d5 | BillHallahan/G2 | M04.hs | {-@ LIQUID "--no-termination" @-}
module M04 (main) where
@ main : : Int - > { b : | b } @
main :: Int -> Bool
main y = case while (-50, y) of
(x', y') -> y' > 0
@ while : : t : { t : ( Int , Int ) | fst t < 0 || snd t > 0 }
- > ( Int , { y : Int | y > 0 } ) @
-> (Int, { y : In... | null | https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/CompareVerified/M04.hs | haskell | @ LIQUID "--no-termination" @ |
module M04 (main) where
@ main : : Int - > { b : | b } @
main :: Int -> Bool
main y = case while (-50, y) of
(x', y') -> y' > 0
@ while : : t : { t : ( Int , Int ) | fst t < 0 || snd t > 0 }
- > ( Int , { y : Int | y > 0 } ) @
-> (Int, { y : Int | y > 0 }) @-}
while :: (Int, In... |
8a66f44b88e2b05bdd3c592102be653414f03145b6332c6994d23425967d9f34 | chunsj/TH | dlfs06.lisp | (defpackage :dlfs-06
(:use #:common-lisp
#:mu
#:th
#:th.db.mnist))
(in-package :dlfs-06)
;; mnist data loading - takes time, so load and set
(defparameter *mnist* (read-mnist-data))
(prn *mnist*)
(defparameter *mnist-train-image-batches*
(loop :for i :from 0 :below 6
:for rng = (l... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/books/dlfs/dlfs06.lisp | lisp | mnist data loading - takes time, so load and set
network parameters
write to file
read from file
code test
relu model comparison
dropout
without weight regularization
test result
without batch normalization
test result
batch normalization - does not converge
test result | (defpackage :dlfs-06
(:use #:common-lisp
#:mu
#:th
#:th.db.mnist))
(in-package :dlfs-06)
(defparameter *mnist* (read-mnist-data))
(prn *mnist*)
(defparameter *mnist-train-image-batches*
(loop :for i :from 0 :below 6
:for rng = (loop :for k :from (* i 10000) :below (* (1+ i) 10000)... |
1cbc34f60a575c3e8d76a3d65c582ae5382624f5a61d19e76d36c6546f1c9bd1 | quephird/dodonpascii | cleanup.clj | (ns dodonpascii.cleanup
"This module is responsible for removing expired or offscreen objects from the board."
(:require [quil.core :as q :include-macros true]
[quil.middleware :as w]
:reload-all))
(defn clear-bonus-points [{:keys [current-time bonus-points] :as state}]
(let [new-bonus-po... | null | https://raw.githubusercontent.com/quephird/dodonpascii/5a04c41d0f4a5b78118572a1a64e4e8a4be98bb3/src/dodonpascii/cleanup.clj | clojure | (ns dodonpascii.cleanup
"This module is responsible for removing expired or offscreen objects from the board."
(:require [quil.core :as q :include-macros true]
[quil.middleware :as w]
:reload-all))
(defn clear-bonus-points [{:keys [current-time bonus-points] :as state}]
(let [new-bonus-po... | |
daa3e47de4ce0262d092748d5d26d31b381262c7213e82c70aa6f0ef999a02a6 | esl/MongooseIM | mongoose_graphql_stats_global.erl | -module(mongoose_graphql_stats_global).
-behaviour(mongoose_graphql).
-export([execute/4]).
-import(mongoose_graphql_helper, [make_error/2]).
-ignore_xref([execute/4]).
-include("../mongoose_graphql_types.hrl").
-include("mongoose.hrl").
-include("jlib.hrl").
execute(_Ctx, globalStats, <<"uptimeSeconds">>, _Args) ... | null | https://raw.githubusercontent.com/esl/MongooseIM/5bdda437a5b2129c2a456206731e7c5d2daff4c9/src/graphql/admin/mongoose_graphql_stats_global.erl | erlang | -module(mongoose_graphql_stats_global).
-behaviour(mongoose_graphql).
-export([execute/4]).
-import(mongoose_graphql_helper, [make_error/2]).
-ignore_xref([execute/4]).
-include("../mongoose_graphql_types.hrl").
-include("mongoose.hrl").
-include("jlib.hrl").
execute(_Ctx, globalStats, <<"uptimeSeconds">>, _Args) ... | |
86c35071f6163818610bfb502fb9d41e1b5dfb7d57497b65ddd33e62af210009 | patricoferris/meio | help.ml | open Nottui
module W = Nottui_widgets
let key_help c msg =
W.fmt ~attr:Notty.A.(bg (rgb ~r:4 ~g:2 ~b:0)) "[%c] %s" c msg
let footer =
[
key_help 'h' "help";
Ui.space 5 0;
key_help 'm' "main page";
Ui.space 5 0;
key_help 'g' "GC latencies";
]
let help : ui =
Ui.hcat
[
W.string
... | null | https://raw.githubusercontent.com/patricoferris/meio/e9094ba0b91323f0a1eb161f1a084f8350273920/src/lib/help.ml | ocaml | open Nottui
module W = Nottui_widgets
let key_help c msg =
W.fmt ~attr:Notty.A.(bg (rgb ~r:4 ~g:2 ~b:0)) "[%c] %s" c msg
let footer =
[
key_help 'h' "help";
Ui.space 5 0;
key_help 'm' "main page";
Ui.space 5 0;
key_help 'g' "GC latencies";
]
let help : ui =
Ui.hcat
[
W.string
... | |
527fae094d87a256a0d08c6682991593a1e274396ee3932765ab629f392e264c | asmala/clj-simple-form | project.clj | (defproject clj-simple-form/clj-simple-form-core "0.1.4"
:description "Library for generating form elements."
:url "-simple-form"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[com.taoensso/tower "0.12.3"]
[org.clojure/clojure "1.3.0"]])
| null | https://raw.githubusercontent.com/asmala/clj-simple-form/b1c566b1f0fe532639b15832b557f1608598a0a2/clj-simple-form-core/project.clj | clojure | (defproject clj-simple-form/clj-simple-form-core "0.1.4"
:description "Library for generating form elements."
:url "-simple-form"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[com.taoensso/tower "0.12.3"]
[org.clojure/clojure "1.3.0"]])
| |
8dbefa23cff85f613cf9cbf55f037a1a2d8e02f75a44be8304f70144e98c932a | c-cube/ocaml-containers | CCHashTrie.mli | (* This file is free software, part of containers. See file "license" for more details. *)
* Hash Tries
Trie indexed by the hash of the keys , where the branching factor is fixed .
The goal is to have a quite efficient functional structure with fast
update and access { b if } the hash function is go... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/data/CCHashTrie.mli | ocaml | This file is free software, part of containers. See file "license" for more details.
* Identifiers for transient modifications. A transient modification
is uniquely identified by a [Transient.t]. Once [Transient.freeze r]
is called, [r] cannot be used to modify the structure again.
* Create a new, active... |
* Hash Tries
Trie indexed by the hash of the keys , where the branching factor is fixed .
The goal is to have a quite efficient functional structure with fast
update and access { b if } the hash function is good .
The trie is not binary , to improve cache locality and decrease depth .
P... |
a7c99620dad1c60cdddb23067bf71cc819fca755342b7ef6f85c1d7138129588 | mmontone/gestalt | test.lisp | (in-package :dataflow.test)
(def-suite df-tests
:description "Dataflow tests")
(defun run-tests ()
(run 'df-tests))
(in-suite df-tests)
; dataflow basic elements
(test value-cell-test
;; the value-cell requires a value
(signals error
(make-instance 'value-cell))
;; notifies its dependents
(let... | null | https://raw.githubusercontent.com/mmontone/gestalt/fd019c0ca03b4efc73b9ddd3db1e3ed211233428/deps/dataflow/test.lisp | lisp | dataflow basic elements
the value-cell requires a value
notifies its dependents
notifies its dependents once only, if the same value is set
the formula shouldn't have been updated since the binding
should have been gone with the gc (the binding to the intermediate
now, if we use mk-lambda, then we should have no... | (in-package :dataflow.test)
(def-suite df-tests
:description "Dataflow tests")
(defun run-tests ()
(run 'df-tests))
(in-suite df-tests)
(test value-cell-test
(signals error
(make-instance 'value-cell))
(let ((v (make-instance 'value-cell :value 32)))
(is (equalp (value v) 32))
(let (set-va... |
07aab898430db09004cba95cd76ef04b797019204a55c4ce63c7da9a94676482 | armedbear/abcl | compat.lisp | (in-package :jss)
(defparameter *cl-user-compatibility* nil
"Whether backwards compatibility with JSS's use of CL-USER has been enabled.")
(defun ensure-compatibility ()
"Ensure backwards compatibility with JSS's use of CL-USER."
(require 'abcl-asdf)
(loop :for symbol :in '("add-directory-jars-to-class-path"
... | null | https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/contrib/jss/compat.lisp | lisp | Because we're the last file in the ASDF system at the moment | (in-package :jss)
(defparameter *cl-user-compatibility* nil
"Whether backwards compatibility with JSS's use of CL-USER has been enabled.")
(defun ensure-compatibility ()
"Ensure backwards compatibility with JSS's use of CL-USER."
(require 'abcl-asdf)
(loop :for symbol :in '("add-directory-jars-to-class-path"
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.