_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 |
|---|---|---|---|---|---|---|---|---|
45bc38de2b841a7601a53eb7a0dff785d3dd70fbd0bd49e439da1b3f4cfaf6fb | williamleferrand/accretio | ys_imagemagick.ml |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/library/server/ys_imagemagick.ml | ocaml |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 o... | |
2260ce10812b7ccfc1cf804a766687fc11e241d7393442e305894a7a6c2c8158 | hipsleek/hipsleek | main.ml | #include "xdebug.cppo"
open VarGen
(* test - added to immutability branch *)
(******************************************)
(* command line processing *)
(******************************************)
open Gen.Basic
open Globals
open HipUtil
module C = Cast
module CP = Cpure
module CF = Cformula
module M = ... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/main.ml | ocaml | test - added to immutability branch
****************************************
command line processing
****************************************
****************************************
main function
****************************************
choose parser to be used
always p... | #include "xdebug.cppo"
open VarGen
open Gen.Basic
open Globals
open HipUtil
module C = Cast
module CP = Cpure
module CF = Cformula
module M = Lexer.Make(Token.Token)
let to_java = ref false
let usage_msg = Sys.argv.(0) ^ " [options] <source files>"
let set_source_file arg =
Globals.source_files := arg :: !Global... |
950342310ac400ad9da75af577d466c735f8635aaa9fcae103aff8007b0bd618 | naveensundarg/prover | rows.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
;;; File: rows.lisp
The contents of this file are subject to the Mozilla Public License
;;; Version 1.1 (the "License"); you may not use this file except in
;;; compliance with the License. You may obtain a copy of the License at
;;; /
;;;
Software distrib... | null | https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/rows.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
File: rows.lisp
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific languag... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is SNARK .
The Initial Developer of the Original Code is SRI International .
Portions created by the Initial Developer are Copyright ( C ) 1981 - 2011 .
... |
c5c30f383aee5cce0c60fbaee9e8e2819b79ad288732c0abd942e57611d2b19b | jvf/scalaris | yaws_ls.erl | %% -*- coding: latin-1 -*-
%%%----------------------------------------------------------------------
%%% File : yaws_ls.erl
Author : < >
%%% Purpose :
Created : 5 Feb 2002 by < >
Modified : 13 Jan 2004 by < >
Modified : Jan 2006 by < >
%%%--------------------------------------------------... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/contrib/yaws/src/yaws_ls.erl | erlang | -*- coding: latin-1 -*-
----------------------------------------------------------------------
File : yaws_ls.erl
Purpose :
----------------------------------------------------------------------
if DoAllGZip == true -> alltgz() end,
yaws:address(),
Content-Type header
name
last modified
size
De... | Author : < >
Created : 5 Feb 2002 by < >
Modified : 13 Jan 2004 by < >
Modified : Jan 2006 by < >
-module(yaws_ls).
-author('').
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
-include_lib("kernel/include/file.hrl").
-export([list_directo... |
a514495c557dea1526ca47e28b9c3eef53c66c2065b93954c0bd8eb53f2f8ed3 | ludat/conferer | Null.hs | -- |
Copyright : ( c ) 2019
-- License: MPL-2.0
Maintainer : < >
-- Stability: stable
-- Portability: portable
--
-- Do nothing source
module Conferer.Source.Null where
import Conferer.Source
-- | Stub source that has no keys
data NullSource = NullSource
{ nullExplainNotFound :: Key -> String
}
instan... | null | https://raw.githubusercontent.com/ludat/conferer/13af5727c3b34779e87a1bdb4b0f247581ce4bc4/packages/conferer/src/Conferer/Source/Null.hs | haskell | |
License: MPL-2.0
Stability: stable
Portability: portable
Do nothing source
| Stub source that has no keys | Copyright : ( c ) 2019
Maintainer : < >
module Conferer.Source.Null where
import Conferer.Source
data NullSource = NullSource
{ nullExplainNotFound :: Key -> String
}
instance Show NullSource where
show _ = "NullSource"
instance IsSource NullSource where
getKeyInSource _source _key =
return N... |
1a921a6d34af430f3f7ca7e09b6e4cb9de0395b99d97fa384de51d9dd1a3c540 | datastax/cass-config-builder | render_test.clj | ;; Copyright DataStax, Inc.
;; Please see the included license file for details.
(ns com.datastax.configbuilder.render-test
(:require [com.datastax.configbuilder.render :as r]
[com.datastax.configbuilder.test-data :as test-data]
[com.datastax.configbuilder.test-helpers :as helper]
... | null | https://raw.githubusercontent.com/datastax/cass-config-builder/88623cca0c09b510a6e363c4c7579ffa7d773344/test/com/datastax/configbuilder/render_test.clj | clojure | Copyright DataStax, Inc.
Please see the included license file for details.
What happens when a key exists in config-data for which there is no corresponding key
in definitions? The answer - an exception is thrown! |
(ns com.datastax.configbuilder.render-test
(:require [com.datastax.configbuilder.render :as r]
[com.datastax.configbuilder.test-data :as test-data]
[com.datastax.configbuilder.test-helpers :as helper]
[slingshot.test :refer :all]
[clojure.test :refer :all]))
(deftest ... |
0ddb0a75fac9da5f67a47e4f17220a2766a1ff2440a68c0d4778af3176266784 | bennn/dissertation | sequencer.rkt | #lang typed/racket/base
(require require-typed-check
"typed-data.rkt")
(require/typed/check "array-struct.rkt"
[build-array (-> Indexes (-> Indexes Flonum) Array)])
(require/typed/check "array-transform.rkt"
[array-append* ((Listof Array) -> Array)])
(require/typed/check "synth.rkt"
[fs Natural])
(r... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/QA/math-test/synth/d-d/sequencer.rkt | racket | A note is represented using the number of semitones from C0.
Single note.
Accepts notes or pauses, but not chords.
pause
repeats n times the sequence encoded by the pattern, at tempo bpm
pattern is a list of either single notes (note . duration) or
chords ((note ...) . duration) or pauses (#f . duration)
repeat... | #lang typed/racket/base
(require require-typed-check
"typed-data.rkt")
(require/typed/check "array-struct.rkt"
[build-array (-> Indexes (-> Indexes Flonum) Array)])
(require/typed/check "array-transform.rkt"
[array-append* ((Listof Array) -> Array)])
(require/typed/check "synth.rkt"
[fs Natural])
(r... |
6d568f64246ac9826a70642f888a44623ba3d686aaa4d1372098f6e5d9ac1558 | ghcjs/jsaddle-dom | SVGPathSegCurvetoCubicSmoothAbs.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGPathSegCurvetoCubicSmoothAbs
(setX, getX, setY, getY, setX2, getX2, setY2, getY2,
SVGPathSegCurvetoCubic... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGPathSegCurvetoCubicSmoothAbs.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/SVGPathSegCurvetoCubicSmoothAbs.x Mozilla SVGPathSegCurvetoCubicSmoothAbs.x documentation>
| <-US/docs/Web/API/SVGPathSegCurvetoCubicSmoothAbs.x Mozilla SVGPathSegCurvetoCubicSmoothAbs.x documentation>
... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.SVGPathSegCurvetoCubicSmoothAbs
(setX, getX, setY, getY, setX2, getX2, setY2, getY2,
SVGPathSegCurvetoCubicSmoothAbs(..),
gTypeSVGPathSegCurvetoCubicSmoothAbs)
where
import Prelude ((.), (==)... |
f84a64f6c4d2418a68e3ff35b2ba15c864eb0013b59960a6c5a538323954dac1 | blarney-lang/actora | Core.hs | module Core where
-- Blarney imports
import Blarney
import Blarney.Recipe
import Blarney.Queue
import Blarney.Stream
-- Local imports
import Util
import Stack
import Types
import Decode
-- Circuit-generator parameters
#include <Config.h>
Core implementation
-- ===================
makeCore :: Stream (Bit 8) -> Mo... | null | https://raw.githubusercontent.com/blarney-lang/actora/a5380662a55952c19f82e08c4dce25ad98390bdf/rtl/Core.hs | haskell | Blarney imports
Local imports
Circuit-generator parameters
===================
Instruction memory
Value stack
Debug output queue
Stall pipeline
Unconditional jump destination
Pointer to next instruction to fetch
Trigger decode stage
Trigger execute stage
Instruction register
Pointer to end of heap
Condit... | module Core where
import Blarney
import Blarney.Recipe
import Blarney.Queue
import Blarney.Stream
import Util
import Stack
import Types
import Decode
#include <Config.h>
Core implementation
makeCore :: Stream (Bit 8) -> Module (Stream (Bit 8))
makeCore debugIn = do
instrMem :: RAM InstrPtr Instr <- makeRAMInit... |
5cbce9fb8696aa881be29657ef241af7dfb3c5d6a87e912cef9275cfc3983111 | tanakh/ICFP2011 | KyoukoReviveFirstAttack.hs | {-# OPTIONS -Wall #-}
import Control.Applicative
import qualified Control.Exception.Control as E
import Control.Monad
import Data.List
import Data.Maybe
import LTG
import LTG.SoulGems
getFirstWorthEnemy :: Int -> LTG (Maybe Int)
getFirstWorthEnemy dmg = do
alives <- filterM
(\ix -> do
... | null | https://raw.githubusercontent.com/tanakh/ICFP2011/db0d670cdbe12e9cef4242d6ab202a98c254412e/ai/KyoukoReviveFirstAttack.hs | haskell | # OPTIONS -Wall #
f1, f2, f3: temp
f4, f5
target: zombie target
next = v[f2] <- S (lazy_apply Copy f4) succ
f = v[f4] <- S (lazy_apply Copy f5) I
S (S help I) (S (K copy) (K 6))
num f1 f5
clear f4
f4 $< Copy
lazyApply f4 f1
S $> f4
f4 $< I
v[f4] <- S f next
v[f1] <- S (lazyApply Copy f4) (lazyApp... | import Control.Applicative
import qualified Control.Exception.Control as E
import Control.Monad
import Data.List
import Data.Maybe
import LTG
import LTG.SoulGems
getFirstWorthEnemy :: Int -> LTG (Maybe Int)
getFirstWorthEnemy dmg = do
alives <- filterM
(\ix -> do
al <- isAlive False ix... |
1edb694569d2943db0feff10a83c1b1cf4fe5ab74cc4672d241fb33e40df1876 | hemmi/coq2scala | nameops.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/library/nameops.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Identifiers and names
* remove tr... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
val pr_id : ident... |
150497e963d03de1c8387d40927e2cebcd4f94905dea7f01625d508a0891a039 | flyingmachine/arenaverse | user.clj | (ns arenaverse.data-mappers.user
(:require [arenaverse.data-mappers.db :as db]
[cemerick.friend :as friend]
(cemerick.friend [workflows :as workflows]
[credentials :as creds]
[openid :as openid])))
(db/add-db-reqs)
(let [collection-nam... | null | https://raw.githubusercontent.com/flyingmachine/arenaverse/6742c4112f6ec83fb272b1b352868394a8879a07/src/arenaverse/data_mappers/user.clj | clojure | handle password updating | (ns arenaverse.data-mappers.user
(:require [arenaverse.data-mappers.db :as db]
[cemerick.friend :as friend]
(cemerick.friend [workflows :as workflows]
[credentials :as creds]
[openid :as openid])))
(db/add-db-reqs)
(let [collection-nam... |
302098bff45c201b3bed46d4180b14ac287c9560b6c1534450ea96c16e7ae3e7 | brendanhay/gogol | Advancetestorder.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Orders/Advancetestorder.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Resource
** Constructing a Request
| A resource alias for @content.orders.advancetestorder@ method which the
'ContentOrdersAdvancetestorder' request conforms to.
/See:/ 'newContentOrdersAdvancetestorder' smart constructor.... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
402a436e419aca61d3fed8c0aa8dc075c6916a7f46226f8befc9c6ab66e4ade6 | open-telemetry/opentelemetry-erlang | otel_aggregation_histogram_explicit.erl | %%%------------------------------------------------------------------------
Copyright 2022 , OpenTelemetry Authors
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
%%
%% Unl... | null | https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/6a29857f39ebf027bb77bc9a59d752d4a52eef11/apps/opentelemetry_experimental/src/otel_aggregation_histogram_explicit.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 o... | Copyright 2022 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(otel_aggregation_histogram_explicit).
-behaviour(otel_aggregation).
-export([init/2,
aggregate/4,
checkpoint... |
d319966e72e2137f70f6657b8790e8e5bae50dc4ef4e439337ab372a22cd0fc9 | dxtr/clsql | oodml.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;;
;;;; The CLSQL Object Oriented Data Manipulation Language (OODML).
;;;;
This file is part of CLSQL .
;;;;
CLSQL users are granted the rights to distribute and use thi... | null | https://raw.githubusercontent.com/dxtr/clsql/8061aae1ecb878954115c7aacd90685a65bf4107/sql/oodml.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
The CLSQL Object Oriented Data Manipulation Language (OODML).
(), also known as the LLGPL.
*************************************************************************
we found it directly or it'... | This file is part of CLSQL .
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public License
(in-package #:clsql-sys)
(defun find-normalized-key (obj)
"Find the first / primary key of a normalized object"
(find-slot-if obj #'key-slot-p T ... |
3923e8406b8c7b3cd95b1522487486886e96f9681d8a0e41bd5106210b191373 | jrh13/hol-light | pa_f.ml | (* ------------------------------------------------------------------------- *)
Some additional infixes to support 's " Mizar Light " .
(* ------------------------------------------------------------------------- *)
open Pcaml;
Pcaml.syntax_name.val := "Freek";
Format.print_string "New infixes se... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Mizarlight/pa_f.ml | ocaml | -------------------------------------------------------------------------
------------------------------------------------------------------------- | Some additional infixes to support 's " Mizar Light " .
open Pcaml;
Pcaml.syntax_name.val := "Freek";
Format.print_string "New infixes set up";
Format.print_newline();
EXTEND
expr: AFTER "<"
[[ f = expr; "by"; g = expr -> <:expr< ((by $f$) $g$) >>
| f = expr; "st'"; g = expr -> <:expr< ... |
a8838f5630b676109755a4e5cbbb986717bb65b043daa3193a595a7d318a63d0 | dgiot/dgiot | dgiot_gb26875_tcp.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy... | null | https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_gb26875/src/dgiot_gb26875_tcp.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_gb26875_tcp).
-author("stoneliu").
-include("dgiot_gb26875.hrl").
-include_lib("d... |
6c254a7ed3d66c0e356d1abc36391139f785028cd1aeeaa853ba5f35661c5499 | nyinyithann/favemarks | state.mli | type t
val create : unit -> t
val get_mode : t -> Model.mode option
val set_mode : t -> Model.mode option -> unit
val get_total_count : t -> int
val set_total_count : t -> int -> unit
val get_search_count : t -> int option
val set_search_count : t -> int option -> unit
val get_total_pages : t -> int
val set_total_page... | null | https://raw.githubusercontent.com/nyinyithann/favemarks/55fb52d4f3efeae8ef478f1fe098456196e80dea/src/store/state.mli | ocaml | type t
val create : unit -> t
val get_mode : t -> Model.mode option
val set_mode : t -> Model.mode option -> unit
val get_total_count : t -> int
val set_total_count : t -> int -> unit
val get_search_count : t -> int option
val set_search_count : t -> int option -> unit
val get_total_pages : t -> int
val set_total_page... | |
98e2a58365b6f3ed56bb72c4094806ff39e8cbfb9b22295b58802a849b755971 | Operational-Transformation/ot.hs | OperationalTransformation.hs | # LANGUAGE MultiParamTypeClasses , FlexibleInstances , FunctionalDependencies #
module Control.OperationalTransformation
( OTOperation (..)
, OTComposableOperation (..)
, OTCursor (..)
, OTSystem (..)
) where
import Control.Monad (foldM)
class OTOperation op where
| Transforms two concurrent operations /... | null | https://raw.githubusercontent.com/Operational-Transformation/ot.hs/4a0ca8f1e3f59fd8ce0e6cfd95633940d4e22f88/src/Control/OperationalTransformation.hs | haskell | such that @b' ∘ a == a' ∘ b@.
another.
| Apply an operation to a document, producing a new document.
| Cursor position | # LANGUAGE MultiParamTypeClasses , FlexibleInstances , FunctionalDependencies #
module Control.OperationalTransformation
( OTOperation (..)
, OTComposableOperation (..)
, OTCursor (..)
, OTSystem (..)
) where
import Control.Monad (foldM)
class OTOperation op where
| Transforms two concurrent operations /... |
1018f45c6193c6a4df2da1945a8e8608e471bac70a8722d089f95bd90c726dae | serokell/blockchain-util | Helpers.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE UndecidableSuperClasses #
| Primitive operations inside ERoComp . Utilities to modify context of compiutation .
module Snowdrop.Core.ERoComp.Hel... | null | https://raw.githubusercontent.com/serokell/blockchain-util/a6428c6841e7002605a115002f58eff78ff9f128/snowdrop-core/src/Snowdrop/Core/ERoComp/Helpers.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE Rank2Types #
# LANGUAGE ScopedTypeVariables #
--------------------------------------------------
--------------------------------------------------
| Creates a DbQuery operation.
| Creates a DbIterator operation.
| Creates a DbComputeUndo operation.
|... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableSuperClasses #
| Primitive operations inside ERoComp . Utilities to modify context of compiutation .
module Snowdrop.Core.ERoComp.Helpers
( HasBException
, HasBExceptions
, QueryERo
, query
, iterator
, queryOne
... |
18bb4e2969180bb17c86382ff850dcde0c82f5e273b16545fec6222cdb8ed9e2 | janestreet/rpc_parallel | wrap_test.ml | open Core
open Async
module Worker = struct
module T = struct
type 'worker functions = { ping : ('worker, unit, unit) Rpc_parallel.Function.t }
module Worker_state = struct
type init_arg = unit [@@deriving bin_io]
type t = unit
end
module Connection_state = struct
type init_arg = ... | null | https://raw.githubusercontent.com/janestreet/rpc_parallel/b37ce51ddfd9d9b6f96d285c81db7fc36d66a1d5/test/wrap_test.ml | ocaml | open Core
open Async
module Worker = struct
module T = struct
type 'worker functions = { ping : ('worker, unit, unit) Rpc_parallel.Function.t }
module Worker_state = struct
type init_arg = unit [@@deriving bin_io]
type t = unit
end
module Connection_state = struct
type init_arg = ... | |
06ee6bc553fb17f35797b6ee3c209ec3d770100c249a7b03a5319b59dc9c6c3c | cirodrig/triolet | TIMonad.hs |
module Untyped.TIMonad where
import Control.Applicative
import Control.Monad.Reader
import Control.Monad.RWS
import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.IORef
import System.IO.Unsafe
import Text.PrettyPrint.HughesPJ
import Common.Error
import Common.Identifier
import Common.Supply
i... | null | https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/Untyped/TIMonad.hs | haskell | | Type information assigned to a type variable.
^ A non-unifiable type variable
^ A type constructor. The flag is true iff
the constructed type is boxed.
^ A type class
^ A type family
^ A polymorphic variable
^ A monomorphic variable
^ A recursive variable whose value is
given by the placeholder
^ A d... |
module Untyped.TIMonad where
import Control.Applicative
import Control.Monad.Reader
import Control.Monad.RWS
import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.IORef
import System.IO.Unsafe
import Text.PrettyPrint.HughesPJ
import Common.Error
import Common.Identifier
import Common.Supply
i... |
333e69fce870c6f955da127879f1cb367e0cf0a72ffc934bc98582d98a1f22ba | pmai/Deflate | deflate.lisp | Deflate --- RFC 1951 Deflate Decompression
;;;;
Copyright ( C ) 2000 - 2020 PMSF IT Consulting .
;;;;
;;;; 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 , in... | null | https://raw.githubusercontent.com/pmai/Deflate/fb940e63b89a6c4d168153dbf046552e106eb8a5/deflate.lisp | lisp |
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLIED,... | Deflate --- RFC 1951 Deflate Decompression
Copyright ( C ) 2000 - 2020 PMSF IT Consulting .
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
... |
bf753a59dba5f7bf68cecaa3803aa2e3e24c9e2fd5e8092b9b655c8ccd166463 | racket/compiler | embed-me17a.rkt | #lang racket
(define print-17
(lambda () (printf "This is 17.\n")))
(module+ sub
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
print-17
#:exists 'append))
| null | https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-test/tests/compiler/embed/embed-me17a.rkt | racket | #lang racket
(define print-17
(lambda () (printf "This is 17.\n")))
(module+ sub
(with-output-to-file (build-path (find-system-path 'temp-dir) "stdout")
print-17
#:exists 'append))
| |
86602393fa3ed25162c14c57442cc5e4d4da0799ffe60b0446adda1223b58dc7 | jixiuf/helloerlang | release_h.erl | -module(release_h).
-export([start/2,stop/1]).
-vsn("0.1").
start(normal,_Args)->
hello_sup:start_link()
.
stop(_)->
ok
.
| null | https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/release_handle/release_h/src/release_h.erl | erlang | -module(release_h).
-export([start/2,stop/1]).
-vsn("0.1").
start(normal,_Args)->
hello_sup:start_link()
.
stop(_)->
ok
.
| |
acf3c4d751bd55c22db6157ccd1f57718a983e9122107c8b78555ad8a5146072 | blindglobe/clocc | csv.lisp | ;;; read/write comma-separated values
;;;
Copyright ( C ) 2003 - 2009 by
This is Free Software , covered by the GNU GPL ( v2 + )
;;; See
;;;
$ I d : csv.lisp , v 2.27 2009/03/09 20:51:46 sds Exp $
;;; $Source: /cvsroot/clocc/clocc/src/cllib/csv.lisp,v $
(eval-when (:compile-toplevel :load-toplevel :execute)
... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/cllib/csv.lisp | lisp | read/write comma-separated values
See
$Source: /cvsroot/clocc/clocc/src/cllib/csv.lisp,v $
`with-collect'
`with-timing', `log'
otherwise NIL = missing
empty line
comment line
print <*...*> when we expect to reach limit
,~:* ~:d line~:p dropped~]]"
defstruct i/o
file csv.lisp ends here | Copyright ( C ) 2003 - 2009 by
This is Free Software , covered by the GNU GPL ( v2 + )
$ I d : csv.lisp , v 2.27 2009/03/09 20:51:46 sds Exp $
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :cllib-base (translate-logical-pathname "clocc:src;cllib;base"))
(require :cllib-simple (translate-l... |
b952a9ee801a552b5048129884798863011020b029b8d528418aa08f7d8a5d86 | BillHallahan/G2 | POPL.hs | {-# LANGUAGE BangPatterns #-}
module POPL where
import Prelude hiding (zipWith, filter, head, zip, foldr, take, sum, (!!))
1 ) Basic Symbolic Execution
zip :: [a] -> [b] -> [(a, b)]
zip [] _ = []
zip _ [] = []
zip (x:xs) (y:ys) = (x, y) : zip xs ys
2 ) Lazy evaluation
inGe0 :: Int -> Int -> Bool
inGe0 x _ = ... | null | https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/tests/BaseTests/POPL.hs | haskell | # LANGUAGE BangPatterns #
Supposed to return a list of numbers that are k mod n
[0..] |
module POPL where
import Prelude hiding (zipWith, filter, head, zip, foldr, take, sum, (!!))
1 ) Basic Symbolic Execution
zip :: [a] -> [b] -> [(a, b)]
zip [] _ = []
zip _ [] = []
zip (x:xs) (y:ys) = (x, y) : zip xs ys
2 ) Lazy evaluation
inGe0 :: Int -> Int -> Bool
inGe0 x _ = x >= 0
is4Mod6 :: Int -> Int ... |
5bd5718624aff3c11b8864dbf6afec276a8db9e19659e368b37bba5045d6ca31 | rabbitmq/credentials-obfuscation | credentials_obfuscation_app.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2019 - 2022 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(credentials_obfuscation_app).
-behaviour... | null | https://raw.githubusercontent.com/rabbitmq/credentials-obfuscation/27eddb1b1d0fade5ac020ab3f22c4ffa62861085/src/credentials_obfuscation_app.erl | erlang | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2019 - 2022 VMware , Inc. or its affiliates . All rights reserved .
-module(credentials_obfuscation_app).
-behaviour(appli... | |
258f5a577247d3e5d06598a25c6a93ba9e55f97d398ab106ad22a85d738590a2 | cyverse-archive/DiscoveryEnvironmentBackend | jobs.clj | (ns metadactyl.service.apps.de.jobs
(:use [clojure-commons.file-utils :only [build-result-folder-path]]
[kameleon.jobs :only [get-job-type-id save-job save-job-step]]
[kameleon.queries :only [get-user-id]]
[korma.core :only [sqlfn]]
[korma.db :only [transaction]]
[medley.core :... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/service/apps/de/jobs.clj | clojure | (ns metadactyl.service.apps.de.jobs
(:use [clojure-commons.file-utils :only [build-result-folder-path]]
[kameleon.jobs :only [get-job-type-id save-job save-job-step]]
[kameleon.queries :only [get-user-id]]
[korma.core :only [sqlfn]]
[korma.db :only [transaction]]
[medley.core :... | |
4271434330cf2b72fa7fe585fc8222caecec0a877faa6acf80204660fff80bfa | pauleve/pint | an_bifurcations.ml |
open Debug
open PintTypes
open LocalCausalityGraph
open AutomataNetwork
open An_reach
open An_reach_asp
open ASP_solver
open Pn_mci
let asp_transitions asp trs =
let asp_of_trstate pred trid state =
String.concat ". " (List.map (fun (a,i) ->
pred^"("^string_of_int trid^","
... | null | https://raw.githubusercontent.com/pauleve/pint/7cf943ec60afcf285c368950925fd45f59f66f4a/anlib/an_bifurcations.ml | ocaml | build full lcg
push local states definition
reference boolean automata
push transitions definition
push generic rules for under-approximation
push goal
push initial state |
open Debug
open PintTypes
open LocalCausalityGraph
open AutomataNetwork
open An_reach
open An_reach_asp
open ASP_solver
open Pn_mci
let asp_transitions asp trs =
let asp_of_trstate pred trid state =
String.concat ". " (List.map (fun (a,i) ->
pred^"("^string_of_int trid^","
... |
1dd7e3b5c090ec575b0699f148c993f8ccf19145687c3a5a03e3a12456b76f5f | byorgey/AoC | 23.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE TemplateHaskell #
import Data.Array
import Control.Lens
import Control.Monad.Except
import Control.Monad.State
import Control.Monad.Writer
import qualified Data.Map as M
import ... | null | https://raw.githubusercontent.com/byorgey/AoC/30eb51eb41af9ca86b05de598a3a96d25bd428e3/2016/23/23.hs | haskell | # LANGUAGE LambdaCase # | # LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
import Data.Array
import Control.Lens
import Control.Monad.Except
import Control.Monad.State
import Control.Monad.Writer
import qualified Data.Map as M
import Data.Maybe
import ... |
d80e061f6847bc921bf09a551dd2f05ee07bfe24a5ecfa19a3114e6f649bfc3f | patrikja/AFPcourse | Shallow.hs | {-|
A simple embedded language for input/output. Shallow embedding.
-}
module Program.Shallow
( Input, Output
, Program
, putC, getC
, run
) where
import Control.Applicative (Applicative(..))
import Control.Monad (liftM, ap)
type Input = String
type Output = String
-- | Shallow embedding: programs... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L3/after/src/2015/Program/Shallow.hs | haskell | |
A simple embedded language for input/output. Shallow embedding.
| Shallow embedding: programs are represented by their semantics
In this case a program is a function from the input to the
result, the remaining input and the output.
| Print a character.
| Read a character (if there is one).
sequencing pr... | module Program.Shallow
( Input, Output
, Program
, putC, getC
, run
) where
import Control.Applicative (Applicative(..))
import Control.Monad (liftM, ap)
type Input = String
type Output = String
type IOSem a = Input -> (a, Input, Output)
newtype Program a = P { unP :: IOSem a }
putC :: Char -> Prog... |
dccdd5f1d9134d9e8a221bebdaef1e6335e0f8145e333d7f770cfc9d6a268f60 | SquidDev/urn | graph.lisp | (import compiler/nodes compiler)
(import compiler/pass ())
(import compiler/resolve compiler)
(import io)
(import data/graph ())
(defmethod (pretty var) (var) (.> var :full-name))
(defpass generate-dependency-graph (state nodes)
"Emit an out.dot file, tracking the dependencies between functions."
:cat '("war... | null | https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/plugins/graph.lisp | lisp | (import compiler/nodes compiler)
(import compiler/pass ())
(import compiler/resolve compiler)
(import io)
(import data/graph ())
(defmethod (pretty var) (var) (.> var :full-name))
(defpass generate-dependency-graph (state nodes)
"Emit an out.dot file, tracking the dependencies between functions."
:cat '("war... | |
2db343cbc6f6c239b8748ebff450369ed7524c7ffb337fbf18c566cab1eefffd | janestreet/ecaml | ediff.ml | open! Core
open! Import
let buffers =
let buffers =
Funcall.Wrap.(
"ediff-buffers" <: Buffer.t @-> Buffer.t @-> list Function.t @-> return nil)
in
fun ~a ~b ~startup_hooks ->
let startup_hooks = List.map startup_hooks ~f:(Defun.lambda_nullary_nil [%here]) in
Async_ecaml.Private.run_outside_asyn... | null | https://raw.githubusercontent.com/janestreet/ecaml/bd95b93799ccf809be26436b8379410c29282c4f/src/ediff.ml | ocaml | open! Core
open! Import
let buffers =
let buffers =
Funcall.Wrap.(
"ediff-buffers" <: Buffer.t @-> Buffer.t @-> list Function.t @-> return nil)
in
fun ~a ~b ~startup_hooks ->
let startup_hooks = List.map startup_hooks ~f:(Defun.lambda_nullary_nil [%here]) in
Async_ecaml.Private.run_outside_asyn... | |
b9d3860d93a662d0be8ca6096f7726180df360473931be97360d6719f97d178f | Kalimehtar/gtk-cffi | entry.lisp | ;;;
entry.lisp -- GtkEditable , GtkEntry , GtkEntryBuffer , GtkEntryCompletion
;;;
Copyright ( C ) 2012 , < >
;;;
(in-package :gtk-cffi)
(defclass editable (object)
())
(defslots editable
(editable-position . position) :int
(is-editable . editable) :boolean)
(deffuns editable
(select-region :void (st... | null | https://raw.githubusercontent.com/Kalimehtar/gtk-cffi/fbd8a40a2bbda29f81b1a95ed2530debfe2afe9b/gtk/entry.lisp | lisp | entry.lisp -- GtkEditable , GtkEntry , GtkEntryBuffer , GtkEntryCompletion
Copyright ( C ) 2012 , < >
(in-package :gtk-cffi)
(defclass editable (object)
())
(defslots editable
(editable-position . position) :int
(is-editable . editable) :boolean)
(deffuns editable
(select-region :void (start :int) (e... | |
95bece2bf129733d10375b2c8e7c1a178bcab027dc1cfb13462769af5db5c895 | aeternity/aeternity | aeminer_pow_eqc_tests.erl | -module(aeminer_pow_eqc_tests).
-include_lib("eunit/include/eunit.hrl").
quickcheck_test_() ->
aeeqc_eunit:props_mod_test_repr(?MODULE_STRING, fun testing_time_ms/1).
testing_time_ms(PropName) when is_atom(PropName) ->
aeeqc_eunit:testing_time_multiplier() * 500.
| null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/eqc_test/src/aeminer_pow_eqc_tests.erl | erlang | -module(aeminer_pow_eqc_tests).
-include_lib("eunit/include/eunit.hrl").
quickcheck_test_() ->
aeeqc_eunit:props_mod_test_repr(?MODULE_STRING, fun testing_time_ms/1).
testing_time_ms(PropName) when is_atom(PropName) ->
aeeqc_eunit:testing_time_multiplier() * 500.
| |
a2c9a85974ba0beb6365deb4cbb748885db9150dd5558b4d88497459ae502d00 | helpshift/kodai | pipeline.clj | (ns kodai.core.pipeline
(:require [clojure.set :as set]
[kodai.core.format :as format]))
(defn remove-vars
"removes all references of var from call graph
(remove-vars {:a #{:b}
:b #{:a}
:c #{:a :b}} #{:a})
=> {:b #{}, :c #{:b}}"
{:added "0.1"}
[calls vars]
... | null | https://raw.githubusercontent.com/helpshift/kodai/b04961a45039401b6e2eebf8afc0600a19c9f76b/src/kodai/core/pipeline.clj | clojure | reverse-calls
select-vars - find-downstream-vars (union entries) pick-vars
select-namespaces - find-namespace-vars pick-vars
collapse-vars - find-downstream-vars remove-vars
hide-namespaces - find-namespace-vars remove-vars
hide-vars - remove-vars
hide-singletons - find-singletons remove-vars
hide-dynamic - fin... | (ns kodai.core.pipeline
(:require [clojure.set :as set]
[kodai.core.format :as format]))
(defn remove-vars
"removes all references of var from call graph
(remove-vars {:a #{:b}
:b #{:a}
:c #{:a :b}} #{:a})
=> {:b #{}, :c #{:b}}"
{:added "0.1"}
[calls vars]
... |
1bd5d295bc1ab174a766eba59f6868fc2e1baae5df74a5aa08855590cfd2c421 | deadpendency/deadpendency | Config.hs | module DF.Model.Config
( Config (..),
)
where
import Common.Model.GitHub.GHAppId
data Config = Config
{ _redisDatabaseHost :: Text,
_githubPrivateKeySecretName :: Text,
_appId :: GHAppId
}
deriving stock (Generic)
| null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-fetcher/src/DF/Model/Config.hs | haskell | module DF.Model.Config
( Config (..),
)
where
import Common.Model.GitHub.GHAppId
data Config = Config
{ _redisDatabaseHost :: Text,
_githubPrivateKeySecretName :: Text,
_appId :: GHAppId
}
deriving stock (Generic)
| |
742358d61d6463d413f83f6b369eee7785775ab486ace36a2b9f887f5d6aa89c | inria-parkas/sundialsml | dense.ml |
open Sundials
open Bigarray
module M = Matrix.Dense
let printf = Format.printf
let fprintf = Format.fprintf
let print_mat out m =
let (nr, nc) = M.size m in
fprintf out "@[<v>";
for i = 0 to nr - 1 do
fprintf out "@[<h>";
for j = 0 to nc - 1 do
fprintf out "@ % e" (M.get m i j)
done;
fpri... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/0c46b0c6c067677af6ef8006260b9e697cc0562b/examples/ocaml/linear/dense.ml | ocaml |
open Sundials
open Bigarray
module M = Matrix.Dense
let printf = Format.printf
let fprintf = Format.fprintf
let print_mat out m =
let (nr, nc) = M.size m in
fprintf out "@[<v>";
for i = 0 to nr - 1 do
fprintf out "@[<h>";
for j = 0 to nc - 1 do
fprintf out "@ % e" (M.get m i j)
done;
fpri... | |
b962cccc2b64dbd16940be8ccc266e5ffd0dcd91e6486a495e1d535f3ef514cb | lasp-lang/partisan | partisan_peer_service_client.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the ... | null | https://raw.githubusercontent.com/lasp-lang/partisan/968f72de16ebe20f18cc8b287497b6dd3789f9ab/src/partisan_peer_service_client.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(partisan_peer_service... |
4a569d8a07cbcd13812c442889a60393f29a27c9c2cf23b855bfe5baf78f80ec | alex-hhh/ActivityLog2 | al2-climb-analysis.rkt | #lang racket/gui
SPDX - License - Identifier : GPL-3.0 - or - later
;;
;; climb-analisys-tool.rkt -- tool to analyze climbs in GPX files
see -hhh.github.io/2021/04/climb-analysis-tool.html
;;
This file is part of AL2 - Climb - Analysis
Copyright ( c ) 2021 , 2022 < >
;;
;; This program is free software: you ... | null | https://raw.githubusercontent.com/alex-hhh/ActivityLog2/e15fd4eea969e81804e33fc5cbc8174adf9e9386/apps/al2-climb-analysis.rkt | racket |
climb-analisys-tool.rkt -- tool to analyze climbs in GPX files
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR... | #lang racket/gui
SPDX - License - Identifier : GPL-3.0 - or - later
see -hhh.github.io/2021/04/climb-analysis-tool.html
This file is part of AL2 - Climb - Analysis
Copyright ( c ) 2021 , 2022 < >
under the terms of the GNU General Public License as published by the Free
Software Foundation , either versi... |
c337657f0bde6228f80fd4621a64ceec5a6e83d10612cbf1854f7315be3823d2 | arttuka/reagent-material-ui | month_calendar.cljs | (ns reagent-mui.x.month-calendar
"Imports @mui/x-date-pickers/MonthCalendar as a Reagent component.
Original documentation is at -pickers/month-calendar/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers/MonthCalendar" :as MuiMonthCalendar]))
(def month-calendar (r/adapt-react-class MuiMonthCa... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/4fc4b44891919d2b84160eb411d52227dd89e0a5/src/x/reagent_mui/x/month_calendar.cljs | clojure | (ns reagent-mui.x.month-calendar
"Imports @mui/x-date-pickers/MonthCalendar as a Reagent component.
Original documentation is at -pickers/month-calendar/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers/MonthCalendar" :as MuiMonthCalendar]))
(def month-calendar (r/adapt-react-class MuiMonthCa... | |
0c9e5f0d286bce5c147a5294e4b32349a187a5a77d9906a72de6a28fba2fa115 | keera-studios/keera-hails | Model.hs | module Model.Model where
data Model = Model
{
}
emptyBM :: Model
emptyBM = Model
| null | https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/keera-hails/templates/Model/Model.hs | haskell | module Model.Model where
data Model = Model
{
}
emptyBM :: Model
emptyBM = Model
| |
a9fc1f448a211a28b7fa80daf65f510dfa5697945af7f88628d0fdcca85cdd58 | craigl64/clim-ccl | cl-streams.lisp | -*- Mode : lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - LISP ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
(in-package :clim-lisp)
;;; All of this is taken from the STREAM-DEFINITION-BY-USER proposal to
the X3J13 committee , made by of TI on 22 Ma... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/utils/cl-streams.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - LISP ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
All of this is taken from the STREAM-DEFINITION-BY-USER proposal to
Lisp implementation yet supports this proposal, so we implement it
here in this separate package... |
(in-package :clim-lisp)
the X3J13 committee , made by of TI on 22 March 1989 . No
#-(or Cloe-Runtime ccl-2)
(progn
Lisp package ) and fake the " genericness " of the operation in order
#-(or Clozure PCL)
(defgeneric streamp (stream))
#-Clozure
(defmethod STREAMP (stream)
(cl:streamp stream))
#+Gene... |
63bad953ceb5207117867308ea3dc50443efb45c79004f2fd72c31a6143ad774 | lread/test-doc-blocks | example_cljc_test.cljc | (ns example-cljc-test
(:require clojure.test
clojure.string
#?(:cljs [lread.test-doc-blocks.runtime :include-macros])
#?(:clj lread.test-doc-blocks.runtime)
[clojure.string :as string]))
(clojure.test/deftest block-0001
(clojure.test/testing "doc/example.cljc - line... | null | https://raw.githubusercontent.com/lread/test-doc-blocks/8b40a1713ccb951f982b0aed46f7aef96efc79e5/test-resources/expected/test-doc-blocks/test/example_cljc_test.cljc | clojure | (ns example-cljc-test
(:require clojure.test
clojure.string
#?(:cljs [lread.test-doc-blocks.runtime :include-macros])
#?(:clj lread.test-doc-blocks.runtime)
[clojure.string :as string]))
(clojure.test/deftest block-0001
(clojure.test/testing "doc/example.cljc - line... | |
6f1722e3c5039013dc28e207f437792255ff1a9092f30cab48736162c597c0d2 | hyperfiddle/electric | viz_best1.clj | (ns hfdl.viz
(:require [clojure.string :as str]
[dorothy.core :as dot]
[dorothy.jvm :as djvm]
[hfdl.lang :refer [dataflow debug! heap-dump]]
[missionary.core :as m])
(:import (hfdl.impl.compiler Dataflow)))
(declare render-node)
(def ^:dynamic *visited?*) ;; Atom #{... | null | https://raw.githubusercontent.com/hyperfiddle/electric/68f6eb7e38f76844f6a70c5055e7d30660d7eb38/scratch/viz_best1.clj | clojure | Atom #{path …} track already explored paths
Atom {value -> name} to render human friendly names
for opaque values
child nodes
current node
links
child nodes
current node
links
VISUAL TESTS ZONE ;;
simple deref
if
case
data structures
fizzbuz
nested frames
here
nested frame as a function
No matching... | (ns hfdl.viz
(:require [clojure.string :as str]
[dorothy.core :as dot]
[dorothy.jvm :as djvm]
[hfdl.lang :refer [dataflow debug! heap-dump]]
[missionary.core :as m])
(:import (hfdl.impl.compiler Dataflow)))
(declare render-node)
(def global-graph-props {:compoun... |
3ec3cf1f6fbc7bca84093aa44c6e616a350a7b08df959e621d6c1930d4dfcc2a | letmaik/monadiccp | AllInterval.hs | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
import Control.CP.FD.Example
-- diffList: the differences between successive elements of a list
diffList l = exists $ \d -> do -- request a (collection) variable d
let n = size l -- introduce n as alias for size l
size of d must be one ... | null | https://raw.githubusercontent.com/letmaik/monadiccp/fe4498e46a7b9d9e387fd5e4ed5d0749a89d0188/examples/AllInterval.hs | haskell | diffList: the differences between successive elements of a list
request a (collection) variable d
introduce n as alias for size l
for each i in [0..n-2]
d[i] = abs(l[i]-l[i+1])
and return d to the caller
type signature
function 'model' takes argument n
request a (collection) variable x
whose size must be n
d... | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
import Control.CP.FD.Example
size of d must be one less than l
all d elements are in [ 1 .. n-1 ]
main = example_sat_main_single_expr model
|
e55b1d31b155b4dc27e11267a27d246bf401e1249b54a66e60ca438d939c4f82 | utkarshkukreti/reaml | Router.ml | module R = Reaml
module Router = struct
type t =
| Home
| Posts
| Post of int
let toString = function
| Home -> "Home"
| Posts -> "Posts"
| Post id -> "(Post " ^ Js.Int.toString id ^ ")"
include R.Router.Make (struct
type nonrec t = t
let mode = R.Router.Hash
let parse =
... | null | https://raw.githubusercontent.com/utkarshkukreti/reaml/5640a36293ba2a765171225deddb644f4d6c5d26/examples/Router.ml | ocaml | module R = Reaml
module Router = struct
type t =
| Home
| Posts
| Post of int
let toString = function
| Home -> "Home"
| Posts -> "Posts"
| Post id -> "(Post " ^ Js.Int.toString id ^ ")"
include R.Router.Make (struct
type nonrec t = t
let mode = R.Router.Hash
let parse =
... | |
1716811776ccb337d5990954f01bebf8bab506bd18ad449be2590c135bacbadb | dorchard/computational-semantics | CAIA.hs | module CAIA where
import Data.List
data Agent = A | B | C | D | E deriving (Eq,Ord,Enum)
a,alice, b,bob, c,carol, d,dave, e,ernie :: Agent
a = A; alice = A
b = B; bob = B
c = C; carol = C
d = D; dave = D
e = E; ernie = E
instance Show Agent where
show A = "a"; show B = "b";
show C = "c"; show D = "d";
... | null | https://raw.githubusercontent.com/dorchard/computational-semantics/e11a80f86140451c9ce7b80a7c263d1482d8565f/CAIA.hs | haskell | module CAIA where
import Data.List
data Agent = A | B | C | D | E deriving (Eq,Ord,Enum)
a,alice, b,bob, c,carol, d,dave, e,ernie :: Agent
a = A; alice = A
b = B; bob = B
c = C; carol = C
d = D; dave = D
e = E; ernie = E
instance Show Agent where
show A = "a"; show B = "b";
show C = "c"; show D = "d";
... | |
ef8085d84f5a0b9c7cca1486b4c771f92c8565fd25fd4c949ee3020097a024af | herbelin/coq-hh | envars.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/lib/envars.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This file gathers environme... |
60102e40962313871771d6a1930f5f9c040f230ed70436e2d5fade8ef00ec15f | athensresearch/athens | page_merge_test.cljc | (ns athens.common-events.atomic-ops.page-merge-test
(:require
[athens.common-db :as common-db]
[athens.common-events :as common-events]
[athens.common-events.fixture :as fixture]
[athens.common-events.graph.atomic :as atomic-graph-ops]
[athens.common-... | null | https://raw.githubusercontent.com/athensresearch/athens/7434452efc583ec4163894e0e4246558ac5cba41/test/athens/common_events/atomic_ops/page_merge_test.cljc | clojure | need to apply linkmaker, so resolving page-rename event can follow references for :block/string changes
We don't have a representation for shortcuts yet. | (ns athens.common-events.atomic-ops.page-merge-test
(:require
[athens.common-db :as common-db]
[athens.common-events :as common-events]
[athens.common-events.fixture :as fixture]
[athens.common-events.graph.atomic :as atomic-graph-ops]
[athens.common-... |
2aa7692859def2c670ced54221a779bdbfd9c845ec6c55d7a2646e1dec5caaf0 | travelping/hello | hello_handler.erl | Copyright ( c ) 2011 - 2014 by Travelping GmbH < >
% Permission is hereby granted, free of charge, to any person obtaining a
% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
% the rights to use, copy, modify, me... | null | https://raw.githubusercontent.com/travelping/hello/b2697428efe777e8be657d31ca22d80378041d7c/src/hello_handler.erl | erlang | Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright notice... | Copyright ( c ) 2011 - 2014 by Travelping GmbH < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF... |
0eaeb2336a974c5f95895ade5ddf7641842b51a6236fdf3ea318c68bb06635ae | mbj/mhs | Config.hs | module XRay.Config (Config(..), defaultConfig) where
import XRay.Prelude
import XRay.Segment
| XRay configuration
data Config = Config
{ annotations :: Maybe Annotations
, aws :: Maybe Aws
, origin :: Maybe Origin
, service :: Maybe Service
}
defaultConfig :: Conf... | null | https://raw.githubusercontent.com/mbj/mhs/01f8297f7c2262a704d821aa0a4a395bb5207570/xray/src/XRay/Config.hs | haskell | module XRay.Config (Config(..), defaultConfig) where
import XRay.Prelude
import XRay.Segment
| XRay configuration
data Config = Config
{ annotations :: Maybe Annotations
, aws :: Maybe Aws
, origin :: Maybe Origin
, service :: Maybe Service
}
defaultConfig :: Conf... | |
a1c62b364b3197c6dd0788d838c9d79882a30538ccf4876bd692da574a8dade3 | ghc/packages-Cabal | Benchmark.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
module Distribution.Types.Benchmark (
Benchmark(..),
emptyBenchmark,
benchmarkType,
benchmarkModules,
benchmarkModulesAutogen
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Types.BuildInfo
import Dist... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Types/Benchmark.hs | haskell | # LANGUAGE DeriveDataTypeable #
| A \"benchmark\" stanza in a cabal file.
| Get all the module names from a benchmark.
| Get all the auto generated module names from a benchmark.
This are a subset of 'benchmarkModules'. | # LANGUAGE DeriveGeneric #
module Distribution.Types.Benchmark (
Benchmark(..),
emptyBenchmark,
benchmarkType,
benchmarkModules,
benchmarkModulesAutogen
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Types.BuildInfo
import Distribution.Types.BenchmarkType
import ... |
a42fb4b84b5c3c62073cb569c8b8862def0c058e90a59a2b7b0599da069fd6af | plundering/plunder-reference | JetHash.hs | | This is a hack to avoid long compile times when changing jet hashes .
TODO The ` unsafePerformIO ` hack could be avoided through careful
engineering .
TODO Maybe we should even read these from a file ?
TODO The `unsafePerformIO` hack could be avoided through careful
engineering.
... | null | https://raw.githubusercontent.com/plundering/plunder-reference/4cac3717ed5baf7b0b5fd41837a504f6fd33eab2/lib/Plun/JetHash.hs | haskell | ------------------------------------------------------------------------------
Call this immediatly on executable startup.
| | This is a hack to avoid long compile times when changing jet hashes .
TODO The ` unsafePerformIO ` hack could be avoided through careful
engineering .
TODO Maybe we should even read these from a file ?
TODO The `unsafePerformIO` hack could be avoided through careful
engineering.
... |
f3b73e1ae9336d7d5392d55c97c3b4d192232e1488bb9d7b585be8a01c070805 | tolitius/verter | tools.clj | (ns verter.tools
(:require [cljhash.core :as hasher]
[clojure.string :as s]
[calip.core :as calip]
[taoensso.nippy :as nippy])
(:import [com.google.common.hash Hashing
Funnel
PrimitiveSink]))
(defn measure-it
... | null | https://raw.githubusercontent.com/tolitius/verter/506c23051630a185328c8c5d10ed0ad158ec3bb4/src/verter/tools.clj | clojure | (ns verter.tools
(:require [cljhash.core :as hasher]
[clojure.string :as s]
[calip.core :as calip]
[taoensso.nippy :as nippy])
(:import [com.google.common.hash Hashing
Funnel
PrimitiveSink]))
(defn measure-it
... | |
d6bed6c389450e134bc0efecca0fc23ccbe44ee8fe49ea37a4c469bf377c157e | 2600hz-archive/whistle | ecallmgr_fs_auth.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 , VoIP INC
%%% @doc
Directory lookups from FS
%%% @end
Created : 29 Mar 2011 by < >
%%%-------------------------------------------------------------------
-module(ecallmgr_fs_auth).
-behaviour(gen_server).
%% ... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/ecallmgr/src/ecallmgr_fs_auth.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
API
===================================================================
----... | @author < >
( C ) 2011 , VoIP INC
Directory lookups from FS
Created : 29 Mar 2011 by < >
-module(ecallmgr_fs_auth).
-behaviour(gen_server).
-export([start_link/1, start_link/2, lookup_user/3]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(SERVE... |
9dbbf754ca1c9454893bae169ddd46e19ec058bb0f7d2b89838fe42cf4ac37b0 | Kappa-Dev/KappaTools | story_json.mli | type current_compression_mode = Weak | Strong | Causal
type new_story =
{
id: int;
graph: Graph_loggers_sig.graph;
}
type story =
| New of new_story
| Same_as of int
type 'a one_compression =
{
log_info: 'a Trace.Simulation_info.t list;
story_mode: current_compression_mode;
story: story... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/cflow/story_json.mli | ocaml | type current_compression_mode = Weak | Strong | Causal
type new_story =
{
id: int;
graph: Graph_loggers_sig.graph;
}
type story =
| New of new_story
| Same_as of int
type 'a one_compression =
{
log_info: 'a Trace.Simulation_info.t list;
story_mode: current_compression_mode;
story: story... | |
d0ea5030a26512ac20aa4d81bb32f66340d464f1e91c5b54f735ce15506f9403 | RYTong/erlmail-client | imapc_resp.erl | -module(imapc_resp).
-include("imap.hrl").
-export([parse_response/1, analyze_response/4]).
%%%----------------------------
%%% Responses parsing functions
%%%----------------------------
parse_response(Line) ->
case string:tokens(Line, " ") of
[] ->
{ok, {response, untagged, [], []}};
... | null | https://raw.githubusercontent.com/RYTong/erlmail-client/039b9e43d9c78a4d0aab0e1b6dcc5eb50e9658f2/src/imapc_resp.erl | erlang | ----------------------------
Responses parsing functions
----------------------------
LOGIN
LIST - TODO: rfc stipulations
STATUS - TODO: rfc stipulations
SELECT - TODO: rfc stipulations
EXAMINE - TODO: rfc stipulations
SEARCH - TODO: rfc stipulations
FETCH - TODO: rfc stipulations
STORE - TODO: rfc s... | -module(imapc_resp).
-include("imap.hrl").
-export([parse_response/1, analyze_response/4]).
parse_response(Line) ->
case string:tokens(Line, " ") of
[] ->
{ok, {response, untagged, [], []}};
[_] ->
{ok, {response, untagged, Line, []}};
_ ->
Resp = stri... |
8d458bcae36d940b5a57c6c5f0656b89258e947f7f395edb60999e639cb76839 | elaforge/fix-imports | Parse.hs | # LANGUAGE DisambiguateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeSynonymInstances #-}
module FixImports.Parse (
-- * types
Module
... | null | https://raw.githubusercontent.com/elaforge/fix-imports/7203d63a84c9b06a8a90227cfcc5169c661a97ed/src/FixImports/Parse.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
* types
* parse
* extract
** Import
TESTING
* parse
puts dyn flags in a global variable.
Lexer.annotations_comments I think is supposed to have comments
In any case, it's empty for comments in the import block at least.
* extract
| Qualificatio... | # LANGUAGE DisambiguateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module FixImports.Parse (
Module
, Comment(..)
, parse
, qualifications
, unqualifieds
, importRange
... |
f99eba1b2b6a6dae4c072983dddb29ad432163090d9cae87b7589e6496a811d6 | bos/rwh | TreeMap.hs | import Prelude hiding (Functor(..))
{-- snippet Tree --}
file : TreeMap.hs
data Tree a = Node (Tree a) (Tree a)
| Leaf a
deriving (Show)
{-- /snippet Tree --}
{-- snippet treeLengths --}
treeLengths (Leaf s) = Leaf (length s)
treeLengths (Node l r) = Node (treeLengths l) (treeLengths r)
{... | null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch11/TreeMap.hs | haskell | - snippet Tree -
- /snippet Tree -
- snippet treeLengths -
- /snippet treeLengths -
- snippet treeMap -
- /snippet treeMap -
- snippet Functor -
- /snippet Functor -
- snippet Functor.Tree -
- /snippet Functor.Tree -
- snippet Functor.List -
- /snippet Functor.List -
- snippet Functor.Maybe -
- /snippet Functor.Maybe - | import Prelude hiding (Functor(..))
file : TreeMap.hs
data Tree a = Node (Tree a) (Tree a)
| Leaf a
deriving (Show)
treeLengths (Leaf s) = Leaf (length s)
treeLengths (Node l r) = Node (treeLengths l) (treeLengths r)
treeMap :: (a -> b) -> Tree a -> Tree b
treeMap f (Leaf a) = Leaf (f ... |
111ff366a45d3bd56d00c7271ef37b9ee0cf09a5b76fcafba474aca018388073 | racket/racket7 | api.rkt | #lang racket/base
(require (prefix-in direct: "main.rkt")
(prefix-in direct: "../namespace/api.rkt")
"../syntax/api.rkt"
"../namespace/namespace.rkt"
"../common/contract.rkt"
"parameter.rkt")
;; These wrappers implement the protocol for whether to use
;; `namespace-synatx-i... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/eval/api.rkt | racket | These wrappers implement the protocol for whether to use
`namespace-synatx-introduce` on the argument to `eval`, etc. | #lang racket/base
(require (prefix-in direct: "main.rkt")
(prefix-in direct: "../namespace/api.rkt")
"../syntax/api.rkt"
"../namespace/namespace.rkt"
"../common/contract.rkt"
"parameter.rkt")
(provide eval
eval-syntax
compile
compile-sy... |
2c15af05f389354eb49a1b4fd9c1cb1d40a31f570acf7a1d18b6f4dbdb817300 | karimarttila/clojure | user_csv.clj | (ns simpleserver.service.user.user-csv
(:require
[clojure.tools.logging :as log]
[simpleserver.service.user.user-interface :as ss-user-i]
[simpleserver.service.user.user-common :as ss-user-common]))
(defrecord CsvR [db]
ss-user-i/UserInterface
(email-already-exists?
[_ _ email]
(log/debug (s... | null | https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/webstore-demo/integrant-simple-server/src/clj/simpleserver/service/user/user_csv.clj | clojure | (ns simpleserver.service.user.user-csv
(:require
[clojure.tools.logging :as log]
[simpleserver.service.user.user-interface :as ss-user-i]
[simpleserver.service.user.user-common :as ss-user-common]))
(defrecord CsvR [db]
ss-user-i/UserInterface
(email-already-exists?
[_ _ email]
(log/debug (s... | |
2214c161ce5631535811de537c83fe6b59aa84e537055f482bcd84e7ed23ff73 | brokensandals/irc-indexer | batch.clj | (ns irc-indexer.batch
(:import [java.io PushbackReader])
(:require [irc-indexer.indexing :as indexing]))
(defn batch-process
"Reads from a stream (containing an IRC log created by irc-indexer) and indexes
all its events into the given index, putting the specified number of
entries in each transcript segmen... | null | https://raw.githubusercontent.com/brokensandals/irc-indexer/1ca2b7adc4d0841d4c6745fbb52e3519cd778a50/src/irc_indexer/batch.clj | clojure | (ns irc-indexer.batch
(:import [java.io PushbackReader])
(:require [irc-indexer.indexing :as indexing]))
(defn batch-process
"Reads from a stream (containing an IRC log created by irc-indexer) and indexes
all its events into the given index, putting the specified number of
entries in each transcript segmen... | |
12f173c4a3c79a0ed81d7b7958f57ba7a8a70441f3d415bd67d198087d820682 | nasser/magic | test.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.F
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/src/stdlib/clojure/test.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.F
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove... | Copyright ( c ) . All rights reserved .
test.clj : test framework for Clojure
by
March 28 , 2009
Thanks to , , and for
(ns
^{:author "Stuart Sierra, with contributions and suggestions by
Chas Emerick, Allen Rohner, and Stuart Halloway",
:doc "A unit testing framework.
ASSERTIONS... |
ad5bce0551381f376c17d998a86e697babe28e8373e60542d4b6b1f9578e30b7 | anuyts/menkar | TC.hs | module Menkar.TC (
module Menkar.TC.AST,
module Menkar.TC.ASTRel,
module Menkar.TC.ASTSolve,
module Menkar.TC.Judgement
) where
import Menkar.TC.AST
import Menkar.TC.ASTRel
import Menkar.TC.ASTSolve
import Menkar.TC.Judgement
| null | https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/src/Menkar/TC.hs | haskell | module Menkar.TC (
module Menkar.TC.AST,
module Menkar.TC.ASTRel,
module Menkar.TC.ASTSolve,
module Menkar.TC.Judgement
) where
import Menkar.TC.AST
import Menkar.TC.ASTRel
import Menkar.TC.ASTSolve
import Menkar.TC.Judgement
| |
f8db8b74a7ae328af91e1a7b0efe51108f16250380a94ccadf64974e34762894 | appositum/rola | Church.hs | module Church where
encodings :: [(String, String)]
encodings =
[ ("S", "λf.(λg.(λx.f x (g x)))")
, ("K", "λx.λy.x")
, ("I", "λx.x")
, ("Y", "λf.((λx.f (x x)) (λx.f (x x)))")
, ("true", "λx.λy.x")
, ("false", "λx.λy.y")
, ("ifte", "λcond.λt.λe.cond t e")
, ("not", "λcond.λt.λe.cond e t")
, ("zero", "... | null | https://raw.githubusercontent.com/appositum/rola/7d733d4c586dc1c2114418510d6cbf3a1a7ac692/src/Church.hs | haskell | module Church where
encodings :: [(String, String)]
encodings =
[ ("S", "λf.(λg.(λx.f x (g x)))")
, ("K", "λx.λy.x")
, ("I", "λx.x")
, ("Y", "λf.((λx.f (x x)) (λx.f (x x)))")
, ("true", "λx.λy.x")
, ("false", "λx.λy.y")
, ("ifte", "λcond.λt.λe.cond t e")
, ("not", "λcond.λt.λe.cond e t")
, ("zero", "... | |
a9ed858e9aeccaf79985f20324adac1a2d629415c29c339108402332eb169ce1 | emqx/emqx | emqx_rule_events_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_rule_engine/test/emqx_rule_events_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 ... | Copyright ( c ) 2022 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_rule_events_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_l... |
6b88af4a6d01a04a646f983891e705ad1b03cb4c5f060761d3f6f46bc0208275 | erlang/otp | z_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2006 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/otp/de5bb49320db22159de52e677c5f7499b763b0cd/erts/emulator/test/z_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2006 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author : < >
Created : 15 Jul 2005 by < >
-module(z_SUITE).
-author('').
-define(line_trace , 1 ) .
-i... |
d53f87182a115b71212606df155deb626d97d3b4b8d32f0e1d2f22d37c75c89f | reflectionalist/S9fES | rb-tree.scm | Scheme 9 from Empty Space , Function Library
By , 2010
; Placed in the Public Domain
;
; (make-rbt procedure) ==> rb-tree
; (rbt-find rb-tree object) ==> object | #f
( rbt - insert rb - tree ) = = > rb - tree
; (rbt-rebuild rb-tree object) ==> rb-tree
; (rbt-r... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/rb-tree.scm | scheme | Placed in the Public Domain
(make-rbt procedure) ==> rb-tree
(rbt-find rb-tree object) ==> object | #f
(rbt-rebuild rb-tree object) ==> rb-tree
(rbt-remove rb-tree object) ==> rb-tree
predicate. If you plan, for instance, to use strings as keys, use
STRI... | Scheme 9 from Empty Space , Function Library
By , 2010
( rbt - insert rb - tree ) = = > rb - tree
These procedures implement Red - Black Trees .
MAKE - returns an empty tree that uses PROCEDURE as an ordering
- FIND locates the value associated with the key OBJECT in the
given RB - TREE and re... |
ffe071413ca917eb61e8711ba865a70292aef59c4869263705828d1117d85951 | mokus0/junkbox | IterateeAnalysis.hs | module TypeExperiments.IterateeAnalysis where
Context :
I do n't like the way iteratees are normally presented . They seem / feel ad - hoc , contrived , or just plain dirty ( in the same sense that inline asm or ConfiguratorPropertyFactoryFactory things feel " dirty " ) - as Conal Elliott said in the... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/IterateeAnalysis.hs | haskell | Getting input
" Pausing " and resuming when input is available
Maintaining state ( available but unconsumed input )
Reporting errors , ideally also handling them
Getting input
"Pausing" and resuming when input is available
Maintaining state (available but unconsumed input)
Reporting errors, ideally also han... | module TypeExperiments.IterateeAnalysis where
Context :
I do n't like the way iteratees are normally presented . They seem / feel ad - hoc , contrived , or just plain dirty ( in the same sense that inline asm or ConfiguratorPropertyFactoryFactory things feel " dirty " ) - as Conal Elliott said in the... |
186a0c8f99290c927b21bf9b87db2f610bfce7e6fb1bb107e945236fcfe62cde | hspec/silently | Spec.hs | module Main (main) where
import Test.Hspec
import System.IO
import System.IO.Silently
import System.Directory
import System.IO.Temp
import Control.Exception
import Control.Monad
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "... | null | https://raw.githubusercontent.com/hspec/silently/56b43aab506fd816c189eb78a9b7423971a1dee0/test/Spec.hs | haskell | module Main (main) where
import Test.Hspec
import System.IO
import System.IO.Silently
import System.Directory
import System.IO.Temp
import Control.Exception
import Control.Monad
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "... | |
36905ec391e539477943c4c050ef4c0173143f1c663dc5d24a3e575354d745b0 | manuel-serrano/bigloo | object.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / bigloo / recette / object.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/d8c3ed7437ce3597c6a99bb2868c549c8c407e57/recette/object.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The object system tests */
*===========================... | * serrano / prgm / project / bigloo / bigloo / recette / object.scm * /
* Author : * /
* Creation : We d Jul 17 07:59:51 1996 * /
* Last change : Thu Nov 3 12:06:24 2022 ( serrano ) * /
(module... |
961ba9de56317bf7271cccf31cb18a55bb255a5be7c480fb7f41ac30aa18988f | fumieval/extensible | Field.hs | # LANGUAGE MultiParamTypeClasses , UndecidableInstances #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE ScopedTypeVariables, TypeFamilies #-}
# LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableSuperClasses , TypeInType #
------------------------------------------------... | null | https://raw.githubusercontent.com/fumieval/extensible/5b3421e6b43188bf51e20d5e8f2cee0d5c10a04d/src/Data/Extensible/Field.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables, TypeFamilies #
---------------------------------------------------------------------------
|
Module : Data.Extensible.Field
License : BSD3
Flexible records and variants
----------------------------------------------------------------------
... | # LANGUAGE MultiParamTypeClasses , UndecidableInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableSuperClasses , TypeInType #
Copyright : ( c ) 2018
Maintainer : < >
module Data.Extensible.Field (
Field(..)
, (@=)
, (<@=>)
, (@:>)
,... |
e490cc1eafced50b778653126994a6d3fc41efebafdd1d17d8c4f7a40ab2de03 | ianmbloom/gudni | Outline.hs | {-# LANGUAGE TemplateHaskell #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE PatternSynonyms #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE UndecidableInstances #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies ... | null | https://raw.githubusercontent.com/ianmbloom/gudni/fa69f1bf08c194effca05753afe5455ebae51234/src/Graphics/Gudni/Figure/Outline.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE PatternSynonyms #
# LANGUAGE UndecidableInstances #
---------------------------------------------------------------------------
|
Module : Graphics.Gudni.Figure.Outline
License : BSD-style (see the file libraries/base/LICENSE)
Stability... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE AllowAmbiguousTypes #
Copyright : ( c ) 2019
Maintainer :
module Graphics.Gudn... |
7e38165440ceafa17d83668b84e6f0774a435963439dc7f3f35375f37cd988be | weblocks-framework/weblocks | weblocks-suite.lisp |
(in-package :weblocks-test)
;;; A suite that forces `*print-case*' to be `:upcase', needed in some
;;; comparison contexts
(deftestsuite print-upcase-suite ()
())
(defmethod lift::lift-test :around ((suite print-upcase-suite) name)
(declare (ignore suite name))
(let ((*print-case* :upcase))
(call-next-meth... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/test/test-code/weblocks-suite.lisp | lisp | A suite that forces `*print-case*' to be `:upcase', needed in some
comparison contexts
A suite that sets up an application environment
A suite that sets up a session environment
A suite that sets up a web request environment
to run in. This includes setting up an application, a web session,
a web request, etc. |
(in-package :weblocks-test)
(deftestsuite print-upcase-suite ()
())
(defmethod lift::lift-test :around ((suite print-upcase-suite) name)
(declare (ignore suite name))
(let ((*print-case* :upcase))
(call-next-method)))
(deftestsuite application-suite ()
()
(:dynamic-variables (weblocks::*current-webapp... |
c9c56f153c658d00a7f465d4d25e1f4ff0db592810a28fbffe2289628a1679f8 | hypernumbers/LuvvieScript | 1a_simplest.erl | -module('1a_simplest').
-random(guthrie_attributes).
-export([
simplestfn/0
]).
simplestfn() -> "banjolette".
| null | https://raw.githubusercontent.com/hypernumbers/LuvvieScript/d10da50e0719ff26690749570c75e1e614214381/test/passing/src/1a_simplest.erl | erlang | -module('1a_simplest').
-random(guthrie_attributes).
-export([
simplestfn/0
]).
simplestfn() -> "banjolette".
| |
51f2a7f992259a956140783532501463542428fefe87163c8ffaaa958fbb5692 | haskell-waargonaut/waargonaut | JChar.hs | module Types.JChar
( genJChar
, genHex4
, genJCharEscaped
, genJCharUnescaped
) where
import Hedgehog
import qualified Hedgehog.Gen as Gen
import Control.Lens (preview)
import Types.Common (genHeXaDeCiMaLDigit,
... | null | https://raw.githubusercontent.com/haskell-waargonaut/waargonaut/ba1dbbc170c2279749ea29bc8aaf375bdb659ad2/test/Types/JChar.hs | haskell | module Types.JChar
( genJChar
, genHex4
, genJCharEscaped
, genJCharUnescaped
) where
import Hedgehog
import qualified Hedgehog.Gen as Gen
import Control.Lens (preview)
import Types.Common (genHeXaDeCiMaLDigit,
... | |
31945f9324695d2d505eb07461d16269c55f8337336089dad8ae279e628bab63 | awslabs/s2n-bignum | bignum_clz.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_clz.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "arm/generic/bignum_clz.o";;
***
-------------------------------------------------------------------------
Correctness proof. ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Counting leading zero bits in a bignum . ... |
385aee678750b1ea31fbc8e84c601846685e4401c1047ec88296712f8d82eef0 | acl2/acl2 | r1cs@useless-runes.lsp | (R1CS::PSEUDO-VARP)
(R1CS::PSEUDO-VAR-LISTP)
(R1CS::PSEUDO-VAR-LISTP-OF-REMOVE-EQUAL
(92 35 (:REWRITE SYMBOLP-OF-CAR-WHEN-SYMBOL-LISTP-CHEAP))
(47 45 (:REWRITE DEFAULT-CAR))
(44 42 (:REWRITE DEFAULT-CDR))
(35 35 (:TYPE-PRESCRIPTION SYMBOL-LISTP))
(24 24 (:REWRITE REMOVE-EQUAL-WHEN-NOT-CONSP-CHEAP))
)
(R1CS::PSEUD... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/crypto/r1cs/sparse/.sys/r1cs%40useless-runes.lsp | lisp | (R1CS::PSEUDO-VARP)
(R1CS::PSEUDO-VAR-LISTP)
(R1CS::PSEUDO-VAR-LISTP-OF-REMOVE-EQUAL
(92 35 (:REWRITE SYMBOLP-OF-CAR-WHEN-SYMBOL-LISTP-CHEAP))
(47 45 (:REWRITE DEFAULT-CAR))
(44 42 (:REWRITE DEFAULT-CDR))
(35 35 (:TYPE-PRESCRIPTION SYMBOL-LISTP))
(24 24 (:REWRITE REMOVE-EQUAL-WHEN-NOT-CONSP-CHEAP))
)
(R1CS::PSEUD... | |
3851fab5c5b2592d413fba36edd5bb60720873cb7691d31846e4276b5e4ac908 | Incubaid/baardskeerder | indexz.ml |
* This file is part of Baardskeerder .
*
* Copyright ( C ) 2011 Incubaid BVBA
*
* Baardskeerder is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , o... | null | https://raw.githubusercontent.com/Incubaid/baardskeerder/3975cb7f0e92e1f35eeab17beeb906344e43dae0/src/indexz.ml | ocaml |
* This file is part of Baardskeerder .
*
* Copyright ( C ) 2011 Incubaid BVBA
*
* Baardskeerder is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , o... | |
649c7651c55526a99a6dddec46675722a8465ba4253705f2e39831b67febe3af | huangz1990/SICP-answers | 65-union-tree.scm | 65-union-tree.scm
(load "62-union-set.scm")
(load "63-tree-list-2.scm")
(load "64-list-tree.scm")
(define (union-tree tree another)
(list->tree
(union-set (tree->list-2 tree)
(tree->list-2 another))))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/65-union-tree.scm | scheme | 65-union-tree.scm
(load "62-union-set.scm")
(load "63-tree-list-2.scm")
(load "64-list-tree.scm")
(define (union-tree tree another)
(list->tree
(union-set (tree->list-2 tree)
(tree->list-2 another))))
| |
64662a047d8bd13647f644a918dffce7ed6e7519b7d01fe60853422697025e5e | prestancedesign/pingcrm-clojure | trashed_message.cljs | (ns pingcrm.shared.trashed-message
(:require [pingcrm.shared.icon :refer [icon]]))
(defn trashed-message [{:keys [on-restore]} & children]
[:div {:class "p-4 bg-yellow-300 rounded flex items-center justify-between max-w-3xl mb-6"}
[:div {:class "flex items-center"}
[icon {:name :trash
:class "fle... | null | https://raw.githubusercontent.com/prestancedesign/pingcrm-clojure/12f938f81a4b4010e8b66e87634fe631152cb18d/src/cljs/pingcrm/shared/trashed_message.cljs | clojure | (ns pingcrm.shared.trashed-message
(:require [pingcrm.shared.icon :refer [icon]]))
(defn trashed-message [{:keys [on-restore]} & children]
[:div {:class "p-4 bg-yellow-300 rounded flex items-center justify-between max-w-3xl mb-6"}
[:div {:class "flex items-center"}
[icon {:name :trash
:class "fle... | |
2dc8b2187e8a3b4ae2ccec62fd0c00e73ee305bf64ebd8316ccd43142c4f6def | Lysxia/test-monad-laws | Checkers.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Monad.State.Checkers where
import Control.Monad.State
import Test.QuickCheck (Property)
import Test.QuickCheck.HigherOrder (Constructible, TestEq, ok, ko)
import Test.Monad.Instances ()
import Test.Monad.State... | null | https://raw.githubusercontent.com/Lysxia/test-monad-laws/1cb9e116769771cb49fbd1614f50b05e120a2709/src/Test/Monad/State/Checkers.hs | haskell | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Monad.State.Checkers where
import Control.Monad.State
import Test.QuickCheck (Property)
import Test.QuickCheck.HigherOrder (Constructible, TestEq, ok, ko)
import Test.Monad.Instances ()
import Test.Monad.State... | |
f7fef339145bf3d0171a97a0d533d3b4f300c10814332ae563ebd83ff34074f1 | input-output-hk/ouroboros-network | LocalRootPeers.hs | # LANGUAGE NamedFieldPuns #
# OPTIONS_GHC -Wno - orphans #
module Test.Ouroboros.Network.PeerSelection.LocalRootPeers
( arbitraryLocalRootPeers
, restrictKeys
, tests
, LocalRootPeers (..)
) where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Set (Set)... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/163408cb58e13ac1ad63b8c947a71c491d00c4f8/ouroboros-network/test/Test/Ouroboros/Network/PeerSelection/LocalRootPeers.hs | haskell | | Check that we can forcibly bring the localRootPeers into compliance
with the governor's state invariant, which requires that the local
root peers fit within the current targets.
The precondition on the targets is that they are sane.
divide into a few disjoint groups | # LANGUAGE NamedFieldPuns #
# OPTIONS_GHC -Wno - orphans #
module Test.Ouroboros.Network.PeerSelection.LocalRootPeers
( arbitraryLocalRootPeers
, restrictKeys
, tests
, LocalRootPeers (..)
) where
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Set (Set)... |
fbb92cc48ce4d8893a67b8d20a26222d7870c38576a6e36e7c4b155dfca1c92e | hanshuebner/cadr2 | fasd.lisp | FAST DUMPER ( MACLISP MODEL ) -*-LISP-*-
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * *
;READ LISPM;MACROS > IN BEFORE TRYING TO RUN THIS INTERPRETIVELY
(DECLARE (COND ((STATUS FEATURE LISPM))
((NULL (MEMQ 'NEWIO (STATUS FEATURES)))
(BREAK 'YOU-HAVE-TO-COMPILE-THIS-WITH-QCOMPL T))
... | null | https://raw.githubusercontent.com/hanshuebner/cadr2/2398a1303804d41c4cdcb2d3d8454cd4a48912b8/mit/lispm/fasd.lisp | lisp | READ LISPM;MACROS > IN BEFORE TRYING TO RUN THIS INTERPRETIVELY
(SETQ C0 (CAR CHLIST))
For A:B:C, we are given the list (A B C).
CONVERSION FROM EXCESS 200 TO 2000
STARTING NEW WHACK SO LET FASD-GROUP-LENGTH GET
STUFF DESIRED TO STORE.
(FASD-NIBBLE MAX-IP-PDL-USAGE)
(FASD-CONSTANT FCTN-NAME)
(FASD-CONSTANT FAST-OP... | FAST DUMPER ( MACLISP MODEL ) -*-LISP-*-
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * *
(DECLARE (COND ((STATUS FEATURE LISPM))
((NULL (MEMQ 'NEWIO (STATUS FEATURES)))
(BREAK 'YOU-HAVE-TO-COMPILE-THIS-WITH-QCOMPL T))
((NULL (GET 'IF-FOR-MACLISP 'MACRO))
(LOAD '(MACROS > D... |
96398fdc8b776980f6fed53baf0013f2fd0cbfdce4451b01148ceaa71550638f | yuriy-chumak/ol | fibonacci_n-step_number_sequences.scm | (define (n-fib-iterator ll)
(cons (car ll)
(lambda ()
(n-fib-iterator (append (cdr ll) (list (fold + 0 ll)))))))
(print "2, fibonacci : " (ltake (n-fib-iterator '(1 1)) 15))
(print "3, tribonacci: " (ltake (n-fib-iterator '(1 1 2)) 15))
(print "4, tetranacci: " (ltake (n-fib-iterator '(1 1 2 4)... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/fibonacci_n-step_number_sequences.scm | scheme | (define (n-fib-iterator ll)
(cons (car ll)
(lambda ()
(n-fib-iterator (append (cdr ll) (list (fold + 0 ll)))))))
(print "2, fibonacci : " (ltake (n-fib-iterator '(1 1)) 15))
(print "3, tribonacci: " (ltake (n-fib-iterator '(1 1 2)) 15))
(print "4, tetranacci: " (ltake (n-fib-iterator '(1 1 2 4)... | |
bd19e5cc7d630e13e92df5121fedf3c40227b69593dfa07ab517f0ddb0301c9e | ijvcms/chuanqi_dev | city_info_cache.erl | %%%-------------------------------------------------------------------
@author apple
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 30 . 2015 19:19
%%%-------------------------------------------------------------------
-module(city_info_cache).
-include("common.hrl").
-include("cache.hrl").
-export... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/city/city_info_cache.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API | @author apple
( C ) 2015 , < COMPANY >
Created : 30 . 2015 19:19
-module(city_info_cache).
-include("common.hrl").
-include("cache.hrl").
-export([
select_row/1,
insert/1,
update/2,
delete/1
]).
select_row(SceneId) ->
db_cache_lib:select_row(?DB_CITY_INFO,SceneId).
insert(CityInfo) ->
db_cache_lib:in... |
c605506a5d6bece8b466adf2565e1d092b27eabf1f41f6acc044cf4630c653c7 | tweag/pirouette | NastyLists.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
{-# LANGUAGE RankNTypes #-}
module Pirouette.Symbolic.ProveSpec.NastyLists (tests) where
import Control.Monad.Reader
import Data.Default
import Data.Maybe (isJust)
impor... | null | https://raw.githubusercontent.com/tweag/pirouette/0c0a1c9000ed7f61966a27e11c0f971ce118abd9/tests/unit/Pirouette/Symbolic/ProveSpec/NastyLists.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes # | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
module Pirouette.Symbolic.ProveSpec.NastyLists (tests) where
import Control.Monad.Reader
import Data.Default
import Data.Maybe (isJust)
import Language.Pirouette.Example
import qualified Language.Pirouett... |
25eab4d3b3d37e98dc8f7b3804034ed0f32584ae282de48c7ba6ce9397a31061 | facebook/duckling | Corpus.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.RO.Corpus
( corpus
, negativeCorpus
) where
... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Time/RO/Corpus.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Time.RO.Corpus
( corpus
, negativeCorpus
) where
import Data.String
import Prelude
import Duckling.Locale
import Duckling.Resolve
import Duckling.Time.Corpus
import Duckling.TimeGrain.Types hiding (add)
import Duckling.Testing.Types hiding (e... |
b3c4e750e727ae48e0ca82dd90abb7d3c41e45a3410176a4df87ca6de36e4493 | rystsov/fast-jepsen | harness.clj | (ns mongo-http.harness
(:require
[clojure.tools.logging :refer [debug info warn]]
[jepsen
[nemesis :as nemesis]
[net :as net]
[client :as client]
[checker :as checker]
[generator :as gen]
[independent :as independent]]
[mongo-http.isolate :as isolate]
[mongo-http.db :as d... | null | https://raw.githubusercontent.com/rystsov/fast-jepsen/1a7c5e93cdc9cb8bfb29eda8f0079277375e108d/jepsen/src/src/mongo_http/harness.clj | clojure | Client | (ns mongo-http.harness
(:require
[clojure.tools.logging :refer [debug info warn]]
[jepsen
[nemesis :as nemesis]
[net :as net]
[client :as client]
[checker :as checker]
[generator :as gen]
[independent :as independent]]
[mongo-http.isolate :as isolate]
[mongo-http.db :as d... |
82bdb4e6669f584d2123361ffd489655386adb11b7a5a8c52f3afdbe788de1be | cyga/real-world-haskell | Prettify2.hs | file : ch11 / Prettify2.hs
data Doc = Empty
| Char Char
| Text String
| Line
| Concat Doc Doc
| Union Doc Doc
deriving (Show,Eq)
file : ch11 / Prettify2.hs
empty :: Doc
(<>) :: Doc -> Doc -> Doc
file : ch11 / Prettify2.hs
fold :: (Doc -> Doc -> Doc) -> [Do... | null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch11/Prettify2.hs | haskell | file : ch11 / Prettify2.hs
data Doc = Empty
| Char Char
| Text String
| Line
| Concat Doc Doc
| Union Doc Doc
deriving (Show,Eq)
file : ch11 / Prettify2.hs
empty :: Doc
(<>) :: Doc -> Doc -> Doc
file : ch11 / Prettify2.hs
fold :: (Doc -> Doc -> Doc) -> [Do... | |
d091b1dcdd6a9ef1ae28fc16efbca8389197d4c84c89c7c16e38dd76d9e178a3 | McCLIM/McCLIM | package.lisp | (defpackage #:command-and-command-table-utilities
(:use :clim :clim-extensions :clim-lisp)
(:export :command-of-command-table
:command-or-commands-of-command-table
:expand-command-tables))
(defpackage #:creating-assoc
(:use :cl)
(:export :creating-assoc))
(defpackage #:conditional-comman... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/c079691b0913f8306ceff2620b045b6e24e2f745/Extensions/conditional-commands/package.lisp | lisp | (defpackage #:command-and-command-table-utilities
(:use :clim :clim-extensions :clim-lisp)
(:export :command-of-command-table
:command-or-commands-of-command-table
:expand-command-tables))
(defpackage #:creating-assoc
(:use :cl)
(:export :creating-assoc))
(defpackage #:conditional-comman... | |
0f48c553d27ac2a0a1438edfc3df184403f954806a132b8d3488824902bdfb4a | ivankelly/gambit | html#.scm | ;==============================================================================
File : " html#.scm " , Time - stamp : < 2007 - 04 - 04 14:42:33 feeley >
Copyright ( c ) 2005 - 2007 by , All Rights Reserved .
;==============================================================================
(##namespace ("html#"
... | null | https://raw.githubusercontent.com/ivankelly/gambit/7377246988d0982ceeb10f4249e96badf3ff9a8f/examples/web-server/html%23.scm | scheme | ==============================================================================
==============================================================================
procedures
============================================================================== |
File : " html#.scm " , Time - stamp : < 2007 - 04 - 04 14:42:33 feeley >
Copyright ( c ) 2005 - 2007 by , All Rights Reserved .
(##namespace ("html#"
write-html
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<b>
<base>
<basefont>
<bdo>
<big>
<blockquote>
<body>
<br>
<button>
<caption>
<center>
<cite>
<code>
... |
03f01d3ac2dd6f0f8b3b3332da3e304d8415fe5e8b5546f7d4c73a721032dad4 | metabase/metabase | file.clj | (ns ^{:added "0.45.0"} metabase-enterprise.advanced-config.file
"Support for initializing Metabase with configuration from a `config.yml` file located in the current working
directory. See for more information.
This logic is meant to be executed after the application database is set up and driver plugins have b... | null | https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/enterprise/backend/src/metabase_enterprise/advanced_config/file.clj | clojure | the shape of each section may vary.
more can be added in the future as the need
for parameter parsing
for `settings:` section code
for `databases:` section code
for `users:` section code
it is dynamic for test mocking purposes.
enabling that check tho)
might have to use the `:settings` section to set the token... | (ns ^{:added "0.45.0"} metabase-enterprise.advanced-config.file
"Support for initializing Metabase with configuration from a `config.yml` file located in the current working
directory. See for more information.
This logic is meant to be executed after the application database is set up and driver plugins have b... |
f3c56f8c4f59ba4eb2c34dcbc7def0beef9f53740cdd6b45401812958279b8f0 | uncomplicate/neanderthal | cublock.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php) or later
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be boun... | null | https://raw.githubusercontent.com/uncomplicate/neanderthal/5c76fb83eb43b7aa3307e6e90d5025e41750a00f/src/clojure/uncomplicate/neanderthal/internal/device/cublock.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php) or later
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not rem... | Copyright ( c ) . All rights reserved .
(ns ^{:author "Dragan Djuric"}
uncomplicate.neanderthal.internal.device.cublock
(:require [uncomplicate.commons
[core :refer [Releaseable release let-release with-release Info info
Wrapper extract wrap-float wrap-double wrap-in... |
4e1ee18d77e11d06064a3af8369ff16f0139310ef9cd3d5fd4d458b05868aed4 | paf31/dovetail | Unsafe.hs | # LANGUAGE BlockArguments #
# LANGUAGE ImportQualifiedPost #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
module Dovetail.Core.Record.Unsafe where
import Data.Foldable (fold)
import Data.Text (Text)
import Data.HashMap.... | null | https://raw.githubusercontent.com/paf31/dovetail/60e00e247b643ad9c05e4137396ffddedcd8bcb6/dovetail-core/src/Dovetail/Core/Record/Unsafe.hs | haskell | # LANGUAGE OverloadedStrings #
unsafeHas :: forall r1. String -> Record r1 -> Boolean
unsafeDelete :: forall r1 r2. String -> Record r1 -> Record r2 | # LANGUAGE BlockArguments #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
module Dovetail.Core.Record.Unsafe where
import Data.Foldable (fold)
import Data.Text (Text)
import Data.HashMap.Strict (HashMap)
import Data.HashMap.... |
8ba98a411e39efbfea5443849b27e9a87fe8557818cf270d015b5c53cf42e0e7 | gnuvince/ocaml-tiger | sym.mli | type t
val compare: t -> t -> int
val to_string: t -> string
val from_string: string -> t
| null | https://raw.githubusercontent.com/gnuvince/ocaml-tiger/42e39cb0d48cf3100fbfb7e51aa88a71e04ec6a4/sym.mli | ocaml | type t
val compare: t -> t -> int
val to_string: t -> string
val from_string: string -> t
| |
0098dcfde20f5a99b80c8c2370d201d3a0a77cf0f1d6d3a1c946739744289d27 | azimut/shiny | drums.lisp | (in-package :shiny)
(defun kick ())
(defun kick2 ())
(defun kick3 ())
(kick (tempo-sync #[1 b]))
(kick2 (tempo-sync #[.5 b]))
(kick3 (tempo-sync #[.5 b]))
(let ((notes (make-cycle (make-chord 60 70 6 (scale 0 'minor)))))
(defbeat kick ((parse-pattern (bjorklund-s 5 13)) 1)
(p time (next notes) 50 (* 2 d) 0)))
... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/drafts/drums.lisp | lisp | --------------------------------------------------
--------------------------------------------------
(p (parse-patternc "x-x- ---x")) | (in-package :shiny)
(defun kick ())
(defun kick2 ())
(defun kick3 ())
(kick (tempo-sync #[1 b]))
(kick2 (tempo-sync #[.5 b]))
(kick3 (tempo-sync #[.5 b]))
(let ((notes (make-cycle (make-chord 60 70 6 (scale 0 'minor)))))
(defbeat kick ((parse-pattern (bjorklund-s 5 13)) 1)
(p time (next notes) 50 (* 2 d) 0)))
... |
3347290e7f45b1da04a88cda5f05e4e7b80ee3940c04f8ae411e7d78bbb1fffa | vaibhavsagar/experiments | Setup.hs | # OPTIONS_GHC -cpp #
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Setup
Copyright : 2003 - 2004
--
Maintainer : < >
-- Stability : alpha
-- Portability : portable
--
-- Explanation: Data types and parser for the standard command... | null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/packages/Cabal/Distribution/Setup.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Setup
Stability : alpha
Portability : portable
Explanation: Data types and parser for the standard command-line
setup. Will also return commands it doesn't know about.
optionHelpString,
Misc:
type C... | # OPTIONS_GHC -cpp #
Copyright : 2003 - 2004
Maintainer : < >
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
* Redistributions of source code must retain the above ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.