_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 |
|---|---|---|---|---|---|---|---|---|
8b081383c8e588471defa7328148a3dd79e9ebcd81b699d4ba769f0604d79aa7 | mtgred/netrunner | abilities_test.clj | (ns game.core.abilities-test
(:require [game.core :as core]
[game.core.eid :as eid]
[game.core.card :refer :all]
[game.cards.ice :as ice]
[game.core-test :refer :all]
[game.utils-test :refer :all]
[game.macros-test :refer :all]
[game.... | null | https://raw.githubusercontent.com/mtgred/netrunner/b2ae3a6abaff083fac3194f2bf579126732a4735/test/clj/game/core/abilities_test.clj | clojure | (ns game.core.abilities-test
(:require [game.core :as core]
[game.core.eid :as eid]
[game.core.card :refer :all]
[game.cards.ice :as ice]
[game.core-test :refer :all]
[game.utils-test :refer :all]
[game.macros-test :refer :all]
[game.... | |
0588a245b85c91a68d0c975066f4422ae0f7c1eb4dd61e72a9463fa1cfa3af01 | basvandijk/scientific | Compat.hs | # LANGUAGE CPP #
module GHC.Integer.Compat (divInteger) where
#if MIN_VERSION_base(4,15,0)
import GHC.Integer (divInteger)
#else
#ifdef MIN_VERSION_integer_simple
#if MIN_VERSION_integer_simple(0,1,1)
import GHC.Integer (divInteger)
#else
divInteger :: Integer -> Integer -> Integer
divInteger = div
#endif
#else
#... | null | https://raw.githubusercontent.com/basvandijk/scientific/224f38f17d23a8a8b87fd533579df4a3ad7ebb8c/src/GHC/Integer/Compat.hs | haskell | # LANGUAGE CPP #
module GHC.Integer.Compat (divInteger) where
#if MIN_VERSION_base(4,15,0)
import GHC.Integer (divInteger)
#else
#ifdef MIN_VERSION_integer_simple
#if MIN_VERSION_integer_simple(0,1,1)
import GHC.Integer (divInteger)
#else
divInteger :: Integer -> Integer -> Integer
divInteger = div
#endif
#else
#... | |
8de7d2a60ce2053f4ca36aad30a130f5ce6bc3158f04f9a40125b5ffec862e10 | REPROSEC/dolev-yao-star | Vale_X64_Print_Inline_s.ml | open Prims
let (print_rettype :
Prims.string FStar_Pervasives_Native.option -> Prims.string) =
fun ret_val ->
match ret_val with
| FStar_Pervasives_Native.None -> "void"
| FStar_Pervasives_Native.Some uu___ -> "uint64_t"
let (print_basetype : Vale_Arch_HeapTypes_s.base_typ -> Prims.string) =
fun t ->
... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_X64_Print_Inline_s.ml | ocaml | open Prims
let (print_rettype :
Prims.string FStar_Pervasives_Native.option -> Prims.string) =
fun ret_val ->
match ret_val with
| FStar_Pervasives_Native.None -> "void"
| FStar_Pervasives_Native.Some uu___ -> "uint64_t"
let (print_basetype : Vale_Arch_HeapTypes_s.base_typ -> Prims.string) =
fun t ->
... | |
20cb51818942dfd5e3702c051e2122e8f7a558649fe88f0863e37dc93974750c | input-output-hk/cardano-ledger | Address.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
| This module contains previous implementations for Addr and CoompactAddr
-- deserialization. This is used as an alternative implementatio... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/libs/cardano-ledger-core/testlib/Test/Cardano/Ledger/Core/Address.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
deserialization. This is used as an alternative implementation for testing and as a
perforance reference for benchmarking.
----------------------------------------------------------------------------------------
Old Address Deserializer -----------------------... | # LANGUAGE DeriveFunctor #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
| This module contains previous implementations for Addr and CoompactAddr
module Test.Cardano.Ledger.Core.Address (
deserialiseAddrOld,
deserialiseRewardAcntOld,
decompactAddrOld,
decompactAddrOl... |
c885cb9fa958fce04cac7d35ea32be6ab5bc92cf4f79e678fbb27b86a44324ee | brendanhay/amazonka | UserSettings.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived fr... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces-web/gen/Amazonka/WorkSpacesWeb/Types/UserSettings.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.WorkSpacesWeb.Types.UserSettings
Stability : auto-generated
| A user settings resource that can be associated with a web portal. Once
associated with a web portal, user settings control how users can
transfer data between a streamin... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Co... |
185f77acf3f5042676b589c31f36946cf67a7f1e8503bac16532830456acdca1 | facebook/duckling | Corpus.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Ordinal.HI.Corpus
( corpus ) where
import Data.String... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ordinal/HI/Corpus.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Ordinal.HI.Corpus
( corpus ) where
import Data.String
import Prelude
import Duckling.Locale
import Duckling.Ordinal.Types
import Duckling.Resolve
import Duckling.Testing.Types
corpus :: Corpus
corpus = (testContext {locale = makeLocale HI Nothin... |
868e02a9af84e212fff72798020d8784fc1a69c2bbdb32567d31e73ce5918b92 | nibbula/yew | libc.lisp | ;;;
;;; libc.lisp - Interface to C library functions
;;;
;;
Limited stdio & standard C library support
;;
;; I think this should only be used for compatibility / interoperability.
;; Use Lisp streams (of some sort) for normal code. For example, other
libraries sometimes operate on stdio FILE pointers , such as , c... | null | https://raw.githubusercontent.com/nibbula/yew/47dc2bcef458f0a0c1d7bab6322f5cb912dfe5c8/opsys/libc.lisp | lisp |
libc.lisp - Interface to C library functions
I think this should only be used for compatibility / interoperability.
Use Lisp streams (of some sort) for normal code. For example, other
bzip2, openssl, etc.
Also it should probably be in a separate optional package.
@@@ Do we need a better way to deal with O/S... |
Limited stdio & standard C library support
libraries sometimes operate on stdio FILE pointers , such as , curses ,
( (: and ) (: default " cygwin1 " )
# + ( and )
# + ( and unix ( not ) )
(defpackage libc
(:documentation "Interface to the C library.")
(:use :cl :cffi :dlib :opsys-base)
(... |
2915ed093882a833aa0f06e682f97610df799fee7372dc0211669f19d74dc8c2 | PLTools/GT | test028.ml | (* The same as test027 but tuple instead of record *)
open GT
@type ('a, 'b) t = (int * string * 'a * 'b) with show, gmap, foldr, foldl, eq, compare
class ['a, 'b, 'self] print fa fb _prereq = object
inherit [unit, 'a, unit, unit, 'b, unit, unit, 'self, unit] @t
method c_T _ (x, y, a, b) =
Printf.printf "%d\n... | null | https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test028.ml | ocaml | The same as test027 but tuple instead of record | open GT
@type ('a, 'b) t = (int * string * 'a * 'b) with show, gmap, foldr, foldl, eq, compare
class ['a, 'b, 'self] print fa fb _prereq = object
inherit [unit, 'a, unit, unit, 'b, unit, unit, 'self, unit] @t
method c_T _ (x, y, a, b) =
Printf.printf "%d\n" x;
Printf.printf "%s\n" y;
fa () a;
fb (... |
05b903a6083caa9b05416ffd20e6ac7ebf15a2ba2c4e0bb5461bdad5bbba3e4d | rd--/hsc3 | pv_BinShift.help.hs | -- pv_BinShift ; default values
ifft' (pv_BinShift (fftAllocId 'α' 2048 (soundIn 0) 0.5 0 1 0) 1 0 0) * 0.25
pv_BinShift ;
let z = soundIn 0
x = mouseX kr (-10) 100 Linear 0.1 -- shift
y = mouseY kr 1 4 Linear 0.1 -- stretch
b = mouseButton kr 0 1 0.2
pv = pv_BinShift (fftAllocId 'β' 2048 z 0.5 0 1... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/pv_BinShift.help.hs | haskell | pv_BinShift ; default values
shift
stretch | ifft' (pv_BinShift (fftAllocId 'α' 2048 (soundIn 0) 0.5 0 1 0) 1 0 0) * 0.25
pv_BinShift ;
let z = soundIn 0
b = mouseButton kr 0 1 0.2
pv = pv_BinShift (fftAllocId 'β' 2048 z 0.5 0 1 0) y x b
in ifft' pv * 0.25
|
e281b3a52235ab10b5077413a3b8e34b257687a2be73ad90b2729dbd724751eb | Decentralized-Pictures/T4L3NT | p2p.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/tezt/tests/p2p.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
041af2676b534c50f38ac3200572a7514fd1468bac67e560df0ba24c82034fc0 | cky/guile | spec.scm | ;;; Guile Lowlevel Intermediate Language
Copyright ( C ) 2001 , 2009 , 2010 , 2013 Free Software Foundation , Inc.
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
vers... | null | https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/language/glil/spec.scm | scheme | Guile Lowlevel Intermediate Language
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or ... |
Copyright ( C ) 2001 , 2009 , 2010 , 2013 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module (language gli... |
d8f0b7b8be62c8be325bf2d9769fff5469e4309ec480f639493c8ae55832e17c | lpil/gleeunit | gleeunit_progress.erl | A formatter adapted from
%% @doc A listener/reporter for eunit that prints '.' for each
%% success, 'F' for each failure, and 'E' for each error. It can also
%% optionally summarize the failures at the end.
-compile({nowarn_unused_function, [insert/2, to_list/1, to_list/2, size/1]}).
-module(gleeunit_progress).
... | null | https://raw.githubusercontent.com/lpil/gleeunit/5c3505ee1d09399421069d1be4c41088f3739dd1/src/gleeunit_progress.erl | erlang | @doc A listener/reporter for eunit that prints '.' for each
success, 'F' for each failure, and 'E' for each error. It can also
optionally summarize the failures at the end.
eunit_listener callbacks
-- binomial_heap.erl content start --
Inserts a new pair into the heap (or creates a new heap)
Deletes the top entr... | A formatter adapted from
-compile({nowarn_unused_function, [insert/2, to_list/1, to_list/2, size/1]}).
-module(gleeunit_progress).
-behaviour(eunit_listener).
-define(NOTEST, true).
-include_lib("eunit/include/eunit.hrl").
-define(RED, "\e[0;31m").
-define(GREEN, "\e[0;32m").
-define(YELLOW, "\e[0;33m").
-defin... |
c074ec5502c3f56633df3131a4aa556749bb0ecad3a9d342b4f62e426426e3a9 | nuprl/gradual-typing-performance | main.rkt | #lang racket
(require "cards.rkt")
(provide (all-from-out "cards.rkt"))
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/gofish/base/cards/main.rkt | racket | #lang racket
(require "cards.rkt")
(provide (all-from-out "cards.rkt"))
| |
2b6817296693814f2f3ee53b7e3c5d531406854714f0d2be6bbfb3310a9c64e0 | ocaml-multicore/parallel-programming-in-multicore-ocaml | chan_poll.ml | open Domainslib
let c = Chan.make_bounded 0
let _ =
let send = Domain.spawn(fun _ ->
let b = Chan.send_poll c "hello" in
Printf.printf "%B\n" b) in
Domain.join send;
| null | https://raw.githubusercontent.com/ocaml-multicore/parallel-programming-in-multicore-ocaml/2f95616234907bc0fb95f32bcc49c9b1f9c83d5a/code/chan/chan_poll.ml | ocaml | open Domainslib
let c = Chan.make_bounded 0
let _ =
let send = Domain.spawn(fun _ ->
let b = Chan.send_poll c "hello" in
Printf.printf "%B\n" b) in
Domain.join send;
| |
46ff7fb196e68a27fa2d6d9672c5123e23efd168e767cd60a62ffa8ebbff35ef | ruliana/racket-examples | reader-macro-glue.rkt | #lang s-exp syntax/module-reader
racket
#:read regexp-read
#:read-syntax regexp-read-syntax
(require (prefix-in regexp- "reader-macro.rkt"))
| null | https://raw.githubusercontent.com/ruliana/racket-examples/688293c86132f3b5c924360d53238ca352d4cf5b/reader-macro/reader-macro-glue.rkt | racket | #lang s-exp syntax/module-reader
racket
#:read regexp-read
#:read-syntax regexp-read-syntax
(require (prefix-in regexp- "reader-macro.rkt"))
| |
00b908ee116574c66d084b835e96cd9d52fab3763b0e2f9eaea13714580082c4 | ekmett/order-statistics | Order.hs | # LANGUAGE TypeFamilies , PatternGuards #
-----------------------------------------------------------------------------
-- |
-- Module : Statistics.Order
Copyright : ( C ) 2012 ,
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : provisional
Portability : ... | null | https://raw.githubusercontent.com/ekmett/order-statistics/7f8aa4a4d16bcb62bb88ee3a98ee6e94a5f77ffb/Statistics/Order.hs | haskell | ---------------------------------------------------------------------------
|
Module : Statistics.Order
License : BSD-style (see the file LICENSE)
Stability : provisional
--------------------------------------------------------------------------
* L-Estimator
** Applying an L-estimator
** Analyzi... | # LANGUAGE TypeFamilies , PatternGuards #
Copyright : ( C ) 2012 ,
Maintainer : < >
Portability : Haskell 2011 + TypeFamilies
module Statistics.Order
(
L(..)
, (@@), (@!)
, (@#)
, breakdown
Tukey 's trimean
second L - moment
, trimmed
, winsorized, winsorised
, jackknifed
... |
22b9c46cab51a1011a14be9eb8f4346a0b91c3b0b3f110fe6aad8721f6f3280b | alanz/ghc-exactprint | ClosedFam3a.hs | module ClosedFam3a where
import {-# SOURCE #-} ClosedFam3
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/ClosedFam3a.hs | haskell | # SOURCE # | module ClosedFam3a where
|
d9e0550d4b6b73dd97430d963807b2f856059fb0fd19cc018762918c9bc7e239 | spawnfest/eep49ers | reltool_app_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2010 - 2018 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/reltool/test/reltool_app_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2010 - 2018 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Purpose : Verify the application specifics of the Reltool application
-module(reltool_app_SUITE).
-compile([expor... |
72ce231570845b385ef91c46af882d7294556d96f782750fcf840307bc019c1a | tolysz/ghcjs-stack | UnitTests.hs | module Main
( main
) where
import Test.Tasty
import qualified UnitTests.Distribution.Compat.CreatePipe
import qualified UnitTests.Distribution.Compat.ReadP
import qualified UnitTests.Distribution.Simple.Program.Internal
import qualified UnitTests.Distribution.Simple.Utils
import qualified UnitTests.Distributi... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/Cabal/tests/UnitTests.hs | haskell | module Main
( main
) where
import Test.Tasty
import qualified UnitTests.Distribution.Compat.CreatePipe
import qualified UnitTests.Distribution.Compat.ReadP
import qualified UnitTests.Distribution.Simple.Program.Internal
import qualified UnitTests.Distribution.Simple.Utils
import qualified UnitTests.Distributi... | |
c36cba2d73aef928be23054731e414e9445274afadb3062ce00c65a32e80a181 | cj1128/sicp-review | 3.6.scm | Exercise 3.6
;; Design a new rand procedure that can reset its interal state
(define (rand arg)
(let ((x random-init-value))
(lambda ()
(cond
((eq? arg 'generate)
(set! x (rand-update x))
x)
((eq? arg 'reset)
(lambda (new-value)
(set! x new-value)))
... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-3/3.1/3.6.scm | scheme | Design a new rand procedure that can reset its interal state | Exercise 3.6
(define (rand arg)
(let ((x random-init-value))
(lambda ()
(cond
((eq? arg 'generate)
(set! x (rand-update x))
x)
((eq? arg 'reset)
(lambda (new-value)
(set! x new-value)))
(else (error "rand can't perform such operation! " arg)))... |
6544f2714f861886e5876ca81400fdfac67daa5507e9494f94981824350ff483 | hoplon/demos | rpc.cljs | (ns app.rpc
(:require-macros
[javelin.core :refer [defc defc=]])
(:require
[javelin.core]
[castra.core :refer [mkremote]]))
(defc state {})
(defc error nil)
(defc loading [])
(defc= random-data state)
(def get-state
(mkremote 'app.api/get-state state error loading))
(defn init []
(get-state)
(... | null | https://raw.githubusercontent.com/hoplon/demos/50d613892db0624a4f0326c1427d82f5b8e2390f/castra-datomic-free/src/app/rpc.cljs | clojure | (ns app.rpc
(:require-macros
[javelin.core :refer [defc defc=]])
(:require
[javelin.core]
[castra.core :refer [mkremote]]))
(defc state {})
(defc error nil)
(defc loading [])
(defc= random-data state)
(def get-state
(mkremote 'app.api/get-state state error loading))
(defn init []
(get-state)
(... | |
5008ad9593e1e58884f315156da9020ef6fcbeb1b5e3441af2060a68f89249a4 | mfikes/fifth-postulate | ns396.cljs | (ns fifth-postulate.ns396)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns396.cljs | clojure | (ns fifth-postulate.ns396)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
8143bea8ce97b30aa6aaa67262239ddbb0272bf1a5eb72b706a26ade6504df55 | haskell-gi/haskell-gi | BuildFn.hs | # LANGUAGE CPP #
|
A module aimed at making working with GtkBuilder easier .
It 's meant to be used like this ( requires OverloadedStrings ):
> buildUI : : BuildFn ( )
> buildUI = do
>
> buildAboutDialog
>
> widgetShowAll >
> buildMainWin : : BuildFn ApplicationWindow
> buildMa... | null | https://raw.githubusercontent.com/haskell-gi/haskell-gi/bff8f3b92bf2594ea3d6745c346a8de594fc3709/gi-gtk-hs/src/Data/GI/Gtk/BuildFn.hs | haskell | # LANGUAGE CPP #
|
A module aimed at making working with GtkBuilder easier .
It 's meant to be used like this ( requires OverloadedStrings ):
> buildUI : : BuildFn ( )
> buildUI = do
>
> buildAboutDialog
>
> widgetShowAll >
> buildMainWin : : BuildFn ApplicationWindow
> buildMa... | |
ecc5e2867ead26ffe56c75b1f29e1db94e92d9809a891f7c8f619590e195842d | mentat-collective/emmy | infinite_test.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.numerical.quadrature.infinite-test
(:require [clojure.test :refer [is deftest testing]]
[emmy.numerical.quadrature.adaptive :as qa]
[emmy.numerical.quadrature.bulirsch-stoer :as bs]
[emmy.numerical.quadrature.infinite :as qi]
... | null | https://raw.githubusercontent.com/mentat-collective/emmy/90a1de10e78187c70d546c3cfd63c8d32b783bed/test/emmy/numerical/quadrature/infinite_test.cljc | clojure | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.numerical.quadrature.infinite-test
(:require [clojure.test :refer [is deftest testing]]
[emmy.numerical.quadrature.adaptive :as qa]
[emmy.numerical.quadrature.bulirsch-stoer :as bs]
[emmy.numerical.quadrature.infinite :as qi]
... | |
4a23863517cf8dbf7c61c6aa31d38fb4def3628e048fb4bcd4d1034c048d06ae | tsloughter/kuberl | kuberl_v1_deployment_strategy.erl | -module(kuberl_v1_deployment_strategy).
-export([encode/1]).
-export_type([kuberl_v1_deployment_strategy/0]).
-type kuberl_v1_deployment_strategy() ::
#{ 'rollingUpdate' => kuberl_v1_rolling_update_deployment:kuberl_v1_rolling_update_deployment(),
'type' => binary()
}.
encode(#{ 'rollingUpdate' := R... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_deployment_strategy.erl | erlang | -module(kuberl_v1_deployment_strategy).
-export([encode/1]).
-export_type([kuberl_v1_deployment_strategy/0]).
-type kuberl_v1_deployment_strategy() ::
#{ 'rollingUpdate' => kuberl_v1_rolling_update_deployment:kuberl_v1_rolling_update_deployment(),
'type' => binary()
}.
encode(#{ 'rollingUpdate' := R... | |
be3300c7b4dda55fdae399bde66ffd9312947ceb81a4e896b5fe48bc719599d7 | jserot/lascar | dot.ml | (**********************************************************************)
(* *)
LASCAr
(* *)
Copyright ( c ) 2017 - prese... | null | https://raw.githubusercontent.com/jserot/lascar/79bd11cd0d47545bccfc3a3571f37af065915c83/src/utils/dot.ml | ocaml | ********************************************************************
This source code is licensed under the lic... | LASCAr
Copyright ( c ) 2017 - present , . All rights reserved .
type graph_style = ..
type graph_style +=
type node_style = { node_shape: string; node_style: string }
|
268af4da3fb2f7a013ad4b19cf1feec5f201b7a46155c33a38adb5ceda6d1417 | craigfe/progress | duration.ml | — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Copyright ( c ) 2020–2021 < >
Distributed under the MIT license . See terms at the end of this file .
— — — — — — — — — — — — — — — — — — — — — — — — —... | null | https://raw.githubusercontent.com/craigfe/progress/d7129b772d05c5589b8807630031155a6aeb27f0/src/progress/engine/duration.ml | ocaml | — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Copyright ( c ) 2020–2021 < >
Distributed under the MIT license . See terms at the end of this file .
— — — — — — — — — — — — — — — — — — — — — — — — —... | |
73207c791c60bbd085ffccb914e38ef299479c656f04f8fdc6ff6c55a1ca1e85 | ocamllabs/ocaml-modular-implicits | addlabels.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, Kyoto U... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/tools/addlabels.ml | ocaml | *********************************************************************
OCaml
... | , Kyoto University RIMS
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
version 1.0 .
open StdLabels
open Asttypes
open Parsetree
... |
f61482c0b36b054ef86261b62067c69b2668c2f761282ef5da5a9043b78997d4 | udem-dlteam/ribbit | repl-min.scm | (repl)
;; Exported symbols.
(export
*
+
-
<
=
cadddr
caddr
cadr
call/cc
car
cddr
cdr
cons
define
display
eof-object?
equal?
eqv?
eval
if
lambda
length
list->string
list->vector
list-ref
make-string
make-vector
newline
not
null?
pair?
peek-char
procedure?
quote
quotient
read
read-char
repl
set!
set-car!
set-cdr!
stri... | null | https://raw.githubusercontent.com/udem-dlteam/ribbit/ad8c2f504a01ada99c3d3480149b65a627bd9f69/src/repl-min.scm | scheme | Exported symbols. | (repl)
(export
*
+
-
<
=
cadddr
caddr
cadr
call/cc
car
cddr
cdr
cons
define
display
eof-object?
equal?
eqv?
eval
if
lambda
length
list->string
list->vector
list-ref
make-string
make-vector
newline
not
null?
pair?
peek-char
procedure?
quote
quotient
read
read-char
repl
set!
set-car!
set-cdr!
string->list
string->symb... |
1ee85918d362ec9e16dd891e81e8d8d8b6ca313f6b6bec3d87498123bcb6fcba | isovector/thinking-with-types | DeriveAnyClass.hs | -- # pragmas
# LANGUAGE DefaultSignatures #
{-# LANGUAGE DeriveAnyClass #-}
module DeriveAnyClass where
-- # imports
import GHC.Generics
data Maybe a
= Nothing
| Just a
data = False
| True
-- # RepBool
Rep Bool
= ...
( ... U1
: + : ... U1
)
data Maybe a
= N... | null | https://raw.githubusercontent.com/isovector/thinking-with-types/edec92fcc8b28f602f615fea0b160ede9168a41d/code/DeriveAnyClass.hs | haskell | # pragmas
# LANGUAGE DeriveAnyClass #
# imports
# RepBool
# RepBool
# Foo1
! 1
! 2
! 3
! 1
! 2
! 3 | # LANGUAGE DefaultSignatures #
module DeriveAnyClass where
import GHC.Generics
data Maybe a
= Nothing
| Just a
data = False
| True
Rep Bool
= ...
( ... U1
: + : ... U1
)
data Maybe a
= Nothing
| Just a
data Bool
= False
| True
Rep Bool
= ...
( ..... |
7f7d2da216d86cb0ea0786cebf0a8f3ad869d0087df747aefdb2037f3ac87443 | sondresl/AdventOfCode | Day14.hs | {-# LANGUAGE BangPatterns #-}
module Day14 where
import qualified Data.Digits as D
import qualified Data.Sequence as S
import Data.List.Utils
input :: Int
input = 409551
generate :: [Int]
generate = 3 : 7 : go 0 1 (S.fromList [3,7])
where
go !a !b !s = new ++ go a' b' s'
where x = S.index s a
... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/51525441795417f31b3eb67a690aa5534d1e699b/2018/Haskell/src/Day14.hs | haskell | # LANGUAGE BangPatterns #
Data.Digits.digits fails for 0 -> [] rather than [0] | module Day14 where
import qualified Data.Digits as D
import qualified Data.Sequence as S
import Data.List.Utils
input :: Int
input = 409551
generate :: [Int]
generate = 3 : 7 : go 0 1 (S.fromList [3,7])
where
go !a !b !s = new ++ go a' b' s'
where x = S.index s a
y = S.index s b
n... |
9861572921b0f780b79aab4b757c11a92354fc2786064d81d78b55645484f0d8 | Octachron/tensority | tensor.mli | * Compared to multidimensional arrays , tensors carry supplementary
information to facilitate common linear algebra information .
More precisely , the dimensions of a tensor are divided between covariant
and contravariant dimensions . A vector is for instance a ( 1,0 ) tensor ,
and a matrix is ... | null | https://raw.githubusercontent.com/Octachron/tensority/2689fba0bb9c693ef51bebe9cf92c37ab30ca17e/lib/tensor.mli | ocaml | * [<contr: dims ; cov:dims' > t] encodes a tensor
with contravariant dimensions [dims] and covariant dimension [dims']
* Pretty-printer for tensor
* Conversion to string
* total size of the covariant dimensions
* total size of the contravariant dimensions
* total size of the tensor
* Covariant shape
* Dimension... | * Compared to multidimensional arrays , tensors carry supplementary
information to facilitate common linear algebra information .
More precisely , the dimensions of a tensor are divided between covariant
and contravariant dimensions . A vector is for instance a ( 1,0 ) tensor ,
and a matrix is ... |
b55ea4fe0f10761e04e7ac0a3da2253c908ffeb824a831a7acf066238dddbdee | luminus-framework/examples | config.clj | (ns multi-client-ws-aleph.config
(:require
[cprop.core :refer [load-config]]
[cprop.source :as source]
[mount.core :refer [args defstate]]))
(defstate env
:start
(load-config
:merge
[(args)
(source/from-system-props)
(source/from-env)]))
| null | https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/multi-client-ws-aleph/src/clj/multi_client_ws_aleph/config.clj | clojure | (ns multi-client-ws-aleph.config
(:require
[cprop.core :refer [load-config]]
[cprop.source :as source]
[mount.core :refer [args defstate]]))
(defstate env
:start
(load-config
:merge
[(args)
(source/from-system-props)
(source/from-env)]))
| |
a4d36d9843083f70b9b40782dbf6007ac047c6720f82bb090a2468b9de1f64ef | robert-strandh/Gsharp | commands.lisp | (in-package :gsharp)
;;; like print-buffer-filename in gui.lisp
(defun export-buffer-filename ()
(let* ((buffer (current-buffer))
(filepath (filepath buffer))
(name (name buffer))
(defaults (or filepath (merge-pathnames (make-pathname :name name)
... | null | https://raw.githubusercontent.com/robert-strandh/Gsharp/20b4a30ebf1e211bf421563278d425b3b06607e9/Mxml/commands.lisp | lisp | like print-buffer-filename in gui.lisp
like directory-of-current-buffer in esa-io.lisp | (in-package :gsharp)
(defun export-buffer-filename ()
(let* ((buffer (current-buffer))
(filepath (filepath buffer))
(name (name buffer))
(defaults (or filepath (merge-pathnames (make-pathname :name name)
(user-homedir-pathname)))))
(merg... |
eae1a3fdfc896d15222fe9570030235d77afde494437c3f088a6c5ae92907c76 | artyom-poptsov/guile-ics | command-convert.scm | ;;; command-convert.scm -- CLI for the format converter.
Copyright ( C ) 2022 < >
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; (at your opt... | null | https://raw.githubusercontent.com/artyom-poptsov/guile-ics/f784e55966957c8ba149e6a4687a40ccf6eb8424/modules/ics/cli/command-convert.scm | scheme | command-convert.scm -- CLI for the format converter.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
The program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS F... |
Copyright ( C ) 2022 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(define-module (ics cli command-convert)
#:use-module (ice-9 getopt-l... |
08d64bb8ccc3f92b756a8a24d3750074ee58e2748a87b0e54351a63eba3c4c52 | mariari/vomitchan | Database.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Bot.Database(addUser
,addVomit
,addChannel
,updateLink
,updateUserQuantityOfVomits
,succUserQuantityOfVomits
,getLink
... | null | https://raw.githubusercontent.com/mariari/vomitchan/3f1be5eec49fe893d23a08b976cc25cde8aae9f3/src/Bot/Database.hs | haskell | # LANGUAGE OverloadedStrings #
TODO Derive somehow
Helpers
Db functions | # LANGUAGE ScopedTypeVariables #
module Bot.Database(addUser
,addVomit
,addChannel
,updateLink
,updateUserQuantityOfVomits
,succUserQuantityOfVomits
,getLink
,getRandomVomitPath
... |
65b73785e7909bcbb1f61f8c67e8c122b1ba296139addf558ee24b7cfb354a53 | athensresearch/athens | athena.cljs | (ns athens.views.athena
(:require
["/components/Icons/Icons" :refer [PageAddIcon XmarkIcon ArrowRightIcon]]
["@chakra-ui/react" :refer [Modal ModalContent ModalOverlay VStack Button IconButton Input HStack Heading Text]]
[athens.common.utils :as utils]
[athens.db :as db :refer [search-in-blo... | null | https://raw.githubusercontent.com/athensresearch/athens/2eae47a0eee37f3451eed1829963fde1ab23b43c/src/cljs/athens/views/athena.cljs | clojure | if page doesn't exist, create and open
if shift: open in right-sidebar
else open in main view
Search input box
Get the result list container which is the last element child
of the whole athena component
Get next element in the result list
Check if next el is beyond the bounds of the result list and scroll if so... | (ns athens.views.athena
(:require
["/components/Icons/Icons" :refer [PageAddIcon XmarkIcon ArrowRightIcon]]
["@chakra-ui/react" :refer [Modal ModalContent ModalOverlay VStack Button IconButton Input HStack Heading Text]]
[athens.common.utils :as utils]
[athens.db :as db :refer [search-in-blo... |
28a1f19707a9f348f399937d0049497b513f4da5b3b38cac38c953865added73 | sarabander/p2pu-sicp | 2.09.scm |
(define (add-interval x y)
(make-interval (+ (lower-bound x) (lower-bound y))
(+ (upper-bound x) (upper-bound y))))
(define (sub-interval x y)
(let ((p1 (- (lower-bound x) (lower-bound y)))
(p2 (- (lower-bound x) (upper-bound y)))
(p3 (- (upper-bound x) (lower-bound y)))
(p4 (- (upper-bound x) (upper-bound ... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/2.1/2.09.scm | scheme | Width in addition and subtraction depends only on argument interval widths
Width in multiplication and division depends also on interval boundaries |
(define (add-interval x y)
(make-interval (+ (lower-bound x) (lower-bound y))
(+ (upper-bound x) (upper-bound y))))
(define (sub-interval x y)
(let ((p1 (- (lower-bound x) (lower-bound y)))
(p2 (- (lower-bound x) (upper-bound y)))
(p3 (- (upper-bound x) (lower-bound y)))
(p4 (- (upper-bound x) (upper-bound ... |
57b2100bad2e944596e5bad8d84edb2e5646b0938e6bab7bcdaf6dcd86edd95e | CryptoKami/cryptokami-core | MockFactory.hs |
-- | Factory to create mock objects
-- | It might be merged with other factories or test utilities of others modules
-- | such as `Test.Pos.Client.Txp.UtilSpec`.
module Test.Pos.Explorer.MockFactory
( mkTxOut
, testLoggerName
) where
import Universum
import System.Wlog (Logg... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/explorer/test/Test/Pos/Explorer/MockFactory.hs | haskell | | Factory to create mock objects
| It might be merged with other factories or test utilities of others modules
| such as `Test.Pos.Client.Txp.UtilSpec`.
| Factory to create `TxOut`
| Logger name for testing |
module Test.Pos.Explorer.MockFactory
( mkTxOut
, testLoggerName
) where
import Universum
import System.Wlog (LoggerName)
import Pos.Core (Address, unsafeIntegerToCoin)
import Pos.Core.Txp (TxOut (..))
| It is mostly taken from ` makeTxOutAux ` in ` Te... |
a4efdf7ba6c4ce92f667fb859dbc5788312ebd5e99361a160f898031fbe11c90 | KavehYousefi/Esoteric-programming-languages | main.lisp | Author :
Date : 2022 - 03 - 05
;;
;; Sources:
;; -> ""
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; -- Declaration of types. -- ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(deftype list-of (&optional (e... | null | https://raw.githubusercontent.com/KavehYousefi/Esoteric-programming-languages/b3977015569feb393e63fa3f69db70ab88aa9439/Esomachine/Esomachine_001/main.lisp | lisp |
Sources:
-> ""
-- Declaration of types. -- ;;
-------------------------------------------------------
-------------------------------------------------------
-- Implementation of class "Token". -- ;;
--------------------------------------... | Author :
Date : 2022 - 03 - 05
(deftype list-of (&optional (element-type T))
"The ``list-of'' type defines a list of zero or more elements, each of
which conforms to the ELEMENT-TYPE."
(let ((predicate (gensym)))
(declare (type symbol predicate))
(setf (symbol-function predicate)
#'(la... |
e9631cd8a7084e05c9462923941558c8c8c98a276c035b3d0575f518c64a2175 | tsoding/voronoi-diagram | voroKdTree.mli | module type ElementType =
sig
type elt
val k: int
val make : int list -> elt
val axis_get: int -> elt -> int
val as_string: elt -> string
end
module type Kd =
sig
type 'a kdnode =
| KdNode of 'a * 'a kdnode * 'a kdnode
| KdNil
type elt
type elt_distance_function = elt ... | null | https://raw.githubusercontent.com/tsoding/voronoi-diagram/677b0f3f8f7ac4487eaa3941dc974e9a4733fff5/src/voroKdTree.mli | ocaml | module type ElementType =
sig
type elt
val k: int
val make : int list -> elt
val axis_get: int -> elt -> int
val as_string: elt -> string
end
module type Kd =
sig
type 'a kdnode =
| KdNode of 'a * 'a kdnode * 'a kdnode
| KdNil
type elt
type elt_distance_function = elt ... | |
71edc81186f8bc0eff9f97367f99540782f2953b18a930c05917e1efc1bd5a3a | lexi-lambda/eff | Effect.hs | | @eff@ is a fast , flexible , easy to use effect system for Haskell . @eff@
makes it easy to write composable , modular effects and effect handlers without
sacrificing performance . Broadly speaking , @eff@ provides the following
features :
* The ' Eff ' monad , which provides an extremely flexible set of c... | null | https://raw.githubusercontent.com/lexi-lambda/eff/8c4df4bf54faf22456354be18095b14825be5e85/eff/src/Control/Effect.hs | haskell | * The @Eff@ monad
* Defining new effects
* Handling effects
** Simple effect handlers
** Advanced effect handlers
* Performing I/O
* Re-exports
** Built-in effects | | @eff@ is a fast , flexible , easy to use effect system for Haskell . @eff@
makes it easy to write composable , modular effects and effect handlers without
sacrificing performance . Broadly speaking , @eff@ provides the following
features :
* The ' Eff ' monad , which provides an extremely flexible set of c... |
f84e9f30ab40276a3b70d49bc42049a173c18230686f31f8772e4f3a9d9c78ca | threatgrid/ctim | id.cljc | (ns ctim.domain.id
(:refer-clojure :exclude [random-uuid])
(:require #?(:clj [clojure.spec.alpha :as cs]
:cljs [cljs.spec.alpha :as cs])
[clj-momo.lib.url :as url]
[schema.core :as s])
#?(:clj (:import [java.util UUID])))
(defn- random-uuid
"This exists for easy mocking"... | null | https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/src/ctim/domain/id.cljc | clojure | TODO - More specific checking? | (ns ctim.domain.id
(:refer-clojure :exclude [random-uuid])
(:require #?(:clj [clojure.spec.alpha :as cs]
:cljs [cljs.spec.alpha :as cs])
[clj-momo.lib.url :as url]
[schema.core :as s])
#?(:clj (:import [java.util UUID])))
(defn- random-uuid
"This exists for easy mocking"... |
33d6f70e1a3dc309eafa05fb78ab151ab25a624a1a7c66a5ffac9af9ae4cfc05 | robert-strandh/CLIMatis | graphics-test.lisp | (in-package #:clim3-graphics-test)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Create a backend for testing.
(defclass test-port (clim3:port)
((%root :initform nil :accessor root)))
(defmethod clim3:connect (zone (port test-port))
(setf (root port) zone)
(setf (clim3-ext:pare... | null | https://raw.githubusercontent.com/robert-strandh/CLIMatis/4949ddcc46d3f81596f956d12f64035e04589b29/Graphics/graphics-test.lisp | lisp |
Create a backend for testing.
This port imposes a size slightly bigger than the natural one. | (in-package #:clim3-graphics-test)
(defclass test-port (clim3:port)
((%root :initform nil :accessor root)))
(defmethod clim3:connect (zone (port test-port))
(setf (root port) zone)
(setf (clim3-ext:parent zone) port))
(defun update (port)
(clim3-ext:ensure-hsprawl-valid (root port))
(clim3-ext:ensure-vspr... |
faf8372f517ddf80d30e3ea114dc11d063f698b6d5be0ad689ed4c7a178b9659 | ghcjs/jsaddle-dom | WebGLRenderingContextBase.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.WebGLRenderingContextBase
(activeTexture, attachShader, bindAttribLocation, bindBuffer,
bindFramebuffer, bi... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/WebGLRenderingContextBase.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/WebGLRenderingContextBase.blendFunc Mozilla WebGLRenderingContextBase.blendFunc documentation>
| <-US/docs/Web/API/WebGLRenderingContextBase.clear Mozilla WebGLRenderingContextBase.clear documentation>
... | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.WebGLRenderingContextBase
(activeTexture, attachShader, bindAttribLocation, bindBuffer,
bindFramebuffer, bindRenderbuffer, bindTexture, blendColor,
blendEquation, blendEquationSeparate, blendFunc, b... |
a128b3ccab129bca730d1b7836059b1f52cd4310b5ad524cf286745e6ab13a17 | karimarttila/clojure | main.clj | (ns vega.backend.main
(:require
[clojure.tools.logging :as log]
[ring.adapter.jetty :as jetty]
[clojure.java.io :as io]
[clojure.tools.reader.edn :as edn]
[integrant.core :as ig]
[integrant.repl :as ig-repl]
[aero.core :as aero]
[potpuri.core :as p]
[vega.backend.routes :as v-route... | null | https://raw.githubusercontent.com/karimarttila/clojure/2979b2f3b616b83360c963dd0a80b24996a5017a/vega-lite/vega-lite-experiment/src/clj/vega/backend/main.clj | clojure | Do not log password.
(require '[hashp.core]) | (ns vega.backend.main
(:require
[clojure.tools.logging :as log]
[ring.adapter.jetty :as jetty]
[clojure.java.io :as io]
[clojure.tools.reader.edn :as edn]
[integrant.core :as ig]
[integrant.repl :as ig-repl]
[aero.core :as aero]
[potpuri.core :as p]
[vega.backend.routes :as v-route... |
73fa7242bdcd09245686850f90b643132af4d7840f92bec1f40f2fc30e3828d7 | mpickering/apply-refact | Test26.hs | import Array as A; test = A.head | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Test26.hs | haskell | import Array as A; test = A.head | |
b297511740b715e61b528c224c2e06d7e9294b27581dc037a8cd3351d6954283 | AdRoll/erliam | erliam.erl | ( C ) 2017 , AdRoll
%%% @doc
%%%
%%% Supports interaction with AWS IAM:
%%%
%%% - awsv4 signature computation (awsv4.erl)
%%% - instance metadata (imds.erl)
%%% - credential caching and storing in ets (erliam_srv.erl)
%%%
%%% @end
Created : 7 Apr 2017 by < >
-module(erliam).
-type iso_datet... | null | https://raw.githubusercontent.com/AdRoll/erliam/d2002fdfc2e5d16c8f79b3f70ce49532929371be/src/erliam.erl | erlang | @doc
Supports interaction with AWS IAM:
- awsv4 signature computation (awsv4.erl)
- instance metadata (imds.erl)
- credential caching and storing in ets (erliam_srv.erl)
@end
"YYYY-MM-DDTHH:MM:SSZ"
Return the current cached credentials (crash if none are cached or credential refresher
serv... | ( C ) 2017 , AdRoll
Created : 7 Apr 2017 by < >
-module(erliam).
-export_type([iso_datetime/0]).
-export([httpc_profile/0, get_session_token/0, credentials/0, invalidate/0]).
credentials() ->
erliam_srv:current().
Fetch a new session token from STS ( if aws_access_key and aws_secret_key app env val... |
9591165d697169a33d73b6958fc416e0503546a6967dc88e551f4bfadf12432a | hemmi/coq2scala | ideutils.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/ide/ideutils.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* debug printing
returns an abso... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
val async : ('a -> unit) -> '... |
f99a12ae140fb31fa1f1504dcfc59bb73b46eacef2ac833a9b2295a9419c9520 | walmartlabs/lacinia | util_test.clj | Copyright ( c ) 2017 - present Walmart , Inc.
;
Licensed under the Apache License , Version 2.0 ( the " License " )
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; -2.0
;
; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/walmartlabs/lacinia/88bf46f197bfed645d7767fcfe2bfa39e8b00b27/test/com/walmartlabs/lacinia/util_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright ( c ) 2017 - present Walmart , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.walmartlabs.lacinia.util-test
"Utility functions tests."
(:require [clojure.test :refer [deftest is]]
[com... |
966876e17022d2386e4fe603640f04bfe1e71ce73715ec0554a0a3d0583a9467 | typedclojure/typedclojure | deftype.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/4925f60a306d8a1ccfb2cf88442ad0f66153def2/typed/clj.checker/test/typed_test/clj/checker/check/deftype.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns typed-test.clj.checker.check.deftype
(:require [clojure.test :refer [deftest is testing]]
[clojure.core.typed :as t]
[clojure.core.typed.errors :as err]
[typed.clj.checker.test-utils :refer :all]))
(deftest new-instance-method-retu... |
bbaa66e476e2e326a1cb7ae658905ce3d4438e5e487bd024c50c129880f991df | mvoidex/hsdev | PowerShell.hs | # LANGUAGE TypeSynonymInstances , FlexibleInstances , LambdaCase #
module System.Win32.PowerShell (
-- * Escape functions
translate, translateArg,
quote, quoteDouble,
escape
) where
import Data.Char (isAlphaNum)
translate :: String -> String
translate s
| all (\ch -> isAlphaNum ch || ch `elem` "-_") s = s
| o... | null | https://raw.githubusercontent.com/mvoidex/hsdev/016646080a6859e4d9b4a1935fc1d732e388db1a/src/System/Win32/PowerShell.hs | haskell | * Escape functions | # LANGUAGE TypeSynonymInstances , FlexibleInstances , LambdaCase #
module System.Win32.PowerShell (
translate, translateArg,
quote, quoteDouble,
escape
) where
import Data.Char (isAlphaNum)
translate :: String -> String
translate s
| all (\ch -> isAlphaNum ch || ch `elem` "-_") s = s
| otherwise = '"' : snd (f... |
0b79575d79f4f9e42193084ccaee4ac74ef0172f4b372f0eeed37a36ef4f42bb | karlhof26/gimp-scheme | Splatter.scm | Splatter rel 0.01
Created by Graechan
; Comments directed to or
;
License :
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/d6dded45097a869f493959e3a49e3fdd29a85c2e/Splatter.scm | scheme | Comments directed to or
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... | Splatter rel 0.01
Created by Graechan
License :
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
To view a copy of the GNU General Public License
Rel 0.01 - Initial Release
test for 2.8 compatab... |
8dff31c9c509c758b693019b3097c8fb9731abac885be6dba276f52dd7c75f37 | lpgauth/foil | foil_app.erl | -module(foil_app).
-include("foil.hrl").
-export([
start/0,
stop/0
]).
-behaviour(application).
-export([
start/2,
stop/1
]).
%% public
-spec start() ->
{ok, [atom()]}.
start() ->
application:ensure_all_started(?APP).
-spec stop() ->
ok | {error, {not_started, ?APP}}.
stop() ->
app... | null | https://raw.githubusercontent.com/lpgauth/foil/e462829855a745d8f20fb0508ae3eb8e323b03bd/src/foil_app.erl | erlang | public
application callbacks | -module(foil_app).
-include("foil.hrl").
-export([
start/0,
stop/0
]).
-behaviour(application).
-export([
start/2,
stop/1
]).
-spec start() ->
{ok, [atom()]}.
start() ->
application:ensure_all_started(?APP).
-spec stop() ->
ok | {error, {not_started, ?APP}}.
stop() ->
application:s... |
5289d7f66432ca8a2d3be56a2f4fde183f0a141507c7afca90a967dfad37cd37 | multimodalrouting/osm-fulcro | graphs.cljs | (ns app.routing.graphs
(:require [app.model.geofeatures :as gf]
[app.model.osm :as osm]
[app.ui.leaflet :as leaflet :refer [overlay-filter-rule->filter]]
[loom.graph :as graph]
[loom.attr]))
(defonce graphs (atom {}))
(defn edges+attrs->loom-attrs [list-of-edges-with-... | null | https://raw.githubusercontent.com/multimodalrouting/osm-fulcro/dedbf40686a18238349603021687694e5a4c31b6/src/main/app/routing/graphs.cljs | clojure | helpers for creating a geojson
deprecated
deprecated
deprecated | (ns app.routing.graphs
(:require [app.model.geofeatures :as gf]
[app.model.osm :as osm]
[app.ui.leaflet :as leaflet :refer [overlay-filter-rule->filter]]
[loom.graph :as graph]
[loom.attr]))
(defonce graphs (atom {}))
(defn edges+attrs->loom-attrs [list-of-edges-with-... |
0374bd69fab67456756e98b639344e0ba83ee37fdc3fab70852188f74dc5e2f2 | mlabs-haskell/ply | UPLC.hs | | $ module UPLC helpers .
module Ply.Core.UPLC (applyConstant, applyConstant') where
import Data.String (IsString)
import PlutusCore (Some (Some), ValueOf (ValueOf))
import qualified PlutusCore as PLC
import UntypedPlutusCore (
DeBruijn (DeBruijn),
DefaultFun,
DefaultUni,
Index,
Program (Program),
Term ... | null | https://raw.githubusercontent.com/mlabs-haskell/ply/f474dcfeaf7f7a102f136b8bb71c5b684993eea4/ply-core/src/Ply/Core/UPLC.hs | haskell | | Like 'applyConstant' but does not perform any optimizations.
These constants are smaller than variable references. | | $ module UPLC helpers .
module Ply.Core.UPLC (applyConstant, applyConstant') where
import Data.String (IsString)
import PlutusCore (Some (Some), ValueOf (ValueOf))
import qualified PlutusCore as PLC
import UntypedPlutusCore (
DeBruijn (DeBruijn),
DefaultFun,
DefaultUni,
Index,
Program (Program),
Term ... |
1906acb3c22ad8334f7e1883a9d4431c011cb4fbd95277e023cff3a57920f55d | fractalide/fractalide | wallet-input.rkt | #lang racket
(require fractalide/modules/rkt/rkt-fbp/graph)
(define-graph
(node "vp" ${gui.vertical-panel})
(edge-out "vp" "out" "out")
(edge-out "model" "next" "next")
(edge-in "in" "vp" "in")
(node "model" ${cardano-wallet.wcreate.wallet-input.model})
(node "headline" ${gui.message})
(edge "headline... | null | https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/cardano-wallet/wcreate/wallet-input.rkt | racket | #lang racket
(require fractalide/modules/rkt/rkt-fbp/graph)
(define-graph
(node "vp" ${gui.vertical-panel})
(edge-out "vp" "out" "out")
(edge-out "model" "next" "next")
(edge-in "in" "vp" "in")
(node "model" ${cardano-wallet.wcreate.wallet-input.model})
(node "headline" ${gui.message})
(edge "headline... | |
abb748ea8a85e29ff97d4b6d8a11cc3a8dbae2e2dfaa11d3f7313d6deed0a5fc | ocaml-ppx/ocamlformat | macro.ml | open Foo
INCLUDE "bar"
IFDEF "foo"
let f x = 3
ENDIF
TEST foo
TEST bar
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/failing/tests/macro.ml | ocaml | open Foo
INCLUDE "bar"
IFDEF "foo"
let f x = 3
ENDIF
TEST foo
TEST bar
| |
6c31fdb15d6999f543d992e0874cf170d90951842fba31a21d28283d7d6da50f | tarides/ocaml-jit | x86_ast_helpers.mli | Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHO... | null | https://raw.githubusercontent.com/tarides/ocaml-jit/fe2fce1a5bb89acf5f7239917f6098d53c2c14ec/lib/jit/x86_ast_helpers.mli | ocaml | Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHO... | |
0aac5aa0a6aca9c6485f5eac8b7256573b7a7ecfabe951ba427d550d1481ab65 | input-output-hk/plutus-apps | System.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE LambdaCase #
# LANGUAGE MonoLocalBinds #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeOperators #-}
Defines the system threads . One t... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/8706e6c7c525b4973a7b6d2ed7c9d0ef9cd4ef46/plutus-contract/src/Plutus/Trace/Emulator/System.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
Note [Simulator Time]
Simulator time is measured in slots, and the current time is part of the state
of the emulated node. Advancing the clock is done by the 'blockMaker' thread, a
threa... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE LambdaCase #
# LANGUAGE MonoLocalBinds #
# LANGUAGE TypeApplications #
Defines the system threads . One thread for each simulated agent , and a block
maker thread for the blockchain / network .
Defines the system threads. One thread for each simul... |
99d8b7a81bba4a2b83a7424a58759e3002c79114fc532d332a822b0fe412ffd4 | fossas/fossa-cli | ReqTxtSpec.hs | # LANGUAGE QuasiQuotes #
module Python.ReqTxtSpec (
spec,
) where
import Data.Map.Strict qualified as Map
import Text.URI.QQ (uri)
import DepTypes
import Effect.Grapher
import Graphing (Graphing)
import Strategy.Python.Util
import Test.Hspec
setupPyInput :: [Req]
setupPyInput =
[ NameReq
"pkgOne"
N... | null | https://raw.githubusercontent.com/fossas/fossa-cli/efc29b4f9c874e338f0b5a7d1c5b13cb9543156f/test/Python/ReqTxtSpec.hs | haskell | # LANGUAGE QuasiQuotes #
module Python.ReqTxtSpec (
spec,
) where
import Data.Map.Strict qualified as Map
import Text.URI.QQ (uri)
import DepTypes
import Effect.Grapher
import Graphing (Graphing)
import Strategy.Python.Util
import Test.Hspec
setupPyInput :: [Req]
setupPyInput =
[ NameReq
"pkgOne"
N... | |
3e5a4e1f0f8db849a1430e937364f207cd0d7e18c0638f5edaa7a8c0a4ae44d1 | quickdocs/quickdocs-api | releases.lisp | (defpackage #:quickdocs-api/controllers/dists/releases
(:use #:cl
#:utopian
#:sxql)
(:import-from #:quickdocs-api/views/release
#:listing
#:show)
(:import-from #:quickdocs-api/models
#:dist
#:release
#:dist-provided-re... | null | https://raw.githubusercontent.com/quickdocs/quickdocs-api/073406d0d505c66f84b4991563cf103638f7d3d8/controllers/dists/releases.lisp | lisp | (defpackage #:quickdocs-api/controllers/dists/releases
(:use #:cl
#:utopian
#:sxql)
(:import-from #:quickdocs-api/views/release
#:listing
#:show)
(:import-from #:quickdocs-api/models
#:dist
#:release
#:dist-provided-re... | |
37757a4b2a7911e4049afa33bfb5ab356d1c7616c53ea86211ba456ec54b8c77 | uim/uim | test-character-predicate.scm | #!/usr/bin/env gosh
Copyright ( c ) 2003 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions of source code must retain the above copyright... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/test/util/test-character-predicate.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
document... | #!/usr/bin/env gosh
Copyright ( c ) 2003 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HO... |
fb0b6d07d67c594461aae2265292d09cf71330c9f96a1b4234fb91cf06df9f9b | argp/bap | lnf_interface.mli | * Interface to loop nesting forest ( LNF ) algorithms .
(** Steensgard *)
module Steensgard : Lnf.MakeType
(** Havlak *)
module Havlak : Lnf.MakeType
(** Reduced Havlak *)
module Reduced_Havlak : Lnf.MakeType
(** Sreedhar *)
module Sreedhar : Lnf.MakeType
* A list of all supported LNF algorithms .
val lnflist : (s... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/lnf_interface.mli | ocaml | * Steensgard
* Havlak
* Reduced Havlak
* Sreedhar | * Interface to loop nesting forest ( LNF ) algorithms .
module Steensgard : Lnf.MakeType
module Havlak : Lnf.MakeType
module Reduced_Havlak : Lnf.MakeType
module Sreedhar : Lnf.MakeType
* A list of all supported LNF algorithms .
val lnflist : (string * (module Lnf.MakeType)) list
|
d5321cc3538fc04513b011a28971c1e8084a9f3696d189d1876874cda21835ff | chenyukang/eopl | data-structures.scm | (module data-structures (lib "eopl.ss" "eopl")
(require "lang.scm") ; for expression?
(provide (all-defined)) ; too many things to list
;;;;;;;;;;;;;;;; expressed values ;;;;;;;;;;;;;;;;
;;; an expressed value is either a number, a boolean or a procval.
(define-dataty... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter5/letrec-lang/data-structures.scm | scheme | for expression?
too many things to list
expressed values ;;;;;;;;;;;;;;;;
an expressed value is either a number, a boolean or a procval.
extractors:
continuations ;;;;;;;;;;;;;;;;
procedures ;;;;;;;;;;;;;;;;
environment structures ;;;;;;;;;;;;;;;;
| (module data-structures (lib "eopl.ss" "eopl")
(define-datatype expval expval?
(num-val
(value number?))
(bool-val
(boolean boolean?))
(proc-val
(proc proc?)))
(define expval->num
(lambda (v)
(cases expval v
(num-val (num) num)
(else (expval-extra... |
104553e09921e77fee1d3f069202b2bcd4f4fee7d6f1d6443acb66cb2812451f | codinuum/volt | inv_name.ml | let () = LOG "msg" NAME 0 LEVEL DEBUG
| null | https://raw.githubusercontent.com/codinuum/volt/546207693ef102a2f02c85af935f64a8f16882e6/tests/01-syntax/inv_name.ml | ocaml | let () = LOG "msg" NAME 0 LEVEL DEBUG
| |
d95b213ec999ffe6b6d222130aa2a49b3086aa6c4d6659cafd67741b900b9e64 | mitchellwrosen/planet-mitchell | Bits.hs | module Bits
( -- * Bits
Bits(..)
, toIntegralSized
, FiniteBits(..)
-- ** Optics
, (.|.~)
, (.&.~)
, bitAt
, bits
) where
import Data.Bits (Bits(..), FiniteBits(..), toIntegralSized)
import Data.Bits.Lens (bitAt, bits, (.&.~), (.|.~))
| null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Bits.hs | haskell | * Bits
** Optics | module Bits
Bits(..)
, toIntegralSized
, FiniteBits(..)
, (.|.~)
, (.&.~)
, bitAt
, bits
) where
import Data.Bits (Bits(..), FiniteBits(..), toIntegralSized)
import Data.Bits.Lens (bitAt, bits, (.&.~), (.|.~))
|
f5d16811409d1c20a891f95d6fe8a92d922304df0ab5c9c8a71846215f309f97 | g000001/lw-paredit | pkgdcl.lisp | ;;; -*- Mode: Lisp -*-
(defpackage "-paredit"
(:use cl editor))
;;; *EOF*
| null | https://raw.githubusercontent.com/g000001/lw-paredit/d4088de937fa1f16bab4c642f0aa73d582abf642/pkgdcl.lisp | lisp | -*- Mode: Lisp -*-
*EOF* |
(defpackage "-paredit"
(:use cl editor))
|
1d252b4bf48255e167f715aaf82cc1d5770981460aa1243c23755f41b0a2f860 | saurabhnanda/odd-jobs | DevelMain.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Running your app inside GHCi.
--
-- > stack ghci
--
-- To start your app, run:
--
-- > :l DevelMain
-- > DevelMain.update
--
-- You can also call @DevelMain.shutdown@ to stop the app
--
-- There is more information about this approach,
-- on the wiki:
module DevelMain where
i... | null | https://raw.githubusercontent.com/saurabhnanda/odd-jobs/0236697e649053f3f36271000cdeb247e2295d58/dev/DevelMain.hs | haskell | # LANGUAGE OverloadedStrings #
| Running your app inside GHCi.
> stack ghci
To start your app, run:
> :l DevelMain
> DevelMain.update
You can also call @DevelMain.shutdown@ to stop the app
There is more information about this approach,
on the wiki:
import qualified ElmCodeGen
| Start or restart the serv... |
module DevelMain where
import Prelude
import Control.Concurrent (MVar, ThreadId, forkIO, killThread,
newEmptyMVar, putMVar, takeMVar)
import Control.Exception (finally)
import Control.Monad ((>=>))
import ... |
c00526056541504a15a38786473a3685152ff973d8aedbf905bca6f181c12c40 | petertseng/adventofcode-hs-2015 | 19_molecule_replacement.hs | import AdventOfCode (readInputFile)
import Data.Char (isUpper)
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
A = > BC increases size by 1
A = > BRnCAr increases size by 3
A = > BRnCYDAr increases size by 5
A = > BRnCYDYEAr increases size by 7
-- So to count number of steps to go fro... | null | https://raw.githubusercontent.com/petertseng/adventofcode-hs-2015/0c97d3a983f55e328ada9a7fad730fccffcff5d7/bin/19_molecule_replacement.hs | haskell | So to count number of steps to go from e to the final molecule:
splitBy isUpper "ABCdeFGHiJ" == ["A", "B", "Cde", "F", "G", "Hi", "J"]
This could have been achieved by defining:
splitBy f = groupBy (\_ b -> (not . f) b)
However, I decided this was dangerous.
groupBy assumes its equality predicate is an equality.
... | import AdventOfCode (readInputFile)
import Data.Char (isUpper)
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
A = > BC increases size by 1
A = > BRnCAr increases size by 3
A = > BRnCYDAr increases size by 5
A = > BRnCYDYEAr increases size by 7
Count the elements in the final molecu... |
c6147665cd93ac98826ed38b0c4481fbbff9096947511c3b8c84f2b83a6f506d | clojurians-org/haskell-example | Main.hs | # LANGUAGE ScopedTypeVariables #
module Main where
import Prelude
import System.Environment (getArgs)
import Data.Function ((&))
import Data.String (fromString)
import Control.Monad (void, when)
import Control.Monad.IO.Class (liftIO)
-- managerResponseTimeout
import Network.HTTP.Client (
ManagerSettings(..)
, de... | null | https://raw.githubusercontent.com/clojurians-org/haskell-example/c96b021bdef52a121e04ea203c8c3e458770a25a/minio-migration/src/Main.hs | haskell | managerResponseTimeout
.| iterMC (liftIO . print)
.| iterMC (liftIO . print)
>>> main
start ... | # LANGUAGE ScopedTypeVariables #
module Main where
import Prelude
import System.Environment (getArgs)
import Data.Function ((&))
import Data.String (fromString)
import Control.Monad (void, when)
import Control.Monad.IO.Class (liftIO)
import Network.HTTP.Client (
ManagerSettings(..)
, defaultManagerSettings, resp... |
02052e3061bcd2e70dc4872aca74d32fdfcbca5da16a64b6924769b803c1a4ff | neongreen/haskell-ex | Main.hs | module Main where
import Data.Set (Set, size, insert, fromList, lookupIndex, empty, intersection)
import System.Random (RandomGen, mkStdGen, randomR)
import Numeric (showFFloat)
insertIndex :: Int -> Set Int -> Int -> Set Int
insertIndex nTotal st value | size st >= nTotal = st -- aready filled all the values
... | null | https://raw.githubusercontent.com/neongreen/haskell-ex/345115444fdf370a43390fd942e2851b9b1963ad/week1/reposts/borboss366/Main.hs | haskell | aready filled all the values | module Main where
import Data.Set (Set, size, insert, fromList, lookupIndex, empty, intersection)
import System.Random (RandomGen, mkStdGen, randomR)
import Numeric (showFFloat)
insertIndex :: Int -> Set Int -> Int -> Set Int
| otherwise = case ind of
... |
57c93ebdcd708a3f0edf547a4d5e70dbc3ad26581220c599fa063c2f8f4966ca | footprintanalytics/footprint-web | snowflake.clj | (ns metabase.driver.snowflake
"Snowflake Driver."
(:require [clojure.java.jdbc :as jdbc]
[clojure.set :as set]
[clojure.string :as str]
[clojure.tools.logging :as log]
[honeysql.core :as hsql]
[java-time :as t]
[medley.core :as m]
[... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/modules/drivers/snowflake/src/metabase/driver/snowflake.clj | clojure | default - the Snowflake errors have a \n in them
/
-reference/parameters.html#client-session-keep-alive
other SESSION parameters
stuff doesn't work, even though we ultimately override this when we set the session timezone
tell Snowflake to use the same start of week that we have set for the
[[metabase.public-set... | (ns metabase.driver.snowflake
"Snowflake Driver."
(:require [clojure.java.jdbc :as jdbc]
[clojure.set :as set]
[clojure.string :as str]
[clojure.tools.logging :as log]
[honeysql.core :as hsql]
[java-time :as t]
[medley.core :as m]
[... |
5be9aa7201f1f10931c9db8e52b3a0df746c0c497ae75db24d5427da1dad4def | racket/redex | test.rkt | #lang racket
(require "list-machine.rkt"
"list-machine-typing.rkt"
redex)
(test-equal (judgment-holds (var-lookup (empty x ↦ nil) x a) a)
(list (term nil)))
(test-equal (judgment-holds (var-lookup (empty x ↦ nil) y a) a)
(list))
(test-equal (judgment-holds (var-lookup ((empty ... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-examples/redex/examples/list-machine/test.rkt | racket | #lang racket
(require "list-machine.rkt"
"list-machine-typing.rkt"
redex)
(test-equal (judgment-holds (var-lookup (empty x ↦ nil) x a) a)
(list (term nil)))
(test-equal (judgment-holds (var-lookup (empty x ↦ nil) y a) a)
(list))
(test-equal (judgment-holds (var-lookup ((empty ... | |
395e96a6c0ce1e0c3862580f4d281f92b04867d21a39db0b3280c308787c3819 | YoshikuniJujo/funpaala | drinkSize1.hs | data Size = Short | Tall | Grande | Venti
deriving (Eq, Ord, Bounded, Enum, Show, Read)
| null | https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/27_basic_type_classes/drinkSize1.hs | haskell | data Size = Short | Tall | Grande | Venti
deriving (Eq, Ord, Bounded, Enum, Show, Read)
| |
0a71b3fbb9fb5f0263f7b22ab0e322b95a8bf2b70c1ddd3bc26ab82691297bac | gedge-platform/gs-broker | amqp10_client_frame_reader.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(amqp10_client_frame_reader).
-behaviour(g... | null | https://raw.githubusercontent.com/gedge-platform/gs-broker/c4c1ad39e563537d46553eae1363317cf75aff26/broker-server/deps/amqp10_client/src/amqp10_client_frame_reader.erl | erlang |
API
gen_statem callbacks
===================================================================
API
===================================================================
@doc
Passes the connection process PID to the reader process.
This function is called when a connection supervision tree is
started.
============... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(amqp10_client_frame_reader).
-behaviour(gen_sta... |
437b414e4a804d88a6d737acfad3b9f2afb55d0f3296d5a58b85c36f20d0d5e7 | VincentToups/racket-lib | dict-state-monad.rkt | #lang racket
(require (prefix-in nested-dict- pure-lands/utilities/nested-dicts)
pure-lands/utilities/state-monad)
(define (pair a b) (cons a b))
(define (get location)
(lambda (state)
(state-result (nested-dict-get state location) state)))
(define (get* . location)
(get location))
(define (set lo... | null | https://raw.githubusercontent.com/VincentToups/racket-lib/d8aed0959fd148615b000ceecd7b8a6128cfcfa8/pure-lands/utilities/dict-state-monad.rkt | racket | #lang racket
(require (prefix-in nested-dict- pure-lands/utilities/nested-dicts)
pure-lands/utilities/state-monad)
(define (pair a b) (cons a b))
(define (get location)
(lambda (state)
(state-result (nested-dict-get state location) state)))
(define (get* . location)
(get location))
(define (set lo... | |
8346d7f521ebafe18c2571d14bcc0dfac64365a4a6429d167c4093c537251f87 | haroldcarr/learn-haskell-coq-ml-etc | Q.hs | # OPTIONS_GHC -fno - warn - missing - methods #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MonoLocalBinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
module Q where
-typing-the-technical-interview
Typing the technical interview 201... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/type-level/2017-04-kyle-kingsbury-n-queens/Q.hs | haskell | Is any element of this list True?
Equality
Absolute difference
:t illegalCompare
=> :: PeanoEqual True (Cons Z False) t => t
Map f over a list
Map f over list and concatenate results together
Filter a list with an Apply-able predicate function
A list of queens in row x with y from 0 to n.
Does ... | # OPTIONS_GHC -fno - warn - missing - methods #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MonoLocalBinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
module Q where
-typing-the-technical-interview
Typing the technical interview 201... |
5314ee111c5a10d35a40963043f1cab7ea6c686a55c89c2eca8f13811f5c7028 | rd--/hsc3 | tan.help.hs | ---- ; drawings
Sound.Sc3.is_unary Sound.Sc3.Common.Base.CS "Tan"
Sound.Sc3.Plot.plot_fn_r1_ln (Sound.Sc3.clip_hs (-6,6) . tan) (0,2 * pi)
| null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/tan.help.hs | haskell | -- ; drawings | Sound.Sc3.is_unary Sound.Sc3.Common.Base.CS "Tan"
Sound.Sc3.Plot.plot_fn_r1_ln (Sound.Sc3.clip_hs (-6,6) . tan) (0,2 * pi)
|
f8a7f30ed7d9fcfe5d397ec7f26e1df6d81c24f6fa62f4d447e511f3ba74e345 | sarabander/p2pu-sicp | Ex1.18.scm | ;; Ex 1.18
Uses halve , double and xor from 1.17
(define (mult-iter a x)
(define (mult-iter-help a x b) ; a and x must be positive
(cond ((zero? a) b)
((even? a) (mult-iter-help (halve a) (double x) b))
((odd? a) (mult-iter-help (- a 1) x (+ b x)))))
(if (or (zero? a) (zero? x))
0
((if (x... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/1.2/Ex1.18.scm | scheme | Ex 1.18
a and x must be positive
The invariant quantity here is ax + b. |
Uses halve , double and xor from 1.17
(define (mult-iter a x)
(cond ((zero? a) b)
((even? a) (mult-iter-help (halve a) (double x) b))
((odd? a) (mult-iter-help (- a 1) x (+ b x)))))
(if (or (zero? a) (zero? x))
0
((if (xor (negative? a) (negative? x)) - +)
(mult-iter-help (abs a) (ab... |
4a5d5461954705ea68fcf17f957900dcd91fbe301f92cc41313b5c5e621bf320 | retro/graphql-builder | parser.cljs | (ns graphql-builder.parser)
| null | https://raw.githubusercontent.com/retro/graphql-builder/f09f77f360671332fe3084d1ab4a9a3dd82142a0/src/graphql_builder/parser.cljs | clojure | (ns graphql-builder.parser)
| |
fa7cf2fe3886428fad487db4190c3633bd879779ecc4632d2206bc12a5e0ba62 | bondy-io/bondy | bondy_http_gateway_utils.erl | %% =============================================================================
%% bondy_http_gateway_utils.erl -
%%
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the ... | null | https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_http_gateway_utils.erl | erlang | =============================================================================
bondy_http_gateway_utils.erl -
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRA... | Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(bondy_http_gateway_utils).
-type state_fun() :: fun((any()) -> any()).
-export_type([state_fun/0]).
... |
59fe39f78400d98087f82e9545bfd47e482fb88b1571bd861c4403c3114f0976 | atisharma/matlib | state_space.clj | (ns matlib.state-space
"Basic Linear Time-Invariant (LTI) state space system operations and patterns.
A discrete-time state-space system is expressed as a set of matrices
`A`, `B`, `C`, `D` which can be integrated as:
`x(k+1) = A x(k) + B u(k) + w(k)`
` y(k) = C x(k) + D u(k) + v(k)`,
with integer... | null | https://raw.githubusercontent.com/atisharma/matlib/172e7726ace10663516a1dc9ae4ebb236cd3b538/src/matlib/state_space.clj | clojure | side effects on X, Y
below is for testing
need a better input:
- persistently exciting
- different frequencies
first input signal
arbitrarily step some input
input noise | (ns matlib.state-space
"Basic Linear Time-Invariant (LTI) state space system operations and patterns.
A discrete-time state-space system is expressed as a set of matrices
`A`, `B`, `C`, `D` which can be integrated as:
`x(k+1) = A x(k) + B u(k) + w(k)`
` y(k) = C x(k) + D u(k) + v(k)`,
with integer... |
d805f942a7ea872540e23112444644eba8bfc540908b3800ffd256c6b526ea95 | sneeuwballen/zipperposition | Flex_state.mli |
This file is free software , part of Zipperposition . See file " license " for more details .
(** {2 Extensible Map for State} *)
(** This data structure maps keys to values of any type (although the
type is fixed for a given key). Useful for configuration.
*)
type t
val empty : t
type 'a key
val create_ke... | null | https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/core/Flex_state.mli | ocaml | * {2 Extensible Map for State}
* This data structure maps keys to values of any type (although the
type is fixed for a given key). Useful for configuration.
* @raise Not_found if the key is not present |
This file is free software , part of Zipperposition . See file " license " for more details .
type t
val empty : t
type 'a key
val create_key : unit -> 'a key
val add : 'a key -> 'a -> t -> t
val get : 'a key -> t -> 'a option
val get_exn : 'a key -> t -> 'a
val get_or : or_:'a -> 'a key -> t -> 'a
|
e91bb7476079070bf8c25d0e09b7bbcf5444f628a24690b794fb5235bb0e0500 | generateme/fastmath | efloat.clj | (ns fastmath.efloat
"(re)Implementation of EFloat/Interval from pbrt-v3/pbrt-v4.
A floating point number structure which keeps a track of error caused by operations."
(:refer-clojure :exclude [min max abs])
(:require [fastmath.core :as m]))
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators #{'... | null | https://raw.githubusercontent.com/generateme/fastmath/b38b43682b9dd0d3557065ca511518382943ddb6/src/fastmath/efloat.clj | clojure | helpers
-v3/blob/master/src/core/efloat.h
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.
... | (ns fastmath.efloat
"(re)Implementation of EFloat/Interval from pbrt-v3/pbrt-v4.
A floating point number structure which keeps a track of error caused by operations."
(:refer-clojure :exclude [min max abs])
(:require [fastmath.core :as m]))
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators #{'... |
63aea9fa449da13e799230233af2892b61a7c8810d18d4b6ffd5bf2ec2d2f2bb | haslab/HAAP | OracleT3.hs | # LANGUAGE PatternGuards #
module OracleT3 where
import LI11718
import OracleT2
import Test.QuickCheck.Gen
import Data.List
import Data.Maybe
import Safe
--import Debug.Trace
import Control.Monad.IO.Class
randomizeCarro :: Tabuleiro -> Double -> Carro -> Gen Carro
randomizeCarro tab delta c = do
mb <- suchThatM... | null | https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/examples/plab/svn/2017li1g183/src/OracleT3.hs | haskell | import Debug.Trace
ranksT3Nuno = [(tab1,5,carro1)]
where
]
geometry
copiado do Gloss para Double
copiado do Gloss para Double
copiado do Gloss para Double
------------
00011110000009999001100999
..//>>[]<<[][]<<[]>>>><<<<\\..
..\\>><<>>[]<<<<[]<<<<>>>>//..
..//<<\\..//\\..//... | # LANGUAGE PatternGuards #
module OracleT3 where
import LI11718
import OracleT2
import Test.QuickCheck.Gen
import Data.List
import Data.Maybe
import Safe
import Control.Monad.IO.Class
randomizeCarro :: Tabuleiro -> Double -> Carro -> Gen Carro
randomizeCarro tab delta c = do
mb <- suchThatMaybe genC (validaCarr... |
68c07c435ab1e3b89740a8b2d8ccfa4046cf4a7afa5c410b35064c8c968fb4a2 | mstksg/inCode | Part1.hs | #!/usr/bin/env stack
-- stack --install-ghc ghci --resolver nightly-2018-11-02 --package singletons --package decidable --package lens-typelevel
# LANGUAGE BlockArguments #
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs ... | null | https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/code-samples/ttt/Part1.hs | haskell | stack --install-ghc ghci --resolver nightly-2018-11-02 --package singletons --package decidable --package lens-typelevel
# LANGUAGE EmptyCase #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneD... | #!/usr/bin/env stack
# LANGUAGE BlockArguments #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wall ... |
6595db3685cf60be5577ecb48940d7252d0d5eefdf1a9800b52c72d2fb0e03f1 | sebashack/servantRestfulAPI | CancellationRepo.hs | {-# LANGUAGE OverloadedStrings #-}
module HelperLibs.MySQL.CancellationRepo where
import qualified Schemas.SQL.Reservation as SCH
import qualified Database.Persist.MySQL as MySQL
import qualified Database.Persist.TH as TH
import qualified Database.Persist as Per
cancEntityToTuple (Per.Entity key entity) =
let e... | null | https://raw.githubusercontent.com/sebashack/servantRestfulAPI/e625535d196acefaff4f5bf03108816be668fe4d/libs/HelperLibs/MySQL/CancellationRepo.hs | haskell | # LANGUAGE OverloadedStrings # |
module HelperLibs.MySQL.CancellationRepo where
import qualified Schemas.SQL.Reservation as SCH
import qualified Database.Persist.MySQL as MySQL
import qualified Database.Persist.TH as TH
import qualified Database.Persist as Per
cancEntityToTuple (Per.Entity key entity) =
let eId = toInteger $ MySQL.unSqlBackend... |
d9e7b9feacdf27b1bd800eec4890a83e29802809c005442a719233844eac9c32 | Happstack/happstack-server | SimpleHTTP.hs | # LANGUAGE CPP #
# LANGUAGE UndecidableInstances #
# LANGUAGE OverlappingInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternGuards #
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
# LAN... | null | https://raw.githubusercontent.com/Happstack/happstack-server/d9cdb9af5635b1ebd9db0801b66dbf4e58aba66b/src/Happstack/Server/SimpleHTTP.hs | haskell | # LANGUAGE TypeSynonymInstances #
# OPTIONS -fno-warn-orphans #
---------------------------------------------------------------------------
|
License : BSD-like
Stability : provisional
'simpleHTTP' is a self-contained HTTP server which can be used to
> main = simpleHTTP nullConf $ ok "Hello World!"
... | # LANGUAGE CPP #
# LANGUAGE UndecidableInstances #
# LANGUAGE OverlappingInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternGuards #
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# L... |
5fc4b8ca88a2c9cfce303261e3ab0248e64150131543208c8d095d14c5254ebc | alex-gutev/tridash | builder.lisp | ;;;; builder.lisp
;;;;
;;;; Tridash Programming Language.
Copyright ( C ) 2019 - 2021
;;;;
;;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;;; (at... | null | https://raw.githubusercontent.com/alex-gutev/tridash/45985ceaef98b0a2c5ee1e9d2e296a923ddd57de/test/builders/html/builder.lisp | lisp | builder.lisp
Tridash Programming Language.
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 PA... | Copyright ( C ) 2019 - 2021
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(defpackage :tridash/test.builder.html
(:use :generic-cl
:alexand... |
2c348d3639b5c1d414ded50cc54da6fc7fc95512231a0b29dfdf64038ee5ebdb | calyau/maxima | noninteractive.lisp | ;; noninteractive.lisp -- some functions to be used by noninteractive.mac
copyright 2007 by
I release this file under the terms of the GNU General Public License .
;; Redefine MERROR to throw something.
(defun merror (s &rest l) ($throw `((merror) ,s ,@l)))
(defmspec $assuming (e)
(let*
((args (margs e))
... | null | https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/share/contrib/noninteractive/noninteractive.lisp | lisp | noninteractive.lisp -- some functions to be used by noninteractive.mac
Redefine MERROR to throw something.
so that kill does not affect noninteractive.
Unfortunately, this function has to revised if any more
functions or variables are defined.
Maybe there should be a way to mark a function as unkillable
when it... | copyright 2007 by
I release this file under the terms of the GNU General Public License .
(defun merror (s &rest l) ($throw `((merror) ,s ,@l)))
(defmspec $assuming (e)
(let*
((args (margs e))
(assumptions (mapcar #'meval (extract-assumptions (first args))))
(my-context (mfuncall '$supcontext)))... |
fbd55e12ab04fdddaddbad495df69008cc260dc0f0a619181e426c15bfb0d779 | dreamsmasher/is-even | Spec.hs | # LANGUAGE ExistentialQuantification , TypeApplications #
import Test.QuickCheck
import Test.Hspec
import Test.Hspec.Runner
import Test.Hspec.QuickCheck
import System.Random
import Data.Numbers.IsEven
import Data.Numbers.IsEvenCore
propEven :: forall a. (Integral a, Arbitrary a) => (a -> Bool) -> a -> Bool
propEven f... | null | https://raw.githubusercontent.com/dreamsmasher/is-even/820d5ca56a62a38748a94cfdc2e710b4a087bc6d/test/Spec.hs | haskell | # LANGUAGE ExistentialQuantification , TypeApplications #
import Test.QuickCheck
import Test.Hspec
import Test.Hspec.Runner
import Test.Hspec.QuickCheck
import System.Random
import Data.Numbers.IsEven
import Data.Numbers.IsEvenCore
propEven :: forall a. (Integral a, Arbitrary a) => (a -> Bool) -> a -> Bool
propEven f... | |
996bd6f2587ec6b24bd85ac81f6ef83551c38f3451bfb80555e2ebed27cee307 | Gbury/archsat | stats.mli | This file is free software , part of Archsat . See file " LICENSE " for more details .
(** Statistics
This module defines functiosn to register statistics about sections.
*)
val print : unit -> unit
(** Print statistics on the standard output. *)
{ 2 Statistics counters }
type t
(** The type of a statistic... | null | https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/debug/stats.mli | ocaml | * Statistics
This module defines functiosn to register statistics about sections.
* Print statistics on the standard output.
* The type of a statistics counter.
* Raised when trying to create a statistics but there are already
Debug.max_stats that have been created.
* Create a stats counter with the given ... | This file is free software , part of Archsat . See file " LICENSE " for more details .
val print : unit -> unit
{ 2 Statistics counters }
type t
exception Out_of_stats
val mk : string -> t
val get : t -> Section.t -> int
val set : t -> Section.t -> int -> unit
val incr : ?k:int -> t -> Section.t -> unit
*... |
df64adff115932b74b9febab12ed375391046503078f2fe9ecfa54f30dcc169c | iskandr/parakeet-retired | SSA_Codegen.mli | The codegen object helps keep track of information about an SSA function
(* function and its variables as we are in the process of constructing it. *)
open TypedSSA
class codegen : object
val types : Type.t ID.Map.t ref
val code : stmt_node DynArray.t
method get_type_env : Type.t ID.Map.t
method ge... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/SSA/SSA_Codegen.mli | ocaml | function and its variables as we are in the process of constructing it. | The codegen object helps keep track of information about an SSA function
open TypedSSA
class codegen : object
val types : Type.t ID.Map.t ref
val code : stmt_node DynArray.t
method get_type_env : Type.t ID.Map.t
method get_type : ID.t -> Type.t
method add_type : ID.t -> Type.t -> unit
met... |
d7bc1b8e7c1e563595bf17d07cca672b62abfff5d137e6bc6dd67c0c610ae998 | donaldsonjw/bigloo | engine.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / api / sqlite / src / Llib / engine.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/api/sqlite/src/Llib/engine.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Simple SQLTINY evaluator */
*===========================... | * serrano / prgm / project / bigloo / api / sqlite / src / Llib / engine.scm * /
* Author : * /
* Creation : Tue Jan 16 18:35:10 2007 * /
* Last change : Fri Aug 7 19:49:50 2015 ( serrano ) * /
* ... |
31c4566b3a79c5741ab26cb434dfde04433cabd11d9785fd83f507c8883d4a2d | ocaml-ppx/ppx_tools_versioned | ppx_once.ml | open Migrate_parsetree
open Ast_405
open Ppx_tools_405
* This ppx rewrites expression extension of the form [ % once expr ] .
* The first time the expression is evaluated , its result is cached .
* After that , the evaluation will be skipped and the result reused .
*
* The ppx introduces references at t... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/example/ppx_once/ppx_once.ml | ocaml | open Migrate_parsetree
open Ast_405
open Ppx_tools_405
* This ppx rewrites expression extension of the form [ % once expr ] .
* The first time the expression is evaluated , its result is cached .
* After that , the evaluation will be skipped and the result reused .
*
* The ppx introduces references at t... | |
43857d09c6fed07f586c749f381817af88a60a805281f382e3b78954378a55d7 | a-nikolaev/wanderers | org.ml | Wanderers - open world adventure game .
Copyright ( C ) 2013 - 2014 .
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at... | null | https://raw.githubusercontent.com/a-nikolaev/wanderers/054c1cdc6dd833d8938357e6d898def510531d67/src/org.ml | ocaml | Organizations
- unique persons,
transparent incluseion of these uniques in the economic model
- production of items, technological development
- spreading of items?
- shops
- rumors generation and spreading
- self-organizing groups
- defend population
- collect taxes
- war with neighbors for... | Wanderers - open world adventure game .
Copyright ( C ) 2013 - 2014 .
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at... |
d054d05dbb2376604afbaba4476b3cb5301d426acb7b636c28dc2355e41771c7 | herbelin/coq-hh | inductive.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/checker/inductive.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
raise Not_found if not an inductive... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Names
open Uni... |
1b14cc34cb393e6be810b6043a3dc801b760be49eae2d669c1a149bc4ab6f1d9 | ocaml-sf/learn-ocaml-corpus | eval_reverse.ml | open Seq
(* -------------------------------------------------------------------------- *)
(* The size of a tree. *)
let rec size (t : tree) : int =
match t with
| TLeaf _ ->
1
| TNonLeaf offspring ->
1 + size_offspring offspring
and size_offspring (offspring : offspring) : int =
match offspring(... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/alpha_beta/wrong/eval_reverse.ml | ocaml | --------------------------------------------------------------------------
The size of a tree.
--------------------------------------------------------------------------
The height of a tree.
--------------------------------------------------------------------------
Evaluating a tree, with a sense parameter:... | open Seq
let rec size (t : tree) : int =
match t with
| TLeaf _ ->
1
| TNonLeaf offspring ->
1 + size_offspring offspring
and size_offspring (offspring : offspring) : int =
match offspring() with
| Nil ->
0
| Cons ((_move, t), offspring) ->
size t + size_offspring offspring
le... |
e777ea5f5d864b75e2bc58396b0ea7d66a31345f93e743ee82a9130ca59919e9 | yuriy-chumak/ol | depth_buffer_float.scm | ; ==========================================================================
; ARB_depth_buffer_float
;
;
;
; Version
;
; Overview
;
(define-library (OpenGL ARB depth_buffer_float)
; --------------------------------------------------------------------------
; Dependencies
(import (scheme core) (OpenGL platform))
; -... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/libraries/OpenGL/ARB/depth_buffer_float.scm | scheme | ==========================================================================
ARB_depth_buffer_float
Version
Overview
--------------------------------------------------------------------------
Dependencies
--------------------------------------------------------------------------
----------------------------... | (define-library (OpenGL ARB depth_buffer_float)
(import (scheme core) (OpenGL platform))
(export ARB_depth_buffer_float
Accepted by the < internalformat > parameter of TexImage1D , TexImage2D ,
, CopyTexImage1D , CopyTexImage2D , and ,
DEPTH_COMPONENT32F
DEPTH32F_STENCIL8
Accepted by the < ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.