_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 |
|---|---|---|---|---|---|---|---|---|
68675702f74c9bc942b89e99ca38eecd1f184993ace79697a37e79353bcda4d0 | kfish/const-math-ghc-plugin | numrun011.hs | import Data.Ratio
main = print (fromRational (1 % 85070591730234615865843651857942052864) :: Float)
| null | https://raw.githubusercontent.com/kfish/const-math-ghc-plugin/c1d269e0ddc72a782c73cca233ec9488f69112a9/tests/ghc-7.4/numrun011.hs | haskell | import Data.Ratio
main = print (fromRational (1 % 85070591730234615865843651857942052864) :: Float)
| |
8dc81cfcba9cec7ab328a2359c17f73e80e83ab23acd7da569e742424c4d689f | INRIA/zelus | unsafe.ml | let sgn(x) = if x >= 0.0 then 1.0 else -1.0
| null | https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/examples/misc/unsafe.ml | ocaml | let sgn(x) = if x >= 0.0 then 1.0 else -1.0
| |
fc331d9b4b61949be46f0604c327a2a714f8a8d25314a1f54253ae917ce66cfa | takikawa/racket-ppa | info.rkt | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("rackunit-lib" "rackunit-doc" "rackunit-gui" "rackunit-plugin-lib"))) (define implies (quote ("rackunit-lib" "rackunit-doc" "rackunit-gui" "rackunit-plugin-lib"))) (define pkg-desc "RackUnit testing framework") (define pkg... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/rackunit/info.rkt | racket | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("rackunit-lib" "rackunit-doc" "rackunit-gui" "rackunit-plugin-lib"))) (define implies (quote ("rackunit-lib" "rackunit-doc" "rackunit-gui" "rackunit-plugin-lib"))) (define pkg-desc "RackUnit testing framework") (define pkg... | |
b60e23ccac0657ef0f3f21eea6e391b29f79f6cd1e3ba8d270fe654b127fc24d | lambdamikel/DLMAPS | dispatcher10.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*-
(in-package :THEMATIC-SUBSTRATE)
;;;
;;;
;;;
(defgeneric get-parser-class-for-substrate (substrate))
;;;
;;; Interface: Substrate <-> Query
;;;
#+:dlmaps (defmethod get-parser-class-for-substrate ((substrate subs... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/query/dispatcher10.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : THEMATIC - SUBSTRATE ; Base : 10 -*-
Interface: Substrate <-> Query
zurueckliefert...
predicate-queries, sowie and/or -> homogeneous complex queries!
befragbar
dieser Parser versteht nur RACER-Descriptions |
(in-package :THEMATIC-SUBSTRATE)
(defgeneric get-parser-class-for-substrate (substrate))
#+:dlmaps (defmethod get-parser-class-for-substrate ((substrate substrate))
'substrate-parser)
#+:dlmaps (defmethod get-parser-class-for-substrate ((substrate racer-substrate))
'racer-substrate-parser)
#+:dlmaps (def... |
809cba7b961fceea76dd1c3321a626052262387f421b3a06d649cf17d7406363 | SonyCSLParis/fcg-hybrids | constituent-structures.lisp | ;; Copyright 2019-present
Sony Computer Science Laboratories Paris
( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;; -2.0
;; Unless required by a... | null | https://raw.githubusercontent.com/SonyCSLParis/fcg-hybrids/7db632609a36dfa915bcc463b152c0b2bea962d9/structures/constituent-structures.lisp | lisp | Copyright 2019-present
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Sony Computer Science Laboratories Paris
( )
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package :fcg)
(export '(represent-constituent-structure))
ICA = Immediate Constituent Analysis
(defun convert-ica-string-to-ica-list (string)
"Converts a string r... |
5c526b4f39bf898f12f5a0c318b7ba2a02530f19d6fc3a6025aa72d642b6d264 | YellPika/constraint-rules | Rule.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE KindSignatures ... | null | https://raw.githubusercontent.com/YellPika/constraint-rules/b06dfae3fe01c45c1d78e5611c031ab6591d2e66/src/Data/Constraint/Rule.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE KindSignatures #
# LANGUAGE MonoLocalBinds #
# LANGUAGE RankNTypes # | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
# LANGUAGE UnicodeSyntax #
module Data.Constraint.Rule (
RuleUsag... |
6f013dc929a6f679d2433168a88f9638828607a81a44e8c7f3cb7dc57597cc46 | S8A/htdp-exercises | ex159.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex159) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex159.rkt | racket | about the language level of this file in a form that our tools can easily process.
Basic graphical constants
N Image -> Image
produces a column of n copies of img
N Image -> Image
produces a row of n copies of img
Computed graphical constants
– (add1 N)
interpretation represents the counting numbers
A ListOfP... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex159) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ... |
94207e56240a8f4307e71ea77c0f4d0a481e9bb656b515dc2711e21b54386252 | mirage/ocaml-matrix | matrix_ctos.mli | open Json_encoding
open Matrix_common
module Account_data : sig
module Put : sig
module Query : Empty.QUERY
module Request : sig
type%accessor t = {data: Ezjsonm.value}
val encoding : t encoding
end
module Response : Empty.JSON
end
module Get : sig
module Query : Empty.QUERY
... | null | https://raw.githubusercontent.com/mirage/ocaml-matrix/2a58d3d41c43404741f2dfdaf1d2d0f3757b2b69/lib/matrix-ctos/matrix_ctos.mli | ocaml | Once again not advertised in the documentation
see fully_read.ml
not in the documentation
to correct
Not on the documentation | open Json_encoding
open Matrix_common
module Account_data : sig
module Put : sig
module Query : Empty.QUERY
module Request : sig
type%accessor t = {data: Ezjsonm.value}
val encoding : t encoding
end
module Response : Empty.JSON
end
module Get : sig
module Query : Empty.QUERY
... |
d271cd64d4cc12231e70d1e521d04004d0ddf25ba65b39216dce7b06f0b078a4 | ds-wizard/engine-backend | List_POST_FromTemplate.hs | module Wizard.Specs.API.Questionnaire.List_POST_FromTemplate (
list_post_fromTemplate,
) where
import Data.Aeson (encode)
import Network.HTTP.Types
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai hiding (shouldRespondWith)
import Test.Hspec.Wai.Matcher
import Shared.Api.Resource.Error.Error... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/test/Wizard/Specs/API/Questionnaire/List_POST_FromTemplate.hs | haskell | ------------------------------------------------------------------------
POST /questionnaires?fromTemplate=true
------------------------------------------------------------------------
----------------------------------------------------
----------------------------------------------------
-----------------------... | module Wizard.Specs.API.Questionnaire.List_POST_FromTemplate (
list_post_fromTemplate,
) where
import Data.Aeson (encode)
import Network.HTTP.Types
import Network.Wai (Application)
import Test.Hspec
import Test.Hspec.Wai hiding (shouldRespondWith)
import Test.Hspec.Wai.Matcher
import Shared.Api.Resource.Error.Error... |
e64922fa85ff87b905efae2590d06852cb6eb5b733b550f23f11465954940ff3 | McParen/croatoan | legacy_coding.lisp | (in-package :croatoan)
;;; legacy coding
;;; -island.net/ncurses/man/legacy_coding.3x.html
;;; C prototypes
;; int use_legacy_coding(int level);
;;; Low-level C functions
(defcfun ("use_legacy_coding" %use-legacy-coding) :int (level :int))
;;; High-level Lisp wrappers
Possible values : 0 ( default ) , 1 and 2 ... | null | https://raw.githubusercontent.com/McParen/croatoan/413e8855b78a2e408f90efc38e8485f880691684/src/legacy_coding.lisp | lisp | legacy coding
-island.net/ncurses/man/legacy_coding.3x.html
C prototypes
int use_legacy_coding(int level);
Low-level C functions
High-level Lisp wrappers
NOTES | (in-package :croatoan)
(defcfun ("use_legacy_coding" %use-legacy-coding) :int (level :int))
Possible values : 0 ( default ) , 1 and 2 .
(defun set-char-representation (level)
"Set how char-to-string will represent a char."
(%use-legacy-coding level))
This affects % unctrl / char - to - string . See uti... |
1949ed1f479a3bb4d4326a774742dcebe62a1deb21b71041929625246deb7aa0 | awslabs/s2n-bignum | bignum_mod_p256k1_4.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_mod_p256k1_4.ml | ocaml | =========================================================================
Reduction modulo p_256k1, the field characteristic for secp256k1.
=========================================================================
*** print_literal_from_elf "arm/secp256k1/bignum_mod_p256k1_4.o";;
***
-------------------... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
let bignum_mod_p256k1_4_mc = define_assert_from_elf "bignum_mod_p2... |
4cfefdd8638e3ca3dc4a85bb13b7bb29dcb2250dd12080a473f648628d5617b9 | borkdude/aoc2017 | day11.clj | (ns day11
(:require
[clojure.string :as str]
[util :refer [read-first]])
(:import [java.lang Math]))
(defn data
[]
(as-> "day11.txt" $
(read-first $)
(str/split $ #",")))
(defn distance ^long
[coords]
(/ ^long (apply +
(map
#(Math/abs ^long
... | null | https://raw.githubusercontent.com/borkdude/aoc2017/0f5bce5e496d65d0e53a8983e71ea3462aa0569c/src/day11.clj | clojure | Scratch | (ns day11
(:require
[clojure.string :as str]
[util :refer [read-first]])
(:import [java.lang Math]))
(defn data
[]
(as-> "day11.txt" $
(read-first $)
(str/split $ #",")))
(defn distance ^long
[coords]
(/ ^long (apply +
(map
#(Math/abs ^long
... |
49fdbfe2c60146e360e00336b0dedcc60fa634a9e1ff9b28cc3d9ddc53260abd | ylgrgyq/resilience-for-clojure | ratelimiter_test.clj | (ns resilience.ratelimiter-test
(:refer-clojure :exclude [name reset!])
(:require [clojure.test :refer :all]
[resilience.ratelimiter :refer :all]
[resilience.core :as resilience])
(:import (java.util.concurrent TimeUnit)
(io.github.resilience4j.ratelimiter RequestNotPermitted)))... | null | https://raw.githubusercontent.com/ylgrgyq/resilience-for-clojure/7b0532d1c72d416020402c15eb5699143be4b7bf/test/resilience/ratelimiter_test.clj | clojure | due to implementation to acquire the next permission after all permissions
were acquired is not need to wait whole period configured by :limit-for-period
we registered every kind of events twice, so statistic should be double | (ns resilience.ratelimiter-test
(:refer-clojure :exclude [name reset!])
(:require [clojure.test :refer :all]
[resilience.ratelimiter :refer :all]
[resilience.core :as resilience])
(:import (java.util.concurrent TimeUnit)
(io.github.resilience4j.ratelimiter RequestNotPermitted)))... |
34503f8bde01ab8c047f35248c93ae67099f3edf7995d0d6758a041bda9fd634 | Incubaid/baardskeerder | index_test.ml |
* This file is part of Baardskeerder .
*
* Copyright ( C ) 2011 Incubaid BVBA
*
* Baardskeerder 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 , o... | null | https://raw.githubusercontent.com/Incubaid/baardskeerder/3975cb7f0e92e1f35eeab17beeb906344e43dae0/src/index_test.ml | ocaml |
* This file is part of Baardskeerder .
*
* Copyright ( C ) 2011 Incubaid BVBA
*
* Baardskeerder 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 , o... | |
233368031650ea9f7b569639c6249d2157021ac7f51401dc2e1aa87918d2beb7 | mbj/mhs | TH.hs | module LHT.TH (readFile) where
import Instances.TH.Lift ()
import LHT.Prelude
import Language.Haskell.TH.Syntax
import qualified Data.Text.IO as Text
import qualified System.Path as Path
readFile :: Path.AbsRelFile -> Q (TExp Text)
readFile path = do
qAddDependentFile filepath
TExp <$> (lift =<< runIO (Text.rea... | null | https://raw.githubusercontent.com/mbj/mhs/391fe59fa77ac9a8b197fafe710870e426093460/lht/src/LHT/TH.hs | haskell | module LHT.TH (readFile) where
import Instances.TH.Lift ()
import LHT.Prelude
import Language.Haskell.TH.Syntax
import qualified Data.Text.IO as Text
import qualified System.Path as Path
readFile :: Path.AbsRelFile -> Q (TExp Text)
readFile path = do
qAddDependentFile filepath
TExp <$> (lift =<< runIO (Text.rea... | |
7de0d02326179b023f320f4966fec168b171cfe89390299b7dd3f14a24135e30 | cyverse-archive/DiscoveryEnvironmentBackend | json_body.clj | (ns jex.json-body
(:use [clojure.java.io :only [reader]]
[clojure-commons.error-codes]
[slingshot.slingshot :only [try+ throw+]])
(:require [cheshire.core :as cheshire]
[clojure.tools.logging :as log]))
(defn- json-body?
[request]
(let [content-type (:content-type request)]
(not... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/JEX/src/jex/json_body.clj | clojure | (ns jex.json-body
(:use [clojure.java.io :only [reader]]
[clojure-commons.error-codes]
[slingshot.slingshot :only [try+ throw+]])
(:require [cheshire.core :as cheshire]
[clojure.tools.logging :as log]))
(defn- json-body?
[request]
(let [content-type (:content-type request)]
(not... | |
fe4fe65ad20a32b4c3efff9c484ee3570d4d9b7049f9f5e5566dc6a87b2f8b29 | Bike/hominy | core.lisp | (in-package #:hominy/baselib)
;;; Define a "core" environment. This contains definitions for parts of the standard library
;;; that are pretty intrinsic to the semantics of the language, versus modules, which while
;;; critical (e.g. numbers) are in a sense optional.
;;; Pretty vague criterion, admittedly. But basical... | null | https://raw.githubusercontent.com/Bike/hominy/ee8bb886d26f9c04eadf978ddbf4141c687b0c74/baselib/core.lisp | lisp | Define a "core" environment. This contains definitions for parts of the standard library
that are pretty intrinsic to the semantics of the language, versus modules, which while
critical (e.g. numbers) are in a sense optional.
Pretty vague criterion, admittedly. But basically it means stuff relating to the types
us... | (in-package #:hominy/baselib)
(defvar *empty* (i:make-fixed-environment #() #()))
(defun binds? (symbol environment)
"Returns (Lisp) true iff symbol is bound in environment, directly or indirectly."
(labels ((aux (environment)
(if (nth-value 1 (i:local-cell symbol environment))
(ret... |
9ec4820ed598ddb99eac0715ad876c16c73b0624f2818d02f125476aac714fea | aantron/luv | once.mli | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
* Once - only initialization .
See
{ { : #once-only-initialization }
{ i Once - only initialization } } in libuv .
See
{{:#once-only-initialization}
{i... | null | https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/once.mli | ocaml | * Binds {{:#c.uv_once_t}
[uv_once_t]}.
* Like {!Luv.Once.once}, but takes a pointer to a C function. | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
* Once - only initialization .
See
{ { : #once-only-initialization }
{ i Once - only initialization } } in libuv .
See
{{:#once-only-initialization}
{i... |
fb73c46e5d35663a43d1e5955fe34c5cd4afd253bb159546a163c3c217fd4e3b | CryptoKami/cryptokami-core | Swagger.hs | -- | Wallet swagger implementation
# OPTIONS_GHC -F -pgmF autoexporter #
| null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet/src/Pos/Wallet/Web/Swagger.hs | haskell | | Wallet swagger implementation |
# OPTIONS_GHC -F -pgmF autoexporter #
|
c7052a41d13d0faa1465c9ce9ec1eb69b444076f4c5d2431728c812366a5cd2f | mpickering/apply-refact | Bracket1.hs | no = f (x x) | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Bracket1.hs | haskell | no = f (x x) | |
9eb8e9ae34ef1cb99aba33f4867fa0cbffb8c23cc307d2ffac3078116b368e67 | semperos/rankle | util_test.clj | (ns com.semperos.rankle.util-test
(:require [clojure.test :refer :all]
[com.semperos.rankle.util :as util]))
(def ^:dynamic *processed*)
(def ^:dynamic *iteration*)
(deftest test-cond-table
(testing "Default cond-table `and`"
(let [success? (fn [] (= *processed* ::success))
failure?... | null | https://raw.githubusercontent.com/semperos/rankle/d898c144e33056d743848620f17564d88d87e874/test/com/semperos/rankle/util_test.clj | clojure | (ns com.semperos.rankle.util-test
(:require [clojure.test :refer :all]
[com.semperos.rankle.util :as util]))
(def ^:dynamic *processed*)
(def ^:dynamic *iteration*)
(deftest test-cond-table
(testing "Default cond-table `and`"
(let [success? (fn [] (= *processed* ::success))
failure?... | |
1aa9bf5e81c9dde84c63e2b739c819ddcb2ad7cba71ebec39ab0f29982456df9 | haskell-lisp/yale-haskell | parser-macros.scm | Macro definitions for the parser & lexer .
;;; This macro allows debugging of the lexer. Before releasing, this can
;;; be replaced by (begin ,@body) for faster code.
(define-syntax (trace-parser tag . body)
; `(begin
; (let* ((k (tracing-parse/entry ',tag))
; (res (begin ,@body)))
; (tracing-pars... | null | https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/parser/parser-macros.scm | scheme | This macro allows debugging of the lexer. Before releasing, this can
be replaced by (begin ,@body) for faster code.
`(begin
(let* ((k (tracing-parse/entry ',tag))
(res (begin ,@body)))
(tracing-parse/exit ',tag k res)
res))
The lexer used a macro, char-case, to dispatch on the syntactic c... | Macro definitions for the parser & lexer .
(define-syntax (trace-parser tag . body)
(declare (ignore tag))
`(begin ,@body)
)
Macros used by the lexer .
(define *lex-definitions*
(formfeed 12)
(whitechar #\newline #\space #\tab formfeed vtab)
(small #\a - #\z)
(large #\A - #\Z)
(digi... |
0189dbe85d2834412d8afb5d18096324d751d4d56d8ede5364e8f16cea823076 | aryx/lfs | atom.ml | (** The classic atoms found in most logics (propositional logic, predicate logic, etc.). *)
open Logic
module type PARAM =
sig
val names : string -> bool (** The predicate for admissible names for atoms. *)
end
module Make (Param : PARAM) : Logic.T =
struct
include Default
let props () =
{(n... | null | https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/logfun/src/atom.ml | ocaml | * The classic atoms found in most logics (propositional logic, predicate logic, etc.).
* The predicate for admissible names for atoms. |
open Logic
module type PARAM =
sig
end
module Make (Param : PARAM) : Logic.T =
struct
include Default
let props () =
{(no_props "Atom") with
df = isok;
st' = isok;
sg' = isok;
po_entails = isok;
cs_entails = isok;
cp_entails = isok;
cp'_entails = ... |
4a19155e2d13d6855b4c1c17bfbb45966b2dfe3fc546ec6739eb37c54db16ab8 | alaisi/postgres.async | project.clj | (defproject alaisi/postgres.async "0.9.0-SNAPSHOT"
:description "Asynchronous PostgreSQL Clojure client"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url ""}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/core.async "0.2.... | null | https://raw.githubusercontent.com/alaisi/postgres.async/fd27ecc504f29c033da3cb12bd8e8a61539026b7/project.clj | clojure | (defproject alaisi/postgres.async "0.9.0-SNAPSHOT"
:description "Asynchronous PostgreSQL Clojure client"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url ""}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/core.async "0.2.... | |
d2f0282166a1661475c4d5f81bdc10eeedd2429d5b43224e98cd0f2312306c91 | igrishaev/remus | project.clj | (defproject remus "0.2.5-SNAPSHOT"
:description "Attentive RSS/Atom feed parser"
:deploy-repositories
{"releases" {:url "" :creds :gpg}}
:release-tasks
[["vcs" "assert-committed"]
["test"]
["change" "version" "leiningen.release/bump-version" "release"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
... | null | https://raw.githubusercontent.com/igrishaev/remus/97807daf3c05f247915d728e3509fe4588fee145/project.clj | clojure | (defproject remus "0.2.5-SNAPSHOT"
:description "Attentive RSS/Atom feed parser"
:deploy-repositories
{"releases" {:url "" :creds :gpg}}
:release-tasks
[["vcs" "assert-committed"]
["test"]
["change" "version" "leiningen.release/bump-version" "release"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
... | |
f379412cc1da0e1ea24a06fff230fcc69631e9a6ecd13264f728b2a49ffd0386 | 8thlight/hyperion | project.clj | (defproject hyperion/hyperion-sqlite "3.7.1"
:description "SQLite Datastore for Hyperion"
:dependencies [[org.clojure/clojure "1.5.1"]
[hyperion/hyperion-api "3.7.1"]
[hyperion/hyperion-sql "3.7.1"]
[org.xerial/sqlite-jdbc "3.7.2"]
[chee "1.1.0"]]
... | null | https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/sqlite/project.clj | clojure | (defproject hyperion/hyperion-sqlite "3.7.1"
:description "SQLite Datastore for Hyperion"
:dependencies [[org.clojure/clojure "1.5.1"]
[hyperion/hyperion-api "3.7.1"]
[hyperion/hyperion-sql "3.7.1"]
[org.xerial/sqlite-jdbc "3.7.2"]
[chee "1.1.0"]]
... | |
b244456a6832cd7a94da1f8cbe4ea142bfa14fb3c4c2681f1061884b85a0fffa | JHU-PL-Lab/jaylang | Fibonacci00.ml |
let rec bot _ = bot ()
let fail _ = assert false
let rec fib_without_checking_1060 set_flag_fib_1052 s_fib_n_1049 n_1031 =
let set_flag_fib_1052 = true
in
let s_fib_n_1049 = n_1031
in
if n_1031 < 2 then
1
else
fib_without_checking_1060 set_flag_fib_1052 s_fib_n_1... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/termination/Fibonacci00.ml | ocaml |
let rec bot _ = bot ()
let fail _ = assert false
let rec fib_without_checking_1060 set_flag_fib_1052 s_fib_n_1049 n_1031 =
let set_flag_fib_1052 = true
in
let s_fib_n_1049 = n_1031
in
if n_1031 < 2 then
1
else
fib_without_checking_1060 set_flag_fib_1052 s_fib_n_1... | |
d8ca0cb47e5b01e16eb1d64e1f0a796a5a8f8d81f65c4602adf77180b08f5ffb | Octachron/olivine | funptr.ml |
module Aliases= struct
module L = Info.Linguistic
module Ty = Lib.Ty
module C = Common
end
open Aliases
open Item
open Utils
let mkty ctx args ret =
let ret = Type.converter ctx ~degraded:true ret in
let fn = C.listr (fun l r -> [%expr[%e l] @-> [%e r] ])
(Type.converter ctx ~degraded:true)
args
... | null | https://raw.githubusercontent.com/Octachron/olivine/e93df595ad1e8bad5a8af689bac7d150753ab9fb/aster/funptr.ml | ocaml |
module Aliases= struct
module L = Info.Linguistic
module Ty = Lib.Ty
module C = Common
end
open Aliases
open Item
open Utils
let mkty ctx args ret =
let ret = Type.converter ctx ~degraded:true ret in
let fn = C.listr (fun l r -> [%expr[%e l] @-> [%e r] ])
(Type.converter ctx ~degraded:true)
args
... | |
237779bdb56daf654a451f2a33a6636d08e769da1ef76e1895ebca37289f615f | codedownio/aeson-typescript | LegalNameSpec.hs |
module LegalNameSpec where
import Data.Aeson.TypeScript.LegalName
import Data.List.NonEmpty (NonEmpty (..))
import Test.Hspec
tests :: Spec
tests = describe "Data.Aeson.TypeScript.LegalName" $ do
describe "checkIllegalNameChars" $ do
describe "legal Haskell names" $ do
it "allows an uppercase letter" $ d... | null | https://raw.githubusercontent.com/codedownio/aeson-typescript/d6a3addf220d51dcc1199744869beda2b8bb2aa1/test/LegalNameSpec.hs | haskell |
module LegalNameSpec where
import Data.Aeson.TypeScript.LegalName
import Data.List.NonEmpty (NonEmpty (..))
import Test.Hspec
tests :: Spec
tests = describe "Data.Aeson.TypeScript.LegalName" $ do
describe "checkIllegalNameChars" $ do
describe "legal Haskell names" $ do
it "allows an uppercase letter" $ d... | |
f880c5ba4565b3dbdd1bcc13e7c6ae9d9af87310936643c3bc69e87b3b367744 | emqx/hocon | hocon_schema_html_tests.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2022 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/emqx/hocon/04206f910caae871568dd1035b05003d1dcce555/test/hocon_schema_html_tests.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2022 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(hocon_schema_html_tests).
-include_lib("eunit/include/eunit.hrl").
no_crash_test_() ->... |
45cb12a6c73798c95e8a4a167bd5817a1f149c3d798a7c078f4c85c9c9e46956 | rtoy/cmucl | package.lisp | ;;; -*- Log: code.log; Package: Lisp -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/code/package.lisp $")
... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/code/package.lisp | lisp | -*- Log: code.log; Package: Lisp -*-
**********************************************************************
**********************************************************************
Package stuff and stuff like that.
INTERNAL conditions
A list of all the hashtables for inherited symbols.
The string name ... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/code/package.lisp $")
Re - Written by . Earlier version written by
. Apropos & iteration macros courtesy of Skef Wholey .
Defpackage... |
143e2bd7ad59e5b9de1e4311ee554a412e28707a7fbcc6b3ebf46b8631d3abd4 | dmitryvk/sbcl-win32-threads | properties.impure.lisp | ;;;; miscellaneous tests of symbol properties
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/properties.impure.lisp | lisp | miscellaneous tests of symbol properties
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
of 'NIL would trash (CDR NIL), due to a screwup in... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(in-package "CL-USER")
(defun test-symbol (symbol)
(setf (symbol-plist symbol) nil)
(setf (get symbol 'foo) '(my list))
(setf (get symbol 'bar) 10)
(setf (get... |
339e4c1b8f791230b4a95d31d5bcbac023c943ca2e721700d5ba3a9c4c85710e | fujita-y/ypsilon | programs.scm | #!nobacktrace
(library (rnrs programs (6))
(export command-line exit)
(import (core primitives)))
| null | https://raw.githubusercontent.com/fujita-y/ypsilon/f742470e2810aabb7a7c898fd6c07227c14a725f/sitelib/rnrs/programs.scm | scheme | #!nobacktrace
(library (rnrs programs (6))
(export command-line exit)
(import (core primitives)))
| |
b3ae583852afdb74623bf4f1191b6bcce3f5f71295814b2bc2e39fae8ca633b8 | froydnj/ironclad | pkcs1.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
pkcs1.lisp -- implementation of OAEP and PSS schemes
(in-package :crypto)
;;; Mask generation function
(defun mgf (digest-name seed num-bytes)
"Expand the SEED to a NUM-BYTES bytes vector using the DIGEST-NAME digest."
(loop
with result = #()
with digest... | null | https://raw.githubusercontent.com/froydnj/ironclad/fe88483bba68eac4db3b48bb4a5a40035965fc84/src/public-key/pkcs1.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
Mask generation function
FIXME: "real" ironclad error needed here | pkcs1.lisp -- implementation of OAEP and PSS schemes
(in-package :crypto)
(defun mgf (digest-name seed num-bytes)
"Expand the SEED to a NUM-BYTES bytes vector using the DIGEST-NAME digest."
(loop
with result = #()
with digest-len = (digest-length digest-name)
for digest = (make-digest digest-nam... |
9d94c8bcca37bf7a41b64ac01141c69743e8225de850ea88410387f1d29db31b | pveber/bistro | bistro_script.ml | open Base
open Ppxlib
module B = struct
include Ast_builder.Make(struct let loc = Location.none end)
let econstr s args =
let args = match args with
| [] -> None
| [x] -> Some x
| l -> Some (pexp_tuple l)
in
pexp_construct (Located.lident s) args
let enil () = econstr "[]" []
let ... | null | https://raw.githubusercontent.com/pveber/bistro/d363bd2d8257babbcb6db15bd83fd6465df7c268/ppx/bistro_script.ml | ocaml | open Base
open Ppxlib
module B = struct
include Ast_builder.Make(struct let loc = Location.none end)
let econstr s args =
let args = match args with
| [] -> None
| [x] -> Some x
| l -> Some (pexp_tuple l)
in
pexp_construct (Located.lident s) args
let enil () = econstr "[]" []
let ... | |
15f8b49d80b01e7c1bd72fe9613c5342c73830b0303a432af8453c290be81c26 | sylane/erod | erod.erl | %%% ==========================================================================
Copyright ( c ) 2014 < >
%%%
%%% This file is part of erod.
%%%
%%% Erod 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 , eit... | null | https://raw.githubusercontent.com/sylane/erod/b0c435f8546ea38b1501d3e22614fe7951c61c9a/apps/erod/src/erod.erl | erlang | ==========================================================================
This file is part of erod.
Erod is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the impli... | Copyright ( c ) 2014 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
2014 < >
@author < >
-module(erod).
-author('Sebastien Merle').
-... |
55abd67a938ee1ae9230a11dca164c2434770203057921a5fede7c2114ace073 | tomjaguarpaw/haskell-opaleye | Unpackspec.hs | # LANGUAGE MultiParamTypeClasses , FlexibleInstances #
module Opaleye.SQLite.Internal.Unpackspec where
import qualified Opaleye.SQLite.Internal.PackMap as PM
import qualified Opaleye.SQLite.Internal.Column as IC
import qualified Opaleye.SQLite.Column as C
import Control.Applicative (Applicative, pure, (<*>... | null | https://raw.githubusercontent.com/tomjaguarpaw/haskell-opaleye/b7aacc07c6392654cae439fc3b997620c3aa7a87/opaleye-sqlite/src/Opaleye/SQLite/Internal/Unpackspec.hs | haskell | @columns@.
contained therein (for a user-defined product type @Foo@, assuming
@Data.Profunctor.Product.TH@ has been run).
operations. However, in practice users should almost never need
to create or manipulate them. Typically they will be created
automatically by the 'D.Default' instance.
| Target the single... | # LANGUAGE MultiParamTypeClasses , FlexibleInstances #
module Opaleye.SQLite.Internal.Unpackspec where
import qualified Opaleye.SQLite.Internal.PackMap as PM
import qualified Opaleye.SQLite.Internal.Column as IC
import qualified Opaleye.SQLite.Column as C
import Control.Applicative (Applicative, pure, (<*>... |
e6cf36b69ef83b900b2db3061327fc666be72820fe18d9a4bb5103eac670d847 | haskell-opengl/OpenGLRaw | TextureEnvCombine4.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.TextureEnvCombine4
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
--------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/NV/TextureEnvCombine4.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.NV.TextureEnvCombine4
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.NV.TextureEnvCombine4 (
glGetNVTextureEnvCombine4,
gl_NV_texture_env_combine4,
pattern GL_COMBINE4_NV,
pattern GL_OPERAND3_ALPHA_NV,
pattern GL_OPERAND3_RGB_NV,
pattern GL_SOURCE3_ALPHA_NV,
pattern G... |
9d32659e349599b61c7eb1e20f702cfdc7de8b8e839cfcdba579218791e1642a | bsaleil/lc | etape1-sub2.scm | (let ((a 7) (b 3)) (println (- a b)))
(let ((a -7) (b 3)) (println (- a b)))
(let ((a 7) (b -3)) (println (- a b)))
(let ((a -7) (b -3)) (println (- a b)))
4
;-10
10
;-4
| null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/IFT3065/1/etape1-sub2.scm | scheme | -10
-4 | (let ((a 7) (b 3)) (println (- a b)))
(let ((a -7) (b 3)) (println (- a b)))
(let ((a 7) (b -3)) (println (- a b)))
(let ((a -7) (b -3)) (println (- a b)))
4
10
|
824445019f296e8fbc420530e34bec054e6e8a0181d59e7f493d0d20a9c81aa0 | awkward-squad/ki | Scope.hs | module Ki.Internal.Scope
( Scope,
scoped,
awaitAll,
fork,
forkWith,
forkWith_,
fork_,
forkTry,
forkTryWith,
)
where
import qualified Control.Concurrent
import Control.Exception
( Exception (fromException, toException),
MaskingState (..),
SomeAsyncException,
asyncExcept... | null | https://raw.githubusercontent.com/awkward-squad/ki/efbccde4bbf24d5983386b9621cd0868dbe163c0/ki/src/Ki/Internal/Scope.hs | haskell | | A scope.
==== __👉 Details__
* A scope delimits the lifetime of all threads created within it.
* A scope is only valid during the callback provided to 'Ki.scoped'.
* The thread that creates a scope is considered the parent of all threads created within it.
* All threads created within a scope are terminat... | module Ki.Internal.Scope
( Scope,
scoped,
awaitAll,
fork,
forkWith,
forkWith_,
fork_,
forkTry,
forkTryWith,
)
where
import qualified Control.Concurrent
import Control.Exception
( Exception (fromException, toException),
MaskingState (..),
SomeAsyncException,
asyncExcept... |
dba4fe3fa34dd3f77e5e96bcfaf087a463b56fe990b9af2f2c281bf0cc441004 | joearms/music_experiments | midi.erl | -module(midi).
-compile(export_all).
test1() ->
%% test the internal driver
midi_event_gen:start(internal),
scale(60,70,100),
instruments(20,30).
instruments(Min, Max) ->
for(Min, Max,
fun(I) ->
set_instrument(1, I),
scale(60,70,50)
end).
set_instrument(Channel, Instrument) ->
io:format... | null | https://raw.githubusercontent.com/joearms/music_experiments/3c0db01d03571599a3506fcb1a001d0b8dd205d9/midi_mac_driver/midi.erl | erlang | test the internal driver | -module(midi).
-compile(export_all).
test1() ->
midi_event_gen:start(internal),
scale(60,70,100),
instruments(20,30).
instruments(Min, Max) ->
for(Min, Max,
fun(I) ->
set_instrument(1, I),
scale(60,70,50)
end).
set_instrument(Channel, Instrument) ->
io:format("changing instrument to:~p~n",
... |
d4b9b9f1375d018d9420c71648f59dd7a1a7461d4b8e8bf7d401e37cd4e85795 | glondu/belenios | web_types.ml | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2022
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/de4a3205c3d2adb91863965a706fa6028177d78f/src/web/server/common/web_types.ml | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2022
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
782204c9964bf50b24db5f2f306b30705b34d89ac04eba8abffdf9803a8c23bd | f-o-a-m/kepler | Class.hs | # LANGUAGE UndecidableInstances #
module Tendermint.Utils.QueryClient.Class where
import Control.Lens ((^.))
import Control.Monad.Reader (ReaderT)
import qualified Data.ByteArray.Base64String as Base64
import qualified Data.ByteArray.HexString ... | null | https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-test-utils/src/Tendermint/Utils/QueryClient/Class.hs | haskell | | How to make a request.
^ param name
^ param value
if mparam = Nothing, we don't add it to the query string
anything other than 0 code is a failure: -spec.html
and will result in queryValue decoding to a "empty/default" object
| Singleton type representing a client for an empty API. | # LANGUAGE UndecidableInstances #
module Tendermint.Utils.QueryClient.Class where
import Control.Lens ((^.))
import Control.Monad.Reader (ReaderT)
import qualified Data.ByteArray.Base64String as Base64
import qualified Data.ByteArray.HexString ... |
e01a796e8a63087b97c9541a30d0f21c624758fd514c985c6aebccbdcb066bea | alesaccoia/festival_flinger | duration.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;
Centre for Speech Technology Research ; ;
University of Edinburgh , UK ; ;
;;; ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/duration.scm | scheme |
;;
;
;
Copyright (c) 1996,1997 ;;
;
;;
Permission is hereby granted, free of charge, to use and distribute ;;
this softwar... |
(define (Duration utt)
"(Duration utt)
Predict segmental durations using Duration_Method defined in Parameters.
Four methods are currently available: averages, Klatt rules, CART tree
based, and fixed duration."
(let ((rval (apply_method 'Duration_Method utt)))
(cond
((eq 'Averages (Parameter.get 'Duration_... |
07ec7d9acbb81e0e839d0c2a6a4a255cd36bea840db031902e198655fed0f6b1 | jgm/markdown-peg | XML.hs |
Copyright ( C ) 2006 - 7 < >
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 .
This program is distributed ... | null | https://raw.githubusercontent.com/jgm/markdown-peg/dd79c1b3bc794e3f795f4c06224e24d5d053500d/Text/Pandoc/XML.hs | haskell | | True if the character needs to be escaped.
| Return a text object with a string of formatted XML attributes.
with specified attributes and (if specified) indentation.
| Put the supplied contents in indented block btw start and end tags. |
Copyright ( C ) 2006 - 7 < >
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 .
This program is distributed ... |
aa7597b2c1b6317c0692c8feaa6b9e4678e3937f45920c8707d1e8152d8c181a | quchen/prettyprinter | Internal.hs | module Data.Text.Prettyprint.Doc.Render.Terminal.Internal {-# DEPRECATED "Use \"Prettyprinter.Render.Terminal.Internal\" instead." #-} (
module Prettyprinter.Render.Terminal.Internal
) where
import Prettyprinter.Render.Terminal.Internal
| null | https://raw.githubusercontent.com/quchen/prettyprinter/880f41eac31edfac71d2d66d338e6cfdae4f3715/prettyprinter-ansi-terminal/src/Data/Text/Prettyprint/Doc/Render/Terminal/Internal.hs | haskell | # DEPRECATED "Use \"Prettyprinter.Render.Terminal.Internal\" instead." # | module Prettyprinter.Render.Terminal.Internal
) where
import Prettyprinter.Render.Terminal.Internal
|
7ae274ffcb98bf7fb8fa7730e6de7188d58ecb5f98b786bf3cb74af0b31d18fc | JoelSanchez/ventas | zoomable_image.cljs | (ns ventas.components.zoomable-image
(:require
[js-image-zoom :as zoom]
[re-frame.core :as rf]
[reagent.core :as reagent]))
(def state-key ::state)
(rf/reg-event-db
::set-loaded
(fn [db [_ id]]
(assoc-in db [state-key id :loaded?] true)))
(rf/reg-sub
::loaded?
(fn [db [_ id]]
(get-in db [state-k... | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/cljs/ventas/components/zoomable_image.cljs | clojure | (ns ventas.components.zoomable-image
(:require
[js-image-zoom :as zoom]
[re-frame.core :as rf]
[reagent.core :as reagent]))
(def state-key ::state)
(rf/reg-event-db
::set-loaded
(fn [db [_ id]]
(assoc-in db [state-key id :loaded?] true)))
(rf/reg-sub
::loaded?
(fn [db [_ id]]
(get-in db [state-k... | |
b88dadf8980c04c71434597236910b480574413b49a5c992f3e5fd2f561ba60e | basho/riak_core | riak_core_node_watcher_events.erl | %% -------------------------------------------------------------------
%%
%% riak_core: Core Riak Application
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except... | null | https://raw.githubusercontent.com/basho/riak_core/762ec81ae9af9a278e853f1feca418b9dcf748a3/src/riak_core_node_watcher_events.erl | erlang | -------------------------------------------------------------------
riak_core: Core Riak Application
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
sp... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-... |
9b7a735148e08d16bb57e4326d2d824648b49d0988fae35c7fde0fcbffb415ec | jgpc42/jmh-clojure | exec.clj | (ns ^:internal ^:no-doc jmh.exec
"Build command arguments and run benchmarks."
(:require [jmh.util :as util]
[jmh.option :as option]
[clojure.java.io :as io])
(:import [java.io ByteArrayOutputStream File OutputStream PrintStream]
[java.lang.management ManagementFactory]
... | null | https://raw.githubusercontent.com/jgpc42/jmh-clojure/78f6ebcd59d782b0ca3b4f04d15a037657b87304/src/jmh/exec.clj | clojure | (ns ^:internal ^:no-doc jmh.exec
"Build command arguments and run benchmarks."
(:require [jmh.util :as util]
[jmh.option :as option]
[clojure.java.io :as io])
(:import [java.io ByteArrayOutputStream File OutputStream PrintStream]
[java.lang.management ManagementFactory]
... | |
cf3db7ed6baa287840073f9d1b5c086345e9bdb3be9212485b487b6ed0040409 | nklein/draw | page.lisp | (in-package #:draw)
(defvar *in-document-p* nil
"Tracks if we are currently in a document.")
(defvar *in-page-p* nil
"Tracks if we are currently in a page.")
(defvar *page-number* nil
"Track the current page number.")
(defmacro with-document ((&rest arguments &key &allow-other-keys) &body body)
"Run the BOD... | null | https://raw.githubusercontent.com/nklein/draw/2b7a51fa06c81a46dffc439a35b3b0ac18c94893/src/base/page.lisp | lisp | (in-package #:draw)
(defvar *in-document-p* nil
"Tracks if we are currently in a document.")
(defvar *in-page-p* nil
"Tracks if we are currently in a page.")
(defvar *page-number* nil
"Track the current page number.")
(defmacro with-document ((&rest arguments &key &allow-other-keys) &body body)
"Run the BOD... | |
f87041b8f745b20c8388939095c1f9f99b1ac7e3b85d03898f0c591b56af4c47 | agrison/cljwebauthn | core_test.clj | (ns cljwebauthn.core-test
(:require [clojure.test :refer :all]
[cljwebauthn.core :refer :all]
[cljwebauthn.b64 :as b64]))
(def site-properties
{:site-id "grison.me",
:site-name "Stuff and Thoughts about IT Stuff",
:protocol "https",
:port 443,
:host "grison.me"})
(... | null | https://raw.githubusercontent.com/agrison/cljwebauthn/3b3577ff126dd5bc42ac0f226ca4de63be33b8ef/test/cljwebauthn/core_test.clj | clojure | (ns cljwebauthn.core-test
(:require [clojure.test :refer :all]
[cljwebauthn.core :refer :all]
[cljwebauthn.b64 :as b64]))
(def site-properties
{:site-id "grison.me",
:site-name "Stuff and Thoughts about IT Stuff",
:protocol "https",
:port 443,
:host "grison.me"})
(... | |
8083aee74c8e3cc9283f7e36d506255131e0a406e97f560b163e79838f6ea67d | vimus/vimus | Util.hs | module Vimus.Util where
import Control.Applicative
import Data.List (isPrefixOf)
import Data.Char as Char
import Data.Maybe (fromJust)
import System.FilePath ((</>))
import System.Environment (getEnvironment)
import Network.MPD (MonadMPD, PlaylistN... | null | https://raw.githubusercontent.com/vimus/vimus/26a164fb50870f8112ca4b6c30820431c015916f/src/Vimus/Util.hs | haskell | | Remove leading and trailing whitespace
| Get longest common prefix of a list of strings.
"foo"
| Add a song which is inside a playlist, returning its id.
| Expand a tilde at the start of a string to the users home directory.
Expansion is only performed if the tilde is either followed by a slash or
the only c... | module Vimus.Util where
import Control.Applicative
import Data.List (isPrefixOf)
import Data.Char as Char
import Data.Maybe (fromJust)
import System.FilePath ((</>))
import System.Environment (getEnvironment)
import Network.MPD (MonadMPD, PlaylistN... |
72dbb2843ee18a2acd9100f6d4fe0a3ca14f48e4d6451493c38303d6c3c6faf5 | ReactiveX/RxClojure | interop_test.clj | (ns rx.lang.clojure.interop-test
(:require [rx.lang.clojure.interop :as rx]
[clojure.test :refer [deftest testing is]])
(:import [rx Observable]
[rx.observables BlockingObservable]
[rx.lang.clojure.interop DummyObservable]))
(deftest test-fn*
(testing "implements Func0-9"
(l... | null | https://raw.githubusercontent.com/ReactiveX/RxClojure/8f8e454f447ae24549bcf5f001c9d2458af21cac/src/test/clojure/rx/lang/clojure/interop_test.clj | clojure | No type hint, picks Object overload
No type hint, picks Object overload
no meta, picks Object overload
no meta, picks Object overload | (ns rx.lang.clojure.interop-test
(:require [rx.lang.clojure.interop :as rx]
[clojure.test :refer [deftest testing is]])
(:import [rx Observable]
[rx.observables BlockingObservable]
[rx.lang.clojure.interop DummyObservable]))
(deftest test-fn*
(testing "implements Func0-9"
(l... |
dc86d9f2e82f7c0c2e46d3c88ec1a7280def1a2d12758be9d459744ce0217c09 | ollef/sixten | Scoped.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE Undeci... | null | https://raw.githubusercontent.com/ollef/sixten/60d46eee20abd62599badea85774a9365c81af45/src/Syntax/Pre/Scoped.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveTraversable #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
| Synonym for documentation purposes
-----------------------------------------------------------------------------
Helpers
-----------------------------------------------------------------------------
Instanc... | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
module Syntax.Pre.Scoped
( module Definition
, module Pre
, Expr(..), Type
, clause, pi_, telePis, l... |
27f657ef32b2f8611044fa8b1b512ce67f4413fa94421ff206da5a7a24078708 | softlab-ntua/bencherl | dialyzer_timing.erl | -*- erlang - indent - level : 2 -*-
%%-------------------------------------------------------------------
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2006 - 2012 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use t... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/dialyzer/src/dialyzer_timing.erl | erlang | -------------------------------------------------------------------
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
t... | -*- erlang - indent - level : 2 -*-
Copyright Ericsson AB 2006 - 2012 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Au... |
16784335855573940addd53253175dba772fec697036189d6cb95214810c5c68 | erlang/corba | notify_test_impl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1999 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/cosNotification/test/notify_test_impl.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 1999 - 2016 . 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(notify_test_impl).
-include_lib("orber/include/corba.hrl").
-include("idl_output/notify_test.hrl").
-expor... |
2fe3665d13066a1b729adeb8332e9673e84a789050d005766fad42266a92b988 | elektronaut/advent-of-code | day04.clj | (ns advent-of-code.2020.04
(:require [clojure.string :as str]))
(def passports
(map #(apply hash-map (str/split % #"[^\w\d#]+"))
(str/split (slurp "2020/day04/input.txt") #"\n\n")))
(def required-fields
["byr" "iyr" "eyr" "hgt" "hcl" "ecl" "pid"])
(defn required-fields? [p]
(= (count (keep p required-... | null | https://raw.githubusercontent.com/elektronaut/advent-of-code/a8bb7bbadc8167ebb1df0d532493317705bb7f0d/2020/day04/day04.clj | clojure | (ns advent-of-code.2020.04
(:require [clojure.string :as str]))
(def passports
(map #(apply hash-map (str/split % #"[^\w\d#]+"))
(str/split (slurp "2020/day04/input.txt") #"\n\n")))
(def required-fields
["byr" "iyr" "eyr" "hgt" "hcl" "ecl" "pid"])
(defn required-fields? [p]
(= (count (keep p required-... | |
876ae2f257cc290989c6a98fb49707d6cef200d5c686f6ed3588056b27fbba58 | tmfg/mmtis-national-access-point | localization.clj | (ns ote.services.localization
"Services for fetching localization messages."
(:require [com.stuartsierra.component :as component]
[ote.components.http :as http]
[ote.localization :as localization]
[compojure.core :refer [routes GET]]
[clojure.string :as str]))
(defn-... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/clj/ote/services/localization.clj | clojure | (ns ote.services.localization
"Services for fetching localization messages."
(:require [com.stuartsierra.component :as component]
[ote.components.http :as http]
[ote.localization :as localization]
[compojure.core :refer [routes GET]]
[clojure.string :as str]))
(defn-... | |
9f0c51d09f301135bb35124dd5cc0ee51f2e95049af57a23e58f3fd8ee1c02ca | dvdt/xvsy | plot.cljc | (ns xvsy.plot
"This namespace is responsible for generating svg plots from sql data."
(:require
[xvsy.utils :as utils :refer [translate fmap]]
[xvsy.conf :as conf]
[xvsy.scale :as scale]
[xvsy.geom :as geom]
[xvsy.legend :as legend]))
(defn area-dims
"Given the overall plot width and height and fa... | null | https://raw.githubusercontent.com/dvdt/xvsy/ff29b96affc6723bb9c66da1011f31900af679dd/src/cljc/xvsy/plot.cljc | clojure | facet dimensions, for a single
and the geom dimensions, which is where the actual plot geom
TODO: The impl is super ugly right now, but I think the API is right.
Transform geoms to svg-coords
and geom positioned data.
translate facet-padding
Draw xy scale bars in each facet
Draw geoms in each facet
wrap face... | (ns xvsy.plot
"This namespace is responsible for generating svg plots from sql data."
(:require
[xvsy.utils :as utils :refer [translate fmap]]
[xvsy.conf :as conf]
[xvsy.scale :as scale]
[xvsy.geom :as geom]
[xvsy.legend :as legend]))
(defn area-dims
"Given the overall plot width and height and fa... |
750cb44bc175613c3fbeaba9d5b0e583a9780bc58d7634b448f7eb79ab8236df | macourtney/Dark-Exchange | identity.clj | (ns darkexchange.model.identity
(:require [clj-record.boot :as clj-record-boot]
[clojure.contrib.logging :as logging]
[darkexchange.model.client :as client]
[darkexchange.model.peer :as peer]
[darkexchange.model.security :as security]
[darkexchange.model.ter... | null | https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/model/identity.clj | clojure | (ns darkexchange.model.identity
(:require [clj-record.boot :as clj-record-boot]
[clojure.contrib.logging :as logging]
[darkexchange.model.client :as client]
[darkexchange.model.peer :as peer]
[darkexchange.model.security :as security]
[darkexchange.model.ter... | |
473bf01f2aaf6497c5f2952b86c0daf5f0f7b711ffd05a3c4737079edd8ba10a | CrossRef/cayenne | rdf.clj | (ns cayenne.formats.rdf
(:import [java.io StringWriter])
(:require [clojure.string :as string]
[cayenne.rdf :as rdf]
[cayenne.ids.isbn :as isbn-id]
[cayenne.ids.issn :as issn-id]
[cayenne.ids.contributor :as contributor-id]))
;; TODO full-text links, funders, license... | null | https://raw.githubusercontent.com/CrossRef/cayenne/02321ad23dbb1edd3f203a415f4a4b11ebf810d7/src/cayenne/formats/rdf.clj | clojure | TODO full-text links, funders, licenses | (ns cayenne.formats.rdf
(:import [java.io StringWriter])
(:require [clojure.string :as string]
[cayenne.rdf :as rdf]
[cayenne.ids.isbn :as isbn-id]
[cayenne.ids.issn :as issn-id]
[cayenne.ids.contributor :as contributor-id]))
(defn make-rdf-issn-container [model met... |
0d4539438758eb4520c423342a0a88a5e1068b25464b5c6a3f4e7e7e5f86f32c | martinsumner/kv_index_tictactree | aae_treecache.erl | %% -------- Overview ---------
%%
-module(aae_treecache).
-behaviour(gen_server).
-include("include/aae.hrl").
-export([
init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3,
format_status/2]).
-export([... | null | https://raw.githubusercontent.com/martinsumner/kv_index_tictactree/a2b4620aaad6b61a76f48fc5a43857c305d4c834/src/aae_treecache.erl | erlang | -------- Overview ---------
============================================================================
API
============================================================================
@doc
starting point. Return is_empty boolean as true to indicate if a new cache
@doc
Open a tree cache, without restoring fro... |
-module(aae_treecache).
-behaviour(gen_server).
-include("include/aae.hrl").
-export([
init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3,
format_status/2]).
-export([cache_open/3,
cache_ne... |
2c806d0e63049b5c5b12af022962971e2ce99d64a0539920f6344c44313861f2 | lukaszcz/coqhammer | hammer_errors.ml | exception HammerError of string
exception HammerFailure of string
exception HammerTacticError of string
let msg_error s = Feedback.msg_notice (Pp.str s)
let catch_errors (f : unit -> 'a) (g : exn -> 'a) =
try
f ()
with
| Sys.Break ->
raise Sys.Break
| e ->
g e
let try_bind_fun (x : 'a) (f : 'a ... | null | https://raw.githubusercontent.com/lukaszcz/coqhammer/fe83fb0eaf33f56da9ea1983114d0d94a2c41b9b/src/lib/hammer_errors.ml | ocaml | exception HammerError of string
exception HammerFailure of string
exception HammerTacticError of string
let msg_error s = Feedback.msg_notice (Pp.str s)
let catch_errors (f : unit -> 'a) (g : exn -> 'a) =
try
f ()
with
| Sys.Break ->
raise Sys.Break
| e ->
g e
let try_bind_fun (x : 'a) (f : 'a ... | |
4836e9334378df952c846f0c4c1fcaa3bc00dd6daa6eccca7d14c90d32ad2765 | kana/sicp | ex-3.77.scm | Exercise 3.77 . The integral procedure used above was analogous to the
;;; ``implicit'' definition of the infinite stream of integers in section
3.5.2 . Alternatively , we can give a definition of integral that is more
like integers - starting - from ( also in section 3.5.2 ):
;;;
;;; (define (integral integran... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-3.77.scm | scheme | ``implicit'' definition of the infinite stream of integers in section
(define (integral integrand initial-value dt)
(cons-stream initial-value
(if (stream-null? integrand)
the-empty-stream
(integral (stream-cdr integrand)
(+ (* ... | Exercise 3.77 . The integral procedure used above was analogous to the
3.5.2 . Alternatively , we can give a definition of integral that is more
like integers - starting - from ( also in section 3.5.2 ):
(define (integral delayed-integrand initial-value dt)
(cons-stream initial-value
(let ([in... |
1db3cbd8a3b66bc65754988814704ac88f6886f19f997dab6a07f1f0cf21e580 | reflectionalist/S9fES | replace.scm | Scheme 9 from Empty Space , Function Library
By , 2009
; Placed in the Public Domain
;
; (replace object-old object-new pair) ==> pair
;
; Replace elements of a pair. OBJECT-OLD is the object to be
; replaced and OBJECT-NEW is the new object.
;
; Example: (replace '(x) '(y) '(lambda (x) y)) ==> (lambda (y)... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/replace.scm | scheme | Placed in the Public Domain
(replace object-old object-new pair) ==> pair
Replace elements of a pair. OBJECT-OLD is the object to be
replaced and OBJECT-NEW is the new object.
Example: (replace '(x) '(y) '(lambda (x) y)) ==> (lambda (y) y) | Scheme 9 from Empty Space , Function Library
By , 2009
(define (replace old new obj)
(cond ((equal? obj old)
new)
((pair? obj)
(cons (replace old new (car obj))
(replace old new (cdr obj))))
(else
obj)))
|
8e36577cf7aab61431429829c42806febeba65620dedc1cf33a4000cc9c38f34 | Gabriella439/managed | Managed.hs | # LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
| An example program to copy data from one handle to another might
look like this :
> main =
> withFile " inFile.txt " ReadMode $ \inHandle - >
> withFile " outFile.txt " WriteMode $ \outHandle - >
> copy
>
> -- A hyp... | null | https://raw.githubusercontent.com/Gabriella439/managed/7a1d457f3021ab67259bf9033b9792e2ed9e6acc/src/Control/Monad/Managed.hs | haskell | # LANGUAGE RankNTypes #
A hypothetical function that copies data from one handle to another
-----------
A hypothetical function that copies data from one handle to another
-----------
* Managed
* Re-exports
$reexports
| A managed resource that you acquire using `with`
| Build a... | # LANGUAGE CPP #
| An example program to copy data from one handle to another might
look like this :
> main =
> withFile " inFile.txt " ReadMode $ \inHandle - >
> withFile " outFile.txt " WriteMode $ \outHandle - >
> copy
>
> copy : : Handle - > Handle - > IO ( ... |
5ff3ec3ec9431f2b85cbb0f41601291f857e31548312c7fc2843b5b470324f91 | janestreet/ecaml | test_directory.ml | open! Core
open! Async_kernel
open! Import
open! Directory
let%expect_test "" =
(try delete "zzz" ~recursive:true with
| _ -> ());
return ()
;;
let%expect_test "[create], [delete]" =
create "zzz";
delete "zzz";
return ()
;;
let%expect_test "[create ~parents:true], [delete ~recursive:true]" =
create "a... | null | https://raw.githubusercontent.com/janestreet/ecaml/25a5a2972b3a94f5529a46363b37670a6c1de195/test/test_directory.ml | ocaml | open! Core
open! Async_kernel
open! Import
open! Directory
let%expect_test "" =
(try delete "zzz" ~recursive:true with
| _ -> ());
return ()
;;
let%expect_test "[create], [delete]" =
create "zzz";
delete "zzz";
return ()
;;
let%expect_test "[create ~parents:true], [delete ~recursive:true]" =
create "a... | |
a1245aa2d5883d60b8b0ec3e3b4c6a2e25695bfa01091a9fa2af07c076eaf415 | kowainik/policeman | Version.hs | # LANGUAGE NumericUnderscores #
module Test.Policeman.Version
( versionSpec
, versionRoundtripText
, versionRoundtripInts
) where
import Hedgehog (MonadGen, Property, forAll, property, (===))
import Test.Hspec (Spec, describe, it, shouldBe, shouldSatisfy)
import Policeman.Core.Version (Version (..), ... | null | https://raw.githubusercontent.com/kowainik/policeman/26a92678c76b145ad9ae30054bf978a0d6ec2a58/test/Test/Policeman/Version.hs | haskell | | Version parsing unit tests.
| Parsing to/from 'Text' works properly.
| Parsing to/from '[Int]' works properly.
| Generates random version. | # LANGUAGE NumericUnderscores #
module Test.Policeman.Version
( versionSpec
, versionRoundtripText
, versionRoundtripInts
) where
import Hedgehog (MonadGen, Property, forAll, property, (===))
import Test.Hspec (Spec, describe, it, shouldBe, shouldSatisfy)
import Policeman.Core.Version (Version (..), ... |
d651f4a1cca550256466ed8a3847739d308fcfd44317355cb9c7d3f8e0ea6384 | byteally/dbrecord | Parser.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module DBRecord.MSSQL.Internal.Sql.Parser
( sqlExpr
, parseMSSQLType
, SizeInfo (..)
, defSizeInfo
) where
import DBRecord.Internal.Sql.DML
import Data.Attoparsec.Text hiding (number)
import qualified Data.Text as T
import Data.Text (Text)
i... | null | https://raw.githubusercontent.com/byteally/dbrecord/991efe9a293532ee9242b3e9a26434cf16f5b2a0/dbrecord-mssql-odbc/src/DBRecord/MSSQL/Internal/Sql/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
<*
endOfInput
transformBinExprByPrecedence
NOTE: ROW(s) are also possible here
aggrFunSqlExpr <|>
ParamSqlExpr
ExistsSqlExpr
TODO: FunSqlExpr needs to be changed or we need to intercalate a separator.
obys < - orderBy
obys... | # LANGUAGE TupleSections #
module DBRecord.MSSQL.Internal.Sql.Parser
( sqlExpr
, parseMSSQLType
, SizeInfo (..)
, defSizeInfo
) where
import DBRecord.Internal.Sql.DML
import Data.Attoparsec.Text hiding (number)
import qualified Data.Text as T
import Data.Text (Text)
import Control.Applicative
import qu... |
667d3258ba2418d79222dce0b73b2d3afcff1dabfd8a9ac5267dda3ed8bf3d9d | SNePS/SNePS2 | outnet.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*-
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : outnet.lisp , v 1.2 2013/08/28 19:07:25 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of this file a... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/sneps/fns/outnet.lisp | lisp | Syntax : Common - Lisp ; Package : SNEPS ; 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 ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : outnet.lisp , v 1.2 2013/08/28 19:07:25 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS IS " ba... |
98fcf39a6812466eec1732134c9fbbcb01b18fc59bc4c31080346f4aa82d0dc0 | gar1t/lambdapad | lpad_cmd.erl | Copyright 2014 < >
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the License at
%%%
%%% -2.0
%%%
%%% Unless required by applicable law or agreed to in writing, software
distributed ... | null | https://raw.githubusercontent.com/gar1t/lambdapad/483b67694723923a82fc699aa37d580d035bd420/src/lpad_cmd.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2014 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(lpad_cmd).
-export([run/2, run/3, run/4]).
run(Exe, Args) ->
run(Exe, Args, [], infinity).
run(Exe, Args, Options) ->
run(Exe, Args, ... |
ef4996c456d921ffde6114d273154cd04c3d6a2a998a6209ef3a35684b475e05 | dyoo/whalesong | get-runtime.rkt | #lang racket/base
;; Function to get the runtime library.
;;
The resulting Javascript will produce a file that loads :
;;
;;
;; jquery at the the toplevel
HashTable at the toplevel
;; jsnums at the toplevel
;;
;; followed by the base library
;;
(require racket/contract
racket/runtime-path
rack... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/js-assembler/get-runtime.rkt | racket | Function to get the runtime library.
jquery at the the toplevel
jsnums at the toplevel
followed by the base library
The order matters here. link needs to come near the top, because
the other modules below have some circular dependencies that are resolved
by link.
jquery is special: we need to make sure it... | #lang racket/base
The resulting Javascript will produce a file that loads :
HashTable at the toplevel
(require racket/contract
racket/runtime-path
racket/port)
(provide/contract [get-runtime (-> string?)])
(define-runtime-path base-path "runtime-src")
(define files '(
to... |
f6c79eac67d22de40953fe23f5375f331525cd1daf9696166932789c3c83252a | IndiscriminateCoding/clarity | validation.ml | module Make (S : Semigroup.S) = struct
open Either
type 'a t = (S.t, 'a) Either.t
include Applicative.Make(struct
type nonrec 'a t = 'a t
let pure = pure
let map = map
let ap f x =
match f, x () with
| Right f, Right x -> Right (f x)
| Left a, Left b -> Left (S.append a b)
... | null | https://raw.githubusercontent.com/IndiscriminateCoding/clarity/163c16249cb3f01c4244b80be39e9aad0b1ca325/lib/types/validation.ml | ocaml | module Make (S : Semigroup.S) = struct
open Either
type 'a t = (S.t, 'a) Either.t
include Applicative.Make(struct
type nonrec 'a t = 'a t
let pure = pure
let map = map
let ap f x =
match f, x () with
| Right f, Right x -> Right (f x)
| Left a, Left b -> Left (S.append a b)
... | |
429d90feb635fea3af6c9c457a4045d0a97d3c14c93164c55da4f1657d5c4499 | Bogdanp/racket-gui-easy | 7GUI-7-cells.rkt | #lang racket/base
(require (prefix-in p: pict)
racket/class
racket/format
(prefix-in gui: racket/gui)
racket/gui/easy
racket/gui/easy/operator
racket/list
racket/match
racket/port
racket/string)
;; cell ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/Bogdanp/racket-gui-easy/1410da641db95df783f2a5be7516414bc8224a61/examples/7GUI-7-cells.rkt | racket | cell ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
formula ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
state ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
deps: map of cell-name -> dependent cell-name
GUI ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | #lang racket/base
(require (prefix-in p: pict)
racket/class
racket/format
(prefix-in gui: racket/gui)
racket/gui/easy
racket/gui/easy/operator
racket/list
racket/match
racket/port
racket/string)
(define alphabet "ABCDEFGHIJKLMNOPQRSTUV... |
29a341e8a9fd4e83693913842b53579f6038eec2c7288531dc13df0940dc0964 | ocsigen/js_of_ocaml | ocaml_version.ml | Js_of_ocaml compiler
* /
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option ) any l... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/0fd9c6d715ce5e47ae1bf29f13e33f10c1eeebdd/compiler/lib/ocaml_version.ml | ocaml | Js_of_ocaml compiler
* /
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option ) any l... | |
ba53ac3e6d735d7e0f3bff22c2891c82582c5004febb73a7f68029e33dc9ebc3 | ericclack/overtone-loops | timing2.clj | (ns overtone-loops.examples.timing2
"Timing tests"
(:use [overtone.live]
[overtone-loops.loops]
[overtone-loops.samples]))
(set-up)
(defloop hats 1 cymbal-closed [7 5 5])
(defloop kicks 1 bass-soft [7 5 5])
(defloop double-kicks 1/3 bass-soft [7 7 _
... | null | https://raw.githubusercontent.com/ericclack/overtone-loops/54b0c230c1e6bd3d378583af982db4e9ae4bda69/src/overtone_loops/examples/timing2.clj | clojure | (stop) | (ns overtone-loops.examples.timing2
"Timing tests"
(:use [overtone.live]
[overtone-loops.loops]
[overtone-loops.samples]))
(set-up)
(defloop hats 1 cymbal-closed [7 5 5])
(defloop kicks 1 bass-soft [7 5 5])
(defloop double-kicks 1/3 bass-soft [7 7 _
... |
4ff2809f874338b813411a70c3b04bb9275fcdaef2ae4a8c1da90281eb0bb283 | CryptoKami/cryptokami-core | Download.hs | {-# LANGUAGE RankNTypes #-}
-- | Logic related to downloading update.
module Pos.Update.Download
( installerHash
, downloadUpdate
) where
import Universum
import Control.Exception.Safe (handleAny)
import Control.Lens (views)
import Control.Monad.Except (E... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/update/Pos/Update/Download.hs | haskell | # LANGUAGE RankNTypes #
| Logic related to downloading update.
function, which is a bit strange, but it's done for historical
reasons.
downloaded update.
If we have already downloaded an update successfully, this function won't
download new updates.
The caller must ensure that:
It must be enforced by the call... |
module Pos.Update.Download
( installerHash
, downloadUpdate
) where
import Universum
import Control.Exception.Safe (handleAny)
import Control.Lens (views)
import Control.Monad.Except (ExceptT (..), throwError)
import qualified Data.ByteArray as BA
import ... |
e51d3f910da18b6fb80f989d875d36dcf0e3fddab334f73e4118fe5b68094ee8 | VictorNicollet/Ohm-Site | o.ml | Ohm is © 2012
open Ohm
open Ohm.Universal
open BatPervasives
* { 1 Instance role }
(** The role of the current instance. This value can be used to only perform
some actions in a certain context, such as the web server or the asynchronous
bot.
*)
let role = Util.role ()
(** {1 Environment and basic c... | null | https://raw.githubusercontent.com/VictorNicollet/Ohm-Site/147fd11df8204180d4b0228d74e7f4ad1ae79191/ocaml/o.ml | ocaml | * The role of the current instance. This value can be used to only perform
some actions in a certain context, such as the web server or the asynchronous
bot.
* {1 Environment and basic configuration}
* Available environments. These represent the contexts in which the
application may be deployed, such ... | Ohm is © 2012
open Ohm
open Ohm.Universal
open BatPervasives
* { 1 Instance role }
let role = Util.role ()
type environment = [ `Dev | `Prod ]
let environment = `Dev
let env = match environment with
| `Prod -> "prod"
| `Dev -> "dev"
let logpath = match role with
| `Put
| `Reset -> None
... |
9c7f2967946e5f826cb908436d564bd217abba7fa78e3fa5ffd88344b0a76b0b | owainlewis/yaml | reader.clj | (ns yaml.reader
(:require [flatland.ordered.set :refer [ordered-set]]
[flatland.ordered.map :refer [ordered-map]])
(:refer-clojure :exclude [load])
(:import [org.yaml.snakeyaml Yaml]
[org.yaml.snakeyaml.constructor Constructor PassthroughConstructor]
[org.yaml.snakeyaml.composer Compos... | null | https://raw.githubusercontent.com/owainlewis/yaml/211303b4844e11dcfbea6ed1c9814dc907d56991/src/yaml/reader.clj | clojure | (ns yaml.reader
(:require [flatland.ordered.set :refer [ordered-set]]
[flatland.ordered.map :refer [ordered-map]])
(:refer-clojure :exclude [load])
(:import [org.yaml.snakeyaml Yaml]
[org.yaml.snakeyaml.constructor Constructor PassthroughConstructor]
[org.yaml.snakeyaml.composer Compos... | |
e891908432d9fc38845f65e9fa46ed7260c66582a48506a60084e67011be7433 | hspec/hspec-smallcheck | Types.hs | module Test.Hspec.SmallCheck.Types where
import Prelude ()
import Test.Hspec.SmallCheck.Compat
import Data.List
import Test.Hspec.Core.Spec (Location(..))
data Result = Failure (Maybe Location) Reason
deriving (Eq, Show, Read)
data Reason =
Reason String
| ExpectedAc... | null | https://raw.githubusercontent.com/hspec/hspec-smallcheck/7963f200a0ed37cde9db4ac6d914b074628f96da/src/Test/Hspec/SmallCheck/Types.hs | haskell | module Test.Hspec.SmallCheck.Types where
import Prelude ()
import Test.Hspec.SmallCheck.Compat
import Data.List
import Test.Hspec.Core.Spec (Location(..))
data Result = Failure (Maybe Location) Reason
deriving (Eq, Show, Read)
data Reason =
Reason String
| ExpectedAc... | |
7760317652874f8100869b3ac18c349ecca63d6005badefb8f484990db9b4396 | SimulaVR/godot-haskell | Types.hs | # LANGUAGE BangPatterns , FunctionalDependencies , TypeFamilies , TypeInType , LambdaCase , TypeApplications , AllowAmbiguousTypes #
module Godot.Gdnative.Internal.Types where
import Control.Exception
import qualified Data.ByteString as B
import qualified Data.ByteString.Unsafe as B
import Data.Text (Text)
import qu... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Gdnative/Internal/Types.hs | haskell | I'm torn about this instance. Need TH if not using this
|GodotFFI is a relation between low-level and high-level
|Godot types, and conversions between them.
#numeric-constants
This should perhaps be better modeled - FilePath?
Variants | # LANGUAGE BangPatterns , FunctionalDependencies , TypeFamilies , TypeInType , LambdaCase , TypeApplications , AllowAmbiguousTypes #
module Godot.Gdnative.Internal.Types where
import Control.Exception
import qualified Data.ByteString as B
import qualified Data.ByteString.Unsafe as B
import Data.Text (Text)
import qu... |
574060151cace650679b726aede3892707ce9d55be519916b9321a6fc735553d | rmculpepper/binaryio | info.rkt | #lang info
;; ========================================
;; pkg info
(define collection "binaryio")
(define deps
'(["base" #:version "6.3"]
"binaryio-lib"
"rackunit-lib"
"math-lib"))
(define implies
'("binaryio-lib"))
(define build-deps
'("racket-doc"
"scribble-lib"))
;; =========================... | null | https://raw.githubusercontent.com/rmculpepper/binaryio/2802c5b95cb51063f97cabb55a349d472dda5050/binaryio/info.rkt | racket | ========================================
pkg info
========================================
collect info | #lang info
(define collection "binaryio")
(define deps
'(["base" #:version "6.3"]
"binaryio-lib"
"rackunit-lib"
"math-lib"))
(define implies
'("binaryio-lib"))
(define build-deps
'("racket-doc"
"scribble-lib"))
(define name "binaryio")
(define scribblings
'(["scribblings/binaryio.scrbl" (mul... |
746788c402befc0dd1088c69bda4ca07b3f4c63edac7e66c8061cbc730b66601 | mirage/index | io_array.ml | module Int63 = Optint.Int63
module IO = Index_unix.Private.IO
let ( // ) = Filename.concat
let root = "_tests" // "unix.io_array"
module Entry = struct
module Key = Common.Key
module Value = Common.Value
type t = Key.t * Value.t
let encoded_size = Key.encoded_size + Value.encoded_size
let decode string o... | null | https://raw.githubusercontent.com/mirage/index/fe5e962534d192389484ecc63a25e4ab4668a2f0/test/unix/io_array.ml | ocaml | Tests
Read the arrays backwards | module Int63 = Optint.Int63
module IO = Index_unix.Private.IO
let ( // ) = Filename.concat
let root = "_tests" // "unix.io_array"
module Entry = struct
module Key = Common.Key
module Value = Common.Value
type t = Key.t * Value.t
let encoded_size = Key.encoded_size + Value.encoded_size
let decode string o... |
24607aa0326560bb6c9311dab02306b08a56576192c0d9aa3bf69bde3c925fe7 | sboehler/beans | Position.hs | module Beans.Position
( Position (Position),
deleteLot,
)
where
import Beans.Account (Account)
import Beans.Commodity (Commodity)
import Beans.Lot (Lot)
import Data.Text.Prettyprint.Doc (Pretty (pretty), (<+>))
data Position
= Position Account Commodity (Maybe Lot)
deriving (Eq, Ord, Show)
instance Prett... | null | https://raw.githubusercontent.com/sboehler/beans/897fc30a602f49906eb952c4fd5c8c0bf05a6beb/src/Beans/Position.hs | haskell | module Beans.Position
( Position (Position),
deleteLot,
)
where
import Beans.Account (Account)
import Beans.Commodity (Commodity)
import Beans.Lot (Lot)
import Data.Text.Prettyprint.Doc (Pretty (pretty), (<+>))
data Position
= Position Account Commodity (Maybe Lot)
deriving (Eq, Ord, Show)
instance Prett... | |
7338f4b4c96f07f4f24369d4c6a8e3eb72f37735a5aa1b9f8930dc2aebddcd33 | hiroshi-unno/coar | let-shift0.ml | external shift0 : (('a (*T*) -> 'b (*C1*)) -> 'c (*C2*)) -> 'a (*T*) = "unknown"
external reset : (unit -> 'a (*T*)) -> 'b (*C*) = "unknown"
let main () = reset (fun () ->
let x = shift0 (fun k -> (k 1) + (k 2)) in x
)
[@@@assert "typeof(main) <: unit -> {z: int | z = 3}"]
[@@@assert "typeof(main) <: unit -> {z: in... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/shift0_reset0/simple/let-shift0.ml | ocaml | T
C1
C2
T
T
C |
let main () = reset (fun () ->
let x = shift0 (fun k -> (k 1) + (k 2)) in x
)
[@@@assert "typeof(main) <: unit -> {z: int | z = 3}"]
[@@@assert "typeof(main) <: unit -> {z: int | z = 2 || z = 3 || z = 4}"] |
f9b0dec64da6ea58903685623a66c8d925d1ab32eece4f29972cbc6c43c7ae78 | balint99/sfpl | Instances.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , StandaloneDeriving #
-- | Instances for the types describing the core syntax.
module SFPL.Syntax.Core.Instances where
import SFPL.Base
import SFPL.Syntax.Core.Types
import SFPL.Syntax.Core.Pretty
----------------------------------------
-- Types
-- | @since 1.0... | null | https://raw.githubusercontent.com/balint99/sfpl/7cf8924e6f436704f578927ce2904e45caa76725/app/SFPL/Syntax/Core/Instances.hs | haskell | | Instances for the types describing the core syntax.
--------------------------------------
Types
| @since 1.0.0
^ @since 1.0.0
| @since 1.0.0
^ @since 1.0.0
--------------------------------------
Patterns
| @since 1.0.0
^ @since 1.0.0
--------------------------------------
Terms
^ @since 1.0.0
^ @since 1.... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , StandaloneDeriving #
module SFPL.Syntax.Core.Instances where
import SFPL.Base
import SFPL.Syntax.Core.Types
import SFPL.Syntax.Core.Pretty
instance Num Ty where
fromInteger = TyVar . fromInteger
(+) = undefined
(-) = undefined
(*) = undefined
negate =... |
372b33edce19766173a3c257fbe6455ba86a6d3b8748a5e5036484c904151f80 | dyoo/whalesong | graphs.rkt | #lang whalesong
Modified 2 March 1997 by to add graphs - benchmark
and to expand the four macros below .
Modified 11 June 1997 by to eliminate assertions
; and to replace a use of "recur" with a named let.
Modified 4 May 2010 by to get rid of one - armed ifs
;
Performance note : ( graphs - benchmark 7... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/more-tests/graphs.rkt | racket | and to replace a use of "recur" with a named let.
End of new code.
==== std.ss ====
(define-syntax assert
(syntax-rules ()
((assert test info-rest ...)
#f)))
(define-syntax deny
(syntax-rules ()
((deny test info-rest ...)
#f)))
(define-syntax when
(syntax-rules ()
(if tes... | #lang whalesong
Modified 2 March 1997 by to add graphs - benchmark
and to expand the four macros below .
Modified 11 June 1997 by to eliminate assertions
Modified 4 May 2010 by to get rid of one - armed ifs
Performance note : ( graphs - benchmark 7 ) allocates
34509143 pairs
389625 vectors w... |
9988a34bd8b2fbb6e8fd520f39b680b7470dea1ed28b15a0a963ac9c7af88ddc | dybber/fcl | CodeGen.hs | module FCL.IL.CodeGen (codeGen) where
import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.Set (Set)
import Data.Map (Map)
import CGen hiding (freeVars)
import CGen.Syntax (Statement(Decl), CExp(Int32E))
import CGen.OpenCL.HostCode
import FCL.IL.Analysis.Liveness
import FCL.IL.Analysis.FreeV... | null | https://raw.githubusercontent.com/dybber/fcl/e794a4b9d3ab6207fbe89fcddaafe97ae0d379dd/src/FCL/IL/CodeGen.hs | haskell | number of shared memory arrays
parameters, bound in host-code
kernel declaration
kernel handle in hostcode
size, elem type and opencl memobject
-------------------------
Host generation monad --
-------------------------
Host monad
---------------------------
Kernel generation monad --
-------------------------... | module FCL.IL.CodeGen (codeGen) where
import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.Set (Set)
import Data.Map (Map)
import CGen hiding (freeVars)
import CGen.Syntax (Statement(Decl), CExp(Int32E))
import CGen.OpenCL.HostCode
import FCL.IL.Analysis.Liveness
import FCL.IL.Analysis.FreeV... |
212cc99a2c81d2ff49ae4f1548255b8fc3c38192b0316ea4b1e9c5308cc53875 | morpheusgraphql/morpheus-graphql | Resolver.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Domains.Posts.Resolver where
import Data.Data (Typeable)
import Data.Maybe (catMaybes)
import Data.Morpheus (deriveApp)
import Data.Morpheus.Types
import Domains.Posts.Posts
resolvePost ::
Monad m =>
ID ->
m (Maybe (Post m))
resolvePost postId =
... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/d2c085efb3ce6d875a5d5d8fe0024c048a089a2c/examples/code-gen/src/Domains/Posts/Resolver.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module Domains.Posts.Resolver where
import Data.Data (Typeable)
import Data.Maybe (catMaybes)
import Data.Morpheus (deriveApp)
import Data.Morpheus.Types
import Domains.Posts.Posts
resolvePost ::
Monad m =>
ID ->
m (Maybe (Post m))
resolvePost postId =
pure $
Just $
Post
... |
fc782254ac50a30956403e245ce9381c86eb3fdb30b0d4671dad67d555e23797 | Frozenlock/bacure | obj.clj | (ns bacure.coerce.obj
(:require [bacure.coerce :as c :refer [bacnet->clojure clojure->bacnet]]
[bacure.coerce.type.primitive :as p]
[bacure.coerce.type.enumerated :as e])
(:import com.serotonin.bacnet4j.RemoteObject
(com.serotonin.bacnet4j.obj ObjectProperties
... | null | https://raw.githubusercontent.com/Frozenlock/bacure/2d743492f7865d8c61313f4d73818c3d1ee462de/src/bacure/coerce/obj.clj | clojure | we only go to clojure... no need to do a clojure->bacnet method
unfortunately there doesn't appear to be a method retrieve all
the object properties at once. While it might be a little
wasteful, the most straightforward alternative appears to try to
get the value of all the possible properties for the given objec... | (ns bacure.coerce.obj
(:require [bacure.coerce :as c :refer [bacnet->clojure clojure->bacnet]]
[bacure.coerce.type.primitive :as p]
[bacure.coerce.type.enumerated :as e])
(:import com.serotonin.bacnet4j.RemoteObject
(com.serotonin.bacnet4j.obj ObjectProperties
... |
5339b95c96839d3af9e053503182b506d8a1ff5516e19633cd64cb19f6488fea | airalab/hs-web3 | String.hs | -- |
-- Module : Data.Solidity.Prim.String
Copyright : 2016 - 2021
-- License : Apache-2.0
--
-- Maintainer :
-- Stability : experimental
-- Portability : noportable
--
- encoded string type .
--
module Data.Solidity.Prim.String where
import Data.Text (Text)
im... | null | https://raw.githubusercontent.com/airalab/hs-web3/c03b86eb621f963886a78c39ee18bcec753f17ac/packages/solidity/src/Data/Solidity/Prim/String.hs | haskell | |
Module : Data.Solidity.Prim.String
License : Apache-2.0
Maintainer :
Stability : experimental
Portability : noportable
| Copyright : 2016 - 2021
- encoded string type .
module Data.Solidity.Prim.String where
import Data.Text (Text)
import Data.Text.Encoding (decodeUtf8, encodeUtf8)
import Data.Solidity.Abi (AbiGet (..), AbiPut (..),
... |
726c93c4a6e2031bdf7be29f214bae1b438cdb94d78b95116537b1fcb9007b90 | JeffreyBenjaminBrown/digraphs-with-text | weird characters.hs | let chars = map (\n -> (show n) ++ " " ++ [toEnum n :: Char]) [1001..1500]
mapM_ putStrLn chars
164 ¤
165 ¥
166 ¦
167 §
168 ¨
169 ©
170 ª
172 ¬
171 «
187 »
191 ¿
247 ÷
248 ø
322 ł
The next were not readable.
398 Ǝ
399 Ə
404 Ɣ
450 ǂ
| null | https://raw.githubusercontent.com/JeffreyBenjaminBrown/digraphs-with-text/34e47a52aa9abb6fd42028deba1623a92e278aae/howto/infreq/weird%20characters.hs | haskell | let chars = map (\n -> (show n) ++ " " ++ [toEnum n :: Char]) [1001..1500]
mapM_ putStrLn chars
164 ¤
165 ¥
166 ¦
167 §
168 ¨
169 ©
170 ª
172 ¬
171 «
187 »
191 ¿
247 ÷
248 ø
322 ł
The next were not readable.
398 Ǝ
399 Ə
404 Ɣ
450 ǂ
| |
066b46347fa42a0cc62566dae530a38d4e31366a81fbf8c0993a94da7b1ad010 | qfpl/reflex-workshop | Counter.hs | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... | null | https://raw.githubusercontent.com/qfpl/reflex-workshop/244ef13fb4b2e884f455eccc50072e98d1668c9e/src/Workshop/Behaviors/Dynamics/Counter.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs # | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... |
c4eda21e2d215c94a4165b7fadf793361df9c618398f9b7969401650f7d625fc | hiredman/clojurebot | stock_quote.clj | (ns hiredman.clojurebot.stock-quote
(:require [hiredman.clojurebot.core :as core]
[hiredman.utilities :as util]
[clojurebot.json :as json]))
(def url "=")
(defn stock-quote [symbol]
(json/decode-from-str (apply str (butlast (drop 4 (util/get-url (.concat url symbol)))))))
(def... | null | https://raw.githubusercontent.com/hiredman/clojurebot/1e8bde92f2dd45bb7928d4db17de8ec48557ead1/src/hiredman/clojurebot/stock_quote.clj | clojure |
(core/remove-dispatch-hook ::stock-quote) | (ns hiredman.clojurebot.stock-quote
(:require [hiredman.clojurebot.core :as core]
[hiredman.utilities :as util]
[clojurebot.json :as json]))
(def url "=")
(defn stock-quote [symbol]
(json/decode-from-str (apply str (butlast (drop 4 (util/get-url (.concat url symbol)))))))
(def... |
eaab35a2982a1c2fa390155ca6bab2732403632a795c4431979afca395d1057b | GaloisInc/surveyor | StateExplorer.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
module Surveyor.Brick.Widget.SymbolicExecution.StateExplorer (
StateExplorer,
stateExpl... | null | https://raw.githubusercontent.com/GaloisInc/surveyor/96b6748d811bc2ab9ef330307a324bd00e04819f/surveyor-brick/src/Surveyor/Brick/Widget/SymbolicExecution/StateExplorer.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
This includes the selected value state as well as the state for the value
viewer widget itself, all encapsulated in the 'WCSV.CallStackViewer'. The
nonce lets us prove that we have the same symbolic backend as the
| Construct the necessary ... | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
module Surveyor.Brick.Widget.SymbolicExecution.StateExplorer (
StateExplorer,
stateExplorer,
renderSymbolicExecutionStateExplorer,
handleSymbolicExecutionStateExplorerEv... |
d0dd74b3d0b3718a6b3bc82ff031e1cce5ce5207ed430344fe7817f2517fece4 | fission-codes/fission | Types.hs | module Fission.CLI.Parser.Quiet.Types (QuietFlag (..)) where
import Fission.Prelude
newtype QuietFlag = QuietFlag
{ unFlag :: Bool }
deriving newtype (Show, Eq)
| null | https://raw.githubusercontent.com/fission-codes/fission/afaae0dc5f83f4e35a3d4fdbdea2608a8d49bef8/fission-cli/library/Fission/CLI/Parser/Quiet/Types.hs | haskell | module Fission.CLI.Parser.Quiet.Types (QuietFlag (..)) where
import Fission.Prelude
newtype QuietFlag = QuietFlag
{ unFlag :: Bool }
deriving newtype (Show, Eq)
| |
c200b9b5fe57037370a0076f3d9217f414b7cb8a5c0b007101774b12ec4443a3 | gelisam/hawk | Uncertain.hs | # LANGUAGE CPP , , RankNTypes #
-- | A computation which may raise warnings or fail in error.
module Control.Monad.Trans.Uncertain where
import Prelude hiding (fail)
#if MIN_VERSION_base(4,12,0)
import Control.Monad.Fail (
#if !MIN_VERSION_base(4,13,0)
MonadFail,
#endif
fail)
#else
import Prelude (fail)
#endif
i... | null | https://raw.githubusercontent.com/gelisam/hawk/55f77ef0f76348865b08fddfc8da063803f88c12/src/Control/Monad/Trans/Uncertain.hs | haskell | | A computation which may raise warnings or fail in error.
| Indent a multiline warning message.
>>> :{
runUncertainIO $ do
multilineWarn "foo\nbar\n"
:}
warning:
foo
bar
| Indent a multiline error message.
>>> :{
runUncertainIO $ do
multilineFail "foo\nbar\n"
:}
error:
foo
bar
with unce... | # LANGUAGE CPP , , RankNTypes #
module Control.Monad.Trans.Uncertain where
import Prelude hiding (fail)
#if MIN_VERSION_base(4,12,0)
import Control.Monad.Fail (
#if !MIN_VERSION_base(4,13,0)
MonadFail,
#endif
fail)
#else
import Prelude (fail)
#endif
import "mtl" Control.Monad.Trans
import "mtl" Control.Monad.Ide... |
627c74a840e580d3bb0a8f884c64c42f3c27ec4f7ff67d00bd2ee75932c1d0b6 | HumbleUI/HumbleUI | hoverable.clj | (ns io.github.humbleui.ui.hoverable
(:require
[io.github.humbleui.core :as core]
[io.github.humbleui.protocols :as protocols]))
(core/deftype+ Hoverable [on-hover on-out ^:mut hovered?]
:extends core/AWrapper
protocols/IContext
(-context [_ ctx]
(cond-> ctx
hovered? (assoc :hui/hovered? tr... | null | https://raw.githubusercontent.com/HumbleUI/HumbleUI/b0a596028dac8ebebf178a378e88d1c9f971e9dd/src/io/github/humbleui/ui/hoverable.clj | clojure | (ns io.github.humbleui.ui.hoverable
(:require
[io.github.humbleui.core :as core]
[io.github.humbleui.protocols :as protocols]))
(core/deftype+ Hoverable [on-hover on-out ^:mut hovered?]
:extends core/AWrapper
protocols/IContext
(-context [_ ctx]
(cond-> ctx
hovered? (assoc :hui/hovered? tr... | |
c10f019c173f5bd08147154b65d1b5e0ba87f7453569c405a9266dd5a3d904f0 | hyperfiddle/electric | hfql13b.clj | (ns dustin.hfql13b
"hfql with scope applicative, not monad"
(:refer-clojure :exclude [eval])
(:require
[dustin.fiddle :refer :all]
[dustin.hf-nav :refer :all]
[dustin.monad-scope :refer [runScope pure bind fmap]]
[meander.epsilon :as m :refer [match rewrite]]
[minitest :refer [tests]]))
(def... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2020/hfql/hfql13b.clj | clojure | name?
recursive bind
why do we see the ident in scope here
Tests use hf-pull! runner to test what matters, the result, as I de-bug the scope monad
ClassCastException
query
scope
result | (ns dustin.hfql13b
"hfql with scope applicative, not monad"
(:refer-clojure :exclude [eval])
(:require
[dustin.fiddle :refer :all]
[dustin.hf-nav :refer :all]
[dustin.monad-scope :refer [runScope pure bind fmap]]
[meander.epsilon :as m :refer [match rewrite]]
[minitest :refer [tests]]))
(def... |
44f0d268e41e63b45399aa709868787c94fdb4bdfd63847adeb28895e9149cee | efcasado/behaviours2 | dummy_gen_server.erl | -module(dummy_gen_server).
-compile({parse_transform, bhv2_pt}).
-behaviour(gen_server).
-export([init/1, handle_info/2]).
Only init/1 and handle_info/2 are provided by the user .
init([Owner]) ->
{ok, Owner}.
handle_info(Info, Owner) ->
Owner ! lists:reverse(Info),
{noreply, Owner}.
| null | https://raw.githubusercontent.com/efcasado/behaviours2/95190c212d0c28a89a62b451005e211c71176c7f/tests/dummy_gen_server.erl | erlang | -module(dummy_gen_server).
-compile({parse_transform, bhv2_pt}).
-behaviour(gen_server).
-export([init/1, handle_info/2]).
Only init/1 and handle_info/2 are provided by the user .
init([Owner]) ->
{ok, Owner}.
handle_info(Info, Owner) ->
Owner ! lists:reverse(Info),
{noreply, Owner}.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.