_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 |
|---|---|---|---|---|---|---|---|---|
01b153eed0bd1b67ece3649db5b18309a5c0059d1ed7b2f931bb468b0ec9b5f2 | mbutterick/typesetting | main.rkt | #lang racket
(require "us.rkt")
(provide (all-from-out "us.rkt"))
(module+ safe
(require (submod "us.rkt" safe))
(provide (all-from-out (submod "us.rkt" safe)))) | null | https://raw.githubusercontent.com/mbutterick/typesetting/8eedb97bb64cb2ff0cd9646eb1b0e46b67f1af44/hyphenate/hyphenate/main.rkt | racket | #lang racket
(require "us.rkt")
(provide (all-from-out "us.rkt"))
(module+ safe
(require (submod "us.rkt" safe))
(provide (all-from-out (submod "us.rkt" safe)))) | |
92f812f3e6f4ef6fa3c74afdd691b0331bf2369415ba965cf63cbcefb38374a3 | footprintanalytics/footprint-web | driver.clj | (ns metabase.driver
"Metabase Drivers handle various things we need to do with connected data warehouse databases, including things like
introspecting their schemas and processing and running MBQL queries. Drivers must implement some or all of the
multimethods defined below, and register themselves with a call to... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/driver.clj | clojure | see [[metabase.driver.sql]] and
+----------------------------------------------------------------------------------------------------------------+
| Current Driver |
+-----------------------------------------------------... | (ns metabase.driver
"Metabase Drivers handle various things we need to do with connected data warehouse databases, including things like
introspecting their schemas and processing and running MBQL queries. Drivers must implement some or all of the
multimethods defined below, and register themselves with a call to... |
2cc123a6181556c50578d993114eeb4ad89024741724c7b6dab023ba30b33743 | jellelicht/guix | graph.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/graph.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix graph)
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix records)... |
a318b119900522611e293707fced7da14fc97317255cea5edfd741a738bf9179 | kupl/MicSE | smt.ml | (* Smt: Interface to the Z3 SMT solver *)
exception SmtError = Z3.Error
open! Core
(******************************************************************************)
(******************************************************************************)
Common
(**... | null | https://raw.githubusercontent.com/kupl/MicSE/23678f01f993baac6c45ca2aab029e7356edfa2f/lib/smt.ml | ocaml | Smt: Interface to the Z3 SMT solver
****************************************************************************
****************************************************************************
****************************************************************************
***************************************************... |
exception SmtError = Z3.Error
open! Core
Common
Map of Tz.mich_t Tz.cc
module MTMap = Map.Make (Tz.MichTCC_cmp)
module MVMap = Map.Make (Tz.MichVCC_cmp)
type const_delim =
| CST_unit
| CST_key
| CST_keyhash_str
| CST_keyhash_key
| CST_optio... |
df358660a93bab91094f03202c1ac4e28ff01ad99501e583df28dcf12d211eb6 | grwlf/htvm | TinyPlot.hs | {- | Graphics.TinyPlot is a minimalistic `gnuplot` wrapper -}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
module Graphics.TinyPlot where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import Control.Monad.Trans
import Control.Exception
import Data... | null | https://raw.githubusercontent.com/grwlf/htvm/90cff0ebde0bdff3e8048a82a5b1b0d46fc7d66e/app/demo/Graphics/TinyPlot.hs | haskell | | Graphics.TinyPlot is a minimalistic `gnuplot` wrapper |
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
module Graphics.TinyPlot where
import Control.Applicative
import Control.Concurrent
import Control.Monad
import Control.Monad.Trans
import Control.Exception
import Data.Monoid ((<>))
import Data.Char
import System.IO
import System... |
57c07678f2cc82f54737b14410f0d5a7ee80bc107bd0b167e6d0b52d8db55cb6 | flora-pm/flora-server | Category.hs | module Flora.Model.Category
( Category (..)
, CategoryId (..)
, CategoryName (..)
, mkCategory
, mkCategoryId
)
where
import Flora.Model.Category.Types
| null | https://raw.githubusercontent.com/flora-pm/flora-server/c214c0b5d5db71a8330eb69326284be5a4d5e858/src/core/Flora/Model/Category.hs | haskell | module Flora.Model.Category
( Category (..)
, CategoryId (..)
, CategoryName (..)
, mkCategory
, mkCategoryId
)
where
import Flora.Model.Category.Types
| |
11b103ecfc6515a6176526f44bd5d57a673dd8645148005bb7340965384fc881 | plandes/clj-nlp-parse | config.clj | (ns ^{:doc "Configure the Stanford CoreNLP parser.
This provides a plugin architecture for natural language processing tasks in a
pipeline. A parser takes either an human language utterance or a previously
annotated data parsed from an utterance.
### Parser Libraries
Each parser provides a set of *components* that... | null | https://raw.githubusercontent.com/plandes/clj-nlp-parse/fa157d7683b51f54c9721a21ee1441b0b7661c07/src/clojure/zensols/nlparse/config.clj | clojure | this is called by [[reset]
see [[all-parsers]]"
no timeout is the default" | (ns ^{:doc "Configure the Stanford CoreNLP parser.
This provides a plugin architecture for natural language processing tasks in a
pipeline. A parser takes either an human language utterance or a previously
annotated data parsed from an utterance.
### Parser Libraries
Each parser provides a set of *components* that... |
39aaf3166c3e3a1e21b84412c21d51497790ee0f8340b3b8f467d6b30f073475 | hopv/r_type | parseBase.ml | open! Lib
(** A list of variable and type pairs. *)
type args = (string * string) list
* An ADT representing a predicate definition 's body .
type body =
(** A existential quantifier. *)
| EQtf of args * body
(** A universall quantifier. *)
| UQtf of args * body
(** Operator application. *)
| App of string * body lis... | null | https://raw.githubusercontent.com/hopv/r_type/7120b74912118a8eced8e63d1792907702e090dc/src/horn_solver/parseBase.ml | ocaml | * A list of variable and type pairs.
* A existential quantifier.
* A universall quantifier.
* Operator application.
* Predicate application.
* A let-binding.
* Variable or constant.
* Pretty printer for arguments.
* Pretty printer for body, good old ugly recursion.
* A model maps predicate identifiers to optio... | open! Lib
type args = (string * string) list
* An ADT representing a predicate definition 's body .
type body =
| EQtf of args * body
| UQtf of args * body
| App of string * body list
| PApp of string * body list
| Let of (string * body) list * body
| Leaf of string
let needs_parens = function
| Leaf _ -> false
| _... |
01fe8454518a55d3c8cd136d1c3fee2ca4cd3d5cbc6fb1360f87333957d9d94e | hhucn/decide3 | process_test.clj | (ns decide.models.process-test
(:require
[clojure.test :refer [deftest use-fixtures]]
[decide.models.process :as process]
[decide.models.process.mutations :as process.mutations]
[decide.models.user :as user]
[decide.server-components.pathom :as pathom]
[decide.test-utils.common :refer [*conn* test-d... | null | https://raw.githubusercontent.com/hhucn/decide3/7c048b0411285282d56a127cd1ec10362d024947/src/test/decide/models/process_test.clj | clojure | (ns decide.models.process-test
(:require
[clojure.test :refer [deftest use-fixtures]]
[decide.models.process :as process]
[decide.models.process.mutations :as process.mutations]
[decide.models.user :as user]
[decide.server-components.pathom :as pathom]
[decide.test-utils.common :refer [*conn* test-d... | |
da69d5722750493276037828ff99dfb6325c12bcd665f54cd4ac4ca5874c5f89 | c4-project/c4f | expr.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fir_gen/test/expr.mli | ocaml | * This interface deliberately left blank. | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
bb82a3673d93b72b5591c7fba00cb21f99e73a7dae835d0f1df570ae1df433bf | ryukzak/nitta | Multiplier.hs | -- All extensions should be enabled explicitly due to doctest in this module.
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStr... | null | https://raw.githubusercontent.com/ryukzak/nitta/c04699e2456e5f516b33266d1edcf4d66f6f0555/src/NITTA/Model/ProcessorUnits/Multiplier.hs | haskell | All extensions should be enabled explicitly due to doctest in this module.
# LANGUAGE OverloadedStrings #
TODO: A promising direction for the improvement is the implementation of the
accumulator into it. It allows multiplying an arbitrary number of arguments,
which will reduce the number of data transactions on the... | # LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Standa... |
60c962596a40d96ea21a4019d70e64a8cb2a3dbc75918aa09c5afd7846d2806f | RyanGlScott/gists | CoercibleGenericsAbstract.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE RoleAnnotations #
{-# OPTIONS_GHC -Wno-unused-top-binds #-}
-- | A simple abstract type
module CoercibleGenericsAbstract (Abstract) where
data Abstract a = Abstract a
| null | https://raw.githubusercontent.com/RyanGlScott/gists/1ec747a310f0ff54576fdf8000fa15f4e848fa41/src/CoercibleGenericsAbstract.hs | haskell | # OPTIONS_GHC -Wno-unused-top-binds #
| A simple abstract type | # LANGUAGE DeriveFunctor #
# LANGUAGE RoleAnnotations #
module CoercibleGenericsAbstract (Abstract) where
data Abstract a = Abstract a
|
1cbef437709c59c991bead98dd6d45a05059a9490b185d30c788724be6037ec4 | crategus/cl-cffi-gtk | notebook.lisp | ;;;; Example Notebook - 2021-12-4
(in-package :gtk-example)
(defun example-notebook (&optional (application nil))
(within-main-loop
(let ((window (make-instance 'gtk-window
:title "Example Notebook"
:application application
... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/demo/gtk-example/notebook.lisp | lisp | Example Notebook - 2021-12-4 |
(in-package :gtk-example)
(defun example-notebook (&optional (application nil))
(within-main-loop
(let ((window (make-instance 'gtk-window
:title "Example Notebook"
:application application
:type :toplevel
... |
1e357e6d54eda395852415ec02a1c9dbf7393f795a3bf74786b4ea44e8aff5c3 | glv2/cl-monero-tools | miner.lisp | ;;;; This file is part of monero-tools
Copyright 2016 - 2020
Distributed under the GNU GPL v3 or later .
;;;; See the file LICENSE for terms of use and distribution.
(in-package :monero-tools)
(defparameter *mine-stop* nil)
(defparameter *mine-result* nil)
(defparameter *mine-lock* nil)
(defun modify-block-... | null | https://raw.githubusercontent.com/glv2/cl-monero-tools/ab972ac3a7c5489cf23e3bdaa5d390d5cff1732b/monero-tools/mine/miner.lisp | lisp | This file is part of monero-tools
See the file LICENSE for terms of use and distribution. | Copyright 2016 - 2020
Distributed under the GNU GPL v3 or later .
(in-package :monero-tools)
(defparameter *mine-stop* nil)
(defparameter *mine-result* nil)
(defparameter *mine-lock* nil)
(defun modify-block-template (template nonce &key reserve-nonce reserve-offset in-place)
"Change the NONCE and the opt... |
7e2e5042c7b1452dbfe4bb8e49601e996a58943313fe4b44c336a5bde25f1167 | multimodalrouting/osm-fulcro | example_ws.cljs | (ns app.ui.leaflet.example-ws
(:require [nubank.workspaces.core :refer [defcard]]
[nubank.workspaces.card-types.fulcro3 :as ct.fulcro]
[nubank.workspaces.model :as wsm]
[com.fulcrologic.fulcro.components :refer [defsc get-query get-initial-state transact!]]
[com.fulcrol... | null | https://raw.githubusercontent.com/multimodalrouting/osm-fulcro/dedbf40686a18238349603021687694e5a4c31b6/src/workspaces/app/ui/leaflet/example_ws.cljs | clojure | TODO till now fulcro-db is not aware of state changes within the original layer selection
fullscreen | (ns app.ui.leaflet.example-ws
(:require [nubank.workspaces.core :refer [defcard]]
[nubank.workspaces.card-types.fulcro3 :as ct.fulcro]
[nubank.workspaces.model :as wsm]
[com.fulcrologic.fulcro.components :refer [defsc get-query get-initial-state transact!]]
[com.fulcrol... |
4333ecb578d62261d9ec04e47aedecf3e12b52c94346fe50211e6ec7ae00df8c | esl/erlang-web | wpart_lookup_unbreak.erl | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
Erlang Web Public License along with this software . If not , it can be
%% retrieved via the world... | null | https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/wparts-1.4.1/src/wpart_lookup_unbreak.erl | erlang | compliance with the License. You should have received a copy of the
retrieved via the world wide web at -consulting.com/.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
---------------------------------... | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Erlang Web Public License along with this software . If not , it can be
Software distributed under the License is distributed on an " AS IS "
The Initial Developer o... |
cc683ab5a6d187252263e171f6551c518ec480a166de23b36f6cc57f7d5eb8ce | malcolmstill/ulubis | screenshot.lisp |
(in-package :ulubis)
(defun screenshot (&optional (filename "screenshot.png"))
(with-slots ((width screen-width) (height screen-height)) *compositor*
(let* ((png (make-instance 'zpng:pixel-streamed-png
:color-type :truecolor-alpha
:width width
:height height))
(bytes 3)
(pi... | null | https://raw.githubusercontent.com/malcolmstill/ulubis/23c89ccd5589930e66025487c31531f49218bb76/screenshot.lisp | lisp |
(in-package :ulubis)
(defun screenshot (&optional (filename "screenshot.png"))
(with-slots ((width screen-width) (height screen-height)) *compositor*
(let* ((png (make-instance 'zpng:pixel-streamed-png
:color-type :truecolor-alpha
:width width
:height height))
(bytes 3)
(pi... | |
995c201bd109ca2434d6565a10c72cf73fe6877b0fb53b65d5718009f228b279 | datopia/abci-host | kv.clj | (ns abci.example.kv
"An example ABCI application, in the mold of
Tendermint's [kvstore.go]().
The application deterministically persists arbitrary EDN data structures
under keyword keys --- transactions are literal EDN maps containing one or
more keys for insertion. There is no notion of ownership, or use... | null | https://raw.githubusercontent.com/datopia/abci-host/3c409564869b753a9c0e3488859d3c08ff34b0d2/example/src/abci/example/kv.clj | clojure | Our state trie requires a backing store which complies with the
[[kv/KeyValueStore]] protocol --- we're going with LevelDB, as we'd like
the trie state to persist across restarts.
Values are incorporated via `trie/insert` --- an in-memory operation, returning
a new trie:
`trie/commit` flushes pending inserts to d... | (ns abci.example.kv
"An example ABCI application, in the mold of
Tendermint's [kvstore.go]().
The application deterministically persists arbitrary EDN data structures
under keyword keys --- transactions are literal EDN maps containing one or
more keys for insertion. There is no notion of ownership, or use... |
e3480e54567ca3efcff4b55cba1d12a4f3e67e4ed2dbe899ae7418df58de2df3 | hyperfiddle/electric | pending_frame_nil_bug1.cljc | (ns dustin.y2023.pending-frame-nil-bug1
#?(:cljs (:require-macros dustin.y2023.pending-when-impulse-bug1))
(:import [hyperfiddle.photon Pending])
(:require
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom2 :as dom]
[hyperfiddle.photon-ui3 :as ui3]
[hyperfiddle.rcf :as rcf :refer [tests tap % wit... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2023/pending_frame_nil_bug1.cljc | clojure | necessary
when and v' are connected
new frame
(p/defn Demo []
(Demo2.)
(Demo3.)) | (ns dustin.y2023.pending-frame-nil-bug1
#?(:cljs (:require-macros dustin.y2023.pending-when-impulse-bug1))
(:import [hyperfiddle.photon Pending])
(:require
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom2 :as dom]
[hyperfiddle.photon-ui3 :as ui3]
[hyperfiddle.rcf :as rcf :refer [tests tap % wit... |
66e5db6192f114455e475dc3d9825e87f38ddbd29b109b8bacb0959fbfef492f | nervous-systems/fink-nottle | platform.cljs | (ns fink-nottle.internal.platform
(:require [cljs.nodejs :as nodejs])
(:require-macros [cljs.core :refer [instance?]]))
(def ->int js/parseInt)
(def BigNumber (nodejs/require "bignumber.js"))
(defn string->number [s]
(let [v (BigNumber. s)]
(if (and (= -1 (.indexOf s ".")) (<= (.precision v) 15))
(js... | null | https://raw.githubusercontent.com/nervous-systems/fink-nottle/4fe25f2d89dc272e70b16742bca82455e3a43edb/src/fink_nottle/internal/platform.cljs | clojure | (ns fink-nottle.internal.platform
(:require [cljs.nodejs :as nodejs])
(:require-macros [cljs.core :refer [instance?]]))
(def ->int js/parseInt)
(def BigNumber (nodejs/require "bignumber.js"))
(defn string->number [s]
(let [v (BigNumber. s)]
(if (and (= -1 (.indexOf s ".")) (<= (.precision v) 15))
(js... | |
00aaf4013efab71ebc4216d2b3b0a34eb803dbb3e36495630cb5d6f688ad7bc9 | okeuday/erlbench | pqueue_priorities2.erl | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et :
-module(pqueue_priorities2).
-export([test/0, test/1, get/3, set/3]).
-include("erlbench.hrl").
data12() ->
priority_queue:new().
data13() ->
pqueue:new().
data14() ->
... | null | https://raw.githubusercontent.com/okeuday/erlbench/9fc02a2e748b287b85f6e9641db6b2ca68791fa4/src/pqueue_priorities2.erl | erlang | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et :
-module(pqueue_priorities2).
-export([test/0, test/1, get/3, set/3]).
-include("erlbench.hrl").
data12() ->
priority_queue:new().
data13() ->
pqueue:new().
data14() ->
... | |
e297dbff1824590768efeffcc5a6051184a857ef07d7f7aae29a4fb5fa0a07f6 | unisonweb/unison | Interface.hs | # LANGUAGE DataKinds #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ParallelListComp #
# LANGUAGE PatternGuards #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Unison.Runtime.Interface
( startRuntime,
withRuntime,
standalone,
... | null | https://raw.githubusercontent.com/unisonweb/unison/61b65bfe5b16df10d2ba9ba05afecfaffc016d0b/parser-typechecker/src/Unison/Runtime/Interface.hs | haskell | # LANGUAGE OverloadedStrings #
This affects the amount of clean-up and book-keeping the runtime does.
Don't bother tracking open threads when running standalone, they'll all be cleaned up
when the process itself exits.
Track all forked threads so that they can be killed when the main process returns,
otherwise the... | # LANGUAGE DataKinds #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ParallelListComp #
# LANGUAGE PatternGuards #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Unison.Runtime.Interface
( startRuntime,
withRuntime,
standalone,
runStandalone,
StoredCache,
... |
1742f50c979ba60718bb9eb59cdcdecbafc3f14a6fe09ec1e80e4fa0d0b15e2b | tsloughter/kuberl | kuberl_v1_rolling_update_daemon_set.erl | -module(kuberl_v1_rolling_update_daemon_set).
-export([encode/1]).
-export_type([kuberl_v1_rolling_update_daemon_set/0]).
-type kuberl_v1_rolling_update_daemon_set() ::
#{ 'maxUnavailable' => maps:map()
}.
encode(#{ 'maxUnavailable' := MaxUnavailable
}) ->
#{ 'maxUnavailable' => MaxUnavailable
... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_rolling_update_daemon_set.erl | erlang | -module(kuberl_v1_rolling_update_daemon_set).
-export([encode/1]).
-export_type([kuberl_v1_rolling_update_daemon_set/0]).
-type kuberl_v1_rolling_update_daemon_set() ::
#{ 'maxUnavailable' => maps:map()
}.
encode(#{ 'maxUnavailable' := MaxUnavailable
}) ->
#{ 'maxUnavailable' => MaxUnavailable
... | |
ac878fcebb872ef5041f36ea073e1b263fc2af50ffe399f60479a24445eb0b33 | iu-parfunc/verified-instances | Maybe.hs | {-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--exactdc" @-}
{-@ LIQUID "--noadt" @-}
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeFamilies #-}
module GenericProofs.VerifiedOrd.Examples.Maybe
( Maybe(..)
, RepMaybe
, toMaybe
, fromMaybe
, tofMaybe
, fotMaybe
, isoMaybe
, ... | null | https://raw.githubusercontent.com/iu-parfunc/verified-instances/cebfdf1e3357a693360be74c90211be18ce3c045/generic-proofs/src/GenericProofs/VerifiedOrd/Examples/Maybe.hs | haskell | @ LIQUID "--higherorder" @
@ LIQUID "--exactdc" @
@ LIQUID "--noadt" @
# LANGUAGE TypeFamilies #
@ axiomatize fromMaybe @
@ axiomatize toMaybe @
@ tofMaybe :: a:Maybe a
-> { toMaybe (fromMaybe a) == a }
@
@ fotMaybe :: a:RepMaybe a x
-> { fromMaybe (toMaybe a)... | # LANGUAGE TemplateHaskell #
module GenericProofs.VerifiedOrd.Examples.Maybe
( Maybe(..)
, RepMaybe
, toMaybe
, fromMaybe
, tofMaybe
, fotMaybe
, isoMaybe
, vordMaybe
) where
import Language.Haskell.Liquid.ProofCombinators
import GenericProofs.Iso
import GenericProofs.TH
import GenericProofs.Verifie... |
656cdc2449b4a69c835ae8e3f3a81cdcdb32945e1e2cb548c31ab9f70e773713 | dongcarl/guix | transformations.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 , 2017 , 2018 , 2019 , 2020 , 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 Founda... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/guix/transformations.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2016 , 2017 , 2018 , 2019 , 2020 , 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix transformations)
#:use-module (guix i18n)
#:use-module... |
b5f1f0a05c6970cd1385b9c58eb48c29cd1b758a9c5c8735a544b273406645f0 | solita/laundry | auth_test.clj | (ns laundry.auth-test
(:require
[clojure.test :refer :all]
[laundry.test.fixture :as fixture]
[ring.mock.request :as mock]))
(def api-username "laundry-api")
(def api-password "unittest")
(def test-auth-conf
(-> fixture/test-conf
(assoc :basic-auth-password (fn [] api-password))))
(defn base64-enc... | null | https://raw.githubusercontent.com/solita/laundry/4e1fe96ebae19cde14c3ba5396929ba1578b7715/test/laundry/auth_test.clj | clojure | (ns laundry.auth-test
(:require
[clojure.test :refer :all]
[laundry.test.fixture :as fixture]
[ring.mock.request :as mock]))
(def api-username "laundry-api")
(def api-password "unittest")
(def test-auth-conf
(-> fixture/test-conf
(assoc :basic-auth-password (fn [] api-password))))
(defn base64-enc... | |
1887e3504391c9ce4e8bd35793d9a25d6e3d29034cd2ee6dcecad96186ad8445 | McCLIM/McCLIM | package.lisp | ;;;
( c ) copyright 2006 by ( )
;;;
;;; This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any later version .
;;;
;;; This li... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/7c890f1ac79f0c6f36866c47af89398e2f05b343/Apps/Functional-Geometry/package.lisp | lisp |
This library is free software; you can redistribute it and/or
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
License along with this library; if not, write t... | ( c ) copyright 2006 by ( )
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public License for more details .
You should have received a copy of the GNU Library General Public
Free Software Foundation , Inc.... |
3d5cd0f709f5750d608acf3100fce9354da4a3ad29c747f3c1377c43e668ea21 | ardoq/compojure-swagger | spec_test.clj | (ns compojure-swagger.spec-test
(:require [clojure.test :refer :all]
[clojure.spec.alpha :as s]
[compojure-swagger.core :as core]
[spec-tools.core :as st]
[spec-tools.swagger.core :as swagger]))
(deftest spec-tools-test
(testing "spec-tools/merge works"
(s/def ::... | null | https://raw.githubusercontent.com/ardoq/compojure-swagger/dba0decefb817c2db87bbe71dc34b5aa37af0de4/test/compojure_swagger/spec_test.clj | clojure | (ns compojure-swagger.spec-test
(:require [clojure.test :refer :all]
[clojure.spec.alpha :as s]
[compojure-swagger.core :as core]
[spec-tools.core :as st]
[spec-tools.swagger.core :as swagger]))
(deftest spec-tools-test
(testing "spec-tools/merge works"
(s/def ::... | |
057da42a53fc8681a02a091cd772b5a8f05e2956828089b3b769c62271cd4265 | dannypsnl/scheme-to-arm64 | arm64.rkt | #lang nanopass
(provide arm64
emit-program
flatten-arm64)
(define ops '(lsr lsl))
(define (op? x) (member x ops))
(define arm64-regs '(sp
w0 ; we use this to let converted result fit into char
x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10
x11 x12 x1... | null | https://raw.githubusercontent.com/dannypsnl/scheme-to-arm64/7be6aaf2d5c3b45cffb98750b43d48df23550c50/lang/arm64.rkt | racket | we use this to let converted result fit into char
don't directly use this, this is stands for expression that generates several instructions | #lang nanopass
(provide arm64
emit-program
flatten-arm64)
(define ops '(lsr lsl))
(define (op? x) (member x ops))
(define arm64-regs '(sp
x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10
x11 x12 x13 x14 x15 x16 x17 x18 x19 x20
x21 x22 x23 x24 x25 x26 x... |
bd50c26bec3acbddb047504ea3f1d243c09a119f736c636abf95e83a6ec85cd1 | austral/austral | TypeSystem.ml |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... | null | https://raw.githubusercontent.com/austral/austral/69b6f7de36cc9576483acd1ac4a31bf52074dbd1/lib/TypeSystem.ml | ocaml | TODO: arguably this should error, but the compiler crashes if it errors
Individual type variables need not be instantiated. |
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions .
See LICENSE file for details .
SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception
Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions.
See LICENSE file for details.
SPDX... |
c7bfc20af856b301af859ad93461f6ee6ae949c634224564c443382c9f773232 | tekul/broch | Discovery.hs | # LANGUAGE OverloadedStrings , DeriveGeneric , RecordWildCards #
module Broch.OpenID.Discovery
( OpenIDConfiguration (..)
, mkOpenIDConfiguration
)
where
import Data.Aeson
import Data.Text (Text)
import qualified Data.Text as T
import GHC.Generics (Generic)
import Jo... | null | https://raw.githubusercontent.com/tekul/broch/885ace4652cad4dcd806c8c31c1a59bf6a9a3337/Broch/OpenID/Discovery.hs | haskell | -connect-core-1_0.html#SubjectIDTypes | # LANGUAGE OverloadedStrings , DeriveGeneric , RecordWildCards #
module Broch.OpenID.Discovery
( OpenIDConfiguration (..)
, mkOpenIDConfiguration
)
where
import Data.Aeson
import Data.Text (Text)
import qualified Data.Text as T
import GHC.Generics (Generic)
import Jo... |
f75b9f65d78d988424a971b22dbb28f04980fe8d19f04d806116643fd4527e41 | metosin/reitit | core.cljs | (ns frontend.core
(:require [reagent.core :as r]
[reitit.frontend :as rf]
[reitit.frontend.easy :as rfe]
[reitit.frontend.controllers :as rfc]
[reitit.coercion.schema :as rsc]
[schema.core :as s]
[fipp.edn :as fedn]))
(defonce stat... | null | https://raw.githubusercontent.com/metosin/reitit/1ab075bd353966636f154ac36ae9b7990efeb008/examples/frontend-auth/src/frontend/core.cljs | clojure | In real app one would send API call here to create session or retrieve token or something
and the callback would update app-state
If user is authenticated
or if this route has been defined as public, else login view
Shared data for sub-routes
Only run the controllers, which are likely to call authenticated APIs,
... | (ns frontend.core
(:require [reagent.core :as r]
[reitit.frontend :as rf]
[reitit.frontend.easy :as rfe]
[reitit.frontend.controllers :as rfc]
[reitit.coercion.schema :as rsc]
[schema.core :as s]
[fipp.edn :as fedn]))
(defonce stat... |
b35b973f214ec55039229ace2c28514020717b84473bc895ab4d5d2f33b08a06 | wlitwin/graphv | context.ml | module type S = sig
type t
module Align = Align
module BlendFactor = BlendFactor
module Bounds = Bounds
module Buffer : Sigs.BufferS
module Color = Color
module CreateFlags = CreateFlags
module CompositeOperation = CompositeOperation
module CompositeOperationState = CompositeOperati... | null | https://raw.githubusercontent.com/wlitwin/graphv/d0a09575c5ff5ee3727c222dd6130d22e4cf62d9/webgl2/graphv/context.ml | ocaml | module type S = sig
type t
module Align = Align
module BlendFactor = BlendFactor
module Bounds = Bounds
module Buffer : Sigs.BufferS
module Color = Color
module CreateFlags = CreateFlags
module CompositeOperation = CompositeOperation
module CompositeOperationState = CompositeOperati... | |
afac96bef10136a7183243618bbf5b95dff3a7c14e0a7944dc8baab72e0ad395 | samrushing/irken-compiler | t_alias.scm |
(define (+ a b)
(%%cexp (int int -> int) "%0+%1" a b))
(define plus +)
(plus 1 (plus 2 3))
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_alias.scm | scheme |
(define (+ a b)
(%%cexp (int int -> int) "%0+%1" a b))
(define plus +)
(plus 1 (plus 2 3))
| |
edfb6c00f0e2592e416a6a92c6be7eac5fe17dd07d32957d3bc9c13aba9d8e09 | huangz1990/SICP-answers | 37-c-mul.scm | 37-c-mul.scm
(define (c* x y)
(let ((product (make-connector)))
(multiplier x y product)
product))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/37-c-mul.scm | scheme | 37-c-mul.scm
(define (c* x y)
(let ((product (make-connector)))
(multiplier x y product)
product))
| |
dc677a3442a6a9b7030b6b0b5840d445ed5a2195a3d21e70bc3014751e702a7e | hexlet-basics/exercises-racket | test.rkt | #lang racket
(require (only-in rackunit check-equal? test-begin))
(require "index.rkt")
(test-begin
(check-equal?
(increment-numbers (list))
(list))
(check-equal?
(increment-numbers (list "a" "b" #f))
(list))
(check-equal?
(increment-numbers (list 1/2))
(list 3/2))
(check-equal?
(incre... | null | https://raw.githubusercontent.com/hexlet-basics/exercises-racket/ae3a45453584de1e5082c841178d4e43dd47e08a/modules/40-lists/30-builtin-filter/test.rkt | racket | #lang racket
(require (only-in rackunit check-equal? test-begin))
(require "index.rkt")
(test-begin
(check-equal?
(increment-numbers (list))
(list))
(check-equal?
(increment-numbers (list "a" "b" #f))
(list))
(check-equal?
(increment-numbers (list 1/2))
(list 3/2))
(check-equal?
(incre... | |
79a0b37562e4c28b13f9324f196ed7291330accf678ced54d6d1320151cd8ddc | BranchTaken/Hemlock | test_min_max.ml | open! Basis.Rudiments
open! Basis
open U256
let test () =
let rec test_pairs = function
| [] -> ()
| (x, y) :: pairs' -> begin
File.Fmt.stdout
|> Fmt.fmt "min,max "
|> fmt ~alt:true ~zpad:true ~width:64L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " "
|> fmt ~alt:true ~... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u256/test_min_max.ml | ocaml | open! Basis.Rudiments
open! Basis
open U256
let test () =
let rec test_pairs = function
| [] -> ()
| (x, y) :: pairs' -> begin
File.Fmt.stdout
|> Fmt.fmt "min,max "
|> fmt ~alt:true ~zpad:true ~width:64L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " "
|> fmt ~alt:true ~... | |
6a946acbc4580a6691bc402755dae66e8fcdade2dc5e639c50a4927c80eff8bd | maximedenes/native-coq | tokens.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/tools/coqdoc/tokens.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Type of dictionaries
Add a string... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
type ttree
val empty_ttree ... |
0010288f9eaeeede8e19513a6dd71f8b7c823e2e6abaccd89397b2bd1c55b08d | erlang/otp | diameter_callback.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2010 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/98b6ec065782ed17010fb2548764a72f540ef9ab/lib/diameter/src/base/diameter_callback.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2010 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
To order alternate callbacks , configure a # diameter_callback record
as the application callback in question .... |
2a186aff3298cdcd14767b22c23bcfdda049cb0c195e60900583b71902637408 | modular-macros/ocaml-macros | common.ml | open StdLabels
open Bigarray
type 'a typ =
| Int : int typ
| Int32 : int32 typ
| Int64 : int64 typ
| Nativeint : nativeint typ
| Float : float typ
type 'a proto =
| Ret : 'a typ -> 'a proto
| Abs : 'a typ * 'b proto -> ('a -> 'b) proto
let ( ** ) x y = Abs (x, y)
(... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/unboxed-primitive-args/common.ml | ocaml | This form is easier to process programmatically. We don't expose it as
ocamlopt takes a really really long time to compile a constant list
of these.
This is almost a memcpy except that we use get/set which should
ensure that the values in [dst] don't overflow.
Align arguments | open StdLabels
open Bigarray
type 'a typ =
| Int : int typ
| Int32 : int32 typ
| Int64 : int64 typ
| Nativeint : nativeint typ
| Float : float typ
type 'a proto =
| Ret : 'a typ -> 'a proto
| Abs : 'a typ * 'b proto -> ('a -> 'b) proto
let ( ** ) x y = Abs (x, y)
t... |
b423a5f14a7c70b255721b802948d25db2a2407f861698f674bf900f6ecd343f | haskell/fgl | Proxy.hs | |
Module : Data . Graph . Inductive . Proxy
Description : Proxy type for graph tests
Copyright : ( c )
License :
To avoid relying upon a newer version of base , this defines a
custom Proxy type and convenience functions .
Module : Data.Graph.Inductive.... | null | https://raw.githubusercontent.com/haskell/fgl/86dc04d2ae9ca73a0923bdc8d78b53bf2f2876c8/test/Data/Graph/Inductive/Proxy.hs | haskell | -----------------------------------------------------------------------------
By default, we want to avoid using 'Int' to avoid clashing with the
'Node' type. Don't want to use a floating type in case of
Not using the Data.Proxy module so this also works with older | |
Module : Data . Graph . Inductive . Proxy
Description : Proxy type for graph tests
Copyright : ( c )
License :
To avoid relying upon a newer version of base , this defines a
custom Proxy type and convenience functions .
Module : Data.Graph.Inductive.... |
bb0aba4948fef72f36b517973943078212578e3eff9ad00754dde3008a670d83 | xxyzz/SICP | Exercise_4_62.rkt | #lang racket/base
(rule (last-pair (?x) (?x)))
(rule (last-pair (?u . ?v) (?x))
(last-pair ?v (?x)))
;; -ex-4.62
(last-pair (3) ?x)
;;; Query results:
(last-pair (3) (3))
(last-pair (1 2 3) ?x)
;;; Query results:
(last-pair (1 2 3) (3))
(last-pair (2 ?x) (3))
;;; Query results:
(last-pair (2 3) (3))
(last-p... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/4_Metalinguistic_Abstraction/4.4_Logic_Programming/Exercise_4_62.rkt | racket | -ex-4.62
Query results:
Query results:
Query results:
Query results:
program can't complete
it will generate infinite frames
the other rule will delayed then infinite results will printed | #lang racket/base
(rule (last-pair (?x) (?x)))
(rule (last-pair (?u . ?v) (?x))
(last-pair ?v (?x)))
(last-pair (3) ?x)
(last-pair (3) (3))
(last-pair (1 2 3) ?x)
(last-pair (1 2 3) (3))
(last-pair (2 ?x) (3))
(last-pair (2 3) (3))
(last-pair ?x (3))
( last - pair ? 1 - v ( ? 1 - x ) ) - > ( last - pair (... |
be6cec1b142b5d1afaa5e9ac5019b57d526eb025e09301f1c1ba12a8cf6ad05f | fbsamples/ghc-hotswap | Main.hs | Copyright 2017 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the license found in the
-- LICENSE file in the root directory of this source tree.
# LANGUAGE RecordWildCards #
module Main (main) where
import Control.Concurrent
import Control.Exception
import Control.Mon... | null | https://raw.githubusercontent.com/fbsamples/ghc-hotswap/0c2859cbbc6c8708eace3087ab163db2b6648d4c/ghc-hotswap-demo/Main.hs | haskell | All rights reserved.
This source code is licensed under the license found in the
LICENSE file in the root directory of this source tree.
| Waits a bit, then does things with data from the shared object
Do something with the data
Register a shared object
While doing things in the background, read a filepath for ... | Copyright 2017 - present , Facebook , Inc.
# LANGUAGE RecordWildCards #
module Main (main) where
import Control.Concurrent
import Control.Exception
import Control.Monad
import System.Environment
import GHC.Hotswap
import Types
looper :: UpdatableSO SOHandles -> IO ()
looper so = do
Sleep for a second
threadD... |
84a9c0c9d2b6e162137d2bbff233db16352183024cb810f404ad675e1ed4588d | jfacorro/clojure-lab | templates.clj | (ns lab.ui.templates
(:require [lab.util :refer [index-of]]
[lab.ui.core :as ui]
[lab.model.document :as doc]))
(defn close-tab
"Expects the source of the event to have a :tab-id key in its :stuff."
[{:keys [app source] :as e}]
(let [ui (:ui @app)
id (:tab-id (ui/stuff source)... | null | https://raw.githubusercontent.com/jfacorro/clojure-lab/f0b5a4b78172984fc876f063f66e5e1592178da9/src/clj/lab/ui/templates.clj | clojure | (ns lab.ui.templates
(:require [lab.util :refer [index-of]]
[lab.ui.core :as ui]
[lab.model.document :as doc]))
(defn close-tab
"Expects the source of the event to have a :tab-id key in its :stuff."
[{:keys [app source] :as e}]
(let [ui (:ui @app)
id (:tab-id (ui/stuff source)... | |
53fce2e989b5eb97ac30fdf1f8ddbaa53158c4f5358664a1461216a2e983d6cf | lichenscript/lichenscript | infer.mli | open Waterlang_parsing
val infer_class : Core_type . infer : - > Ast . Type.t - > Core_type . TypeValue.t
val infer_class: Typedtree.Statement._class -> Core_type.TypeValue.t
val infer: Env.t -> Ast.Type.t -> Core_type.TypeValue.t *)
| null | https://raw.githubusercontent.com/lichenscript/lichenscript/5f9280f5927f1ed799d447940705eca11b8049dc/lib/typing/infer.mli | ocaml | open Waterlang_parsing
val infer_class : Core_type . infer : - > Ast . Type.t - > Core_type . TypeValue.t
val infer_class: Typedtree.Statement._class -> Core_type.TypeValue.t
val infer: Env.t -> Ast.Type.t -> Core_type.TypeValue.t *)
| |
bca16dbcfe4ff4fe4097c903b64f380fc9d7635f0095c5c66a731555ed869e06 | bhk/scam | dup.scm |
(define (dup a)
&public
(.. a a))
| null | https://raw.githubusercontent.com/bhk/scam/59d7c02e673f1faebd0b7625d8c595daaa5efc51/test/subdir/dup.scm | scheme |
(define (dup a)
&public
(.. a a))
| |
328b9253ea14d4499b85ff2ea2872e2e816f3c3559183981891f95e0af59ded7 | ZHaskell/z-botan | CipherSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
module Z.Crypto.CipherSpec where
import Control.Monad
import Test.Hspec
import Test.HUnit
import Z.IO
import qualified Z.IO.FileSystem as FS
import Z.Data.ASCII
import Z.Data.Vector.Hex
import qu... | null | https://raw.githubusercontent.com/ZHaskell/z-botan/5e826513c01eae54096ae5dbd9f6ee54f5518709/test/Z/Crypto/CipherSpec.hs | haskell | # LANGUAGE OverloadedStrings #
dont support iterations
dont support tweak | # LANGUAGE PatternSynonyms #
module Z.Crypto.CipherSpec where
import Control.Monad
import Test.Hspec
import Test.HUnit
import Z.IO
import qualified Z.IO.FileSystem as FS
import Z.Data.ASCII
import Z.Data.Vector.Hex
import qualified Z.Data.Parser as P
imp... |
4a48cf9167901ed0146a56f84ea267cd67524b2a465f989e0d9eaa37aac65883 | brownplt/TeJaS | dprle_charset.ml | Copyright ( c ) 2008 - 2009 , University of Virginia
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
* Redistributions of source code must retain the above copy... | null | https://raw.githubusercontent.com/brownplt/TeJaS/a8ad7e5e9ad938db205074469bbde6a688ec913e/src/patterns/dprle_charset.ml | ocaml | * Charsets are just hashsets of integers in the range
0-255
| Copyright ( c ) 2008 - 2009 , University of Virginia
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
* Redistributions of source code must retain the above copy... |
8d1ec39307b87a24289a03d68cff0c27f590e1ae7244d92e8de2053a22d7abc9 | yetibot/core | parse.clj | (ns yetibot.core.commands.parse
(:require
[yetibot.core.util.format :refer [remove-surrounding-quotes]]
[clojure.pprint :refer [pprint *print-right-margin*]]
[yetibot.core.parser :refer [parser]]
[yetibot.core.hooks :refer [cmd-hook]]))
(defn parse-cmd
"parse <text> # parse <text> into an AST using... | null | https://raw.githubusercontent.com/yetibot/core/e35cc772622e91aec3ad7f411a99fff09acbd3f9/src/yetibot/core/commands/parse.clj | clojure | (ns yetibot.core.commands.parse
(:require
[yetibot.core.util.format :refer [remove-surrounding-quotes]]
[clojure.pprint :refer [pprint *print-right-margin*]]
[yetibot.core.parser :refer [parser]]
[yetibot.core.hooks :refer [cmd-hook]]))
(defn parse-cmd
"parse <text> # parse <text> into an AST using... | |
328d3cc60a4de8ee5595278f8c43606deb0d59a8934babf8a534c0892f61960e | eugeneia/athens | namespace.lisp | (in-package :lispn)
(define-namespace namespace %namespace nil "A namespace for managing namespaces themselves.")
(defun clear-namespace (name)
"Get rid of all values bound in the given namespaces."
(assert (gethash name *namespace-table*))
(clrhash (symbol-value (%namespace-hash (gethash name *namespace-table*... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/lisp-namespace-20171130-git/src/namespace.lisp | lisp | (in-package :lispn)
(define-namespace namespace %namespace nil "A namespace for managing namespaces themselves.")
(defun clear-namespace (name)
"Get rid of all values bound in the given namespaces."
(assert (gethash name *namespace-table*))
(clrhash (symbol-value (%namespace-hash (gethash name *namespace-table*... | |
77d310ae6e1bd7f154cf1042c7653cd896fca150eb0f9e1a3548ccea031c9fcd | composewell/streamly | Reduce.hs | # OPTIONS_GHC -Wno - deprecations #
-- |
Module : Streamly . Internal . Data . Stream . IsStream . Reduce
Copyright : ( c ) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
-- Reduce streams by streams, folds or parsers.
# ... | null | https://raw.githubusercontent.com/composewell/streamly/7263d811534b62615e8d1ad8cc14cfa49abe8081/src/Streamly/Internal/Data/Stream/IsStream/Reduce.hs | haskell | |
License : BSD-3-Clause
Maintainer :
Stability : experimental
Reduce streams by streams, folds or parsers.
* Reduce By Streams
* Reduce By Folds
|
Reduce a stream by folding or parsing chunks of the stream. Functions
generally ending in these shapes:
@
@
** Generic Folding
| Apply folds on a s... | # OPTIONS_GHC -Wno - deprecations #
Module : Streamly . Internal . Data . Stream . IsStream . Reduce
Copyright : ( c ) 2017 Composewell Technologies
Portability : GHC
# DEPRECATED " Please use . Data . Stream.*\ " instead . " #
(
dropPrefix
, dropInfix
, dropSuffix
f ( Fold m a b ... |
9f6745280bfc0de329ab225b1dea7e5703d0e251a7bc7f266ef9c3617495ab75 | mathematical-systems/clml | dspmv.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/blas/dspmv.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
c249c9dc153f018279974363727276db77cdfbe557c4fb89ebaa9ed53133070a | robx/configurator-pg | Syntax.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
-- |
-- Module: Data.Configurator.Syntax
Copyright : ( c ) 2011 MailRank , Inc.
( c ) 2015 - 2016
License : BSD3
Maintainer : < >
-- Stability: experimental
-- Portability: portable
--
-- A parser for configuratio... | null | https://raw.githubusercontent.com/robx/configurator-pg/05d56d69478b040cbb2ce23ca599385ae043f183/src/Data/Configurator/Syntax.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module: Data.Configurator.Syntax
Stability: experimental
Portability: portable
A parser for configuration files.
| Skip lines, comments, or horizontal white space.
| Skip comments or horizontal white space.
| Parse a string interpolation spec.
| # LANGUAGE TypeFamilies #
Copyright : ( c ) 2011 MailRank , Inc.
( c ) 2015 - 2016
License : BSD3
Maintainer : < >
module Data.Configurator.Syntax
(
topLevel
, interp
) where
import Protolude hiding (First, try)
import Control.Monad (fail)
... |
d2769f31cd20a891b665e38b797d3f165dbdf5bb10af83704e2c1d76ae1fd1fe | ghc/testsuite | T3983_Bar.hs | {-# LANGUAGE DeriveDataTypeable #-}
module T3983_Bar where
import Data.Dynamic
import Control.Exception
import Control.Monad (unless)
type Assertion = IO ()
data X = X String deriving (Show, Typeable)
instance Exception X
throwX = throw.X
catchX action = do { action; return True; } `catches` [Handler (\(X _) -> re... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/simplCore/should_run/T3983_Bar.hs | haskell | # LANGUAGE DeriveDataTypeable # | module T3983_Bar where
import Data.Dynamic
import Control.Exception
import Control.Monad (unless)
type Assertion = IO ()
data X = X String deriving (Show, Typeable)
instance Exception X
throwX = throw.X
catchX action = do { action; return True; } `catches` [Handler (\(X _) -> return False)] |
4048967a9234817f2dc4d64e3299136eedcc796ccbbdbc05b0f66a754db76593 | unison-code/unison | RunPreProcess.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/MachineIR/Transformations/RunPreProcess.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
735ad83922ef3bf568807412546a4e0854dd6d8f1c26381353a03fa95863dfd5 | ryanpbrewster/haskell | P190Test.hs | module Problems.P190Test
( case_190_main
) where
import Problems.P190
import Test.Tasty.Discover (Assertion, (@?=))
case_190_main :: Assertion
case_190_main = solve @?= "233168"
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P190Test.hs | haskell | module Problems.P190Test
( case_190_main
) where
import Problems.P190
import Test.Tasty.Discover (Assertion, (@?=))
case_190_main :: Assertion
case_190_main = solve @?= "233168"
| |
c8c5a177b3937ff4f2b67f434944c336341949c422e81a18fae240b61b8f2ccb | brainbot-com/es-nozzle | worker.clj | (ns brainbot.nozzle.worker
(:require [clojure.tools.logging :as logging]))
(defprotocol Service
(start [this])
(stop [this]))
(defn service-as-string
[svc]
(let [m (meta svc)]
(format "service %s for section %s" (:type m) (:section-name m))))
(defn start-service
[svc]
(logging/info "starting" (serv... | null | https://raw.githubusercontent.com/brainbot-com/es-nozzle/0996b3989d4b05849644f0e4ef585af0b8f9be0c/src/brainbot/nozzle/worker.clj | clojure | (ns brainbot.nozzle.worker
(:require [clojure.tools.logging :as logging]))
(defprotocol Service
(start [this])
(stop [this]))
(defn service-as-string
[svc]
(let [m (meta svc)]
(format "service %s for section %s" (:type m) (:section-name m))))
(defn start-service
[svc]
(logging/info "starting" (serv... | |
ea829c85aa31be108cc66a8a2b2004ff284dd74468a9ef02e90ef56175ed069e | prg-titech/Kani-CUDA | toy-test.rkt | (define (array-eq-assert arr1 arr2 len)
(for ([i (in-range len)])
(assert
(eq?
(array-ref-host arr1 i)
(array-ref-host arr2 i)))))
(define (spec-opt res-f)
(define SIZE 19)
(define in0-opt (make-array (for/vector ([i SIZE]) (make-element i)) SIZE))
(define in1-opt (make-array (for/vector (... | null | https://raw.githubusercontent.com/prg-titech/Kani-CUDA/e97c4bede43a5fc4031a7d2cfc32d71b01ac26c4/Emulator/Examples/toy/toy-test.rkt | racket | (define (array-eq-assert arr1 arr2 len)
(for ([i (in-range len)])
(assert
(eq?
(array-ref-host arr1 i)
(array-ref-host arr2 i)))))
(define (spec-opt res-f)
(define SIZE 19)
(define in0-opt (make-array (for/vector ([i SIZE]) (make-element i)) SIZE))
(define in1-opt (make-array (for/vector (... | |
0a47d69d3bdc6bea245b8d399c3e5a073b6340e2cca89e558e5fc78d210ce19c | Ekatereana/CommonLispWorks | case.lisp | (defstruct case-statement
id
condition
action
)
(defun merge_list (list)
(let ((result ""))
(loop for el in list
do
(if (eq (length result) 0)
(setq result (concatenate 'string result el ))
(setq result (concatenate 'string result " " el )))
)
... | null | https://raw.githubusercontent.com/Ekatereana/CommonLispWorks/13111f7c45ec4d672dfdf3689ba22554d5c60727/case.lisp | lisp | (defstruct case-statement
id
condition
action
)
(defun merge_list (list)
(let ((result ""))
(loop for el in list
do
(if (eq (length result) 0)
(setq result (concatenate 'string result el ))
(setq result (concatenate 'string result " " el )))
)
... | |
a3c03b8f076e8a0956c00100b12f50177a5e0440ede78dd0158bdf763a056c9e | RefactoringTools/wrangler | wrangler_code_search_utils.erl | %%@hidden
%%@private
-module(wrangler_code_search_utils).
-export([var_binding_structure/1,
display_search_results/3, display_clone_result/2,
start_counter_process/0, start_counter_process/1,
stop_counter_process/1, display_a_clone/2,
add_new_export_var/2, get_new_export_vars/1,
identifier_name/1, gen_new_va... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/wrangler_code_search_utils.erl | erlang | @hidden
@private
%%
A server for bookkeeping and generating variable names %%
%%
A refactoring candidate: from non-gen_server to gen_server.
-spec start_counter... | -module(wrangler_code_search_utils).
-export([var_binding_structure/1,
display_search_results/3, display_clone_result/2,
start_counter_process/0, start_counter_process/1,
stop_counter_process/1, display_a_clone/2,
add_new_export_var/2, get_new_export_vars/1,
identifier_name/1, gen_new_var_name/1,
remove_su... |
e2eca54a8f5aff8ec34ce7cb01190cba2d8b6becb72aae25696902b0cf01e40f | returntocorp/semgrep | Matching_generic.ml |
*
* Copyright ( C ) 2019 - 2021 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICE... | null | https://raw.githubusercontent.com/returntocorp/semgrep/a891f707c33aa2ccb245b9c8640002951e033167/src/matching/Matching_generic.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
Helper types and functions for Generic_vs_generic.ml.
* See Generic_vs_generic.ml top comment for more information.
*
* todo:
* - use m_list_in_any_orde... |
*
* Copyright ( C ) 2019 - 2021 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICE... |
1eb4d3a1d95b6d2398fee86446a71202db5deb049a6d128f197cd1afbc3551d3 | google/codeworld | source.hs | import Sketches
program = drawingOf(codeWorldLogo)
| null | https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-compiler/test/testcases/unusedImport/source.hs | haskell | import Sketches
program = drawingOf(codeWorldLogo)
| |
f7d437770175f9a48db9910b6cbc4d4c8669128099a3374b5e5da96b4475a257 | bazurbat/chicken-scheme | numbers-string-conversion-tests.scm | ;;;
;;; Numerical syntax "torture test"
;;;
;;; This tries to test a lot of edge cases in Scheme's numerical syntax.
;;;
;;; Output is written so that if you run it through "grep ERROR" it will
;;; output nothing (and exit status will be nonzero) if there are no errors.
;;; If you run it through "tail -n 1" you will ju... | null | https://raw.githubusercontent.com/bazurbat/chicken-scheme/f0c9d1fd8b68eb322e320e65ec40b0bf7d1b41dc/tests/numbers-string-conversion-tests.scm | scheme |
Numerical syntax "torture test"
This tries to test a lot of edge cases in Scheme's numerical syntax.
Output is written so that if you run it through "grep ERROR" it will
output nothing (and exit status will be nonzero) if there are no errors.
If you run it through "tail -n 1" you will just get the total error s... | This code assumes that string->number accepts numbers with embedded radix
specifiers ( R5RS mentions that it 's allowed to return # f in those cases ) .
It also does n't try to support Schemes which support * only * integers or
* only * flonums ( which is also allowed by R5RS ) .
(use srfi-1 ports)
(define th... |
b29ad6892caf9d2050fa97e328bd02c13c5451d56993bab8b6cd578b9b2aa96e | jeromesimeon/Galax | optimization_walker.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/optimization/optimization_walker.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : optimization_walker.ml , v 1.4 2007/03/09 19:26:33 mff Exp $
open Error
open Namespace_builtin
open Xquery_algebra_ast
open Xquery_algebra_ast_util
open Xquery_algebra_ast_annotation_util
open Compile_context
open Compile_annotate
... |
ee2093097847952ece0129c993fbcbc9b460c666a7053b28e1a400020946290d | acieroid/scala-am | pps.scm | Parallel prefix sum with thrds
(define (build-vector n init f)
(letrec ((v (make-vector n init))
(loop (lambda (i)
(if (< i n)
(begin
(vector-set! v i (f i))
(loop (+ i 1)))
v))))
(lo... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/futures/pps.scm | scheme | Parallel prefix sum with thrds
(define (build-vector n init f)
(letrec ((v (make-vector n init))
(loop (lambda (i)
(if (< i n)
(begin
(vector-set! v i (f i))
(loop (+ i 1)))
v))))
(lo... | |
763915fbbcbd94c68dbe4d0589be4d497537dc6926325c0dc66b9a04825350e7 | HunterYIboHu/htdp2-solution | ex111-key-FSM.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 ex111-key-FSM) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univ... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section6/ex111-key-FSM.rkt | racket | about the language level of this file in a form that our tools can easily process.
graphic constants
String -> Image
render the scene Image by the color given by String
examples:
ExpectsToSee is one of:
- AA
- BC
- DD
- ER
e is short for ExpectToSee
- INITIAL
- INPUT
- FINISED
- ERROR
ct is short for te... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex111-key-FSM) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-decimal #f #t non... |
2ababce5c74bfa259f08ce4116e2ab831c82e5e09041928ea63ead967d537422 | alexbs01/OCaml | prime.mli | val is_prime : int -> bool
val next_prime : int -> int
val last_prime_to : int -> int
val is_prime2 : int -> bool
| null | https://raw.githubusercontent.com/alexbs01/OCaml/92a28522a8467d8ed87ef380b6175f1c21616f85/p03/prime.mli | ocaml | val is_prime : int -> bool
val next_prime : int -> int
val last_prime_to : int -> int
val is_prime2 : int -> bool
| |
d555fbb8cd33585ef5cf2bcfb4207305ea83891a2970cc7f8b74f1b183750e5a | Opetushallitus/aipal | source_test.clj | ;;
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
of the EUPL ( the " Licence " ) ;
;;
;; You may not use this work except in compliance with the Licence.
;; You may obtain a copy of the Licence at: /
;... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/test/clj/oph/source_test.clj | clojure |
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence at: /
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
European Union Public Licence for more details .
(ns oph.source-test
"Tarkistuksia lähdekoodille."
(:import java.io.PushbackReader)
(:require [cloju... |
c922ada949709ce3e8c324036b82f8d3f1e0e3418f5ec2e2cf28b773f5c1ec3f | ertugrulcetin/procedure.async | middleware.clj | (ns favorite-songs.middleware
(:require
[favorite-songs.env :refer [defaults]]
[clojure.tools.logging :as log]
[favorite-songs.layout :refer [error-page]]
[ring.middleware.anti-forgery :refer [wrap-anti-forgery]]
[favorite-songs.middleware.formats :as formats]
[muuntaja.middleware :refer [wrap... | null | https://raw.githubusercontent.com/ertugrulcetin/procedure.async/2f9af363904c297ef8332e4710db899c5c94e7cd/examples/favorite-songs/src/clj/favorite_songs/middleware.clj | clojure | since they're not compatible with this middleware | (ns favorite-songs.middleware
(:require
[favorite-songs.env :refer [defaults]]
[clojure.tools.logging :as log]
[favorite-songs.layout :refer [error-page]]
[ring.middleware.anti-forgery :refer [wrap-anti-forgery]]
[favorite-songs.middleware.formats :as formats]
[muuntaja.middleware :refer [wrap... |
f515208ecc2fb186feaae007123f2c5adfa5a72e911d7500d94a1ed023dc1701 | marigold-dev/mankavar | das_tendermint_srce_bench.ml | open Das_helpers
module CD = Das_tendermint
module CD_raw = Das_tendermint_sc_raw
module Transition = Das_tendermint_sc_raw.Transition
module Operation = Transition.Operation
let put_node_state (node_state : CD_raw.Transition.State.t) =
(Obj.magic node_state : CD.Transition.State.t)
let get_node_state (node_state :... | null | https://raw.githubusercontent.com/marigold-dev/mankavar/110d1659feec9ebd99cf2f76d7699f48483010ca/src/consensus/tx-scre/bench/das_tendermint_srce_bench.ml | ocaml | open Das_helpers
module CD = Das_tendermint
module CD_raw = Das_tendermint_sc_raw
module Transition = Das_tendermint_sc_raw.Transition
module Operation = Transition.Operation
let put_node_state (node_state : CD_raw.Transition.State.t) =
(Obj.magic node_state : CD.Transition.State.t)
let get_node_state (node_state :... | |
3c8941c3438aeb4a2f083f87a18a0674f3163d622e2c6c018541c456d515b7ff | kanaka/instacheck | parse.cljc | (ns instacheck.parse
(:require [clojure.string :as string]
[instaparse.core :as instaparse]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Better instaparse errors
(defn- elide-line
[text cursor max-length cont-text]
(let [span (/ max-length 2)
start (max... | null | https://raw.githubusercontent.com/kanaka/instacheck/ba2095f9b9691812342c54100cd7de83a5b9a74d/src/instacheck/parse.cljc | clojure |
Better instaparse errors
(throw (Exception. (concise-fail-str res text))) | (ns instacheck.parse
(:require [clojure.string :as string]
[instaparse.core :as instaparse]))
(defn- elide-line
[text cursor max-length cont-text]
(let [span (/ max-length 2)
start (max 0 (- cursor span))
end (min (count text) (+ cursor span))]
(str
(when (> cu... |
5b5d0b4ce5d26c123f06766cdc513ed71aa885acc3de754e9a89384660ba4b01 | ngrunwald/stanford-nlp-tools | project.clj | (defproject stanford-nlp-tools "0.1.0-SNAPSHOT"
:description "Clojure wrapper around the Stanford NLP tools"
:dependencies [[org.clojure/clojure "1.4.0"]
[edu.stanford.nlp/stanford-corenlp "1.3.3"]]) | null | https://raw.githubusercontent.com/ngrunwald/stanford-nlp-tools/a209d4aaa2dd3e74caedf07720d53c8c28fb7d20/project.clj | clojure | (defproject stanford-nlp-tools "0.1.0-SNAPSHOT"
:description "Clojure wrapper around the Stanford NLP tools"
:dependencies [[org.clojure/clojure "1.4.0"]
[edu.stanford.nlp/stanford-corenlp "1.3.3"]]) | |
74de729a7d8c165b97c302d9f6c465e6df59b382b457ec58c3ffd3d8aab54258 | project-oak/hafnium-verification | inferconfig.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/backend/inferconfig.ml | ocaml | * Check if a proc name is matching the name given as string.
Module to create matcher based on strings present in the source file
Module to create matcher based on source file names or class names and method names
Module to create patterns that will match all overriding methods in the pattern
Translate a JSON e... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
bf79479ecd0223d0762edf19ac07a66cbf3a51c3e8ec2a8db4d0f266c7204636 | spl/xformat | Main.hs |
--------------------------------------------------------------------------------
-- |
-- Module : Main
Copyright : ( c ) 2009 - 2012
-- License : BSD3
--
-- Maintainer :
--
-- Tests for Text.XFormat.*.
--------------------------------------------------------------------------------
module Main ... | null | https://raw.githubusercontent.com/spl/xformat/582504fcf06ee601d59603dda8f5b593df359612/test/Main.hs | haskell | ------------------------------------------------------------------------------
|
Module : Main
License : BSD3
Maintainer :
Tests for Text.XFormat.*.
------------------------------------------------------------------------------ |
Copyright : ( c ) 2009 - 2012
module Main where
import System.Exit (exitFailure, exitSuccess)
import qualified Read (test)
import qualified Show (test)
test :: Bool
test = and
[ Read.test
, Show.test
]
main :: IO ()
main = if test then exitSuccess else exitFailure
|
34eb3e07b5c5c119513111ef001eab927cc1d3bfb27bfdb86c6dfcc6a0942fbc | mcorbin/meuse | statistics_test.clj | (ns meuse.api.meuse.statistics-test
(:require [meuse.api.meuse.http :refer :all]
[meuse.helpers.fixtures :refer :all]
[meuse.helpers.request :refer [add-auth]]
[clojure.test :refer :all])
(:import clojure.lang.ExceptionInfo))
(use-fixtures :once system-fixture)
(use-fixtures :ea... | null | https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/test/meuse/api/meuse/statistics_test.clj | clojure | (ns meuse.api.meuse.statistics-test
(:require [meuse.api.meuse.http :refer :all]
[meuse.helpers.fixtures :refer :all]
[meuse.helpers.request :refer [add-auth]]
[clojure.test :refer :all])
(:import clojure.lang.ExceptionInfo))
(use-fixtures :once system-fixture)
(use-fixtures :ea... | |
d0b92435fe393d074f48cc942f3ca66449911229b488312acfd34c1bb8f3fb3d | ProjectMAC/propagators | metadata.scm | ;;; ----------------------------------------------------------------------
Copyright 2010 .
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you can
;;; redistribute it and/or modif... | null | https://raw.githubusercontent.com/ProjectMAC/propagators/add671f009e62441e77735a88980b6b21fad7a79/core/metadata.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2010 .
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should have received a copy of the GNU Gene... |
6113cdb0794c859550f55181cbd019136e9af3e2d7ca0c570263b02dcca4a135 | rcherrueau/rastache | simple.rkt | #lang racket/base
(require rastache)
(define template
#<<HERESTRING
Hello {{name}}
You have just won ${{value}}!
{{#in_ca}}
Well, ${{ taxed_value }}, after taxes.
{{/in_ca}}
Love, {{owner}}
HERESTRING
)
(rast-compile/render (open-input-string template)
`#hash{(name . "Chris")
... | null | https://raw.githubusercontent.com/rcherrueau/rastache/059d00c83416f8ba27cc38fa7f8321b075756d14/examples/simple.rkt | racket | #lang racket/base
(require rastache)
(define template
#<<HERESTRING
Hello {{name}}
You have just won ${{value}}!
{{#in_ca}}
Well, ${{ taxed_value }}, after taxes.
{{/in_ca}}
Love, {{owner}}
HERESTRING
)
(rast-compile/render (open-input-string template)
`#hash{(name . "Chris")
... | |
6de06a3aedac564fdf79fd7c13da892f7b7d48428347c9790409f17042a68470 | as-capabl/armageddon | McWebkit.hs | {-# LANGUAGE Arrows #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE ViewPatterns #
# LANGUAGE PatternSynonyms #
module
Graphics.UI.McWebkit
(
-- *... | null | https://raw.githubusercontent.com/as-capabl/armageddon/f9724b7a545f7e66931d2a46732402a67a59a03e/machinecell-webkit/src/Graphics/UI/McWebkit.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE RankNTypes #
* Event handling
Match test for selector
execute | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE ViewPatterns #
# LANGUAGE PatternSynonyms #
module
Graphics.UI.McWebkit
(
on,
onSelector
)
where
import Prelude hid... |
81983647024ac2e7af60b256225cdc889bfbd869b79b9041dec8018e8839e462 | craigl64/clim-ccl | recompile.lisp | ;; See the file LICENSE for the full license governing this code.
;;
;; this file is way out of date -- it needs to be recoded using
compile.lisp as a model . -tjm 23May97
(in-package "USER")
LOAD the file PATH.LSP first !
;;; to build a version that doesn't require fixnum coordinates,
;;; turn off the featur... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/sys/recompile.lisp | lisp | See the file LICENSE for the full license governing this code.
this file is way out of date -- it needs to be recoded using
to build a version that doesn't require fixnum coordinates,
turn off the feature: USE-FIXNUM-COORDINATES in the
sys\sysdcl.lisp file.
+++
+++
(compile-file (climpath "sys\\defsystem.lisp"))... |
compile.lisp as a model . -tjm 23May97
(in-package "USER")
LOAD the file PATH.LSP first !
(setq *climpath* "i:/customer/franz/clim22f/clim2/")
(defun climpath (sub) (merge-pathnames sub *climpath*))
#+aclpc
(load (climpath "sys\\defsyste.fsl"))
#+acl86win32
(load (climpath "sys\\defsystem.fasl"))
(load (cl... |
06ae7de3503b00ae641aad3b66380583b5c47dfa48f91508de36dd28869348fa | garycrawford/lein-life | zygote.clj | (ns {{ns-name}}.zygote
(:require [com.stuartsierra.component :as component]
[{{ns-name}}.components.system :as system])
(:gen-class))
(def {{ns-name}}-system (system/new-{{ns-name}}-system))
(defn -main
"The entry point for the application."
[& args]
(alter-var-root #'{{ns-name}}-system componen... | null | https://raw.githubusercontent.com/garycrawford/lein-life/d55f3636950b58b02399ab32eb1f6d81ecfce823/src/leiningen/new/life/common/src/zygote.clj | clojure | (ns {{ns-name}}.zygote
(:require [com.stuartsierra.component :as component]
[{{ns-name}}.components.system :as system])
(:gen-class))
(def {{ns-name}}-system (system/new-{{ns-name}}-system))
(defn -main
"The entry point for the application."
[& args]
(alter-var-root #'{{ns-name}}-system componen... | |
1069647914966d50272e4472f17b1a5bece58a74e639c5c5386d7c2bdc68397b | Hendekagon/iiiiioiooooo | attrs.cljs | (ns dommy.attrs
(:use-macros
[dommy.macros :only [node]])
(:require
[clojure.string :as str]))
(defn- ^boolean class-match?
"does class-name string have class starting at index idx.
only will be used when Element::classList doesn't exist"
[class-name class idx]
(and
;; start
(or (zero? idx) (i... | null | https://raw.githubusercontent.com/Hendekagon/iiiiioiooooo/f7c2ab0468798b2065bdff9c564ca10a966cfa79/public/js/dommy/attrs.cljs | clojure | start
stop | (ns dommy.attrs
(:use-macros
[dommy.macros :only [node]])
(:require
[clojure.string :as str]))
(defn- ^boolean class-match?
"does class-name string have class starting at index idx.
only will be used when Element::classList doesn't exist"
[class-name class idx]
(and
(or (zero? idx) (identical? \s... |
b450209f87a691670d080d12216a42ef5bab3d2f283216f20e8f3b9c7b84cf9f | joinr/spork | diff.clj | ;;a namespace for containing differential
;;operations on entity stores. Currently
;;these are fine-grained differences,
;;and only hold for persistent-backed
( i.e. mutable stores do n't
;;may not have a meaningful diff in the current
;;implementation).
(ns spork.entitysystem.diff
(:require [spork.entitysystem [st... | null | https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/entitysystem/diff.clj | clojure | a namespace for containing differential
operations on entity stores. Currently
these are fine-grained differences,
and only hold for persistent-backed
may not have a meaningful diff in the current
implementation).
by component, find changes. These are basically instructions.
component add -> entity-add..
{:assoc-enti... | ( i.e. mutable stores do n't
(ns spork.entitysystem.diff
(:require [spork.entitysystem [store :as store]]
[spork.util.diff :refer [diff-map]]
[clojure.set]))
(defn entity-diff [lstore rstore]
(let [{:keys [dropped changed added]} (diff-map (:domain-map lstore) (:domain-map rstore))]
... |
1be7035a899cfe6fd1248e48ab27f07f713d502c2709e1d8b2fecd1faea30993 | static-analysis-engineering/codehawk | jCHMethodCostBoundsAbstractor.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchcost/jCHMethodCostBoundsAbstractor.mli | ocaml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... | |
5e4fabd8a8fe9f698219073bbe05922bcae506df62fa709b9635407a3d4ac893 | bsaleil/lc | conform.scm.scm | ;;------------------------------------------------------------------------------
Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->vector lst))
(def-macro (FLOATvector? x) `(vector? ,x))
(def-macro (FLOATvector . lst... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LC5/conform.scm.scm | scheme | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Gabriel benchmarks
C benchmarks
Other benchmarks
Functional and unstable
SET O... | Macros
(##define-macro (def-macro form . body)
`(##define-macro ,form (let () ,@body)))
(def-macro (FLOATvector-const . lst) `',(list->vector lst))
(def-macro (FLOATvector? x) `(vector? ,x))
(def-macro (FLOATvector . lst) `(vector ,@lst))
(def-macro (FLOATmake-vector n . init) `(make-vector ,... |
c38e032189b2237f881a94006f5bef983166fdeef8d5d234be4f305b4acee6fa | CSCfi/rems | focus.cljs | (ns rems.focus
"Focuses an HTML element as soon as it exists."
(:require [rems.util :refer [visibility-ratio]]))
(defn focus [element]
(.setAttribute element "tabindex" "-1")
(.focus element))
(defn focus-selector [selector]
(focus (.querySelector js/document selector)))
(defn focus-without-scroll [element... | null | https://raw.githubusercontent.com/CSCfi/rems/644ef6df4518b8e382cdfeadd7719e29508a26f0/src/cljs/rems/focus.cljs | clojure | Focusing the element scrolls it into the viewport, but
it can still be hidden behind the navigation menu. | (ns rems.focus
"Focuses an HTML element as soon as it exists."
(:require [rems.util :refer [visibility-ratio]]))
(defn focus [element]
(.setAttribute element "tabindex" "-1")
(.focus element))
(defn focus-selector [selector]
(focus (.querySelector js/document selector)))
(defn focus-without-scroll [element... |
5907065f10d9af616c28f1dda8bcf97c9e859228cf9cabc0b75a336a136739dc | FranklinChen/hugs98-plus-Sep2006 | HGL.hs | -----------------------------------------------------------------------------
-- |
-- Module : Graphics.HGL
Copyright : ( c ) , 1999 - 2003
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable (requires concu... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HGL/Graphics/HGL.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.HGL
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : non-portable (requires concurrency)
A simple graphics library.
-------------------... | Copyright : ( c ) , 1999 - 2003
module Graphics.HGL
(
module Graphics.HGL.Units
, module Graphics.HGL.Run
, module Graphics.HGL.Window
, module Graphics.HGL.Draw
, module Graphics.HGL.Key
, module Graphics.HGL.Utils
) where
import Graphics.HGL.Units
import Graphics.HGL.Run
impo... |
9285d67941fa0447684a4654e2958ecb836edd0daa570dd4e9ab86443973b412 | restyled-io/restyler | ReviewRequests.hs | -- |
--
-- <>
--
module GitHub.Endpoints.PullRequests.ReviewRequests
( RequestReview(..)
, requestOneReviewer
, ReviewRequest(..)
, createReviewRequest
, createReviewRequestR
) where
import Prelude
import Data.Aeson
import GitHub.Data
import GitHub.Request
data RequestReview = RequestReview
... | null | https://raw.githubusercontent.com/restyled-io/restyler/3da7d1cb62ec078c03794d4a2c5fbeb5c26fd005/src/GitHub/Endpoints/PullRequests/ReviewRequests.hs | haskell | |
<>
| module GitHub.Endpoints.PullRequests.ReviewRequests
( RequestReview(..)
, requestOneReviewer
, ReviewRequest(..)
, createReviewRequest
, createReviewRequestR
) where
import Prelude
import Data.Aeson
import GitHub.Data
import GitHub.Request
data RequestReview = RequestReview
{ requestRevie... |
25cc3f9f7ee612ce3102ef6c6cd9b40ba107f78fd2ab995ba51956736f129fcc | unclebob/AdventOfCode2020 | project.clj | (defproject day6 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main day6.core
:dependencies [[org.clojure/clojure "1.8.0"]]
:profiles {:dev {:dependencies [[speclj "3.3.2"]]}}
:plugins [[speclj "3.3.2"]]
:test-pat... | null | https://raw.githubusercontent.com/unclebob/AdventOfCode2020/fc4ba9ad042cbcc48dfa5947373ab46b750d89e5/day6/project.clj | clojure | (defproject day6 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main day6.core
:dependencies [[org.clojure/clojure "1.8.0"]]
:profiles {:dev {:dependencies [[speclj "3.3.2"]]}}
:plugins [[speclj "3.3.2"]]
:test-pat... | |
08229b6307d9116df06a845ae41bd533c6a631c5e5654f17937319266684b19e | antono/guix-debian | union.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 < >
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 ... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/guix/build/union.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 < >
Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix build union)
#:use-module (ice-9 match)
#:use-mo... |
951a713e0662f7a135fde3eb6788976592f3ae34c6c61e49470b17448d0bfaf9 | unisonweb/unison | TermEdit.hs | module U.Codebase.TermEdit where
import U.Codebase.Referent (Referent)
data TermEdit = Replace Referent Typing | Deprecate
deriving (Eq, Ord, Show)
-- Replacements with the Same type can be automatically propagated.
Replacements with a Subtype can be automatically propagated but may result in dependents getting ... | null | https://raw.githubusercontent.com/unisonweb/unison/8fefafbf936e45e04f59cd206c5c93b9de7ae33b/codebase2/codebase/U/Codebase/TermEdit.hs | haskell | Replacements with the Same type can be automatically propagated.
Replacements of a Different type need to be manually propagated by the programmer. | module U.Codebase.TermEdit where
import U.Codebase.Referent (Referent)
data TermEdit = Replace Referent Typing | Deprecate
deriving (Eq, Ord, Show)
Replacements with a Subtype can be automatically propagated but may result in dependents getting more general types , so requires re - inference .
data Typing = Same... |
cdad729669ce91557d1238c752b299e19d64d46b9670bea01acfa09c7aa40f47 | intermine/bluegenes-old | subs.cljs | (ns bluegenes.subs
(:require-macros [reagent.ratom :refer [reaction]])
(:require [re-frame.core :as re-frame]
[bluegenes.timeline.subs]
[bluegenes.components.listentry.subs]
))
(re-frame/register-sub
:search-term
(fn [db]
(reaction (:search-term @db))))
(re-fr... | null | https://raw.githubusercontent.com/intermine/bluegenes-old/5b719c7ac83a7340e0ff65790cf42413c15fb7e9/src/cljs/bluegenes/subs.cljs | clojure | (ns bluegenes.subs
(:require-macros [reagent.ratom :refer [reaction]])
(:require [re-frame.core :as re-frame]
[bluegenes.timeline.subs]
[bluegenes.components.listentry.subs]
))
(re-frame/register-sub
:search-term
(fn [db]
(reaction (:search-term @db))))
(re-fr... | |
2a300c002728af63f68440e5ce30102a39db01355444f180f6e354b938b397e6 | dlowe-net/orcabot | lastseen.lisp | Copyright 2012 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 applicable law or agreed to in writing, softwa... | null | https://raw.githubusercontent.com/dlowe-net/orcabot/bf3c799337531e6b16086e8105906cc9f8808313/src/lastseen.lisp | lisp |
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 per... | Copyright 2012 All Rights Reserved .
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package #:orcabot)
(defmodule lastseen lastseen-module ("seen")
(last-action :accessor last-action-of :initform (make-hash-table :test 'equalp)))
(defmethod initialize-module ((module lastseen-module... |
0d8e7d32c5c503a853d0b8e77813948952f5a3694027c9ce89a9ad7472d12a13 | belambert/cl-asr | main.lisp | Copyright 2010 - 2018
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 under the L... | null | https://raw.githubusercontent.com/belambert/cl-asr/a734ddb396f18bf4a504e9ecb3c91e507764358c/src/signal-processing/main.lisp | lisp |
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 permis... | Copyright 2010 - 2018
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package :cl-asr)
(defun convert-folder-to-mfcc-simple (foldername &key (filter-bank-size 40) (start-freq 100) (end-freq 4000) (cepstrum-count 13) (preemphasize 0.95)
(cepstra-mean-normalization t) (fram... |
e1551ded008cea830ed01047f06fbfa648db4f8682e78f914e7d422525994093 | astrada/google-drive-ocamlfuse | LoopbackServer.mli | val start : int -> unit
| null | https://raw.githubusercontent.com/astrada/google-drive-ocamlfuse/9027602dbbaf7473cfacc8bd44865d2bef7c41c7/src/LoopbackServer.mli | ocaml | val start : int -> unit
| |
933954019efa6a7335a0d72dcaba41060c64492cd4f28f845e00c1223e8e1ee0 | AshleyYakeley/Truth | Error.hs | module Pinafore.Language.Error where
import Data.Shim
import Language.Expression.Common
import Pinafore.Language.Name
import Shapes
import Shapes.Numeric
import Text.Parsec.Error
import Text.Parsec.Pos
data ErrorType
= KnownIssueError Int
Text
| UnicodeDecodeError Text
| ParserError ... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/81bd7564de6a3f647c631a248802028bd472a28c/Pinafore/pinafore-language/lib/Pinafore/Language/Error.hs | haskell | module Pinafore.Language.Error where
import Data.Shim
import Language.Expression.Common
import Pinafore.Language.Name
import Shapes
import Shapes.Numeric
import Text.Parsec.Error
import Text.Parsec.Pos
data ErrorType
= KnownIssueError Int
Text
| UnicodeDecodeError Text
| ParserError ... | |
a4be94aa1128fcdef95b4138477b0d742672aa05715387aa1a4018f84addb480 | acl2/acl2 | lookup-eq@useless-runes.lsp | (LOOKUP-EQ-BECOMES-LOOKUP-EQUAL)
| null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/alists-light/.sys/lookup-eq%40useless-runes.lsp | lisp | (LOOKUP-EQ-BECOMES-LOOKUP-EQUAL)
| |
9141c6d1397dd8d1121596c43b79d5fea36f13f606af0285068a6cca0e1c34ea | spurious/chibi-scheme-mirror | commands.scm | ;; commands.scm -- snow commands
;;
This code was written by in 2014 and placed in the
;; Public Domain. All warranties are disclaimed.
(define (find-in-path file . o)
(any (lambda (dir)
(let ((path (make-path dir file)))
(and (file-exists? path) path)))
(if (pair? o)
(car ... | null | https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/lib/chibi/snow/commands.scm | scheme | commands.scm -- snow commands
Public Domain. All warranties are disclaimed.
Hack to evaluate an expression in a separate process with a larger
default heap. The expression and result must be serializable with
write, and imports should be an argument list for environment.
Currently only used when generating key... | This code was written by in 2014 and placed in the
(define (find-in-path file . o)
(any (lambda (dir)
(let ((path (make-path dir file)))
(and (file-exists? path) path)))
(if (pair? o)
(car o)
(string-split (get-environment-variable "PATH") #\:))))
(define (find-s... |
425cda8d7309479336c478df3f87dd2cd3f0027f5b995aa596b7918790bc48a0 | Bogdanp/Noise | fib.rkt | #lang racket/base
(provide fib)
(define (fib n)
(if (< n 2)
n
(+ (fib (- n 2))
(fib (- n 1)))))
| null | https://raw.githubusercontent.com/Bogdanp/Noise/4d01b048dc724b3d132b3c8f921ea4a49b3bea83/Tests/NoiseTest/Modules/fib.rkt | racket | #lang racket/base
(provide fib)
(define (fib n)
(if (< n 2)
n
(+ (fib (- n 2))
(fib (- n 1)))))
| |
74265ae9366bf56ed24a08915e36c31195bb3c2d54c41b5d532383bcb26c556d | serokell/ariadne | Face.hs | module Ariadne.UI.Qt.Face
( UiCommandId (..)
, UiCommandEvent (..)
, UiWalletEvent (..)
, UiBackendStatusUpdate (..)
, UiBackendExceptionEvent (..)
, UiBackendEvent (..)
, UiEvent (..)
, UiCommand (..)
, UiCommandResult (..)
, UiSendOutput (..)
... | null | https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ui/qt-lib/src/Ariadne/UI/Qt/Face.hs | haskell | The mapping from actual command identifiers to these integers must be
injective.
This field is the visual representation of a command identifier. The
mapping from actual command identifiers to text need not be injective,
but it would be very unfair to the user, as different command identifiers
would appear the sa... | module Ariadne.UI.Qt.Face
( UiCommandId (..)
, UiCommandEvent (..)
, UiWalletEvent (..)
, UiBackendStatusUpdate (..)
, UiBackendExceptionEvent (..)
, UiBackendEvent (..)
, UiEvent (..)
, UiCommand (..)
, UiCommandResult (..)
, UiSendOutput (..)
... |
685d4026a57b6480d82c8e6b6600b4243b700e0275370ea7c72cac0a44763fa0 | polytypic/poc.cml | util.cljc | Copyright ( C ) by
(ns poc.cml.util
(:require
[#?(:clj clojure.core.async :cljs cljs.core.async) :as async]
[poc.cml :refer [choose wrap]]))
(def chan async/chan)
(def put! async/put!)
(defn on
([xE y]
(wrap xE (fn [_] y))))
(defn transfer
([xE xC]
(wrap xE
(fn [x] (async/put! xC... | null | https://raw.githubusercontent.com/polytypic/poc.cml/a2efded21f33c859437f119de616f53fd95c7469/src/poc/cml/util.cljc | clojure | Copyright ( C ) by
(ns poc.cml.util
(:require
[#?(:clj clojure.core.async :cljs cljs.core.async) :as async]
[poc.cml :refer [choose wrap]]))
(def chan async/chan)
(def put! async/put!)
(defn on
([xE y]
(wrap xE (fn [_] y))))
(defn transfer
([xE xC]
(wrap xE
(fn [x] (async/put! xC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.