_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 |
|---|---|---|---|---|---|---|---|---|
4d01bb14d10c1f0d299fbaa11ac21526bd06baa8c8ceef23f610befd50e09abe | xapi-project/xen-api | network_cli.ml | (* Network CLI *)
open Network_interface
module Cmds = Interface_API (Cmdlinergen.Gen ())
let doc =
String.concat ""
[
"A CLI for the network API. This allows scripting of the xcp-networkd "
; "daemon for testing and debugging. This tool is not intended to be used "
; "as an end user tool"
]
... | null | https://raw.githubusercontent.com/xapi-project/xen-api/8d17b53bc236e23aa1ec455137773f7367665d83/ocaml/xapi-idl/network/network_cli.ml | ocaml | Network CLI |
open Network_interface
module Cmds = Interface_API (Cmdlinergen.Gen ())
let doc =
String.concat ""
[
"A CLI for the network API. This allows scripting of the xcp-networkd "
; "daemon for testing and debugging. This tool is not intended to be used "
; "as an end user tool"
]
let cmdline_gen (... |
ae2a2bac6b76d046f4c66474ca62d9b65b35f03276be0ed3754780b7a9122de8 | tazjin/democrify | WebAPI.hs | | Very " to - the - point " bindings to the Spotify Web API
-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module WebAPI (identifyTrack) where
--import Acid
import Acid
import Control.Applicative (pure, (<$>), (<*>))
import Co... | null | https://raw.githubusercontent.com/tazjin/democrify/44d839428f881dff488d2e152ddb828dfd308dde/Democrify/WebAPI.hs | haskell | # LANGUAGE OverloadedStrings #
import Acid
|Spotify API URL to track metadata (in JSON)
^ Track ID | | Very " to - the - point " bindings to the Spotify Web API
-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
module WebAPI (identifyTrack) where
import Acid
import Control.Applicative (pure, (<$>), (<*>))
import Control.Exception
import Data.Aeson
import ... |
dc2abaa96680fea6810f347e939d372f43720fe5e0ed677da1ab31a72b1b07aa | haskell-tls/hs-certificate | Internal.hs | -- |
-- Module : Data.X509.Internal
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : unknown
--
module Data.X509.Internal
( module Data.ASN1.Parse
, asn1Container
, OID
-- * error handling
, ErrT
, runErrT
) where
import Data.ASN1.Types
... | null | https://raw.githubusercontent.com/haskell-tls/hs-certificate/ed8af1e0faeb1332f15a02f02c7f4acfee76bc0e/x509/Data/X509/Internal.hs | haskell | |
Module : Data.X509.Internal
License : BSD-style
Stability : experimental
Portability : unknown
* error handling | Maintainer : < >
module Data.X509.Internal
( module Data.ASN1.Parse
, asn1Container
, OID
, ErrT
, runErrT
) where
import Data.ASN1.Types
import Data.ASN1.Parse
import Control.Monad.Trans.Except
runErrT :: ExceptT e m a -> m (Either e a)
runErrT = runExceptT
type ErrT = ExceptT
| cre... |
57ffc023daa60dc8a7607a208b84587145e252bcebf8fa2e408e9b755a6ee65e | jrm-code-project/LISP-Machine | fread.lisp | -*- Mode : LISP ; Package : LAMBDA ; Lowercase : T ; Base:8 ; : ZL -*-
(defun read-ucode (input-filename)
(setq input-filename (fs:merge-pathnames input-filename "FOO.LISP#>"))
(with-open-stream (input-stream
(file-retry-new-pathname (input-filename fs:file-error)
(se... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/ulambda/fread.lisp | lisp | Package : LAMBDA ; Lowercase : T ; Base:8 ; : ZL -*-
Fast, simple reader for reading in ucode
Allow font markers in microcode ~jrm
initialize to self
numbers
#/' #/_ #/#)) ;breaks
white-space
predicate true if not symbol constit.
dot
can be symbol const
error check
legit dots read at read-list
underline (old ... |
(defun read-ucode (input-filename)
(setq input-filename (fs:merge-pathnames input-filename "FOO.LISP#>"))
(with-open-stream (input-stream
(file-retry-new-pathname (input-filename fs:file-error)
(send input-filename ':open-canonical-default-type ':LISP)))
(setq in... |
bba33637a0d01f86b862a0f14c57fbb247cf3e0f00833e2b58b3bd03b54c4eb1 | metabase/metabase | validate_temporal_bucketing.clj | (ns metabase.query-processor.middleware.validate-temporal-bucketing
(:require
[clojure.set :as set]
[metabase.mbql.util :as mbql.u]
[metabase.query-processor.error-type :as qp.error-type]
[metabase.query-processor.store :as qp.store]
[metabase.util.i18n :refer [tru]]))
(def ^:private valid-date-units
... | null | https://raw.githubusercontent.com/metabase/metabase/1f809593c2298ccf9c4070df3fa39d718eddb5d6/src/metabase/query_processor/middleware/validate_temporal_bucketing.clj | clojure | (ns metabase.query-processor.middleware.validate-temporal-bucketing
(:require
[clojure.set :as set]
[metabase.mbql.util :as mbql.u]
[metabase.query-processor.error-type :as qp.error-type]
[metabase.query-processor.store :as qp.store]
[metabase.util.i18n :refer [tru]]))
(def ^:private valid-date-units
... | |
8940bf4db87bd4f544bcb702b2c15a320fcab8ebd6de71aa9e19ac823f523500 | bblimke/clj-pusher | md5.clj | (ns uk.co.holygoat.util.md5
(:refer-clojure)
(:import (java.security
NoSuchAlgorithmException
MessageDigest)
(java.math BigInteger)))
;; Supposedly efficient padding routine.
(defmacro pad [pad-to pad-char #^String s]
`(let [ss# ~s
len# (int (.length ss#))
dif... | null | https://raw.githubusercontent.com/bblimke/clj-pusher/e81e7e6a4fa26d0ae989de51427428776003ba21/src/uk/co/holygoat/util/md5.clj | clojure | Supposedly efficient padding routine.
Needs padding.
Either 0 (happy) or not (oh dear). In the failure case there's
nothing we can do...
String md5 = DigestUtils.md5Hex(str); | (ns uk.co.holygoat.util.md5
(:refer-clojure)
(:import (java.security
NoSuchAlgorithmException
MessageDigest)
(java.math BigInteger)))
(defmacro pad [pad-to pad-char #^String s]
`(let [ss# ~s
len# (int (.length ss#))
diff# (int (- len# ~pad-to))
#^Stri... |
8220c9573ada685e705d38de2a268afdd9bf2927c621e3177e05053475ba5fa3 | MarkCurtiss/sicp | 4_11_to_4_15.scm | (load "4_1_to_4_10.scm")
4.11
; ========================================================================
(define (make-frame variables values)
(map (lambda (var val) (cons var val)) variables values))
(define (frame-variables frame)
(map car frame))
(define (frame-values frame)
(map cdr frame))
(define (add-b... | null | https://raw.githubusercontent.com/MarkCurtiss/sicp/8b55a3371458014c815ba8792218b6440127ab40/chapter_4_exercises/4_11_to_4_15.scm | scheme | ========================================================================
========================================================================
========================================================================
I'm choosing to remove the bindings from all environments at once.
It is a rude implementation c... | (load "4_1_to_4_10.scm")
4.11
(define (make-frame variables values)
(map (lambda (var val) (cons var val)) variables values))
(define (frame-variables frame)
(map car frame))
(define (frame-values frame)
(map cdr frame))
(define (add-binding-to-frame! var val frame)
(append! frame (list (cons var val))))
... |
2f91d2b2bf6d0da5634d47b2180f831d7d74620af00b6c1ad0c6e78b75cdf582 | binghe/fm-plugin-tools | specials.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : PREPARE - FM - PLUGIN - TOOLS ; Base : 10 -*-
$ Header : /usr / local / cvsrep / fm - plugin - tools / prepare - fm - plugin - tools / specials.lisp , v 1.10 2010/07/22 09:38:10 edi Exp $
Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved .
;;; Redis... | null | https://raw.githubusercontent.com/binghe/fm-plugin-tools/7234ca4a0d6a5ab0f5fd22a69b4ecdd798f8a283/prepare-fm-plugin-tools/specials.lisp | lisp | Syntax : COMMON - LISP ; Package : PREPARE - FM - PLUGIN - TOOLS ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list o... | $ Header : /usr / local / cvsrep / fm - plugin - tools / prepare - fm - plugin - tools / specials.lisp , v 1.10 2010/07/22 09:38:10 edi Exp $
Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED A... |
2acd546e742acee9a4c8e901801ab113419c6bd6ae65de91bbdc8a8579acc8bf | CloudI/CloudI | pdict_fsm.erl | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
%%% -------------------------------------------------------------------
Copyright 2010 - 2014 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it a... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/proper/test/pdict_fsm.erl | erlang | -------------------------------------------------------------------
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITN... | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
Copyright 2010 - 2014 < > ,
< >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the Licens... |
df73087bbfc250e5c8a05a0688910004f9fc694f81624b3cc46f1eab8c851423 | exercism/common-lisp | example.lisp | (cl:defpackage :leap
(:use :common-lisp)
(:export :leap-year-p))
(in-package :leap)
(defun divisible-by-p (n d) (= 0 (rem n d)))
(defun leap-year-p (year)
(and (divisible-by-p year 4)
(or (not (divisible-by-p year 100))
(divisible-by-p year 400))))
| null | https://raw.githubusercontent.com/exercism/common-lisp/0bb38d1b126f7dc90d86f04c41479d4eaf35df74/exercises/practice/leap/.meta/example.lisp | lisp | (cl:defpackage :leap
(:use :common-lisp)
(:export :leap-year-p))
(in-package :leap)
(defun divisible-by-p (n d) (= 0 (rem n d)))
(defun leap-year-p (year)
(and (divisible-by-p year 4)
(or (not (divisible-by-p year 100))
(divisible-by-p year 400))))
| |
47c03301af73d7998b3f4e944236311409108de6312102fe58e1dc944cf991ef | aartaka/nx-dark-reader | package.lisp | package.lisp
(nyxt:define-package #:nx-dark-reader
(:nicknames #:nxdr)
(:use #:cl #:nyxt))
| null | https://raw.githubusercontent.com/aartaka/nx-dark-reader/fd3db311234b36c46b85a450e78e5fc0377c4b8d/package.lisp | lisp | package.lisp
(nyxt:define-package #:nx-dark-reader
(:nicknames #:nxdr)
(:use #:cl #:nyxt))
| |
5b2fb6af467921e95cdf14565c3075a75bfa852a70bca780a04463917382093e | ddmcdonald/sparser | us-states.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1994 - 1996,2011,2020 - 2022 -- all rights reserved
;;;
File : " U.S. States "
Module : " : places : "
version : April 2022
initiated 3/10/94 v2.3
0.1 ( 4/23 ) added provision for name - words . 10/6 added strin... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/62dc664f92b270922892f072d02b440265e594e1/Sparser/code/s/grammar/model/core/places/us-states.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
--------
object
--------
----------
def form
----------
we only need this because we're using a different syntactic category
for the adjectival form than the noun, and because we're including
a provision for aliases
(make-name-word-for/silent state-word) | copyright ( c ) 1994 - 1996,2011,2020 - 2022 -- all rights reserved
File : " U.S. States "
Module : " : places : "
version : April 2022
initiated 3/10/94 v2.3
0.1 ( 4/23 ) added provision for name - words . 10/6 added string - for fn
( 5/3/95 ) added sort function . 1/16/96 fix... |
c35e24912d857bab31f0c467655d6c8814264a689e81c13a87b1f42272e4eac9 | austral/austral | CombiningPass.mli |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... | null | https://raw.githubusercontent.com/austral/austral/69b6f7de36cc9576483acd1ac4a31bf52074dbd1/lib/CombiningPass.mli | ocaml | * The combining pass takes the concrete representation of module interfaces
and module bodies, and combines them into a single object for simplicity.
* Given an interface declaration, and a body declaration, return the combined
declaration if they're the same, and fail otherwise.
* Combine a concrete module i... |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... |
955781b78f03238406e0edd4205368996b3bb3c737d25c5333f3b77d2fcc499b | JoeKennedy/fantasy | StaticFiles.hs | module Settings.StaticFiles where
import Settings (appStaticDir, compileTimeAppSettings)
import Yesod.Static (staticFiles)
-- This generates easy references to files in the static directory at compile time,
-- giving you compile-time verification that referenced files exist.
-- Warning: any files added to your st... | null | https://raw.githubusercontent.com/JoeKennedy/fantasy/eb9dc9bf6074be5c5ca951e323c6497676424dda/Settings/StaticFiles.hs | haskell | This generates easy references to files in the static directory at compile time,
giving you compile-time verification that referenced files exist.
Warning: any files added to your static directory during run-time can't be
For example, to refer to @static/js/script.js@ via an identifier, you'd use:
If the identi... | module Settings.StaticFiles where
import Settings (appStaticDir, compileTimeAppSettings)
import Yesod.Static (staticFiles)
accessed this way . You 'll have to use their FilePath or URL to access them .
js_script_js
StaticFile [ " js " , " script.js " ] [ ]
staticFiles (appStaticDir compileTimeAppSe... |
b8ce74826377ffdc0692bafdba8359d12dfdf5079c15566d3351f5e48cfe89a1 | cicakhq/potato | common-string-tests.lisp | (in-package :potato-tests)
(declaim (optimize (speed 0) (safety 3) (debug 3)))
(define-test ensure-printable-string-test ()
(let ((foo "abc"))
(assert-eq foo (ensure-printable-string foo)))
(loop
for i from 0 to #x1f
for ch = (code-char i)
if (not (or (eql ch #\Newline)
(eql ch... | null | https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/tests/common-string-tests.lisp | lisp | (in-package :potato-tests)
(declaim (optimize (speed 0) (safety 3) (debug 3)))
(define-test ensure-printable-string-test ()
(let ((foo "abc"))
(assert-eq foo (ensure-printable-string foo)))
(loop
for i from 0 to #x1f
for ch = (code-char i)
if (not (or (eql ch #\Newline)
(eql ch... | |
f41f8b90893d234fc0054af1c4207a6994fe7f942f39eb0dcba4432f1fd7d6b4 | nicksanford/htorrent | Server.hs | {-# LANGUAGE OverloadedStrings #-}
module Server (start) where
import Control.Concurrent (forkFinally)
import Control.Concurrent.Chan as Chan
import qualified Control.Exception as E
import Control.Monad (forever, void, when)
import qualified Data.ByteString ... | null | https://raw.githubusercontent.com/nicksanford/htorrent/1a6ae2108ef5c83adf5a69c1559b375bf190f67d/src/Server.hs | haskell | # LANGUAGE OverloadedStrings #
Solves issue withNetwork.Socket.bind: resource busy (Address already in use) | module Server (start) where
import Control.Concurrent (forkFinally)
import Control.Concurrent.Chan as Chan
import qualified Control.Exception as E
import Control.Monad (forever, void, when)
import qualified Data.ByteString as BS
import qualified Data... |
7de7b2bad0eee08731ea15248527cacaee3566f288593ad01c3ad0f0560f022f | janegca/htdp2e | Exercise-233-SortLoIRByProfit.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname Exercise-233-SortLoIRByProfit) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack"... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/03-Abstractions/Exercise-233-SortLoIRByProfit.rkt | racket | about the language level of this file in a form that our tools can easily process.
An inventory record specifies the name of an item, a description, the
acquisition price, and the recommended sales price.
Define a function that sorts a list of inventory records by the difference
An IR is a (make-ir String Stri... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname Exercise-233-SortLoIRByProfit) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor r... |
919b33003649ca182dcd3153ccdfd5e94ddc635007454d9a67ea8ca202f106f9 | ska80/thinlisp | c-state.lisp | (in-package "TLI")
;;;; Module C-STATE
Copyright ( c ) 1999 - 2001 The ThinLisp Group
Copyright ( c ) 1995 Gensym Corporation .
;;; All rights reserved.
This file is part of ThinLisp .
ThinLisp is open source ; you can redistribute it and/or modify it
under the terms of the ThinLisp License as published b... | null | https://raw.githubusercontent.com/ska80/thinlisp/173573a723256d901887f1cbc26d5403025879ca/tlt/lisp/c-state.lisp | lisp | Module C-STATE
All rights reserved.
you can redistribute it and/or modify it
either version 1 or ( at your option ) any later version .
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C Statements
This module contains structures and functions neede... | (in-package "TLI")
Copyright ( c ) 1999 - 2001 The ThinLisp Group
Copyright ( c ) 1995 Gensym Corporation .
This file is part of ThinLisp .
under the terms of the ThinLisp License as published by the ThinLisp
ThinLisp is distributed in the hope that it will be useful , but
For additional information s... |
8f75eb098cb44fb4330e6f9d882102b5ba529b59d506be1f047159b65b926221 | jolby/arrayspace | domain.clj | (ns arrayspace.domain
(:require
[clojure.tools.macro :as macro]
[arrayspace.protocols :refer [Domain DomainMap shape rank]]
[arrayspace.core :refer [make-domain make-domain-map]]))
(defn valid-coords? [coords shape]
(and (= (count coords) (count shape))
(every? (fn [[k v]] (and (>= k 0) (< k v)))
... | null | https://raw.githubusercontent.com/jolby/arrayspace/400d32d486c544b6cc9a1b1e84be7062af7d7f97/src/arrayspace/domain.clj | clojure | (ns arrayspace.domain
(:require
[clojure.tools.macro :as macro]
[arrayspace.protocols :refer [Domain DomainMap shape rank]]
[arrayspace.core :refer [make-domain make-domain-map]]))
(defn valid-coords? [coords shape]
(and (= (count coords) (count shape))
(every? (fn [[k v]] (and (>= k 0) (< k v)))
... | |
1555d1911313002c6195f94ae6c98ef605b6a2e160a81d37a40aa5b41c2d3995 | jakemcc/sicp-study | ex2_40.clj | ; Exercise 2.40
(use 'clojure.test)
(defn accumulate [op initial sq]
(if (empty? sq)
initial
(op (first sq)
(accumulate op initial (rest sq)))))
(defn enumerate-interval [low high]
(loop [cur high
res nil]
(if (< cur low)
res
(recur (dec cur) (cons cur res)))))
... | null | https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section2.2/ex2_40.clj | clojure | Exercise 2.40
}}}
|
(use 'clojure.test)
(defn accumulate [op initial sq]
(if (empty? sq)
initial
(op (first sq)
(accumulate op initial (rest sq)))))
(defn enumerate-interval [low high]
(loop [cur high
res nil]
(if (< cur low)
res
(recur (dec cur) (cons cur res)))))
(deftest test-... |
19f05ad07a3442375c8214fdc2b1547a4bcce92941a0871a7a257cc3dd220977 | imteekay/functional-programming-learning-path | boolean.clj | ;; Ask if the value is nil
(nil? nil)
(nil? 1)
(nil? true)
(nil? false)
(nil? "hello")
;; nil and false as logical falsiness
(if nil
(println "not going to print")
(println "going to print"))
(if false
(println "not going to print")
(println "going to print"))
the rest of the values as
(if "the truthy"
... | null | https://raw.githubusercontent.com/imteekay/functional-programming-learning-path/07dac09c9fabfa54f8b4d80b62f43b092cb87b0d/clojure/basics/boolean.clj | clojure | Ask if the value is nil
nil and false as logical falsiness
equality operator: =
boolean operators: "or" and "and" | (nil? nil)
(nil? 1)
(nil? true)
(nil? false)
(nil? "hello")
(if nil
(println "not going to print")
(println "going to print"))
(if false
(println "not going to print")
(println "going to print"))
the rest of the values as
(if "the truthy"
(println "going to print")
(println "not going to print"))
(if... |
0daac63707a2d3a4a44439e66ef3629a4999ed0bd7bd76fda5120f3057f870af | boris-ci/boris | Builds.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - name - shadowing #
module Boris.Http.Template.Page.Builds where
import qualified Projector.Html.Runtime
import Boris.Http.Template.Data.Build.Data
import Boris.Http.Template.Data.... | null | https://raw.githubusercontent.com/boris-ci/boris/c321187490afc889bf281442ac4ef9398b77b200/boris-http/gen/Boris/Http/Template/Page/Builds.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - name - shadowing #
module Boris.Http.Template.Page.Builds where
import qualified Projector.Html.Runtime
import Boris.Http.Template.Data.Build.Data
import Boris.Http.Template.Data.Commit.Data
import Boris.Http.Templ... |
a08a2f331c2c2481f613af3b357067ae56152b2bd81e6e028baaa33962f5fe4a | juliannagele/ebso | evm_state.ml | Copyright 2019 and under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed under ... | null | https://raw.githubusercontent.com/juliannagele/ebso/8e516036fcb98074b6be14fc81ae020f76977712/lib/evm_state.ml | ocaml | effect of instruction is on state st after j steps
we only demand equivalence at kt
intially source and target states equal
initally source and target gas are equal
after the programs have run source and target states equal | Copyright 2019 and under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed under ... |
998d46cf218d753823f3d200c9a34f02741faf85a920f858d09b513223d71cc1 | armedbear/abcl | map1.lisp | ;;; map1.lisp
;;;
Copyright ( C ) 2003 - 2005
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
;;;... | null | https://raw.githubusercontent.com/armedbear/abcl/0631ea551523bb93c06263e772fbe849008e2f68/src/org/armedbear/lisp/map1.lisp | lisp | map1.lisp
This program is free software; you can redistribute it and/or
either version 2
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 Public License for m... | Copyright ( C ) 2003 - 2005
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
... |
f91246292dcc3d773530ce3c3f3b14019b6375e288b0c348f9e80bbdfcf8e5da | dxtr/clsql | test-basic.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
Name :
Purpose : Tests for clsql string - based queries and result types
Author :
Created : Mar 2002
;;;;
This file , part of... | null | https://raw.githubusercontent.com/dxtr/clsql/8061aae1ecb878954115c7aacd90685a65bf4107/tests/test-basic.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
(), also known as the LLGPL.
*************************************************************************
Testing functions | Name :
Purpose : Tests for clsql string - based queries and result types
Author :
Created : Mar 2002
This file , part of CLSQL , is Copyright ( c ) 2002 - 2010 by
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public Lice... |
fd00d4af2e83d16fbf20e9aad41a749bd5b9c8a122308be5807f1cfc8fd54b94 | refuge/cowdb | cowdb_updater.erl | %%-*- mode: erlang -*-
%%
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
@private
-module(cowdb_updater).
%% PUBLIC API
-export([start_link/3]).
-export([close/1]).
-export([transact/3]... | null | https://raw.githubusercontent.com/refuge/cowdb/40d72119a59407c7dddc140443b518a90338e347/src/cowdb_updater.erl | erlang | -*- mode: erlang -*-
PUBLIC API
proc lib export
compaction util export
@doc get latest db state.
@doc send a transaction and wait for its result.
a compaction happened, old writer and reader are exiting.
send the reply to the client
check if we need to compact, if true it will trigger a
background_compact me... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
@private
-module(cowdb_updater).
-export([start_link/3]).
-export([close/1]).
-export([transact/3]).
-export([compact/2, cancel_compact/1]).
... |
c96bf3bdb0f2feff9bf557f3a8468b8514d59e5d3d8a1b4436adc02fe3843cd3 | cryptosense/pkcs11 | pkcs11_CK_ATTRIBUTE_TYPE.mli | (** Attribute types ([CK_ATTRIBUTE_TYPE]) *)
type t = P11_ulong.t [@@deriving eq, ord]
val _CKA_CLASS : t
val _CKA_TOKEN : t
val _CKA_PRIVATE : t
val _CKA_LABEL : t
val _CKA_APPLICATION : t
val _CKA_VALUE : t
val _CKA_OBJECT_ID : t
val _CKA_CERTIFICATE_TYPE : t
val _CKA_ISSUER : t
val _CKA_SERIAL_NUMBER : t
... | null | https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/driver/pkcs11_CK_ATTRIBUTE_TYPE.mli | ocaml | * Attribute types ([CK_ATTRIBUTE_TYPE]) |
type t = P11_ulong.t [@@deriving eq, ord]
val _CKA_CLASS : t
val _CKA_TOKEN : t
val _CKA_PRIVATE : t
val _CKA_LABEL : t
val _CKA_APPLICATION : t
val _CKA_VALUE : t
val _CKA_OBJECT_ID : t
val _CKA_CERTIFICATE_TYPE : t
val _CKA_ISSUER : t
val _CKA_SERIAL_NUMBER : t
val _CKA_AC_ISSUER : t
val _CKA_OWNER : t
... |
8f3509375ce31d87801610e036baac2d3e25610ce588317fe07a2b7630ff0462 | rmloveland/scheme48-0.53 | stack.scm | ; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; The stack grows from higher addresses to lower ones.
* STACK - BEGIN * and * STACK - END * delimit the stack portion of memory .
; *STACK* points to the next unused cell on top of the stack.
; *ST... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/vm/stack.scm | scheme | -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
The stack grows from higher addresses to lower ones.
*STACK* points to the next unused cell on top of the stack.
*STACK-LIMIT* is value against which stack requests are checked. There is a
buffer area between the limit and the actual end of the stack. The ... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
* STACK - BEGIN * and * STACK - END * delimit the stack portion of memory .
(define stack-warning-limit 30)
(define stack-marker #xf0f0f0f)
(define stack-slack
(+ default-stack-space
exceptions need at most 14 values
interrupts need at most 7 ... |
4708b6348b601f11deac47e1e10ec0447c7de6f82a249da8d5b8a13a8b2ac1d2 | mirage/mirage | mirage_impl_mclock.mli | type mclock
val mclock : mclock Functoria.typ
val default_monotonic_clock : mclock Functoria.impl
| null | https://raw.githubusercontent.com/mirage/mirage/479e40ae6aa1efe18fb1cd199cec0d5ee1f46f26/lib/mirage/impl/mirage_impl_mclock.mli | ocaml | type mclock
val mclock : mclock Functoria.typ
val default_monotonic_clock : mclock Functoria.impl
| |
2613f7bde740dbf589bdbfb1211c78693cb342689f59313f2a8b91188220098a | luismbo/galton | run.lisp | (in-package :galton)
(defun cleanup-whitespace (string)
(if (stringp string)
(ppcre:regex-replace-all "\\s+" string " ")
string))
(defun maptree (function tree)
(if (atom tree)
(funcall function tree)
(mapcar (curry #'maptree function) tree)))
(defclass logging-acceptor (restas-acceptor)
... | null | https://raw.githubusercontent.com/luismbo/galton/240857deb1d931a87cc8e7686741dd0210c5ee03/run.lisp | lisp | ew... | (in-package :galton)
(defun cleanup-whitespace (string)
(if (stringp string)
(ppcre:regex-replace-all "\\s+" string " ")
string))
(defun maptree (function tree)
(if (atom tree)
(funcall function tree)
(mapcar (curry #'maptree function) tree)))
(defclass logging-acceptor (restas-acceptor)
... |
b6f7c385aa94fe454294a39c57896ec77bf377aa01495257791168df52b0485f | 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 LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Duckling.AmountOfMo... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/AmountOfMoney/EN/IE/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.
# LANGUAGE LambdaCase #
module Duckling.AmountOfMoney.EN.IE.Rules
( rules
) where
import Data.HashMap.Strict (HashMap)
import Data.String
import Data.Text (Text)
import Prelude
import Duckling.AmountOfMoney.Helpers
import Duckling.AmountOfMoney.Types (Currency(... |
097d8103cca7b70398e101063e49e9fdf2f8184cdcbb538fad71f936fafe548a | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.ui.components.file.views
(:require
[clojure.string :refer [join]]
[reagent.core :as r]
[webchange.ui.components.button.views :refer [button]]
[webchange.ui.utils.get-class-name :refer [get-class-name]]))
(defn- get-accept-extensions
[type]
(->> (case type
"audio" ["mp3" "wa... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/6c2d2d86ee0c2acbfbf212320d3ecfe1c7c67e82/src/cljs/webchange/ui/components/file/views.cljs | clojure | (ns webchange.ui.components.file.views
(:require
[clojure.string :refer [join]]
[reagent.core :as r]
[webchange.ui.components.button.views :refer [button]]
[webchange.ui.utils.get-class-name :refer [get-class-name]]))
(defn- get-accept-extensions
[type]
(->> (case type
"audio" ["mp3" "wa... | |
59fbeefd03e6bf523a7c6f27dcafe0283ab7c46dd3ac0e458174c060114a42f1 | stassats/lisp-bots | r5rs-lookup.lisp | (defpackage :r5rs-lookup (:use :common-lisp)
(:export :populate-table :symbol-lookup))
(in-package :r5rs-lookup)
(defparameter *r5rs-root* "/")
(defparameter *r5rs-file*
(merge-pathnames "r5rs-symbols.lisp-expr"
(or #.*compile-file-truename* *default-pathname-defaults*)))
(defvar *ta... | null | https://raw.githubusercontent.com/stassats/lisp-bots/09bfce724afd20c91a08acde8816be6faf5f54b2/r5rs-lookup.lisp | lisp | (defpackage :r5rs-lookup (:use :common-lisp)
(:export :populate-table :symbol-lookup))
(in-package :r5rs-lookup)
(defparameter *r5rs-root* "/")
(defparameter *r5rs-file*
(merge-pathnames "r5rs-symbols.lisp-expr"
(or #.*compile-file-truename* *default-pathname-defaults*)))
(defvar *ta... | |
5bdf32996f9d8333c9aedaf8e6de7d707bb83e67dd5a6d4a5640be166be95458 | TerrorJack/ghc-alter | foldableArray.hs | {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
module Main where
import Prelude hiding (foldr, foldl, foldl', foldr1, foldl1, length, null, sum,
product, all, any, and, or)
import Data.Foldable
import Control.Exception
import Data... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/foldableArray.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE DeriveDataTypeable #
we won't bother with the fancy laziness tests for the rest | # LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
module Main where
import Prelude hiding (foldr, foldl, foldl', foldr1, foldl1, length, null, sum,
product, all, any, and, or)
import Data.Foldable
import Control.Exception
import Data.Array
import Data.Foldable
import Data.Typeable
import Data.Eit... |
bc610f20ceef87caec34967a899e62e886c5d48c557c6576058429a6535d7d5d | omnyway-labs/vulcan | test.clj | (ns vulcan.test
(:refer-clojure :exclude [ns])
(:require
[clojure.string :as str]
[clojure.tools.namespace.find :as find]
[clojure.java.io :as io]
[clojure.test :as test]
[vulcan.util :as u]
[vulcan.commands :refer [defcommand] :as c]))
from cognitect 's test - runner
;; vulvan.test simplifies ... | null | https://raw.githubusercontent.com/omnyway-labs/vulcan/9cebe1f666b323080689b5283f313bd2292375fc/src/vulcan/test.clj | clojure | vulvan.test simplifies the filters and proper exit code for use outside of the REPL | (ns vulcan.test
(:refer-clojure :exclude [ns])
(:require
[clojure.string :as str]
[clojure.tools.namespace.find :as find]
[clojure.java.io :as io]
[clojure.test :as test]
[vulcan.util :as u]
[vulcan.commands :refer [defcommand] :as c]))
from cognitect 's test - runner
(defn fail? [{:keys [test... |
8941022b1f0cd2d315e2a033d97199b5f19e464dd534f23a162811d7a037b4cb | slipstream/SlipStreamServer | user_identifier_utils_test.clj | (ns com.sixsq.slipstream.ssclj.resources.user.user-identifier-utils-test
(:require
[clojure.string :as str]
[clojure.test :refer [deftest is use-fixtures]]
[com.sixsq.slipstream.auth.test-helper :as th]
[com.sixsq.slipstream.ssclj.resources.common.crud :as crud]
[com.sixsq.slipstream.ssclj.resourc... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/user/user_identifier_utils_test.clj | clojure | Username should be found both sanitized and unsanitized login
Create User identifier with a sanitized identifier
Need some time for complete removal of the sanitized identifier
Check that eventually the stored identifier is the unsanitized one | (ns com.sixsq.slipstream.ssclj.resources.user.user-identifier-utils-test
(:require
[clojure.string :as str]
[clojure.test :refer [deftest is use-fixtures]]
[com.sixsq.slipstream.auth.test-helper :as th]
[com.sixsq.slipstream.ssclj.resources.common.crud :as crud]
[com.sixsq.slipstream.ssclj.resourc... |
cacc396f8c43c2ea4580d16ecbd6725a47fd064c035de58e69ed30c2344fec45 | 3b/3bgl-misc | gpuanim.lisp | (in-package #:3bgl-gpuanim)
;; these are actually constants in the shaders for the moment.
(defparameter *max-bone* 64)
(defparameter *max-bone-models* 1024)
runtime state , probably needs valid GL context
(defclass gpu-anim-state ()
((programs :accessor programs :initform nil) ; plist: name -> program
... | null | https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/gpuanim/gpuanim.lisp | lisp | these are actually constants in the shaders for the moment.
plist: name -> program
plist: name -> data?
debugging, specify anim time
sequence of timestamp + quat
sequence of timestamp + pos
sequence of timestamp + scale
output = sequence of anim metadata for corresponding bones
count ... | (in-package #:3bgl-gpuanim)
(defparameter *max-bone* 64)
(defparameter *max-bone-models* 1024)
runtime state , probably needs valid GL context
(defclass gpu-anim-state ()
)
(defmethod program ((s gpu-anim-state) program-name)
(getf (programs s) program-name))
(defmethod (setf program) (program (s g... |
33db42bcaa58c05da9d54221b8228af6dbb6cbea37b058573c9688787a85ede2 | spell-music/amsterdam | BasicFM.hs | | additional parameters : imax , ifq2
This is the most basic instrument design for the FM synthesis
of sounds ( Chowning 1973 ) .
The parameters imax and ifq2 are varied to try some different
c : m ratios and modulation indexes on a set of short notes .
This is the most basic instrument design for the FM... | null | https://raw.githubusercontent.com/spell-music/amsterdam/ab491022c7826c74eab557ecd11794268f5a5ae0/20-fm/BasicFM.hs | haskell | | additional parameters : imax , ifq2
This is the most basic instrument design for the FM synthesis
of sounds ( Chowning 1973 ) .
The parameters imax and ifq2 are varied to try some different
c : m ratios and modulation indexes on a set of short notes .
This is the most basic instrument design for the FM... | |
27c22a3f9767a6cfab0375fb9b6616436f2e38aa69fd6981e6d1e35dbd48a2dd | babashka/sci.configs | reagent.cljs | (ns sci.configs.reagent.reagent
(:require
[reagent.core :as r]
[reagent.debug :as d :refer-macros [dev?]]
[reagent.ratom :as ratom]
[sci.core :as sci]))
;; The with-let macro from reagent.core. The only change is that the
interop / unchecked - aget+set were replaced by aget and aset .
(defn ^:macro wit... | null | https://raw.githubusercontent.com/babashka/sci.configs/bf8d209e4aeabb92cb1be04e3d8f789583d5f449/src/sci/configs/reagent/reagent.cljs | clojure | The with-let macro from reagent.core. The only change is that the
If the array is empty, initialize values and store to the
After init, the bindings are just bound to the values in the array.
If binding value is not yet set,
try setting it again. This should
also throw errors for each render
and prevent the body... | (ns sci.configs.reagent.reagent
(:require
[reagent.core :as r]
[reagent.debug :as d :refer-macros [dev?]]
[reagent.ratom :as ratom]
[sci.core :as sci]))
interop / unchecked - aget+set were replaced by aget and aset .
(defn ^:macro with-let [_ _ bindings & body]
(assert (vector? bindings)
(s... |
cf5d3ef16f97e047fb9ffd1ecb7b83403013c21582e1fad9c1c95c410b28f948 | metosin/jsonista | jmh.clj | (ns jsonista.jmh
(:require [jsonista.core :as j]
[cheshire.core :as cheshire]
[clojure.data.json :as json]
[jsonista.tagged :as jt])
(:import (com.fasterxml.jackson.databind ObjectMapper)
(clojure.lang Keyword)))
(set! *warn-on-reflection* true)
;;
run with { : ... | null | https://raw.githubusercontent.com/metosin/jsonista/29e5e544d14795664ff70a31cdf14a78c98e7734/test/jsonista/jmh.clj | clojure |
perf measured with the following setup:
Model Name: MacBook Pro
Model Identifier: MacBookPro11,3
| (ns jsonista.jmh
(:require [jsonista.core :as j]
[cheshire.core :as cheshire]
[clojure.data.json :as json]
[jsonista.tagged :as jt])
(:import (com.fasterxml.jackson.databind ObjectMapper)
(clojure.lang Keyword)))
(set! *warn-on-reflection* true)
run with { : fil... |
3aad8b6adfffe4c92cd6e6e226d457b410f9b4248a11dd4a97017ced244bffef | unisonweb/unison | Common.hs | -- | Combinators or utilities shared by sync server AND client
module Unison.Sync.Common
( expectEntity,
-- * Type conversions
causalHashToHash32,
hash32ToCausalHash,
entityToTempEntity,
tempEntityToEntity,
)
where
import qualified Control.Lens as Lens
import qualified Data.Set as Set
import q... | null | https://raw.githubusercontent.com/unisonweb/unison/bf0186aefb11ef2a9ec44d55adc70f356044f0c7/unison-share-api/src/Unison/Sync/Common.hs | haskell | | Combinators or utilities shared by sync server AND client
* Type conversions
| Read an entity out of the database that we know is in main storage.
`temp_entity` table. | module Unison.Sync.Common
( expectEntity,
causalHashToHash32,
hash32ToCausalHash,
entityToTempEntity,
tempEntityToEntity,
)
where
import qualified Control.Lens as Lens
import qualified Data.Set as Set
import qualified Data.Vector as Vector
import U.Codebase.HashTags (CausalHash (..))
import qualif... |
589a1a45a101367292d3c072a2b3278a53394c1341d5bd9091db97e5a6ca841b | jrm-code-project/LISP-Machine | spdwim.lisp | -*- Mode : LISP ; Package : SYSTEM - INTERNALS ; ; : ZL -*-
(defconst *spelling-dwim-is-loaded?* t "Variable is boundp if dwim file exists.")
(defvar *enable-spelling-dwim?* nil "T to turn on spelling checker.")
(defun find-candidate-for-poor-spelling (symbol package definition-type)
;; This code does a lot of... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/sys/spdwim.lisp | lisp | Package : SYSTEM - INTERNALS ; ; : ZL -*-
This code does a lot of unnecessary stuff (e.g. conses up a
possibilities list) However, it works fairly well. |
(defconst *spelling-dwim-is-loaded?* t "Variable is boundp if dwim file exists.")
(defvar *enable-spelling-dwim?* nil "T to turn on spelling checker.")
(defun find-candidate-for-poor-spelling (symbol package definition-type)
(let ((possibilities
(make-possibilities (string-upcase (string symbol))
... |
02032ed5ddcbe6a376b204b6be665f6ff03800171508b9e85e4f328e175375db | DaiF1/Oditor | default_keymaps.ml |
file : default_keymaps.ml
dependencies : editor.ml input.ml display.ml insert.ml movement.ml
Default key bindings
file: default_keymaps.ml
dependencies: editor.ml input.ml display.ml insert.ml movement.ml
Default key bindings
*)
open Editor;;
open Input;;
open Files;;
open Display;;
ope... | null | https://raw.githubusercontent.com/DaiF1/Oditor/9f49ce05281f3253c166475b21c282a1e36c99f7/editor/default_keymaps.ml | ocaml | Move cursor on screen based on key pressed
File management command type
** Input Processing **
Special inputs
Ctrl inputs
Default input |
file : default_keymaps.ml
dependencies : editor.ml input.ml display.ml insert.ml movement.ml
Default key bindings
file: default_keymaps.ml
dependencies: editor.ml input.ml display.ml insert.ml movement.ml
Default key bindings
*)
open Editor;;
open Input;;
open Files;;
open Display;;
ope... |
4bbde990bfdc6ba5b64124422ac8ebf081d134fb83fc09349847bccad5630e0d | cnuernber/dtype-next | libc.clj | (ns libc
(:require [tech.v3.datatype.ffi :as dt-ffi]))
(def fn-defs
{:memset {:rettype :pointer
:argtypes [['buffer :pointer]
['byte-value :int32]
['n-bytes :size-t]]}
:memcpy {:rettype :pointer
;;dst src size-t
:argtypes [['dst ... | null | https://raw.githubusercontent.com/cnuernber/dtype-next/572d57ed7ae483d95ba67942f0b2d16282142aea/examples/clj-ffi/src/libc.clj | clojure | dst src size-t
you to do both pre/post error checking according to information in the fn defintion | (ns libc
(:require [tech.v3.datatype.ffi :as dt-ffi]))
(def fn-defs
{:memset {:rettype :pointer
:argtypes [['buffer :pointer]
['byte-value :int32]
['n-bytes :size-t]]}
:memcpy {:rettype :pointer
:argtypes [['dst :pointer]
... |
d30a530be31e73f088dbe31ba7597d2d4fa1cd93b90732995707381e0499f0f0 | smaccoun/aeson-generic-ts | BasicExamples.hs | {-# LANGUAGE DeriveAnyClass #-}
module BasicExamples where
import Data.Text (Text)
import GHC.Generics
import Typescript.Internal.Intermediate.Generic
data SimpleRecord =
SimpleRecord
{f1 :: Int
,f2 :: Text
} deriving (Generic, TypescriptType... | null | https://raw.githubusercontent.com/smaccoun/aeson-generic-ts/080ec883e77aad45cc01cc211bdb9998bd47e66e/data/BasicExamples.hs | haskell | # LANGUAGE DeriveAnyClass # |
module BasicExamples where
import Data.Text (Text)
import GHC.Generics
import Typescript.Internal.Intermediate.Generic
data SimpleRecord =
SimpleRecord
{f1 :: Int
,f2 :: Text
} deriving (Generic, TypescriptType)
newtype OneFieldRecord =
One... |
598219ca6f21661d331ea528ad1c7c916a7bbe3818fb5cc5099d284623600793 | finnishtransportagency/harja | tietyomaa_test.clj | (ns harja.palvelin.integraatiot.api.tietyomaa-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[harja.testi :refer :all]
[harja.palvelin.integraatiot.api.tyokalut :as api-tyokalut]
[com.stuartsierra.component :as component]
[harja.palvelin.integraatiot.api... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/c57d742beaff2bef7b30318819f07d4a13423404/test/clj/harja/palvelin/integraatiot/api/tietyomaa_test.clj | clojure | ")))) | (ns harja.palvelin.integraatiot.api.tietyomaa-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[harja.testi :refer :all]
[harja.palvelin.integraatiot.api.tyokalut :as api-tyokalut]
[com.stuartsierra.component :as component]
[harja.palvelin.integraatiot.api... |
b83db038420d76e54f70207e8363cbe3a639a3128d94831121a69d41c578e5c6 | matterhorn-chat/mattermost-api | WebSocket.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE DeriveDataTypeable #-}
module Network.Mattermost.WebSocket
( MMWebSocket
, MMWebSocketTimeoutException
, mmWithWebSocket
, mmCloseWebSocket
, mmSendWSAction
, mmGetConnectionHealth
, module Network.Mattermost.WebSocket.Types
) where
impo... | null | https://raw.githubusercontent.com/matterhorn-chat/mattermost-api/cd337d5129930e82401e4eaed1c7fa03eb2bc62c/src/Network/Mattermost/WebSocket.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable #
The message could be either a websocket event or
types, so we need to attempt to parse each.
Log both exceptions, but throw
because we don't know which
them and log both. | # LANGUAGE ScopedTypeVariables #
module Network.Mattermost.WebSocket
( MMWebSocket
, MMWebSocketTimeoutException
, mmWithWebSocket
, mmCloseWebSocket
, mmSendWSAction
, mmGetConnectionHealth
, module Network.Mattermost.WebSocket.Types
) where
import Control.Concurrent (ThreadId, forkIO, myThreadId, threadDe... |
8b49c1b8253af9c6a26f6fbf74f97121f815fef07450f80939a194927872cd48 | elastic/eui-cljs | absolute_tab.cljs | (ns eui.absolute-tab
(:require ["@elastic/eui/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js" :as eui]))
(def EuiAbsoluteTab eui/EuiAbsoluteTab)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/absolute_tab.cljs | clojure | (ns eui.absolute-tab
(:require ["@elastic/eui/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js" :as eui]))
(def EuiAbsoluteTab eui/EuiAbsoluteTab)
| |
11624fa1f5682c935600e1bebed61e78fd54dabdeedbc2fdbede1aff2e89af9b | ostinelli/ram | ram_SUITE.erl | %% ==========================================================================================================
Ram - A distributed KV store for Erlang and Elixir .
%%
The MIT License ( MIT )
%%
Copyright ( c ) 2021 - 2022 < > .
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%... | null | https://raw.githubusercontent.com/ostinelli/ram/8783325cc02917aa412b4e78f546b0b427ed7759/test/ram_SUITE.erl | erlang | ==========================================================================================================
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, s... | Ram - A distributed KV store for Erlang and Elixir .
The MIT License ( MIT )
Copyright ( c ) 2021 - 2022 < > .
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Sof... |
ec46a687ca986154ffa266c123c8a127a060e9d5a4cc8d4e2d2c32eba69ff265 | odis-labs/onix | Solver_context.mli | type t
val make :
?prefer_oldest:bool ->
?fixed_opam_details:Opam_utils.opam_details OpamTypes.name_map ->
constraints:OpamFormula.version_constraint OpamTypes.name_map ->
package_dep_vars:Opam_utils.package_dep_vars ->
repo:Repo.t ->
unit ->
t
(* Input solver context for Opam_0install.Solver.Make. *)
i... | null | https://raw.githubusercontent.com/odis-labs/onix/81cc82953ef062425656ac9bf80474f2ce642f5b/src/onix_core/Solver_context.mli | ocaml | Input solver context for Opam_0install.Solver.Make.
val get_opam_file : t -> OpamPackage.t -> OpamFile.OPAM.t | type t
val make :
?prefer_oldest:bool ->
?fixed_opam_details:Opam_utils.opam_details OpamTypes.name_map ->
constraints:OpamFormula.version_constraint OpamTypes.name_map ->
package_dep_vars:Opam_utils.package_dep_vars ->
repo:Repo.t ->
unit ->
t
include Opam_0install.S.CONTEXT with type t := t
|
a6b53d834d8d87878dded61c3993e0677c83c0f0b1258c6f069d62e9b2eae02b | phylogeography/spread | discrete_rates.cljs | (ns ui.new-analysis.discrete-rates
(:require [re-frame.core :as re-frame]
[reagent-material-ui.core.linear-progress :refer [linear-progress]]
[reagent.core :as r]
[shared.components :refer [button mui-slider]]
[ui.component.button :refer [button-file-upload]]
... | null | https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/ui/new_analysis/discrete_rates.cljs | clojure | weird JS behaviour, where it will parse floats with full precision
we have a filename
we have a filename | (ns ui.new-analysis.discrete-rates
(:require [re-frame.core :as re-frame]
[reagent-material-ui.core.linear-progress :refer [linear-progress]]
[reagent.core :as r]
[shared.components :refer [button mui-slider]]
[ui.component.button :refer [button-file-upload]]
... |
5c889c018b71bdf53a330e989a2628757f01d848fb2442425023850a21269aa8 | dtqec/aether | package.lisp | ;;;; tests/package.lisp
(fiasco:define-test-package #:aether-tests
(:use #:aether)
;; suite.lisp
(:export
#:run-aether-tests))
| null | https://raw.githubusercontent.com/dtqec/aether/bb1de4e9165945d143ad274a37d8bf19d68f0c1a/tests/package.lisp | lisp | tests/package.lisp
suite.lisp |
(fiasco:define-test-package #:aether-tests
(:use #:aether)
(:export
#:run-aether-tests))
|
3503fee582649a7b8f96448fd362786e4cf9df94e3dc08e44ebac27e3ebf7684 | mnieper/unsyntax | load.scm | Copyright © ( 2020 ) .
;; This file is part of unsyntax.
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software without restriction ,
;; including without limitation the rights to use... | null | https://raw.githubusercontent.com/mnieper/unsyntax/cd12891805a93229255ff0f2c46cf0e2b5316c7c/src/scheme/load.scm | scheme | This file is part of unsyntax.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission n... | Copyright © ( 2020 ) .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
19dc7d447e6fbfb7d2682cf1ba198cc4bbc1f9397b3510fae0dec2891a116389 | huangjs/cl | hybrd1.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/minpack/lisp/hybrd1.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls nil)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
5eb22ff34079ade8336c7a8ebe066c565bda7a811c800c5b7b8201689bb4a5fb | ejgallego/coq-serapi | ser_cEphemeron.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/dd9e3fbf7faaf3bf365fa3eff134641055151a9b/serlib/ser_cEphemeron.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright 2016 - 2019 MINES... |
908b1f97c0e833231b47bf6e4d7d4c66e74212446051d169ad220dbb2fcbf55b | nyu-acsys/drift | pldi082_unbounded2.ml |
let rec loop (lx:int) (ly:int) (ln:int) =
let ny =
if (lx <= ln) then ly + 1
else if (lx >= ln+1) then ly - 1
else (-4) in
if (ny < 0) then
if ln >= 0 then
if ny = (-1) then (lx < 2 * ln + 3)
else false
el... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/DOrder/first/pldi082_unbounded2.ml | ocaml |
let rec loop (lx:int) (ly:int) (ln:int) =
let ny =
if (lx <= ln) then ly + 1
else if (lx >= ln+1) then ly - 1
else (-4) in
if (ny < 0) then
if ln >= 0 then
if ny = (-1) then (lx < 2 * ln + 3)
else false
el... | |
be68c43c914d6bc076c471eae0fe38b87eb569b50fb4f07257a6346400e474bd | Naproche-SAD/Naproche-SAD | Byte_Message.hs | {- generated by Isabelle -}
Title : Isabelle / Byte_Message.hs
Author : Makarius
LICENSE : BSD 3 - clause ( Isabelle )
Byte - oriented messages .
See " $ ISABELLE_HOME / src / Pure / PIDE / byte_message . ML "
and " $ ISABELLE_HOME / src / Pure / PIDE / byte_message.scala " .
... | null | https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/Isabelle/src/Isabelle/Byte_Message.hs | haskell | generated by Isabelle
output operations
input operations
messages with multiple chunks (arbitrary content)
hybrid messages: line or length+block (with content restriction) |
Title : Isabelle / Byte_Message.hs
Author : Makarius
LICENSE : BSD 3 - clause ( Isabelle )
Byte - oriented messages .
See " $ ISABELLE_HOME / src / Pure / PIDE / byte_message . ML "
and " $ ISABELLE_HOME / src / Pure / PIDE / byte_message.scala " .
Author: Makarius
L... |
be31dd3855287d1d2a32cd72f63082b627ec3361dbeca8568d094de6c66ef5e6 | imandra-ai/fix-engine | parser_combinators.ml | (* rewriting of Parser_utils *)
module Str_set = Set.Make (String)
type msg = Message.t
type tag = string
type error =
| UnknownMessageTag of string
| RequiredTagMissing of string
| DuplicateTag of string
| WrongValueFormat of string
| UndefinedTag of string
| EmptyValue of string
| IncorrectNumInGrou... | null | https://raw.githubusercontent.com/imandra-ai/fix-engine/42f3c4f3ca432469969e89e461ca76b52c21f282/fix-engine/src-core-utils-msg/parser_combinators.ml | ocaml | rewriting of Parser_utils
* Result of parsing
Extract a value given a tag, returns a pair with the value and the rest of the list.
internal state during parsing
we got the separator, now we can split into groups starting with it
parse [msg] using [p], reusing [st]. Only [msg] will be visible
to the sub-pars... |
module Str_set = Set.Make (String)
type msg = Message.t
type tag = string
type error =
| UnknownMessageTag of string
| RequiredTagMissing of string
| DuplicateTag of string
| WrongValueFormat of string
| UndefinedTag of string
| EmptyValue of string
| IncorrectNumInGroupCount of string
| RepeatingGr... |
f1cf29721bba2bcc7ef536705f12f4106f3844ac81941379677b44b69a671c71 | Vortecsmaster/EmurgoAcademyPlutusExamples | 08 - FreeMinting.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
... | null | https://raw.githubusercontent.com/Vortecsmaster/EmurgoAcademyPlutusExamples/90ffe69a0b14b551336e80fd8f348257ebdabfdc/preVasil_V1/08%20-%20FreeMinting.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
ON-CHAIN
OFF-CHAIN | # LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module FreeMinting where
import Control.Monad hiding (fmap)
import Data.Aeson ... |
f3453bcc546cd91a66f88d4644247300c4e1a7f428870982b3df7f044390944e | SNePS/SNePS2 | load-blocksworld.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*-
Copyright ( C ) 1993 - -2013
Research Foundation of State University of New York
Version : $ I d : load - blocksworld.lisp , v 1.2 2013/08/28 19:07:23 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of ... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/demo/snere/blocksworld/load-blocksworld.lisp | lisp | Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*-
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for the specific language gov
erning rights and limitations ... |
Copyright ( C ) 1993 - -2013
Research Foundation of State University of New York
Version : $ I d : load - blocksworld.lisp , v 1.2 2013/08/28 19:07:23 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
... |
8c92070e340856882c8c36887546693f0f27de69751729c03392ab40b1272417 | davdar/maam | EnvSetup.hs | # LANGUAGE NoRebindableSyntax , NoOverloadedStrings , ImplicitPrelude #
module Main where
import Distribution.PackageDescription
import Distribution.PackageDescription.Parse
import Distribution.Compiler
import Distribution.Verbosity
import Data.Maybe
import Language.Haskell.Extension
import System.IO
import Control.M... | null | https://raw.githubusercontent.com/davdar/maam/2cc3ff3511a7a4daadcd44c60c4b08862c01e183/EnvSetup.hs | haskell | EXTENSIONS --
write out a file listing all extensions
write out a file for ghci to load extensions
OPTIONS --
write out a file for ghci to load options | # LANGUAGE NoRebindableSyntax , NoOverloadedStrings , ImplicitPrelude #
module Main where
import Distribution.PackageDescription
import Distribution.PackageDescription.Parse
import Distribution.Compiler
import Distribution.Verbosity
import Data.Maybe
import Language.Haskell.Extension
import System.IO
import Control.M... |
f9b179242b14a2884c0c86a1064438a1e5716097048a38a954d146cf67dfa7dc | dustmop/co2 | opcode-tests.scm | #lang racket
(require rackunit "../compile.scm")
(define (compile-code code)
(clear-result)
(process-form (datum->syntax #f code))
(fetch-result))
(check-equal? (compile-code '(asl a)) '(" asl a"))
(check-equal? (compile-code '(and 1)) '(" and #$1"))
TODO : Test branch opcodes , like beq , bne , bmi , bp... | null | https://raw.githubusercontent.com/dustmop/co2/49cd2c9fac25777bb0fe1877075602c167956d90/unit-tests/opcode-tests.scm | scheme | #lang racket
(require rackunit "../compile.scm")
(define (compile-code code)
(clear-result)
(process-form (datum->syntax #f code))
(fetch-result))
(check-equal? (compile-code '(asl a)) '(" asl a"))
(check-equal? (compile-code '(and 1)) '(" and #$1"))
TODO : Test branch opcodes , like beq , bne , bmi , bp... | |
5fc8d927ee1f464cd7e3f49be5e0954ca8ee6466f8fce7041c922dc57a1d6936 | nikita-volkov/rebase | Sync.hs | module Rebase.GHC.Conc.Sync
(
module GHC.Conc.Sync
)
where
import GHC.Conc.Sync
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/GHC/Conc/Sync.hs | haskell | module Rebase.GHC.Conc.Sync
(
module GHC.Conc.Sync
)
where
import GHC.Conc.Sync
| |
5d6774421ab36099d60da8c4ce111ae2a1b98cac2e27945fe60e88f75dce81ec | jpjodoin/sunshower | raincloud_app.erl | %%%-------------------------------------------------------------------
%% @doc raincloud public API
%% @end
%%%-------------------------------------------------------------------
-module(raincloud_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%%=================================... | null | https://raw.githubusercontent.com/jpjodoin/sunshower/b86d6f46f1589124e13bd9b60e270c8aed998bd0/src/raincloud_app.erl | erlang | -------------------------------------------------------------------
@doc raincloud public API
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
API
======================================================... |
-module(raincloud_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
raincloud_store:start(),
raincloud_handler:start(),
raincloud_sup:start_link().
stop(_State) ->
ok.
Internal functions
|
ea239756df1ea6f8dda5ccaac3e11208dc6d1713ef342c2a4d8355ec3700e78e | charlieg/Sparser | v+v-objects2.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1998 - 2005,2010 - 2011 -- all rights reserved
extensions copyright ( c ) 2007 - 2009 BBNT Solutions LLC . All Rights Reserved
$ Id:$
;;;
;;; File: "v+v objects"
;;; Module: "objects;model:lattice-points:"
version : ... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/model/lattice-points/v%2Bv-objects2.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "v+v objects"
Module: "objects;model:lattice-points:"
variable.
into the structure file.
(12/14/10) Rehabilited value/var/v+v & bind-v+v. Fixed C&S bug in
printer. (3/19/11) Cleaned up. Updated a call.
---------
printer
------... | copyright ( c ) 1998 - 2005,2010 - 2011 -- all rights reserved
extensions copyright ( c ) 2007 - 2009 BBNT Solutions LLC . All Rights Reserved
$ Id:$
version : 2.0 December 2010
initiated 3/7/98 . Populated 7/9 . 1/31/99 aded Value / var / v+v . Added
Bind - v+v 2/14 . Added a global trap into v... |
8964f10f503d66380df4fffe006eaa5eb1935f5516baf553ff16b3dda03afa61 | Incubaid/rsync-demo | test.ml | open Rsync
open Signature
open Hash
module S = SDigest
module AA = Rsync(Adler)(S)
module MySig = Signature(Adler)(S)
let old_dir = "tests/old/"
let new_dir = "tests/new/"
let sync_dir = "tests/synced/"
let test_io () =
let values = [128;127;4;1;0;] in
let do_one v =
let fn = "/tmp/test_io.bin" in
let... | null | https://raw.githubusercontent.com/Incubaid/rsync-demo/d2587974dbb35e3838679cc5e0d19dabd42a8ac7/test.ml | ocaml | open Rsync
open Signature
open Hash
module S = SDigest
module AA = Rsync(Adler)(S)
module MySig = Signature(Adler)(S)
let old_dir = "tests/old/"
let new_dir = "tests/new/"
let sync_dir = "tests/synced/"
let test_io () =
let values = [128;127;4;1;0;] in
let do_one v =
let fn = "/tmp/test_io.bin" in
let... | |
8cb234f418c8e1aa0715e7ba2830ae0e126f13b18aafb83e6a3e93f5afd55c68 | alandipert/mathemagician | project.clj | (defproject alandipert/mathemagician "0.0.3"
:description "Automatically generate Clojure function proxies for java.lang.Math static methods."
:dependencies [[org.clojure/clojure "1.4.0"]])
| null | https://raw.githubusercontent.com/alandipert/mathemagician/ae21a3dca915d75d5d1723fbfcaff38b42f1cfe1/project.clj | clojure | (defproject alandipert/mathemagician "0.0.3"
:description "Automatically generate Clojure function proxies for java.lang.Math static methods."
:dependencies [[org.clojure/clojure "1.4.0"]])
| |
7ecd16ae5e448da487f116b97f1692f3b25eaf85957c246c1e18e0e3f79ad8ba | ilyasergey/monadic-cfa | AbstractSharedCount.hs | module CFA.CPS.Examples where
import Data.Map as Map
import Data.Set as Set
import Data.List as List
import CFA.CPS
import CFA.Lattice
import CFA.Store
import CFA.CPS.Analysis
import CFA.Runner
----------------------------------------------------------------------
-- abstract interpreter with a shared store and cou... | null | https://raw.githubusercontent.com/ilyasergey/monadic-cfa/caeb9e5375affe9c3cdee0753ae2ba489cdc328a/CFA/CPS/Examples/AbstractSharedCount.hs | haskell | --------------------------------------------------------------------
abstract interpreter with a shared store and counting
--------------------------------------------------------------------
--------------------------------------------------------------------
example program
-----------------------------------------... | module CFA.CPS.Examples where
import Data.Map as Map
import Data.Set as Set
import Data.List as List
import CFA.CPS
import CFA.Lattice
import CFA.Store
import CFA.CPS.Analysis
import CFA.Runner
import CFA.CPS.KCFA
import CFA.CPS.Analysis.SingleStore
idx = Lam (["x"] :=> Call (Ref "x") [])
idy = Lam (["y"] :=> ... |
f24ec60d7e30f666772a274363a77d19c77dfd053f0318ecd4ee1b4d6a74c1ac | dgiot/dgiot | emqx_json_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2018 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/dgiot/dgiot/c9f2f78af71692ba532e4806621b611db2afe0c9/test/emqx_json_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2018 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_json_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("eun... |
193aa05da67e658c8e37af5db06426f077eb8641426e19fdff96062dd8da8259 | LaurentMazare/ocaml-torch | darknet.mli | type t
(** [parse_config str] loads a darknet config file and parses it to a darknet config. *)
val parse_config : string -> t
val build_model : Torch.Var_store.t -> t -> Torch.Layer.t_with_training
val width : t -> int
val height : t -> int
| null | https://raw.githubusercontent.com/LaurentMazare/ocaml-torch/a82b906a22c7c23138af16fab497a08e5167d249/examples/yolo/darknet.mli | ocaml | * [parse_config str] loads a darknet config file and parses it to a darknet config. | type t
val parse_config : string -> t
val build_model : Torch.Var_store.t -> t -> Torch.Layer.t_with_training
val width : t -> int
val height : t -> int
|
51df6551889f6d45d757e1af70b218e6799c04010967782647b8fdf75b287790 | input-output-hk/iohk-monitoring-framework | Main.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE TypeFamilies #
module Main where
import Control.Concurrent.MVar (MVar, modifyMVar_, newEmptyMVar, newMVar, putMVar,
readMVar, tryTakeMVar, withMVar)
import ... | null | https://raw.githubusercontent.com/input-output-hk/iohk-monitoring-framework/21e00a449029fc7e864869d1b1aecd2834157083/tracer-transformers/example2/Main.hs | haskell | # LANGUAGE Rank2Types #
The "top level" invocation of code with different transformations
on the tracer
- demo code
a level of verbosity
fake reading of a state:
the trace transformer on verbosity
The distinct message types that you want to expose. This is the set
of observables.
visual context)
...
and so fo... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Main where
import Control.Concurrent.MVar (MVar, modifyMVar_, newEmptyMVar, newMVar, putMVar,
readMVar, tryTakeMVar, withMVar)
import Control.Monad.IO.Class ... |
fe393564476ffe66c8bf7162c72f6d3ffcb8659ae18ff7069d1a6b443b0835fc | WorksHub/client | events.cljs | (ns wh.promotions.preview.events
(:require [wh.blogs.blog.events]
[wh.graphql-cache :refer [reg-query]]
[wh.graphql.company]
[wh.graphql.issues]
[wh.graphql.jobs]
[wh.pages.core :refer [on-page-load]])
(:require-macros [wh.graphql-macros :refer [defquery]]... | null | https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/promotions/preview/events.cljs | clojure | (ns wh.promotions.preview.events
(:require [wh.blogs.blog.events]
[wh.graphql-cache :refer [reg-query]]
[wh.graphql.company]
[wh.graphql.issues]
[wh.graphql.jobs]
[wh.pages.core :refer [on-page-load]])
(:require-macros [wh.graphql-macros :refer [defquery]]... | |
d62fdec40802cdac4ec30791bcf5ca8ccfa095fd99836b2247fc4056597d67ef | caml-pkcs11/opkcs11-tool | ssl.mli | * Portions of code are based on bindings with Openssl * *
(* Original copyright from OCaml-ssl project *)
Copyright ( C ) 2003 - 2005 This library 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 Founda... | null | https://raw.githubusercontent.com/caml-pkcs11/opkcs11-tool/269d5e435c3142782568d37ca2af57c1a0722527/ssl.mli | ocaml | Original copyright from OCaml-ssl project | * Portions of code are based on bindings with Openssl * *
Copyright ( C ) 2003 - 2005 This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or... |
30118aa8a832821a1df7ac7f1db29019ded1a94e32fb926c189ec305c3eeca0e | fpco/ide-backend | BuildTarget.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.BuildTargets
Copyright : ( c ) 2012
-- License : BSD-like
--
-- Maintainer :
--
-- Handling for user-specified build targets
---------------------------------------------------------... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.18.1.5/Distribution/Simple/BuildTarget.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Client.BuildTargets
License : BSD-like
Maintainer :
Handling for user-specified build targets
---------------------------------------------------------------------------
* Build targets
* Parsing u... | Copyright : ( c ) 2012
module Distribution.Simple.BuildTarget (
BuildTarget(..),
readBuildTargets,
UserBuildTarget,
readUserBuildTargets,
UserBuildTargetProblem(..),
reportUserBuildTargetProblems,
resolveBuildTargets,
BuildTargetProblem(..),
reportBuildTargetProblems,
)... |
66fd9904937e5025535ec3d2428dac21370fbcb8f8f2f6af88611e1f46978d22 | racehub/om-bootstrap | group.cljs | ;; (:require [om-bootstrap.button :as b])
(b/toolbar {}
(b/button {} "Default")
(b/button {:bs-style "primary"} "Primary")
(b/button {:bs-style "success"} "Success")
(b/button {:bs-style "info"} "Info")
(b/button {:bs-style "warning"} "Warning")
(b/butt... | null | https://raw.githubusercontent.com/racehub/om-bootstrap/18fb7f67c306d208bcb012a1b765ac1641d7a00b/dev/snippets/button/group.cljs | clojure | (:require [om-bootstrap.button :as b]) |
(b/toolbar {}
(b/button {} "Default")
(b/button {:bs-style "primary"} "Primary")
(b/button {:bs-style "success"} "Success")
(b/button {:bs-style "info"} "Info")
(b/button {:bs-style "warning"} "Warning")
(b/button {:bs-style "danger"} "Danger")
... |
16b907c6bef51a71b0e1706dad6dac5afd2dccf295cb56ecfa24c4ef21ecdaf6 | dbuenzli/logs | B0.ml | open B0_kit.V000
(* OCaml library names *)
let mtime = B0_ocaml.libname "mtime"
let mtime_clock_os = B0_ocaml.libname "mtime.clock.os"
let unix = B0_ocaml.libname "unix"
let threads = B0_ocaml.libname "threads.posix"
let cmdliner = B0_ocaml.libname "cmdliner"
let fmt = B0_ocaml.libname "fmt"
let fmt_tty = B0_ocaml.li... | null | https://raw.githubusercontent.com/dbuenzli/logs/c3c043ec3bfa257e8652c1853e5eed59a6be8364/B0.ml | ocaml | OCaml library names
Libraries
Tools
Tests
Packs | open B0_kit.V000
let mtime = B0_ocaml.libname "mtime"
let mtime_clock_os = B0_ocaml.libname "mtime.clock.os"
let unix = B0_ocaml.libname "unix"
let threads = B0_ocaml.libname "threads.posix"
let cmdliner = B0_ocaml.libname "cmdliner"
let fmt = B0_ocaml.libname "fmt"
let fmt_tty = B0_ocaml.libname "fmt.tty"
let fmt_cl... |
9622a39f9e6e5ad9981ecb494e7c97b5f5e9d3660ff3240b27cbdd996f5a30dd | bobatkey/CS316-18 | Lec03.hs | # LANGUAGE ParallelListComp #
The extension above will be needed for defining ` zip ' ` and ` fibs `
below . For now , you can safely ignore it , but if you are curious ,
comments of the form ` { - # IDENTIFIER arguments #
below. For now, you can safely ignore it, but if you are curious,
comments of ... | null | https://raw.githubusercontent.com/bobatkey/CS316-18/282dc3c876527c14acfed7bd38f24c9ff048627a/lectures/Lec03.hs | haskell | # IDENTIFIER arguments #
We are going to redefine some functions from the standard library
prelude, which is normally imported automatically, and use some
functions from the list part of the standard library:
We see that ex3 evaluates to the list of even numbers
[0,2,4,6,8]
Here is another example of... | # LANGUAGE ParallelListComp #
The extension above will be needed for defining ` zip ' ` and ` fibs `
below . For now , you can safely ignore it , but if you are curious ,
comments of the form ` { - # IDENTIFIER arguments #
below. For now, you can safely ignore it, but if you are curious,
/pragmas/, a... |
0a6abcde2c01044f4cb4f85056ed92610b6bc156fd8618fd26ec0feb2b479392 | didierverna/tfm | version.lisp | version.lisp --- TFM version management
Copyright ( C ) 2019 - 2021
Author : < >
This file is part of TFM .
;; Permission to use, copy, modify, and distribute this software for any
;; purpose with or without fee is hereby granted, provided that the above
;; copyright notice and this permission notice a... | null | https://raw.githubusercontent.com/didierverna/tfm/bad0fccb650c1468cbce0a1012bca746989e26ec/setup/src/version.lisp | lisp | Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SH... | version.lisp --- TFM version management
Copyright ( C ) 2019 - 2021
Author : < >
This file is part of TFM .
THIS SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE ... |
dbd10842c5da2fa1a352a1915f7be07be3936f65f6088821afc1b6a5978099e6 | fare/lisp-interface-library | sequence.lisp | ;;;;; Read-only interfaces common to pure and stateful collections
(uiop:define-package :lil/pure/sequence
(:use
:closer-common-lisp
:lil/core
:lil/interface/base)
(:use-reexport
:lil/pure/empty
:lil/interface/empty
:lil/interface/size
:lil/interface/fold
:lil/pure/iterator
:lil/pure/col... | null | https://raw.githubusercontent.com/fare/lisp-interface-library/ac2e0063dc65feb805f0c57715d52fda28d4dcd8/pure/sequence.lisp | lisp | Read-only interfaces common to pure and stateful collections
note: shadowed in pure, stateful
TODO: create this interface... |
(uiop:define-package :lil/pure/sequence
(:use
:closer-common-lisp
:lil/core
:lil/interface/base)
(:use-reexport
:lil/pure/empty
:lil/interface/empty
:lil/interface/size
:lil/interface/fold
:lil/pure/iterator
:lil/pure/collection
:lil/interface/sequence)
(:shadow
(in-package :lil/pu... |
d3421b06a491de486a17386669625b7c25eb894065688adf8e311f00cc500ea1 | kototama/picobit | test-named-let.scm | (let loop ((x 0))
(if (< x 10)
(begin (display x)
(loop (+ x 1)))))
| null | https://raw.githubusercontent.com/kototama/picobit/8bdfc092266803bc6b1151177a7e668c9b050bea/tests/test-named-let.scm | scheme | (let loop ((x 0))
(if (< x 10)
(begin (display x)
(loop (+ x 1)))))
| |
f8ba7c2f272b33586dc90d8ebcbd44a45d3abb595861a3f6448ee3e3bcfcf27d | duncanatt/detecter | token_handler.erl | %%% ----------------------------------------------------------------------------
@author
%%%
%%% @doc Module description (becomes module heading).
%%%
%%% @end
%%%
Copyright ( c ) 2022 , < >
%%%
%%% This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General... | null | https://raw.githubusercontent.com/duncanatt/detecter/2e121f5126a95c0f1cbe5ce11fae62b7b17549e5/experiments/coordination_2022/src/cowboy_apps/token/token_handler.erl | erlang | ----------------------------------------------------------------------------
@doc Module description (becomes module heading).
@end
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
FITNES... | @author
Copyright ( c ) 2022 , < >
under the terms of the GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or
You should have received a copy of the GNU... |
d2ea85e3977163640312af4c5058cb812425c825f569c8372bf7adb9ab80d885 | ddmcdonald/sparser | new-words.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1992 - 1995,2011 - 2021 -- all rights reserved
;;;
;;; File: "new words"
Module : " objects;chart : words : lookup : "
Version : September 2021
4.0 ( 9/28/92 v2.3 ) accomodates changes to tokenizer
4.1 ( 7/16/93 ) up... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/8bfd1571ae453e6633db9f237fa8004dd90f3e01/Sparser/code/s/objects/chart/words/lookup/new-words.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "new words"
(3/1/12) quiet compiler
that can set up all the other words that go with, e.g. a verb.
That fixed bug where the new forms didn't see the original oblique
form of the lemma and build a new one.
(10/14/14) added... | copyright ( c ) 1992 - 1995,2011 - 2021 -- all rights reserved
Module : " objects;chart : words : lookup : "
Version : September 2021
4.0 ( 9/28/92 v2.3 ) accomodates changes to tokenizer
4.1 ( 7/16/93 ) updated field name
4.2 ( 1/27/94 ) added Unknown - word ?
( 12/12 ) added simplest ca... |
9a2e5165dc709dd9b224052bf561dc99c6874f561b6b87d4acb53c36096c1e83 | stchang/macrotypes | stlc+sum+fix.rkt | #lang turnstile/quicklang
;; extends stlc+sum with fixpoint operator
(extends "stlc+sum.rkt")
(provide fix)
(define-typed-syntax (fix e) ≫
[⊢ e ≫ e- ⇒ (~→ τ_in τ_out)]
[τ_in τ= τ_out]
; #:when (typecheck? #'τ_in #'τ_rst)
----
[⊢ ((λ- (f-)
(#%app- (λ- (x-) (#%app- f- (λ- (v-) (#%app- (#%app- x- x-) ... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-example/turnstile/examples/cmu15-814/stlc%2Bsum%2Bfix.rkt | racket | extends stlc+sum with fixpoint operator
#:when (typecheck? #'τ_in #'τ_rst) | #lang turnstile/quicklang
(extends "stlc+sum.rkt")
(provide fix)
(define-typed-syntax (fix e) ≫
[⊢ e ≫ e- ⇒ (~→ τ_in τ_out)]
[τ_in τ= τ_out]
----
[⊢ ((λ- (f-)
(#%app- (λ- (x-) (#%app- f- (λ- (v-) (#%app- (#%app- x- x-) v-))))
(λ- (x-) (#%app- f- (λ- (v-) (#%app- (#%app- x- x-) v-))))... |
4f5a6fcd3b2a5b3d17842ab64139b70ed032d58ceda390fa4b96f344aeb6f4fd | rescript-lang/rescript-compiler | ast_pat.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/frontend/ast_pat.ml | ocaml | * [arity_of_fun pat e] tells the arity of
expression [fun pat -> e]
Check more complex patterns is needed or not | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
938e81f8d049081621731ffd86cfa747aca3b9cabe89f347d0fb2637973d3552 | djblue/portal | drag_and_drop.cljs | (ns ^:no-doc portal.ui.drag-and-drop
(:require ["react" :as react]
[clojure.string :as string]
[portal.async :as a]
[portal.runtime.edn :as edn]
[portal.ui.state :as state]
[portal.ui.styled :as s]
[portal.ui.viewer.csv :as csv]
[port... | null | https://raw.githubusercontent.com/djblue/portal/28ce39007dee47cff6246f28ae4bb80398da80db/src/portal/ui/drag_and_drop.cljs | clojure | (ns ^:no-doc portal.ui.drag-and-drop
(:require ["react" :as react]
[clojure.string :as string]
[portal.async :as a]
[portal.runtime.edn :as edn]
[portal.ui.state :as state]
[portal.ui.styled :as s]
[portal.ui.viewer.csv :as csv]
[port... | |
edcdc98775ba8eb8ec787f242e209a1f5ebffe4b10fb207d492e9d1a67ecd9ad | froggey/Mezzano | ratio.lisp | ;;;; Ratios
(in-package :mezzano.internals.numbers.ratio)
(declaim (inline ratiop))
(defun ratiop (object)
(int::%object-of-type-p object int::+object-tag-ratio+))
(defun numerator (rational)
(etypecase rational
(ratio (int::%object-ref-t rational int::+ratio-numerator+))
(integer rational)))
(defun den... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/system/numbers/ratio.lisp | lisp | Ratios
These functions let us create floats from bits with the
significand uniformly represented as an integer. This is less
efficient for double floats, but is more convenient when making
special values, etc.
Convert a ratio to a float. We avoid any rounding error by doing an
integer division. Accuracy is impor... |
(in-package :mezzano.internals.numbers.ratio)
(declaim (inline ratiop))
(defun ratiop (object)
(int::%object-of-type-p object int::+object-tag-ratio+))
(defun numerator (rational)
(etypecase rational
(ratio (int::%object-ref-t rational int::+ratio-numerator+))
(integer rational)))
(defun denominator (ra... |
df30559a79e942d924bc496d4323f96a771ed30a9c9f378bc9e0ae8ff6124aa8 | nvkv/slackingbird | message.clj | (ns slackingbird.telegram.message
(:require [clojure.string :as str]
[slackingbird.slack.webhook-payload :refer :all]
[slackingbird.slack.markup :refer :all]))
(defn slack-color->emoji [color-string]
(case color-string
"good" "✅"
"warning" "⚠️"
"danger" "❌"
"⭕"... | null | https://raw.githubusercontent.com/nvkv/slackingbird/195eccf1eb22be6379dfa06fef7e18845607ca1e/src/slackingbird/telegram/message.clj | clojure | (ns slackingbird.telegram.message
(:require [clojure.string :as str]
[slackingbird.slack.webhook-payload :refer :all]
[slackingbird.slack.markup :refer :all]))
(defn slack-color->emoji [color-string]
(case color-string
"good" "✅"
"warning" "⚠️"
"danger" "❌"
"⭕"... | |
03199266224ec7a23529709f153a4d0101ecdbdaf4baec5ffe527bd1cdce8f63 | rmloveland/scheme48-0.53 | c-record.scm | Copyright ( c ) 1994 by . See file COPYING .
(define-c-generator make-record #t
(lambda (args)
(bug "no eval method for MAKE-RECORD"))
(lambda (call depth)
(reconstruct-make-record call depth))
(lambda (call port indent)
(let ((type (node-type call)))
(write-c-coercion type port)
(... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/ps-compiler/prescheme/primop/c-record.scm | scheme | Copyright ( c ) 1994 by . See file COPYING .
(define-c-generator make-record #t
(lambda (args)
(bug "no eval method for MAKE-RECORD"))
(lambda (call depth)
(reconstruct-make-record call depth))
(lambda (call port indent)
(let ((type (node-type call)))
(write-c-coercion type port)
(... | |
f742dc89b3e67a32aba8e1be137312a006c8ed58dc9a17d4fe4a65a4264138d8 | EduardSergeev/monad-memo | State.hs | |
Module : Control . . Memo
Copyright : ( c ) 2011
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable ( multi - param classes , flexible instances )
Defines " MemoStateT " - generalized ( to any " Data . ... | null | https://raw.githubusercontent.com/EduardSergeev/monad-memo/f941013e45c5e190ebce08935857ec10355584fd/Control/Monad/Trans/Memo/State.hs | haskell | * Internal
| Memoization monad transformer based on `StateCache`
along with the final state of the internal pure container wrapped in monad
This function discards the cache
| Memoization monad based on `StateCache`
along with the final state of the internal pure container
# INLINE lookup # | |
Module : Control . . Memo
Copyright : ( c ) 2011
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable ( multi - param classes , flexible instances )
Defines " MemoStateT " - generalized ( to any " Data . ... |
0bd9362fe989baef971f3cbd2328cb34fb6e1cc271b3e789222d0af77164518a | gwkkwg/lift | order-of-operations.lisp | (in-package #:lift-test)
;; see lift-test-setup-teardown tests too
(deftestsuite order-of-operations (lift-test)
()
(:setup
(setf *test-notepad* nil)))
(deftestsuite order-of-operations-helper ()
((slot (push :slot-init-parent *test-notepad*)))
(:setup
(push :setup-parent *test-notepad*))
(:teardown
... | null | https://raw.githubusercontent.com/gwkkwg/lift/2594160d6ca3a77d8750110dfa63214256aab852/test/order-of-operations.lisp | lisp | see lift-test-setup-teardown tests too | (in-package #:lift-test)
(deftestsuite order-of-operations (lift-test)
()
(:setup
(setf *test-notepad* nil)))
(deftestsuite order-of-operations-helper ()
((slot (push :slot-init-parent *test-notepad*)))
(:setup
(push :setup-parent *test-notepad*))
(:teardown
(push :teardown-parent *test-notepad*))... |
7a2a54b0fe9dae3ac7da779d0713c72f788dd7adfc410712763ecda0008611a4 | manuel-serrano/bigloo | evaluate_avar.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / runtime / Eval / evaluate_avar.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/runtime/Eval/evaluate_avar.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Compute free/closed variable for the lambda-based evaluator */
*===========================... | * serrano / prgm / project / bigloo / runtime / Eval / evaluate_avar.scm * /
* Author : * /
* Creation : Tue Feb 8 16:40:08 2011 * /
* Last change : Fri Nov 30 09:25:02 2012 ( serrano ) * /
* Cop... |
05eaeebad6dfb91ddfd6bdba0e9df9636685522bcda8de6b42f7f7e5978d0508 | freckle/stackctl | CloudFormationSpec.hs | module Stackctl.AWS.CloudFormationSpec
( spec
) where
import Stackctl.Prelude
import Data.List (isSuffixOf)
import Stackctl.AWS.CloudFormation
import Test.Hspec
spec :: Spec
spec = do
describe "readParameter" $ do
it "refuses empty key" $ do
readParameter "=Value"
`shouldSatisfy` either ("emp... | null | https://raw.githubusercontent.com/freckle/stackctl/158d7e43a5127654b7ce92d6a1fa6d33eac1d959/test/Stackctl/AWS/CloudFormationSpec.hs | haskell | module Stackctl.AWS.CloudFormationSpec
( spec
) where
import Stackctl.Prelude
import Data.List (isSuffixOf)
import Stackctl.AWS.CloudFormation
import Test.Hspec
spec :: Spec
spec = do
describe "readParameter" $ do
it "refuses empty key" $ do
readParameter "=Value"
`shouldSatisfy` either ("emp... | |
e5724e1b18288a2147d42d3a83a266e835b8d79ec38b24e9b426c03190efb4c1 | namenu/advent-of-code | util.cljc | (ns aoc.util
(:require #?(:clj
[clojure.java.io :as io])))
#?(:clj
(defn input [year day]
(-> (format "year%d/day%02d.in" year day) io/resource slurp)))
#?(:clj
(defn input-lines [year day]
(-> (format "year%d/day%02d.in" year day) io/resource io/reader line-seq)))
(defn find-first [... | null | https://raw.githubusercontent.com/namenu/advent-of-code/9633eabe1373a99c22e9787966903f9d62cce8f8/2017/clojure/src/aoc/util.cljc | clojure | memoize recursive function with Y-combinator | (ns aoc.util
(:require #?(:clj
[clojure.java.io :as io])))
#?(:clj
(defn input [year day]
(-> (format "year%d/day%02d.in" year day) io/resource slurp)))
#?(:clj
(defn input-lines [year day]
(-> (format "year%d/day%02d.in" year day) io/resource io/reader line-seq)))
(defn find-first [... |
ce453b27c09658d3000c98687799bac35f4e880f844211c63a24845c1f99bd00 | HealthSamurai/bxb | chu.cljc | (ns mappers.chu
(:refer-clojure :exclude [import]))
(defn operand [ex]
(fn [e]
(if (coll? ex)
(get-in e ex)
(if (keyword? ex)
(get e ex)
ex))))
(def cmp {:= = :< < :> > :<= <= :>= >=})
(defn pred [[op l r]]
#((get cmp op)
((operand l) %) ((operand r) %)))
(defn comp-expr [e... | null | https://raw.githubusercontent.com/HealthSamurai/bxb/2275b0b8498035e78f23608756465bba945522ec/src/mappers/chu.cljc | clojure | (ns mappers.chu
(:refer-clojure :exclude [import]))
(defn operand [ex]
(fn [e]
(if (coll? ex)
(get-in e ex)
(if (keyword? ex)
(get e ex)
ex))))
(def cmp {:= = :< < :> > :<= <= :>= >=})
(defn pred [[op l r]]
#((get cmp op)
((operand l) %) ((operand r) %)))
(defn comp-expr [e... | |
8c6ff225865229c92d57b18f0cd63e82471ec6ea638549344d06a181aa55bf77 | haskell-repa/repa | Config.hs |
module Config where
import Data.Char
import Data.Maybe
import Prelude as P
-- | Command-line configuration.
data Config
= Config
{ configDrop :: Int
, configFileIn :: Maybe FilePath
, configFormat :: Maybe Format }
data Format
= FormatCSV
| FormatTSV
... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-tools/tools/fields/Config.hs | haskell | | Command-line configuration.
| Starting configuration.
| Parse command-line arguments into a configuration.
| Die on wrong usage at the command line.
| Die if the lines do not have the same number of fields. |
module Config where
import Data.Char
import Data.Maybe
import Prelude as P
data Config
= Config
{ configDrop :: Int
, configFileIn :: Maybe FilePath
, configFormat :: Maybe Format }
data Format
= FormatCSV
| FormatTSV
configZero :: Config
configZero
... |
ffac4a4a21ebdaffb80bf17cc5b48d754cbb9796e98803389a875e98ec39ad9b | achirkin/vulkan | VK_EXT_shader_subgroup_vote.hs | # OPTIONS_HADDOCK not - home #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MagicHash #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE Strict #-}
{-# LANGUAGE ViewPatterns #-}
module Graphics.Vulkan.Ext.VK_EXT_shader_subgroup_vote
* Vulkan extension : @VK_EXT_shader_subgroup_vote@
-- |
... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_EXT_shader_subgroup_vote.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE Strict #
# LANGUAGE ViewPatterns #
|
supported: @vulkan@
contact: @Daniel Koch @dgkoch@
type: @device@
# INLINE _VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME # | # OPTIONS_HADDOCK not - home #
# LANGUAGE PatternSynonyms #
module Graphics.Vulkan.Ext.VK_EXT_shader_subgroup_vote
* Vulkan extension : @VK_EXT_shader_subgroup_vote@
author :
Extension number :
VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION,
pattern VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION,
VK... |
ef0038a03c47d0d4ae4a2de2a6261e812e750c805d12b8497d43ebf16d758893 | NaaS/motto | naasty_transformation.ml |
Supporting functions for definiting guarded transformations on the
NaaSty intermediate language
, Cambridge University Computer Lab , October 2015
Use of this source code is governed by the Apache 2.0 license ; see LICENSE
Supporting functions for definiting guarded transformations on the
... | null | https://raw.githubusercontent.com/NaaS/motto/8ff3eba534be816d861dcfced93b68d593a12e2b/il/naasty_transformation.ml | ocaml | The remaining forms of statements do not have sub-statements |
Supporting functions for definiting guarded transformations on the
NaaSty intermediate language
, Cambridge University Computer Lab , October 2015
Use of this source code is governed by the Apache 2.0 license ; see LICENSE
Supporting functions for definiting guarded transformations on the
... |
d8e1fc4536695671d8c0e9caa948de93dedb99457a188d0ec16c9ea15b597a8d | sshirokov/CLSQL | test-connection.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: test-connection.lisp
Purpose : Tests for CLSQL database connections
Authors : and
Created : March 2004
;;;;
Thi... | null | https://raw.githubusercontent.com/sshirokov/CLSQL/c680432aea0177677ae2ee7b810a7404f7a05cab/tests/test-connection.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
Name: test-connection.lisp
(), also known as the LLGPL.
*************************************************************************
check that we can issue basic command... | Purpose : Tests for CLSQL database connections
Authors : and
Created : March 2004
This file is part of CLSQL .
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public License
(in-package #:clsql-tests)
(setq *rt-connection*
... |
8cf0398cee9ee1448c4be9956511d49993ce35b23040d77a65133384465af108 | lispnik/cl-http | start.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : cl - user ; Base : 10 -*-
;;
start.lisp
;;
this shows one way to load and start cl - http on acl .
It always starts the server on port 8000 since this will work regardless
of whether you 're on Windows or Unix .
;;
;; See the -read-me-.text file fo... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/acl501/start.lisp | lisp | Syntax : ansi - common - lisp ; Package : cl - user ; Base : 10 -*-
See the -read-me-.text file for alternative ways.
| start.lisp
this shows one way to load and start cl - http on acl .
It always starts the server on port 8000 since this will work regardless
of whether you 're on Windows or Unix .
(in-package :cl-user)
(load "load.lisp")
(build-cl-http)
(http:start :port 8000)
(load-test)
|
5466c804cf43394d4ba91f63a6e7308be45c9c2a87e62b03d0f8cf4d8b5f8179 | ogri-la/strongbox | utils.clj | (ns strongbox.utils
(:require
[strongbox
[specs :as sp]
[constants :as constants]]
[clojure.java.shell]
[clojure.string :refer [lower-case]]
[clojure.java.io]
[clojure.spec.alpha :as s]
[clojure.pprint]
[orchestra.core :refer [defn-spec]]
[orchestra.spec.test :as st]
[clojure.data.j... | null | https://raw.githubusercontent.com/ogri-la/strongbox/b00e6cb6c8719c2a70a431ebc6421488b5f82009/src/strongbox/utils.clj | clojure | these checks are important despite `defn-spec` as instrumentation is disabled for release.
app may not have been started yet
app may not have been started yet
this is a programming error, not a user error. if there is a problem we don't want N-1 more problems
too noisy even for :debug when nothing has expired
tem... | (ns strongbox.utils
(:require
[strongbox
[specs :as sp]
[constants :as constants]]
[clojure.java.shell]
[clojure.string :refer [lower-case]]
[clojure.java.io]
[clojure.spec.alpha :as s]
[clojure.pprint]
[orchestra.core :refer [defn-spec]]
[orchestra.spec.test :as st]
[clojure.data.j... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.