_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 |
|---|---|---|---|---|---|---|---|---|
2d2ba15608475b0da97319e41ad5d0e4bd1a9eee4f7773a6f7668fcec8c5be80 | devaspot/games | okey_desk.erl | %%% -------------------------------------------------------------------
Author : < >
%%% Description : The desk-level logic for okey game.
%%%
Created : Oct 8 , 2012
%%% -------------------------------------------------------------------
%% Parameters:
%% hands - contains tashes of players. A position of an ... | null | https://raw.githubusercontent.com/devaspot/games/a1f7c3169c53d31e56049e90e0094a3f309603ae/apps/server/src/okey/okey_desk.erl | erlang | -------------------------------------------------------------------
Description : The desk-level logic for okey game.
-------------------------------------------------------------------
Parameters:
hands - contains tashes of players. A position of an element in the list
is a seat number of a player. Each... | Author : < >
Created : Oct 8 , 2012
One of the element must contain 15 tashes and all other elements must
contain 14 tashes per each .
Type : [ Hand1 , Hand2 , Hand3 , ] ,
Hand1 = Hand2 = Hand3 = Hand4 = [ tash ( ) ]
gosterge - a tash that indicate a jocker . It m... |
711a453741d2a9d585e706a24361c1376688a42978d53c154c6bfacd11b13964 | the-language/zKanren | stream.rkt | : MicroKanren with Constraints and noto
Copyright ( C ) 2017
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;; (at your option) any ... | null | https://raw.githubusercontent.com/the-language/zKanren/98df0700cb8935d1bde417ccb7f00b0417e00f6b/stream.rkt | racket | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero Gen... | : MicroKanren with Constraints and noto
Copyright ( C ) 2017
it under the terms of the GNU Affero 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 Affero General Public License
#lang racket
(provid... |
635b74721ea1153f5e7bea5dd86dadc6c8341eae230c0279b11fd09eca420f1b | imteekay/functional-programming-learning-path | reverse_a_list.clj | ;; -reverse-a-list/problem
;; last function: returns the last element of a collection
;; count function: returns the length of a collection
take function : returns the first N taken elements of a collection
;; not-empty function: returns true if the collection is not empty. Otherwise, false
(def example-list [19 22 ... | null | https://raw.githubusercontent.com/imteekay/functional-programming-learning-path/07dac09c9fabfa54f8b4d80b62f43b092cb87b0d/programming_challenges/hacker_rank/reverse_a_list/reverse_a_list.clj | clojure | -reverse-a-list/problem
last function: returns the last element of a collection
count function: returns the length of a collection
not-empty function: returns true if the collection is not empty. Otherwise, false
Implementing an anonymous function | take function : returns the first N taken elements of a collection
(def example-list [19 22 3 28 26 17 18 4 28 0])
(defn reverse-a-list
[list]
(loop [original-list list reversed-list []]
(if (not-empty original-list)
(recur (take (dec (count original-list)) original-list) (conj reversed-list (last ori... |
99e024ec7d33f3729c004263d921d2172467a2d0aab4f5fc63631dc8fcfc8d7f | ocharles/hadoom | Hadoom.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Hadoom where
import Control.Exception (finally)
import Co... | null | https://raw.githubusercontent.com/ocharles/hadoom/13d5ea590282cdbbd343fa4a3d9144d7a1bcf9fd/hadoom/Hadoom.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
Shaders can be refreshed during runtime, while the above data is immutable.
------------------------------------------------------------------------------
-----------... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedLists #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Hadoom where
import Control.Exception (finally)
import Control.Lens hiding (indices)
import Control.Monad (forM_, when)
import Control.Monad.IO... |
998e9c437854958bada6985be126501614d98d70f916094a50154d1caac15fd9 | melange-re/melange | bsb_package_specs.ml | Copyright ( C ) 2017 , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later versi... | null | https://raw.githubusercontent.com/melange-re/melange/a4f572e5acb261178e6d8aafac77f1b5eaef213b/mel/bsb_package_specs.ml | ocaml | FIXME: use assoc list instead
This has to be resolved as early as possible, since
the path will be inherited in sub projects
TODO: FIXME: better API without mutating
FIXME: we should adapt it | Copyright ( C ) 2017 , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later versi... |
d1a15f17acbd47c96e145cfba340ba4232bd6d9b0ee84cf7f737e7e7bc1383a0 | futurice/haskell-mega-repo | Data.hs | # LANGUAGE TemplateHaskell #
module Futurice.App.Badge.Data where
import FileEmbedLzma
import Futurice.Prelude
import Prelude ()
tarContents :: LazyByteString
tarContents = $(embedLazyByteString "data.tar")
| null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/badge-app/src/Futurice/App/Badge/Data.hs | haskell | # LANGUAGE TemplateHaskell #
module Futurice.App.Badge.Data where
import FileEmbedLzma
import Futurice.Prelude
import Prelude ()
tarContents :: LazyByteString
tarContents = $(embedLazyByteString "data.tar")
| |
6b112913afc14d2aaa488ad836184b62a073b4c94996bc2d9358d775e60c8085 | racket/htdp | find-tag-test.rkt | #lang racket/base
(require stepper/private/find-tag
racket/gui/base
rackunit
racket/class)
(define (mk-txt str)
(define t (new text%))
(send t insert str)
t)
(define (find-tag/end str)
(find-tag (mk-txt str) (string-length str)))
(check-equal? (find-tag/end "<a>") "a")
(check-equal... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/tests/stepper/find-tag-test.rkt | racket | it isn't clear what the right predicate is when
searching backwards to get thse right but
not also get this one wrong:
"<a x="z"><b>
(check-equal? (find-tag/end "<a y=\"<b>") #f)
(check-equal? (find-tag/end "<a y=\"<b><c>") #f) | #lang racket/base
(require stepper/private/find-tag
racket/gui/base
rackunit
racket/class)
(define (mk-txt str)
(define t (new text%))
(send t insert str)
t)
(define (find-tag/end str)
(find-tag (mk-txt str) (string-length str)))
(check-equal? (find-tag/end "<a>") "a")
(check-equal... |
d20966c1464e7abaaa1c8050694dfea6368f5eeec381e3caee6ad039ddb83530 | jimcrayne/jhc | tc174.hs | # OPTIONS_JHC -funboxed - tuples #
module ShouldCompile where
f x = (# x, x #) :: (# Int, Int #)
| null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/tc174.hs | haskell | # OPTIONS_JHC -funboxed - tuples #
module ShouldCompile where
f x = (# x, x #) :: (# Int, Int #)
| |
cc725e3c4a3bd60a924845f1168822aa562ca230568bf007c851391cc40afc49 | tomahawkins/ecu | ToESB.hs | module Main (main) where
import Data.Bits
import qualified Data.ByteString as BS
import Data.Char
import Data.Digest.CRC32
import Data.List
import Data.Word
import System.Environment
import Text.Printf
help :: IO ()
help = putStrLn $ unlines
[ ""
, " NAME"
, " toesb - converts an s-record ecu image to the E... | null | https://raw.githubusercontent.com/tomahawkins/ecu/7d294eb65de5860b3512c4cfb98e232368145775/src/ToESB.hs | haskell | (addr, byte) | module Main (main) where
import Data.Bits
import qualified Data.ByteString as BS
import Data.Char
import Data.Digest.CRC32
import Data.List
import Data.Word
import System.Environment
import Text.Printf
help :: IO ()
help = putStrLn $ unlines
[ ""
, " NAME"
, " toesb - converts an s-record ecu image to the E... |
6f385dc8ba56d274dfbc4353d019fb234547b47b62b6dacb03220eb43604c9fb | tchoutri/pg-entity | Unsafe.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
|
Module : Database . PostgreSQL.Entity . Internal . Unsafe
Copyright : , 2018
, 2021
, 2021
License : MIT
Maintainer :
Stability : Experimental
... | null | https://raw.githubusercontent.com/tchoutri/pg-entity/3d9a29a181c0aeabb9f70bdb422fd8ceb243e370/src/Database/PostgreSQL/Entity/Internal/Unsafe.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
|
Module : Database . PostgreSQL.Entity . Internal . Unsafe
Copyright : , 2018
, 2021
, 2021
License : MIT
Maintainer :
Stability : Experimental
... | |
e1dffbdfe91e62f3c7cb7a60826084b3cc6b2f946e36913a540fa7b7e9977c9f | fyquah/hardcaml_zprize | modulo_fourfold_pipe.mli | * Computes [ ( 4 * x ) mod p ]
open Hardcaml
val latency : stages:int -> int
val hierarchical
: stages:int
-> p:Z.t
-> scope:Scope.t
-> clock:Signal.t
-> enable:Signal.t
-> Signal.t
-> Signal.t
| null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/field_ops/src/modulo_fourfold_pipe.mli | ocaml | * Computes [ ( 4 * x ) mod p ]
open Hardcaml
val latency : stages:int -> int
val hierarchical
: stages:int
-> p:Z.t
-> scope:Scope.t
-> clock:Signal.t
-> enable:Signal.t
-> Signal.t
-> Signal.t
| |
684e0cf9b0b683ea4bc28629a3c88c7b0bc0afacd5877528e36793be0bc83430 | McParen/croatoan | instr.lisp | (in-package :de.anvi.croatoan)
(defun extract-string (window &key y x position n)
"Extract and return a string from window.
Any attributes are stripped from the characters before the string is returned.
Start at the current cursor position and end at the right margin of window.
If the position coordinates y (row... | null | https://raw.githubusercontent.com/McParen/croatoan/413e8855b78a2e408f90efc38e8485f880691684/src/instr.lisp | lisp | populate the foreign string with chars.
convert the char pointer to a lisp string. | (in-package :de.anvi.croatoan)
(defun extract-string (window &key y x position n)
"Extract and return a string from window.
Any attributes are stripped from the characters before the string is returned.
Start at the current cursor position and end at the right margin of window.
If the position coordinates y (row... |
9ec629c987cff81bd982e79b22761fcf085609f123193019d19c5be1628dadb8 | jaredly/reason-language-server | meta.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/meta.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
external global_data : unit -> Obj.t array = "caml_get_global_data"
external realloc_global_data : int -... |
ae98a8d0a0c7d2ac08c4a263b591b76250bc1bc57c53bef74e9274bcc579ad86 | openmusic-project/openmusic | cl-jack-audio.lisp | ;;===========================================================================
;;JACK API for Common Lisp/CFFI
;;
;;This program is free software; you can redistribute it and/or modify
;;it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation ; either version 2.1 of the L... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/2d3c937a08756c2ce1632d490debc1db69892dfc/OPENMUSIC/code/projects/fluid/jack/cl-jack-audio.lisp | lisp | ===========================================================================
JACK API for Common Lisp/CFFI
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
either version 2.1 of the License , or
(at your option) any later v... | You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
Author :
(in-package :cl-jack)
(defparameter *CL-jack-audio-input-channels* 2)
(defparameter *CL-jack-audio-output-channels* 2)
(defparameter *CL-jack-audio-i... |
fae97b398e0b7be96d9b4d68af564ce43518b171359be0ce5a8c6bffe2445c63 | ghc/testsuite | TH_reifyType2.hs | -- test reification of polymorphic types
module TH_reifyType1
where
import Language.Haskell.TH
type_length :: InfoQ
type_length = reify 'length
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/th/TH_reifyType2.hs | haskell | test reification of polymorphic types |
module TH_reifyType1
where
import Language.Haskell.TH
type_length :: InfoQ
type_length = reify 'length
|
18194602845463254d6b9eb4a81ef3fb891dbce14f7bcf6f2f040c9f60e8ad25 | DavidAlphaFox/ailib | ailib_locker.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2018 ,
%%% @doc
%%% a Locker implementation
%%% @end
Created : 15 Oct 2018 by < >
%%%-------------------------------------------------------------------
-module(ailib_locker).
-behaviour(gen_server).
%% API
-export... | null | https://raw.githubusercontent.com/DavidAlphaFox/ailib/192a225a55ee9a3d6965353184806c2b9598cb30/src/process/ailib_locker.erl | erlang | -------------------------------------------------------------------
@doc
a Locker implementation
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
==============================================... | @author < >
( C ) 2018 ,
Created : 15 Oct 2018 by < >
-module(ailib_locker).
-behaviour(gen_server).
-export([start_link/1,start_link/2]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3, format_status/2]).
-export([new/1,new/2]).
-export([try_lock/1,... |
7d02e519ce9f9781346f8f1aec14f35b9fe394f141f0f57359ab1306e2650a8f | ConsumerDataStandardsAustralia/validation-prototype | Gens.hs | module Data.Text.Gens where
import Data.Text (Text)
import Hedgehog
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
textGen :: (MonadGen m) => m Text
textGen = Gen.text (Range.linear 5 20) Gen.unicode
| null | https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-api-types/tests/Data/Text/Gens.hs | haskell | module Data.Text.Gens where
import Data.Text (Text)
import Hedgehog
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
textGen :: (MonadGen m) => m Text
textGen = Gen.text (Range.linear 5 20) Gen.unicode
| |
5392e9364cca84084d290b29cfa464b17c5651bc313ea9ec7cbd64013d5fa2bb | TyOverby/mono | reversed_list.mli | * [ Reversed_list ] is constructed the same way as a list , but it needs to be reversed
before it can be used . This is helpful when building up a list in reverse order to
force reversal before use .
before it can be used. This is helpful when building up a list in reverse order to
force reversal be... | null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-core_kernel/reversed_list/src/reversed_list.mli | ocaml | * [of_list_rev] reverses the input list. | * [ Reversed_list ] is constructed the same way as a list , but it needs to be reversed
before it can be used . This is helpful when building up a list in reverse order to
force reversal before use .
before it can be used. This is helpful when building up a list in reverse order to
force reversal be... |
e9873b297725d15393ff6c966cc0b2b67f7a3a194823b9c144dd867df8ce64df | Nick-Chapman/niz | value.mli | open Numbers
type t [@@deriving sexp]
val of_int : int -> t
val of_loc : Loc.t -> t
val of_byte : Byte.t -> t
val of_word : Word.t -> t
val of_obj : Obj.t -> t
val not_ : t -> t
val (lor) : t * t -> t
val (land) : t * t -> t
val add : t * t -> t
val sub ... | null | https://raw.githubusercontent.com/Nick-Chapman/niz/603a437ace7c6babcb08648a98c6ace099e99216/lib/value.mli | ocaml | move to eval | open Numbers
type t [@@deriving sexp]
val of_int : int -> t
val of_loc : Loc.t -> t
val of_byte : Byte.t -> t
val of_word : Word.t -> t
val of_obj : Obj.t -> t
val not_ : t -> t
val (lor) : t * t -> t
val (land) : t * t -> t
val add : t * t -> t
val sub ... |
92b5b3078b9a7e2fffa262d071d042f068bb71d67811412d6ea8ab18773662a4 | graninas/Hydra | Model.hs | {-# LANGUAGE DeriveAnyClass #-}
module Labyrinth.KVDB.Model where
import Labyrinth.Prelude
import Labyrinth.Domain
import qualified Hydra.Domain as D
-- labyrinths
-- ( lab_key -> lab_entity_json
-- )
data GameEntity = GameEntity
{ geIdx :: Int
, geLab :: Labyrinth
... | null | https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/app/labyrinth/src/Labyrinth/KVDB/Model.hs | haskell | # LANGUAGE DeriveAnyClass #
labyrinths
( lab_key -> lab_entity_json
) |
module Labyrinth.KVDB.Model where
import Labyrinth.Prelude
import Labyrinth.Domain
import qualified Hydra.Domain as D
data GameEntity = GameEntity
{ geIdx :: Int
, geLab :: Labyrinth
, gePlayerPos :: Pos
, gePlayerHP :: Int
, gePlayerInventory :: ... |
589f1a5f06d98275486a3bcacad012dbc747522250fbd9dad14223a737a15c4e | nokia/web-assembly-self-certifying-compilation-framework | test_type_inference.ml | *
Copyright 2020 Nokia
Licensed under the BSD 3 - Clause License .
SPDX - License - Identifier : BSD-3 - Clause
Copyright 2020 Nokia
Licensed under the BSD 3-Clause License.
SPDX-License-Identifier: BSD-3-Clause
*)
(* Test the type checker implementation *)
open Wasm
open Type_inference
op... | null | https://raw.githubusercontent.com/nokia/web-assembly-self-certifying-compilation-framework/8c31df0bd7d2d94cfbc22089944f5cabb3a61158/src/validator/test/test_type_inference.ml | ocaml | Test the type checker implementation
Expect: ([], [], [F64; F32])
Expected: None | *
Copyright 2020 Nokia
Licensed under the BSD 3 - Clause License .
SPDX - License - Identifier : BSD-3 - Clause
Copyright 2020 Nokia
Licensed under the BSD 3-Clause License.
SPDX-License-Identifier: BSD-3-Clause
*)
open Wasm
open Type_inference
open String_utils
let fty : tvar list - > ... |
0edaa12bab02926a0e35bf11297f2c0349b5eaf2b6218c3f305c55f55b0847bf | GaloisInc/tower | CodeGen.hs | # LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
--
-- Code generation for AADL targets.
--
( c ) 2015 Galois , Inc.
--
module Tower.AADL.CodeGen wher... | null | https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower-aadl/src/Tower/AADL/CodeGen.hs | haskell |
Code generation for AADL targets.
------------------------------------------------------------------------------
monitor module name and monitor module.
Pass in dependency modules
XXX pass in higher up
XXX pass in higher up | # LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
( c ) 2015 Galois , Inc.
module Tower.AADL.CodeGen where
import Prelude ()
import ... |
26f573bf8ca491888539688bbca215c763f63a0ab16dabd486b3651c611a6973 | haskell-rewriting/term-rewriting | CriticalPair.hs | -- This file is part of the 'term-rewriting' library. It is licensed
under an MIT license . See the accompanying ' LICENSE ' file for details .
--
Authors :
Tests for Data . Rewriting . CriticalPair
module CriticalPair where
import Arbitrary
import Samples
import Data.Rewriting.Term (Term (..))
import quali... | null | https://raw.githubusercontent.com/haskell-rewriting/term-rewriting/d01ee419f9fd3c2011d37b6417326a9373d5ee9c/test/CriticalPair.hs | haskell | This file is part of the 'term-rewriting' library. It is licensed
propValidCPs :: [Rule'] -> [Rule'] -> Bool | under an MIT license . See the accompanying ' LICENSE ' file for details .
Authors :
Tests for Data . Rewriting . CriticalPair
module CriticalPair where
import Arbitrary
import Samples
import Data.Rewriting.Term (Term (..))
import qualified Data.Rewriting.Term as Term
import Data.Rewriting.Rule (Rule (..))
... |
0a0334246932ca64c228fb7f93b1e75ee51d89e4aadb5f16e2afb57f493980b4 | quil-lang/cmu-infix | tests.lisp | ;;;; tests/tests.lisp
(in-package #:cmu-infix-tests)
(defun run-tests (&key (headless nil))
"Run all of the unit tests for CMU-INFIX."
(cond
((null headless)
(run-package-tests :package ':cmu-infix-tests
:verbose nil
:describe-failures t
... | null | https://raw.githubusercontent.com/quil-lang/cmu-infix/da62fa3506e26e847239f54d4e58236565d3f259/tests/tests.lisp | lisp | tests/tests.lisp
Note that in strings, we have to slashify \ as \\.
The following now longer gives an eof error, since the close
parenthesis terminates the token.
eof error -- ! eats the close $
Comment character -- must have carriage return after semicolon.
the x coordinate
the y coordinate" :error)
the x coo... |
(in-package #:cmu-infix-tests)
(defun run-tests (&key (headless nil))
"Run all of the unit tests for CMU-INFIX."
(cond
((null headless)
(run-package-tests :package ':cmu-infix-tests
:verbose nil
:describe-failures t
:interactive t))
... |
e0854c1e4e7ea19ac8d7b6119012cb7dd71eed4b04a348eaffa1f3eb8a5027d1 | camlp5/camlp5 | eprinter.mli | (* camlp5r *)
(* eprinter.mli,v *)
Copyright ( c ) INRIA 2007 - 2017
* Extensible printers .
This module allows creation of printers , apply them and clear them .
It is also used by the [ EXTEND_PRINTER ] and [ pprintf ] statements ,
added by the [ pa_extprint.cmo ] parsing kit .
This module ... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/lib/eprinter.mli | ocaml | camlp5r
eprinter.mli,v
* Printer type, to print values of type "'a".
* Applies a printer, returning the printed string of the parameter.
* Applies a printer at some specific level. Raises [Failure] if the
given level does not exist.
* Clears a printer, removing all its levels and rules.
* Print printer p... | Copyright ( c ) INRIA 2007 - 2017
* Extensible printers .
This module allows creation of printers , apply them and clear them .
It is also used by the [ EXTEND_PRINTER ] and [ pprintf ] statements ,
added by the [ pa_extprint.cmo ] parsing kit .
This module allows creation of printers, apply ... |
8efe0eb7122ccb48dca7909a188995ab6d9d3f9ef1375debd9a5aef5ce77d537 | facebookarchive/pfff | test_parsing_nw.ml | open Common
module Ast = Ast_nw
module Flag = Flag_parsing_nw
(*****************************************************************************)
(* Subsystem testing *)
(*****************************************************************************)
let test_tokens_nw file =
if not (file =~ ".*\\.nw")
then pr2 "wa... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_nw/parsing/test_parsing_nw.ml | ocaml | ***************************************************************************
Subsystem testing
***************************************************************************
***************************************************************************
Unit tests
***********************************************************... | open Common
module Ast = Ast_nw
module Flag = Flag_parsing_nw
let test_tokens_nw file =
if not (file =~ ".*\\.nw")
then pr2 "warning: seems not a noweb file";
Flag.verbose_lexing := true;
Flag.verbose_parsing := true;
let toks = Parse_nw.tokens file in
toks +> List.iter (fun x -> pr2_gen x);
()
... |
e1df4b196dbb4845e755714beb9618ede0f2424f8c7c7f541d83cca81f8e381f | McParen/croatoan | tetris.lisp | (in-package :de.anvi.croatoan.test)
(defun tetris ()
(let ((scr (make-instance 'screen :input-echoing nil :input-blocking nil :enable-function-keys t :cursor-visible nil)))
(unwind-protect
(let* ((board (make-array '(20 10) :initial-element nil))
(pieces
'((((0 0) (0 1) (0 2) (1 1)) ((... | null | https://raw.githubusercontent.com/McParen/croatoan/6097307666f22efc374122e450908ba93ccd7a80/test/tetris.lisp | lisp | T
L
J
S
Z
O
I
check whether we left the board.
check whether the piece coordinates are non-nil on the board.
add piece to board.
first, draw the board
add coord of position to every coord of piece
then draw the piece
down #c(-1 0), left #c(-1 0), right #c(1 0)
when sideways move not permissible: do nothing.
wh... | (in-package :de.anvi.croatoan.test)
(defun tetris ()
(let ((scr (make-instance 'screen :input-echoing nil :input-blocking nil :enable-function-keys t :cursor-visible nil)))
(unwind-protect
(let* ((board (make-array '(20 10) :initial-element nil))
(pieces
(position '(0 ... |
5d81c98f6dac33bc8fe660f954477d02e4a5e70afa430d1814ce89b7fea68271 | lspitzner/exference | Types.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE PatternGuards #
# LANGUAGE MonadComprehensions #
# LANGUAGE GeneralizedNewtypeDeriving #
module Language.Haskell.Exference.Core.Types
( TVarId
, QualifiedName(..)
, HsType (..)
, HsTypeOffset (..)
, Subst (..)
, Substs
, HsTypeClass (... | null | https://raw.githubusercontent.com/lspitzner/exference/d8a336f8b9df905e54173339f78ba892daa3f688/src/Language/Haskell/Exference/Core/Types.hs | haskell | # UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
instance Read HsType where
readsPrec _ = maybeToList . parseType
uses f to find new elements. adds these new elements, and recursively
tried to find even more elements. will not terminate if there are cycles
in the application of f
returns if any change was necessary,... | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE PatternGuards #
# LANGUAGE MonadComprehensions #
# LANGUAGE GeneralizedNewtypeDeriving #
module Language.Haskell.Exference.Core.Types
( TVarId
, QualifiedName(..)
, HsType (..)
, HsTypeOffset (..)
, Subst (..)
, Substs
, HsTypeClass (... |
01d33bc8f17a6b9bea94e73f6534bcaa474a6f21eff42687f726cc9f7c5d6c12 | ashinn/chibi-scheme | 41.scm |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
primitive layer adapted from SRFI 41 reference impl
(define-record-type Stream
(make-stream promise)
stream?
(promise stream-promise))
(define-record-type Stream-null
(make-stream-null)
%stream-null?)
(define-record-type Stream-pai... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/srfi/41.scm | scheme |
derived
Local variables:
End: |
primitive layer adapted from SRFI 41 reference impl
(define-record-type Stream
(make-stream promise)
stream?
(promise stream-promise))
(define-record-type Stream-null
(make-stream-null)
%stream-null?)
(define-record-type Stream-pair
(make-stream-pair head tail)
%stream-pair?
(head %stream-car)
(... |
ae6845a85fb2322c1f008b1467248c530b4f2dd8076d7fbc8fb09c8b3f490392 | picty/parsifal | struct-12.ml | struct s [dump_param n] = {
x : uint8;
y : custom(DUMP n);
}
| null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/syntax/unit/struct-12.ml | ocaml | struct s [dump_param n] = {
x : uint8;
y : custom(DUMP n);
}
| |
9e7b72856fade5443beef81235442dafa26c5b072aef8dbf6aaac8af369e25f6 | silky/quipper | Example3.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
import Quipper
example1 :: (Qubit,Qubit,Qubit,Qu... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/tests/Example3.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
====================================================================== | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
import Quipper
example1 :: (Qubit,Qubit,Qubit,Qubit) -> Circ (Qubit,Qubit,Qubit,Qubit)
example1 (q, a, b, c) = do
hadamard a
qnot_at c `controlled` [a, b]
hadamard q `controlled` [c]
qnot_at c `controlled` [a, b]
hadamar... |
b2f690eca4d647f989a5b75f818141761d2c405d6fe9cf95c9252edbc184b6e6 | 1HaskellADay/1HAD | Solution.hs | module HAD.Y2014.M04.D04.Solution where
import Data.List (nub)
-- | countFigures count the different figures that composes a number
--
-- Examples:
--
> > > countFigures 1
1
> > > countFigures 1000000
2
> > > countFigures 123
3
> > > ( -12 )
2
> > > countFigures 1234567890
10
> > > countFigures... | null | https://raw.githubusercontent.com/1HaskellADay/1HAD/3b3f9b7448744f9b788034f3aca2d5050d1a5c73/exercises/HAD/Y2014/M04/D04/Solution.hs | haskell | | countFigures count the different figures that composes a number
Examples:
>>> countFigures 0
lazy version | module HAD.Y2014.M04.D04.Solution where
import Data.List (nub)
> > > countFigures 1
1
> > > countFigures 1000000
2
> > > countFigures 123
3
> > > ( -12 )
2
> > > countFigures 1234567890
10
> > > countFigures 00001
1
1
countFigures :: Integral a => a -> Int
countFigures =
max 1 . length . ... |
86fe1715d2be7ca134749e00cee88957bd60618d80629ae6093bc0a6a3f496d4 | vasilisp/inez | id.mli | type (_, _) t
val compare :
('c -> 'c -> int) -> ('u -> 'u -> int) ->
('c, 'u) t -> ('c, 'u) t -> int
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> ('b -> Sexplib.Sexp.t) ->
('a, 'b) t -> Sexplib.Sexp.t
val type_of_t : ('c, 'u) t -> 'u Type.t
val is_int : ('c, 'u) t -> bool
val is_bool : ('c, 'u) t -> bool
ty... | null | https://raw.githubusercontent.com/vasilisp/inez/3bbbbb82a12918c1557f5fb0b49a8c73ab8d6da1/frontend/id.mli | ocaml | type (_, _) t
val compare :
('c -> 'c -> int) -> ('u -> 'u -> int) ->
('c, 'u) t -> ('c, 'u) t -> int
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> ('b -> Sexplib.Sexp.t) ->
('a, 'b) t -> Sexplib.Sexp.t
val type_of_t : ('c, 'u) t -> 'u Type.t
val is_int : ('c, 'u) t -> bool
val is_bool : ('c, 'u) t -> bool
ty... | |
bde0dee0fb8dab165a1b12b935cf0e92dcf26c65c1941f7744aec1af0260c7f3 | callum-oakley/advent-of-code | 24.clj | (ns aoc.2022.24
(:require
[aoc.grid :as grid :refer [north east south west]]
[aoc.vector :refer [+v]]
[aoc.search :as search]
[clojure.math.numeric-tower :refer [lcm]]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(let [g (grid/parse s)
[[_ h] [_ w]] (grid/box (keys g))]
[(dec h) ... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/52483f59b67e022c11faaa0c6e515cb2fa1613ef/src/aoc/2022/24.clj | clojure | possible to wait for favourable wind conditions so there's never any
advantage to doing a leg more slowly than possible. | (ns aoc.2022.24
(:require
[aoc.grid :as grid :refer [north east south west]]
[aoc.vector :refer [+v]]
[aoc.search :as search]
[clojure.math.numeric-tower :refer [lcm]]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(let [g (grid/parse s)
[[_ h] [_ w]] (grid/box (keys g))]
[(dec h) ... |
5435999ad7c16a785bd39ba5a0c112bbcaa2924190bac9640f8b1530cc3c426a | GaloisInc/cryptol | Unify.hs | -- |
Module : Cryptol . . Unify
Copyright : ( c ) 2013 - 2016 Galois , Inc.
-- License : BSD3
-- Maintainer :
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE Safe #-}
# LANGUAGE PatternGuards , ViewPatterns #
# LANGUAGE DeriveFunctor , DeriveGeneric , DeriveAnyClass #
# ... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/8cca24568ad499f06032c2e4eaa7dfd4c542efb6/src/Cryptol/TypeCheck/Unify.hs | haskell | |
License : BSD3
Maintainer :
Stability : provisional
Portability : portable
# LANGUAGE Safe #
| The most general unifier is a substitution and a set of constraints
on bound variables.
XXX: here we loose the information about where the constarint came from
XXX: could pass the path to the lists them... | Module : Cryptol . . Unify
Copyright : ( c ) 2013 - 2016 Galois , Inc.
# LANGUAGE PatternGuards , ViewPatterns #
# LANGUAGE DeriveFunctor , DeriveGeneric , DeriveAnyClass #
# , OverloadedStrings #
module Cryptol.TypeCheck.Unify where
import Control.DeepSeq(NFData)
import GHC.Generics(Generic)
imp... |
4b332d7d253872f696cf657b4cf4c429e0a03a0de34ef34a123131d1fe05c396 | RolfRolles/PandemicML | X86DecodeUtil.ml | open X86
(* Random utility functions useful in manipulating encoded x86 *)
(* int -> x86operand functions *)
let reg32_of_int = function
| 0 -> Eax
| 1 -> Ecx
| 2 -> Edx
| 3 -> Ebx
| 4 -> Esp
| 5 -> Ebp
| 6 -> Esi
| 7 -> Edi
| x -> failwith ("reg32_of_int "^string_of_int x)
let reg16_of_int = function
| 0 -> Ax
| 1 ... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/X86/X86DecodeUtil.ml | ocaml | Random utility functions useful in manipulating encoded x86
int -> x86operand functions | open X86
let reg32_of_int = function
| 0 -> Eax
| 1 -> Ecx
| 2 -> Edx
| 3 -> Ebx
| 4 -> Esp
| 5 -> Ebp
| 6 -> Esi
| 7 -> Edi
| x -> failwith ("reg32_of_int "^string_of_int x)
let reg16_of_int = function
| 0 -> Ax
| 1 -> Cx
| 2 -> Dx
| 3 -> Bx
| 4 -> Sp
| 5 -> Bp
| 6 -> Si
| 7 -> Di
| x -> failwith ("reg16_of_int "^s... |
fb1835fec4bee4d0771eb9bdcd92ea656faa2e4fc560799066769add5194c844 | jeapostrophe/struct-define | info.rkt | #lang info
(define collection "struct-define")
(define deps '("base"))
(define build-deps '("racket-doc"
"rackunit-lib"
"sandbox-lib"
"scribble-lib"))
(define version "0.1")
(define pkg-authors '(jeapostrophe))
(define scribblings '(("struct-define.scrbl" (... | null | https://raw.githubusercontent.com/jeapostrophe/struct-define/a07a78d5d05b6d3aa393d93495e8c29625b05bf5/info.rkt | racket | #lang info
(define collection "struct-define")
(define deps '("base"))
(define build-deps '("racket-doc"
"rackunit-lib"
"sandbox-lib"
"scribble-lib"))
(define version "0.1")
(define pkg-authors '(jeapostrophe))
(define scribblings '(("struct-define.scrbl" (... | |
99263857b6832c2ae82678aa939bcbeaa0664452d0fb72648ac818c6660986cc | freckle/yesod-auth-oauth2 | ErrorResponse.hs | {-# LANGUAGE OverloadedStrings #-}
-- | OAuth callback error response
--
< >
--
module Yesod.Auth.OAuth2.ErrorResponse
( ErrorResponse(..)
, erUserMessage
, ErrorName(..)
, onErrorResponse
, unknownError
)
where
import Data.Foldable (traverse_)
import Data.Text (Text)
import Data.Traversable... | null | https://raw.githubusercontent.com/freckle/yesod-auth-oauth2/709805e8ee015e7ac80180287eb944f22c8a6a05/src/Yesod/Auth/OAuth2/ErrorResponse.hs | haskell | # LANGUAGE OverloadedStrings #
| OAuth callback error response
| Textual value suitable for display to a User
| Check query parameters for an error, if found run the given action
The action is expected to use a short-circuit response function like
| < >
module Yesod.Auth.OAuth2.ErrorResponse
( ErrorResponse(..)
, erUserMessage
, ErrorName(..)
, onErrorResponse
, unknownError
)
where
import Data.Foldable (traverse_)
import Data.Text (Text)
import Data.Traversable (for)
import Yesod.Core (MonadHandler, lookupGetParam)
data ErrorName
... |
93f113498822688478d1145d4ed2d43ae7f070ff34d2380942e73146e4f952c4 | hjcapple/reading-sicp | newton_sqrt.scm | #lang racket
;; P15 - [1.1.7 实例: 采用牛顿法求平方根]
(define (average x y)
(/ (+ x y) 2))
(define (abs x)
(cond ((< x 0) (- x))
(else x)))
(define (square x) (* x x))
(define (sqrt-iter guess x)
(if (good-enough? guess x)
guess
(sqrt-iter (improve guess x) x)))
(define (improve guess x)
(avera... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_1/newton_sqrt.scm | scheme | P15 - [1.1.7 实例: 采用牛顿法求平方根]
| #lang racket
(define (average x y)
(/ (+ x y) 2))
(define (abs x)
(cond ((< x 0) (- x))
(else x)))
(define (square x) (* x x))
(define (sqrt-iter guess x)
(if (good-enough? guess x)
guess
(sqrt-iter (improve guess x) x)))
(define (improve guess x)
(average guess (/ x guess)))
(define... |
723055a70a9e723d9639c0ab0ebb3bbfcde5f3f81b8a31d5a0a92cd353b3be10 | ocharles/blog | 2014-06-10-reversible-serialization.hs | # LANGUAGE DataKinds , GADTs , KindSignatures , TypeOperators , ConstraintKinds , TypeFamilies , StandaloneDeriving , UndecidableInstances , FunctionalDependencies , RankNTypes , TemplateHaskell , FlexibleInstances #
import Prelude hiding ((.), id)
import Control.Lens
import Control.Lens.TH
import GHC.Exts
import Cont... | null | https://raw.githubusercontent.com/ocharles/blog/fa8e911d3c03b134eee891d187a1bb574f23a530/code/2014-06-10-reversible-serialization.hs | haskell | ------------------------------------------------------------------------------
string = (get, put)
------------------------------------------------------------------------------
pString2 = Serializing $ \(a, b) -> do put a; return b
putTwoStrings = pString1 . pString2
------------------------------------------------... | # LANGUAGE DataKinds , GADTs , KindSignatures , TypeOperators , ConstraintKinds , TypeFamilies , StandaloneDeriving , UndecidableInstances , FunctionalDependencies , RankNTypes , TemplateHaskell , FlexibleInstances #
import Prelude hiding ((.), id)
import Control.Lens
import Control.Lens.TH
import GHC.Exts
import Cont... |
843b346b2893999ce69cfcf33a6abc6c9c3435a9b3b05fadc38c99f9909aa690 | qkrgud55/ocamlmulti | listLabels.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/stdlib_r/listLabels.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
$ I d : listLabels.mli 12212 2012 - 0... |
2a32df47e7868a9fd6a4da172e97d71dcd2ef89c72e8cbc07576903fe9f5a0cc | flipstone/haskell-for-beginners | 4_error_error_on_the_wall.hs | import Control.Monad.Error
-- Rebuild the Bomb defusing example from
Chapter 12 , but when the Bomb explodes ,
-- provide a taunting message from the
-- villain for the hero to see before his
-- gruesome end.
--
type Bomb = [Wire]
type Defusing a = Either String a
data Wire = Red | Blue | Green deriving (Show, Eq)
... | null | https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/answers/chapter_13/4_error_error_on_the_wall.hs | haskell | Rebuild the Bomb defusing example from
provide a taunting message from the
villain for the hero to see before his
gruesome end.
Quick, disarm the Bomb! (Be sure sure to use
Now see what happens if you accidentally cut the Blue
All good Bombs are equipped with a dead man switch to
protect their creators. Defi... | import Control.Monad.Error
Chapter 12 , but when the Bomb explodes ,
type Bomb = [Wire]
type Defusing a = Either String a
data Wire = Red | Blue | Green deriving (Show, Eq)
cutWire :: Wire -> Bomb -> Defusing Bomb
cutWire _ [] = Left "Looks like you should've stopped while you were ahead!"
cutWire cut (w:ws)
| cut... |
3bedcd1deb169dd67c9b9c86265174739120750d81cd5c3c0ee8bf772adcbcac | fare/lisp-interface-library | list.lisp | (defpackage :lil/interface/monad/test/monad/transformer/list
(:use :cl
:lil/interface/base
:lil/interface/monad
:lil/interface/monad/list
:lil/interface/monad/transformer/list
:lil/interface/monad/transformer
:lil/interface/monad/test/monad
:lil/interface/monad/... | null | https://raw.githubusercontent.com/fare/lisp-interface-library/ac2e0063dc65feb805f0c57715d52fda28d4dcd8/interface/monad/test/monad/transformer/list.lisp | lisp | (defpackage :lil/interface/monad/test/monad/transformer/list
(:use :cl
:lil/interface/base
:lil/interface/monad
:lil/interface/monad/list
:lil/interface/monad/transformer/list
:lil/interface/monad/transformer
:lil/interface/monad/test/monad
:lil/interface/monad/... | |
e6470dbaf00a9c1e6d46dffced77d1af3539884b5d6c3a349d3be40af7ebd34b | returntocorp/semgrep | Parse_info.mli | TODO : This module should be renamed to Tok.ml and maybe split with a Loc.ml
* and maybe a ?
* and maybe a Parsing_error.ml ?
*)
(*****************************************************************************)
(* Tokens *)
(*****************************************************************************)
( '... | null | https://raw.githubusercontent.com/returntocorp/semgrep/bd5f0a47efc42b16f2772514eb4fb83676a3e3be/libs/lib_parsing/Parse_info.mli | ocaml | ***************************************************************************
Tokens
***************************************************************************
to report errors, regular position information
the content of the "token"
byte position, 0-based
0-based
to deal with expanded tokens, e.g. preprocess... | TODO : This module should be renamed to Tok.ml and maybe split with a Loc.ml
* and maybe a ?
* and maybe a Parsing_error.ml ?
*)
( ' token_location ' < ' token_origin ' < ' ' ) * token_kind
type token_location = {
1 - based
file : Common.filename;
}
[@@deriving show, eq]
see also type = { l : in... |
70d472053fc696008603b5c4bbd35766054f0bec7d84612f0d2ff948c265d93c | xapi-project/xen-api | redo_log.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/48cc1489fff0e344246ecf19fc1ebed6f09c7471/ocaml/database/redo_log.ml | ocaml | ---------------------------------------
Make sure we have plenty of room for the database
----------------------------------------------------
Encapsulate the state of a single redo_log instance.
Keep a store of all redo_logs - this will make it easy to write to all the active ones.
-------------------------... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... |
36ac95f0faeae185f5d7916246cbd8d33cfb0302dfd2aaf5fd477e0100ef25db | lem-project/lem | prompt.lisp | (defpackage :lem-tests/prompt
(:use :cl :rove)
(:import-from :lem-fake-interface
:fake-interface
:with-fake-interface))
(in-package :lem-tests/prompt)
(deftest prompt-for-character
(with-fake-interface ()
(lem:unread-key (lem:make-key :sym "a"))
(ok (equal #\a
... | null | https://raw.githubusercontent.com/lem-project/lem/962b32b7576e1952adf782245c9583539a0a1705/tests/prompt.lisp | lisp | (defpackage :lem-tests/prompt
(:use :cl :rove)
(:import-from :lem-fake-interface
:fake-interface
:with-fake-interface))
(in-package :lem-tests/prompt)
(deftest prompt-for-character
(with-fake-interface ()
(lem:unread-key (lem:make-key :sym "a"))
(ok (equal #\a
... | |
de20be066ec8a80c82a2f0e12c15c32515c346cad63cf689cbd7e7dff8d77fe2 | Clojure2D/clojure2d-examples | hittable_list.clj | (ns rt4.the-next-week.ch05c.hittable-list
(:require [rt4.the-next-week.ch05c.interval :as interval]
[rt4.the-next-week.ch05c.hittable :as hittable]
[rt4.the-next-week.ch05c.aabb :as aabb]))
(defprotocol HittableListProto
(add [hittable-list object]))
(defrecord HittableList [objects bbox]
... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch05c/hittable_list.clj | clojure | (ns rt4.the-next-week.ch05c.hittable-list
(:require [rt4.the-next-week.ch05c.interval :as interval]
[rt4.the-next-week.ch05c.hittable :as hittable]
[rt4.the-next-week.ch05c.aabb :as aabb]))
(defprotocol HittableListProto
(add [hittable-list object]))
(defrecord HittableList [objects bbox]
... | |
0a239252ee8e91a9ec75055ce9922b7a60d5ede60daa8eb8b484ae942214ab00 | open-company/open-company-storage | activity.clj | (ns oc.storage.urls.activity
(:require [oc.storage.urls.org :as org-urls]
[oc.storage.urls.label :as label-urls]
[cuerdas.core :as string]))
(def allowed-parameter-keys [:start :direction :following :unfollowing :refresh])
(defn parametrize [url parameters-dict]
(let [concat? (#{"?"... | null | https://raw.githubusercontent.com/open-company/open-company-storage/9f084d8de3d889372a11c418d25206c8d55e768c/src/oc/storage/urls/activity.clj | clojure | Urls
url | (ns oc.storage.urls.activity
(:require [oc.storage.urls.org :as org-urls]
[oc.storage.urls.label :as label-urls]
[cuerdas.core :as string]))
(def allowed-parameter-keys [:start :direction :following :unfollowing :refresh])
(defn parametrize [url parameters-dict]
(let [concat? (#{"?"... |
2a903845213fc228fc03eb047c0ccd5cd2b29a22c3f1bfeb31fba80a1b1ed049 | d-cent/objective8 | admin_actions.clj | (ns objective8.integration.front-end.admin-actions
(:require [midje.sweet :refer :all]
[peridot.core :as p]
[oauth.client :as oauth]
[objective8.front-end.api.http :as http-api]
[objective8.config :as config]
[objective8.utils :as utils]
[objecti... | null | https://raw.githubusercontent.com/d-cent/objective8/db8344ba4425ca0b38a31c99a3b282d7c8ddaef0/test/objective8/integration/front_end/admin_actions.clj | clojure | (ns objective8.integration.front-end.admin-actions
(:require [midje.sweet :refer :all]
[peridot.core :as p]
[oauth.client :as oauth]
[objective8.front-end.api.http :as http-api]
[objective8.config :as config]
[objective8.utils :as utils]
[objecti... | |
0b5c2d3394ee410532a9db9baa86fb5a5b9f79493137e07df6029fc2d790e7d8 | ayberkt/abt | operator.ml | module type OPERATOR = sig
type t
val arity : t -> int list
val equal : t * t -> bool
end
| null | https://raw.githubusercontent.com/ayberkt/abt/18b2133c0fd9f143fdae7d29080b709f2d7842a8/src/operator.ml | ocaml | module type OPERATOR = sig
type t
val arity : t -> int list
val equal : t * t -> bool
end
| |
dcb976a7c1f683eb8c2778647d178ff2f16ffadcf858c1d3eb6b02a7263a8742 | Failproofshark/cl-sdl2-ttf | general.lisp | (in-package :sdl2-ttf)
(require 'sdl2)
(defvar *fonts* (list) "List of weak refs to fonts.")
(defun init ()
"Initialize the sdl trutype font API. Does not require a call to sdl-init prior to calling this function. Returns 0 if succesful -1 otherwise"
(check-rc (ttf-init)))
(defun linked-version ()
"Returns th... | null | https://raw.githubusercontent.com/Failproofshark/cl-sdl2-ttf/ff2821a2787cb527ca643a0dbca6ab2171ce141d/src/general.lisp | lisp | (in-package :sdl2-ttf)
(require 'sdl2)
(defvar *fonts* (list) "List of weak refs to fonts.")
(defun init ()
"Initialize the sdl trutype font API. Does not require a call to sdl-init prior to calling this function. Returns 0 if succesful -1 otherwise"
(check-rc (ttf-init)))
(defun linked-version ()
"Returns th... | |
4ade4a4f79aac07e70d9db5c1c9e17c688d6890c8b8ee814bb20def89d23f42d | typedclojure/typedclojure | nilsafe_utils.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/1b3c9ef6786a792ae991c438ea8dca31175aa4a7/typed/clj.checker/src/typed/cljc/checker/nilsafe_utils.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns ^:no-doc typed.cljc.checker.nilsafe-utils
(:require [clojure.set :as set]
[typed.clojure :as t]))
(t/ann ^:no-check set-union
(t/All [x]
(t/IFn [-> (t/Set x)]
[(t/U nil (t/Set x)) -> (t/Set x)]
... |
0ecddd001068fc00283a86777e162d67a9e3a80ce55fb4322594f38e159eee0a | haskellari/lukko | HandleToFD.hs | {-# LANGUAGE CPP #-}
# LANGUAGE Trustworthy #
module Lukko.Internal.HandleToFD (ghcHandleToFd) where
import qualified GHC.IO.FD as GHC (FD (..))
import System.IO (Handle)
#if MIN_VERSION_base(4,10,0)
import qualified GHC.IO.Handle.FD as GHC (handleToFd)
#else
import Control.Concurrent.MVar (readMVar... | null | https://raw.githubusercontent.com/haskellari/lukko/623a257210637b01e928090dccee88410d0b8e90/src/Lukko/Internal/HandleToFD.hs | haskell | # LANGUAGE CPP # | # LANGUAGE Trustworthy #
module Lukko.Internal.HandleToFD (ghcHandleToFd) where
import qualified GHC.IO.FD as GHC (FD (..))
import System.IO (Handle)
#if MIN_VERSION_base(4,10,0)
import qualified GHC.IO.Handle.FD as GHC (handleToFd)
#else
import Control.Concurrent.MVar (readMVar)
import Data.Typeable ... |
aa88cbc1b3f1fa8aa6f39e4d2b25f3615b16889fa96392c4066f0e88797f9c1f | alanz/ghc-exactprint | T10819.hs | # LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
module T10819 where
import T10819_Lib
import Language.Haskell.TH.Syntax
class C a b | b -> a where
f :: b -> a
data D = X
instance C Int D where
f X = 2
$(doSomeTH "N" (... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/T10819.hs | haskell | # LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
module T10819 where
import T10819_Lib
import Language.Haskell.TH.Syntax
class C a b | b -> a where
f :: b -> a
data D = X
instance C Int D where
f X = 2
$(doSomeTH "N" (... | |
f7987b05f01ba16fea796ca765dd0d77c6e2f4a616ea246b78142ef43ace74d8 | yrashk/erlang | wxListCtrl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/wx/src/gen/wxListCtrl.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxListCtrl).
-include("wxe.hrl").... |
b0857575bf5a9e74e0576913bdfb97861bdbb4b402be2d8cd592dfaf40653bd5 | fendor/hsimport | SymbolTest7.hs | module Test where
import Foo.Bar
import Foo.Bar.Blub
import Ugah.Argh
import qualified Control.Monad as M
import Control.Monad (unless)
f :: Int -> Int
f = (+ 3)
| null | https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/goldenFiles/SymbolTest7.hs | haskell | module Test where
import Foo.Bar
import Foo.Bar.Blub
import Ugah.Argh
import qualified Control.Monad as M
import Control.Monad (unless)
f :: Int -> Int
f = (+ 3)
| |
719e44c81f4023374653dee8a0f38ea3f266f9eea2ade3edadcdc38e8052e416 | yankov/memobot | lists.clj | (ns memobot.lists
(:use [memobot types]
[clojure.data.finger-tree]))
(defn lindex-cmd
"Get an element from a list by its index"
[k i]
(nth k i 0))
(defn lpush-cmd
"Prepend one or multiple values to a list"
[k v]
(consl k v))
(defn lpushx-cmd
"Prepend one or multiple values to a list"
[k v]... | null | https://raw.githubusercontent.com/yankov/memobot/9498f02d1f32c3133c67581f31e959557e05048f/src/memobot/lists.clj | clojure | (ns memobot.lists
(:use [memobot types]
[clojure.data.finger-tree]))
(defn lindex-cmd
"Get an element from a list by its index"
[k i]
(nth k i 0))
(defn lpush-cmd
"Prepend one or multiple values to a list"
[k v]
(consl k v))
(defn lpushx-cmd
"Prepend one or multiple values to a list"
[k v]... | |
e3411f507878772a6d7d16da000695a144cbb6ffb11200c510336915d9f8e5fb | janestreet/async_websocket | content_reassembler.mli | open Core
* [ Content_reassembler ] can process fragmented content from websocket frames and
reassemble fragmented content into a contiguous buffer .
It maintains an internal buffer which is reused to avoid ( most of the time ) .
The internal buffer doubles in size whenever needed to avoid quadrati... | null | https://raw.githubusercontent.com/janestreet/async_websocket/4300992c15f5cbc7b6eac64a04b74ffec7009593/src/content_reassembler.mli | ocaml | * [content_handler] is called when text, binary, or non-control content is
completed. If the content was fragmented, [content_handler] is only
called on the final frame, when the full, unfragmented contents has been
collected.
* [ping_handler] is called whenever a ping message is received. Since ping... | open Core
* [ Content_reassembler ] can process fragmented content from websocket frames and
reassemble fragmented content into a contiguous buffer .
It maintains an internal buffer which is reused to avoid ( most of the time ) .
The internal buffer doubles in size whenever needed to avoid quadrati... |
83909fe0287d18769c26084f0fe41d3c74b09bdde51b5eb70ab5cd0f3f829f78 | namenu/tfjs-cljs | layers.cljs | (ns tfjs-cljs.layers
(:refer-clojure :exclude [flatten])
(:require [cljsjs.tfjs]))
;; Basic
(defn activation
"Applies an activation function to an output."
[activation-fn]
(.activation js/tf.layers (clj->js {:activation activation-fn})))
(defn dense
"Creates a dense (fully connected) layer."
[config]
... | null | https://raw.githubusercontent.com/namenu/tfjs-cljs/24d1b22c0be58c38d723dafad9734283d526564d/src/tfjs_cljs/layers.cljs | clojure | Basic
Convolutional
Normalization
Recurrent
Wrapper | (ns tfjs-cljs.layers
(:refer-clojure :exclude [flatten])
(:require [cljsjs.tfjs]))
(defn activation
"Applies an activation function to an output."
[activation-fn]
(.activation js/tf.layers (clj->js {:activation activation-fn})))
(defn dense
"Creates a dense (fully connected) layer."
[config]
(.dense... |
918b41002053933abed512657a3691b81bf9853576829ac7edf975f0948d768e | johnyob/dromedary | parsetree.ml | (*****************************************************************************)
(* *)
Dromedary
(* *)
... | null | https://raw.githubusercontent.com/johnyob/dromedary/18391e5d56b3442f4a44af5dd73e5e5e1e15eb6b/src/parsing/parsetree.ml | ocaml | ***************************************************************************
... | Dromedary
, University of Cambridge
Copyright 2021 .
All rights reserved . This file is distributed under the terms of the MIT
open Core
open Ast_types
open Util.Pre... |
d5ff0ec8453c8e991068df083af0d1656be9fa57db8e41421bfd6efde8e4639b | tsloughter/kuberl | kuberl_extensions_v1beta1_api.erl | -module(kuberl_extensions_v1beta1_api).
-export([create_namespaced_daemon_set/3, create_namespaced_daemon_set/4,
create_namespaced_deployment/3, create_namespaced_deployment/4,
create_namespaced_deployment_rollback/4, create_namespaced_deployment_rollback/5,
create_namespaced_ingress/3, crea... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_extensions_v1beta1_api.erl | erlang | @doc
@doc
create a Deployment
@doc
create rollback of a Deployment
@doc
create an Ingress
@doc
create a NetworkPolicy
@doc
@doc
create a PodSecurityPolicy
@doc
@doc
delete collection of Deployment
@doc
delete collection of Ingress
@doc
delete collection of NetworkPolicy
@doc
@doc
dele... | -module(kuberl_extensions_v1beta1_api).
-export([create_namespaced_daemon_set/3, create_namespaced_daemon_set/4,
create_namespaced_deployment/3, create_namespaced_deployment/4,
create_namespaced_deployment_rollback/4, create_namespaced_deployment_rollback/5,
create_namespaced_ingress/3, crea... |
98d0a00808988f86e8bc5a2782db4788e6579d8a48f3a129276230a9c7078715 | rd--/hsc3 | bufWr.help.hs | -- bufWr
let b = localBufId 'α' 1 (sampleRate * 2)
o = sinOsc ar (lfNoise1Id 'β' kr 2 * 300 + 400) 0 * 0.1
ph z = phasor ar 0 (bufRateScale kr b * z) 0 (bufFrames kr b) 0
w = bufWr b (ph (mouseX kr 0.25 1 Linear 0.2)) Loop o
r = bufRdL 1 ar b (ph (mouseY kr 0.25 16 Linear 0.2)) Loop
in mrg2 r w
-- bufW... | null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/bufWr.help.hs | haskell | bufWr
bufWr
-- ; set read & write rates independently | let b = localBufId 'α' 1 (sampleRate * 2)
o = sinOsc ar (lfNoise1Id 'β' kr 2 * 300 + 400) 0 * 0.1
ph z = phasor ar 0 (bufRateScale kr b * z) 0 (bufFrames kr b) 0
w = bufWr b (ph (mouseX kr 0.25 1 Linear 0.2)) Loop o
r = bufRdL 1 ar b (ph (mouseY kr 0.25 16 Linear 0.2)) Loop
in mrg2 r w
let wr_rt = cont... |
264c8db960b0dbc01022af8eecdd6f5e40ff752ff71212cba71e606a08cb3a0a | kazu-yamamoto/http2 | Case.hs | {-# LANGUAGE RecordWildCards, CPP #-}
module Case where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative ((<$>))
#endif
import Data.ByteString (ByteString)
import qualified Data.ByteString.Base16 as B16
import JSON
import Network.HTTP2.Frame
data CaseSource = CaseSource {
cs_description :: String
, cs... | null | https://raw.githubusercontent.com/kazu-yamamoto/http2/88b3c192c251c15fa4dc426aa0372841dc3fee49/test-frame/Case.hs | haskell | # LANGUAGE RecordWildCards, CPP #
fromJust is unsafe |
module Case where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative ((<$>))
#endif
import Data.ByteString (ByteString)
import qualified Data.ByteString.Base16 as B16
import JSON
import Network.HTTP2.Frame
data CaseSource = CaseSource {
cs_description :: String
, cs_encodeinfo :: EncodeInfo
, cs_paylo... |
22b26458edc99e3c3a3dece4a1d2b4c3ebc3f309ba5a7bf0c661abe8ece82ed7 | intolerable/reddit | CommentSpec.hs | module Reddit.Types.CommentSpec where
import Reddit.Types.Comment
import Reddit.Types.Listing
import Reddit.Types.Subreddit hiding (subredditID)
import Reddit.Types.User
import Control.Monad
import Data.ByteString.Lazy (ByteString)
import Data.Maybe
import Data.Time.Clock
import Data.Aeson (eitherDecode)
import Test.... | null | https://raw.githubusercontent.com/intolerable/reddit/588901f79e684536a6839d63e6f9c6a4847fe001/test/Reddit/Types/CommentSpec.hs | haskell | module Reddit.Types.CommentSpec where
import Reddit.Types.Comment
import Reddit.Types.Listing
import Reddit.Types.Subreddit hiding (subredditID)
import Reddit.Types.User
import Control.Monad
import Data.ByteString.Lazy (ByteString)
import Data.Maybe
import Data.Time.Clock
import Data.Aeson (eitherDecode)
import Test.... | |
7110d9ed15bf622b8e48e43de9eef5a67dd5af047b4a5d0bd1cedf5fde1bd94e | erlang/otp | yes_25.erl | -module(yes_25).
-compile(export_all).
?MODULE() ->
ok.
f() ->
{_,Ref} = spawn_monitor(name@host, fun() -> ok end),
receive
{'DOWN',Ref,_,_,Reason} ->
Reason
end.
| null | https://raw.githubusercontent.com/erlang/otp/f9c7f02e774639b95f47a99f8d539f83d13a94c7/lib/compiler/test/receive_SUITE_data/ref_opt/yes_25.erl | erlang | -module(yes_25).
-compile(export_all).
?MODULE() ->
ok.
f() ->
{_,Ref} = spawn_monitor(name@host, fun() -> ok end),
receive
{'DOWN',Ref,_,_,Reason} ->
Reason
end.
| |
adc0d73f730437f18661a512a672b1e412921572548960a8b6e0fbe8633aa3a4 | sjl/clojurecraft | followbot.clj | (ns examples.followbot
(:use [clojure.math.numeric-tower :only (abs)])
(:require [clojurecraft.core :as core])
(:require [clojurecraft.events :as events])
(:require [clojurecraft.loops :as loops])
(:require [clojurecraft.actions :as actions]))
; Helper functions ----------------------------------------------... | null | https://raw.githubusercontent.com/sjl/clojurecraft/c4f27cd3a4953c6a439b0ef9b37241fd51731083/src/examples/followbot.clj | clojure | Helper functions -----------------------------------------------------------------
Loops ----------------------------------------------------------------------------
Event handlers -------------------------------------------------------------------
Creation function -------------------------------------------------... | (ns examples.followbot
(:use [clojure.math.numeric-tower :only (abs)])
(:require [clojurecraft.core :as core])
(:require [clojurecraft.events :as events])
(:require [clojurecraft.loops :as loops])
(:require [clojurecraft.actions :as actions]))
(defn- locs [bot entity]
[(:loc @(:player bot))
(:loc @entit... |
0abe4627073f5d3cdc52f85896681a02f17aa18de2fd368f271c77cc01a33ade | clojure-interop/google-cloud-clients | Storage$BucketGetOption.clj | (ns com.google.cloud.storage.Storage$BucketGetOption
"Class for specifying bucket get options."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.storage Storage$BucketGetOption]))
(defn *metageneration-match
"Returns an option for bucket's metageneration match. If this option is used... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.storage/src/com/google/cloud/storage/Storage%24BucketGetOption.clj | clojure | (ns com.google.cloud.storage.Storage$BucketGetOption
"Class for specifying bucket get options."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.storage Storage$BucketGetOption]))
(defn *metageneration-match
"Returns an option for bucket's metageneration match. If this option is used... | |
c6427585c4e8e3fdbc6eea223436869e66c642f05a50492be03b91e7a93ecd74 | haskell-repa/repa | Box.hs |
module Data.Repa.Scalar.Box
( Box (..)
, box, unbox)
where
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Generic as G
import qualified Data.Vector.Generic.Mutable as GM
-- | Strict, boxed... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-scalar/Data/Repa/Scalar/Box.hs | haskell | | Strict, boxed wrapper for a value.
data types.
| Put a value in a box.
| Take the value from the box.
--------------------------------------------------------------------------------------
-tuple-instances
# UNPACK #
# UNPACK #
# INLINE basicLength #
# INLINE basicUnsafeReplicate #
# INLINE basicUnsafeRead... |
module Data.Repa.Scalar.Box
( Box (..)
, box, unbox)
where
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Generic as G
import qualified Data.Vector.Generic.Mutable as GM
Useful as a de... |
f3f83f7f58ba616795c4aa5dac62a86cd76d3ae346dda6aa486fde9b5938329f | mzp/coq-ruby | proof_trees.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/proofs/proof_trees.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id: proof_trees.mli 9154 2006-09-... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Names
open ... |
0938470bca3ace58ca585d620786a147aa8888289e17d1a32a3ad5c2861351e1 | devaspot/brace | jxat_specs.erl | -module(jxat_specs).
-export([given/3, 'when'/3, then/3]).
-include_lib("eunit/include/eunit.hrl").
given([a,module,that,declares,types], _State, _) ->
Source = <<"(ns jxat-spec-test)
(deftype+ tunion () (erlang/union :x :y))
(deftype+ trange () (erlang/range 1 2))
(d... | null | https://raw.githubusercontent.com/devaspot/brace/8494573efef63f4b2f39dd36e8c651a487223f20/test/jxat_specs.erl | erlang | -module(jxat_specs).
-export([given/3, 'when'/3, then/3]).
-include_lib("eunit/include/eunit.hrl").
given([a,module,that,declares,types], _State, _) ->
Source = <<"(ns jxat-spec-test)
(deftype+ tunion () (erlang/union :x :y))
(deftype+ trange () (erlang/range 1 2))
(d... | |
9aec33bdd755a10d8d1fe414100e1247772fefd5105c29619eb98116c59e3714 | clojurebook/ClojureProgramming | project.clj | (defproject game-of-life "1.0.0-SNAPSHOT"
:description "A generic life-like automaton by Emerick, Carper, and Grand."
:url ""
:dependencies [[org.clojure/clojure "1.3.0"]]
:profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0-beta6"]]}}
:run-aliases {:rect com.clojurebook.collections.life/rect-demo})
| null | https://raw.githubusercontent.com/clojurebook/ClojureProgramming/bcc7c58862982a5793e22788fc11a9ed7ffc548f/ch03-game-of-life/project.clj | clojure | (defproject game-of-life "1.0.0-SNAPSHOT"
:description "A generic life-like automaton by Emerick, Carper, and Grand."
:url ""
:dependencies [[org.clojure/clojure "1.3.0"]]
:profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0-beta6"]]}}
:run-aliases {:rect com.clojurebook.collections.life/rect-demo})
| |
0da78ddd421804b24aeca218a254d1d7a1b1dbbed981465fdad392222a7e9f06 | samply/blaze | type.clj | (ns blaze.fhir.spec.type
(:refer-clojure
:exclude
[boolean boolean? decimal? integer? long meta string? time type uri? uuid?])
(:require
[blaze.fhir.spec.impl.intern :as intern]
[blaze.fhir.spec.type.json :as json]
[blaze.fhir.spec.type.macros :as macros
:refer [def-complex-type def-primiti... | null | https://raw.githubusercontent.com/samply/blaze/948eee38021467fa343c522a644a7fd4b24b6467/modules/fhir-structure/src/blaze/fhir/spec/type.clj | clojure | ---- nil -------------------------------------------------------------------
Be sure all methods can be called on nil.
---- Object -------------------------------------------------------------------
Other instances have no type.
---- boolean ---------------------------------------------------------------
:value
... | (ns blaze.fhir.spec.type
(:refer-clojure
:exclude
[boolean boolean? decimal? integer? long meta string? time type uri? uuid?])
(:require
[blaze.fhir.spec.impl.intern :as intern]
[blaze.fhir.spec.type.json :as json]
[blaze.fhir.spec.type.macros :as macros
:refer [def-complex-type def-primiti... |
018cf95fca78a2b88f7eb25fcfcddae56d59e85260ac6ce924180c09b82f6c76 | aryx/xix | sha1.ml | (*s: version_control/sha1.ml *)
(*s: copyright uuidm *)
Copyright ( c ) 2008
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 ... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/version_control/sha1.ml | ocaml | s: version_control/sha1.ml
s: copyright uuidm
e: copyright uuidm
***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Types
******... |
Copyright ( c ) 2008
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 PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRA... |
6df091f39ab6db8354e30fef72ff608b663ead5bfa205e7fc13538667602f080 | garrigue/lablgtk | gtkXmHTML.ml | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/src-unsupported/gtkXmHTML.ml | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
be2a6b94067d696e6ab507308a3ca4bd1d8984419a241fe9ece5edc9de8c3290 | triffon/fp-2019-20 | 01--calcPoly.rkt | (define (foldl op v l)
(if (null? l)
v
(foldl op (op v (car l)) (cdr l))))
(define (calcPoly l x)
(foldl (lambda (acc a)
(+ (* acc x) a))
0
l))
| null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/exam-01/prep/solutions/01--calcPoly.rkt | racket | (define (foldl op v l)
(if (null? l)
v
(foldl op (op v (car l)) (cdr l))))
(define (calcPoly l x)
(foldl (lambda (acc a)
(+ (* acc x) a))
0
l))
| |
f2f7634979724fb130134b5c7722cc0089898e6dcaed81bc69bb10e65a075cc3 | SamB/coq | xmlcommand.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/xml/xmlcommand.mli | ocaml | **********************************************************************
**********************************************************************
This file is distributed under the terms of the
... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * The HELM Pro... |
3ae52aac239c8434b5e24827e45ae51f18398882ff9c01473ce5e5531c1dac0d | Octachron/tensority | mask.mli | * The [ Mask ] module can be used to transform shapes defined
in the { ! Shape } module and strides defined over the
{ ! Stride } module .
At the type level , a mask is a combination of possible input shape
and output shapes . At the value level , a mask is a list of mask element
that c... | null | https://raw.githubusercontent.com/Octachron/tensority/2689fba0bb9c693ef51bebe9cf92c37ab30ca17e/lib/mask.mli | ocaml | * [empty_2] is the type argument of an empty shape
* [All]: Take all the elements from the source
* [Range r]: Take an affine subset from the source,
see the [Range] module for more information.
* The generic type of mask
* A quite complicated empty type
* The cons operator, note that most of type-level oper... | * The [ Mask ] module can be used to transform shapes defined
in the { ! Shape } module and strides defined over the
{ ! Stride } module .
At the type level , a mask is a combination of possible input shape
and output shapes . At the value level , a mask is a list of mask element
that c... |
fcbc5cdfac0cd85b032d3af11652d6224f5287286bc749ba0ae09d1c83e40152 | SahilKang/cl-rdkafka | common.lisp | Copyright ( C ) 2018 - 2020 < >
;;;
;;; This file is part of cl-rdkafka.
;;;
;;; cl-rdkafka 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 l... | null | https://raw.githubusercontent.com/SahilKang/cl-rdkafka/4d0b6f7f9b102769cb91a020e4e192a2ea066e0b/test/common.lisp | lisp |
This file is part of cl-rdkafka.
cl-rdkafka is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-rdkafka 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 PURPOS... | Copyright ( C ) 2018 - 2020 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package #:cl-user)
(defpackage #:test
(:use #:cl)
(:export
*b... |
2177dffb6bae0119aecd3960ad0c52b522cd05df67ddcf91a59091ada4939a7d | braidchat/braid | imports.cljs | (ns braid.core.client.ui.styles.imports
(:require
[garden.stylesheet :refer [at-import at-font-face]]))
(def fa-at-font-face
(at-font-face
{:font-family "\"Font Awesome 5 Free\""
:src ["url('/fonts/fa-solid-900.eot?#iefix') format('embedded-opentype')"
"url('/fonts/fa-solid-900.woff2') forma... | null | https://raw.githubusercontent.com/braidchat/braid/e9e5cefc13f73814bd69fc8d50849fd63925fee7/src/braid/core/client/ui/styles/imports.cljs | clojure | (ns braid.core.client.ui.styles.imports
(:require
[garden.stylesheet :refer [at-import at-font-face]]))
(def fa-at-font-face
(at-font-face
{:font-family "\"Font Awesome 5 Free\""
:src ["url('/fonts/fa-solid-900.eot?#iefix') format('embedded-opentype')"
"url('/fonts/fa-solid-900.woff2') forma... | |
1bdb83fb0c1197db84e5f5905b4ca1a10f741d6381be71af597cef3961ac8e91 | danoctavian/bit-smuggler | ARQSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module ARQSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Monadic (PropertyM, assert, monadicIO, pick, pre, run)
import Data.Conduit as DC
import Data.Conduit.List as DC
import Prelude as P
import Control.Concurrent.Async
import Control.Concurr... | null | https://raw.githubusercontent.com/danoctavian/bit-smuggler/4385ed67f1fec4ed441832fc9a119de632b796aa/BitSmuggler/test/unit/ARQSpec.hs | haskell | # LANGUAGE OverloadedStrings #
easiest test
easiest test
suck those messages out | module ARQSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Monadic (PropertyM, assert, monadicIO, pick, pre, run)
import Data.Conduit as DC
import Data.Conduit.List as DC
import Prelude as P
import Control.Concurrent.Async
import Control.Concurrent.STM
import Control.Concurrent
i... |
212973d83cbef565cf91351b0b17f0a128363b7954dc280774aa9a5482952cb5 | monadbobo/ocaml-core | extended_nativeint.mli | include Number.Verified_std with type repr = Core.Std.Nativeint.t
| null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/extended_nativeint.mli | ocaml | include Number.Verified_std with type repr = Core.Std.Nativeint.t
| |
aa684c8921d025697515de5b8fea6b1c253d0e0024d054038dc4c7261a11b5ed | eronalves/foodship-restaurant | db_adapter.clj | (ns foodship-restaurant.adapters.db-adapter
(:require
[foodship-restaurant.ports.db.memory_db :as memory-db]
[foodship-restaurant.helpers.keywords :as keywords]))
(defn retrieve-restaurant [component id]
(keywords/transform-keywords
(memory-db/get-restaurant (:memory-db component) id)))
(defn all-res... | null | https://raw.githubusercontent.com/eronalves/foodship-restaurant/6a30c48013a618c2cef34e7e29b200e5d45e8623/src/foodship_restaurant/adapters/db_adapter.clj | clojure | (ns foodship-restaurant.adapters.db-adapter
(:require
[foodship-restaurant.ports.db.memory_db :as memory-db]
[foodship-restaurant.helpers.keywords :as keywords]))
(defn retrieve-restaurant [component id]
(keywords/transform-keywords
(memory-db/get-restaurant (:memory-db component) id)))
(defn all-res... | |
07769a6c8ca30e2fc8021b9c00d2391a96fc607e4fb84245d8a1eb8ae62fb4fd | Frama-C/Frama-C-snapshot | inout_type.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value_types/inout_type.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
0640326015d61f919ddaa606e462df3f8e8896d61314784549570c2a80870641 | walmartlabs/datascope | project.clj | (defproject walmartlabs/datascope "0.1.1"
:description "Visualization of Clojure data structures using Graphviz"
:url ""
:license {:name "Apache Sofware License 2.0"
:url "-2.0.html"}
:plugins [[lein-codox "0.9.3"]]
:dependencies [[org.clojure/clojure "1.9.0"]
[io.aviso/pretty "0... | null | https://raw.githubusercontent.com/walmartlabs/datascope/91d8af62a053e793b629a50948333b16da17e9a7/project.clj | clojure | (defproject walmartlabs/datascope "0.1.1"
:description "Visualization of Clojure data structures using Graphviz"
:url ""
:license {:name "Apache Sofware License 2.0"
:url "-2.0.html"}
:plugins [[lein-codox "0.9.3"]]
:dependencies [[org.clojure/clojure "1.9.0"]
[io.aviso/pretty "0... | |
72c8f87a75de90ab574ee7521e7cecdff3c1b3faaceb4022d09905d1db6fa599 | hemmi/coq2scala | coqide_ui.ml | let ui_m = GAction.ui_manager ();;
let no_under = Minilib.string_map (fun x -> if x = '_' then '-' else x)
let list_items menu li =
let res_buf = Buffer.create 500 in
let tactic_item = function
|[] -> Buffer.create 1
|[s] -> let b = Buffer.create 16 in
let () = Buffer.add_string b ("<menuitem action=... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/ide/coqide_ui.ml | ocaml | let ui_m = GAction.ui_manager ();;
let no_under = Minilib.string_map (fun x -> if x = '_' then '-' else x)
let list_items menu li =
let res_buf = Buffer.create 500 in
let tactic_item = function
|[] -> Buffer.create 1
|[s] -> let b = Buffer.create 16 in
let () = Buffer.add_string b ("<menuitem action=... | |
2a1cb79cccc7d884abe57defd322e8c2462287071c77353d3d8e8ffbc982c41a | erlang/otp | f_include_2.erl | -module(f_include_2).
-feature(experimental_ftr_1, enable).
%% Include file defines a macro, conditional on whether experimental_ftr_1
%% is enabled.
-include("macro_enabled.hrl").
%% At this point the prefix will definitely end, if it has not already
-export([foo/1]).
foo(2) -> ?UNLESS.
| null | https://raw.githubusercontent.com/erlang/otp/018277451bc9d6fa249cd1d62b416b8721ce43ee/erts/test/erlc_SUITE_data/src/f_include_2.erl | erlang | Include file defines a macro, conditional on whether experimental_ftr_1
is enabled.
At this point the prefix will definitely end, if it has not already | -module(f_include_2).
-feature(experimental_ftr_1, enable).
-include("macro_enabled.hrl").
-export([foo/1]).
foo(2) -> ?UNLESS.
|
33c3cadab472e7d83c5c8b13d42657de071af3d405e3e67f2ed75491d4b2a731 | janestreet/universe | automaton_stack_intf.ml | open! Import
* Automaton stack represents a prefix of a sexp ( or of a sexp sequence ) while it 's being
parsed . We have three different types of the stack depending on how much detail about
the sexp structure is being recorded ( just the sexp , sexp with comments and positions
( CST ) , or just p... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/parsexp/src/automaton_stack_intf.ml | ocaml | * at top-level
* after the given sexp or comment
* after the opening paren
* [In_sexp_comment] only indicates if the next s-expression is to be commented
out, but if we are nested below parens below an sexp comment, the stack would
look like [Open (.., In_sexp_comment ..)].
* Raises if [t] conta... | open! Import
* Automaton stack represents a prefix of a sexp ( or of a sexp sequence ) while it 's being
parsed . We have three different types of the stack depending on how much detail about
the sexp structure is being recorded ( just the sexp , sexp with comments and positions
( CST ) , or just p... |
db18aeaccec55434aa84a602d77a24e7c38460d038cfaa0d25d3e46bbc4d3c3b | jrm-code-project/LISP-Machine | chsncp.lisp | -*- Mode : LISP ; Package : CHAOS ; ; : CL -*-
This is SYS : NETWORK ; CHAOS ; CHSNCP
;;;
* * ( c ) Copyright 1980 , 1984 Massachusetts Institute of Technology * *
;;;
Lisp Machine package for using the ChaosNet . Does not contain Ethernet II interface .
New Protocol of May , 1978
;;;
Software detai... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/network/chaos/chsncp.lisp | lisp | Package : CHAOS ; ; : CL -*-
CHAOS ; CHSNCP
TO BE FIXED!!!!!!!!!!!!!!!!!!!!!!!!!!!!
**** Fix the packet recording stuff****
**** Per-connection retransmission timeouts/intervals (Yow ! Do we have land lines
yet ?)
This file contains the CHAOS net software from the packet level down
Some standard abbr... | * * ( c ) Copyright 1980 , 1984 Massachusetts Institute of Technology * *
Lisp Machine package for using the ChaosNet . Does not contain Ethernet II interface .
New Protocol of May , 1978
Software details for general use and the Lisp Machine are documented in the
chapter ` ` The Chaosnet '' in the Lisp ... |
c11501413d857a65ee326d612196247065ec903ea4cbb3de05f6623f80e0b7cd | noinia/hgeometry | TreeRep.hs | --------------------------------------------------------------------------------
-- |
Module : Geometry . PlanarSubdivision .
Copyright : ( C )
-- License : see the LICENSE file
Maintainer :
--
-- Data types to represent a PlanarSubdivision using adjacency representations
--
-----------... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/src/Geometry/PlanarSubdivision/TreeRep.hs | haskell | ------------------------------------------------------------------------------
|
License : see the LICENSE file
Data types to represent a PlanarSubdivision using adjacency representations
------------------------------------------------------------------------------
-------------------------------------------... | Module : Geometry . PlanarSubdivision .
Copyright : ( C )
Maintainer :
module Geometry.PlanarSubdivision.TreeRep
( PlanarSD(..), InnerSD
, Gr(..), Vtx(..), Face(..)
, myTreeRep, myTriangle
) where
FIXME ; uncomment myTreeRep
import Data.Aeson
import Data.PlaneGraph.AdjRep (Vtx(..... |
f80f95d8c5853772a59df854197ee1106b73077810ca4f0bf1d417825de2b012 | nyu-acsys/drift | zip01.ml |
let rec bot _ = bot ()
let fail _ = assert false
let rec zip_without_checking_1077 x_DO_NOT_CARE_1083 x_DO_NOT_CARE_1084 x_DO_NOT_CARE_1085 xs_1031 set_flag_zip_1063 s_zip_xs_1058 s_zip_ys_1059 ys_1032 =
let set_flag_zip_1063 = true
in
let s_zip_ys_1059 = ys_1032
in
let s_zip_xs_1058 = xs_... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/termination/zip01.ml | ocaml | -:{v:Int | true}
-:{v:Int | true} |
let rec bot _ = bot ()
let fail _ = assert false
let rec zip_without_checking_1077 x_DO_NOT_CARE_1083 x_DO_NOT_CARE_1084 x_DO_NOT_CARE_1085 xs_1031 set_flag_zip_1063 s_zip_xs_1058 s_zip_ys_1059 ys_1032 =
let set_flag_zip_1063 = true
in
let s_zip_ys_1059 = ys_1032
in
let s_zip_xs_1058 = xs_... |
c87549bfc12ec89e0b5de18750f4e8aa9ebec5644c3da96543d481e5f806da3f | antoniogarrote/clojure-grizzly-trial | rdfs.clj | (comment
"RDF Schema vocabulary"
)
(ns com.agh.webserver.framework.persistence.rdf.vocabularies.rdfs)
(use 'com.agh.webserver.framework.persistence.rdf)
(defmethod rdf-ns :rdfs [x]
"XMLSchema namespace: -schema#"
(struct uri "-schema#" :rdfs))
(defn rdfs-subClassOf []
(build-uri (rdf-ns :rdfs) "subClassOf"... | null | https://raw.githubusercontent.com/antoniogarrote/clojure-grizzly-trial/9282179818cc5247b796dd6eb9ab6ccb721100a3/com/agh/webserver/framework/persistence/rdf/vocabularies/rdfs.clj | clojure | (comment
"RDF Schema vocabulary"
)
(ns com.agh.webserver.framework.persistence.rdf.vocabularies.rdfs)
(use 'com.agh.webserver.framework.persistence.rdf)
(defmethod rdf-ns :rdfs [x]
"XMLSchema namespace: -schema#"
(struct uri "-schema#" :rdfs))
(defn rdfs-subClassOf []
(build-uri (rdf-ns :rdfs) "subClassOf"... | |
9a4a67d43cf2e94b95783f034ca1fe59f9a313db5dbdecb7d85f5ddda436de06 | racket/racket7 | attach.rkt | #lang racket/base
(require "namespace.rkt"
"module.rkt"
"../common/module-path.rkt"
"../common/phase.rkt"
"../common/contract.rkt")
(provide namespace-attach-module
namespace-attach-module-declaration)
(define (namespace-attach-module src-namespace
... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/namespace/attach.rkt | racket | module name -> phase -> namespace-or-#f
Loop to check and decide what to transfer
Always handle a cross-phase persistent module at phase 0, which means
that all phases will get the same instance if any instance is attached
required modules are declared
Attach submodules at phase #f, which allows
dependencies to ... | #lang racket/base
(require "namespace.rkt"
"module.rkt"
"../common/module-path.rkt"
"../common/phase.rkt"
"../common/contract.rkt")
(provide namespace-attach-module
namespace-attach-module-declaration)
(define (namespace-attach-module src-namespace
... |
beca15f6476d1d182183b7f3d1b92e3044b5b4cd787416413b3857d29e7f9075 | starschema/clj-tableau | dataextract_test.clj | (ns clj-tableau.dataextract-test
(:require [clojure.test :refer :all]
[clj-tableau.dataextract :refer :all])
(:import (com.tableausoftware.DataExtract Type Collation)))
(def table2-definition
{
:collation Collation/EN_GB
:columns ["Purchased" Type/DATETIME
"Product" Type/CHAR_S... | null | https://raw.githubusercontent.com/starschema/clj-tableau/e6598a130e34191a092c2ac3407f012ff91cdde8/test/clj_tableau/dataextract_test.clj | clojure | (ns clj-tableau.dataextract-test
(:require [clojure.test :refer :all]
[clj-tableau.dataextract :refer :all])
(:import (com.tableausoftware.DataExtract Type Collation)))
(def table2-definition
{
:collation Collation/EN_GB
:columns ["Purchased" Type/DATETIME
"Product" Type/CHAR_S... | |
3b728d8ae4460ce8b5e98fb5c8decde74b47c38ca52f93376dd17d6f2cfde978 | exoscale/clojure-kubernetes-client | v1_tcp_socket_action.clj | (ns clojure-kubernetes-client.specs.v1-tcp-socket-action
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-tcp-socket-action-data v1-tcp-socket-action)
(def v1-tcp-socket-action-data
{
(ds/opt :host) string?
(ds/... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_tcp_socket_action.clj | clojure | (ns clojure-kubernetes-client.specs.v1-tcp-socket-action
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
)
(:import (java.io File)))
(declare v1-tcp-socket-action-data v1-tcp-socket-action)
(def v1-tcp-socket-action-data
{
(ds/opt :host) string?
(ds/... | |
bc2ae2e1b28d7feb0c1f56378e5d56198895bebc35bc66cdc73ba4d2baf21066 | videlalvaro/claude | redis.clj | (ns claude.redis
(:use claude.core)
(:refer-clojure :exclude [name]))
(expose-service "redis-2.2"
["hostname" "host" "port" "password" "name"]) | null | https://raw.githubusercontent.com/videlalvaro/claude/ae39a605740e16eb47053637420a80f63270681b/src/claude/redis.clj | clojure | (ns claude.redis
(:use claude.core)
(:refer-clojure :exclude [name]))
(expose-service "redis-2.2"
["hostname" "host" "port" "password" "name"]) | |
32cfe0a563dbee55b98fafe43661ff7251a005cc39f2acdb538113e6f556a5cc | helium/miner | miner_lora_throttle_tests.erl | -module(miner_lora_throttle_tests).
-include_lib("eunit/include/eunit.hrl").
%% Test cases generated with /#/airtime and
%% truncated to milliseconds.
us_time_on_air_test() ->
?assertEqual(991, ms(miner_lora_throttle:time_on_air(125.0e3, 12, 5, 8, true, 7))),
?assertEqual(2465, ms(miner_lora_throttle:time_on_... | null | https://raw.githubusercontent.com/helium/miner/8906ca280544d9d14ce34fade54ea6f5e51e5c98/test/miner_lora_throttle_tests.erl | erlang | Test cases generated with /#/airtime and
truncated to milliseconds.
lorareg API doesn't care what values you use for Frequency
arguments as long as they are distinct and comparable. We can
use channel number instead like so.
lorareg places is on time is that it is monotonically
increasing and expressed as millis... | -module(miner_lora_throttle_tests).
-include_lib("eunit/include/eunit.hrl").
us_time_on_air_test() ->
?assertEqual(991, ms(miner_lora_throttle:time_on_air(125.0e3, 12, 5, 8, true, 7))),
?assertEqual(2465, ms(miner_lora_throttle:time_on_air(125.0e3, 12, 5, 8, true, 51))),
?assertEqual(495, ms(miner_lora_t... |
61d21ce46ae52408ae53deddc30e6854aa5deca3996b43cb97538b42532ed043 | hanshuebner/bos | quicklisp-install.lisp | (load "")
(quicklisp-quickstart:install)
(ql:quickload '(:quicklisp-slime-helper
:cl-ppcre
:arnesi
:screamer
:cxml
:parenscript
:kmrcl
:cl-pdf
:cl-mime
:closer-mop
:trivial-utf-8
:unit-test
:cl-gd
:stem))
| null | https://raw.githubusercontent.com/hanshuebner/bos/ab5944cc46f4a5ff5a08fd8aa4d228c0f9cfc771/quicklisp-install.lisp | lisp | (load "")
(quicklisp-quickstart:install)
(ql:quickload '(:quicklisp-slime-helper
:cl-ppcre
:arnesi
:screamer
:cxml
:parenscript
:kmrcl
:cl-pdf
:cl-mime
:closer-mop
:trivial-utf-8
:unit-test
:cl-gd
:stem))
| |
7c979ec2ca67c1cbb17a2ee3ef59cb1a7f0324270b272ef283219533befc920e | mumuki/mulang | ExpectationsAnalyzer.hs | module Language.Mulang.Analyzer.ExpectationsAnalyzer (
analyseExpectations) where
import Data.Maybe (fromMaybe)
import Language.Mulang.Ast (Expression)
import Language.Mulang.Analyzer.Analysis (Expectation, QueryResult, ExpectationResult(..))
import Language.Mulang.Analyzer.ExpectationsCompiler (compileExpectation)... | null | https://raw.githubusercontent.com/mumuki/mulang/92684f687566b2adafb331eae5b5916e2d90709e/src/Language/Mulang/Analyzer/ExpectationsAnalyzer.hs | haskell | module Language.Mulang.Analyzer.ExpectationsAnalyzer (
analyseExpectations) where
import Data.Maybe (fromMaybe)
import Language.Mulang.Ast (Expression)
import Language.Mulang.Analyzer.Analysis (Expectation, QueryResult, ExpectationResult(..))
import Language.Mulang.Analyzer.ExpectationsCompiler (compileExpectation)... | |
be78d706c18a17d6754fb8fd42397a5c0ce732c35964599a54197d9c969ee9ab | kraison/vivace-graph-v2 | test-scenarios.lisp | (in-package #:vivace-graph-v2-test)
(defparameter *basic-concurrency-1* nil)
(defparameter *basic-concurrency-2* nil)
(defparameter *triple-2* nil)
(defun basic-concurrency-1 (&optional (store *store*))
(let ((*store* store))
(let ((thr1 (make-thread
#'(lambda ()
(with-graph-transaction (*store* :tim... | null | https://raw.githubusercontent.com/kraison/vivace-graph-v2/f5fcc60caa1e5b33ac3f618311e8876a94508818/test-scenarios.lisp | lisp | (in-package #:vivace-graph-v2-test)
(defparameter *basic-concurrency-1* nil)
(defparameter *basic-concurrency-2* nil)
(defparameter *triple-2* nil)
(defun basic-concurrency-1 (&optional (store *store*))
(let ((*store* store))
(let ((thr1 (make-thread
#'(lambda ()
(with-graph-transaction (*store* :tim... | |
59cc99ebc03bebb58cf3d233ade85c77490b9da5dca00457b5820e80a40ad6fb | GaloisInc/jvm-verifier | Benchmarks.hs | |
Module : Main
Description : various performance benchmarks for JSS
License : BSD3
Stability : provisional
Point - of - contact : acfoltzer
Module : Main
Description : various performance benchmarks for JSS
License : BSD3
Stability : provi... | null | https://raw.githubusercontent.com/GaloisInc/jvm-verifier/3905dda18d0bdd5c595eef49804780f4a48c22f5/test/src/Benchmarks.hs | haskell | run each sim once so lazy initialization doesn't pollute result | |
Module : Main
Description : various performance benchmarks for JSS
License : BSD3
Stability : provisional
Point - of - contact : acfoltzer
Module : Main
Description : various performance benchmarks for JSS
License : BSD3
Stability : provi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.