_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 |
|---|---|---|---|---|---|---|---|---|
3fe813608eaab511c28daece7bc528d5b5b6262e3f336992513f496d1ddee231 | 2bt/minimal | SynthOps.hs | module SynthOps where
import Control.Monad.State.Lazy
import Data.IORef
import Data.Array
import GolfScript.Value
import GolfScript.Interpreter
import Synth
-- |SIOS: Synthesizer Input/Output System
boot :: SynthRef -> GolfValue
boot s = GolfBuiltin $
do let synthCall :: String -> (Synthesizer -> Interprete... | null | https://raw.githubusercontent.com/2bt/minimal/f0540947d1c6dde82afd1323ef2df04e78f81425/src-hs/SynthOps.hs | haskell | |SIOS: Synthesizer Input/Output System | module SynthOps where
import Control.Monad.State.Lazy
import Data.IORef
import Data.Array
import GolfScript.Value
import GolfScript.Interpreter
import Synth
boot :: SynthRef -> GolfValue
boot s = GolfBuiltin $
do let synthCall :: String -> (Synthesizer -> Interpreter Synthesizer) -> Interpreter ()
... |
b243a7e2facf41964787206cda07543b758fc37dff98961e355571482ee0d0af | manuel-serrano/bigloo | roots.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Cc / roots.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/comptime/Cc/roots.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / bigloo / comptime / Cc / roots.scm * /
* Author : * /
* Creation : Sat May 28 09:37:13 2016 * /
* Last change : We d Jun 1 11:51:37 2016 ( serrano ) * /
* Co... |
d45065af108ce0f36c1a545bdd09636a35096988caae03f82a77e9981b525739 | arclanguage/Clamp | setforms.lisp | (in-package :clamp)
(use-syntax :clamp)
(def setforms (exp &optional env)
"Given an expression for a place, returns three values. The first
one is a list of variables and values that should be bound with
'withs' to create an environment for the other expressions to be
evaluated in. The second value is an e... | null | https://raw.githubusercontent.com/arclanguage/Clamp/9f165b057a109564cd0e836cf611d1e81e43cb12/src/setforms.lisp | lisp | (in-package :clamp)
(use-syntax :clamp)
(def setforms (exp &optional env)
"Given an expression for a place, returns three values. The first
one is a list of variables and values that should be bound with
'withs' to create an environment for the other expressions to be
evaluated in. The second value is an e... | |
6eca25bb68edb9b946e5da6ecaf71fe171777f78ad80324c126e0ec3770cb523 | ocsigen/ojwidgets | ojw_button.ml |
include
Ojw_button_f.Make
(Ojw_dom.T)
(Ojw_alert)
| null | https://raw.githubusercontent.com/ocsigen/ojwidgets/4be2233980bdd1cae187c749bd27ddbfff389880/src/experimental/ojw_button.ml | ocaml |
include
Ojw_button_f.Make
(Ojw_dom.T)
(Ojw_alert)
| |
de5d7eb1d9fe2fa1d3b208f13f85e337f45da0498c51bae4ae2d3ff50e854ad0 | onedata/op-worker | session_handles.erl | %%%-------------------------------------------------------------------
@author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Module for storing of file handles... | null | https://raw.githubusercontent.com/onedata/op-worker/7808b46eb128d30d020c5984d1a1a6fe235ddb45/src/modules/session/session_handles.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Module for storing of file handles in session.
@end
-------------------------------------------------------------------
API
For RPC
====================================... | @author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(session_handles).
-author("Michal Wrzeszcz").
-include("modules/datastore/datastore_models.hrl").
-include_lib("cluster_worker/include/modules/datastore/datastore_links.hrl").
-export([add... |
d7c7dfb2f4c9d127e39c198097ce5ca75ad8d32c2937dbf6d36c3d303b2a3138 | ivan4th/xml-match | package.lisp | ;;; -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
Copyright ( c ) 2010 . 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 ret... | null | https://raw.githubusercontent.com/ivan4th/xml-match/3f1dec5449e85fc3e37ff2f4c165e2c123313f2c/package.lisp | lisp | -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the ... |
Copyright ( c ) 2010 . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(defpackage :xml-match
(:use :cl :alexandria :iterate)
(:export #:xml-pattern-debug
#:make-keyword-converter
... |
7290371014c7e00ae148a7d61c9256325a24bb15ec88a14c53cda7d0857f196d | haskell/vector | head.hs | import qualified Data.Vector as U
import Data.Bits
main = print . U.head . U.map (`shiftL` 1) . U.replicate 1000000000 $ (7 :: Int)
| null | https://raw.githubusercontent.com/haskell/vector/4c87e88f07aad166c6ae2ccb94fa539fbdd99a91/old-testsuite/microsuite/head.hs | haskell | import qualified Data.Vector as U
import Data.Bits
main = print . U.head . U.map (`shiftL` 1) . U.replicate 1000000000 $ (7 :: Int)
| |
dbaf47f7b68fc4d9cf688fd200c7577d069111deec56ea452bf6c2d79ff6692e | Clozure/ccl-tests | ba-test-package.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat May 28 06:38:29 2005
;;;; Contains: Definition of BA-TEST package.
(in-package :cl-user)
(let* ((name :ba-test)
(pkg (find-package name)))
(unless pkg (setq pkg (make-package name :use '(:cl :regression-test
:cl-test))))
(let ((*package*... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/beyond-ansi/ba-test-package.lsp | lisp | -*- Mode: Lisp -*-
Contains: Definition of BA-TEST package. | Author :
Created : Sat May 28 06:38:29 2005
(in-package :cl-user)
(let* ((name :ba-test)
(pkg (find-package name)))
(unless pkg (setq pkg (make-package name :use '(:cl :regression-test
:cl-test))))
(let ((*package* pkg))
(shadow '(#:handler-case #:handler-bind))
(import '(com... |
4ea8bf70afd391c6e70f6c9b3b4c5ee7eaa36cb74c56444fb817714b056e93df | rlepigre/ocaml-earley | pprintast.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rlepigre/ocaml-earley/66d7acb2b22edae0c2f7d64ef2a50fa70d1ed112/ocaml_ast/src/pprintast.mli | ocaml | ************************************************************************
OCaml
... | ( University of Pennsylvania )
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Pretty - printers for { ! b Warning :} this module is unstable and part of
{ { ! Compiler_libs... |
c2af532743fb0c7e3db806cd6b36707b41b291a47a79b6326acabb3e0ca87270 | VincentToups/racket-lib | symbol-set.rkt | #lang racket
(define-for-syntax (add-qmark s)
(string->symbol
(string-append (symbol->string s) "?")))
(define (all-symbols? lst)
(match lst
[(list x)
(symbol? x)]
[(cons x rest)
(if (symbol? x)
(all-symbols? rest)
#f)]))
(define (symbol-in-symbol-set s set)
(match set
... | null | https://raw.githubusercontent.com/VincentToups/racket-lib/d8aed0959fd148615b000ceecd7b8a6128cfcfa8/pure-lands/utilities/symbol-set.rkt | racket | #lang racket
(define-for-syntax (add-qmark s)
(string->symbol
(string-append (symbol->string s) "?")))
(define (all-symbols? lst)
(match lst
[(list x)
(symbol? x)]
[(cons x rest)
(if (symbol? x)
(all-symbols? rest)
#f)]))
(define (symbol-in-symbol-set s set)
(match set
... | |
82f9d7299b20f4ddb767aff7455539b2f1dad50a1b4793869686758254e14b5e | ros/roslisp_common | datatypes.lisp |
(in-package :cl-transforms-stamped)
(defclass stamped ()
((frame-id :initarg :frame-id :reader frame-id :type string)
(stamp :initarg :stamp :reader stamp :type float)))
(defclass transform-stamped (transform stamped)
((child-frame-id :initarg :child-frame-id :reader child-frame-id :type string)))
(defclass ... | null | https://raw.githubusercontent.com/ros/roslisp_common/4db311da26497d84a147f190200e50c7a5b4106e/cl_transforms_stamped/src/datatypes.lisp | lisp | Deprecated stamped-transform |
(in-package :cl-transforms-stamped)
(defclass stamped ()
((frame-id :initarg :frame-id :reader frame-id :type string)
(stamp :initarg :stamp :reader stamp :type float)))
(defclass transform-stamped (transform stamped)
((child-frame-id :initarg :child-frame-id :reader child-frame-id :type string)))
(defclass ... |
760d223d48fa14edf3cb7de4508306770f9795a47c1068d7ab46c27561ad3eae | ivanschuetz/clojushop | mappings.clj | (ns clojushop.mappings
#^{:doc "Functions to map parameters/results between handler(webservice) and data provider"}
(:require [clojushop.utils :as utils])
(:import
[org.bson.types ObjectId]))
TODO decouple from Mongo ( . )
TODO mapping for nested values
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/ivanschuetz/clojushop/c7c15b222ff91b5ef0434d9a4dbb7d88318dc71a/src/clojushop/mappings.clj | clojure |
Util
Mapping dp -> ws (data provider to webservice)
instead of item-with-imgs
Mapping dp -> ws (webservice to data provider) | (ns clojushop.mappings
#^{:doc "Functions to map parameters/results between handler(webservice) and data provider"}
(:require [clojushop.utils :as utils])
(:import
[org.bson.types ObjectId]))
TODO decouple from Mongo ( . )
TODO mapping for nested values
Adds a Mongo i d to obj - parses : i d if pres... |
6aed47b71c25e36e23438e13e087deb1e10e3f03710ad21f5638b869e7160447 | fjvallarino/monomer | LabeledCheckboxSpec.hs | |
Module : . Widgets . Singles . LabeledCheckboxSpec
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Unit tests for labeledCheckbox widget .
Module : Monomer.Widgets.Singles.LabeledCh... | null | https://raw.githubusercontent.com/fjvallarino/monomer/3b321ed0bd5c1458864c02696c43aa39b627640f/test/unit/Monomer/Widgets/Singles/LabeledCheckboxSpec.hs | haskell | |
Module : . Widgets . Singles . LabeledCheckboxSpec
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Unit tests for labeledCheckbox widget .
Module : Monomer.Widgets.Singles.LabeledCh... | |
3acdaa9b268243536f528f719ddddc097c342ab310cc37c0c4c81a0241ab3d03 | sinelaw/infernu | semantics.hs | | Semantics of JS according to Infernu
These definitions do n't necessarily correspond to ECMAScript .
module Semantics where
import Data.Map (Map)
import qualified Data.Map as Map
-- | The term language
newtype Id = Id String
deriving (Show, Eq, Ord)
data Value = VString String
| VBool B... | null | https://raw.githubusercontent.com/sinelaw/infernu/e8b7aff6ea628c9099fb82aa011eb5c12aca36ba/docs/semantics.hs | haskell | | The term language
"VFun (" ++ show props ++ ", <fun>)"
Let String Expr Statement
| RealWorld
| Environment
| Expressions
| Function expressions
The meaning of Abs is a function that takes values and returns a value.
Because the function takes values, not locations, and because there
is no "pointer" in the... | | Semantics of JS according to Infernu
These definitions do n't necessarily correspond to ECMAScript .
module Semantics where
import Data.Map (Map)
import qualified Data.Map as Map
newtype Id = Id String
deriving (Show, Eq, Ord)
data Value = VString String
| VBool Bool
| VNum D... |
5f382fde8727b573cbc4eb7026e539898bdc88525e2a25ef9a3a254573f2c977 | fakedata-haskell/fakedata | Barcode.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Faker.Barcode where
import Data.Text (Text)
import Faker (Fake(..))
import Faker.Provider.Barcode
import Faker.TH
$(generateFakeFieldSingleUnresolved "barcode" "ean_8")
$(generateFakeFieldSingleUnresolved "barcode" "ean_13")
$(generateFakeField... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/Barcode.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Barcode where
import Data.Text (Text)
import Faker (Fake(..))
import Faker.Provider.Barcode
import Faker.TH
$(generateFakeFieldSingleUnresolved "barcode" "ean_8")
$(generateFakeFieldSingleUnresolved "barcode" "ean_13")
$(generateFakeFieldSingleUnresolved "barcode" "upc_a")... |
6f1ba230cbd9e16f7a1f835e252e11b5f728d9a8b34f1efe4f2de2509c992bd6 | michiakig/LispInSmallPieces | chap1c.scm | $ I d : chap1c.scm , v 4.0 1995/07/10 06:50:54
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is part of the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
;;; Newest version may be... | null | https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap1c.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is part of the files that accompany the book:
Newest version may be retrieved from:
Check the README file before using this file.
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) | $ I d : chap1c.scm , v 4.0 1995/07/10 06:50:54
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz
variants of chapter 1 .
(define (s.make-function variab... |
d9ea55ef464cedc070e4f1d3228865f83e18e0db184d8111976984d0a79e6744 | aspiwack/ocaml-hollow-heap | bench.ml | * [ heap_ops ( i , dk , ] generates a random sequence of Heap
operations of size [ len ] , for each [ i ] insertion , there is , on
average , [ dk ] decreases and [ dm ] deletes ..
operations of size [len], for each [i] insertion, there is, on
average, [dk] decreases and [dm] deletes.. *)
let hea... | null | https://raw.githubusercontent.com/aspiwack/ocaml-hollow-heap/097f2ac4665bfd4bd81aa9797c331eccb85269ff/bench/bench.ml | ocaml | * [ heap_ops ( i , dk , ] generates a random sequence of Heap
operations of size [ len ] , for each [ i ] insertion , there is , on
average , [ dk ] decreases and [ dm ] deletes ..
operations of size [len], for each [i] insertion, there is, on
average, [dk] decreases and [dm] deletes.. *)
let hea... | |
585a174f48be31747758807687453ec9b503d69ff3728ba21008fcace23f8c76 | stassats/lisp-bots | math-captcha.lisp | (defpackage :webutils.captcha (:use :cl)
(:export :expire-captchas :generate-captcha :check-captcha))
(in-package :webutils.captcha)
(webutils::export-all :webutils.captcha)
(defvar *captchas* nil)
(defvar *captcha-counter* 0)
(defstruct (captcha (:type list))
id answer generated-time)
(defun expire-ca... | null | https://raw.githubusercontent.com/stassats/lisp-bots/09bfce724afd20c91a08acde8816be6faf5f54b2/webutils/math-captcha.lisp | lisp | (defpackage :webutils.captcha (:use :cl)
(:export :expire-captchas :generate-captcha :check-captcha))
(in-package :webutils.captcha)
(webutils::export-all :webutils.captcha)
(defvar *captchas* nil)
(defvar *captcha-counter* 0)
(defstruct (captcha (:type list))
id answer generated-time)
(defun expire-ca... | |
566618975720ab6b0acfde1ba1d0c702e1a6fe9e9ffe6b0ec4d6cb0dc5fe206e | cuplv/dai | src_file.mli | type t = Tree_sitter_run.Src_file.t
val path : t -> string option
val lines : t -> string array
val of_file : string -> t
val line_offsets : t -> int list
* return the byte offsets to the first character of each line in the input program
val read_fn : t -> int -> int -> int -> string option
* create a read functio... | null | https://raw.githubusercontent.com/cuplv/dai/313153ab0f1804024357dd761a1533ca71fdf438/src/frontend/src_file.mli | ocaml | type t = Tree_sitter_run.Src_file.t
val path : t -> string option
val lines : t -> string array
val of_file : string -> t
val line_offsets : t -> int list
* return the byte offsets to the first character of each line in the input program
val read_fn : t -> int -> int -> int -> string option
* create a read functio... | |
6b3156608b2fb65a7770282d223fecc694a9860db1bddd9a26247163f53951ba | kmi/irs | ontoweb-ontology.lisp | Mode : Lisp ; Package :
(in-package "OCML")
(in-ontology ONTOWEB-ONTOLOGY)
Automatically translated from RDF file " freaky : rdf - files;ontoweb - data;OntoWeb - Ontology - RC1.rdfs "
at , on 5/11/2003
(def-class Default_Root_Concept ()
())
(def-class binary-relation (Default_Root_Concept))
(def-class ONTO-WE... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/ontoweb-ontology/ontoweb-ontology.lisp | lisp | Package :
(def-relation METHODOLOGY (?x ?y)
:pretty-name "#methodology"
)
(def-relation TOPIC (?x ?y)
:pretty-name "#topic"
)
|
(in-package "OCML")
(in-ontology ONTOWEB-ONTOLOGY)
Automatically translated from RDF file " freaky : rdf - files;ontoweb - data;OntoWeb - Ontology - RC1.rdfs "
at , on 5/11/2003
(def-class Default_Root_Concept ()
())
(def-class binary-relation (Default_Root_Concept))
(def-class ONTO-WEB-PORTAL (default_root_conc... |
1f9b4a0ec391e14cf50c3c613446cc4cffc972ca7366c7231c3120e83ddc06d7 | ijvcms/chuanqi_dev | task_complete_config.erl | %%%-------------------------------------------------------------------
@author zhengsiying
%%% @doc
%%% 自动生成文件,不要手动修改
%%% @end
Created : 2016/10/12
%%%-------------------------------------------------------------------
-module(task_complete_config).
-include("common.hrl").
-include("config.hrl").
-compile([expo... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/task_complete_config.erl | erlang | -------------------------------------------------------------------
@doc
自动生成文件,不要手动修改
@end
------------------------------------------------------------------- | @author zhengsiying
Created : 2016/10/12
-module(task_complete_config).
-include("common.hrl").
-include("config.hrl").
-compile([export_all]).
get_list() ->
[
#task_complete_conf{
id = 1,
type = 3,
num = 1,
need_jade = 20
},
#task_complete_conf{
id = 2,
type = 3,
num = 2,
need_jade = ... |
2cb0a9e8c2e6a7d3febd28041bf7411373e0940af51b4d6e0138806c702d4e54 | ocsigen/tyxml | tyxml_html.mli | TyXML
*
* Copyright ( C ) 2011 ,
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at you... | null | https://raw.githubusercontent.com/ocsigen/tyxml/8551b673857fdc1defebe7c502ffcb920f04009e/implem/tyxml_html.mli | ocaml | * Typesafe constructors and printers for Html documents.
@see </> W3C Recommendation
* {2 Printers}
* [pp ()] is a {!Format} printer for Html documents.
It can be used in combination with ["%a"]. For example, to get a string:
{[let s = Format.asprintf "%a" (Tyxml.Html.pp ()) my_html]}
* [pp_elt ()] is ... | TyXML
*
* Copyright ( C ) 2011 ,
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at you... |
af0206b5db00575efbd1167f00e53289c8c402cba529a48694bb21cc90e16b2e | Eonblast/Scalaxis | dn_cache.erl | 2007 - 2011 Zuse Institute Berlin
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
d... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/dn_cache.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2007 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(dn_cache).
-author('').
-vsn('$Id$').
-behavior(gen_component).
-include("scalaris.hrl").
-export([start_... |
3865ffa08b290ff369ecf1a81177402db7a2e952f240ba1d363e2ab6c889cdff | threatgrid/clj-momo | jmx.clj | (ns clj-momo.lib.metrics.jmx
(:require [metrics.reporters.jmx :as jmx]))
(defn start []
(jmx/start (jmx/reporter {})))
| null | https://raw.githubusercontent.com/threatgrid/clj-momo/7bc0a411593eee4a939b6a3d0f628413518e09e2/src/clj_momo/lib/metrics/jmx.clj | clojure | (ns clj-momo.lib.metrics.jmx
(:require [metrics.reporters.jmx :as jmx]))
(defn start []
(jmx/start (jmx/reporter {})))
| |
c178efba93f1c851722354e0c72d9bbf58634963a47602b2696e37000eb3311c | chris-moreton/plutus-scripts | HelloWorldByteStringParametric.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
This solution has been contributed by
module Carda... | null | https://raw.githubusercontent.com/chris-moreton/plutus-scripts/fd09a54c00f1593da4a75e57f44d7ac773e356fd/plutus-sources/plutus-helloworld/src/Cardano/PlutusExample/HelloWorldByteStringParametric.hs | haskell | # LANGUAGE OverloadedStrings #
The "hello world" message as a bytestring
As a Validator
As a Script
As a Short Byte String
As a Serialised Script
| # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
This solution has been contributed by
module Cardano.PlutusExample.HelloWorldByteStri... |
8efffe1b7fb2eeef13b366feab6704a4560da0a7675a08d7b55bf528522f8e87 | valis/hoq | Monad.hs | module TypeChecking.Monad
( EDocM, TCM, runTCM
, addFunctionCheck, addDataTypeCheck
, addConstructorCheck, addFieldCheck
, module TypeChecking.Monad.Warn
, module TypeChecking.Monad.Scope
, lift
) where
import Control.Monad
import Control.Monad.Trans(lift)
import TypeChecking.Expressions.U... | null | https://raw.githubusercontent.com/valis/hoq/9d2d2f5dee367ca5a609199856ca5964499bf33a/src/TypeChecking/Monad.hs | haskell | module TypeChecking.Monad
( EDocM, TCM, runTCM
, addFunctionCheck, addDataTypeCheck
, addConstructorCheck, addFieldCheck
, module TypeChecking.Monad.Warn
, module TypeChecking.Monad.Scope
, lift
) where
import Control.Monad
import Control.Monad.Trans(lift)
import TypeChecking.Expressions.U... | |
4bd5eccdbba7ef31be0edb09548ed350e3bd5d2828daadd3f166a9c17eb5eb65 | airalab/hs-web3 | SkipSpec.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
-- |
Module : Codec . Scale . Test .
Copyright : 2016 - 2021
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unportable
--
Ported to Haskell rust tes... | null | https://raw.githubusercontent.com/airalab/hs-web3/c03b86eb621f963886a78c39ee18bcec753f17ac/packages/scale/tests/Codec/Scale/Test/SkipSpec.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
|
License : BSD3
Maintainer :
Stability : experimental
Portability : unportable
-scale-codec/blob/master/tests/skip.rs
Implementing A constructor is impossible | # LANGUAGE DeriveGeneric #
Module : Codec . Scale . Test .
Copyright : 2016 - 2021
Ported to Haskell rust test spec :
module Codec.Scale.Test.SkipSpec where
import Data.ByteString (ByteString, pack)
import Data.Default (Default)
import D... |
92e4318448620451cf4fed231cb14d0cce8e2f5dca519ed10bdb2bddc30cb17e | ngless-toolkit/ngless | LoadFQDirectory.hs | # LANGUAGE TemplateHaskell , QuasiQuotes #
module Tests.LoadFQDirectory
( tgroup_LoadFQDirectory
) where
import Test.Tasty.TH
import Test.Tasty.HUnit
import Control.Monad (forM_)
import BuiltinModules.LoadDirectory (matchUp)
import Tests.Utils
tgroup_LoadFQDirectory = $(testGroupGenerator)
case_error_p1 = ... | null | https://raw.githubusercontent.com/ngless-toolkit/ngless/6522017c229fa3796d3abbee85547b76b6c4f41d/Tests-Src/Tests/LoadFQDirectory.hs | haskell | Simple with ".single"
basic uncompressed
basic compressed I
Paired using "_[12].fastq"
paired+singles compressed
paired+singles compressed II (bz2 + deeper directory)
_[FR] pairing+single
Arguably, the pairing is not the expected one, but this was what was done before
mixed | # LANGUAGE TemplateHaskell , QuasiQuotes #
module Tests.LoadFQDirectory
( tgroup_LoadFQDirectory
) where
import Test.Tasty.TH
import Test.Tasty.HUnit
import Control.Monad (forM_)
import BuiltinModules.LoadDirectory (matchUp)
import Tests.Utils
tgroup_LoadFQDirectory = $(testGroupGenerator)
case_error_p1 = ... |
d5babc14ffc2a5f3fb2920ab1ec6746c35cd68af3272db4e0ca95005f8a97886 | pallet/awaze | client_builder_test.clj | (ns com.palletops.awaze.client-builder-test
(:require
[clojure.test :refer :all]
[com.palletops.awaze.client-builder :refer :all]))
(deftest required-constructor-args-test
(is (required-constructor-args
com.amazonaws.services.s3.model.DeleteObjectsRequest)))
(deftest bean-instance-test
(is (bean-in... | null | https://raw.githubusercontent.com/pallet/awaze/90f1965744c4a2c5a2d87480dd3eea23ba584ed3/test/com/palletops/awaze/client_builder_test.clj | clojure | (ns com.palletops.awaze.client-builder-test
(:require
[clojure.test :refer :all]
[com.palletops.awaze.client-builder :refer :all]))
(deftest required-constructor-args-test
(is (required-constructor-args
com.amazonaws.services.s3.model.DeleteObjectsRequest)))
(deftest bean-instance-test
(is (bean-in... | |
3b88bbe560f3261bcf29da09e939b788eecf11c433780be1603fda61fe1eb832 | rubenbarroso/EOPL | 3_56.scm | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/3-8need.scm")
;we will only show the procedures that need to be changed/added to support
;the... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter3/3_56.scm | scheme | we will only show the procedures that need to be changed/added to support
the if as a primitive procedure
We remove if from the syntax grammar and add it as a primitive
We remove the if-exp variant from eval-expression and treat it as a special
apply-primitive contains a new case for if, thawing their thunks as
necessa... | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/3-8need.scm")
(define the-grammar
'((program (expression) a-program)
(expression (numb... |
a0874f5979c14c20aabe629c06f43322425e149f74907d3232080a5714ba892b | sbcl/sbcl | pprint.impure.lisp | ;;;; test of the pretty-printer
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in the public... | null | https://raw.githubusercontent.com/sbcl/sbcl/dac8bd608c93113b958194b0be807902ea18387c/tests/pprint.impure.lisp | lisp | test of the pretty-printer
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
Assert that entries inserted into a dispatch table with equal pr... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(in-package :cl-user)
are order - preserving - unless they are of the form ( CONS ( EQL x ) ) .
(with-test (:name :pprint-dispatch-order-preserving)
(let ((tbl (s... |
2580ff37850a45a557e53a4c244ac9b1238043363da9439003649083f2554f5a | tezos/tezos-mirror | script_interpreter.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/32c9ef7c4ad3c6ec14e16ab3d75e353266925fb1/src/proto_alpha/lib_protocol/script_interpreter.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2020 Metastate AG < >
Copyright ( c ) 2021 - 2022 Nomadic Labs < >
Copyright ( c ) 2022 DaiLambda , Inc. < contact@dailambda , jp >
to deal in the Software without restriction , in... |
efa4e3a0344f01963847b5d30b6a2d9feae3214fa32f530fc4295ddfb8f34e1a | nasa/pvslib | patch-20220902-manip-manip-utilities.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;; -*- Mode: Lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
manip-utilities.lisp -- Support functions for Manip package
Author : < >
Created On : 19 Sep 2005 ( excerpted from manip-strategies.lisp )
;; Last Modified By:
Last Modified On : 13 Dec 2006 ( v1.2 - beta )
Last ... | null | https://raw.githubusercontent.com/nasa/pvslib/e7cdff5f70cc32cf7e440bba8b24b5e28bd3e0b1/pvs-patches/patch-20220902-manip-manip-utilities.lisp | lisp | -*- Mode: Lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;
Last Modified By:
Status : Development
------------- Regular expression package functions -------------
For the benefit of existing code, the following functions mimic
the interface provided by ACL functions in package "excl".
Only the keyword options ac... | manip-utilities.lisp -- Support functions for Manip package
Author : < >
Created On : 19 Sep 2005 ( excerpted from manip-strategies.lisp )
Last Modified On : 13 Dec 2006 ( v1.2 - beta )
Last Modified On : 17 Nov 2007 ( v1.2 )
Last Modified On : 15 Oct 2008 ( v1.3 )
Version : 1... |
47643c876f3c7ad06b6a996128db6477228057c4a5aaca7a363a05d78e3cd76c | marcoheisig/cl-mpi | cl-mpi-asdf-integration.lisp | (cl:defpackage #:cl-mpi-asdf-integration
(:use :cl)
(:export #:mpi-grovel-file #:mpi-wrapper-file #:mpi-program))
(cl:in-package #:cl-mpi-asdf-integration)
(defclass mpi-mixin ()
())
(defclass mpi-grovel-file (cffi-grovel:grovel-file mpi-mixin)
())
(defclass mpi-wrapper-file (cffi-grovel:wrapper-file mpi-mi... | null | https://raw.githubusercontent.com/marcoheisig/cl-mpi/ba92be06ec1dca74d0ca5256aa387d8a28c8ad86/cl-mpi-asdf-integration.lisp | lisp | Allow for keywords in ASDF definitions. | (cl:defpackage #:cl-mpi-asdf-integration
(:use :cl)
(:export #:mpi-grovel-file #:mpi-wrapper-file #:mpi-program))
(cl:in-package #:cl-mpi-asdf-integration)
(defclass mpi-mixin ()
())
(defclass mpi-grovel-file (cffi-grovel:grovel-file mpi-mixin)
())
(defclass mpi-wrapper-file (cffi-grovel:wrapper-file mpi-mi... |
55f3ff42a4c82e42c43591d42ff5cd5bd74a62117e0d53f970420f39a895445a | samrocketman/home | tissier-diffusion-filter.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
diffusion filter script for GIMP 2.4
Original author :
; -oasis.net/gimp/
;
; Tags: effect, filter
;
; Author statement:
;
; This 'script-fu' fakes a diffusion filter.
;
; -------------------------------------------------------------... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/tissier-diffusion-filter.scm | scheme |
The GIMP -- an image manipulation program
-oasis.net/gimp/
Tags: effect, filter
Author statement:
This 'script-fu' fakes a diffusion filter.
--------------------------------------------------------------------
--------------------------------------------------------------------
- Changelog -
Changelog
... | Copyright ( C ) 1995 and
diffusion filter script for GIMP 2.4
Original author :
Distributed by Gimp FX Foundry project
english translation
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You sho... |
78c2be0d9084849e67ea384bff66944ab8f8b61be8badb6d1a69b165f07164db | ChrisPenner/catalyst | Recursive.hs | module Control.Category.Recursive where
import Control.Category (Category)
import qualified Data.Profunctor.Choice as P
import qualified Data.Profunctor.Strong as P
class Category k => Recursive k where
recurseL :: (Either a s `k` Either b s) -> (a `k` b)
recurseR :: (Either s a `k` Either s b) -> (a `k` b)
inst... | null | https://raw.githubusercontent.com/ChrisPenner/catalyst/6b25a3b810737a335fe3ac9a532161b92f7f4e9f/src/Control/Category/Recursive.hs | haskell | module Control.Category.Recursive where
import Control.Category (Category)
import qualified Data.Profunctor.Choice as P
import qualified Data.Profunctor.Strong as P
class Category k => Recursive k where
recurseL :: (Either a s `k` Either b s) -> (a `k` b)
recurseR :: (Either s a `k` Either s b) -> (a `k` b)
inst... | |
cc0e575b17ad1f30dcfcc44154b6fbd3456d4f797ab521f42e3b1bed003486d7 | gedge-platform/gedge-platform | ranch_transport.erl | Copyright ( c ) 2012 - 2021 , < >
Copyright ( c ) 2020 - 2021 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/ranch/src/ranch_transport.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2012 - 2021 , < >
Copyright ( c ) 2020 - 2021 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(ranch_... |
561d2ad4c4ba605a16bd70cf536223a469c1e98b4e2b0130ca261d22e6df8103 | JustusAdam/language-haskell | T0020b.hs | SYNTAX TEST " source.haskell " " Fields in GADTs "
data A where
A :: { field1 :: Int, field2 :: Int } -> A
-- ^^^^^^ ^^^^^^ meta.record.definition.haskell variable.other.member.definition.haskell
^^^^^^ ^^^^^^^ - variable.other.generic-type.haskell
^^^ ... | null | https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0020b.hs | haskell | ^^^^^^ ^^^^^^ meta.record.definition.haskell variable.other.member.definition.haskell
^^^^^^ meta.record.definition.haskell variable.other.member.definition.haskell
^^^^^^^ - variable.other.generic-type.haskell
^^^^^^ meta.record.definition.haskell variable.other.member.definition.... | SYNTAX TEST " source.haskell " " Fields in GADTs "
data A where
A :: { field1 :: Int, field2 :: Int } -> A
^^^^^^ ^^^^^^^ - variable.other.generic-type.haskell
^^^ ^^^ meta.record.definition.haskell storage.type.haskell
data B where
B
:: { field3 :: Bool
... |
172c06679e2838c68969bdc68fb0edaaa7637c5d0be3d8965123fe807505073a | arachne-framework/enterprise-spa | project.clj | (defproject org.arachne-framework.template/enterprise-spa "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.9.0-alpha17"]
[org.arachne-framework/pedestal-assets "0.2.0-master-0018-b7669fc"]
[org.arachne-framework/arachne-figwheel "0.2.0-master-0030-676b9a2"]
[... | null | https://raw.githubusercontent.com/arachne-framework/enterprise-spa/084efbb7a9cb49349cc54a630f8f6b6fb3063646/project.clj | clojure | (defproject org.arachne-framework.template/enterprise-spa "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.9.0-alpha17"]
[org.arachne-framework/pedestal-assets "0.2.0-master-0018-b7669fc"]
[org.arachne-framework/arachne-figwheel "0.2.0-master-0030-676b9a2"]
[... | |
b35a3b7642ee076b50e1c9472bfb9f0645e32c5aa034228cdfe4bea6c83a1148 | tokenrove/imago | image.lisp | ;;; IMAGO library
;;; Image data structure definitions
;;;
Copyright ( C ) 2004 - 2005 ( )
;;;
;;; The authors grant you the rights to distribute
;;; and use this software as governed by the terms
of the Lisp Lesser GNU Public License
;;; (),
;;; known as the LLGPL.
(in-package :imago)
(defclass image ()
... | null | https://raw.githubusercontent.com/tokenrove/imago/44132ce16a72e70a0c4b0becb43b4eff98bbf37e/src/image.lisp | lisp | IMAGO library
Image data structure definitions
The authors grant you the rights to distribute
and use this software as governed by the terms
(),
known as the LLGPL.
XXX: I couldn't get a tighter type specifier to match this,
because of the parameter to planar-pixel.
XXX shouldn't the initial element of the c... | Copyright ( C ) 2004 - 2005 ( )
of the Lisp Lesser GNU Public License
(in-package :imago)
(defclass image ()
()
(:documentation "The protocol class for images."))
(defgeneric image-pixel (image x y)
(:documentation "Returns the color of the pixel at specified coordinates
in the image."))
(defgeneri... |
f3e2d5cb443ae42996a870259b6f4560ae45de65f29b263e3db6bbfeec47779a | MarcKaufmann/congame | study.rkt | #lang racket/base
(require (for-syntax racket/base
racket/syntax
syntax/parse/lib/function-header)
db
db/util/postgresql
deta
gregor
koyo/continuation
koyo/database
koyo/haml
koyo/random
(except-i... | null | https://raw.githubusercontent.com/MarcKaufmann/congame/89dce1da98a5791983fbef72f8756d3c2a73e706/congame-core/components/study.rkt | racket | canaries ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
storage ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
For later extension if we decide to store files outside the database.
This way studies that operate on files can be forward-compatible with
changes in the way we actually stor... | #lang racket/base
(require (for-syntax racket/base
racket/syntax
syntax/parse/lib/function-header)
db
db/util/postgresql
deta
gregor
koyo/continuation
koyo/database
koyo/haml
koyo/random
(except-i... |
6e54383adac5093422dc7ce8346545aa8a1f95991919968a39569791594df06f | hmac/kite | Print.hs | module Syn.Print where
import Control.Monad.Reader ( Reader
, ask
, local
, runReader
)
import Da... | null | https://raw.githubusercontent.com/hmac/kite/a48839fa5a4edce3bc7a758e4fcb1bda38a556f0/src/Syn/Print.hs | haskell | ---
---
The return type is a Maybe so we can render the empty string when there's no
metadata. ()
(fun1, fun2)
import qualified Data.Text.Encoding as E (encodeUtf8)
Types
a -> b
f a -> f b
a -> b -> c
(a -> b) -> c
a => b => c
a => b -> c
(a -> b) => c
a -> b => c
otherwise = ... | module Syn.Print where
import Control.Monad.Reader ( Reader
, ask
, local
, runReader
)
import Da... |
6df5592a78fa3ba1df2d776fe84f5c3683648616586726ed103cb432f8657b44 | ucsd-progsys/dsolve | lst.ml | qualif POS(x): 0 < x
qualif NEG(x): x < 0
type 'a lst = Nil | Cons of 'a * 'a lst
let empty = Nil
let _ = empty
let pos = Cons (1, empty)
let _ = pos
let abs x =
if x > 0 then x else (0 - x)
| null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/lst.ml | ocaml | qualif POS(x): 0 < x
qualif NEG(x): x < 0
type 'a lst = Nil | Cons of 'a * 'a lst
let empty = Nil
let _ = empty
let pos = Cons (1, empty)
let _ = pos
let abs x =
if x > 0 then x else (0 - x)
| |
39c5b6a094bd818e67dccbdc8a89bf4df0a545cdce8a7348b8f6e71a83a539b8 | DKurilo/hackerrank | solution.hs | # LANGUAGE UnicodeSyntax #
module Main where
import Prelude.Unicode
import Control.Monad
import qualified Data.ByteString.Char8 as BSC
import Debug.Trace
import System.Environment
import System.IO
-- function is herea
type Queen = (Int, Int)
ways ∷ Int → Int
ways n = ways' n [] 0 0
ways' ∷ Int → [Queen] → Int → In... | null | https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/super-queens-on-a-chessboard/solution.hs | haskell | function is herea | # LANGUAGE UnicodeSyntax #
module Main where
import Prelude.Unicode
import Control.Monad
import qualified Data.ByteString.Char8 as BSC
import Debug.Trace
import System.Environment
import System.IO
type Queen = (Int, Int)
ways ∷ Int → Int
ways n = ways' n [] 0 0
ways' ∷ Int → [Queen] → Int → Int → Int
ways' n qs x ... |
7a1b13682354740da01bd13c8b6a5958e1c269c0984f00417106e23971dd9553 | GNOME/aisleriot | fortress.scm | ; AisleRiot - fortress.scm
Copyright ( C ) 2001 , 2003 < >
;
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
; (at your option) any later version.
;
; ... | null | https://raw.githubusercontent.com/GNOME/aisleriot/5b04e58ba5f8df8223a3830d2c61325527d52237/games/fortress.scm | scheme | AisleRiot - fortress.scm
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. S... | Copyright ( C ) 2001 , 2003 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(use-modules (aisleriot interface) (aisleriot api))
(define foundation '... |
53ea77993af324cbe4789c55da9739376182aa07cef591633109888bd25b9ea0 | aroemers/clojure-cli-tools-build | build.clj | (require '[cljs.build.api :as api]
'[clojure.java.shell :as shell]
'[clojure.string :as string])
;;; Configuration.
(def source-dir "src")
(def test-dir "test")
(def compiler-config {:main 'my-app.core
:output-to "target/my-app/main.js"
:out... | null | https://raw.githubusercontent.com/aroemers/clojure-cli-tools-build/69d6df30c0e44019ae57236b8f48befe6b724ffb/build.clj | clojure | Configuration.
Tasks mechanism.
Helper functions.
Compiling task.
Testing task
Figwheeling task
Build script entrypoint. | (require '[cljs.build.api :as api]
'[clojure.java.shell :as shell]
'[clojure.string :as string])
(def source-dir "src")
(def test-dir "test")
(def compiler-config {:main 'my-app.core
:output-to "target/my-app/main.js"
:output-dir "target/... |
3d8e3136bcd81856be5a9d51ef351d6d709ea7b457d81d53094b0e4e6fc27b17 | theodormoroianu/SecondYearCourses | HaskellChurch_20210415121619.hs | {-# LANGUAGE RankNTypes #-}
module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = show $ cIf b True False
The boolean constant true always chooses the ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415121619.hs | haskell | # LANGUAGE RankNTypes #
The boolean negation switches the alternatives
The boolean conjunction can be built as a conditional
The boolean disjunction can be built as a conditional
a pair is a way to compute something based on the values
contained within the pair.
a function to be applied on the values, it will apply i... | module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = show $ cIf b True False
The boolean constant true always chooses the first alternative
cTrue :: C... |
766c2cced030c00225acf7ddf75ce3c4f62ef2e4577ac69cf6c05a22341d5311 | khotyn/4clojure-answer | 78-reimplement-trampoline.clj | (fn my-trampoline [f & params]
(let [mid-result (apply f params)]
(if (fn? mid-result)
(apply my-trampoline mid-result [])
mid-result))) | null | https://raw.githubusercontent.com/khotyn/4clojure-answer/3de82d732faedceafac4f1585a72d0712fe5d3c6/78-reimplement-trampoline.clj | clojure | (fn my-trampoline [f & params]
(let [mid-result (apply f params)]
(if (fn? mid-result)
(apply my-trampoline mid-result [])
mid-result))) | |
08010bcf5435b356f04c63ff090e4060d4ef63dfdcbe41061c07f4b499d933b4 | bsless/more.async | async_test.clj | (ns more.async-test
(:require
[clojure.core.async :as a]
[more.async :as sut]
[clojure.test :as t]))
(defn ticker
[]
(let [a (atom 0)]
(fn []
(swap! a inc))))
(t/deftest produce
(let [ch (a/chan)
f (ticker)]
(sut/produce! ch (f))
(t/is (= 1 (a/<!! ch)))
(t/is (= 2 (a/<!!... | null | https://raw.githubusercontent.com/bsless/more.async/a1ff81261634873f371bb3d27b9c8d0bb6785f09/src/test/clojure/more/async_test.clj | clojure | (ns more.async-test
(:require
[clojure.core.async :as a]
[more.async :as sut]
[clojure.test :as t]))
(defn ticker
[]
(let [a (atom 0)]
(fn []
(swap! a inc))))
(t/deftest produce
(let [ch (a/chan)
f (ticker)]
(sut/produce! ch (f))
(t/is (= 1 (a/<!! ch)))
(t/is (= 2 (a/<!!... | |
64680f3ad2ce09bb29892ad35c238f149d60b7a02e49ce8e2840778a66ba55b7 | oakes/Nightweb | server.clj | (ns nightweb-desktop.server
(:require [clojure.walk]
[nightweb.constants :as c]
[nightweb.formats :as f]
[nightweb-desktop.actions :as actions]
[nightweb-desktop.pages :as pages]
[nightweb-desktop.utils :as utils]
[ring.adapter.jetty :as jetty]
... | null | https://raw.githubusercontent.com/oakes/Nightweb/089c7a99a9a875fde33cc29d56e1faf54dc9de84/desktop/src/nightweb_desktop/server.clj | clojure | (ns nightweb-desktop.server
(:require [clojure.walk]
[nightweb.constants :as c]
[nightweb.formats :as f]
[nightweb-desktop.actions :as actions]
[nightweb-desktop.pages :as pages]
[nightweb-desktop.utils :as utils]
[ring.adapter.jetty :as jetty]
... | |
34b4e56355c9c7345ac8b2f0617b1133888e9796f000ac34c8b87e2d418feea0 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] -
[ @ISO639 - 3@ ] -
[ @Native name@ ] -
[ @English name@ ] Jèrriais
[@ISO639-1@] -
[@ISO639-2@] -
[@ISO639-3@] -
[@Native name@] -
[@English name@] Jèrriais
-}
module Text.Numeral.Language.FRA_JER.Tes... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/FRA_JER/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] -
[ @ISO639 - 3@ ] -
[ @Native name@ ] -
[ @English name@ ] Jèrriais
[@ISO639-1@] -
[@ISO639-2@] -
[@ISO639-3@] -
[@Native name@] -
[@English name@] Jèrriais
-}
module Text.Numeral.Language.FRA_JER.Tes... |
c756eae59ca3c905f335180e6d80c4a0b1ce7a2c6a3ad73adaf1c8602c2a13fa | AngelitoJ/Hydra-DHCP | dora_dyn_sup.erl | Hydra DHCP Server project
( C ) 2014
-module(dora_dyn_sup).
-behaviour(supervisor).
%% API
-export([start_link/1]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILDWRK(I, Args), {I, {I, start_link, [Args]}, temporary, 5000, worker, [I]}).
%% ==... | null | https://raw.githubusercontent.com/AngelitoJ/Hydra-DHCP/b1d38d791926d5a7ab940b567c00c780e1bb43af/src/supervisors/dora_dyn_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... | Hydra DHCP Server project
( C ) 2014
-module(dora_dyn_sup).
-behaviour(supervisor).
-export([start_link/1]).
-export([init/1]).
-define(CHILDWRK(I, Args), {I, {I, start_link, [Args]}, temporary, 5000, worker, [I]}).
Opts is a property list
supervisor:start_link({local, ?MODULE}, ?MODULE, Opts).
... |
ac9237105e0c70b804cdfe68baec5210070656f9ad62e4fba697617e735263da | thheller/shadow-cljs | prepl.clj | (ns shadow.cljs.devtools.server.prepl
(:require
[clojure.core.async :as async :refer (go <!! alts!)]
[shadow.cljs.devtools.api :as shadow]
[shadow.core-ext :as core-ext]
[shadow.jvm-log :as log]
[shadow.cljs.devtools.server.repl-impl :as repl-impl]
[shadow.cljs.devtools.server.supervisor :as s... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/main/shadow/cljs/devtools/server/prepl.clj | clojure | from clojure.core.server/prepl
; eval result
:ns ns-name-string
:ms long ;;eval time in milliseconds
; iff successfully read
:clojure.error/phase (:execution et al per clojure.main/ex-triage) ;;iff error occurred
}
{:tag :out
chars from during - eval * out *
{:tag :err
chars from during - eval * err... | (ns shadow.cljs.devtools.server.prepl
(:require
[clojure.core.async :as async :refer (go <!! alts!)]
[shadow.cljs.devtools.api :as shadow]
[shadow.core-ext :as core-ext]
[shadow.jvm-log :as log]
[shadow.cljs.devtools.server.repl-impl :as repl-impl]
[shadow.cljs.devtools.server.supervisor :as s... |
7d02a3e80d77b4002ca17eb6bc3f2b7c9d64eaddb6a0b368c3a7bed9a8c10013 | toschoo/mom | psend.hs | module Main
where
import Network.Mom.Stompl.Client.Queue
import qualified Protocol as P
import Network . Mom . Stompl . Client . Factory
import Network . Mom . Stompl . Client . State
import qualified Data.ByteString.Char8 as B
import System.Environment
import System.Exit
import Network.Socket
import... | null | https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/client/test/smoke/psend.hs | haskell | let conv = return . B.pack
q <- newWriter c "Test-Q" qn [] [] conv
forever $ psend c
threadDelay delay | module Main
where
import Network.Mom.Stompl.Client.Queue
import qualified Protocol as P
import Network . Mom . Stompl . Client . Factory
import Network . Mom . Stompl . Client . State
import qualified Data.ByteString.Char8 as B
import System.Environment
import System.Exit
import Network.Socket
import... |
f908039d121d77ad9324aab6952b0d87d77a76374049eed44cb2bff984b09e75 | pedestal/pedestal | web_server_benchmark.clj | (ns io.pedestal.web-server-benchmark
(:require [io.pedestal.http :as http]
[io.pedestal.http.servlet :as servlet]
[io.pedestal.http.impl.servlet-interceptor :as servlet-interceptor]
[io.pedestal.interceptor.helpers :as interceptor :refer (defbefore)]
[io.pedestal.http.i... | null | https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/tests/bench/io/pedestal/web_server_benchmark.clj | clojure | -----------------------
!!!! ATTENTION !!!!!
=======================
General issues with this benchmark
----------------------------------
* These benchmarks don't exercise a full-application.
They are lacking routing, complex result building,
advanced platform features, compression, etc.
* No one wr... | (ns io.pedestal.web-server-benchmark
(:require [io.pedestal.http :as http]
[io.pedestal.http.servlet :as servlet]
[io.pedestal.http.impl.servlet-interceptor :as servlet-interceptor]
[io.pedestal.interceptor.helpers :as interceptor :refer (defbefore)]
[io.pedestal.http.i... |
b1253cd3ae2dd24b54f7e558c3a8713b776d1a03e5aecaf003655f98ca140dcf | emilypi/higher-functors | Compose.hs | # language PolyKinds #
{-# language FlexibleContexts #-}
{-# language DefaultSignatures #-}
# language GADTs #
# language KindSignatures #
# language MultiParamTypeClasses #
# language RankNTypes #
# language RoleAnnotations #
# language StandaloneKindSignatures #
# language TypeOperators #
module Data.Functor.Higher.C... | null | https://raw.githubusercontent.com/emilypi/higher-functors/41f8858983f706177b88e6f2ec78e6f5f59dd58c/src/Data/Functor/Higher/Compose.hs | haskell | # language FlexibleContexts #
# language DefaultSignatures # | # language PolyKinds #
# language GADTs #
# language KindSignatures #
# language MultiParamTypeClasses #
# language RankNTypes #
# language RoleAnnotations #
# language StandaloneKindSignatures #
# language TypeOperators #
module Data.Functor.Higher.Compose
( HCompose(..)
) where
import Data.Kind
type HCompose
:: ... |
171786620200b925aee5b8f569fad62f18752aa7d7f5121c4c24e7c1d9bb5e67 | kafka4beam/brod | brod_SUITE.erl | %%%
Copyright ( c ) 2019 - 2021 , Klarna Bank AB ( publ )
%%%
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 ... | null | https://raw.githubusercontent.com/kafka4beam/brod/db12207e614b0f6b48309ef99709500755ec3bee/test/brod_SUITE.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | Copyright ( c ) 2019 - 2021 , Klarna Bank AB ( publ )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@private
-module(brod_SUITE).
-export([ init_per_suite/1
, end_per_suite/1
, all/0
, su... |
67ca419dae84d66819f203e68413048beffda1f7ab04ed93f769ec8432b1ddf3 | lamdu/lamdu | Db.hs | module Revision.Deltum.Db
( withDB, DB.defaultOptions, DB.Options(..)
) where
import Control.Exception (bracket)
import qualified Data.ByteString.Extended as BS
import Data.UUID.Types (UUID)
import qualified Data.UUID.Types as UUID
import Database.RocksDB.Base (DB)
import qualifie... | null | https://raw.githubusercontent.com/lamdu/lamdu/7c04dc798da83f56ea9400b90b0472ca7aabdd7e/src/Revision/Deltum/Db.hs | haskell | module Revision.Deltum.Db
( withDB, DB.defaultOptions, DB.Options(..)
) where
import Control.Exception (bracket)
import qualified Data.ByteString.Extended as BS
import Data.UUID.Types (UUID)
import qualified Data.UUID.Types as UUID
import Database.RocksDB.Base (DB)
import qualifie... | |
e9f0fa2c7ba15d9e1632f8fc610e9d0ee19d57c14666311f2a26bde20ca7b610 | slagyr/speclj | storm.clj | (ns storm
(:require [speclj.core :refer :all]))
(describe "The storm"
(it "downright fails"
(should-fail "fails for sure"))
(it "downright fail again"
(should-fail))
(it "fails on a boolean"
(should false))
(it "fails on equality"
(should= 1 2))
(it "fails on inequality"
(should-no... | null | https://raw.githubusercontent.com/slagyr/speclj/f5c4b327d8016c6caa28a0816dd5e2e52eebddd1/examples/failures/storm.clj | clojure | (ns storm
(:require [speclj.core :refer :all]))
(describe "The storm"
(it "downright fails"
(should-fail "fails for sure"))
(it "downright fail again"
(should-fail))
(it "fails on a boolean"
(should false))
(it "fails on equality"
(should= 1 2))
(it "fails on inequality"
(should-no... | |
50dbaee20b7b314ea580ac72915a1908ed9fa02b9442d01f9bb88817ca4d08f5 | Frama-C/Frama-C-snapshot | load_one.ml | let () = at_exit (fun _ -> Sys.remove "tests/saveload/result/load_one.sav")
let main () =
let sparecode () =
Sparecode.Register.get ~select_annot:false ~select_slice_pragma:false
in
let p = sparecode () in
Project.save "tests/saveload/result/load_one.sav";
Project.remove ~project:p ();
let p = Project.... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/saveload/load_one.ml | ocaml | testing Project.create_by_copy | let () = at_exit (fun _ -> Sys.remove "tests/saveload/result/load_one.sav")
let main () =
let sparecode () =
Sparecode.Register.get ~select_annot:false ~select_slice_pragma:false
in
let p = sparecode () in
Project.save "tests/saveload/result/load_one.sav";
Project.remove ~project:p ();
let p = Project.... |
5f49834fa70a3470a8f4a191e6a848e21ab1d11b4de0aa60a0f2c452274f2710 | yetanalytics/flint | axiom_test.cljc | (ns com.yetanalytics.flint.format.axiom-test
(:require [clojure.test :refer [deftest testing is]]
[com.yetanalytics.flint.axiom.iri :as iri]
[com.yetanalytics.flint.format :as f]
[com.yetanalytics.flint.format.axiom]))
(deftest axiom-format
(testing "Formatting terminal AST node... | null | https://raw.githubusercontent.com/yetanalytics/flint/b0a2530582e04f5592869b0152b846864c283d77/src/test/com/yetanalytics/flint/format/axiom_test.cljc | clojure | (ns com.yetanalytics.flint.format.axiom-test
(:require [clojure.test :refer [deftest testing is]]
[com.yetanalytics.flint.axiom.iri :as iri]
[com.yetanalytics.flint.format :as f]
[com.yetanalytics.flint.format.axiom]))
(deftest axiom-format
(testing "Formatting terminal AST node... | |
923c63d7bb978aae9ccba5d5bafff574e4a1fc6f9db7e3cbe5d366643466230a | ebresafegaga/tina | js.ml | open Syntax
open Naming
open Runtime
open Utility
module A = KNormal
type expression =
| LitBool of bool
| LitInteger of int
| LitFloat of float
| LitString of string
| Variable of string
| Application of expression * expression list
| Fn of VarName.t list * statement list
| Record of (VarName.t * expr... | null | https://raw.githubusercontent.com/ebresafegaga/tina/66fa8daa66c0c6e65260bbea3e8e2ddcc2f9d2d0/backend/js.ml | ocaml | these are statements in javascript
let name = VarName.fresh "if" in
let stm = Let (name, Application (exp, [])) in
make const for constant values and function for function definations | open Syntax
open Naming
open Runtime
open Utility
module A = KNormal
type expression =
| LitBool of bool
| LitInteger of int
| LitFloat of float
| LitString of string
| Variable of string
| Application of expression * expression list
| Fn of VarName.t list * statement list
| Record of (VarName.t * expr... |
3acee4d3569f8c2647ddfd6b872823c57e4769f8a9895152d17b74cfd1c29c82 | nathell/lithium | hello.clj | (do
(write-char (byte 72))
(write-char (byte 101))
(write-char (byte 108))
(write-char (byte 108))
(write-char (byte 111))) | null | https://raw.githubusercontent.com/nathell/lithium/dd6755081f0f4aec859e37ec3e8af863e1b5378f/examples/hello.clj | clojure | (do
(write-char (byte 72))
(write-char (byte 101))
(write-char (byte 108))
(write-char (byte 108))
(write-char (byte 111))) | |
0b3556d6f00c0133764d22b55a1a139c792ba8fc18e95a7aed73c5ad41a87810 | openmusic-project/openmusic | packbrowser-icons.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( C ) 1997 - 2009 IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : yo... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/kernel/ommodele/omframes/simpleframes/iconsframe/packbrowser-icons.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
======... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( C ) 1997 - 2009 IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Publi... |
c98de95c3d59776127b5bf7f13dd3a25942b1344ca7d70fc33c50521a9490576 | aeternity/aeternity | aec_consensus_smart_contract.erl | -*- erlang - indent - level : 4 ; indent - tabs - mode : nil -*-
%%% -------------------------------------------------------------------
( C ) 2020 , Aeternity Anstalt
%%% @doc Consensus module for consensus defined in a smart contract
%%% @end
%%% ------------------------------------------------------------------... | null | https://raw.githubusercontent.com/aeternity/aeternity/c3cebf5c5d069c9d14191cddcc232c5ee344f196/apps/aecore/src/aec_consensus_smart_contract.erl | erlang | -------------------------------------------------------------------
@doc Consensus module for consensus defined in a smart contract
@end
-------------------------------------------------------------------
TODO: remove this
API
Deserialization
Building the Insertion Ctx
Preconductor hook
Dirty validation befor... | -*- erlang - indent - level : 4 ; indent - tabs - mode : nil -*-
( C ) 2020 , Aeternity Anstalt
-module(aec_consensus_smart_contract).
-export([]).
-behavior(aec_consensus).
-define(SIGNATURE_SIZE, 16).
-define(ETS_CACHE_TABLE, ?MODULE).
-define(ELECTION_CONTRACT, election).
-define(REWARDS_CONTRACT, rewards).... |
a97046e7d97de832f216f82d464f2d9f361b55021a283500bdfac6948a2d220c | ghc/packages-Cabal | Hello.hs | # OPTIONS_GHC -F -pgmF zero - to - one #
module Main where
a :: String
a = "0000"
main :: IO ()
main = putStrLn a
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/BuildToolDepends/client/Hello.hs | haskell | # OPTIONS_GHC -F -pgmF zero - to - one #
module Main where
a :: String
a = "0000"
main :: IO ()
main = putStrLn a
| |
53f605082c32fb0097c780edc566ccd30c7e17a4c1f9cc235a87f85a7229f4f1 | empear-analytics/codescene-ci-cd | project.clj | (defproject codescene-ci-cd :lein-v
:description "A bridge to CodeScene's delta analysis"
:url "-analytics/codescene-ci-cd"
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/tools.cli "0.4.2"]
[org.clojure/data.json "0.2.6"]
[clj-http "3.9.0"]
... | null | https://raw.githubusercontent.com/empear-analytics/codescene-ci-cd/abb445e43c5127589c623fa7917d4ac136814881/project.clj | clojure | use latest tools.reader to fix issues with timbre using an old version
see -to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j
compute new version & tag it | (defproject codescene-ci-cd :lein-v
:description "A bridge to CodeScene's delta analysis"
:url "-analytics/codescene-ci-cd"
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/tools.cli "0.4.2"]
[org.clojure/data.json "0.2.6"]
[clj-http "3.9.0"]
... |
1585e1cd62545a1fa587faafd3689890a54d892e9d871147affbd47898bac117 | scrintal/heroicons-reagent | list_bullet.cljs | (ns com.scrintal.heroicons.solid.list-bullet)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M2.625 6.75a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zm4.875 0A.75.75 0 0... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/list_bullet.cljs | clojure | (ns com.scrintal.heroicons.solid.list-bullet)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M2.625 6.75a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zm4.875 0A.75.75 0 0... | |
9d45137f3a23c90a14e56db5ca50b2eb854980f0a323db9c125a52e74121e3be | acieroid/scala-am | frogger.scm | Copyright 2015
;;
;; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1 . Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer .
2 . Redistribut... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/VUB-projects/frogger.scm | scheme |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
in the documentation and/or other materials provided with the distribution.
from this software without specific prior written permission.
INCLUDING, BUT NOT LIMITED ... | Copyright 2015
1 . Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer .
2 . Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer
3 . Neither the name of the co... |
06f03c30bac31a786c6eb0fa4833198fe3548cb679c6a7a3162f8121434d97e1 | NetworkVerification/nv | InterpPartialFull.mli | open Nv_lang.Syntax
val interp_partial : exp -> exp
val interp_partial_fun : exp -> exp list -> exp
| null | https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/src/lib/interpreter/InterpPartialFull.mli | ocaml | open Nv_lang.Syntax
val interp_partial : exp -> exp
val interp_partial_fun : exp -> exp list -> exp
| |
bcb63247d95237c5d748e35338cd6a785bbb7db6c50005027dbd18e24566d6cc | 47degrees/yin-yang-haskell-workshop | STM.hs | {-# language OverloadedStrings #-}
# language DeriveGeneric #
module STM where
import Control.Concurrent.STM
import Data.Aeson
import Data.ByteString.Char8 (pack)
import GHC.Generics
import Network.Simple.TCP
data Command = Command { command :: String, value :: Maybe String }
deriving (Eq, Show, Generic... | null | https://raw.githubusercontent.com/47degrees/yin-yang-haskell-workshop/dd9c3076fecf26cafd4f30c4906dd94e003ca651/2-simple-server/STM.hs | haskell | # language OverloadedStrings # | # language DeriveGeneric #
module STM where
import Control.Concurrent.STM
import Data.Aeson
import Data.ByteString.Char8 (pack)
import GHC.Generics
import Network.Simple.TCP
data Command = Command { command :: String, value :: Maybe String }
deriving (Eq, Show, Generic)
instance ToJSON Comm... |
0b51ec3bae052c440fa69b100f70c8b19f0ec2cf0106283639881f7d5e4e2ef9 | hanshuebner/cadr2 | chstbl.lisp | ;;; -*- Mode: Lisp; Package: CHAOS; Base:8 -*-
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * *
;;; This file is not compiled. It contains Chaos-net tables
;;; which are likely to change frequently.
(SETQ
ALIST of host names and numbers for symbolic addressing
;; Note that the symbolic-name wh... | null | https://raw.githubusercontent.com/hanshuebner/cadr2/2398a1303804d41c4cdcb2d3d8454cd4a48912b8/mit/lmio/chstbl.lisp | lisp | -*- Mode: Lisp; Package: CHAOS; Base:8 -*-
This file is not compiled. It contains Chaos-net tables
which are likely to change frequently.
Note that the symbolic-name which is preferred to be displayed
Console locations for SUPDUP
LM17
LM14
LM13
LM12
LM11
LM9
LM8
LM5
LM4
LM1
Console locations in machine readable ... | * * ( c ) Copyright 1980 Massachusetts Institute of Technology * *
(SETQ
ALIST of host names and numbers for symbolic addressing
to the user should be first on this list .
HOST-ALIST '(("MC" . 1440) ("MIT-MC" . 1440) ("MC-11" . 440)
("AI" . 2026) ("MIT-AI" . 2026) ("AI-11" . 426)
("XX" . 2603) (... |
b685e970bad766d9e01b4e5d31d3acc27b6c52c962c8a2fedd3da4a833272756 | rtoy/ansi-cl-tests | ldb.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Sep 11 20:45:17 2003
;;;; Contains: Tests of LDB
(in-package :cl-test)
;;; Error tests
(deftest ldb.error.1
(signals-error (ldb) program-error)
t)
(deftest ldb.error.2
(signals-error (ldb (byte 1 1)) program-error)
t)
(deftest ldb.error.3
(signals... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/ldb.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of LDB
Error tests
Non-error tests
ldb on places | Author :
Created : Thu Sep 11 20:45:17 2003
(in-package :cl-test)
(deftest ldb.error.1
(signals-error (ldb) program-error)
t)
(deftest ldb.error.2
(signals-error (ldb (byte 1 1)) program-error)
t)
(deftest ldb.error.3
(signals-error (ldb (byte 1 1) -1 0) program-error)
t)
(deftest ldb.1
... |
77aaa43ff3963caf21b324238ec28788fec0223640aa7ee3e2e7a16e61da32ba | dsorokin/aivika | MachineBreakdowns.hs |
-- Example: Machine Tool with Breakdowns
--
It is described in different sources [ 1 , 2 ] . So , this is chapter 13 of [ 2 ] and section 6.12 of [ 1 ] .
--
Jobs arrive to a machine tool on the average of one per hour . The distribution of
-- these interarrival times is exponential. During normal operation, the j... | null | https://raw.githubusercontent.com/dsorokin/aivika/7a14f460ab114b0f8cdfcd05d5cc889fdc2db0a4/examples/MachineBreakdowns.hs | haskell | Example: Machine Tool with Breakdowns
these interarrival times is exponential. During normal operation, the jobs are
to the processing time, there is a set up time that is uniformly distributed between
to a different section of the shop and are considered to have left the machine tool
area.
The machine to... |
It is described in different sources [ 1 , 2 ] . So , this is chapter 13 of [ 2 ] and section 6.12 of [ 1 ] .
Jobs arrive to a machine tool on the average of one per hour . The distribution of
processed on a first - in , first - out basis . The time to process a job in hours is
normally distributed with a mean... |
9786955ebee804cf749743649349de4772828f1c84662fe63c6dd8fc3d0c5e58 | voxoz/emqttd | priority_queue.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/voxoz/emqttd/2be612e0e7a00a866cd9af350a030966d73fbc09/src/priority_queue.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
Priority queues... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2015 Pivotal Software , Inc. All rights reserved .
... |
0accc4adcd6e460f0831d0567437fbe14dbb522e58ce0b4182bc453a70955b45 | Ericson2314/lighthouse | Application.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Texturing.Application
Copyright : ( c ) 2002 - 2006
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer :
-- Stability : stable
-- Portabi... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/Texturing/Application.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.Texturing.Application
License : BSD-style (see the file libraries/OpenGL/LICENSE)
Maintainer :
Stability : stable
Portability : portable
This module corresponds to section 3... | Copyright : ( c ) 2002 - 2006
OpenGL 2.1 specs .
module Graphics.Rendering.OpenGL.GL.Texturing.Application (
texture
) where
import Graphics.Rendering.OpenGL.GL.BasicTypes ( Capability )
import Graphics.Rendering.OpenGL.GL.Capability (
EnableCap(CapTexture1D,CapTexture2D,CapTexture3D,CapTextureCubeMa... |
974ef3eabf8c5e20ae6caacc9f78b48972d37fb819fee0ea8226314d7d3b7409 | lnostdal/SymbolicWeb | sortable.clj | (in-ns 'symbolicweb.core)
(defn sortable [^WidgetBase container-view ^ContainerModel container-model & callback]
(letfn [(update-dom-hash-codes []
Assign the hashCodes of the CMNs of CONTAINER - MODEL to the DOM so we can find the CMNs later .
(loop [node (cm-head-node container-model)
... | null | https://raw.githubusercontent.com/lnostdal/SymbolicWeb/d9600b286f70f88570deda57b05ca240e4e06567/src/symbolicweb/sortable.clj | clojure | Do some simple checks to ensure the client doesn't have less (or different) nodes than the server as we start
removing EXISTING-ORDER-NODES on the server end the adding (wrongly) only a few of them back via NEW-ORDER-NODES.
TODO: Quite crude redraw. This also fucks up stuff (uhm, what stuff?) that still thinks the o... | (in-ns 'symbolicweb.core)
(defn sortable [^WidgetBase container-view ^ContainerModel container-model & callback]
(letfn [(update-dom-hash-codes []
Assign the hashCodes of the CMNs of CONTAINER - MODEL to the DOM so we can find the CMNs later .
(loop [node (cm-head-node container-model)
... |
f01fce8ecae214d8dbb489cbc614dbe0a4d6257603b1e4b016af54b48f55a64a | bsansouci/bsb-native | threadUnix.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/otherlibs/systhreads/threadUnix.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
* { 6 Process handling }
val execv : ... |
55830135570ffa6305373ccc0004a7a16a21ab37286516f081e9345d0fc631bc | rtoy/ansi-cl-tests | length.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Tue Aug 20 23:25:29 2002
;;;; Contains: Test cases for LENGTH
(in-package :cl-test)
(deftest length.list.1
(length nil)
0)
(deftest length.list.2
(length '(a b c d e))
5)
(deftest length.list.3
(length (make-list 200000))
200000)
(defun length.lis... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/length.lsp | lisp | -*- Mode: Lisp -*-
Contains: Test cases for LENGTH
Error cases
Length on vectors created with make-array
Unusual vectors | Author :
Created : Tue Aug 20 23:25:29 2002
(in-package :cl-test)
(deftest length.list.1
(length nil)
0)
(deftest length.list.2
(length '(a b c d e))
5)
(deftest length.list.3
(length (make-list 200000))
200000)
(defun length.list-4-body ()
(let ((x ()))
(loop
for i from 0 to 99... |
8552e4e8ffabaa186c83fd97e45ef53836ef3084da90ac97ebd9d6b482b3894c | tschady/advent-of-code | d06.clj | (ns aoc.2016.d06
(:require [aoc.file-util :as file-util]))
(def input (file-util/read-lines "2016/d06.txt"))
(defn solve [input sort-dir]
(->> input
(apply map list)
(map frequencies)
(map (partial sort-by val sort-dir))
(map ffirst)
(apply str)))
(defn part-1 [input]
(solve ... | null | https://raw.githubusercontent.com/tschady/advent-of-code/1e4a95ef580c3bf635837eff52aa998b0acfc666/src/aoc/2016/d06.clj | clojure | (ns aoc.2016.d06
(:require [aoc.file-util :as file-util]))
(def input (file-util/read-lines "2016/d06.txt"))
(defn solve [input sort-dir]
(->> input
(apply map list)
(map frequencies)
(map (partial sort-by val sort-dir))
(map ffirst)
(apply str)))
(defn part-1 [input]
(solve ... | |
541d64e1925f419feb2526adaa88bea20cb1699a05cab3548e08c50e9db95257 | MLstate/opalang | pass_DbEngineImportation.mli |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/opa/pass_DbEngineImportation.mli | ocaml | *
This pass imports the database runtime if needed.
|
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
2df9b93e9bdb602905ed973e580f1512d3a5a38a40ad8b7aa2c8da664858f514 | AdGoji/aws-api | project.clj | (defn get-deps [deps-file allowed known]
(let [{:keys [deps]} (try (clojure.edn/read-string (slurp deps-file)) (catch Exception e (throw (ex-info (str "Error in file " deps-file) {} e))))
deps (apply dissoc deps known)
{:keys [mvn local] :as m} (group-by (fn [[k v]]
... | null | https://raw.githubusercontent.com/AdGoji/aws-api/de776694b4364c64397a3c40fd7769634ab02df9/project.clj | clojure | :repl-options {:init-ns app.scratch}
:auto-clean false | (defn get-deps [deps-file allowed known]
(let [{:keys [deps]} (try (clojure.edn/read-string (slurp deps-file)) (catch Exception e (throw (ex-info (str "Error in file " deps-file) {} e))))
deps (apply dissoc deps known)
{:keys [mvn local] :as m} (group-by (fn [[k v]]
... |
eeb00be7064e61a38fef8a114a23213049a52dbaaecd8d0b583d530f4749e715 | mzp/coq-ide-for-ios | modops.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/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/checker/modops.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
Various operations on modules a... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : modops.mli 9821 200... |
6e18a0608e10583e0b3c017060a11cc23f188c8cab92445a4f004e34f0144685 | mkawalec/emailparse | main.hs | module Main where
import Test.Tasty (defaultMain, testGroup)
import qualified Network.Mail.Parse.Parsers.Tests.Headers as TH
import qualified Network.Mail.Parse.Parsers.Tests.HeaderFields as THF
main :: IO ()
main = defaultMain $ testGroup "Tests"
[TH.tests, THF.tests]
| null | https://raw.githubusercontent.com/mkawalec/emailparse/c5533707c7339bcebd616e1f7cdb442ca2d16626/test/main.hs | haskell | module Main where
import Test.Tasty (defaultMain, testGroup)
import qualified Network.Mail.Parse.Parsers.Tests.Headers as TH
import qualified Network.Mail.Parse.Parsers.Tests.HeaderFields as THF
main :: IO ()
main = defaultMain $ testGroup "Tests"
[TH.tests, THF.tests]
| |
bdf2752039db6880b2a17f368a3d21746e355f856f98b0db67a6e598aa07435d | arttuka/reagent-material-ui | tooltip.cljs | (ns reagent-mui.material.tooltip
"Imports @mui/material/Tooltip as a Reagent component.
Original documentation is at -ui/api/tooltip/ ."
(:require [reagent.core :as r]
["@mui/material/Tooltip" :as MuiTooltip]))
(def tooltip (r/adapt-react-class (.-default MuiTooltip)))
| null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/tooltip.cljs | clojure | (ns reagent-mui.material.tooltip
"Imports @mui/material/Tooltip as a Reagent component.
Original documentation is at -ui/api/tooltip/ ."
(:require [reagent.core :as r]
["@mui/material/Tooltip" :as MuiTooltip]))
(def tooltip (r/adapt-react-class (.-default MuiTooltip)))
| |
0d1d737310dedb81a315fa64f3ce673c8d84106cff35857fa7b9ee7beefa4253 | alexandergunnarson/quantum | loops.cljc | (ns quantum.untyped.core.loops
(:require
[quantum.untyped.core.core :as ucore]
[quantum.untyped.core.reducers :as r]))
(ucore/log-this-ns)
(defn reduce-2
"Reduces over two seqables at a time."
{:todo #{"`defnt` this and have it dispatch to e.g. reduce-2:indexed"}}
([f xs0 xs1] (reduce-2 f nil xs0 ... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src-untyped/quantum/untyped/core/loops.cljc | clojure | (ns quantum.untyped.core.loops
(:require
[quantum.untyped.core.core :as ucore]
[quantum.untyped.core.reducers :as r]))
(ucore/log-this-ns)
(defn reduce-2
"Reduces over two seqables at a time."
{:todo #{"`defnt` this and have it dispatch to e.g. reduce-2:indexed"}}
([f xs0 xs1] (reduce-2 f nil xs0 ... | |
1a5eb7ba7ce2df207726fee0228c8920a51cf86ba732d71b6cc32f308b6e4c7c | cau-placc/ghc-language-plugin | Transformers.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TypeFamilies #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving ... | null | https://raw.githubusercontent.com/cau-placc/ghc-language-plugin/b3432623816d88dcf465c252df0e5ef9c9f37e30/src/Plugin/Effect/Transformers.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE UndecidableInstances #
| Wrap a typed value in an untyped container.
| Wrap a typed value in an untyped container.
| Extract a typed value from a... | # LANGUAGE DeriveFunctor #
# LANGUAGE ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeApplications #
#... |
36126bd1ee926cc8297009643bf26a0789343d978f6d7f55e853d3515434a2cf | jgrodziski/set-game | middleware.clj | (ns set-game.middleware
(:require [ring.middleware.defaults :refer [site-defaults wrap-defaults]]))
(defn wrap-middleware [handler]
(wrap-defaults handler site-defaults))
| null | https://raw.githubusercontent.com/jgrodziski/set-game/4f918f53f26fe1b7744773cf1786ccf7272a121d/backend/env/prod/clj/set_game/middleware.clj | clojure | (ns set-game.middleware
(:require [ring.middleware.defaults :refer [site-defaults wrap-defaults]]))
(defn wrap-middleware [handler]
(wrap-defaults handler site-defaults))
| |
b480c6a52ca19b09cc3cda23c5ec2d01dffcb5414f9827af8dc7d73a3baf5955 | uber/NEAL | config.ml | Copyright ( c ) 2017 Uber Technologies , Inc.
(* *)
(* Permission is hereby granted, free of charge, to any person obtaining a copy *)
(* of this software and associated documentation files (the "Software"), to deal *)
in the Software without restriction , including without limitation the rights
(* to use, copy, mo... | null | https://raw.githubusercontent.com/uber/NEAL/6a382a3f957c3bb4abe3f9aba9761ffef13fa5fe/src/core/driver/config.ml | ocaml |
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright n... | Copyright ( c ) 2017 Uber Technologies , Inc.
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K... |
ef90eef9a0b05e013ff29ded48427b7913916c6a98d78211249d036777f44484 | RichiH/git-annex | SafeCommand.hs | safely running shell commands
-
- Copyright 2010 - 2015 < >
-
- License : BSD-2 - clause
-
- Copyright 2010-2015 Joey Hess <>
-
- License: BSD-2-clause
-}
# OPTIONS_GHC -fno - warn - tabs #
module Utility.SafeCommand where
import System.Exit
import Utility.Process
import Utility.Split
import... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Utility/SafeCommand.hs | haskell | | Parameters that can be passed to a shell command.
^ A parameter
^ The name of a file
| Used to pass a list of CommandParams to a function that runs
Files that start with a non-alphanumeric that is not a path
separator are modified to avoid the command interpreting them as
options or other special constructs.
... | safely running shell commands
-
- Copyright 2010 - 2015 < >
-
- License : BSD-2 - clause
-
- Copyright 2010-2015 Joey Hess <>
-
- License: BSD-2-clause
-}
# OPTIONS_GHC -fno - warn - tabs #
module Utility.SafeCommand where
import System.Exit
import Utility.Process
import Utility.Split
import... |
728ae25791c95dae3f07a3586ba512ffe37ddcb5ca898932798ec8c07e97db06 | noprompt/meander | epsilon.cljc | (ns ^:no-doc meander.substitute.specs.epsilon
(:require [clojure.spec.alpha :as s]))
(s/fdef meander.substitute.epsilon/substitute
:args (s/cat :pattern any?)
:ret any?)
| null | https://raw.githubusercontent.com/noprompt/meander/8c0e9457befea5eee71a94a6d8726ed5916875dc/src/meander/substitute/specs/epsilon.cljc | clojure | (ns ^:no-doc meander.substitute.specs.epsilon
(:require [clojure.spec.alpha :as s]))
(s/fdef meander.substitute.epsilon/substitute
:args (s/cat :pattern any?)
:ret any?)
| |
5059b0c1232da4f49bc98161edbab669a24543630fb6868f38a16d7ca9ccb136 | alura-cursos/clojure-introducao-a-testes | logic_test.clj | (ns hospital.logic-test
(:require [clojure.test :refer :all]
[hospital.logic :refer :all]))
(deftest cabe-na-fila?-test
; boundary tests
exatamente na off . -1 , +1 . < = , > = , = .
checklist na . poderia ser um checklist no papel
borda do zero
(testing "Que cabe numa fila vazia"
(... | null | https://raw.githubusercontent.com/alura-cursos/clojure-introducao-a-testes/40c6875480e31d7635ae74494cc0658d8c664bb4/aula1.3/hospital/test/hospital/logic_test.clj | clojure | boundary tests
borda do limite | (ns hospital.logic-test
(:require [clojure.test :refer :all]
[hospital.logic :refer :all]))
(deftest cabe-na-fila?-test
exatamente na off . -1 , +1 . < = , > = , = .
checklist na . poderia ser um checklist no papel
borda do zero
(testing "Que cabe numa fila vazia"
(is (cabe-na-fila? {... |
a32b5facbc43738aa82d35f615a3d65fd04398901d2babe85411648c2973f1a0 | lukeg101/lplzoo | Parser.hs | module Parser where
import Cata
import Control.Monad (liftM, ap)
import Data.Char
Implementation based on ideas in Monadic Parser Combinators paper
/~pszgmh/monparsing.pdf
Implementation based on ideas in Monadic Parser Combinators paper
/~pszgmh/monparsing.pdf
-}
Parser type takes input string and ret... | null | https://raw.githubusercontent.com/lukeg101/lplzoo/48de580b44c2c185609bea4e66a45589d3aa8213/Cata/Parser.hs | haskell | parser deconstructor
failure parser
parses an element and returns if they satisfy a predicate
parses chars only
parses a string of chars
parses 0 or more elements
parses 0 or more whitespace
trims whitespace between an expression
parses a single string
apply a parser to a string
left recursion
bracket pars... | module Parser where
import Cata
import Control.Monad (liftM, ap)
import Data.Char
Implementation based on ideas in Monadic Parser Combinators paper
/~pszgmh/monparsing.pdf
Implementation based on ideas in Monadic Parser Combinators paper
/~pszgmh/monparsing.pdf
-}
Parser type takes input string and ret... |
a4d63c2e4701adfce825b697c769b4640ce2cbb183b47c5c778bba7c03a1c380 | typeable/octopod | Action.hs | module Frontend.UIKit.Button.Action
( actionButton,
ActionButtonConfig (..),
ActionButtonType (..),
)
where
import Control.Lens
import Data.Default
import Data.Generics.Labels ()
import Data.Text (Text)
import Frontend.Classes
import Frontend.UIKit.Button.Common
import GHC.Generics (Generic)
import Reflex.... | null | https://raw.githubusercontent.com/typeable/octopod/857a4ee74b12cc061a45ca1e033f230cbbccce99/octopod-frontend/src/Frontend/UIKit/Button/Action.hs | haskell | module Frontend.UIKit.Button.Action
( actionButton,
ActionButtonConfig (..),
ActionButtonType (..),
)
where
import Control.Lens
import Data.Default
import Data.Generics.Labels ()
import Data.Text (Text)
import Frontend.Classes
import Frontend.UIKit.Button.Common
import GHC.Generics (Generic)
import Reflex.... | |
3faedea4e27754e438622a8b2bc6ca8d37fe3c0122ad15cc3d3cfcd641ee5861 | pingles/clj-hector | core.clj | (ns clj-hector.test.core
(:import [me.prettyprint.cassandra.serializers StringSerializer])
(:require [clj-hector.serialize :as s]
[clj-hector.time :as t])
(:use [clojure.test]
[clj-hector.test.test-helper]
[clj-hector.test.cassandra-helper :only (with-test-keyspace)]
[clj-hecto... | null | https://raw.githubusercontent.com/pingles/clj-hector/020239c4148b21898a57830ef1696e6ca27a266c/test/clj_hector/test/core.clj | clojure | The pair of UUIDs below were chosen because sorted-map and
point is that clj-hector should return results in the order
count-columns is different to counter columns, it's not | (ns clj-hector.test.core
(:import [me.prettyprint.cassandra.serializers StringSerializer])
(:require [clj-hector.serialize :as s]
[clj-hector.time :as t])
(:use [clojure.test]
[clj-hector.test.test-helper]
[clj-hector.test.cassandra-helper :only (with-test-keyspace)]
[clj-hecto... |
210871837aaaa35abc9c39f22259c3ec2f92212272846e20febebd281f28fcfd | cyverse-archive/DiscoveryEnvironmentBackend | tickets.clj | (ns clj-jargon.tickets
(:use [clj-jargon.validations]
[clj-jargon.init :only [override-user-account proxy-input-stream]]
[clj-jargon.cart :only [temp-password]]
[clj-jargon.item-info :only [file is-dir?]]
[clj-jargon.item-ops :only [input-stream]])
(:require [clojure-commons.file-uti... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/clj-jargon/src/clj_jargon/tickets.clj | clojure | (ns clj-jargon.tickets
(:use [clj-jargon.validations]
[clj-jargon.init :only [override-user-account proxy-input-stream]]
[clj-jargon.cart :only [temp-password]]
[clj-jargon.item-info :only [file is-dir?]]
[clj-jargon.item-ops :only [input-stream]])
(:require [clojure-commons.file-uti... | |
c9873f340c3985f2951f201ff8018bb734a44e5218153097cb1b714fd4711d73 | trchopan/scheduled-blocks | PraosSpec.hs | module Repository.Cardano.Crypto.VRF.PraosSpec
( spec
) where
import Application.CardanoHelpers ( certNatMax )
import Application.CommonHelpers ( bytestringToNatural
, decodeB16OrError
)
imp... | null | https://raw.githubusercontent.com/trchopan/scheduled-blocks/c35de9202cf91fa8301ba9256214753a0e0988f5/test/Repository/Cardano/Crypto/VRF/PraosSpec.hs | haskell | module Repository.Cardano.Crypto.VRF.PraosSpec
( spec
) where
import Application.CardanoHelpers ( certNatMax )
import Application.CommonHelpers ( bytestringToNatural
, decodeB16OrError
)
imp... | |
cb33e3ab27541ecb4d80a80d21a9e56b1e298f9d3ec556c7e76a3d7eca399af4 | gebi/jungerl | wiki_format_txt.erl | -module(wiki_format_txt).
Copyright ( C ) 2000 , Bluetail AB
%% File : wiki_format_txt.erl
Author : ( )
%% Purpose : Wiki formatting engine
%%
%% Rules:
%% Inline annotations:
%% * Bold
'' Italic
%% ''' ... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/wiki/src/wiki_format_txt.erl | erlang | File : wiki_format_txt.erl
Purpose : Wiki formatting engine
Rules:
Inline annotations:
* Bold
''' Code
~[a-zA-Z1-9]+ Wiki link
http://... URL
[ Note
... | -module(wiki_format_txt).
Copyright ( C ) 2000 , Bluetail AB
Author : ( )
'' Italic
Blocks ( denoted by special characters in column 1 ):
{ Preformatted
< Writable region within a
... |
29c82ec52f24bf0339fa891bb641d500c3cee1586580b40a6c606cb0f49b4c3c | monadbobo/ocaml-core | clock.ml | open Core.Std
open Import
open Deferred_std
module Stream = Async_stream
module Event = Clock_event
open Monitor.Exported_for_scheduler
let can_not_abort (d, _event) = d >>| function `Aborted -> assert false | `Happened -> ()
let at_event time = let (d, e) = Event.at time in (e, d)
let at time = can_not_abort (at_... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/async/core/lib/clock.ml | ocaml | We use an extra monitor so we can specially handle errors in [f].
The "raise_rest" part of a prior call to [try_with_raise_rest f] could have
raised an error after having returned ok. We check [saw_error] and don't
proceed if it did.
We check at the last possible moment before runnin... | open Core.Std
open Import
open Deferred_std
module Stream = Async_stream
module Event = Clock_event
open Monitor.Exported_for_scheduler
let can_not_abort (d, _event) = d >>| function `Aborted -> assert false | `Happened -> ()
let at_event time = let (d, e) = Event.at time in (e, d)
let at time = can_not_abort (at_... |
877a6cc69359d3d943bd1a9ad0518300fc1319b6fdef112e829b2b9a6458062a | owlbarn/owl_ode | native_d.ml |
* OWL - OCaml Scientific and Engineering Computing
* OWL - ODE - Ordinary Differential Equation Solvers
*
* Copyright ( c ) 2019 >
* Copyright ( c ) 2019 < >
* OWL - OCaml Scientific and Engineering Computing
* OWL-ODE - Ordinary Differential Equation Solvers
*
* Copyright (c) 2019 Ta-Chu... | null | https://raw.githubusercontent.com/owlbarn/owl_ode/5d934fbff87eea9f060d6c949bf78467024d8791/src/ode/native/native_d.ml | ocaml |
* OWL - OCaml Scientific and Engineering Computing
* OWL - ODE - Ordinary Differential Equation Solvers
*
* Copyright ( c ) 2019 >
* Copyright ( c ) 2019 < >
* OWL - OCaml Scientific and Engineering Computing
* OWL-ODE - Ordinary Differential Equation Solvers
*
* Copyright (c) 2019 Ta-Chu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.