_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 |
|---|---|---|---|---|---|---|---|---|
f239a488835c751b72615632ca45daab25071e6b447499bb29d586a74c0b8de7 | hoelzl/Clicc | map.lisp | ;;;-----------------------------------------------------------------------------
Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany
;;;-----------------------------------------------------------------------------
Projekt : APPLY - A Practicable And Portable Lisp Implementation
;;; ... | null | https://raw.githubusercontent.com/hoelzl/Clicc/cea01db35301144967dc74fd2f96dd58aa52d6ea/src/runtime/lisp/map.lisp | lisp | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
------------------------------------------------------
(in-package "RUNTIME") -> (in-package "LISP"),
Exports eingefuegt.
clicc::declaim -> decla... | Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany
Projekt : APPLY - A Practicable And Portable Lisp Implementation
Funktion : Laufzeitsystem : MAPCAR , MAPLIST , MAPC , MAPL , MAPCAN , MAPCON
$ Revision : 1.7 $
$ Log : map.lisp , v $
Revision 1.7 1994/02/02 09:45:16 hk
ma... |
95659fbd9fd203478d99001b1334df37c0548f7ca563542a94f7d116a418f6c9 | atolab/zenoh | session.ml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | null | https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/src/zenoh-proto/session.ml | ocaml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | |
6b5ffdccd08f11bdcc15801396dd654ddf4a8cde2cd1dd496b3b6b64f4f7c70e | well-typed/plutonomy | Conversion.hs | # LANGUAGE CPP #
| Conversions between @plutus - core@ and @plutonomy@ terms .
module Plutonomy.Conversion (
fromUPLC,
toUPLC,
) where
import Control.Monad (void)
import Data.Text (Text)
import Data.Void (Void)
import PlutusCore.Default (DefaultFun, DefaultUni)
import PlutusCore.Quote ... | null | https://raw.githubusercontent.com/well-typed/plutonomy/14b9bd46084db1b785b3a99d55f7f10d38165ee8/src/Plutonomy/Conversion.hs | haskell | -----------------------------------------------------------------------------
From
-----------------------------------------------------------------------------
| Convert closed 'UPLC.Term' to bound @'Term' a@.
We convert to unique names as these are easier to convert from
-------------------------------------------... | # LANGUAGE CPP #
| Conversions between @plutus - core@ and @plutonomy@ terms .
module Plutonomy.Conversion (
fromUPLC,
toUPLC,
) where
import Control.Monad (void)
import Data.Text (Text)
import Data.Void (Void)
import PlutusCore.Default (DefaultFun, DefaultUni)
import PlutusCore.Quote ... |
a75624d5f9ea30720518d6dbfdaf5835201f8215e7d91bc1d305ab26cf3b49d9 | alphagov/govuk-guix | build.scm | (define-module (gds scripts govuk system build)
#:use-module (srfi srfi-1)
#:use-module (guix derivations)
#:use-module (guix grafts)
#:use-module (guix monads)
#:use-module (guix store)
#:use-module (guix gexp)
#:use-module (guix scripts build)
#:use-module (gnu system)
#:use-module (gnu system vm)
... | null | https://raw.githubusercontent.com/alphagov/govuk-guix/dea8c26d2ae882d0278be5c745e23abb25d4a4e2/gds/scripts/govuk/system/build.scm | scheme | TODO: This shouldn't be necessary
data-snapshot through, as this is handled in
the packer template | (define-module (gds scripts govuk system build)
#:use-module (srfi srfi-1)
#:use-module (guix derivations)
#:use-module (guix grafts)
#:use-module (guix monads)
#:use-module (guix store)
#:use-module (guix gexp)
#:use-module (guix scripts build)
#:use-module (gnu system)
#:use-module (gnu system vm)
... |
3788e600f0a573d635a6085041f146798299cb6d979e12170c2b2359d27f0163 | jyh/metaprl | sil_state.ml |
* Operations on the state .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / d... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/sil/sil_state.ml | ocaml | ***********************************************************************
* SYNTAX *
***********************************************************************
* Labels in the state.
* State operations.
**************************************************... |
* Operations on the state .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / d... |
33778ee6298fd9e1b46ace2c472e70d35d52ea520942826fd4f4d1f88663cda3 | TrustInSoft/tis-interpreter | ProverWhy3.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/ProverWhy3.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
27631eee528eec3821a3d3811754c0f457f969c3860f562ed6fdd728b2eaa32e | inria-parkas/sundialsml | test_nvector_serial.ml |
* -----------------------------------------------------------------
* $ Revision : 4137 $
* $ Date : 2014 - 06 - 15 12:26:15 -0700 ( Sun , 15 Jun 2014 ) $
* -----------------------------------------------------------------
* Programmer(s ): @ LLNL
* -------------------------------------------------... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a72ebfc84b55470ed97fbb0b45d700deebfc1664/examples/nvector/serial/test_nvector_serial.ml | ocaml | {{{
}}}
{{{
}}}
----------------------------------------------------------------------
* Main NVector Testing Routine
* --------------------------------------------------------------------
check input and set vector length
Create vectors
Fused and vector array operations tests (disabled)
fused operati... |
* -----------------------------------------------------------------
* $ Revision : 4137 $
* $ Date : 2014 - 06 - 15 12:26:15 -0700 ( Sun , 15 Jun 2014 ) $
* -----------------------------------------------------------------
* Programmer(s ): @ LLNL
* -------------------------------------------------... |
03de09ee5fffb5b4b2caaa85af1d7931e64e95edd13e8d52682971a8c4cfde57 | DHSProgram/DHS-Indicators-SPSS | NT_tables2.sps | * Encoding: windows-1252.
*****************************************************************************************************
Program: NT_tables2.sps
Purpose: produce tables for indicators with the denominator of the youngest child under age 2 years living with the mother
Author: Ivana Bjelic
Date last modif... | null | https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/578e6d40eff9edebda7cf0db0d9a0a52a537d98c/Chap11_NT/NT_tables2.sps | scheme | * Encoding: windows-1252.
*****************************************************************************************************
Program: NT_tables2.sps
Purpose: produce tables for indicators with the denominator of the youngest child under age 2 years living with the mother
Author: Ivana Bjelic
Date last modif... | |
fdb75d73b08091ba0f57020682843155a89e4fd450da412031e1caac68cf4587 | TokTok/hs-toxcore | KeyPairSpec.hs | # LANGUAGE StrictData #
# LANGUAGE Trustworthy #
module Network.Tox.Crypto.KeyPairSpec where
import qualified Crypto.Saltine.Class as Sodium (encode)
import Data.Proxy (Proxy (..))
import Test.Hspec
import Test.QuickCheck
import qualified Network.Tox.Crypt... | null | https://raw.githubusercontent.com/TokTok/hs-toxcore/647c3070cab29aee3d795a456be534d77c167d81/test/Network/Tox/Crypto/KeyPairSpec.hs | haskell | # LANGUAGE StrictData #
# LANGUAGE Trustworthy #
module Network.Tox.Crypto.KeyPairSpec where
import qualified Crypto.Saltine.Class as Sodium (encode)
import Data.Proxy (Proxy (..))
import Test.Hspec
import Test.QuickCheck
import qualified Network.Tox.Crypt... | |
b02b7e745fae072ce8b6c7c79cc480917b232b04a75ea4e81986783610fd9d3b | senapk/funcional_arcade | solver.hs | alter :: Int -> [Int]
alter 0 = []
alter 1 = [1, -1]
alter n = alter (n-1) ++ [n, -n] | null | https://raw.githubusercontent.com/senapk/funcional_arcade/70fa04b4799d5a8c7e5add39d9f217f38f418600/base/026/solver.hs | haskell | alter :: Int -> [Int]
alter 0 = []
alter 1 = [1, -1]
alter n = alter (n-1) ++ [n, -n] | |
21000ee1ae0f1510cb2a0f01098f7b568ce3195234ae10731ffcb3358f34583a | haskell-repa/repa | Solver.hs |
module Solver where
import Data.Array.Repa.Vector.Segd (Segd)
import Data.Array.Repa.Vector as R
import Data.Array.Repa.Vector.Index as R
import Data.Array.Repa.Vector.Operators.Zip as R
import Data.Array.Repa.Vector.Operators.Unzip as R
import Data.Array.Repa.Vector.Op... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-examples/examples/QuickHull/Solver.hs | haskell | | A point in the 2D plane.
| Compute the convex hull of a vector of points.
Find the points that are on the extreme left and right.
Append all the points together.
We'll find the hull of the top and bottom points at the same time.
Compute the hull for the top and bottom of the plane.
The results both sides are... |
module Solver where
import Data.Array.Repa.Vector.Segd (Segd)
import Data.Array.Repa.Vector as R
import Data.Array.Repa.Vector.Index as R
import Data.Array.Repa.Vector.Operators.Zip as R
import Data.Array.Repa.Vector.Operators.Unzip as R
import Data.Array.Repa.Vector.Op... |
ff6f6617ffba85948c60fa70c1d3a5386270d59e7edd9ae7fd1f687003f3cdba | LexiFi/menhir | stringMap.mli | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/stringMap.mli | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
6502569be873cfd2abb8c2551a6a34ae29575fa1f34c5887add59485a04e230c | haskell-mafia/boris | Index.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Test.IO.Boris.Store.Index where
import qualified Boris.Store.Index as SI
import Control.Monad.IO.Class (MonadIO (..))
import qualified Control.Retry as Ret... | null | https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-store/test/Test/IO/Boris/Store/Index.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Test.IO.Boris.Store.Index where
import qualified Boris.Store.Index as SI
import Control.Monad.IO.Class (MonadIO (..))
import qualified Control.Retry as Retry
import qualified Data.List as L... |
7212592a8e4be2198c6e9ef2e7c71fb9adfe5e404b57ab28a4ef5d754bf680ef | theodormoroianu/SecondYearCourses | sampleReader.hs | import Data.Maybe
newtype Reader a b = Reader { runReader :: a -> b }
instance Monad (Reader a) where
return x = Reader (const x)
r1 >>= f =
Reader (\input ->
let output1 = runReader r1 input in
runReader (f output1) input)
instance Applicative (Reader a) where
pure = retu... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/90807f90572912424ac9c7b3a12b47172d7f494c/FLP/ExamenHaskell/SimulareExamen/sampleReader.hs | haskell | import Data.Maybe
newtype Reader a b = Reader { runReader :: a -> b }
instance Monad (Reader a) where
return x = Reader (const x)
r1 >>= f =
Reader (\input ->
let output1 = runReader r1 input in
runReader (f output1) input)
instance Applicative (Reader a) where
pure = retu... | |
30756fe598cec7c474f2280c5f17b36e20c91a6f9246b1d7f600794bcd5dbd2c | malgo-lang/malgo | Prelude.hs | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Koriel.Prelude
*
module Relude,
module Control.Monad.Writer.Class,
module Control.Monad.Trans.Writer.CPS,
-- * Utilities
unzip,
replaceOf,
localState,
chomp,
PrettyShow (..),
-- * Lift IO functions
... | null | https://raw.githubusercontent.com/malgo-lang/malgo/b18b8fbc37881a3ccd15eb382979a963c705f22c/src/Koriel/Prelude.hs | haskell | * Utilities
* Lift IO functions
** Show
** String
** Text
Lift IO funcitons
| Lifted version of 'System.IO.hPrint'.
| Lifted version of 'System.IO.hPutStrLn'.
| Lifted version of 'T.hPutStr'.
| Lifted version of 'T.hPutStrLn'. | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Koriel.Prelude
*
module Relude,
module Control.Monad.Writer.Class,
module Control.Monad.Trans.Writer.CPS,
unzip,
replaceOf,
localState,
chomp,
PrettyShow (..),
hPrint,
hPutStr,
hPutStrLn,
hPu... |
35846eb1caa3b458807ccfd5643c088a55c9656858249a14d5219fb1754919ef | soegaard/little-helper | priority-queue.scm | priority-queue.scm --
;;; PURPOSE
; This file implements priority queues on top of
; a heap library.
(module priority-queue mzscheme
(require (prefix heap: "heap.scm")
(lib "67.ss" "srfi"))
; a priority-queue is a heap of (cons <priority> <element>)
(define-struct priorit... | null | https://raw.githubusercontent.com/soegaard/little-helper/26249c688e5adf1e2535c405c6289030eff561b4/planet/galore.plt/2/2/priority-queue.scm | scheme | PURPOSE
This file implements priority queues on top of
a heap library.
a priority-queue is a heap of (cons <priority> <element>)
conveniences
sort after priority
TODO: and then element?
OPERATIONS
| priority-queue.scm --
(module priority-queue mzscheme
(require (prefix heap: "heap.scm")
(lib "67.ss" "srfi"))
(define-struct priority-queue (heap))
(define (heap pq) (priority-queue-heap pq))
(define (pri p) (car p))
(define (elm p) (cdr p))
(define (make h)... |
ebc03d729434d616d5f5651613a0f2bde3a50cfb8ec20e3e8738d30cfa0db39b | bravit/unescaping-print | UnescapingPrint.hs | # LANGUAGE
FlexibleInstances
, UndecidableInstances
, TypeFamilies
, FlexibleContexts #
FlexibleInstances
, UndecidableInstances
, TypeFamilies
, FlexibleContexts #-}
module UnescapingPrint (unEscapingShow, ushow, unEscapingPrint, uprint) where
import Prelude(Char, String, IO, putStrLn, S... | null | https://raw.githubusercontent.com/bravit/unescaping-print/c929ec5cb1d7b877fb3f2ee7aa0c7c09acdb4186/UnescapingPrint.hs | haskell | ------------------------------------------------------------------------ | # LANGUAGE
FlexibleInstances
, UndecidableInstances
, TypeFamilies
, FlexibleContexts #
FlexibleInstances
, UndecidableInstances
, TypeFamilies
, FlexibleContexts #-}
module UnescapingPrint (unEscapingShow, ushow, unEscapingPrint, uprint) where
import Prelude(Char, String, IO, putStrLn, S... |
badb0d20d0ecb180c0108444f1c5a5d92815d8c5df82c73b92b3a3edb59477c2 | overtone/overtone | jna_path.clj | (ns overtone.jna-path
(:require [badigeon.bundle :as bundle]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.tools.deps.alpha :as deps]
[clojure.walk :as walk]
[overtone.helpers.file :refer [ensure-native]]
[overtone.helpers.system :refer... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/jna_path.clj | clojure | extract the native dependencies with badigeon
set jna.library.path to point to native libraries
dependant on OS. No path merge to prevent clj-native | (ns overtone.jna-path
(:require [badigeon.bundle :as bundle]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.tools.deps.alpha :as deps]
[clojure.walk :as walk]
[overtone.helpers.file :refer [ensure-native]]
[overtone.helpers.system :refer... |
5d75e13062d139e4a7b766ae7936cbf7d92193aa40c37610cb4472676cbe70cc | kind2-mc/kind2 | numeral.mli | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
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 a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/c601470eb68af9bd3b88828b04dbcdbd6bd6bbf5/src/terms/numeral.mli | ocaml | * Type of arbitrary precision numerals
* Pretty-print a numeral, e.g. -1
* Pretty-print a numeral in s-expression, e.g. (- 1)
* Return a string representation of a numeral
* Convert an integer to a numeral
* Convert an arbitrary large integer numeral to numeral
* Convert a string to numeral
* Convert a numeral t... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
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 a... |
05de7f0c7a57fdb67d61945c8802b2e18609c50ebcfbb5a84bcef94dd584e90d | owlbarn/owl_opt | adam_s.mli | module Make (P : Prms.PT) :
Adam_intf.Sig
with type fv = Owl.Algodiff.S.t
and type prm = Owl.Algodiff.S.t
and type 'a t := 'a P.t
| null | https://raw.githubusercontent.com/owlbarn/owl_opt/c3b34072dddbce2d70e1698c5f1fd84d783f9cef/src/opt/adam/adam_s.mli | ocaml | module Make (P : Prms.PT) :
Adam_intf.Sig
with type fv = Owl.Algodiff.S.t
and type prm = Owl.Algodiff.S.t
and type 'a t := 'a P.t
| |
99d0e2469fbdb66f85f5ac202733651498f160f53ceb93fa3445eaccb2cba9d1 | donaldsonjw/bigloo | walk.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Inline / walk.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Inline/walk.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The inlining pass */
*===========================... | * serrano / prgm / project / bigloo / comptime / Inline / walk.scm * /
* Author : * /
* Creation : Mon Jan 9 19:15:23 1995 * /
* Last change : Mon Mar 28 09:40:40 2011 ( serrano ) * /
* Cop... |
89c637f8e8e456661b41092f8ecd7a90fed60c1de0a3ef1345cbb7d86dec4c89 | lexi-lambda/freer-simple | OpenUnion.hs | # LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- |
-- Module: Data.OpenUnion
-- Description: Open unions (type-indexed co-products) for extensible effects.
Copyright : ( c ) 2016 Allele Dev ; 2017 Ixperta Solutions s.r.o . ; 2017
-- License: BSD3
Maintainer : ... | null | https://raw.githubusercontent.com/lexi-lambda/freer-simple/e5ef0fec4a79585f99c0df8bc9e2e67cc0c0fb4a/src/Data/OpenUnion.hs | haskell | |
Module: Data.OpenUnion
Description: Open unions (type-indexed co-products) for extensible effects.
License: BSD3
Stability: experimental
Open unions (type-indexed co-products, i.e. type-indexed sums) for
extensible effects All operations are constant-time.
* Open Union
* Open Union Operations... | # LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
Copyright : ( c ) 2016 Allele Dev ; 2017 Ixperta Solutions s.r.o . ; 2017
Maintainer : < >
Portability : GHC specific language extensions .
module Data.OpenUnion
Union
, Weakens(..)
, (:++:)
, decomp
, w... |
854e4eed0f7e33fc3e4857b5e38eb2e4ebe057e6451f41e157411e36f0b405d5 | hargettp/raft | Protocol.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
-----------------------------------------------------------------------------
-- |
-- Module : Control.Consensus.Raft.Protocol
Copyright : ( c ) 2014
License : MI... | null | https://raw.githubusercontent.com/hargettp/raft/1ed007986a908e43d9867935af759bccc3b9a57f/src/Control/Consensus/Raft/Protocol.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Consensus.Raft.Protocol
Maintainer :
Stability : experimental
Defines the low-level protocol describing the RPC messages that
pass members of a cluster governed by Raft.
---------------------------------... | # LANGUAGE ExistentialQuantification #
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
Copyright : ( c ) 2014
License : MIT ( see LICENSE file )
Portability : non - portable ( requires STM )
module Control.Consensus.Raft.Protocol (
AppendEntries... |
0224dec1eec6bf05155f74b7390586ed69f749cdb6b2d139d44b483fee2ed9d0 | jackrusher/mundaneum | query.clj | (ns mundaneum.query
(:require [clojure.data.json :as json]
[mundaneum.properties :refer [wdt wdt->readable]]
[com.yetanalytics.flint :as f]
[hato.client :as http]
[tick.core :as tick]))
TODO several of the downstream functions should probably have two
;; arities so o... | null | https://raw.githubusercontent.com/jackrusher/mundaneum/40b8e6e706eaf2d545d582eefaf0f06ad3c598f8/src/mundaneum/query.clj | clojure | arities so one can do things like (entity :es "churro").
no datatype, return literal as is
unknown datatype, return whole value map
unknown value type, return whole value map
no :instance-of / :subclass-of wikidata properties
and no disambiguation pages
gets everything for the entity; :claims key has the propert... | (ns mundaneum.query
(:require [clojure.data.json :as json]
[mundaneum.properties :refer [wdt wdt->readable]]
[com.yetanalytics.flint :as f]
[hato.client :as http]
[tick.core :as tick]))
TODO several of the downstream functions should probably have two
(def ^:dynamic ... |
516209a99d1e7b34bfaf182670ad231521cd23bcaccadb252c8965189d218cdd | JacquesCarette/Drasil | PhysicalProperties.hs | -- | Assigns symbols and units (quantities) to common physical properties.
module Data.Drasil.Quantities.PhysicalProperties where
import Language.Drasil
import Language.Drasil.ShortHands (lM, cL, cV, lGamma, lRho)
import Data.Drasil.Concepts.PhysicalProperties as CPP (density, specWeight, len,
mass, vol)
import Dat... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/2178e68e4f62b3210eb2e3a19c2727a4ddf3912a/code/drasil-data/lib/Data/Drasil/Quantities/PhysicalProperties.hs | haskell | | Assigns symbols and units (quantities) to common physical properties. | module Data.Drasil.Quantities.PhysicalProperties where
import Language.Drasil
import Language.Drasil.ShortHands (lM, cL, cV, lGamma, lRho)
import Data.Drasil.Concepts.PhysicalProperties as CPP (density, specWeight, len,
mass, vol)
import Data.Drasil.SI_Units (kilogram, metre, m_3, specificWeight)
import Data.Drasil... |
0e7d2fc9bd07492ba865e845973e0749e9f56fba0fcd31d3c48a036548887ca9 | larcenists/larceny | 16seq1.scm | (bits 16)
(text
(seq (nop)
(nop)
(seq (nop)
(inv (nop))
(nop))
(seq (nop))))
00000000 90 nop
00000001 90 nop
00000002 90 nop
00000003 90 nop
00000004 EB02 jmp short 0x8
00000006 90 ... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims16/16seq1.scm | scheme | (bits 16)
(text
(seq (nop)
(nop)
(seq (nop)
(inv (nop))
(nop))
(seq (nop))))
00000000 90 nop
00000001 90 nop
00000002 90 nop
00000003 90 nop
00000004 EB02 jmp short 0x8
00000006 90 ... | |
8df4b14921e48e21548b1b4baf20eab03ff36372eb6a91ba98b1b9ce40ea19d9 | runtimeverification/haskell-backend | Resolvers.hs | |
Module : Kore . IndexedModule . Resolvers
Description : Tools for resolving IDs .
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Maintainer :
Stability : experimental
Portability : POSIX
Module : Kore.IndexedModule.Resolvers
Description : Tools... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/7e0d12bef597158073a5d273185096828bd68300/kore/src/Kore/IndexedModule/Resolvers.hs | haskell | TODO: This symbol is used by `resolveHook`.
`resolveHook` doesn't have tests, but
`getHeadApplicationSorts does. So this is
exported until `resolveHook` has its own
tests.
| Module representing an indexed definition
|the head we want to find sorts for
|'resolveThing' looks up an id in an 'IndexedModule', also s... | |
Module : Kore . IndexedModule . Resolvers
Description : Tools for resolving IDs .
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Maintainer :
Stability : experimental
Portability : POSIX
Module : Kore.IndexedModule.Resolvers
Description : Tools... |
6982aa93adb45e2126cb653d5b7874924ac7ccf133d8877fe9bf4067cac89cd8 | robkorn/plutus-experimental-smart-contracts | naiveLottery.hs | module NaiveLottery where
import qualified Language.PlutusTx as PlutusTx
import qualified Language.PlutusTx.Prelude as P
import qualified Language.PlutusTx.Builtins as Builtins
import Ledger
import Ledger.Validation
import Wallet
import Playground.Contract
lot... | null | https://raw.githubusercontent.com/robkorn/plutus-experimental-smart-contracts/ef8cf5fbf93d5883b84d4398f88af579ec373392/Games/naiveLottery/naiveLottery.hs | haskell | module NaiveLottery where
import qualified Language.PlutusTx as PlutusTx
import qualified Language.PlutusTx.Prelude as P
import qualified Language.PlutusTx.Builtins as Builtins
import Ledger
import Ledger.Validation
import Wallet
import Playground.Contract
lot... | |
5205d62295e299532bd86de0b8cf0dc8fc8e243540d427e418994b190b1a3616 | bobzhang/fan | semi_test.ml | let _loc = FanLoc.ghost;
let f = Format.std_formatter;
module P = PreCast.Make (struct end) ;
open P;
open LibUtil;
let open FanParsers in begin
pa_r (module P);
pa_rp (module P);
pa_q (module P);
pa_g (module P);
pa_l (module P);
pa_m (module P);
end;
P.iter_and_take_callbacks (fun (_, f) -> f (... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/testr/semi_test.ml | ocaml | prefix:
`-expr---";"---SELF] | let _loc = FanLoc.ghost;
let f = Format.std_formatter;
module P = PreCast.Make (struct end) ;
open P;
open LibUtil;
let open FanParsers in begin
pa_r (module P);
pa_rp (module P);
pa_q (module P);
pa_g (module P);
pa_l (module P);
pa_m (module P);
end;
P.iter_and_take_callbacks (fun (_, f) -> f (... |
b828e36b6c048817a802fa8a7cba85bd333155355cdaa3dd48bf75e6d01f2464 | melange-re/melange | lam_pass_lets_dce.ml | (************************************)
(* *)
(* OCaml *)
(* *)
, projet Cristal , INRIA Rocquencourt ... | null | https://raw.githubusercontent.com/melange-re/melange/bcaf468572532f255262999d78af80585f25ecc0/jscomp/core/lam_pass_lets_dce.ml | ocaml | **********************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
Adapted for Javascript backend : , ... |
e130fa7789a360720adefe96014659cbda57b1d76391c78a0a5e59cedbb750ef | softwarelanguageslab/maf | R5RS_scp1_count-tree-2.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 2
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((atom? (lambda (x)
(not (pair? x))))
(depth (lambda (tree)
(if (<change> (null? tree) (not (null? tree)))
0
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_count-tree-2.scm | scheme | Changes:
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 2
(letrec ((atom? (lambda (x)
(not (pair? x))))
(depth (lambda (tree)
(if (<change> (null? tree) (not (null? tree)))
0
(if (atom? tree)
0
... |
e2ecdd3e279ac54af4ee8aa518ee379c36392e8407903f2a1d9c423a337071ff | Glue42/gateway-modules | messages.cljc | (ns gateway.domains.global.messages
(:require
[gateway.common.messages :as m]
#?(:cljs [gateway.reason :refer [Reason]])
[gateway.domains.global.constants :as constants])
#?(:clj
(:import [gateway.reason Reason])))
(defn join
([request-id peer-id restrictions domain-uri peer-identity options]
... | null | https://raw.githubusercontent.com/Glue42/gateway-modules/be48a132134b5f9f41fd6a6067800da6be5e6eca/global-domain/src/gateway/domains/global/messages.cljc | clojure | (ns gateway.domains.global.messages
(:require
[gateway.common.messages :as m]
#?(:cljs [gateway.reason :refer [Reason]])
[gateway.domains.global.constants :as constants])
#?(:clj
(:import [gateway.reason Reason])))
(defn join
([request-id peer-id restrictions domain-uri peer-identity options]
... | |
8b50410ec02d00fb8efba512792a426863ebdd26971f62a028d7a93dd0f5e6ae | chef/chef-server | chef_wm_named_principal.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*-
%% ex: ts=4 sw=4 et
@author < >
Copyright 2012 - 2014 Chef Software , Inc. 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 ... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/oc_chef_wm/src/chef_wm_named_principal.erl | erlang | ex: ts=4 sw=4 et
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 permissions and limitations
under the License.
chef_wm beh... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*-
@author < >
Copyright 2012 - 2014 Chef Software , Inc. 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 L... |
d1e3488356b4fec4d7db2dd3b8b3558372e5641510813ab7a3503c6554e17196 | Helium4Haskell/helium | PatBindNovar.hs | module PatBindNovar where
(_:_) = []
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticerrors/PatBindNovar.hs | haskell | module PatBindNovar where
(_:_) = []
| |
9e11726e93194615b8447317556a31550cc5511b2de0dd9a05d40600ce140df5 | LaurentMazare/ocaml-minipy | ast.mli | open! Base
type boolop =
| And
| Or
[@@deriving sexp]
type unaryop =
| Invert
| Not
| UAdd
| USub
[@@deriving sexp]
type operator =
| Add
| Sub
| Mult
| MatMult
| Div
| Mod
| Pow
| LShift
| RShift
| BitOr
| BitXor
| BitAnd
| FloorDiv
[@@deriving sexp]
type cmpop =
| Eq
| No... | null | https://raw.githubusercontent.com/LaurentMazare/ocaml-minipy/e83d4bfad55819a27195109d401437faa0f65f69/src/ast.mli | ocaml | TODO: proper slices | open! Base
type boolop =
| And
| Or
[@@deriving sexp]
type unaryop =
| Invert
| Not
| UAdd
| USub
[@@deriving sexp]
type operator =
| Add
| Sub
| Mult
| MatMult
| Div
| Mod
| Pow
| LShift
| RShift
| BitOr
| BitXor
| BitAnd
| FloorDiv
[@@deriving sexp]
type cmpop =
| Eq
| No... |
26da1ab8fc2323f0aaa48ca35de965926b0c2233378577aa06958aab6c60a925 | DalekBaldwin/on-lisp | chapter-12.lisp | (in-package :on-lisp.12)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Chapter 12 - Generalized Variables
p. 166
;; wrong
#+nil
(defmacro toggle (obj)
`(setf ,obj (not ,obj)))
p. 169
(defmacro allf (val &rest args)
(with-gensyms (gval)
`(let ((,gval ,val))
(setf ,@(mapcan (lambda (a) (list a gval))
... | null | https://raw.githubusercontent.com/DalekBaldwin/on-lisp/b13e8b6e956bef45c4fd7194a062c27555268048/src/chapter-12.lisp | lisp |
wrong
also, &environment args are added to the definitions
alternate definition that takes functional arguments | (in-package :on-lisp.12)
Chapter 12 - Generalized Variables
p. 166
#+nil
(defmacro toggle (obj)
`(setf ,obj (not ,obj)))
p. 169
(defmacro allf (val &rest args)
(with-gensyms (gval)
`(let ((,gval ,val))
(setf ,@(mapcan (lambda (a) (list a gval))
args)))))
(defmacro nilf (... |
cdb009ec82bd6d0108e4f0bfc19ee1e043e766594e4b7b3e2fc3fc87f19d7e41 | jech/cl-yacc | calculator.lisp | Copyright ( c ) 2009 by
; 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, merge, publish, distribute, ... | null | https://raw.githubusercontent.com/jech/cl-yacc/1334f5469251ffb3f8738a682dc8ee646cb26635/calculator.lisp | lisp | Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright notice an... | Copyright ( c ) 2009 by
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
4bc39585bd45681b06bdf822fed4f9e719543b49c13682d76c918453a9eff9f9 | ndpar/erlang | life_async.erl | %%%
%%% Asynchronous Game of Life
%%% 's_Game_of_Life
%%%
%%% This implementation preserves the standard game behaviour by
%%% introducing a master process which represents a global clock.
%%%
%%% The game runs for finite number of steps and then stops.
%%%
%%% Another feature of this implementation is that new process... | null | https://raw.githubusercontent.com/ndpar/erlang/e215841a1d370e0fc5eb6b9ff40ea7ae78fc8763/src/life_async.erl | erlang |
Asynchronous Game of Life
's_Game_of_Life
This implementation preserves the standard game behaviour by
introducing a master process which represents a global clock.
The game runs for finite number of steps and then stops.
Another feature of this implementation is that new processes
are spawned for live cells... | -module(life_async).
-author("Andrey Paramonov <>").
-export([start/2]).
Internal functions for process spawning
-export([new_cell/3]).
Blinker example : life_async : start([{3,2},{3,3},{3,4 } ] , 2 ) .
start(Seed, Iter) ->
god(Seed, new_world(), Iter).
values are processes . One process per live cell .... |
5967a928286a471f0515d4193d45b56ee60547123ab5078e16333b63e661717a | data61/Mirza | Types.hs | {-# LANGUAGE DeriveGeneric #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NamedFieldPuns #
module Mirza.EntityDataAPI.Types where
import System.Envy (DefConfig (..), FromEnv (..),
Var (..), env, envMaybe, (.!=))
im... | null | https://raw.githubusercontent.com/data61/Mirza/24e5ccddfc307cceebcc5ce26d35e91020b8ee10/projects/entity-data-api/src/Mirza/EntityDataAPI/Types.hs | haskell | # LANGUAGE DeriveGeneric #
----------------- AppM -----------------------
runReaderT :: r -> m a
ReaderT r m a
newtype ExceptT e m a :: * -> (* -> *) -> * -> *
------------------------------------------------
-------------Context--------------------------
--------------------------------------------... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE NamedFieldPuns #
module Mirza.EntityDataAPI.Types where
import System.Envy (DefConfig (..), FromEnv (..),
Var (..), env, envMaybe, (.!=))
import qualified System.Envy as... |
33704a4637b524ee0e3050b0278c0c04df5b9c68c5cf77ec5b5ed220ec492437 | 3b/3bil | ir0.lisp | (in-package :avm2-compiler)
(declaim (optimize debug safety))
;;; ir0: minimal compilation, alphatization, etc
;;; special forms
;;block
;;let*
;;return-from
;;catch
;;load-time-value
;;setq
;;eval-when
;;locally
;;symbol-macrolet
;;flet
;;tagbody
;;function
;;multiple-value-call
;;the
;;go
;;multiple-value-prog1
;;... | null | https://raw.githubusercontent.com/3b/3bil/c852181848bedf476373e901869ca29471f926ee/compile/ir0.lisp | lisp | ir0: minimal compilation, alphatization, etc
special forms
block
let*
return-from
catch
load-time-value
setq
eval-when
locally
symbol-macrolet
flet
tagbody
function
multiple-value-call
the
go
multiple-value-prog1
throw
if
unwind-protect
labels
let
quote
fixme: adjust this list to match what is actually implemented
... | (in-package :avm2-compiler)
(declaim (optimize debug safety))
progn
progv
(defun 3bil-special-operator-p (x)
(member x '(block let* return-from catch load-time-value setq eval-when
locally symbol-macrolet flet macrolet tagbody function
multiple-value-call the go multiple-value-prog1 thr... |
fce4f79f0e3157d0747fa08ebb3a4f73aac5d8767b7d41d456204477bef4fb09 | alexkehayias/chocolatier | collidable.cljs | (ns chocolatier.engine.components.collidable)
(defn mk-collidable-state
"Returns a hashmap of updated state with all required collision
component state.
- width: the width of the bounding box in pixels
- height: the height of the bounding box in pixels
- attributes: hashmap of attitional attributes to i... | null | https://raw.githubusercontent.com/alexkehayias/chocolatier/6b77c1dbf10ef7ff83d0b5a2ebb9fda39edcde5a/src/cljs/chocolatier/engine/components/collidable.cljs | clojure | (ns chocolatier.engine.components.collidable)
(defn mk-collidable-state
"Returns a hashmap of updated state with all required collision
component state.
- width: the width of the bounding box in pixels
- height: the height of the bounding box in pixels
- attributes: hashmap of attitional attributes to i... | |
9e3dc670739b01f463a8d4a521ed5e12e431f2c045073c9ffb2ef100fb091c28 | quietfanatic/neskell | Reservations.hs |
{-# LANGUAGE DeriveDataTypeable #-}
module NES.Reservations (res, resz) where
import Assembler
import ASM
import ASM6502
import Data.Typeable
import Data.Word
import Text.Printf
data ResCounter a = ResCounter a Bool deriving (Typeable)
res_generic :: (Typeable a, Integral a, Integral b) => String -> a -> a -> b ->... | null | https://raw.githubusercontent.com/quietfanatic/neskell/63ebd4316959ab95c8b2a4aea21eb114340a39c0/lib/NES/Reservations.hs | haskell | # LANGUAGE DeriveDataTypeable # |
module NES.Reservations (res, resz) where
import Assembler
import ASM
import ASM6502
import Data.Typeable
import Data.Word
import Text.Printf
data ResCounter a = ResCounter a Bool deriving (Typeable)
res_generic :: (Typeable a, Integral a, Integral b) => String -> a -> a -> b -> ASM6502 (Section a ())
res_generic ... |
6328d1ca18f93502c17e6cc8b6ca2eadefe4b59b068baeef4b69a784d710fe8c | TheLortex/mirage-monorepo | udp.mli | (** User datagram protocol layer: connectionless message-oriented
communication. *)
module type S = sig
type ipaddr
(** The type for an IP address representations. *)
type t
* The type representing the internal state of the UDP layer .
val disconnect: t -> unit
* Disconnect from the UDP layer . While th... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/mirage-tcpip/src/core/udp.mli | ocaml | * User datagram protocol layer: connectionless message-oriented
communication.
* The type for an IP address representations.
* [unlisten t ~port] stops any listeners on [port].
* [input t] demultiplexes incoming datagrams based on
their destination port. | module type S = sig
type ipaddr
type t
* The type representing the internal state of the UDP layer .
val disconnect: t -> unit
* Disconnect from the UDP layer . While this might take some time to
complete , it can never result in an error .
complete, it can never result in an error. *)
type c... |
2c9a2dec906839d17f41dfa7909f6f6bfd94d4ed09d7d212fcaaaa53c2c71fcc | OlivierNicole/haskell-chess | main.hs | import ChessBoard
import Move
import ChessRules
import Color
import Decisions
import System.IO (hFlush, stdout)
import Input (readMaybe)
depth = 3
main :: IO ()
main = game initialPosition
-- | Play a game by interacting with an opponent, starting from a given
situation . The opponent does the first move .
game ::... | null | https://raw.githubusercontent.com/OlivierNicole/haskell-chess/3b76bbc39a6a43d6be9e22e4a68613eba2d2898d/main.hs | haskell | | Play a game by interacting with an opponent, starting from a given | import ChessBoard
import Move
import ChessRules
import Color
import Decisions
import System.IO (hFlush, stdout)
import Input (readMaybe)
depth = 3
main :: IO ()
main = game initialPosition
situation . The opponent does the first move .
game :: ChessBoard -> IO ()
game cb = do
print cb
putStr "input> "
hFl... |
3cbe780bc3381395dcd862f177f8041b2011399db2e318da66271e84bbf546ec | ocaml-sf/learn-ocaml-corpus | prepare.ml | exception TODO
(* Override the dereferencing operator (!) so as to be able to
count how many times it is used. Cross our fingers and hope
that the student does not use the notation [r.contents]. *)
let count = ref 0
let get_count () = !count
let (!) r = incr count; !r
let count = 0 (* for shadowing purposes *)
| null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/1423952e5b5a8e8f4e6a8438ea1d578aae5e18c3/exercises/fpottier/persistent_arrays/prepare.ml | ocaml | Override the dereferencing operator (!) so as to be able to
count how many times it is used. Cross our fingers and hope
that the student does not use the notation [r.contents].
for shadowing purposes | exception TODO
let count = ref 0
let get_count () = !count
let (!) r = incr count; !r
|
7e2313f5bebea319035c7a92a48ec2cab74bd67b5998c37be746f2f29e4df222 | spurious/sagittarius-scheme-mirror | tls.scm | (import (rnrs)
(sagittarius threads)
(sagittarius object)
(sagittarius socket)
(rfc tls)
(rfc x.509)
(crypto)
(srfi :18)
(srfi :19)
(srfi :64))
(test-begin "RFC TLS")
(define (shutdown&close s)
(tls-socket-shutdown s SHUT_RDWR)
(tls-socket-close s))
(define keypair (generate-key-pair RSA :size 102... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/rfc/tls.scm | scheme | for \r\n
for \r\n
make port
I hope it's enough
textual
end test
the test server is a bit too naive to handle this...
(close-port text-port)
(tls-socket-close client-socket)
(test-assert "TLS server finish" (thread-join! server-thread)) | (import (rnrs)
(sagittarius threads)
(sagittarius object)
(sagittarius socket)
(rfc tls)
(rfc x.509)
(crypto)
(srfi :18)
(srfi :19)
(srfi :64))
(test-begin "RFC TLS")
(define (shutdown&close s)
(tls-socket-shutdown s SHUT_RDWR)
(tls-socket-close s))
(define keypair (generate-key-pair RSA :size 102... |
1a3f6ff82ac8bd8e24b0536e2d35db90d18f3542a47905fb8929c6324d01e4f6 | dkataskin/erlazure | erlazure_app.erl | Copyright ( c ) 2013 - 2015 ,
%% 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 copyright notice,
%% this list of conditions and ... | null | https://raw.githubusercontent.com/dkataskin/erlazure/066510454597b72f283748b2e5be3d5eb8d328b6/src/erlazure_app.erl | erlang | 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 copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in ... | Copyright ( c ) 2013 - 2015 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLA... |
0a549b94601859450052bbc5edb842fcb87c2624447e18d9d319801918947ca7 | ivanjovanovic/sicp | e-4.27.scm | Exercise 4.27 . Suppose we type in the following definitions to the
; lazy evaluator:
(define count 0)
(define (id x)
(set! count (+ count 1))
x)
; Give the missing values in the following sequence of interactions, and
; explain your answers.38
(define w (id (id 10)))
L - Eval input :
count
L - Eval valu... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/4.2/e-4.27.scm | scheme | lazy evaluator:
Give the missing values in the following sequence of interactions, and
explain your answers.38
------------------------------------------------------------
Responses are sequentially
and return the passed argument.
application, but internal one is not applied but is wrapped into thunk
which is p... | Exercise 4.27 . Suppose we type in the following definitions to the
(define count 0)
(define (id x)
(set! count (+ count 1))
x)
(define w (id (id 10)))
L - Eval input :
count
L - Eval value :
<response>
L - Eval input :
w
L - Eval value :
<response>
L - Eval input :
count
L - Eval value :
<respon... |
e9e46025692cbd7a1055a68856961d2012fc7ad03a6cb84177744e8d9d2af979 | pokepay/aws-sdk-lisp | redshift.lisp | ;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(uiop:define-package #:aws-sdk/services/redshift
(:use)
(:use-reexport #:aws-sdk/services/redshift/api))
| null | https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/836b87df520391478a19462443342dc56f4b3f2c/services/redshift.lisp | lisp | DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. |
(uiop:define-package #:aws-sdk/services/redshift
(:use)
(:use-reexport #:aws-sdk/services/redshift/api))
|
bd1024674c8ec060f6716675507f65fe8e687535787a218f434854d2a3a86f74 | typedclojure/typedclojure | nthnext_test.clj | (ns clojure.core.typed.test.nthnext-test
(:require [typed.clj.checker.test-utils :refer :all]
[clojure.test :refer :all]))
(deftest nthnext-test
(is-tc-e
(fn [stmt :- '[t/Any Long]]
(let [body (nthnext stmt 1)]
(ann-form body (t/HSeq [Long])))))
(is-tc-e
(ann-form (nthnext nil 1) n... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/5fd7cdf7941c6e7d1dd5df88bf44474fa35e1fca/typed/clj.checker/test/clojure/core/typed/test/nthnext_test.clj | clojure | (ns clojure.core.typed.test.nthnext-test
(:require [typed.clj.checker.test-utils :refer :all]
[clojure.test :refer :all]))
(deftest nthnext-test
(is-tc-e
(fn [stmt :- '[t/Any Long]]
(let [body (nthnext stmt 1)]
(ann-form body (t/HSeq [Long])))))
(is-tc-e
(ann-form (nthnext nil 1) n... | |
641819198218a6f08b3f2240d967d9a6cbdfc97f5d11649c6c0dbf3838b28060 | garrigue/lablgtk | gEdit.mli | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/src/gEdit.mli | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
71d200d8ffab1b98ab940769da680c27d48873242f3f141a4910e6e10766e84b | rururu/rete4frames | zero_facts.clj | ()
| null | https://raw.githubusercontent.com/rururu/rete4frames/b4c19af125db0918c1cf57240b1dafd768ffc52a/examples/zero_facts.clj | clojure | ()
| |
e49be8a6f1c8ce98827c4fc15d4e127673079570b44aa37b1d1a4c797828fdb9 | unclebob/clojureOrbit | orbitmain.clj | (ns orbitmain
(:use orbit.world)
(:gen-class))
(defn -main [& args]
(run-world))
| null | https://raw.githubusercontent.com/unclebob/clojureOrbit/82d59297dc8c54fccb37b92725f0547def0d6157/src/orbitmain.clj | clojure | (ns orbitmain
(:use orbit.world)
(:gen-class))
(defn -main [& args]
(run-world))
| |
e8d92925b04b9f3c39e2439fdf2c497713a03513508e198eedb1d8ad9531566f | haroldcarr/learn-haskell-coq-ml-etc | katabankocr.hs |
-kata-bankocr/
-bin/wiki.pl?KataBankOCR
Problem description : OCR
Input : stream containing digits from 0 to 9 in " LED - display - like " format :
_ _ _ _ _ _ _
| _ | _ ||_|| _ | _ ||_||_|
|| _ _ | | _ ||_| ||_| _ |
Input has only one line of " 7 - segment " digits , ... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/playpen/katabankocr/katabankocr.hs | haskell | - not done here :
make katabankOCR.hs
2
256
- not done here:
make katabankOCR.hs
2
256
then add the "missing" column at the front.
then, for each group
remove the empty column before each number
(alternatively, could have left it there and added space in dTable definitions)
transpose back to lin... |
-kata-bankocr/
-bin/wiki.pl?KataBankOCR
Problem description : OCR
Input : stream containing digits from 0 to 9 in " LED - display - like " format :
_ _ _ _ _ _ _
| _ | _ ||_|| _ | _ ||_||_|
|| _ _ | | _ ||_| ||_| _ |
Input has only one line of " 7 - segment " digits , ... |
666dd229d1eba46ea38714d2d8b96b538b0c0065c5ad6f064e23ee5e99d746d9 | anuragsoni/shuttle | response.mli | * [ t ] Represents a HTTP 1.1 response .
type t [@@deriving sexp_of]
val create
: ?version:Version.t
-> ?reason_phrase:string
-> ?headers:Headers.t
-> ?body:Body.t
-> Status.t
-> t
(** [version] returns the HTTP version number for the response. *)
val version : t -> Version.t
(** [status] returns the St... | null | https://raw.githubusercontent.com/anuragsoni/shuttle/4b6b477cc9cc811ad717e9ac663b4c4e7346f4b6/http11/src/response.mli | ocaml | * [version] returns the HTTP version number for the response.
* [status] returns the Status code for this response.
* [reason_phrase] returns the status reason phrase for the response.
* [headers] returns the HTTP headers for this response.
* [body] returns the body payload of this response. | * [ t ] Represents a HTTP 1.1 response .
type t [@@deriving sexp_of]
val create
: ?version:Version.t
-> ?reason_phrase:string
-> ?headers:Headers.t
-> ?body:Body.t
-> Status.t
-> t
val version : t -> Version.t
val status : t -> Status.t
val reason_phrase : t -> string
val headers : t -> Headers.t
val... |
ad7f571649d090c8efff47dec8c0e54238b0a2bdedf106fd52f09ed3d76af46d | nomeata/haskell-rec-def | Set.hs | # LANGUAGE TypeFamilies #
| The type @RS.RSet a@ is like ' S.Set ' @a@ , but allows recursive definitions :
> > > : {
let s1 = RS.insert 23 s2
s2 = RS.insert 42 s1
in RS.get s1
:}
fromList [ 23,42 ]
>>> :{
let s1 = RS.insert 23 s2
s2 = RS.insert 42 s1
in RS.get s1
:}
fromList [2... | null | https://raw.githubusercontent.com/nomeata/haskell-rec-def/4d2577251acff004de5eb250cbc152a59dacd0f2/Data/Recursive/Set.hs | haskell | $setup
>>> import qualified Data.Set as S
>>> :set -XFlexibleInstances
>>> :set -XScopedTypeVariables
>>> import Test.QuickCheck
>>> instance Arbitrary RB.RBool where arbitrary = RB.mk <$> arbitrary
>>> instance Show RB.RBool where show = show . RB.get
| prop> RB.get (RB.mk s) === s
| prop> RS.get (RS.insert n... | # LANGUAGE TypeFamilies #
| The type @RS.RSet a@ is like ' S.Set ' @a@ , but allows recursive definitions :
> > > : {
let s1 = RS.insert 23 s2
s2 = RS.insert 42 s1
in RS.get s1
:}
fromList [ 23,42 ]
>>> :{
let s1 = RS.insert 23 s2
s2 = RS.insert 42 s1
in RS.get s1
:}
fromList [2... |
86477d0414545dd8f07b2c23899900847a6dbe0d57662781a242b00ddddfebd4 | databrary/databrary | Transcode.hs | # LANGUAGE RecordWildCards , OverloadedStrings , ViewPatterns #
module Store.Transcode
( startTranscode
, forkTranscode
, stopTranscode
, collectTranscode
, transcodeEnabled
) where
import Control.Concurrent (ThreadId)
import Control.Monad (guard, unless, void)
import Control.Monad.IO.Class (liftIO)
import... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Store/Transcode.hs | haskell | # SOURCE # | # LANGUAGE RecordWildCards , OverloadedStrings , ViewPatterns #
module Store.Transcode
( startTranscode
, forkTranscode
, stopTranscode
, collectTranscode
, transcodeEnabled
) where
import Control.Concurrent (ThreadId)
import Control.Monad (guard, unless, void)
import Control.Monad.IO.Class (liftIO)
import... |
22c320fa56a66629015c3a940f53d2200b1b8b94964705985858e3eed6bdc9b6 | rotty/texinfo | nodal-tree.scm | ( texinfo nodal - tree ) -- rendering stexinfo to a nodal tree
Copyright ( C ) 2003,2004 < wingo at pobox dot com >
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of... | null | https://raw.githubusercontent.com/rotty/texinfo/362a147831ba3ae8926eea6af33b2708d79e05dd/scheme/texinfo/private/nodal-tree.scm | scheme | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public ... | ( texinfo nodal - tree ) -- rendering stexinfo to a nodal tree
Copyright ( C ) 2003,2004 < wingo at pobox dot com >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General P... |
ddc51f58b1bf5522cbf0dd2c8b185d2d4aa955687ab39a729165ec430cea01aa | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.admin.widgets.page.views
(:require
[reagent.core :as r]
[webchange.admin.widgets.page.block.views :as block-views]
[webchange.admin.widgets.page.content.views :as content-views]
[webchange.admin.widgets.page.footer.views :as footer-views]
[webchange.admin.widgets.page.header.views :a... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/109e7b8541b4340e7320614aa0444f33998a058e/src/cljs/webchange/admin/widgets/page/views.cljs | clojure | (ns webchange.admin.widgets.page.views
(:require
[reagent.core :as r]
[webchange.admin.widgets.page.block.views :as block-views]
[webchange.admin.widgets.page.content.views :as content-views]
[webchange.admin.widgets.page.footer.views :as footer-views]
[webchange.admin.widgets.page.header.views :a... | |
6dcac7372d0d071a1a8f9d1136f231cc1884777be5d77e585b11498025c58768 | circuithub/rel8 | Undefined.hs | {-# language FlexibleContexts #-}
# language NamedFieldPuns #
{-# language TypeFamilies #-}
module Rel8.Table.Undefined
( undefined
)
where
-- base
import Prelude hiding ( undefined )
-- rel8
import Rel8.Expr ( Expr )
import Rel8.Expr.Null ( snull, unsafeUnnullify )
import Rel8.Schema.HTable ( htabulate, hfield,... | null | https://raw.githubusercontent.com/circuithub/rel8/f47423ec17c36f441bab4c0cbb2036dc8aecacbd/src/Rel8/Table/Undefined.hs | haskell | # language FlexibleContexts #
# language TypeFamilies #
base
rel8 | # language NamedFieldPuns #
module Rel8.Table.Undefined
( undefined
)
where
import Prelude hiding ( undefined )
import Rel8.Expr ( Expr )
import Rel8.Expr.Null ( snull, unsafeUnnullify )
import Rel8.Schema.HTable ( htabulate, hfield, hspecs )
import Rel8.Schema.Null ( Nullity( Null, NotNull ) )
import Rel8.Schem... |
2dcd1be07c572ee72413ca958b2d850d2e9d8bd917ecd975246d6cb4b1014c23 | stonebuddha/eopl | syntax.ml | type program =
| AProgram of top_level list
and top_level =
| ValTop of string * expression
| FunTop of string * expression
and expression =
| ConstExp of int * Ploc.t
| DiffExp of expression * expression * Ploc.t
| IsZeroExp of expression * Ploc.t
| IfExp of expression * expression * expression * Ploc.... | null | https://raw.githubusercontent.com/stonebuddha/eopl/88ea636110421706f900e753c30240ff1ea26f67/MUTABLE-PAIRS/syntax.ml | ocaml | type program =
| AProgram of top_level list
and top_level =
| ValTop of string * expression
| FunTop of string * expression
and expression =
| ConstExp of int * Ploc.t
| DiffExp of expression * expression * Ploc.t
| IsZeroExp of expression * Ploc.t
| IfExp of expression * expression * expression * Ploc.... | |
bb459d0056fe91c0b75fc1661db96d17ff800d4c952514c8656d48e4ba11b0b6 | lvh/icecap | util.clj | (ns icecap.util
"Generic utilities that don't fit elsewhere.
This module should probably be considered a transitory place for
these things to stay."
(:import (java.net URI)))
(defn get-scheme
"Gets the scheme of a URL."
[url]
(.getScheme (URI. url)))
| null | https://raw.githubusercontent.com/lvh/icecap/700b82ca9af4aa7fe347e92b443ecf3b1e7e53f4/src/icecap/util.clj | clojure | (ns icecap.util
"Generic utilities that don't fit elsewhere.
This module should probably be considered a transitory place for
these things to stay."
(:import (java.net URI)))
(defn get-scheme
"Gets the scheme of a URL."
[url]
(.getScheme (URI. url)))
| |
0bcb58c41a8f3a1aaf2ed7ceb60ff8fb78909054907e737380b5a72c35c2cb12 | replikativ/datahike-server | config_test.clj | (ns datahike-server.config-test
(:require [clojure.test :refer :all]
[datahike-server.config :refer :all]))
(deftest bad-config-test
(testing "Loading bad config file"
(with-redefs [load-config-file (constantly {:server {:join? :baz}})]
(is (thrown? clojure.lang.ExceptionInfo
... | null | https://raw.githubusercontent.com/replikativ/datahike-server/ec87469832e017bfaff98e86046de85f8e365817/test/datahike_server/config_test.clj | clojure | (ns datahike-server.config-test
(:require [clojure.test :refer :all]
[datahike-server.config :refer :all]))
(deftest bad-config-test
(testing "Loading bad config file"
(with-redefs [load-config-file (constantly {:server {:join? :baz}})]
(is (thrown? clojure.lang.ExceptionInfo
... | |
9546532b44b28a42cb1d3c662232f1aa962b3f4645fbc27e7b5f21a55f85821c | lilydjwg/myhaskells | Compute.hs | module Math.Compute (
primes,
isPrime,
factorial,
) where
isPrime :: Integral a => a -> Bool
primes :: Integral a => [a]
isPrime x = let prime_useful = takeWhile (\y -> y*y <= x) primes
in all (\y -> x `mod` y /= 0) prime_useful
primes = 2 : filter isPrime [3, 5..]
factorial :: Integer -> Integer
fa... | null | https://raw.githubusercontent.com/lilydjwg/myhaskells/9a028c36a46e811e56d47a11ac4f261787fba0cf/lib/Math/Compute.hs | haskell | module Math.Compute (
primes,
isPrime,
factorial,
) where
isPrime :: Integral a => a -> Bool
primes :: Integral a => [a]
isPrime x = let prime_useful = takeWhile (\y -> y*y <= x) primes
in all (\y -> x `mod` y /= 0) prime_useful
primes = 2 : filter isPrime [3, 5..]
factorial :: Integer -> Integer
fa... | |
c14f8bde441777ff4e3b2396ab25d8c452a084edfd89315a9eab333ce4272b90 | Hans-Halverson/myte | normalizer.ml | open Basic_collections
open Mir
open Mir_builders
Simplify the MIR , applying the following changes :
- Replace all phis where all arguments are the same value ( including single argument phis ) with
that argument .
- Remove empty blocks
- Merge adjacent blocks when possible
- Remove the... | null | https://raw.githubusercontent.com/Hans-Halverson/myte/2fb6e1eac203c2440ce78d1ccabde25bdb36bba7/src/mir/transforms/normalizer.ml | ocaml | Merge adjacent blocks into a single large block when possible
Iterate to fixpoint
The next block could be the start block for the global or function, in which case it cannot
be merged with the previous block.
Replace phis where all args have same value (including single arg phis) with the arg itself... | open Basic_collections
open Mir
open Mir_builders
Simplify the MIR , applying the following changes :
- Replace all phis where all arguments are the same value ( including single argument phis ) with
that argument .
- Remove empty blocks
- Merge adjacent blocks when possible
- Remove the... |
3d0de7b198cede38054fd9cb0648d1d91e921ba7f8bfd8f68f55e431b591cc9e | mars0i/free | quant.cljc | (ns free.quant
(:require [clojure.core.matrix :as m]
[clojure.core.matrix.impl.ndarray_object]))
(defprotocol Quant
(m* [x] [x y])
(e* [x] [x y])
(e+ [x] [x y])
(e- [x] [x y])
(tran [x]))
;; Since there doesn't seem to be an overarching core.matrix class,
;; we have to specify this protocol fo... | null | https://raw.githubusercontent.com/mars0i/free/fe0fdc1c0bf1866cb07b4558a009a829f8d6ba23/doc/obsolete/quant.cljc | clojure | Since there doesn't seem to be an overarching core.matrix class,
we have to specify this protocol for each core.matrix implementation
separately, but each will use the same core.matrix methods, and
I'll let core.matrix figure out how to apply the implementation-specific
methods. extend-protocol and extend-type w... | (ns free.quant
(:require [clojure.core.matrix :as m]
[clojure.core.matrix.impl.ndarray_object]))
(defprotocol Quant
(m* [x] [x y])
(e* [x] [x y])
(e+ [x] [x y])
(e- [x] [x y])
(tran [x]))
(def matrix-method-map
{:m* (fn ([x] x) ([x y] (m/mmul x y)))
:e* (fn ([x] x) ([x y] (m/mul x y)))
... |
89e55ae9f4fdbf5dbf3bfc9e0d989c32aa2581263e9685a1b3859e0a98a1cc54 | slyrus/mcclim-old | views.lisp | ;;;
This example shows how to use CLIM view objects . We imagine a small
;;; database of members in some organization, and we sometimes want to
see a list of all the members , with one member per line , and sometimes
;;; a detailed view of a single member, perhaps in order to check the
;;; payment record, or t... | null | https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Examples/views.lisp | lisp |
database of members in some organization, and we sometimes want to
a detailed view of a single member, perhaps in order to check the
payment record, or to modify some information such as the address.
This library is free software; you can redistribute it and/or
either
This library is distributed in the hope... | This example shows how to use CLIM view objects . We imagine a small
see a list of all the members , with one member per line , and sometimes
Copyright ( c ) 2006 by
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library... |
ec2734a9288d73395cb32075c4c8a3c5b0ec2fd50b5048bc1148fd2bba5df716 | quil/quil-examples | automata.clj | (ns quil-sketches.automata
"This module visualizes elementary cellular automata. It's primarily intended
to show off the fun aspects of functional programming and lazy-sequences in
clojure to those who are coming from an OO background.
If you're interested in how elementary cellular automata work, see:
and... | null | https://raw.githubusercontent.com/quil/quil-examples/9ff9d5578d93682af29d9a080b917a19f8deafc8/src/quil_sketches/automata.clj | clojure | Colors for each cell
Elementary automata use a clever trick to allow us to describe an entire rule
with only a few numbers. Since the automata are essentially pattern matchers,
describing what a trio of living / dead cells evaluate to we can effeciently
this can be found here, at wolfram math world:
key here is... | (ns quil-sketches.automata
"This module visualizes elementary cellular automata. It's primarily intended
to show off the fun aspects of functional programming and lazy-sequences in
clojure to those who are coming from an OO background.
If you're interested in how elementary cellular automata work, see:
and... |
9e6012595b0fdc918830b28ea10d65c0e9ec9a153b83844a912982317b97fee7 | returntocorp/semgrep | qualified_alias.ml | type tok = Parse_info.t
(* with tarzan *)
| null | https://raw.githubusercontent.com/returntocorp/semgrep/8c379c2c73b4ece1b1316655b00e21a8af3f00bb/tests/misc/otarzan/qualified_alias.ml | ocaml | with tarzan | type tok = Parse_info.t
|
343db8bf09cf5a0dff928ff5fd2e2b4ad1f36021d8380da68cf0302668ffa78c | fission-codes/fission | Types.hs | module Web.UCAN.Signature.RS256.Types (Signature (..)) where
import Data.ByteArray
import qualified Data.ByteString.Base64.URL as B64.URL
import Data.Aeson
import RIO hiding (length)
import Test.QuickCheck
import Test.QuickCheck.Instances ()
n... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/hs-ucan/library/Web/UCAN/Signature/RS256/Types.hs | haskell | module Web.UCAN.Signature.RS256.Types (Signature (..)) where
import Data.ByteArray
import qualified Data.ByteString.Base64.URL as B64.URL
import Data.Aeson
import RIO hiding (length)
import Test.QuickCheck
import Test.QuickCheck.Instances ()
n... | |
beb293e8050c53a8c6a831f0c77c1274f864e05eccf3bfba383922aaaec8e4a6 | goblint/analyzer | goblint_sites.mli | val lib: Fpath.t list
val lib_stub_include: Fpath.t list
val lib_stub_src: Fpath.t list
val lib_runtime_include: Fpath.t list
val lib_runtime_src: Fpath.t list
val conf: Fpath.t list
| null | https://raw.githubusercontent.com/goblint/analyzer/b65f5840506fc2bdff5b908368bb287314f37aed/src/sites/goblint_sites.mli | ocaml | val lib: Fpath.t list
val lib_stub_include: Fpath.t list
val lib_stub_src: Fpath.t list
val lib_runtime_include: Fpath.t list
val lib_runtime_src: Fpath.t list
val conf: Fpath.t list
| |
6209044a308af5de889f35dbb660e67a65b1a4a531b24b254806027e187c1c9d | wavewave/hxournal | Canvas.hs | # LANGUAGE TemplateHaskell , TypeOperators , ExistentialQuantification ,
Rank2Types , GADTs #
Rank2Types, GADTs #-}
-----------------------------------------------------------------------------
-- |
-- Module : Application.HXournal.Type.Canvas
Copyright : ( c ) 2011 , 2012
--... | null | https://raw.githubusercontent.com/wavewave/hxournal/b8eb538a2d1a474cc74bc0b5f5c7f251dafe75b9/lib/Application/HXournal/Type/Canvas.hs | haskell | ---------------------------------------------------------------------------
|
Module : Application.HXournal.Type.Canvas
License : BSD3
Stability : experimental
---------------------------------------------------------------------------
* data types
* default constructor
* lenses
, currentPage
*... | # LANGUAGE TemplateHaskell , TypeOperators , ExistentialQuantification ,
Rank2Types , GADTs #
Rank2Types, GADTs #-}
Copyright : ( c ) 2011 , 2012
Maintainer : < >
Portability : GHC
module Application.HXournal.Type.Canvas
(
CanvasId
, PenDraw (..)
, emptyPenDraw
, Vi... |
d85b839c9907ccfb12c01e31e8c31a7dbead39e57ff7a501a727840ab685df35 | jacekschae/learn-datomic-course-files | handlers.clj | (ns cheffy.recipe.handlers
(:require [cheffy.recipe.db :as recipe-db]
[cheffy.responses :as responses]
[ring.util.response :as rr])
(:import (java.util UUID)))
(defn list-all-recipes
[{:keys [env claims] :as _request}]
(let [account-id (:sub claims)]
;; FIXME: recipe-db/find-all-rec... | null | https://raw.githubusercontent.com/jacekschae/learn-datomic-course-files/d27af218b89006497fd868d58b58b282e7c3e38c/increments/22-list-all-recipes/src/main/cheffy/recipe/handlers.clj | clojure | FIXME: recipe-db/find-all-recipes
FIXME: recipe-db/transact-recipe
FIXME: recipe-db/find-recipe-by-id
FIXME: recipe-db/transact-recipe
FIXME: recipe-db/retract-recipe
FIXME: recipe-db/transact-step
FIXME: recipe-db/transact-step
FIXME: recipe-db/retract-step
FIXME: recipe-db/transact-ingredient
FIXME: recipe-... | (ns cheffy.recipe.handlers
(:require [cheffy.recipe.db :as recipe-db]
[cheffy.responses :as responses]
[ring.util.response :as rr])
(:import (java.util UUID)))
(defn list-all-recipes
[{:keys [env claims] :as _request}]
(let [account-id (:sub claims)]
))
(defn create-recipe!
[{:ke... |
449d7c0a28bf856874433fec64a6f8ee8ac392a392438dee25ddef58f3ef9a56 | mpickering/apply-refact | Lambda18.hs | f = foo (\x -> \y -> x x y y) | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Lambda18.hs | haskell | f = foo (\x -> \y -> x x y y) | |
ac69a0a7e96db09d072470fb70c701abb47150873db2cbcdee3b671c9b4af8a6 | input-output-hk/hydra | ServerOutput.hs | # LANGUAGE UndecidableInstances #
module Hydra.API.ServerOutput where
import Data.Aeson (Value (..), withObject, (.:))
import qualified Data.Aeson.KeyMap as KeyMap
import Hydra.API.ClientInput (ClientInput (..))
import Hydra.Chain (ChainStateType, HeadId, IsChainState, PostChainTx, PostTxError)
import Hydra.Crypto (M... | null | https://raw.githubusercontent.com/input-output-hk/hydra/54d6e4507fa4a67bb52a1507249e836e23e592bf/hydra-node/src/Hydra/API/ServerOutput.hs | haskell | | Nominal deadline until which contest can be submitted and after
as the ledger of our cardano-node might not have progressed
sufficiently in time yet and we do not re-submit transactions (yet).
| Given transaction has been seen as valid in the Head. It is expected to
| Given transaction was not not applicable to ... | # LANGUAGE UndecidableInstances #
module Hydra.API.ServerOutput where
import Data.Aeson (Value (..), withObject, (.:))
import qualified Data.Aeson.KeyMap as KeyMap
import Hydra.API.ClientInput (ClientInput (..))
import Hydra.Chain (ChainStateType, HeadId, IsChainState, PostChainTx, PostTxError)
import Hydra.Crypto (M... |
45a75d90e610bd526a78d2ed27859a40521e212d62db0b298f0ea406850dcca1 | rdnetto/powerline-hs | VCS.hs | {-# LANGUAGE OverloadedStrings #-}
module Segments.VCS where
import Control.Monad (liftM2)
import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT)
import Data.Aeson as Aeson (Value(Bool, String))
import Data.Aeson.Types (emptyArray)
import qualified Data.Map as Map
import Data.Maybe (maybeToList)
import Aeson.Unpac... | null | https://raw.githubusercontent.com/rdnetto/powerline-hs/6569a88455e8d98d0327743df13b05947f35efb3/src/Segments/VCS.hs | haskell | # LANGUAGE OverloadedStrings #
TODO: use a library instead of reinventing the wheel
TODO: add support for other VCSs
Converts git status porcelain format to VcsFileStatus
detached branch |
module Segments.VCS where
import Control.Monad (liftM2)
import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT)
import Data.Aeson as Aeson (Value(Bool, String))
import Data.Aeson.Types (emptyArray)
import qualified Data.Map as Map
import Data.Maybe (maybeToList)
import Aeson.Unpack
import Segments.Base
import Util ... |
a99ff2b4cc67aadc01b33cc276b2d4e0abfc6d93ff46c2d0f21efcacfaa16094 | BillHallahan/G2 | FoldrTests.hs | module FoldrTests where
{-@ LIQUID "--no-termination" @-}
import Prelude hiding (foldr)
data List a = Emp
| (:+:) a (List a)
deriving (Eq, Ord, Show)
{-@ foldr :: (a -> b -> b) -> b -> List a -> b @-}
foldr :: (a -> b -> b) -> b -> List a -> b
foldr _ b Emp = b
foldr op b (x :+: x... | null | https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/Liquid/FoldrTests.hs | haskell | @ LIQUID "--no-termination" @
@ foldr :: (a -> b -> b) -> b -> List a -> b @
@ max2 :: List { x:Int | x > 0} -> { y:Int | y > 0 || y == -1} @
@ simpleFold :: List { x:Int | x > 0} -> { y:Int | y > 0} @
@ m :: {x:Int | x > 0} -> C { y:Int | y > 0 } @
@ f :: b -> b @
@ m2 :: {x:Int | x > 0} -> C { y:Int | y > 0 } @
@ ... | module FoldrTests where
import Prelude hiding (foldr)
data List a = Emp
| (:+:) a (List a)
deriving (Eq, Ord, Show)
foldr :: (a -> b -> b) -> b -> List a -> b
foldr _ b Emp = b
foldr op b (x :+: xs) = x `op` (foldr op b xs)
max2 :: List Int -> Int
max2 xs@(x :+: _) = foldr (\x y -... |
67dd4015754bb735d82dad6cdb670f183bd40827a76f75b03ea215e72fc1d5f1 | rescript-lang/rescript-compiler | js_obj.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/c3fcc430360079546a6aabd2b2770303480f8486/jscomp/others/js_obj.ml | ocaml | * `empty()` returns the empty object `{}`
* `keys(obj)` returns an `array` of the keys of `obj`'s own enumerable properties. | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
2f33ad0542214b5a8b0418b9ccd98fe511d6f4f06a7453e3d265b753923b9289 | informatimago/commands | programmer.lisp | -*- mode : lisp ; coding : utf-8 -*-
(defparameter *sentences*
'("It works on my machine."
"It’s not a bug, it’s a feature."
"How hard can it be?"
"How did that even work in the first place?"
"I don’t see anything in the logs."
"I’m guessing it’s an issue on their side."
"Probably some kind... | null | https://raw.githubusercontent.com/informatimago/commands/65d0d6385269f3e210aed4943aefdbb5372706b9/sources/commands/programmer.lisp | lisp | coding : utf-8 -*-
THE END ;;;; |
(defparameter *sentences*
'("It works on my machine."
"It’s not a bug, it’s a feature."
"How hard can it be?"
"How did that even work in the first place?"
"I don’t see anything in the logs."
"I’m guessing it’s an issue on their side."
"Probably some kind of permissions issue."
"That’s wei... |
57e7d2797c8b177c433475eca42ec8185f993d2b1bd8744420acf61df2a26533 | onedata/op-worker | storage_detector.erl | %%%-------------------------------------------------------------------
@author
( C ) 2016 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module contains helpers utili... | null | https://raw.githubusercontent.com/onedata/op-worker/b09f05b6928121cec4d6b41ce8037fe056e6b4b3/src/modules/storage/driver/storage_detector.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module contains helpers utility functions.
@end
-------------------------------------------------------------------
API
Onepanel RPC
exported for RPC
============... | @author
( C ) 2016 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(storage_detector).
-author("Krzysztof Trzepla").
-include("global_definitions.hrl").
-include("modules/fslogic/fslogic_common.hrl").
-include_lib("ctool/include/logging.hrl").
-include_lib(... |
403a39f1365ca3d7e8ae2db20244793ca9659843b76e37a3f56b922b8083c21b | jeromesimeon/Galax | shredded_load.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/shredded/shredded_load.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : shredded_load.ml , v 1.8 2007/02/01 22:08:54 simeon Exp $
open Error
open Streaming_types
open Streaming_util
module type Shredded_Load_Functor_Sig =
functor (Shredded_store : Shredded_load_sigs.Shredded_Load_Store) ->
sig
... |
0deb7592a6a0773232ca534599c3b28c371a590614f506c96975ffd22121ecbf | collaborativetrust/WikiTrust | bot_reader.ml |
Copyright ( c ) 2009 The Regents of the University of California
All rights reserved .
Authors : and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the above copyright notice ,... | null | https://raw.githubusercontent.com/collaborativetrust/WikiTrust/9dd056e65c37a22f67d600dd1e87753aa0ec9e2c/remote/analysis/bot_reader.ml | ocaml | Bot regex |
Copyright ( c ) 2009 The Regents of the University of California
All rights reserved .
Authors : and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the above copyright notice ,... |
a466b7cc012dec812183a1c3e733bd9e7061a43b7a7dfde0df91a14859773e25 | ocaml-multicore/ocaml-tsan | shadow_all.ml | (* TEST
* expect
flags = "-nopervasives" (* can't pass -nostdlib because of objects. *)
*)
(* Signatures *)
(* Tests that everything can be shadowed. *)
module type S = sig
type t
val unit : unit
external e : unit -> unit = "%identity"
module M : sig type t end
module type T
exception E
typ... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/testsuite/tests/shadow_include/shadow_all.ml | ocaml | TEST
* expect
flags = "-nopervasives" (* can't pass -nostdlib because of objects.
Signatures
Tests that everything can be shadowed.
Test that the call to nondep works properly.
Structures
Tests that everything can be shadowed.
Test that the call to nondep works properly | *)
module type S = sig
type t
val unit : unit
external e : unit -> unit = "%identity"
module M : sig type t end
module type T
exception E
type ext = ..
type ext += C
class c : object end
class type ct = object end
end
;;
[%%expect{|
module type S =
sig
type t
val unit : unit
... |
bb6b8e11417a065ed92561f2ac0d42cf359eec97a6c6735ef5b51cdb5efd181e | soulomoon/SICP | Exercise4.49.scm | Exercise 4.49 : is more interested in generating interesting sentences than in parsing them . She reasons that by simply changing the procedure parse - word so that it ignores the “ input sentence ” and instead always succeeds and generates an appropriate word , we can use the programs we had built for parsing to ... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/Exercise4.49.scm | scheme | Exercise 4.49 : is more interested in generating interesting sentences than in parsing them . She reasons that by simply changing the procedure parse - word so that it ignores the “ input sentence ” and instead always succeeds and generates an appropriate word , we can use the programs we had built for parsing to ... | |
2b896b2935c6af98d6cb9a8a8f66fd3a75cba64c3ddf0cbb94f1dd49b1b4d00e | archaelus/tsung | ELDAPv3.erl | %% Generated by the Erlang ASN.1 BER-compiler version:1.4.5
%% Purpose: encoder and decoder to the types in mod ELDAPv3
-module('ELDAPv3').
-include("ELDAPv3.hrl").
-define('RT_BER',asn1rt_ber_bin).
-asn1_info([{vsn,'1.4.5'},
{module,'ELDAPv3'},
{options,[ber,report_errors,{cwd,[47,104,111,109,... | null | https://raw.githubusercontent.com/archaelus/tsung/b4ea0419c6902d8bb63795200964d25b19e46532/src/lib/ELDAPv3.erl | erlang | Generated by the Erlang ASN.1 BER-compiler version:1.4.5
Purpose: encoder and decoder to the types in mod ELDAPv3
================================
================================
-------------------------------------------------
-------------------------------------------------
--------------------------------------... |
-module('ELDAPv3').
-include("ELDAPv3.hrl").
-define('RT_BER',asn1rt_ber_bin).
-asn1_info([{vsn,'1.4.5'},
{module,'ELDAPv3'},
{options,[ber,report_errors,{cwd,[47,104,111,109,101,47,112,97,98,108,111,47,108,111,99,111,115,47,106,117,110,103,101,114,108,47,108,105,98,47,101,108,100,97,112,47,115... |
551fd114aaa1e275db83921fa3a529a4ffa7af323c0bcaf656b92c9cb4afd33e | Octachron/olivine | vk__result.ml | let view ~ok ~error =
let read n =
if n < 0 then
Error(fst error n)
else
Ok(fst ok n) in
let write = function
| Ok x -> snd ok x
| Error x -> snd error x in
Ctypes.view ~read ~write Ctypes.int
let pp raw ppf = function
| Ok r -> Format.fprintf ppf "Ok %a" raw r
| Error e -> Format... | null | https://raw.githubusercontent.com/Octachron/olivine/e93df595ad1e8bad5a8af689bac7d150753ab9fb/lib_aux/vk__result.ml | ocaml | let view ~ok ~error =
let read n =
if n < 0 then
Error(fst error n)
else
Ok(fst ok n) in
let write = function
| Ok x -> snd ok x
| Error x -> snd error x in
Ctypes.view ~read ~write Ctypes.int
let pp raw ppf = function
| Ok r -> Format.fprintf ppf "Ok %a" raw r
| Error e -> Format... | |
58ce76b3c1b45c3c6058d46ec7ba5d04b18186547bc161c64485c33e5864459e | bufferswap/ViralityEngine | dvec2.lisp | (in-package #:cl-user)
(defpackage #:vorigin.dvec2
(:local-nicknames
(#:com #:vorigin.common)
(#:const #:vorigin.constants)
(#:u #:vutils)
(#:v2 #:vorigin.vec2))
(:use #:cl)
(:shadow
#:=
#:+
#:-
#:*
#:/
#:random
#:length
#:round
#:abs
#:<
#:<=
#:>
#:>=
#:min
... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/support/vorigin/src/types/dvec2.lisp | lisp | Constants | (in-package #:cl-user)
(defpackage #:vorigin.dvec2
(:local-nicknames
(#:com #:vorigin.common)
(#:const #:vorigin.constants)
(#:u #:vutils)
(#:v2 #:vorigin.vec2))
(:use #:cl)
(:shadow
#:=
#:+
#:-
#:*
#:/
#:random
#:length
#:round
#:abs
#:<
#:<=
#:>
#:>=
#:min
... |
462be6e29f85243acb21583cdca5d6cb53f482e750b580ae4a23ab030c7fb4f5 | cuplv/dai | array_bounds.ml | open Dai
open Import
open Apron
open Option.Monad_infix
open Syntax
module Addr_map = struct
type t = Addr.Abstract.t Map.M(String).t [@@deriving compare, equal, hash, sexp]
let join =
Map.merge ~f:(fun ~key:_ -> function
| `Both (a1, a2) -> Some (Addr.Abstract.union a1 a2) | `Left a | `Right a -> Some ... | null | https://raw.githubusercontent.com/cuplv/dai/b2f5d3d983d3ffc4c3839d66aec5e360e87883bb/src/analysis/domain/array_bounds.ml | ocaml | Keep a map of variable names to array abstract addresses, along with an APRON interval.
Map.find am rcvr >>= fun aaddr ->
transfer functions for non-procedure-call statements
lhs was constrained, quantify that out
* Some(true/false) indicates [idx] is definitely in/out-side of [addr]'s bounds;
None ind... | open Dai
open Import
open Apron
open Option.Monad_infix
open Syntax
module Addr_map = struct
type t = Addr.Abstract.t Map.M(String).t [@@deriving compare, equal, hash, sexp]
let join =
Map.merge ~f:(fun ~key:_ -> function
| `Both (a1, a2) -> Some (Addr.Abstract.union a1 a2) | `Left a | `Right a -> Some ... |
1bfcfb788a87e32382cdc325ff767b4675c0b51a2c73cd06db10af99707791d7 | camllight/camllight | interp.ml | #open "syntaxe";;
#open "eval";;
let code_nombre n =
Val_nombre n
and décode_nombre = function
| Val_nombre n -> n
| _ -> raise(Erreur "entier attendu")
and code_booléen b =
Val_booléenne b
and décode_booléen = function
| Val_booléenne b -> b
| _ -> raise(Erreur "booléen attendu");;
Pour transformer... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/examples/minicaml/interp.ml | ocaml | L'environnement initial | #open "syntaxe";;
#open "eval";;
let code_nombre n =
Val_nombre n
and décode_nombre = function
| Val_nombre n -> n
| _ -> raise(Erreur "entier attendu")
and code_booléen b =
Val_booléenne b
and décode_booléen = function
| Val_booléenne b -> b
| _ -> raise(Erreur "booléen attendu");;
Pour transformer... |
8458d552752c7ca7507f33af2559e9f3c88ea943ecf44395b935930145a871c0 | lisp/de.setf.amqp | device-level.lisp | ;;; -*- Package: de.setf.amqp.implementation; -*-
(in-package :de.setf.amqp.implementation)
(:documentation "This file defines version-specific connecttion and channel operators for AMPQ version 0.8
of the `de.setf.amqp` library."
(copyright
"Copyright 2010 [james anderson](mailto:) All Rights Reserved"
"'de.se... | null | https://raw.githubusercontent.com/lisp/de.setf.amqp/03181135ddf15cb3866fbf4285c8b6d3eeeb660e/amqp-1-1-0-8-0/device-level.lisp | lisp | -*- Package: de.setf.amqp.implementation; -*-
without even the
after slot-initialization, but before device-open, set frame classes
set iff unbound to permit reinitialization from change-class
the realm comprises the realm proper + the additions arguments:
exclusive passive active write read
happens in generat... |
(in-package :de.setf.amqp.implementation)
(:documentation "This file defines version-specific connecttion and channel operators for AMPQ version 0.8
of the `de.setf.amqp` library."
(copyright
"Copyright 2010 [james anderson](mailto:) All Rights Reserved"
"'de.setf.amqp' is free software: you can redistribute it... |
3f9dcfe81cdd4e5236cdda65dcc96d806304f09afdc469b768fedaa5d9198671 | coq/coq | common.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/c4587fa780c885fda25a38a2f16e84dc9011f9bd/tools/coqdep/lib/common.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
620a873a9a520c6e4c85f11fac4af98b64c831ee4373d6eda064945b10b40b3d | fishcakez/sbroker | sbroker.erl | %%-------------------------------------------------------------------
%%
Copyright ( c ) 2015 , < >
%%
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 License at
%%
%% -2.0
... | null | https://raw.githubusercontent.com/fishcakez/sbroker/10f7e3970d0a296fbf08b1d1a94c88979a7deb5e/src/sbroker.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the Lic... | Copyright ( c ) 2015 , < >
This file is provided to you under the Apache License ,
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
This module provides a process match making service . A process joins one of
two queues and is matched w... |
744e7c72ee834219c9b317aac543582b4f61c1ea4858e77863f1f592a4813e9f | 5HT/ant | CamlImages.ml |
module Images = Images;
module Ps = Ps;
module Index8 = Index8;
module Index16 = Index16;
module Color = Color;
module Rgb24 = Rgb24;
module Rgba32 = Rgba32;
module Cmyk32 = Cmyk32;
value get_index8_colourmap x i = do
{
let cm = x.Index8.colormap;
(cm.Color.map.(i).Color.r,
cm.Color.map.(i).Color.... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Images/CamlImages.ml | ocaml |
module Images = Images;
module Ps = Ps;
module Index8 = Index8;
module Index16 = Index16;
module Color = Color;
module Rgb24 = Rgb24;
module Rgba32 = Rgba32;
module Cmyk32 = Cmyk32;
value get_index8_colourmap x i = do
{
let cm = x.Index8.colormap;
(cm.Color.map.(i).Color.r,
cm.Color.map.(i).Color.... | |
1373e241e35697309df341f3ea18a19837919c9d5cc18ee68dec1704bb444bf5 | FranklinChen/learn-you-some-erlang | linkmon_tests.erl | -module(linkmon_tests).
-include_lib("eunit/include/eunit.hrl").
myproc_test_() ->
{timeout,
7,
?_assertEqual({'EXIT', reason},
catch linkmon:myproc())}.
chain_test_() ->
{timeout,
3,
?_assertEqual(ok, chain_proc())}.
chain_proc() ->
process_flag(trap... | null | https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/tests/linkmon_tests.erl | erlang | -module(linkmon_tests).
-include_lib("eunit/include/eunit.hrl").
myproc_test_() ->
{timeout,
7,
?_assertEqual({'EXIT', reason},
catch linkmon:myproc())}.
chain_test_() ->
{timeout,
3,
?_assertEqual(ok, chain_proc())}.
chain_proc() ->
process_flag(trap... | |
9d9f655430ca782527cc6da434473d388d3cbed61a94f156a315630db382ea73 | mitchellwrosen/riak2 | RiakMapBucketProps.hs | module RiakMapBucketProps
( MapBucketProps(..)
, fromProto
) where
import RiakIndexName (IndexName)
import RiakReadQuorum (ReadQuorum)
import RiakWriteQuorum (WriteQuorum)
import qualified RiakIndexName as IndexName
import qualified RiakReadQuorum as ReadQuorum
import qualified RiakWriteQuorum as WriteQuo... | null | https://raw.githubusercontent.com/mitchellwrosen/riak2/d3c4ef4389012c70e72623cdf9a4caec0a07e568/riak2/src/RiakMapBucketProps.hs | haskell | | Map bucket properties.
^ Search index
| Parse from bucket props. Does not check that datatype is "map". | module RiakMapBucketProps
( MapBucketProps(..)
, fromProto
) where
import RiakIndexName (IndexName)
import RiakReadQuorum (ReadQuorum)
import RiakWriteQuorum (WriteQuorum)
import qualified RiakIndexName as IndexName
import qualified RiakReadQuorum as ReadQuorum
import qualified RiakWriteQuorum as WriteQuo... |
681e56ea03881205f1eba173c9ab510792a6e2d9b0d86eb75187e8c413703640 | pink-gorilla/webly | ping.clj | (ns demo.handler.ping
(:require
[clojure.pprint]))
(defn ping-handler [req]
(clojure.pprint/pprint req)
{:status 200 :body "test"}) | null | https://raw.githubusercontent.com/pink-gorilla/webly/fcc124b1ad92849d783d7d71b064d0009223d6a6/demo-webly/src/demo/handler/ping.clj | clojure | (ns demo.handler.ping
(:require
[clojure.pprint]))
(defn ping-handler [req]
(clojure.pprint/pprint req)
{:status 200 :body "test"}) | |
a7696dfbf4cbc307157f07a0da0fa27c2228be36f31a75863c41c160b65e55a8 | scrintal/heroicons-reagent | globe_alt.cljs | (ns com.scrintal.heroicons.outline.globe-alt)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"
... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/globe_alt.cljs | clojure | (ns com.scrintal.heroicons.outline.globe-alt)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"
... | |
423af4daaf60e878c140fa3e131fa2b16c3f64552026891e77e00fa0dd1e6df7 | onyx-platform/learn-onyx | challenge_4_1_test.clj | (ns workshop.jobs.challenge-4-1-test
(:require [clojure.test :refer [deftest is]]
[onyx.test-helper :refer [with-test-env feedback-exception!]]
[workshop.challenge-4-1 :as c]
[workshop.workshop-utils :as u]
[onyx.api]))
;; In this challenge, we're going to log every se... | null | https://raw.githubusercontent.com/onyx-platform/learn-onyx/6bf1936f35d26e3c8cf171b5971e1bc95e82b3c8/test/workshop/jobs/challenge_4_1_test.clj | clojure | In this challenge, we're going to log every segment that
the lifecycle hook :after-batch. We can obtain a reference
to the segments through the event map. The event map contains
lots of useful values pertaining to the currently running task.
on each them. We use a Record to increase performance - but that's
mostl... | (ns workshop.jobs.challenge-4-1-test
(:require [clojure.test :refer [deftest is]]
[onyx.test-helper :refer [with-test-env feedback-exception!]]
[workshop.challenge-4-1 :as c]
[workshop.workshop-utils :as u]
[onyx.api]))
we see after it 's processed by the : times - t... |
a9592cab90217c7f7b391f0b694721d0ea9c3981b04012464063d816170e290c | kaoskorobase/mescaline | runtests.hs | -- | Some simple tests for the database backend.
import Control.Monad.IO.Class (liftIO)
import Control.Monad
import qualified Data.Map as Map
import qualified Data.Vector.Generic as V
import Database.Persist
import qualified Mescaline.Analysis as Analysis
import Mescaline.Databas... | null | https://raw.githubusercontent.com/kaoskorobase/mescaline/13554fc4826d0c977d0010c0b4fb74ba12ced6b9/lib/mescaline-database/runtests.hs | haskell | | Some simple tests for the database backend.
| TODO:
* Test 'Analysis' insertion: features retain their dimensionality and values.
| Test if the features returned by a query match the original feature set.
Create a list of descriptors with corresponding degrees
Create a dummy source file
Create a list of dumm... | import Control.Monad.IO.Class (liftIO)
import Control.Monad
import qualified Data.Map as Map
import qualified Data.Vector.Generic as V
import Database.Persist
import qualified Mescaline.Analysis as Analysis
import Mescaline.Database
import Mescaline.Database.Hash
import... |
a1241889c5c80cc1cf60e908d247681845834f23b6e3bfc44e4a0f73a7d85a05 | dongcarl/guix | image.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2017 , 2019 < >
Copyright © 2013 , 2015 , 2016 < >
Copyright © 2014 , 2015 , 2016 , 2020 < >
Copyright © 2014 , 2015 < >
Copyright © 2014 , 2016 , 2017 , 2018 , 2019 < >
Copyright © 2015 < >
Copyright © 2015 ... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/image.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2017 , 2019 < >
Copyright © 2013 , 2015 , 2016 < >
Copyright © 2014 , 2015 , 2016 , 2020 < >
Copyright © 2014 , 2015 < >
Copyright © 2014 , 2016 , 2017 , 2018 , 2019 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2014 , 2017 < >
Copyright © 201... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.