_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 |
|---|---|---|---|---|---|---|---|---|
7b115db3120a11e26ff833779b7edf27e4e011f39b9bd5155b00ab0b611d780e | Lisp-Stat/special-functions | gamma-test.lisp | -*- Mode : LISP ; Base : 10 ; Syntax : ANSI - Common - Lisp ; Package : SPECIAL - FUNCTIONS - TESTS -*-
Copyright ( c ) 2020 by Symbolics Pte . Ltd. All rights reserved .
(in-package #:special-functions-tests)
(def-suite gamma
:description "Tests for the gamma and related functions"
:in all-tests)
(in-suite ga... | null | https://raw.githubusercontent.com/Lisp-Stat/special-functions/e03dba7e189144f6bfcea82f300ac6e73ad494e9/tests/gamma-test.lisp | lisp | Base : 10 ; Syntax : ANSI - Common - Lisp ; Package : SPECIAL - FUNCTIONS - TESTS -*-
expected log-gamma value
input value column | Copyright ( c ) 2020 by Symbolics Pte . Ltd. All rights reserved .
(in-package #:special-functions-tests)
(def-suite gamma
:description "Tests for the gamma and related functions"
:in all-tests)
(in-suite gamma)
(test gamma-factorial
:description "Test complete gamma at integer and half integer values"
(let... |
311144c2d68b24ad7ac3e81af376be6470c82c0b855552f0430f45233835c8b9 | mirage/ocaml-tar | write_test.ml | open OUnit2
open Lwt.Infix
module B(Size : sig val sector_size : int end) = struct
include Block
include Size
let convert_path os path =
let ch = Unix.open_process_in (Printf.sprintf "cygpath -%c -- %s" (match os with `Mixed -> 'm' | `Unix -> 'u' | `Windows -> 'w') path) in
let line = input_line ch in
... | null | https://raw.githubusercontent.com/mirage/ocaml-tar/7b49f6640a876cde2a2a9a2d21aae2751c2df13e/lib_test/write_test.ml | ocaml | XXX: `Append_only
write an empty archive with trailing \xFFs
skip header
check file content
check sentinel
check tail is untouched | open OUnit2
open Lwt.Infix
module B(Size : sig val sector_size : int end) = struct
include Block
include Size
let convert_path os path =
let ch = Unix.open_process_in (Printf.sprintf "cygpath -%c -- %s" (match os with `Mixed -> 'm' | `Unix -> 'u' | `Windows -> 'w') path) in
let line = input_line ch in
... |
3e9fa610cde1e66b6e6cf110c3ba0f2098bf43e53b93da43e6cd5923c384c345 | jaredly/reason-language-server | runtimedef.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/406/runtimedef.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
val builtin_exceptions: string array
val builtin_primitives: string array
|
aac23ae002528d9155fb31025261f8a0e3f2b9b5332ace105a3f489182edd4a6 | wanishing/sap | ui.clj | (ns sap.commands.ui
(:require
[sap.client :refer [forward-port]]
[sap.utils :refer [fail]])
(:import
(java.net
Socket
SocketException)))
(defn- busy?
[port]
(try
(nil? (.close (Socket. "localhost" port)))
(catch SocketException _
false)))
(defn- find-free-port
([]
... | null | https://raw.githubusercontent.com/wanishing/sap/1d4c9f8c8a648eec9e09cf87b900b854ba483e42/src/sap/commands/ui.clj | clojure | (ns sap.commands.ui
(:require
[sap.client :refer [forward-port]]
[sap.utils :refer [fail]])
(:import
(java.net
Socket
SocketException)))
(defn- busy?
[port]
(try
(nil? (.close (Socket. "localhost" port)))
(catch SocketException _
false)))
(defn- find-free-port
([]
... | |
156cce1e9687987a9ebc961da73f92a0033568048448fd0f9727c4fb87c29f3a | soupi/yh | Particle.hs | # LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
module DecObj.Particle where
import qualified SDL
import ... | null | https://raw.githubusercontent.com/soupi/yh/4cfbcc7da6f3ca5e330b7fd7d4adeacee7e2dff4/app/DecObj/Particle.hs | haskell | # LANGUAGE DeriveAnyClass #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK # | # LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE DeriveGeneric #
module DecObj.Particle where
import qualified SDL
import SDL.Vect (Point(P))
import Play... |
591757901d188560f264203694593dd8cd90e04e6d8dff6d23f9c30b79612cde | nubank/selvage | formatting.clj | (ns selvage.formatting
(:require [io.aviso.exception :as aviso.exception]
[io.aviso.ansi :as aviso.ansi]))
(defn format-exception [throwable]
(binding [aviso.exception/*traditional* true
aviso.exception/*fonts* (merge aviso.exception/*fonts*
... | null | https://raw.githubusercontent.com/nubank/selvage/3b2da9c95e82c7f2cbacb6cae3ed3af131d8a5e4/src/selvage/formatting.clj | clojure | (ns selvage.formatting
(:require [io.aviso.exception :as aviso.exception]
[io.aviso.ansi :as aviso.ansi]))
(defn format-exception [throwable]
(binding [aviso.exception/*traditional* true
aviso.exception/*fonts* (merge aviso.exception/*fonts*
... | |
b89a6dec6e866a6f0d1cd6ab2a57393621694cc3f2fcd83238ab84e25d3bbfb1 | ertugrulcetin/jme-clj | server.clj | ;; Please start your REPL with `+test` profile
(ns examples.simple-multiplayer.server
(:require [jme-clj.core :refer :all]
[jme-clj.network :refer :all])
(:import (com.jme3.network Filters)))
(defn- init []
(-> (create-server :game-name "network game"
:version 1
... | null | https://raw.githubusercontent.com/ertugrulcetin/jme-clj/167ef8f9e6396cc6e3c234290c5698c098fcad28/test/examples/simple_multiplayer/server.clj | clojure | Please start your REPL with `+test` profile
first, we need to register serializers
then we can call the start app | (ns examples.simple-multiplayer.server
(:require [jme-clj.core :refer :all]
[jme-clj.network :refer :all])
(:import (com.jme3.network Filters)))
(defn- init []
(-> (create-server :game-name "network game"
:version 1
:host-port 5110
:remo... |
7eafb008147486f177aabf18d88cab71c97289bf73b3e0aaf77368a8920fdd3e | D4ryus/cl-netstat | package.lisp | package.lisp
(defpackage #:cl-netstat
(:use #:cl)
(:export #:main))
| null | https://raw.githubusercontent.com/D4ryus/cl-netstat/e7187a4bec2f23b08c7a236f0c52503a444b941d/package.lisp | lisp | package.lisp
(defpackage #:cl-netstat
(:use #:cl)
(:export #:main))
| |
4a258d4c754f8d019a1c5e110dd45368f1b895cdbbe96cf4aa179c22fa317f22 | mario-goulart/selenium | firefox-webdriver.scm | (include "common.scm")
(define anonymous-profile-name "WEBDRIVER_ANONYMOUS_PROFILE")
(define extension-name "")
(define default-preferences
'((app.update.auto . "false")
(app.update.enabled . "false")
(browser.startup.page . "0")
(browser.download.manager.showWhenStarting . "false")
(browser.EULA.ov... | null | https://raw.githubusercontent.com/mario-goulart/selenium/31323eb6448699e3268ef61303fc614bd347a6d4/firefox-webdriver.scm | scheme | Wait until the webdriver starts accepting requests | (include "common.scm")
(define anonymous-profile-name "WEBDRIVER_ANONYMOUS_PROFILE")
(define extension-name "")
(define default-preferences
'((app.update.auto . "false")
(app.update.enabled . "false")
(browser.startup.page . "0")
(browser.download.manager.showWhenStarting . "false")
(browser.EULA.ov... |
beec49f7e09f11f3907bede50294b8fbd89d1de888bacab1483bb4a419aa1d35 | FranklinChen/hugs98-plus-Sep2006 | Bitmap.hs | -- #hide
module Graphics.HGL.Win32.Bitmap
( Bitmap
, load, read, delete
, draw, drawStretched, drawSheared
, getBitmapSize
, createBitmapFile
) where
import Graphics.HGL.Units (Point)
import Graphics.HGL.Internals.Draw (Draw, mkDraw)
import Graphics.HGL.Win32.Draw
import Graphics.HGL.Win32.Types
import qualified... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HGL/Graphics/HGL/Win32/Bitmap.hs | haskell | #hide
--------------------------------------------------------------
The interface
--------------------------------------------------------------
a) with no transformation at a point
b) stretched to fit a rectangle
c) rotated and sheared to fit a parallelogram
------------------------------------------... | module Graphics.HGL.Win32.Bitmap
( Bitmap
, load, read, delete
, draw, drawStretched, drawSheared
, getBitmapSize
, createBitmapFile
) where
import Graphics.HGL.Units (Point)
import Graphics.HGL.Internals.Draw (Draw, mkDraw)
import Graphics.HGL.Win32.Draw
import Graphics.HGL.Win32.Types
import qualified Graphics... |
4ec7c575ce660801b54ca78ae3b371dcf4d99ff82d338f99806d66a2f3157ad6 | athos/stacktracer | xforms.clj | (ns stacktracer.xforms
(:refer-clojure :exclude [drop-last])
(:require [clojure.core :as cc]))
(defn drop-last
([] (drop-last 1))
([n]
(fn [rf]
(let [buf (volatile! [])]
(fn
([] (rf))
([result]
(reduce rf result (cc/drop-last n @buf)))
([result input]
... | null | https://raw.githubusercontent.com/athos/stacktracer/cde0d7080f157835bdbac6704b7395794df9c8f9/src/stacktracer/xforms.clj | clojure | (ns stacktracer.xforms
(:refer-clojure :exclude [drop-last])
(:require [clojure.core :as cc]))
(defn drop-last
([] (drop-last 1))
([n]
(fn [rf]
(let [buf (volatile! [])]
(fn
([] (rf))
([result]
(reduce rf result (cc/drop-last n @buf)))
([result input]
... | |
86eec8a9fc5a7aca5af7b0c76e054c72131fe909f27914086e5274fe5abf3d83 | sbcl/sbcl | profile.pure.lisp | tests PROFILE with multiple threads
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in the ... | null | https://raw.githubusercontent.com/sbcl/sbcl/98b0b82efc947957d18f1bd6086679c4d9d33ce6/tests/profile.pure.lisp | lisp | more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
Memory fault at 0x4fc60000 (pc=0xfd7119c)
The integrity of this image is possibly com... | tests PROFILE with multiple threads
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(use-package "SB-THREAD")
(defun miller-rabin-prime-p (n &optional (s 50))
"Miller-Rabin primality test written by R. Matthew E... |
f95f1bba5ca13e9b6127993f3b6914471662a32aa4ed4fefc877653e55423208 | alvatar/spheres | test-cset.scm | ;; Test of the internal character-set API. This is here so we can switch
;; representation of csets more easily.
Some of these are based on SRFI 14 tests
(use test extras utils irregex)
(load "irregex.scm")
(define (vowel? c) (member c '(#\a #\e #\i #\o #\u)))
(test-begin)
(test-assert
(cset=? (plist->cset... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/test/test-cset.scm | scheme | Test of the internal character-set API. This is here so we can switch
representation of csets more easily.
without the 'd' |
Some of these are based on SRFI 14 tests
(use test extras utils irregex)
(load "irregex.scm")
(define (vowel? c) (member c '(#\a #\e #\i #\o #\u)))
(test-begin)
(test-assert
(cset=? (plist->cset '(#\a #\a #\e #\e #\i #\i #\o #\o #\u #\u))
(string->cset "ioeauaiii")))
(test (plist->cset '(#\x #\y))... |
cf83fdea94274d02a2fb94df6e6f424a62d45c0197a379823ede37a98530770d | flosell/lambdacd | commons.cljs | (ns lambdacd.commons)
(defn loading-screen []
[:div {:key "loading-screen" :class "app__loading-screen"}
[:span "Loading..."]])
| null | https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/src/cljs/lambdacd/commons.cljs | clojure | (ns lambdacd.commons)
(defn loading-screen []
[:div {:key "loading-screen" :class "app__loading-screen"}
[:span "Loading..."]])
| |
ed4d93b98dd29e94381959da48b2d1e61981ca60bd8d7f813c90ba55adc2c999 | emaphis/HtDP2e-solutions | ex079.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex079) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/05-Adding-Structure/ex079.rkt | racket | about the language level of this file in a form that our tools can easily process.
Create examples for the following data definitions:
— "white"
— "yellow"
— "orange"
— "green"
— "red"
— "blue"
— "black"
interpretation represents a “happiness value”
A Person is a structure:
(make-person String String Bool... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex079) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Ex . 79 :
A Color is one of :
(define RED "red")
(define BLU... |
735689c251b1340b5630603e861d6e1218cdf5aa18bff551261934ed6d0504d9 | jozefg/blott | domain.ml | type env = t list
[@@deriving show, eq]
and clos =
Clos of {term : Syntax.t; env : env}
| ConstClos of t
[@@deriving show, eq]
and clos2 = Clos2 of {term : Syntax.t; env : env}
[@@deriving show, eq]
and clos3 = Clos3 of {term : Syntax.t; env : env}
[@@deriving show, eq]
and t =
| Lam of clos
| Neutral of {tp ... | null | https://raw.githubusercontent.com/jozefg/blott/9eadd6f1eb3ecb28fd66a25bc56c19041d98f722/src/lib/domain.ml | ocaml | DeBruijn levels for variables | type env = t list
[@@deriving show, eq]
and clos =
Clos of {term : Syntax.t; env : env}
| ConstClos of t
[@@deriving show, eq]
and clos2 = Clos2 of {term : Syntax.t; env : env}
[@@deriving show, eq]
and clos3 = Clos3 of {term : Syntax.t; env : env}
[@@deriving show, eq]
and t =
| Lam of clos
| Neutral of {tp ... |
7ad81c1578bc83b4bfe2c51ab1e28d098aa25b6ab01f7182b0db32c939cffdc3 | wilbowma/cur | sweet-exp.rkt | #lang sweet-exp cur
require
cur/stdlib/sugar
cur/stdlib/bool
cur/stdlib/nat
rackunit
check-equal?
if true false true
false
define + plus
check-equal?
{z + s(z)}
s(z)
| null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-test/cur/tests/sweet-exp.rkt | racket | #lang sweet-exp cur
require
cur/stdlib/sugar
cur/stdlib/bool
cur/stdlib/nat
rackunit
check-equal?
if true false true
false
define + plus
check-equal?
{z + s(z)}
s(z)
| |
ac6ec56983d2ab16f36f3e1b1a122d361de5dcedd3bef523fd07c26e95d5fcbd | gfredericks/bitalgs | word32.clj | (ns bitalgs.data.word32
(:refer-clojure :exclude [bit-xor bit-or bit-and bit-not
bit-shift-left bit-shift-right +])
(:require [bitalgs.data :refer [IByteString ITraceableValue]]
[clojure.core :as core]
[clojure.walk :as wk]))
(defrecord Word32 [long-val]
IByteS... | null | https://raw.githubusercontent.com/gfredericks/bitalgs/74ba26d76ea293f3487f7dcfef398b1a9c8f1912/src/bitalgs/data/word32.clj | clojure | Is this really a good idea?
this should be postwalk but it loses metadata
stack overflow caused by using prewalk;
see above. | (ns bitalgs.data.word32
(:refer-clojure :exclude [bit-xor bit-or bit-and bit-not
bit-shift-left bit-shift-right +])
(:require [bitalgs.data :refer [IByteString ITraceableValue]]
[clojure.core :as core]
[clojure.walk :as wk]))
(defrecord Word32 [long-val]
IByteS... |
efbc67d32d3df10a4a499dc14f56898b9d78e3d6dd2b397a3cb2e13edf6ea7e5 | well-typed-lightbulbs/ocaml-esp32 | weak.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/stdlib/weak.mli | ocaml | ************************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* { 1 Low - level functions }
type 'a t
* The type of arrays of weak pointers ( weak arrays ) . A weak... |
6e2d14073d953fb8008b5e3241d8612243d0614cf979ad45393f39fc177cf71e | oscoin/oscoin | Orphans.hs | # OPTIONS_GHC -fno - warn - orphans #
module Codec.Serialise.Orphans where
import GHC.Generics.Orphans ()
import Codec.Serialise (Serialise)
import qualified Crypto.PubKey.ECC.ECDSA as ECDSA
import qualified Crypto.PubKey.ECC.Types as ECC
instance Serialise ECDSA.PublicKey
instance Serialise ECC... | null | https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Codec/Serialise/Orphans.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Codec.Serialise.Orphans where
import GHC.Generics.Orphans ()
import Codec.Serialise (Serialise)
import qualified Crypto.PubKey.ECC.ECDSA as ECDSA
import qualified Crypto.PubKey.ECC.Types as ECC
instance Serialise ECDSA.PublicKey
instance Serialise ECC... | |
ac6fb650393fd32eb66e79ded4de35a16b056b31c6141c7e478aeaf1f6aac0c2 | input-output-hk/cardano-sl | Spec.hs | # LANGUAGE DeriveFoldable #
{-# LANGUAGE RankNTypes #-}
-- | Wallet state as mandated by the wallet specification
module Cardano.Wallet.Kernel.DB.Spec (
-- * Checkpoint
Checkpoint(..)
, Checkpoints(..)
, initCheckpoint
, liftCheckpoints
-- ** Lenses
, checkpointUtxo
, checkpointUtxoBalance
,... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/wallet/src/Cardano/Wallet/Kernel/DB/Spec.hs | haskell | # LANGUAGE RankNTypes #
| Wallet state as mandated by the wallet specification
* Checkpoint
** Lenses
* Partial checkpoints
** Lenses
* Unify partial and full checkpoints
** Convenience: accessors for other checkpoints
** public for testing compression
-------------------------------------------------------... | # LANGUAGE DeriveFoldable #
module Cardano.Wallet.Kernel.DB.Spec (
Checkpoint(..)
, Checkpoints(..)
, initCheckpoint
, liftCheckpoints
, checkpointUtxo
, checkpointUtxoBalance
, checkpointPending
, checkpointBlockMeta
, checkpointForeign
, checkpointContext
, PartialCheckpoint(..)
, initPartia... |
fc8165b3764b44a53eddd594dbb8239efe32059a2cff2c7b06c41962a86931dd | hasufell/hpath | CanonicalizePathSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module System.Posix.RawFilePath.Directory.CanonicalizePathSpec where
import Test.Hspec
import System.IO.Error
(
ioeGetErrorType
)
import GHC.IO.Exception
(
IOErrorType(..)
)
import Utils
upTmpDir :: IO ()
upTmpDir = do
setTmpDir "CanonicalizePathSpec"
create... | null | https://raw.githubusercontent.com/hasufell/hpath/9fcc1890596e5b838bf3be9ed303165fbc692d11/hpath-directory/test/System/Posix/RawFilePath/Directory/CanonicalizePathSpec.hs | haskell | # LANGUAGE OverloadedStrings #
successes --
posix failures -- |
module System.Posix.RawFilePath.Directory.CanonicalizePathSpec where
import Test.Hspec
import System.IO.Error
(
ioeGetErrorType
)
import GHC.IO.Exception
(
IOErrorType(..)
)
import Utils
upTmpDir :: IO ()
upTmpDir = do
setTmpDir "CanonicalizePathSpec"
createTmpDir
setupFiles :: IO ()
setupFi... |
f7a7b8a3b4738102b9b5308723f4b57df24e7ab7a16576ed9b608294075bdc93 | schell/odin | Painters.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
module Odin.Engine.New.UI.Painters
( getButtonPainter
, getBlankButtonPainter
, getIconButtonPainter
, getTextInputPainter
... | null | https://raw.githubusercontent.com/schell/odin/97ae1610a7abd19aa150bc7dfc132082d88ca9ea/odin-engine/src/Odin/Engine/New/UI/Painters.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
------------------------------------------------------------------------------
Button Styling
------------------------------------------------------------------------------
drop shadow and background
getIconButto... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
module Odin.Engine.New.UI.Painters
( getButtonPainter
, getBlankButtonPainter
, getIconButtonPainter
, getTextInputPainter
) where
import Control.Monad.IO.Class (MonadIO (..))
import Gelatin
import Gelati... |
0fc6d55bce2ec93fea5f8495081480f78655fa17dbe994d12c51ff34fd6eadc4 | Eonblast/Scalaxis | yaws_exhtml.erl | %%%----------------------------------------------------------------------
%%% File : exhtml.erl
Author : < >
Purpose : Format ehtml as code with optional indentation support .
Created : 24 Apr 2006 by < >
%%%----------------------------------------------------------------------
-module(yaws_exhtml).
... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/contrib/yaws/src/yaws_exhtml.erl | erlang | ----------------------------------------------------------------------
File : exhtml.erl
----------------------------------------------------------------------
test
test
test
Empty block element in a block element.
{_, yes, []} ->
%%io:format("EMPTY BLOCK IN BLOCK: ~p: ~p~n", [Tag, Mode]),
io:format("EMPT... | Author : < >
Purpose : Format ehtml as code with optional indentation support .
Created : 24 Apr 2006 by < >
-module(yaws_exhtml).
-export([check_xhtml/1]).
-export([format/1, format/2, format/3]).
-export([sformat/1, sformat/2]).
-export([count_trailing_spaces/1]).
-define(INDENT_LEVEL, 2).
HTML ... |
d8a698df36939292a7d205b327f1c7d25975e7e72b4f395b184ab82c1cd5ac19 | softlab-ntua/bencherl | rt_SUITE.erl | 2010 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
di... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/scalaris/test/rt_SUITE.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2010 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(rt_SUITE).
-author('').
-vsn('$Id$').
-compile(export_all).
-include("unittest.hrl").
-include("scalaris.hr... |
a9b8e197bc9eee1417c7a667b1890b570dbff65ec5361ac180efb4014a9c3aa0 | danx0r/festival | ogi_unitsel.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<--OHSU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
Oregon Health & Science University ; ;
Division of Biomedical Computer Science ; ;
... | null | https://raw.githubusercontent.com/danx0r/festival/6701715566aee6519a8b7949b567f2fdad1e2772/lib/ogi/ogi_unitsel.scm | scheme | <--OHSU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;
;
;
;
;
;;
;
release of the Festival TTS system. ;;
... |
( db_indx dbindx # )
( Lindx Lindx # )
( ( Uinfo1 Uinfo2 ... ) ) )
(define (item.alloname seg)
(let ((name (item.name seg)))
(cond
((string-equal (item.feat seg "allophone_name") "dx")
"dx")
((string-equal (item.name seg) "h")
(if (string-equal (item.fe... |
79da5bd2baf404394b35eb3a05397e0010b84eedfec8ab8fae7cd733d8c830e9 | willghatch/racket-rash | use-make-dumb-example.rkt | #!/usr/bin/env racket
#lang rash/demo/make
quux.txt : (list "bar.txt" (string-append "qwerty" ".txt")) {
echo the dependencies of quux.txt are (current-dependencies) &>! quux.txt
}
qwerty.txt : {
echo this file depends on nothing... &>! (current-target)
}
(define aoeu 'aoeu.txt)
foo.txt $aoeu : {
echo hello &... | null | https://raw.githubusercontent.com/willghatch/racket-rash/c40c5adfedf632bc1fdbad3e0e2763b134ee3ff5/rash-demos/rash/demo/use-make-dumb-example.rkt | racket | echo this is going to error
(error "I'm purposely erroring here")
Note that current-dependencies includes the duplicate aoeu.txt | #!/usr/bin/env racket
#lang rash/demo/make
quux.txt : (list "bar.txt" (string-append "qwerty" ".txt")) {
echo the dependencies of quux.txt are (current-dependencies) &>! quux.txt
}
qwerty.txt : {
echo this file depends on nothing... &>! (current-target)
}
(define aoeu 'aoeu.txt)
foo.txt $aoeu : {
echo hello &... |
95dda46a5c972d99a3d624e7249ec10b0311642a1ae07030047133eac123436e | pariyatti/kosa | db.clj | (ns kosa.mobile.today.doha.db
(:refer-clojure :exclude [list get])
(:require [kuti.record :as record]
[kuti.record.query :as query]
[kuti.record.nested :as nested]
[kuti.storage.nested :refer [expand-all]]
[kuti.support.debugging :refer :all]))
(defn list []
(map e... | null | https://raw.githubusercontent.com/pariyatti/kosa/b61b73eb71acea804149561fcfcdbb3176d2d857/src/kosa/mobile/today/doha/db.clj | clojure | (ns kosa.mobile.today.doha.db
(:refer-clojure :exclude [list get])
(:require [kuti.record :as record]
[kuti.record.query :as query]
[kuti.record.nested :as nested]
[kuti.storage.nested :refer [expand-all]]
[kuti.support.debugging :refer :all]))
(defn list []
(map e... | |
25099140b85b8137e447ce248ceea23eac7e275a63139f6872c4c6be3fb7a44c | osa1/sc-plugin | Annotations.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Supercompilation.Annotations where
import Data.Data
--------------------------------------------------------------------------------
type ConditionStr = String
data PEAnnotation
= Terminates ConditionStr
deriving (Data, Typeable)
| null | https://raw.githubusercontent.com/osa1/sc-plugin/1969ad81f16ca8ed8110ca8dadfccf6f3d463635/src/Supercompilation/Annotations.hs | haskell | # LANGUAGE DeriveDataTypeable #
------------------------------------------------------------------------------ |
module Supercompilation.Annotations where
import Data.Data
type ConditionStr = String
data PEAnnotation
= Terminates ConditionStr
deriving (Data, Typeable)
|
3a60ae95180942517fe56fb4837abfe75a2c89545beac41b53549b552ef94c58 | ttuegel/pipes-ghc-events | Events.hs | module Pipes.GHC.RTS.Events
( decodeEventLog
, decodeHeader
, decodeEvents
) where
import Data.ByteString (ByteString)
import Pipes (Pipe)
import Pipes (Producer)
import GHC.RTS.Events (Event)
import Control.Monad.Trans.State.Strict (runStateT)
import Pipes ((>->))
import qualified Control.Monad.Trans.Class ... | null | https://raw.githubusercontent.com/ttuegel/pipes-ghc-events/9b658e8947f18cb1195e84d2b0c8a7c244161652/pipes-ghc-events/src/Pipes/GHC/RTS/Events.hs | haskell | module Pipes.GHC.RTS.Events
( decodeEventLog
, decodeHeader
, decodeEvents
) where
import Data.ByteString (ByteString)
import Pipes (Pipe)
import Pipes (Producer)
import GHC.RTS.Events (Event)
import Control.Monad.Trans.State.Strict (runStateT)
import Pipes ((>->))
import qualified Control.Monad.Trans.Class ... | |
39e1d1419c5a4d417500c81fd851f60222a508bb519ee52fe9870945f66260d7 | ofmooseandmen/jord | Tx.hs | -- |
Module : Data . Geo . Jord . Tx
Copyright : ( c ) 2020
License : BSD3
Maintainer : < >
-- Stability: experimental
-- Portability: portable
--
-- Coordinates transformation parameters.
module Data.Geo.Jord.Tx
(
-- * transformation parameters.
Tx(..)
, inverse
, P... | null | https://raw.githubusercontent.com/ofmooseandmen/jord/9acd8d9aec817ce05de6ed1d78e025437e1193bf/src/Data/Geo/Jord/Tx.hs | haskell | |
Stability: experimental
Portability: portable
Coordinates transformation parameters.
* transformation parameters.
* transformation graph.
* geocentric coordinate transformation
^ transformation parameters - i.e. 'modelA'-> 'modelB'
| inverse transformation.
| class for transformation parameters.
^ inver... | Module : Data . Geo . Jord . Tx
Copyright : ( c ) 2020
License : BSD3
Maintainer : < >
module Data.Geo.Jord.Tx
(
Tx(..)
, inverse
, Params(..)
, Params7
, Rates
, Params15(..)
, params7
, rates
, paramsAt
, Graph
, graph
, paramsBetween
... |
767f30dc6728b19d5604593c61139bc1c57afca4cf2e3e57a7d291a6cb34b9ea | DaMSL/K3 | ConstraintSetLike.hs | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances #
{-|
A module used to generalize constraint sets. This module is used by the
environment decision procedure to allow constraint sets which have stubs in
addition to constraints.
-}
module Language.K3.TypeSystem.ConstraintSetLike
( Co... | null | https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/TypeSystem/ConstraintSetLike.hs | haskell | |
A module used to generalize constraint sets. This module is used by the
environment decision procedure to allow constraint sets which have stubs in
addition to constraints.
| # LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances #
module Language.K3.TypeSystem.ConstraintSetLike
( ConstraintSetLike(..)
, ConstraintSetLikePromotable(..)
) where
import Language.K3.TypeSystem.Data.Constraints
import Language.K3.TypeSystem.Data.ConstraintSet
class ConstraintSetLike e c... |
1730b4de7cb837ef8dbda4ff3f648b10049095a77ccbb66961bf83f6635a9d46 | ashinn/chibi-scheme | bytevector.scm |
;;> \section{Additional accessors}
> Retrieve a 16 - bit unsigned integer value from the given bytevector
;;> \var{bv} at offset \var{i}, in little-endian order.
(define (bytevector-u16-ref-le bv i)
(+ (bytevector-u8-ref bv i)
(arithmetic-shift (bytevector-u8-ref bv (+ i 1)) 8)))
> Retrieve a 16 - bit unsign... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/chibi/bytevector.scm | scheme | > \section{Additional accessors}
> \var{bv} at offset \var{i}, in little-endian order.
> \var{bv} at offset \var{i}, in big-endian order.
> \var{bv} at offset \var{i}, in little-endian order.
> \var{bv} at offset \var{i}, in big-endian order.
> final (least significant) byte. Thus any size integer can be
> encoded, bu... |
> Retrieve a 16 - bit unsigned integer value from the given bytevector
(define (bytevector-u16-ref-le bv i)
(+ (bytevector-u8-ref bv i)
(arithmetic-shift (bytevector-u8-ref bv (+ i 1)) 8)))
> Retrieve a 16 - bit unsigned integer value from the given bytevector
(define (bytevector-u16-ref-be bv i)
(+ (arit... |
e8051c792f0758a9414bc69ae58a0252f5f41688c49e4800c3826b413b0b7634 | huangjs/cl | setup-ecl.lisp | setup file for cl - bench running in ECL
;;
tested with ECL 0.9
;;
;; see <URL:/>
(load "defpackage")
(in-package :cl-bench)
(defun bench-gc ()
(si:gc t))
(defmacro with-spawned-thread (&body body)
`(progn ,@body))
;; to autoload the compiler
(compile 'bench-gc)
(setq c::*cc-flags* (concatenate 'string "-... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cl-bench/sysdep/setup-ecl.lisp | lisp |
see <URL:/>
to autoload the compiler | setup file for cl - bench running in ECL
tested with ECL 0.9
(load "defpackage")
(in-package :cl-bench)
(defun bench-gc ()
(si:gc t))
(defmacro with-spawned-thread (&body body)
`(progn ,@body))
(compile 'bench-gc)
(setq c::*cc-flags* (concatenate 'string "-I. " c::*cc-flags*))
EOF
|
cde181cecd6f357c8b3e5d94ce9728b372b5623d7f9faf04efc5c5aefd979d17 | Risto-Stevcev/bastet | Test_JsFloat.ml | open BsMocha.Mocha
open BsJsverify.Verify.Arbitrary
module ArbitraryFloat : Test.ARBITRARY with type t = float and type 'a arbitrary = 'a arbitrary =
struct
type t = float
type nonrec 'a arbitrary = 'a arbitrary
let make = arb_float Float.Bounded.bottom (Float.Bounded.top ** (1. /. 150.))
end
module Approxima... | null | https://raw.githubusercontent.com/Risto-Stevcev/bastet/030db286f57d2e316897f0600d40b34777eabba6/bastet_js/test/Test_JsFloat.ml | ocaml | open BsMocha.Mocha
open BsJsverify.Verify.Arbitrary
module ArbitraryFloat : Test.ARBITRARY with type t = float and type 'a arbitrary = 'a arbitrary =
struct
type t = float
type nonrec 'a arbitrary = 'a arbitrary
let make = arb_float Float.Bounded.bottom (Float.Bounded.top ** (1. /. 150.))
end
module Approxima... | |
ed2c4162970077ed66a6fefb5cf2489a506831b12e7cf888aeff955dc8628d26 | Clozure/ccl-tests | pathnames.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Nov 29 04:21:53 2003
;;;; Contains: Various tests on pathnames
(in-package :cl-test)
(deftest pathnames-print-and-read-properly
(with-standard-io-syntax
(loop
for p1 in *pathnames*
for s = (handler-case (write-to-string p1 :readably t)
(print... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/pathnames.lsp | lisp | -*- Mode: Lisp -*-
Contains: Various tests on pathnames | Author :
Created : Sat Nov 29 04:21:53 2003
(in-package :cl-test)
(deftest pathnames-print-and-read-properly
(with-standard-io-syntax
(loop
for p1 in *pathnames*
for s = (handler-case (write-to-string p1 :readably t)
(print-not-readable () :unreadable-error))
unless (eql s :unreadable... |
6581e1ffff2a4885c57481d46193b8131636e6cb762323361173ec4b3b52b29c | wilbowma/cur | defs.rkt | #lang racket/base
(require
scribble/base
scribble/manual
racket/sandbox)
(provide (all-defined-out))
(define (todo . ls)
(apply margin-note* "TODO: " ls))
(define (gtech . x)
(apply tech x #:doc '(lib "scribblings/guide/guide.scrbl")))
(define (curnel-sandbox init-string)
(parameterize ([sandbox-output 'st... | null | https://raw.githubusercontent.com/wilbowma/cur/98f721818c72966df3171a504f14a5e550a6fcfd/cur-doc/cur/scribblings/defs.rkt | racket | #lang racket/base
(require
scribble/base
scribble/manual
racket/sandbox)
(provide (all-defined-out))
(define (todo . ls)
(apply margin-note* "TODO: " ls))
(define (gtech . x)
(apply tech x #:doc '(lib "scribblings/guide/guide.scrbl")))
(define (curnel-sandbox init-string)
(parameterize ([sandbox-output 'st... | |
12234f6fee968f58d08d0b5b44eba917a919017aefee9da16bf837b024f34771 | nick8325/twee | Term.hs | -- | Terms and substitutions.
--
-- Terms in twee are represented as arrays rather than as an algebraic data
type . This module defines pattern synonyms ( ' App ' , ' Var ' , ' Cons ' , ' Empty ' )
-- which means that pattern matching on terms works just as normal.
-- The pattern synonyms can not be used to create ne... | null | https://raw.githubusercontent.com/nick8325/twee/4d3a64a6cfacc5cf71d0cdb74e2dea510f7caf14/src/Twee/Term.hs | haskell | | Terms and substitutions.
Terms in twee are represented as arrays rather than as an algebraic data
which means that pattern matching on terms works just as normal.
The pattern synonyms can not be used to create new terms; for that you
have to use a builder interface ('Build').
This module also provides:
* ... | type . This module defines pattern synonyms ( ' App ' , ' Var ' , ' Cons ' , ' Empty ' )
( ' ConsSym ' ) ;
* substitutions ( ' Substitution ' , ' Subst ' , ' subst ' ) ;
# LANGUAGE BangPatterns , PatternSynonyms , ViewPatterns , TypeFamilies , OverloadedStrings , ScopedTypeVariables , CPP , DefaultSignature... |
1d2c152f1533861fa1c5f0dd741e321532b69c3a30ea659baf00c8f61c3cd855 | the-real-blackh/sodium-2d-game-engine | freecell-webgl.hs | # LANGUAGE JavaScriptFFI #
import Freecell
import Control.Monad
import FRP.Sodium.GameEngine2D.Platform (engine)
import FRP.Sodium.GameEngine2D.WebGL
import Data.Text (Text)
import qualified Data.Text as T
import GHCJS.Foreign
import GHCJS.Types
import GHCJS.Marshal
foreign import javascript unsafe "'backgrounds' in... | null | https://raw.githubusercontent.com/the-real-blackh/sodium-2d-game-engine/fb765eb50d39f0297274c2d24cd71dcec2dc2c2a/examples/freecell/freecell-webgl.hs | haskell | # LANGUAGE JavaScriptFFI #
import Freecell
import Control.Monad
import FRP.Sodium.GameEngine2D.Platform (engine)
import FRP.Sodium.GameEngine2D.WebGL
import Data.Text (Text)
import qualified Data.Text as T
import GHCJS.Foreign
import GHCJS.Types
import GHCJS.Marshal
foreign import javascript unsafe "'backgrounds' in... | |
1e2e1ccfacaf662eb2bc133e78419727f70c2726c2d0293a127dbeba1027726d | flodihn/NextGen | libenv_sup.erl | %%----------------------------------------------------------------------
@author < >
%% @doc
%% This is the supervisor for the environment library 'libenv'.
%% @end
%%----------------------------------------------------------------------
-module(libenv_sup).
-behaviour(supervisor).
-export([
start_link/0... | null | https://raw.githubusercontent.com/flodihn/NextGen/3da1c3ee0d8f658383bdf5fccbdd49ace3cdb323/AreaServer/src/libenv/libenv_sup.erl | erlang | ----------------------------------------------------------------------
@doc
This is the supervisor for the environment library 'libenv'.
@end
---------------------------------------------------------------------- | @author < >
-module(libenv_sup).
-behaviour(supervisor).
-export([
start_link/0,
init/1
]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
RestartStrategy = one_for_one,
MaxRestarts = 10,
MaxSecondsBetweenRestarts = 30,
SupFlags = {Restart... |
918cebcb9498a445d1aa9197ed18e731a40e8025a350deee4f1d5c3258ea1394 | JacquesCarette/Drasil | DataDefinition.hs | # LANGUAGE RankNTypes , NoMonomorphismRestriction , GADTs , TemplateHaskell #
# LANGUAGE MultiParamTypeClasses #
-- | Defines types and functions for Data Definitions.
module Theory.Drasil.DataDefinition where
import Control.Lens
import Language.Drasil
import Language.Drasil.Development (showUID)
import Data.Drasil.Th... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/d6c474afd745c9e756d0e7ccaf53a7df8327036d/code/drasil-theory/lib/Theory/Drasil/DataDefinition.hs | haskell | | Defines types and functions for Data Definitions.
* Types
| A scope is an indirect reference to a 'UID'.
| Determines the scope of data.
^ Only visible within a limited scope.
^ Visible everywhere.
the scope, any references (as 'DecRef's), maybe a derivation, a label ('ShortName'), a reference address, and oth... | # LANGUAGE RankNTypes , NoMonomorphismRestriction , GADTs , TemplateHaskell #
# LANGUAGE MultiParamTypeClasses #
module Theory.Drasil.DataDefinition where
import Control.Lens
import Language.Drasil
import Language.Drasil.Development (showUID)
import Data.Drasil.TheoryConcepts (dataDefn)
newtype Scope = Scp { _spec :... |
043cd85baabcad739bfebe9563ba0ffb2de0ac701ac7a9b9ec04d9e6521162bc | clojure-interop/google-cloud-clients | ProfileServiceClient.clj | (ns com.google.cloud.talent.v4beta1.ProfileServiceClient
"Service Description: A service that handles profile management, including profile CRUD,
enumeration and search.
This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get ... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.talent/src/com/google/cloud/talent/v4beta1/ProfileServiceClient.clj | clojure |
"
| (ns com.google.cloud.talent.v4beta1.ProfileServiceClient
"Service Description: A service that handles profile management, including profile CRUD,
enumeration and search.
This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get ... |
8e14651df6f4ebb7655b525efc436eba8f706d9b39e40c86f9081527e8f658ba | madmax96/brave-clojure-solutions | section_3.clj | (ns clojure-brave.exercises.section_3)
1
(str "My " "awesome " "string")
(vector 1 2 3)
(list 1 2 3)
(hash-map :name "madmax" :age 23)
(hash-set :clojure :javascript :php :c++ :python)
2
(defn add-100
[num]
(+ 100 num))
(add-100 1)
3
(defn dec-maker
[num]
#(- % num))
(def dec-10 (dec-maker 10))
(dec-10 100)
... | null | https://raw.githubusercontent.com/madmax96/brave-clojure-solutions/3be234bdcf3704acd2aca62d1a46fa03463e5735/section_3.clj | clojure | (ns clojure-brave.exercises.section_3)
1
(str "My " "awesome " "string")
(vector 1 2 3)
(list 1 2 3)
(hash-map :name "madmax" :age 23)
(hash-set :clojure :javascript :php :c++ :python)
2
(defn add-100
[num]
(+ 100 num))
(add-100 1)
3
(defn dec-maker
[num]
#(- % num))
(def dec-10 (dec-maker 10))
(dec-10 100)
... | |
7a67dbd719c5e5e41c0f85408571dc0e6d72a7250aa37589df65344644f7f34f | 8c6794b6/guile-tjit | test-import-order-a.scm | (define-module (test-import-order-a)
#:use-module (base))
(push!)
| null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/standalone/test-import-order-a.scm | scheme | (define-module (test-import-order-a)
#:use-module (base))
(push!)
| |
61a5a1a11524383b7b9f4237f3f9e29964eb56afcecc343a89413603d42d8e3a | clojure-interop/java-jdk | UIResource.clj | (ns javax.swing.plaf.UIResource
"This interface is used to mark objects created by ComponentUI delegates.
The ComponentUI.installUI() and
ComponentUI.uninstallUI() methods can use this interface
to decide if a properties value has been overridden. For example, the
JList cellRenderer property is initialized b... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/UIResource.clj | clojure | (ns javax.swing.plaf.UIResource
"This interface is used to mark objects created by ComponentUI delegates.
The ComponentUI.installUI() and
ComponentUI.uninstallUI() methods can use this interface
to decide if a properties value has been overridden. For example, the
JList cellRenderer property is initialized b... | |
011945b24d65f22c970d40208ca3d7bc44cdd9cdf77076c4aba487c310b87ab7 | finnishtransportagency/harja | predikaatti.cljc | (ns harja.tyokalut.predikaatti
(:require #?@(:clj [[clojure.core.async.impl.channels :as channels-impl]
[clojure.core.async.impl.protocols :as protocols-impl]]
:cljs [[cljs.core.async.impl.channels :as channels-impl]
[cljs.core.async.impl.protocols :as p... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/src/cljc/harja/tyokalut/predikaatti.cljc | clojure | (ns harja.tyokalut.predikaatti
(:require #?@(:clj [[clojure.core.async.impl.channels :as channels-impl]
[clojure.core.async.impl.protocols :as protocols-impl]]
:cljs [[cljs.core.async.impl.channels :as channels-impl]
[cljs.core.async.impl.protocols :as p... | |
c581c43a00674d6950ac26b6a6e142f66788dd7376f2143384b4417207ef78ff | cracauer/sbcl-ita | smoke.impure.lisp | ;;;; rudimentary tests ("smoke tests") for miscellaneous stuff which
;;;; doesn't seem to deserve specialized files at the moment
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one)... | null | https://raw.githubusercontent.com/cracauer/sbcl-ita/f85a8cf0d1fb6e8c7b258e898b7af3233713e0b9/tests/smoke.impure.lisp | lisp | rudimentary tests ("smoke tests") for miscellaneous stuff which
doesn't seem to deserve specialized files at the moment
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS ... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(cl:in-package :cl-user)
ROOM should run without signalling an error . ( bug 247 )
(room)
(room t)
(room nil)
(copy-symbol 'foo)
(copy-symbol 'bar t)
(defvar *baz*... |
a6b1b9ee273bf041f37805c4aa52ccd741879349a0f49bf2ef957178ad412924 | zcaudate/hara | filter.clj | (ns hara.object.query.filter
(:require [clojure.set :as set]
[hara.core.base.check :as check]
[hara.object.element.common :as common]
[hara.object.element.class :as class]))
(defn- has-predicate?
[f value]
(f value))
(defn- has-name?
[name value]
(cond (check/regexp? name... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/object/query/filter.clj | clojure | (ns hara.object.query.filter
(:require [clojure.set :as set]
[hara.core.base.check :as check]
[hara.object.element.common :as common]
[hara.object.element.class :as class]))
(defn- has-predicate?
[f value]
(f value))
(defn- has-name?
[name value]
(cond (check/regexp? name... | |
2e05afbbc07adc48d89e70e39d2fba4ef41888cf4af99e2328ee48d1cef8cd84 | ocaml-sf/learn-ocaml-corpus | template.ml | (* The type [parser] satisfies the monad API: [return], [>>=]. *)
(* [return a] always succeeds, consumes no input, and returns [a]. *)
let return (a : 'a) : 'a parser =
(* TO DO: Define this function. *)
raise TODO
(* [p >>= f] is the sequential composition of the parsers [p] and [f]. *)
let (>>=) (p : 'a pars... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/parser_combinators/wrong/template.ml | ocaml | The type [parser] satisfies the monad API: [return], [>>=].
[return a] always succeeds, consumes no input, and returns [a].
TO DO: Define this function.
[p >>= f] is the sequential composition of the parsers [p] and [f].
TO DO: Define this function.
The type [parser] supports the nondeterminism monad API: [f... |
let return (a : 'a) : 'a parser =
raise TODO
let (>>=) (p : 'a parser) (f : 'a -> 'b parser) : 'b parser =
raise TODO
let fail : 'a parser =
fun cursor ->
raise TODO
let choose (p : 'a parser) (q : 'a parser) : 'a parser =
raise TODO
let at_most_once (p : 'a parser) : 'a parser =
raise TODO
... |
be65f264213436f20bc6cbb6febe870379dd205d36f9a133fdfaf352edfc8389 | karlll/kjell | k_io_lib_pretty.erl | %% Based on io_lib_pretty.erl
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2013 . 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 rece... | null | https://raw.githubusercontent.com/karlll/kjell/2efef6dd0bb85b11b0e79a1236ac09d281961c6e/src/k_io_lib_pretty.erl | erlang | Based on io_lib_pretty.erl
%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... |
Copyright Ericsson AB 1996 - 2013 . 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(k_io_lib_pretty).
-import(kjell... |
adf220bcf27dc8263d736aa64786c6e057bcc589b8deae583d9ac3d04ad8afae | oakes/play-cljc-examples | move.cljc | (ns dungeon-crawler.move
(:require [dungeon-crawler.tiles :as tiles]
[dungeon-crawler.entities :as e]
#?(:clj [play-cljc.macros-java :refer [gl math]]
:cljs [play-cljc.macros-js :refer-macros [gl math]])))
(def damping 0.1)
(def max-velocity 4)
(def max-enemy-velocity (/ max-v... | null | https://raw.githubusercontent.com/oakes/play-cljc-examples/76edebe22bf5d08f5eb78970dba1fd577c8be15a/dungeon-crawler/src/dungeon_crawler/move.cljc | clojure | (ns dungeon-crawler.move
(:require [dungeon-crawler.tiles :as tiles]
[dungeon-crawler.entities :as e]
#?(:clj [play-cljc.macros-java :refer [gl math]]
:cljs [play-cljc.macros-js :refer-macros [gl math]])))
(def damping 0.1)
(def max-velocity 4)
(def max-enemy-velocity (/ max-v... | |
75761537642ca93de609c7e7206b8bb0b6a02108890053d9e814cad20f79b6f6 | heyoka/faxe | esp_http_post_crate.erl | Date : 30.12.16 - 23:01
%% HTTP Post Request
Ⓒ 2019 heyoka
%% @deprecated
%%
-module(esp_http_post_crate).
-author("Alexander Minichmair").
-include("faxe.hrl").
-behavior(df_component).
%% API
-export([init/3, process/3, options/0, handle_info/2, do_send/4, shutdown/1]).
-record(state, {
host :: string(),
... | null | https://raw.githubusercontent.com/heyoka/faxe/3718245c78169a89b5be87a92e64462ea9c93233/apps/faxe/src/components/esp_http_post_crate.erl | erlang | HTTP Post Request
@deprecated
API
DATA IN
not connected -> drop message
DATA OUT
lager:warning("sending problem :~p",[_O]),
case is_process_alive(Client) of
true ->
S;
false -> {ok, C} = fusco:start(S#state.host, []), S#state{client = C}
end, | Date : 30.12.16 - 23:01
Ⓒ 2019 heyoka
-module(esp_http_post_crate).
-author("Alexander Minichmair").
-include("faxe.hrl").
-behavior(df_component).
-export([init/3, process/3, options/0, handle_info/2, do_send/4, shutdown/1]).
-record(state, {
host :: string(),
port :: non_neg_integer(),
path :: string(... |
d762aa419258add4a8ce638d20ca5160630626d1c10869d639cf642637c68c8f | martinslota/protocell | protobuf.ml | open Base
let reserved_words =
let ocaml_keywords =
[
"and";
"as";
"assert";
"asr";
"begin";
"class";
"constraint";
"do";
"done";
"downto";
"else";
"end";
"exception";
"external";
"false";
"for";
"fun";
"f... | null | https://raw.githubusercontent.com/martinslota/protocell/62545c7fb63ff76c95449ba015e40e0c3e0d94a5/src/shared/protobuf.ml | ocaml | open Base
let reserved_words =
let ocaml_keywords =
[
"and";
"as";
"assert";
"asr";
"begin";
"class";
"constraint";
"do";
"done";
"downto";
"else";
"end";
"exception";
"external";
"false";
"for";
"fun";
"f... | |
5bf490e0a004914766c3babb789d25e091f2b8b9526f14ad70bb037827baa805 | avsm/mirage-duniverse | client.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/shared-memory-ring/examples/client.ml | ocaml |
* Copyright ( C ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | |
0f31eddf73e6518fbd81ef1cd4cc1bfa64e655ab140a8e2165befd5036ecffb2 | appleby/Lisp-In-Small-Pieces | mit-book.scm | ;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is derived from the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
or Lisp In Small Pieces ( Cambridge University Press ) .
By Christian Queinnec < >
;;; The ... | null | https://raw.githubusercontent.com/appleby/Lisp-In-Small-Pieces/af4139232bb7170f32470774a92d647e83254721/mitscheme/mit-book.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is derived from the files that accompany the book:
The original sources can be downloaded from the author's website at
-systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html
This file may have been altered from the original in order to... | LISP Implantation Semantique Programmation ( InterEditions , France )
or Lisp In Small Pieces ( Cambridge University Press ) .
By Christian Queinnec < >
This file is used to customize Mit - Scheme in order to run the source files
Definitions in this section are specific to Mit - Scheme , and are ... |
a2efffe6906bf70eeaaf4d075b394ee3ed58057dfcca9fd3cba6f4c4ed37a56b | FlowForwarding/lincx | linc_us4_table_features.erl | %%------------------------------------------------------------------------------
Copyright 2012 FlowForwarding.org
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%... | null | https://raw.githubusercontent.com/FlowForwarding/lincx/7795923b51fa1e680511669f4a27404b2ed1f1dc/apps/linc_us4/src/linc_us4_table_features.erl | erlang | ------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe... | Copyright 2012 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2012 FlowForwarding.org
-module(linc_us4_table_features).
-export([handle_req/2]).
-include_lib("o... |
63faa797808a3ea4cd259c4ff3fb27c6888ed230e5eead3a183bb8898563d14d | clash-lang/clash-compiler | UndefinedConstantFoldingTB.hs | module UndefinedConstantFoldingTB where
import Clash.Prelude
import Clash.Explicit.Testbench
import qualified UndefinedConstantFolding
expected = $(lift UndefinedConstantFolding.topEntity) :> Nil
topEntity = UndefinedConstantFolding.topEntity
testBench :: Signal System Bool
testBench = done
where
expectedOutpu... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/f2077410f9f8e2eded675b3972e0fbc2709a0776/tests/shouldwork/Numbers/UndefinedConstantFoldingTB.hs | haskell | module UndefinedConstantFoldingTB where
import Clash.Prelude
import Clash.Explicit.Testbench
import qualified UndefinedConstantFolding
expected = $(lift UndefinedConstantFolding.topEntity) :> Nil
topEntity = UndefinedConstantFolding.topEntity
testBench :: Signal System Bool
testBench = done
where
expectedOutpu... | |
fdf1c4bb9dd07d181879d047e5b911cb35e5f2063127446733f68eb55917db57 | oakes/Nightweb | views_dialog.clj | (ns net.nightweb.views-dialog
(:require [neko.resource :as r]
[neko.threading :as thread]
[neko.ui :as ui]
[net.nightweb.actions :as actions]
[net.nightweb.utils :as utils]
[nightweb.constants :as c]
[nightweb.db :as db]
[nightweb.for... | null | https://raw.githubusercontent.com/oakes/Nightweb/089c7a99a9a875fde33cc29d56e1faf54dc9de84/android/src/clojure/net/nightweb/views_dialog.clj | clojure | set padding and text size
set text content
set layout params for image view and clear button
set image view and clear button parameters
return the parent view | (ns net.nightweb.views-dialog
(:require [neko.resource :as r]
[neko.threading :as thread]
[neko.ui :as ui]
[net.nightweb.actions :as actions]
[net.nightweb.utils :as utils]
[nightweb.constants :as c]
[nightweb.db :as db]
[nightweb.for... |
5acd44c41a8f87c07a3f079635b87fc0c6dcb6012397581b3998b501799cb544 | Ptival/language-ocaml | Parser.hs | module Language.OCaml.Parser
( Parser,
parseImplementation,
)
where
import Language.OCaml.Parser.Generator.Parser
( Parser,
parseImplementation,
)
| null | https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/Parser.hs | haskell | module Language.OCaml.Parser
( Parser,
parseImplementation,
)
where
import Language.OCaml.Parser.Generator.Parser
( Parser,
parseImplementation,
)
| |
7d9ecd3c874b4bf5c06b92c73c523cdaa4c422682a9e8b5a80d58717009364d8 | mfoemmel/erlang-otp | wxBitmapDataObject.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/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxBitmapDataObject.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(wxBitmapDataObject).
-include("wx... |
06614f55f8c355150ce6dd2aab512bcc003542c8e7f54c5f0a448c37a6390e97 | albertoruiz/easyVision | Auto.hs | -- generated automatically by adapter.hs
module Image.Processing.IPP.Auto where
import Image.Processing.IPP.AutoGen
import Image.Processing.IPP.Adapt
-------- arity 0 -------------
------ arity 1 -------------
{- | copy pixel values from the source image to the destination image
-}
ioCopy_8u_C1R = {-# SCC "i... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/ip/ippicv/src/Image/Processing/IPP/Auto.hs | haskell | generated automatically by adapter.hs
------ arity 0 -------------
---- arity 1 -------------
| copy pixel values from the source image to the destination image
# SCC "ippiCopy_8u_C1R" #
-- arity 2 -------------
-- inplace arity 2 ------
-------------------------- |
module Image.Processing.IPP.Auto where
import Image.Processing.IPP.AutoGen
import Image.Processing.IPP.Adapt
where f pSrc srcStep pDst dstStep roiSize = ippiCopy_8u_C1R pSrc srcStep pDst dstStep roiSize
| Converts an RGB image to gray scale ( fixed coefficients )
# SCC " ippiRGBToGray_8u_C3C1R " #
... |
717613b9d444a804591d01be5383549bd973982045d53a42a7b74e97c1555e62 | pasqu4le/clifm | Main.hs | # LANGUAGE CPP #
module Main where
import Commons
import qualified Widgets.Manager as Mngr
import qualified Widgets.Tab as Tab
import Options.Applicative
import System.Directory (doesDirectoryExist, doesFileExist, makeAbsolute)
import System.Environment (lookupEnv)
import Data.Semigroup ((<>))
import Control.Monad (v... | null | https://raw.githubusercontent.com/pasqu4le/clifm/31823e3969ae6dd9b164cb1fece6b5836d4df35f/src/Main.hs | haskell | entry point: parses the arguments and starts the brick application
options
argument parsing functions | # LANGUAGE CPP #
module Main where
import Commons
import qualified Widgets.Manager as Mngr
import qualified Widgets.Tab as Tab
import Options.Applicative
import System.Directory (doesDirectoryExist, doesFileExist, makeAbsolute)
import System.Environment (lookupEnv)
import Data.Semigroup ((<>))
import Control.Monad (v... |
475d382d95ee7799219e57ae95bb1c2899470a821c175b3bd7b6a64175391339 | adamwalker/haskell_cudd | Example.hs | import Cudd.Cudd
main = do
let manager = cuddInit
v1 = ithVar manager 0
v2 = ithVar manager 1
conj = bAnd manager v1 v2
implies = lEq manager conj v1
print implies
| null | https://raw.githubusercontent.com/adamwalker/haskell_cudd/814eb18e78d667a74d4ef65f9db1ae5cfe7acda8/examples/Example.hs | haskell | import Cudd.Cudd
main = do
let manager = cuddInit
v1 = ithVar manager 0
v2 = ithVar manager 1
conj = bAnd manager v1 v2
implies = lEq manager conj v1
print implies
| |
0ca289555473caa91a07f6353e8840df3318b608e6db6082118485fc27e8d527 | missingfaktor/akar | project.clj | (defproject akar "2.0.0"
:description "First-class patterns for Clojure"
:url "www.github.com/missingfaktor/akar"
:license {:name "Apache License 2.0"
:url "-2.0"
:distribution :repo}
:deploy-repositories [["clojars" {:url ""
... | null | https://raw.githubusercontent.com/missingfaktor/akar/66403b735cafab4e9fb971b4bf56e899ee84962f/project.clj | clojure | (defproject akar "2.0.0"
:description "First-class patterns for Clojure"
:url "www.github.com/missingfaktor/akar"
:license {:name "Apache License 2.0"
:url "-2.0"
:distribution :repo}
:deploy-repositories [["clojars" {:url ""
... | |
aaec708e8fdc81f8e119ce54acc95ff97f64f4c4cff181a6a0d59ef9f4de0750 | hexlet-basics/exercises-racket | index.rkt | #lang racket
(provide (all-defined-out))
#| BEGIN |#
(define (same-parity? x y) (equal? (even? x) (even? y)))
#| END |#
| null | https://raw.githubusercontent.com/hexlet-basics/exercises-racket/a14659088db60059532499394d40f01964aa8a4c/modules/30-logic/10-boolean-type/index.rkt | racket | BEGIN
END | #lang racket
(provide (all-defined-out))
(define (same-parity? x y) (equal? (even? x) (even? y)))
|
583863b511d28f40bed77863b4639285459353ce79d4c3141e956091786979d6 | fukamachi/getac | testcase.lisp | (defpackage #:getac/testcase
(:use #:cl
#:getac/utils)
(:export #:read-from-stream
#:read-from-file
#:default-testcase-file))
(in-package #:getac/testcase)
(defparameter *testcase-file-extension* "txt")
(defun header-line-p (line)
(let ((start (position-if (lambda (x)
... | null | https://raw.githubusercontent.com/fukamachi/getac/94473a0a4adc96b1b055633c6d78e05aa52ead6b/src/testcase.lisp | lisp | (defpackage #:getac/testcase
(:use #:cl
#:getac/utils)
(:export #:read-from-stream
#:read-from-file
#:default-testcase-file))
(in-package #:getac/testcase)
(defparameter *testcase-file-extension* "txt")
(defun header-line-p (line)
(let ((start (position-if (lambda (x)
... | |
5cf3366c931b4e75d8d028d8865d097970cbc62e5364b276cb74e528087d646b | Racket-Cookbooks/Plot-cookbook | logo.rkt | #lang racket
(require plot)
(let ([blue '(0 0 164)] [red '(164 0 0)])
(parameterize ([plot-decorations? #f])
(plot3d
(list
(surface3d (λ(x y)(/ x 10)) 0 5 0 1 #:color red #:line-color red)
(surface3d (λ(x y)(- 1 (/ (+ 1 (exp (- 5 x)))))) 0 10 0 1 #:color blue #:line-color blue))
#:angle 33... | null | https://raw.githubusercontent.com/Racket-Cookbooks/Plot-cookbook/dfe8a81a6c7a3ae7296ad4e15bf5be9a99f04b6a/examples/logo/logo.rkt | racket | #lang racket
(require plot)
(let ([blue '(0 0 164)] [red '(164 0 0)])
(parameterize ([plot-decorations? #f])
(plot3d
(list
(surface3d (λ(x y)(/ x 10)) 0 5 0 1 #:color red #:line-color red)
(surface3d (λ(x y)(- 1 (/ (+ 1 (exp (- 5 x)))))) 0 10 0 1 #:color blue #:line-color blue))
#:angle 33... | |
2eb155ee999b52f777f8465485f9fc2651a385e2a74199c22fe7502ba1871fd4 | clojure-interop/aws-api | AbstractAmazonWorkMail.clj | (ns com.amazonaws.services.workmail.AbstractAmazonWorkMail
"Abstract implementation of AmazonWorkMail. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com.am... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.workmail/src/com/amazonaws/services/workmail/AbstractAmazonWorkMail.clj | clojure | (ns com.amazonaws.services.workmail.AbstractAmazonWorkMail
"Abstract implementation of AmazonWorkMail. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com.am... | |
720ed69e73eb850cd75120f8dac28f280904b01930c3e27c4d9c46ebb2e39777 | coq/coq | uGraph.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/f09a8e92bcf3104707ec985c086276c9f76c44e3/kernel/uGraph.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
4f09d60e1fbdaa88ac0205499b58b67a188a8b8ccb6cce97c0d9cbd86a176ee4 | nunchaku-inria/nunchaku | ElimData.mli |
(* This file is free software, part of nunchaku. See file "license" for more details. *)
* { 1 Encoding of }
encode ( co)datatypes .
a [ data a = c1 x1 | ... | cn xn ] becomes a type [ a ]
plus axioms defining each constructor , selector and tester .
encode (co)datatypes.
a [data a... | null | https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/transformations/ElimData.mli | ocaml | This file is free software, part of nunchaku. See file "license" for more details. |
* { 1 Encoding of }
encode ( co)datatypes .
a [ data a = c1 x1 | ... | cn xn ] becomes a type [ a ]
plus axioms defining each constructor , selector and tester .
encode (co)datatypes.
a [data a = c1 x1 | ... | cn xn] becomes a type [a]
plus axioms defining each constructor, s... |
07a1c8e82284d1f9d39f0d83a6f779654b014fa1297031852aae6d7457eb32ef | bgamari/warc | WarcExport.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
import Data.List (isSuffixOf)
import Data.Monoid
import Control.Applicative
import System.IO
import System.FilePath
import qualified Data.ByteString.Char8 as BS
import Control.Monad.IO.Class
import Control.Monad.Catch
import Control.Lens
import Data.Text.Lens
impor... | null | https://raw.githubusercontent.com/bgamari/warc/3c08808114ef3b2f55a212ee23f3c16d41a85545/WarcExport.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE CPP #
import Data.List (isSuffixOf)
import Data.Monoid
import Control.Applicative
import System.IO
import System.FilePath
import qualified Data.ByteString.Char8 as BS
import Control.Monad.IO.Class
import Control.Monad.Catch
import Control.Lens
import Data.Text.Lens
import Pipes hiding (each)
import qualif... |
8f93cb939e3200ac5077c9bae1ff7607b9490af16e760c7bbe629b37aeba7c9b | exercism/common-lisp | sublist-test.lisp | ;; Ensures that sublist.lisp and the testing library are always loaded
(eval-when (:compile-toplevel :load-toplevel :execute)
(load "sublist")
(quicklisp-client:quickload :fiveam))
;; Defines the testing package with symbols from sublist and FiveAM in scope
;; The `run-tests` function is exported for use by both t... | null | https://raw.githubusercontent.com/exercism/common-lisp/3d6dae12234521a8847608316ae80ff7376afe7f/exercises/practice/sublist/sublist-test.lisp | lisp | Ensures that sublist.lisp and the testing library are always loaded
Defines the testing package with symbols from sublist and FiveAM in scope
The `run-tests` function is exported for use by both the user and test-runner
Enter the testing package
Define and enter a new FiveAM test-suite | (eval-when (:compile-toplevel :load-toplevel :execute)
(load "sublist")
(quicklisp-client:quickload :fiveam))
(defpackage :sublist-test
(:use :cl :fiveam)
(:export :run-tests))
(in-package :sublist-test)
(def-suite* sublist-suite)
(test empty-lists (is (eq :equal (sublist:sublist (list) (list)))))
(test li... |
41fde495fb6c2d258c36803d58eb5bf4573e94ef54059c4f07b8686d953ceb16 | ocaml-ppx/ocamlformat | expect_test.ml | let%expect_test _ = e
let%bench "test" = fun () -> ()
let%expect_test _ =
assert false ;
[%expect.unreachable]
[@@expect.uncaught_exn
{|
(* CR expect_test_collector: This test expectation appears to contain a backtrace.
This is strongly discouraged as backtraces are fragile.
Please c... | null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/expect_test.ml | ocaml | CR expect_test_collector: This test expectation appears to contain a backtrace.
This is strongly discouraged as backtraces are fragile.
Please change this test to not include a backtrace. | let%expect_test _ = e
let%bench "test" = fun () -> ()
let%expect_test _ =
assert false ;
[%expect.unreachable]
[@@expect.uncaught_exn
{|
"Assert_failure test.ml:5:6"
Raised at file "test.ml", line 4, characters 6-18
Called from file "collector/expect_test_collector.ml", line 225, characte... |
b8d5aaa04227d01db0256b26695f550a2dd2ba7ab8a0ad2da4cc9fdd5becfed5 | open-company/open-company-auth | user.clj | (ns oc.auth.unit.user
(:require [midje.sweet :refer :all]
[oc.lib.db.pool :as pool]
[oc.auth.lib.test-setup :as ts]
[oc.auth.resources.team :as team-res]
[oc.auth.resources.user :as user-res]))
;; ----- Utility Functions -----
(def team-admin "abcd-1234-abcd")
(def ne... | null | https://raw.githubusercontent.com/open-company/open-company-auth/79275bd3b877e70048a80960d7fa2d14be0abfe9/test/oc/auth/unit/user.clj | clojure | ----- Utility Functions -----
----- Tests -----
remove
is an admin
delete user
not an admin | (ns oc.auth.unit.user
(:require [midje.sweet :refer :all]
[oc.lib.db.pool :as pool]
[oc.auth.lib.test-setup :as ts]
[oc.auth.resources.team :as team-res]
[oc.auth.resources.user :as user-res]))
(def team-admin "abcd-1234-abcd")
(def new-admin "1234-abcd-1234")
(def te... |
fa62d56f20b827717de0477a90aecfa985961f7f830d95e5300b1b504520c585 | kapok-lang/kapok | kapok_erl.erl | Module for handling Erlang Abstract Code and dealing with .
-module(kapok_erl).
-export([eval_abstract_format/2,
module/4]).
-import(kapok_env, [get_compiler_opt/1]).
-include("kapok.hrl").
%% Abstract Format Evaluation
eval_abstract_format(Forms, Ctx) when is_list(Forms) ->
lists:mapfoldl(fun eval_abs... | null | https://raw.githubusercontent.com/kapok-lang/kapok/4272f990fe495e595d2afe38605dbca560bbe072/lib/kapok/src/kapok_erl.erl | erlang | Abstract Format Evaluation
needs to be extended to the full stacktrace.
eval_eval and eval_bits can call :erlang.raise/3 without the full
stacktrace. When this occurs re-add the current stacktrace so that no
stack information is lost.
Ignore stack item for current function.
The stacktrace did not include the cur... | Module for handling Erlang Abstract Code and dealing with .
-module(kapok_erl).
-export([eval_abstract_format/2,
module/4]).
-import(kapok_env, [get_compiler_opt/1]).
-include("kapok.hrl").
eval_abstract_format(Forms, Ctx) when is_list(Forms) ->
lists:mapfoldl(fun eval_abstract_format/2, Ctx, Forms);
e... |
845f1d9066507bd0a27a9ada54e8fd82a9282337ca6c632237e9872f2fc59350 | RDTK/generator | yaml.lisp | ;;;; yaml.lisp --- YAML syntax for templates and projects.
;;;;
Copyright ( C ) 2016 - 2020 Jan Moringen
;;;;
Author : < >
(cl:in-package #:build-generator.model.project)
(defun %load-yaml (file &key (root-path nil root-path-supplied?))
(let* ((source (text.source-location:make-source
fil... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/model/project/concrete-syntax/yaml.lisp | lisp | yaml.lisp --- YAML syntax for templates and projects.
Structure utilities
Syntax for a single version
Syntax for multiple versions
Includes
Loader definition macro
Person loading
Template loading
Inherit
Load required templates and finalize the object.
Project loading
Templates
Distribution loading
We a... | Copyright ( C ) 2016 - 2020 Jan Moringen
Author : < >
(cl:in-package #:build-generator.model.project)
(defun %load-yaml (file &key (root-path nil root-path-supplied?))
(let* ((source (text.source-location:make-source
file :content (read-file-into-string file)))
(builder (apply #'... |
7fae7f7351f2f5d78122db049d03d2a48d5a1f149ef2438739d21c371f68d9d8 | byorgey/haskell-course | processLec.hs | {-# LANGUAGE DeriveDataTypeable #-}
CIS 194 , F'10 , S'12 , S'13 .
-- Utility to prepare in-class versions and HTML versions of .lhs files:
-- + strip HTML comments
-- + consecutively number examples
-- + add compile date+time
--
-- See
import System.Console.CmdArgs hiding (def)
import D... | null | https://raw.githubusercontent.com/byorgey/haskell-course/f928cc8031aec2147f037949826134a484414ed6/tools/processLec.hs | haskell | # LANGUAGE DeriveDataTypeable #
Utility to prepare in-class versions and HTML versions of .lhs files:
+ strip HTML comments
+ consecutively number examples
+ add compile date+time
See
----------------------------------------------------------
Command-line arguments.
---------------------------------------... |
CIS 194 , F'10 , S'12 , S'13 .
import System.Console.CmdArgs hiding (def)
import Data.Default
import Data.List (isPrefixOf)
import qualified Data.Set as S
import Data.Time
import Text.Pandoc hiding (Target, def)
import ... |
ccbe0b22c4b1ad43e3ce5c7132c73eb9b0cf7cc1e12e36f0094763543766dde2 | earl-ducaine/cl-garnet | arrow-line.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment . ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This code ... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/gadgets/arrow-line.lisp | lisp | Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*-
; ;
This code was written as part of the Garnet project at ;;;
; ;
; ;
please contact to be put on the mailing list. ;;;
Arrow-line and Double-arrow-line
==========
Features and operation of the arrow-line:
2) The endpoint... | Arrow - line
1 ) An arrowhead appears at one end of the line .
1 ) : x1 , : y1 - one end point
6 ) : arrowhead - p - where the arrow heads should be . Legal values are :
1 - arrowhead at end - point 1
2 - arrowhead at end - point 2
3 ... |
cf1887d89ea4185b102be90f4f516c4ffeccf1fd749db563c585d9aa2efeed26 | tommaisey/aeon | t-grains.help.scm | (with-sc3
(lambda (fd)
(async fd (b-alloc-read 10 "/home/rohan/audio/metal.wav" 0 0))))
(audition
(let* ((b 10)
(trate (mouse-y kr 2 200 1 0.1))
(dur (fdiv 4 trate))
(t (impulse ar trate 0))
(i (mouse-x kr 0 (buf-dur kr b) 0 0.1)))
(out 0 (t-grains 2 t b 1 i dur 0 0.1 2))))
(audition
(let* ((b 10)
(trate... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/oscillators/t-grains.help.scm | scheme | (with-sc3
(lambda (fd)
(async fd (b-alloc-read 10 "/home/rohan/audio/metal.wav" 0 0))))
(audition
(let* ((b 10)
(trate (mouse-y kr 2 200 1 0.1))
(dur (fdiv 4 trate))
(t (impulse ar trate 0))
(i (mouse-x kr 0 (buf-dur kr b) 0 0.1)))
(out 0 (t-grains 2 t b 1 i dur 0 0.1 2))))
(audition
(let* ((b 10)
(trate... | |
b8f10dc60fe3d1d41511ba36ac346f3c90e966e39bcff85ad285e5064316f5ff | vaibhavsagar/duffer | Parser.hs | module Duffer.Loose.Parser (module Duffer.Loose.Parser) where
import Prelude hiding (take)
import Data.ByteString (ByteString, cons, pack, find
,intercalate)
import Control.Applicative ((<|>))
import Data.Attoparsec.ByteStr... | null | https://raw.githubusercontent.com/vaibhavsagar/duffer/bad9c6c6cf09f717e22d3d65f95564236896d610/duffer/src/Duffer/Loose/Parser.hs | haskell | module Duffer.Loose.Parser (module Duffer.Loose.Parser) where
import Prelude hiding (take)
import Data.ByteString (ByteString, cons, pack, find
,intercalate)
import Control.Applicative ((<|>))
import Data.Attoparsec.ByteStr... | |
c8d31b4831a0e601b9e970e8f0dcfbfaf3723d5a685c4f913423dbcc8e3ac2e8 | tsloughter/docker_compose_cth | post_suite_SUITE.erl | -module(post_suite_SUITE).
-compile(export_all).
-include_lib("stdlib/include/assert.hrl").
-include_lib("common_test/include/ct.hrl").
all() ->
[check_service].
init_per_suite(Config) ->
[{ct_hooks, [docker_compose_cth]} | Config].
end_per_suite(_Config) ->
ok.
check_service(_Config) ->
ok.
| null | https://raw.githubusercontent.com/tsloughter/docker_compose_cth/2e1519d244b2ae87f44f2b59560f28d2e9d1bc42/test/post_suite_SUITE.erl | erlang | -module(post_suite_SUITE).
-compile(export_all).
-include_lib("stdlib/include/assert.hrl").
-include_lib("common_test/include/ct.hrl").
all() ->
[check_service].
init_per_suite(Config) ->
[{ct_hooks, [docker_compose_cth]} | Config].
end_per_suite(_Config) ->
ok.
check_service(_Config) ->
ok.
| |
0ac8781257e3e61a1102590f81a91e66f986ff11c3447fceaf598b92556893db | ocsigen/tyxml | tyxml_jsx.ml | open Ppxlib.Parsetree
open Ppxlib.Asttypes
open Tyxml_syntax
let is_jsx e =
let f = function
| { attr_name = {txt = "JSX"}} -> true
| _ -> false
in
List.exists f e.pexp_attributes
When dropping support for 4.02 , this module can simply be deleted .
module String = struct
include String
let lowerca... | null | https://raw.githubusercontent.com/ocsigen/tyxml/b291463ab033086922249d175ae05a2c429f1ad7/jsx/tyxml_jsx.ml | ocaml | * Children
Convert string constant into Html.txt "constant" for convenience
* Attributes
Ignore last unit argument as tyxml api is pure
In case of doubt, use Html
matches <> ... </>;
matches <Component foo={bar}> child1 child2 </div>;
matches <div foo={bar}> child1 child2 </div>; | open Ppxlib.Parsetree
open Ppxlib.Asttypes
open Tyxml_syntax
let is_jsx e =
let f = function
| { attr_name = {txt = "JSX"}} -> true
| _ -> false
in
List.exists f e.pexp_attributes
When dropping support for 4.02 , this module can simply be deleted .
module String = struct
include String
let lowerca... |
84cefacdd0c0e6d89aa5375e7d23e1b52659387ec177beccbcc3c3f46a92315d | mbutterick/aoc-racket | test2.rkt | #lang reader "main.rkt" ★★
1212
1221
123425
123123
12131415 | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2017/d01/test2.rkt | racket | #lang reader "main.rkt" ★★
1212
1221
123425
123123
12131415 | |
6d17e9457c3cfcaf3cadd8263fdb20a9b04abad1ebb98d2b06056c210cfd1639 | digitallyinduced/ihp | Cookie.hs | |
Module : IHP.Controller . Cookie
Description : Set Cookies
Copyright : ( c ) digitally induced GmbH , 2022
Module: IHP.Controller.Cookie
Description: Set Cookies
Copyright: (c) digitally induced GmbH, 2022
-}
module IHP.Controller.Cookie (setCookie) where
import IHP.Prelude
import IHP.ControllerSupport
impor... | null | https://raw.githubusercontent.com/digitallyinduced/ihp/fe1a90d00d5e5c1c352d78b5d09cbe4cc4f771f3/IHP/Controller/Cookie.hs | haskell | | Sets a @Set-Cookie@ header
> import Web.Cookie
>
> action MyAction = do
> { setCookieName = "exampleCookie"
> }
| |
Module : IHP.Controller . Cookie
Description : Set Cookies
Copyright : ( c ) digitally induced GmbH , 2022
Module: IHP.Controller.Cookie
Description: Set Cookies
Copyright: (c) digitally induced GmbH, 2022
-}
module IHP.Controller.Cookie (setCookie) where
import IHP.Prelude
import IHP.ControllerSupport
impor... |
380ee8dcba79866b2d7c38f6b22f18e1874400c26634af0c965ceec4126de509 | Clozure/ccl-tests | class-of.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Jun 16 19:40:32 2003
;;;; Contains: Tests of CLASS-OF
(in-package :cl-test)
;;; Most tests of CLASS-OF are in other files
(deftest class-of.error.1
(signals-error (class-of) program-error)
t)
(deftest class-of.error.2
(signals-error (class-of nil nil) ... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/class-of.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of CLASS-OF
Most tests of CLASS-OF are in other files | Author :
Created : Mon Jun 16 19:40:32 2003
(in-package :cl-test)
(deftest class-of.error.1
(signals-error (class-of) program-error)
t)
(deftest class-of.error.2
(signals-error (class-of nil nil) program-error)
t)
|
fc52ccad99a06b4fe4a8307139f0ef99a6edf53ec8e5e3e545e0582370ff955d | linkfluence/inventory | queue.clj | (ns com.linkfluence.inventory.queue
(:require [gregor.core :as kafka]
[clojure.edn :as edn]
[clojure.tools.logging :as log]
[cheshire.core :refer :all])
(:import [java.util.concurrent LinkedBlockingQueue]))
(def queue-default-conf (atom {:type :linked-blocking-queue}))
... | null | https://raw.githubusercontent.com/linkfluence/inventory/b69110494f8db210d14cc7093834c441440cd4e8/src/clj/com/linkfluence/inventory/queue.clj | clojure | (ns com.linkfluence.inventory.queue
(:require [gregor.core :as kafka]
[clojure.edn :as edn]
[clojure.tools.logging :as log]
[cheshire.core :refer :all])
(:import [java.util.concurrent LinkedBlockingQueue]))
(def queue-default-conf (atom {:type :linked-blocking-queue}))
... | |
1bc5c9f8320ef6c15dfab027a4e80f46ec4822146918fd3e95fe405252590a89 | haskell/ghcup-hs | QQ.hs | # OPTIONS_GHC -Wno - orphans #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveLift #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE TemplateHaskellQuotes #-}
|
Module : GHCup . Utils . Version . QQ
Description : Version... | null | https://raw.githubusercontent.com/haskell/ghcup-hs/e1d86c77d05c3720edcbbba9e5e4cba331ce9204/lib/GHCup/Prelude/Version/QQ.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveLift #
# LANGUAGE TemplateHaskellQuotes #
-find-inerface-file-declaration-for-variable | # OPTIONS_GHC -Wno - orphans #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
|
Module : GHCup . Utils . Version . QQ
Description : Version quasi - quoters
Copyright : ( c ) , 2020
License : LGPL-3.0
Maintainer :
Stability : experimental
Portability : portable... |
9f6e0de5ee9e3a336c2251e8d1c53a0d5a04efa9d1dbdafa94ba4f85d3e49c14 | input-output-hk/cardano-sl | Settings.hs | module Cardano.Wallet.API.V1.Handlers.Settings (handlers) where
import Universum
import Servant
import Cardano.Wallet.API.Response (APIResponse, single)
import Cardano.Wallet.API.V1.Types (NodeSettings)
import Cardano.Wallet.WalletLayer (PassiveWalletLayer)
import qu... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/wallet/src/Cardano/Wallet/API/V1/Handlers/Settings.hs | haskell | | Retrieve the static settings for this node | module Cardano.Wallet.API.V1.Handlers.Settings (handlers) where
import Universum
import Servant
import Cardano.Wallet.API.Response (APIResponse, single)
import Cardano.Wallet.API.V1.Types (NodeSettings)
import Cardano.Wallet.WalletLayer (PassiveWalletLayer)
import qu... |
731e4daa8ee946cb5401947281f480fb6595c6e5ba2d2a30c2c47e87bafd6001 | kiselgra/c-mera | cxx.namespace.07.lisp | (include <iostream>)
(namespace glm
(decl ((int value-ptr))))
(decl ((int x = #:glm:value-ptr)))
(function main () -> int
(<< #:std:cout 0 #:std:endl)
(return 0))
# # 0
| null | https://raw.githubusercontent.com/kiselgra/c-mera/d06ed96d50a40a3fefe188202c8c535d6784f392/tests/cxx.namespace.07.lisp | lisp | (include <iostream>)
(namespace glm
(decl ((int value-ptr))))
(decl ((int x = #:glm:value-ptr)))
(function main () -> int
(<< #:std:cout 0 #:std:endl)
(return 0))
# # 0
| |
d6ce4d69390983ec2fb7e730b22e4ae07223cd332273aa73041aeb102201a4fb | SchornacklabSLCU/amfinder | amfMemoize.mli | AMFinder - amfMemoize.mli
*
* MIT License
* Copyright ( c ) 2021
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to
* deal in the Software without restriction , including without limi... | null | https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/1053045b431b9e9e85a7bcebea2e38cda92a8dcd/amfbrowser/sources/amfMemoize.mli | ocaml | * Memoization.
* [create f] returns a memoized version of function [f].
* Square with a thick red stroke.
* Rounded square with a dashed stroke.
* Rounded square with a lock.
* Empty square.
* Circle filled with color from a given palette.
* Rounded square with a symbol and filled with a specific color. | AMFinder - amfMemoize.mli
*
* MIT License
* Copyright ( c ) 2021
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to
* deal in the Software without restriction , including without limi... |
0f5924278210feb21d4f0bc1e6ca18f7a5964493e5747dd798a2c66d8c140799 | noinia/hgeometry | RenderUtil.hs | # LANGUAGE OverloadedLabels #
module RenderUtil where
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Trans.Reader (runReaderT)
import Data.GI.Base
import Data.GI.Base.Signals (SignalInfo, HaskellCallbackType)
import Data.IORef
import qualified Data.Text a... | null | https://raw.githubusercontent.com/noinia/hgeometry/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a/hgeometry-web/old/RenderUtil.hs | haskell | | Get an 'Reactive.Banana.Event' from
^ function to transform the Event with
we return True because the event has been
handled, don't want to propagate it
further
gets the initial canvas
redraw
registers drawing event handler | # LANGUAGE OverloadedLabels #
module RenderUtil where
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Trans.Reader (runReaderT)
import Data.GI.Base
import Data.GI.Base.Signals (SignalInfo, HaskellCallbackType)
import Data.IORef
import qualified Data.Text a... |
7e16f0ea855118db7ea27daf547ccb6bd20c2e866be499dc0626cc4d15c85d14 | nomeata/haskell-candid | Encode.hs | # LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE RecursiveDo #
module Codec.Candid.Encode (encodeValues, encodeDynValues) where
import Numeric.Natural
import qualified Data.Vector as V
import qualified Data.Text as T
import qualified Da... | null | https://raw.githubusercontent.com/nomeata/haskell-candid/cf1f3aad82bb16d348e8a2a281c48813e0eec44d/src/Codec/Candid/Encode.hs | haskell | # LANGUAGE ConstraintKinds #
| Encodes a Candid value given in the dynamic 'Value' form, at inferred type.
This may fail if the values have inconsistent types. It does not use the
@reserved@ supertype (unless explicitly told to).
Not all possible values are encodable this way. For example, all function
reference... | # LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE RecursiveDo #
module Codec.Candid.Encode (encodeValues, encodeDynValues) where
import Numeric.Natural
import qualified Data.Vector as V
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qual... |
ccbbd986047bc57683e8512f108d38a3078fcadcfdb4b1b395378ac9a0694665 | mmottl/lacaml | mat_SDCZ.mli | File : mat_SDCZ.mli
Copyright ( C ) 2002-
email :
WWW :
email :
WWW : /
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundatio... | null | https://raw.githubusercontent.com/mmottl/lacaml/2e01c0747e740e54ab9a23ea59b29ea0d929b50f/src/mat_SDCZ.mli | ocaml | Matrix operations
* [create m n] @return a matrix containing [m] rows and [n] columns.
* [make m n x] @return a matrix containing [m] rows and [n] columns
initialized with value [x].
* [of_array ar] @return a matrix initialized from the array of arrays
[ar]. It is assumed that the OCaml matrix is in row ma... | File : mat_SDCZ.mli
Copyright ( C ) 2002-
email :
WWW :
email :
WWW : /
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundatio... |
f2d367e12ff6acdbc5146aacb53dc29c6a1ac916694d645a04d4bde8c17023ec | finnishtransportagency/harja | tuck_apurit.cljs | (ns harja.testutils.tuck-apurit
"Tuckin omat testityökalut"
(:require [cljs.test :as t :refer-macros [is]]
[tuck.core :as tuck]
[cljs.core.async :as async :refer [<!]]
[harja.asiakas.kommunikaatio :as k])
(:require-macros [cljs.core.async.macros :refer [go]]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/test/cljs/harja/tuck_apurit.cljs | clojure | (ns harja.testutils.tuck-apurit
"Tuckin omat testityökalut"
(:require [cljs.test :as t :refer-macros [is]]
[tuck.core :as tuck]
[cljs.core.async :as async :refer [<!]]
[harja.asiakas.kommunikaatio :as k])
(:require-macros [cljs.core.async.macros :refer [go]]
... | |
f3e81154aa00c27ce39322490702070026f4fa576eb1665d6d251cddab06ecb6 | tonyg/kali-scheme | node.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
; --------------------
Operators (= special operators and primitives )
(define-record-type operator :operator
(make-operator type nargs uid name)
operator?
(type operator-type set-operator... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/bcomp/node.scm | scheme | --------------------
'leaf or 'internal
Improvement
(type (or type usual-operator-type))
Fixed-size limits bad, but speed good
--------------------
Operator tables (for fast dispatch)
--------------------
Nodes
A node is an annotated expression (or definition or other form).
The FORM component of a node is an S... | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
Operators (= special operators and primitives )
(define-record-type operator :operator
(make-operator type nargs uid name)
operator?
(type operator-type set-operator-type!)
(nargs operat... |
67555b75dd146917f6774002116aa4e63eabe95cb392d9ae7e0b06459c6044b0 | PEZ/rich4clojure | problem_062.clj | (ns rich4clojure.easy.problem-062
(:require [hyperfiddle.rcf :refer [tests]]))
;; = Re-implement Iterate =
;; By 4Clojure user: amalloy
;; Difficulty: Easy
Tags : [ seqs core - functions ]
;;
;; Given a side-effect free function f and an initial
;; value x write a function which returns an infinite lazy
;; sequen... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/28ea575ede8677f3a97437a646cdb3376a28ebc9/src/rich4clojure/easy/problem_062.clj | clojure | = Re-implement Iterate =
By 4Clojure user: amalloy
Difficulty: Easy
Given a side-effect free function f and an initial
value x write a function which returns an infinite lazy
sequence of x, (f x), (f (f x)), (f (f (f x))), etc.
Share your solution, and/or check how others did it: | (ns rich4clojure.easy.problem-062
(:require [hyperfiddle.rcf :refer [tests]]))
Tags : [ seqs core - functions ]
(def restricted [iterate])
(def __ :tests-will-fail)
(comment
)
(tests
(take 5 (__ #(* 2 %) 1)) := [1 2 4 8 16]
(take 100 (__ inc 0)) := (take 100 (range))
(take 9 (__ #(inc (mod % 3)) 1))... |
c3373d8f9c8a3a668f81135212deaa9d21c308da11d3658c466468173c864df4 | huangz1990/SICP-answers | 4-make-account.scm | 4-make-account.scm
(define (make-account blance password)
(let ((max-try-times 7)
(try-times 0))
(define (withdraw amount)
(if (>= blance amount)
(begin (set! blance (- blance amount))
blance)
"Insufficient funds"))
(... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/4-make-account.scm | scheme | 成功登录之后清零计数器
进行计数 | 4-make-account.scm
(define (make-account blance password)
(let ((max-try-times 7)
(try-times 0))
(define (withdraw amount)
(if (>= blance amount)
(begin (set! blance (- blance amount))
blance)
"Insufficient funds"))
(... |
d8d675e09f1902740f40f5bb12156eb3074a90d3d8ebf0582b788983b42eba8f | s-expressionists/Cleavir | convert-code.lisp | (cl:in-package #:cleavir-cst-to-ast)
;;;; The general method for processing the lambda list is as follows:
;;;; We use recursion to process the remaining lambda list. Before
;;;; the recursive call, we add the current parameters to the
;;;; environment that we pass to the recursive call. The call returns
two value... | null | https://raw.githubusercontent.com/s-expressionists/Cleavir/560dfb6b883d8d688872e1a37393ea2779879704/CST-to-AST/convert-code.lisp | lisp | The general method for processing the lambda list is as follows:
We use recursion to process the remaining lambda list. Before
the recursive call, we add the current parameters to the
environment that we pass to the recursive call. The call returns
containing the lambda list keywords, and the lexical variables
... | (cl:in-package #:cleavir-cst-to-ast)
two values : the AST that was built and a modified lambda list ,
child of a BIND - AST that indicates that the special variable
exists before the BIND - AST is created .
& OPTIONAL parameter is represented as a list of two LEXICAL - VARIABLEs .
parameter in the original ... |
89cd553917ecabb260addabdd98331bd19ec0125ea257ed0472a38cf08b4f7ed | yzhs/ocamlllvm | main_args.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/driver/main_args.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Para , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
module type Bytecomp_options =
... |
bd2224e0517097979dc05e4306a17570293315a0536deba14222e525a0f9f25d | whitequark/pry.ml | test_inj.ml | let rec fact n =
if n > 1
then (Pry.breakpoint (); n) * fact (n - 1)
else n
let _ =
fact 2
| null | https://raw.githubusercontent.com/whitequark/pry.ml/ff8d8e9861ddd67f68994c468f199643416c5f42/src_test/test_inj.ml | ocaml | let rec fact n =
if n > 1
then (Pry.breakpoint (); n) * fact (n - 1)
else n
let _ =
fact 2
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.