_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 |
|---|---|---|---|---|---|---|---|---|
e8273df494759d94e990b3344f30d070c2b232321b7269d10c97028adea84025 | jaspervdj/hakyll | Internal.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
module Hakyll.Web.Template.Internal
( Template (..)
, template
, templateBodyCompiler
, templateCompiler
, applyTemplate
, loa... | null | https://raw.githubusercontent.com/jaspervdj/hakyll/af9e29b5456c105dc948bc46c93e989a650b5ed1/lib/Hakyll/Web/Template/Internal.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
On... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
module Hakyll.Web.Template.Internal
( Template (..)
, template
, templateBodyCompiler
, templateCompiler
, applyTemplate
, loadAndApplyTemplate
, applyAsTemplate
, readTemplate
, compileTemplateItem
... |
d6b7a94f5f66fb3de9709bf23fae0eaff15ae965c407f08ef11166873be73171 | abevoelker/haskellbook-solutions | registeredUser2.hs | module RegisteredUser where
newtype Username = Username String
newtype AccountNumber = AccountNumber Integer
data User = UnregisteredUser
| RegisteredUser Username AccountNumber
printUser :: User -> IO ()
printUser UnregisteredUser = putStrLn "UnregisteredUser"
printUser (RegisteredUser (Username name)
... | null | https://raw.githubusercontent.com/abevoelker/haskellbook-solutions/9e2804940b3b45bdc1b04cfa5d536097629c9498/ch7/registeredUser2.hs | haskell | module RegisteredUser where
newtype Username = Username String
newtype AccountNumber = AccountNumber Integer
data User = UnregisteredUser
| RegisteredUser Username AccountNumber
printUser :: User -> IO ()
printUser UnregisteredUser = putStrLn "UnregisteredUser"
printUser (RegisteredUser (Username name)
... | |
01fd7ba53d14602392eab0ebf6db9474794883c556b04fc372d78686a7ab6da3 | janestreet/bonsai | color.ml | open! Core
open! Import
open Gen_js_api
type t = Css_gen.Color.t [@@deriving sexp]
let t_to_js t = Ojs.string_to_js (Css_gen.Color.to_string_css t)
| null | https://raw.githubusercontent.com/janestreet/bonsai/c202b961f41e20e0b735c4e33c2bbac57a590941/bindings/dygraph/src/color.ml | ocaml | open! Core
open! Import
open Gen_js_api
type t = Css_gen.Color.t [@@deriving sexp]
let t_to_js t = Ojs.string_to_js (Css_gen.Color.to_string_css t)
| |
c0f5c64cd3925960c2b0800541f6231cc691dc65cf0178111fbf07d0d49faa77 | anmonteiro/aws-lambda-ocaml-runtime | vercel.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* 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... | null | https://raw.githubusercontent.com/anmonteiro/aws-lambda-ocaml-runtime/5d3210e0c6683f390cb5870efe7f774420ad4b22/vercel/vercel.ml | ocaml | ----------------------------------------------------------------------------
* Copyright ( c ) 2019
*
* 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... | |
d5986c3892eec7b8d9449f683b7e352fb95c638fc7d9d319236ac977dc944322 | cndreisbach/clojure-web-dev-workshop | system.clj | (ns we-owe.system
(:require [we-owe.handler :refer [create-handler]]
[ring.adapter.jetty :refer [run-jetty]]))
(defn system
"Returns a new instance of the application."
[]
(let [db (atom {:debts []})
handler (create-handler db)]
{:db db
:handler handler
:server-port 3004
... | null | https://raw.githubusercontent.com/cndreisbach/clojure-web-dev-workshop/95d9fdf94b39f8a1e408b8bf75a81b92899ee7d9/code/04-noir/src/we_owe/system.clj | clojure | (ns we-owe.system
(:require [we-owe.handler :refer [create-handler]]
[ring.adapter.jetty :refer [run-jetty]]))
(defn system
"Returns a new instance of the application."
[]
(let [db (atom {:debts []})
handler (create-handler db)]
{:db db
:handler handler
:server-port 3004
... | |
537ef11f3cfe9363cc0f4edbff3e4809967ac3c8dc195e2db77fd7cd431dafe7 | samply/blaze | date_test.clj | (ns blaze.db.impl.codec.date-test
(:require
[blaze.byte-string :as bs]
[blaze.db.impl.codec-spec]
[blaze.db.impl.codec.date :as codec-date]
[blaze.db.impl.index.search-param-value-resource-spec]
[blaze.test-util :as tu :refer [satisfies-prop]]
[clojure.spec.alpha :as s]
[clojure.spec.test.... | null | https://raw.githubusercontent.com/samply/blaze/6441a0a2f988b8784ed555c1d20f634ef2df7e4a/modules/db/test/blaze/db/impl/codec/date_test.clj | clojure | (ns blaze.db.impl.codec.date-test
(:require
[blaze.byte-string :as bs]
[blaze.db.impl.codec-spec]
[blaze.db.impl.codec.date :as codec-date]
[blaze.db.impl.index.search-param-value-resource-spec]
[blaze.test-util :as tu :refer [satisfies-prop]]
[clojure.spec.alpha :as s]
[clojure.spec.test.... | |
5b8de95efb996ea71f228fd82033519df744318427fa4e4684976a9f645fc164 | Armael/marracheck | OpamDefaultZ3.ml | (**************************************************************************)
(* *)
(* Copyright 2017 OCamlPro *)
(* *)
(* All righ... | null | https://raw.githubusercontent.com/Armael/marracheck/eb333b8754bf4e9a8aef93dcae29b92fdadc614c/lib_compute_cover/OpamDefaultZ3.ml | ocaml | ************************************************************************
Copyright 2017 OCamlPro
All rights reserved. This ... | GNU Lesser General Public License version 2.1 , with the special
open OpamCudfSolverSig
let log f = OpamConsole.log "Z3" f
let name = "builtin-z3"
let ext : string option ref = ref None
let is_present () = true
let command_name = None
let default_criteria = {
crit_default = "-count[version-lag,change... |
49ab6cb2544d199ada0101657921c0f323673261f732a1bb732aa03da4023037 | erleans/pgo | pgo_connection_sup.erl | -module(pgo_connection_sup).
-behaviour(supervisor).
-export([start_link/4,
start_child/1]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link(QueueTid, PoolPid, PoolName, PoolConfig) ->
supervisor:start_link(?MODULE, [QueueTid, self(), PoolPid, PoolName, PoolConfig]).
start_child(Sup) ->
s... | null | https://raw.githubusercontent.com/erleans/pgo/1c9a0992bc41f2ecd0328fbee1151b75843ac979/src/pgo_connection_sup.erl | erlang | -module(pgo_connection_sup).
-behaviour(supervisor).
-export([start_link/4,
start_child/1]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link(QueueTid, PoolPid, PoolName, PoolConfig) ->
supervisor:start_link(?MODULE, [QueueTid, self(), PoolPid, PoolName, PoolConfig]).
start_child(Sup) ->
s... | |
4fa5522f44a07448a208b8a9a6c7bdc39f5c8db90750aafc5384c388a5d67525 | spechub/Hets | FoldTerm.hs | |
Module : ./HasCASL / FoldTerm.hs
Description : fold functions for terms and program equations
Copyright : ( c ) and Uni Bremen 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
folding terms
Module ... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/HasCASL/FoldTerm.hs | haskell | |
Module : ./HasCASL / FoldTerm.hs
Description : fold functions for terms and program equations
Copyright : ( c ) and Uni Bremen 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
folding terms
Module ... | |
4aee9e5adbb95566310417721c14418240fefd92ddd154406986fb788656a18b | kevinlynx/ext-blog | ext-blog.lisp | ;;;; ext-blog.lisp
;;;;
;;;; This file is a part of ext-blog, a common lisp blog engine.
;;;; See file doc/LICENSE for license details.
;;;;
Author : ( kevinlynx at gmail dot com )
(in-package #:ext-blog)
(export '(start))
(defparameter *access-log-path*
(and *enable-log* (merge-pathnames "ext-blog-access.log"... | null | https://raw.githubusercontent.com/kevinlynx/ext-blog/4f6a6f0ab64f9384d53d41d1208ebaa7b9575534/src/ext-blog.lisp | lisp | ext-blog.lisp
This file is a part of ext-blog, a common lisp blog engine.
See file doc/LICENSE for license details.
| Author : ( kevinlynx at gmail dot com )
(in-package #:ext-blog)
(export '(start))
(defparameter *access-log-path*
(and *enable-log* (merge-pathnames "ext-blog-access.log" *log-path*)))
(defparameter *message-log-path*
(and *enable-log* (merge-pathnames "ext-blog-message.log" *log-path*)))
(defun create-log... |
fa2fad555354651bf4e5015599a637d819b4e590e09703ef73ef7d43e06b1871 | patricoferris/ocaml-multicore-monorepo | test_lwt_result.ml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
TODO : Remove this when the minimum required version of is > = 4.08
module Result = struct
type (+'a, +'b) t = ('a, 'b) result =
| Ok of 'a
| Error of 'b
end
open Test
e... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/lwt/test/core/test_lwt_result.ml | ocaml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
TODO : Remove this when the minimum required version of is > = 4.08
module Result = struct
type (+'a, +'b) t = ('a, 'b) result =
| Ok of 'a
| Error of 'b
end
open Test
e... | |
9bb7f1f8eed03df13a422bfb2cc878ac08a55f8b771ad32c2dc77b1e84d005e7 | sellout/haskerwaul | Heyting.hs | # language UndecidableSuperClasses #
module Haskerwaul.Category.Heyting
( module Haskerwaul.Category.Heyting
, module Haskerwaul.Category.Coherent
) where
import Haskerwaul.Category.Coherent
-- |
--
-- = references
--
-- - [nLab](+category)
class CoherentCategory c => HeytingCategory c
| null | https://raw.githubusercontent.com/sellout/haskerwaul/b32ecdb141a5f9cca04ed85dc952028242c160a8/src/Haskerwaul/Category/Heyting.hs | haskell | |
= references
- [nLab](+category) | # language UndecidableSuperClasses #
module Haskerwaul.Category.Heyting
( module Haskerwaul.Category.Heyting
, module Haskerwaul.Category.Coherent
) where
import Haskerwaul.Category.Coherent
class CoherentCategory c => HeytingCategory c
|
e01445e2d35c2ee289c1fc843e84f6ed2337dada65fa37b39472109cd8aa509a | racket/gui | load-handler.rkt | #lang racket
(require racket/gui/init
tests/racket/load-handler)
(try-load-handler-now)
| null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-test/tests/gracket/load-handler.rkt | racket | #lang racket
(require racket/gui/init
tests/racket/load-handler)
(try-load-handler-now)
| |
288862e0b1dfa3cdb818729b83939acb37d2c9c0ac69b9ecebf779ae54a483dc | reynir/ocaml-digitalocean | myutop_main.ml | let () = UTop_main.main ()
| null | https://raw.githubusercontent.com/reynir/ocaml-digitalocean/5d389bd02dbc256aa6aa001e88ce58ed8d02bf75/src/myutop_main.ml | ocaml | let () = UTop_main.main ()
| |
fb8fb33037686fb7363a08fdc6ac0ac7b250ed2d48f1c440aebb611085c2d258 | EduardoRFS/ppx_let_locs | compile_common.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/EduardoRFS/ppx_let_locs/46b0cdfc46c4bc1450a25b6ae455cc65e663acd0/ocaml/driver/compile_common.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
type info = {
source_file : string;
module_name : string;
output_prefix : string;
env ... |
1ac67a3dc0c3c2ea969d0abf64dd2e6e54804d2f0c40732ef8123d8cdf9f9a35 | dbuenzli/carcass | setup.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2016 Daniel C. Bün... | null | https://raw.githubusercontent.com/dbuenzli/carcass/1221231b1e3d9ba5b7697707d0e7e901d51ac376/src-bin/setup.ml | ocaml | Flesh setup
Setup command
Command line interface | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2016 Daniel C. Bün... |
2759bb44b712fe2356c3537bd686085cd71933953f8f75612243211e85f0406f | quark-lang/quark | Macro.hs | module Core.Macro.Definition.Macro where
import Data.Map
import Core.Parser.AST
data Macro = Macro {
macroName :: String,
macroArgs :: [String],
macroBody :: Expression
} deriving Show
type Macros = Map String Macro | null | https://raw.githubusercontent.com/quark-lang/quark/e3dc7fff4e4dfba3e5c9ab71f10ede8bc5a30a44/app/Core/Macro/Definition/Macro.hs | haskell | module Core.Macro.Definition.Macro where
import Data.Map
import Core.Parser.AST
data Macro = Macro {
macroName :: String,
macroArgs :: [String],
macroBody :: Expression
} deriving Show
type Macros = Map String Macro | |
8e25ceb992c11c8b278908d03863209773f3e551acad86b2b76a937db8bbf325 | cgaebel/stm-conduit | Test.hs | # LANGUAGE ScopedTypeVariables , RankNTypes , FlexibleContexts , BangPatterns #
module Main ( main ) where
import Data.List (sort)
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.QuickCheck
import Test.HUnit
... | null | https://raw.githubusercontent.com/cgaebel/stm-conduit/f8710fcc8d4bcbe479a46d9bbb21d26b58feca74/test/Test.hs | haskell | We start global resource region because we want to protect
the channel. This is not strictly required under some cases
but is needed in order to have exception safety. We need
to cleanup properly in case of exception, but it depending
on the use case it may be implemented by the other means.
We have to release re... | # LANGUAGE ScopedTypeVariables , RankNTypes , FlexibleContexts , BangPatterns #
module Main ( main ) where
import Data.List (sort)
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.QuickCheck
import Test.HUnit
... |
3a10f2c04b1adf6a5f34d3ffd2777fcc7b9af812acad4aa553bb319e51586310 | sealchain-project/sealchain | NodeInfo.hs | module Pos.Infra.Reporting.NodeInfo
( extendWithNodeInfo
, getNodeInfo
, extendRTDesc
) where
import Universum
import Data.Bits (Bits (..))
import Formatting (sformat, stext, (%))
import Network.Info (IPv4 (..), getNetworkInterfaces, ipv4)
import Serok... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/infra/src/Pos/Infra/Reporting/NodeInfo.hs | haskell | | Uses a 'Diffusion' to get a text representation of the current network
state as seen by this node. Also includes this node's external IP addresses.
FIXME whether to include IP addresses should be decided by the diffusion. | module Pos.Infra.Reporting.NodeInfo
( extendWithNodeInfo
, getNodeInfo
, extendRTDesc
) where
import Universum
import Data.Bits (Bits (..))
import Formatting (sformat, stext, (%))
import Network.Info (IPv4 (..), getNetworkInterfaces, ipv4)
import Serok... |
bf0d21cd2b0d59ee9745fe0498f98e3906caced151ebbdd802d0a09e59ee8e74 | zerg000000/realworld | init_itest.clj | (ns opinionated.init-itest
(:require [clojure.test :refer :all]
[opinionated.itest-utils :refer :all]))
(use-fixtures :once fixture-with-db-tx)
(deftest ig-test
(i :user
[:password :email :username]
["123" "" "howdy"]
["234" "" "diva"])
(is (= [#:user{:id 1 :password "123" :email "" :... | null | https://raw.githubusercontent.com/zerg000000/realworld/4465651f1aeb4559735b7756214b1717ab04aad7/test/src/opinionated/init_itest.clj | clojure | (ns opinionated.init-itest
(:require [clojure.test :refer :all]
[opinionated.itest-utils :refer :all]))
(use-fixtures :once fixture-with-db-tx)
(deftest ig-test
(i :user
[:password :email :username]
["123" "" "howdy"]
["234" "" "diva"])
(is (= [#:user{:id 1 :password "123" :email "" :... | |
7a1c1568786e4c335d3eba70d0c7221667fd2723e6125392771d6d36bda21da2 | tlaplus/tlapm | axioms.ml | SMT axioms .
Copyright ( C ) 2010 - 2013 INRIA and Microsoft Corporation
Copyright (C) 2010-2013 INRIA and Microsoft Corporation
*)
open Ext
open Format
open Fmtutil
open Tla_parser
open Property
open Expr.T
open Expr.Subst
open Proof.T
module Smt = Smtcommons
module B = Builtin
module Dq = Deque
module SS... | null | https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/src/smt/axioms.ml | ocaml | **************************************************************************
* TPTP syntax only allows identifiers [a-z][a-zA-z0-9_]*
abbrev
abbrev
**************************************************************************
| Rec _ -> SField
Only for TPTP-Fof. Disequalities and Arith are Prefix because are not sup... | SMT axioms .
Copyright ( C ) 2010 - 2013 INRIA and Microsoft Corporation
Copyright (C) 2010-2013 INRIA and Microsoft Corporation
*)
open Ext
open Format
open Fmtutil
open Tla_parser
open Property
open Expr.T
open Expr.Subst
open Proof.T
module Smt = Smtcommons
module B = Builtin
module Dq = Deque
module SS... |
35addb31a95755035af80766c5d6a7d85d559905cea909d9fef457feaa4228db | swarmpit/swarmpit | client.clj | (ns swarmpit.couchdb.client
(:require [swarmpit.http :refer :all]
[cheshire.core :refer [generate-string]]
[swarmpit.config :refer [config]]
[clojure.string :as str]))
(defn- execute
[{:keys [method api options]}]
(let [url (str (config :db-url) api)]
(execute-in-scope {:m... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/clj/swarmpit/couchdb/client.clj | clojure | Migration
Secret
Registry Dockerhub
Registry v2
Registry Azure ACR
Registry Gitlab
User
Stackfile | (ns swarmpit.couchdb.client
(:require [swarmpit.http :refer :all]
[cheshire.core :refer [generate-string]]
[swarmpit.config :refer [config]]
[clojure.string :as str]))
(defn- execute
[{:keys [method api options]}]
(let [url (str (config :db-url) api)]
(execute-in-scope {:m... |
7e0bf7e2227c5e5568835daba250da806e74cecc22bd6204fc2333b3b5a7255b | wavewave/hoodle | Undo.hs | module Hoodle.Type.Undo where
import Data.Hoodle.Zipper
( SeqZipper,
appendDropSecond,
chopFirst,
current,
moveLeft,
moveRight,
singletonSZ,
)
data UndoTable a = UndoTable
{ undo_allowednum :: Int,
undo_totalnum :: Int,
undo_zipper :: Maybe (SeqZipper a)
}
emptyUndo :: Int -> ... | null | https://raw.githubusercontent.com/wavewave/hoodle/fa7481d14a53733b2f6ae9debc95357d904a943c/core/src/Hoodle/Type/Undo.hs | haskell | FIXME: this causes undo_totalnum to be an overestimate and can
cause the oldest undo item to be dropped unnecessarily. | module Hoodle.Type.Undo where
import Data.Hoodle.Zipper
( SeqZipper,
appendDropSecond,
chopFirst,
current,
moveLeft,
moveRight,
singletonSZ,
)
data UndoTable a = UndoTable
{ undo_allowednum :: Int,
undo_totalnum :: Int,
undo_zipper :: Maybe (SeqZipper a)
}
emptyUndo :: Int -> ... |
c1c8ad96f20876c42f9b98dcac3cf70f6c8fe2711bb2552e9f57a6017622db58 | expipiplus1/vulkan | VK_EXT_host_query_reset.hs | {-# language CPP #-}
-- | = Name
--
-- VK_EXT_host_query_reset - device extension
--
-- == VK_EXT_host_query_reset
--
-- [__Name String__]
@VK_EXT_host_query_reset@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
262
--
-- [__Revision__]
1
--
-- [__Extension ... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_EXT_host_query_reset.hs | haskell | # language CPP #
| = Name
VK_EXT_host_query_reset - device extension
== VK_EXT_host_query_reset
[__Name String__]
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
- Requires @VK_KHR_get_physical_device_properties... | @VK_EXT_host_query_reset@
262
1
- Requires support for Vulkan 1.0
-
2019 - 03 - 06
- Promoted to Vulkan 1.2 Core
- , Google
- , Intel
- , NVIDIA
- , NVIDIA
= = Promotion to Vulkan 1.2
All functionality in this extension... |
52c290a4b0d2f9838b524ad7fce4f129d8a18d6603aa211ccefaaed49c31ee36 | plandes/clj-nlp-parse | sr_parse_test.clj | (ns zensols.nlparse.sr-parse-test
(:require [clojure.test :refer :all])
(:require [clojure.string :as s]
[clojure.tools.logging :as log]
[zensols.actioncli.resource :as res]
[zensols.nlparse.parse :as p]
[zensols.nlparse.config :as conf :refer (with-context)]))
(defo... | null | https://raw.githubusercontent.com/plandes/clj-nlp-parse/fa157d7683b51f54c9721a21ee1441b0b7661c07/test/zensols/nlparse/sr_parse_test.clj | clojure | satisfy test runner | (ns zensols.nlparse.sr-parse-test
(:require [clojure.test :refer :all])
(:require [clojure.string :as s]
[clojure.tools.logging :as log]
[zensols.actioncli.resource :as res]
[zensols.nlparse.parse :as p]
[zensols.nlparse.config :as conf :refer (with-context)]))
(defo... |
e0a0c38723e6ebda292290102808f39c88f37c2337b280eb608cc45f9af3a51e | runeksvendsen/bitcoin-payment-channel | Types.hs | # LANGUAGE FlexibleContexts , DeriveAnyClass #
# LANGUAGE DeriveGeneric #
module PaymentChannel.Internal.Settlement.Types
(
module PaymentChannel.Internal.Settlement.Types
, module PaymentChannel.Internal.Payment.Types
, module PaymentChannel.Internal.Settlement.Config
)
where
import PaymentChannel.Internal.Settleme... | null | https://raw.githubusercontent.com/runeksvendsen/bitcoin-payment-channel/3d2ee56c027571d1a86092c317640e5eae7adde3/src/PaymentChannel/Internal/Settlement/Types.hs | haskell | after it is checked that the lockTime has expired.
|After a settlement transaction is published, we save
certain properties from the old state object before
it's replaced with a new one. | # LANGUAGE FlexibleContexts , DeriveAnyClass #
# LANGUAGE DeriveGeneric #
module PaymentChannel.Internal.Settlement.Types
(
module PaymentChannel.Internal.Settlement.Types
, module PaymentChannel.Internal.Payment.Types
, module PaymentChannel.Internal.Settlement.Config
)
where
import PaymentChannel.Internal.Settleme... |
bb4b02478639c943a274821f33b5c9572c8cf24a4785106139bc157a3f1bc6d2 | lep/jhcr | convert.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GADTs #-}
import System.Environment
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Semigroup (Semigroup)
import Control.Monad.State
import Data.Tuple
import Data.Int
import Data.String
import Data.List hiding (singleton)
import Data.Hashable
impo... | null | https://raw.githubusercontent.com/lep/jhcr/85205582e8ac9eee8b04e52e2ba325f2cc0462ce/convert.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs # |
import System.Environment
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Semigroup (Semigroup)
import Control.Monad.State
import Data.Tuple
import Data.Int
import Data.String
import Data.List hiding (singleton)
import Data.Hashable
import Jass.Ast hiding (foldMap)
import Jass.Printer
import D... |
31ebc3620f8a491257581284d7bec9372a7e8c73423033d3b20d089ad5a0ce6f | hatashiro/line | WebhookSpec.hs | module Line.Messaging.WebhookSpec where
import Test.Hspec
import Test.Hspec.Wai
import Control.Monad.Trans.Except (runExceptT)
import Crypto.Hash.SHA256 (hmaclazy)
import Data.Either (isRight)
import Data.Text.Encoding (encodeUtf8)
import Line.Messaging.Webhook
import qualified Data.ByteString.Lazy as BL
import quali... | null | https://raw.githubusercontent.com/hatashiro/line/3b5ddb0b98e5937d86157308512c1c96cd49c86a/test/Line/Messaging/WebhookSpec.hs | haskell | module Line.Messaging.WebhookSpec where
import Test.Hspec
import Test.Hspec.Wai
import Control.Monad.Trans.Except (runExceptT)
import Crypto.Hash.SHA256 (hmaclazy)
import Data.Either (isRight)
import Data.Text.Encoding (encodeUtf8)
import Line.Messaging.Webhook
import qualified Data.ByteString.Lazy as BL
import quali... | |
22e92443d759e6e7eab00557c1d9ddb27599346e7c4ca8a1b1f2b960ac7d2587 | ahrefs/devkit | logger.ml |
open Printf
type level = [`Debug | `Info | `Warn | `Error]
type facil = { name : string; mutable show : int; }
let int_level = function
| `Debug -> 0
| `Info -> 1
| `Warn -> 2
| `Error -> 3
let set_filter facil level = facil.show <- int_level level
let get_level facil = match facil.show with
| 0 -> `Debug
... | null | https://raw.githubusercontent.com/ahrefs/devkit/559c2df8f6eacb091e0eac38f508c45b6567bdd8/logger.ml | ocaml | !
* FIXME not thread safe |
open Printf
type level = [`Debug | `Info | `Warn | `Error]
type facil = { name : string; mutable show : int; }
let int_level = function
| `Debug -> 0
| `Info -> 1
| `Warn -> 2
| `Error -> 3
let set_filter facil level = facil.show <- int_level level
let get_level facil = match facil.show with
| 0 -> `Debug
... |
87df301aa96bcdbc57f97e76cb7012cb27e7e2aa152cc5d19b0db2c010d6b158 | kloimhardt/werkbank | numsymb.clj | ;
Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
;
; This 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 ; ei... | null | https://raw.githubusercontent.com/kloimhardt/werkbank/df66274eb978d060a043b8429b29d0f36c4a2e89/src/sicmutils/numsymb.clj | clojure |
This is free software; you can redistribute it and/or modify
either version 3 of the License , or ( at
your option) any later version.
This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR... | Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(ns sicmutils.numsymb
(:require ... |
fe3c3245408d98598f63c9c0e59b70a15908d974fcf8b454422cbe5a8815d7ee | lspitzner/brittany | Test179.hs | type MySynonym a = [a]
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test179.hs | haskell | type MySynonym a = [a]
| |
f973fc42d483514e8f4c420bdb313b2cd6b1c79c3f0acce05084ab5dbefa5b63 | Eventuria/demonstration-gsd | Subscribing.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Eventuria.Libraries.PersistedStreamEngine.Instances.EventStore.Read.Subscribing where
import Control.Concurrent
import Control.Exception
import Control.Monad.IO.Class (MonadIO(liftIO))
import Data.Aeson
import ... | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/src/Eventuria/Libraries/PersistedStreamEngine/Instances/EventStore/Read/Subscribing.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Eventuria.Libraries.PersistedStreamEngine.Instances.EventStore.Read.Subscribing where
import Control.Concurrent
import Control.Exception
import Control.Monad.IO.Class (MonadIO(liftIO))
import Data.Aeson
import ... | |
b1540ac6b1944c47401784c72958c347b01387e6005bd64196300c09979c4947 | YoshikuniJujo/test_haskell | try-draw-triangle.hs | # LANGUAGE TemplateHaskell #
# , LambdaCase #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
{-# LANGUAGE PatternSynonyms, ViewPatterns #-}
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Control.Concurrent
import Foreign.C.String
import Control.Monad
import Control.Monad.Fix
import Data.Fo... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/950e82d6b30c64e3836b17764355758e77f41794/themes/gui/vulkan/try-my-vulkan/app/try-draw-triangle.hs | haskell | # LANGUAGE PatternSynonyms, ViewPatterns #
Vk.Khr.swapchainCreateInfoImageExtent = Vk.Extent2d 0 0, | # LANGUAGE TemplateHaskell #
# , LambdaCase #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Control.Concurrent
import Foreign.C.String
import Control.Monad
import Control.Monad.Fix
import Data.Foldable
import Data.Bits
import Data.Bool
import... |
d59423fedaaf43eb2b29ac3619550d735e38839fe9d8ade415ea70fe30f12870 | plexus/cljs-test-example | kaocha_hooks.clj | (ns io.github.plexus.cljs-test-example.kaocha-hooks
(:require [clojure.java.browse :as browse]
[clojure.java.shell :as sh]
[shadow.cljs.devtools.api :as shadow-api]
[shadow.cljs.devtools.server :as shadow-server]
[shadow.cljs.devtools.server.runtime :as shadow-runtime]
... | null | https://raw.githubusercontent.com/plexus/cljs-test-example/0488695655bc84602661c13086a808ab5c79e568/shadow-browser-kaocha-cljs2/src/io/github/plexus/cljs_test_example/kaocha_hooks.clj | clojure | If funnel is already running then this is a no-op
Both these calls ask Funnel if it has any clients that look like they are
the ones we would want to talk to, in particular it sends this query to Funnel:
{:lambdaisland.chui.remote? true
:working-directory (.getAbsolutePath (io/file ""))}
another client, as are... | (ns io.github.plexus.cljs-test-example.kaocha-hooks
(:require [clojure.java.browse :as browse]
[clojure.java.shell :as sh]
[shadow.cljs.devtools.api :as shadow-api]
[shadow.cljs.devtools.server :as shadow-server]
[shadow.cljs.devtools.server.runtime :as shadow-runtime]
... |
5ee285d8b31bd5232b5856a5ffa81e1cfd9d8d5850c869c90300471dfa6e90ff | morloc-project/morloc | Build.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : Morloc . ProgramBuilder . Build
Description : Manage system requirements and project building for pools
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
Module : Morloc.ProgramBuilder.Build
Description ... | null | https://raw.githubusercontent.com/morloc-project/morloc/e3c3102fa025e8241ffead21e1e77fc276f670b2/library/Morloc/ProgramBuilder/Build.hs | haskell | # LANGUAGE OverloadedStrings #
write the required file structure
execute all make commands |
|
Module : Morloc . ProgramBuilder . Build
Description : Manage system requirements and project building for pools
Copyright : ( c ) , 2021
License : GPL-3
Maintainer :
Stability : experimental
Module : Morloc.ProgramBuilder.Build
Description : Manage system requirements and pr... |
1af76839d456374ec966fd335bda894d6b93ed86b31f2c6715a1e1b2c5d861e2 | junjihashimoto/hasktorch-yolo | TrainingSpec.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FunctionalDependencies #
# LANGUAGE RecordWildCards #
# LANGUAGE NoMonomorphismRestriction #
module TrainingSpec (spec, main) where
import Control.Exception.Safe
import Control.Monad.State.Strict
import qualified Data.ByteString.Lazy as B
import ... | null | https://raw.githubusercontent.com/junjihashimoto/hasktorch-yolo/af1d2cd221d393bc52d692712ffc9fd46037f296/test/TrainingSpec.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FunctionalDependencies #
# LANGUAGE RecordWildCards #
# LANGUAGE NoMonomorphismRestriction #
module TrainingSpec (spec, main) where
import Control.Exception.Safe
import Control.Monad.State.Strict
import qualified Data.ByteString.Lazy as B
import ... | |
1db72b7ed1ba7f2f9f976b6e14f4829c55e93d3a836b93acd3f5a1a10beebf4a | nklein/FFT | utils.lisp |
(in-package #:fft)
(deftype small-double-float ()
'(double-float #.(- pi) #.pi))
(deftype length-type ()
'(and fixnum unsigned-byte))
(defvar *empty-array* (make-array '(1)
:element-type '(complex double-float)
:initial-element (complex 0.0d0 0.0d0)))
(defmacro vr-compile (form)
#+(or :abcl :clis... | null | https://raw.githubusercontent.com/nklein/FFT/5cf6132c49f3868cac4ce20284fbb6c1b4a62ba0/utils.lisp | lisp |
(in-package #:fft)
(deftype small-double-float ()
'(double-float #.(- pi) #.pi))
(deftype length-type ()
'(and fixnum unsigned-byte))
(defvar *empty-array* (make-array '(1)
:element-type '(complex double-float)
:initial-element (complex 0.0d0 0.0d0)))
(defmacro vr-compile (form)
#+(or :abcl :clis... | |
d8b1cbfff177dec4ba96a554f5e1da0208821a03ffff91c9eff9e9b3496eaa90 | vult-dsp/vult | version.ml | let version = "\nv0.4.14\n"
| null | https://raw.githubusercontent.com/vult-dsp/vult/1da022c638eccab75bc5a725b668443db606ecc4/src/version.ml | ocaml | let version = "\nv0.4.14\n"
| |
bd571576c5e297b0735425753b1ae08318739831d5a01f24d2590ef93477ce5a | masukomi/private_comments | pc.scm | #!/usr/bin/env csi -script
(import args)
(import chicken.file)
(import chicken.format)
(import chicken.io)
(import chicken.port)
(import chicken.process-context)
(import chicken.sort)
(import chicken.string)
(import chicken.syntax)
(import filepath)
(import format)
(import http-client)
(import medea)
(import message-d... | null | https://raw.githubusercontent.com/masukomi/private_comments/c34b0f82a50c430e7532d1b388b5dad845bd962a/src/pc.scm | scheme |
BEGIN HANDLING COMMAND LINE ARGUMENTS
our Usage message
BEGIN PROCESSING COMMAND LINE ARGS
have they specified the file we're dealing with?
if we're not killing it
and there is no comment
but there is a line number
if there's a comment but no line number
END VALIDATION
END PROCESSING COMMAND LINE ARGS
B... | #!/usr/bin/env csi -script
(import args)
(import chicken.file)
(import chicken.format)
(import chicken.io)
(import chicken.port)
(import chicken.process-context)
(import chicken.sort)
(import chicken.string)
(import chicken.syntax)
(import filepath)
(import format)
(import http-client)
(import medea)
(import message-d... |
69c39655c00b937236ca3f8479001c821c1e1cb8b0d324e35f978cde0693edde | 40ants/reblocks | preview.lisp | (uiop:define-package #:reblocks/preview
(:use #:cl)
(:import-from #:find-port
#:find-port)
(:import-from #:log)
(:import-from #:reblocks/app)
(:import-from #:reblocks/server)
(:import-from #:reblocks/session)
(:import-from #:trivial-open-browser
#:open-browser)
(:import-f... | null | https://raw.githubusercontent.com/40ants/reblocks/99986524e61ac90fa73e05b15d07310bbd378dea/src/preview.lisp | lisp | To prevent Reblocks from complaining
about other running server | (uiop:define-package #:reblocks/preview
(:use #:cl)
(:import-from #:find-port
#:find-port)
(:import-from #:log)
(:import-from #:reblocks/app)
(:import-from #:reblocks/server)
(:import-from #:reblocks/session)
(:import-from #:trivial-open-browser
#:open-browser)
(:import-f... |
9e0531fe2ef56e77d385dee96f05d6d09fb79ac47942a516cb8bd82bd65d8ff1 | facebookarchive/duckling_old | numbers.clj | (
; Context map
{}
"0"
"nic"
"zero"
(number 0)
"1"
"jeden"
"pojedynczy"
(number 1)
"2"
"dwa"
"para"
(number 2)
"33"
"trzydzieści trzy"
"0033"
(number 33)
"14"
"czternaście"
(number 14)
"16"
"szesnaście"
(number 16)
"17"
"siedemnaście"
(number 17)
"18"
"o... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/pl/corpus/numbers.clj | clojure | Context map | (
{}
"0"
"nic"
"zero"
(number 0)
"1"
"jeden"
"pojedynczy"
(number 1)
"2"
"dwa"
"para"
(number 2)
"33"
"trzydzieści trzy"
"0033"
(number 33)
"14"
"czternaście"
(number 14)
"16"
"szesnaście"
(number 16)
"17"
"siedemnaście"
(number 17)
"18"
"osiemnaście"
(n... |
986f8ecdd90d63653a3b70eeac671a3baeb4bb58dcf63de0ebadcc858e83acb9 | karlhof26/gimp-scheme | FU_photo_BlueSkyClouds.scm | ; FU_photo_BlueSkyClouds.scm
version 3.2 [ gimphelp.org ]
last modified / tested by
02/14/2014 on GIMP-2.8.10
15/09/2020 on GIMP-2.10.20
;
; See description on author's site:
;
;
02/14/2014 - convert to RGB if needed
;==============================================================
;
; Inst... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/60c232e4f7d925cbc433a0da46ec0bc888704368/FU_photo_BlueSkyClouds.scm | scheme | FU_photo_BlueSkyClouds.scm
See description on author's site:
==============================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows Vista/7/8)
or
or
C:\Documents and Settings\yourname\.gimp-2.8\scripts ... | version 3.2 [ gimphelp.org ]
last modified / tested by
02/14/2014 on GIMP-2.8.10
15/09/2020 on GIMP-2.10.20
02/14/2014 - convert to RGB if needed
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\.gimp-2.8\scripts
Windows XP
C:\Program Files\GIMP 2\share\gimp\2.0\sc... |
10cae0debb75b4f11ea037abb178299e65eac91df1946cadaace65c3c2c51b3e | gusenov/stepik-functional-programming-hs | Demo.hs | Пусть существуют два класса типов KnownToGork и KnownToMork , которые ( stab ) и doesEnrageGork ( doesEnrageMork ) соответственно :
class KnownToGork a where
stomp :: a -> a
doesEnrageGork :: a -> Bool
class KnownToMork a where
stab :: a -> a
doesEnrageMork :: a -> Bool
Класса типов KnownToGorkAn... | null | https://raw.githubusercontent.com/gusenov/stepik-functional-programming-hs/904164012b9b842a15d5ba3af05cfe589295fa5c/KnownToGorkAndMork/Demo.hs | haskell | Пусть существуют два класса типов KnownToGork и KnownToMork , которые ( stab ) и doesEnrageGork ( doesEnrageMork ) соответственно :
class KnownToGork a where
stomp :: a -> a
doesEnrageGork :: a -> Bool
class KnownToMork a where
stab :: a -> a
doesEnrageMork :: a -> Bool
Класса типов KnownToGorkAn... | |
8057d1e00d00947e064886c5f4d663c19171ab0b31a208f903dc3ec9ca763071 | moby/datakit | metadata.ml | module X = struct
type t = [ `Normal | `Exec | `Link ]
let t =
Irmin.Type.enum "metadata"
[ ("normal", `Normal); ("exec", `Exec); ("link", `Link) ]
end
include X
let default = `Normal
let merge = Irmin.Merge.default X.t
| null | https://raw.githubusercontent.com/moby/datakit/e047e55a2dfa3aaec02398d7d7699f4f7afd2b47/src/datakit/metadata.ml | ocaml | module X = struct
type t = [ `Normal | `Exec | `Link ]
let t =
Irmin.Type.enum "metadata"
[ ("normal", `Normal); ("exec", `Exec); ("link", `Link) ]
end
include X
let default = `Normal
let merge = Irmin.Merge.default X.t
| |
fd5900dbdc0b30ec5fe4647373f9c6b3c242cee1ec7d3ae4e1f6e251afcec67e | icfpcontest2021/icfpcontest2021.github.io | SimulatedAnnealing.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE RecordWildCards #
module BrainWall.JasperSolver.SimulatedAnnealing
( Options (..)
, defaultOptions
, run
) where
import System.Random (RandomGen, randomR)
import Debug.Trace
data Options g a = Options
{ oScore :: a -> Double
, oNeig... | null | https://raw.githubusercontent.com/icfpcontest2021/icfpcontest2021.github.io/fb23fea2a8ecec7740017d3dda78d921c1df5a26/toolchain/lib/BrainWall/JasperSolver/SimulatedAnnealing.hs | haskell | # LANGUAGE BangPatterns #
^ Restart if no improvement for n iterations | # LANGUAGE RecordWildCards #
module BrainWall.JasperSolver.SimulatedAnnealing
( Options (..)
, defaultOptions
, run
) where
import System.Random (RandomGen, randomR)
import Debug.Trace
data Options g a = Options
{ oScore :: a -> Double
, oNeighbour :: a -> g -> (a, g)
,... |
37398d126b9a6eefdee1f6da530a26e88adedb697ffa962c2b485e3a9f90b49f | mbj/stratosphere | SendingOptionsProperty.hs | module Stratosphere.SES.ConfigurationSet.SendingOptionsProperty (
SendingOptionsProperty(..), mkSendingOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
da... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/ses/gen/Stratosphere/SES/ConfigurationSet/SendingOptionsProperty.hs | haskell | module Stratosphere.SES.ConfigurationSet.SendingOptionsProperty (
SendingOptionsProperty(..), mkSendingOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
da... | |
7f85186e73e8c5b8e44d75455cfe207a3a9a39f2bf8d3cc178707c18f5979c3f | snapframework/snap | AuthManager.hs | ------------------------------------------------------------------------------
-- | Internal module exporting AuthManager implementation.
--
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE... | null | https://raw.githubusercontent.com/snapframework/snap/d63110d7b2776ccba0336a69438c84f106f60567/src/Snap/Snaplet/Auth/AuthManager.hs | haskell | ----------------------------------------------------------------------------
| Internal module exporting AuthManager implementation.
# LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
* AuthManager Datatype
* Backend Typeclass
------------------------------------------------------------... | # LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
module Snap.Snaplet.Auth.AuthManager
AuthManager(..)
, IAuthBackend(..)
* Context - free Operations
, buildAuthUser
) where
import Data.ByteString (ByteString)
import ... |
1a67ad5887e1df93df7f2fe520d96d0733377e0ae5b543863653ce51a79bf935 | quil-lang/quilc | quil-backend.lisp | ;;;; quil-backend.lisp
;;;;
Author :
(in-package #:cl-quil)
The BACKEND protocol
(defclass quil-backend (backend)
((print-circuit-definitions :initarg :print-circuit-definitions
:initform nil
:reader print-circuit-definitions))
(:documentation "A ... | null | https://raw.githubusercontent.com/quil-lang/quilc/3f3260aaa65cdde25a4f9c0027959e37ceef9d64/src/backends/quil/quil-backend.lisp | lisp | quil-backend.lisp
If we want circuit definitons, keep them. Otherwise
delete so they don't get printed.
TODO: When statistics are added to backends, we should
print them here. | Author :
(in-package #:cl-quil)
The BACKEND protocol
(defclass quil-backend (backend)
((print-circuit-definitions :initarg :print-circuit-definitions
:initform nil
:reader print-circuit-definitions))
(:documentation "A backend the emits plain old ... |
036d686404e762f47c92921d434e7a671741f7d1de0f8a7ba2669859d4aa8c1b | andrenth/ospec | spec.ml | type result = Ok | Fail of int * int | Err of int | Pending
type example =
{ mutable description : string
; result : result
}
type expectation_kind = Positive | Negative (* should or should not *)
type failure =
{ failure_id : int
; operation : string
; actual : string
; expected : ... | null | https://raw.githubusercontent.com/andrenth/ospec/94afc8ebc1013555a777389e99f5511cc92b0a48/src/spec.ml | ocaml | should or should not | type result = Ok | Fail of int * int | Err of int | Pending
type example =
{ mutable description : string
; result : result
}
type failure =
{ failure_id : int
; operation : string
; actual : string
; expected : string option
; kind : expectation_kind
}
type error =
{ e... |
ca7f0faf720fceb5f27e2ce5b8e60ec66f42138c99e6df1df3d843e6e81f0442 | fukamachi/clozure-cl | x86-error-signal.lisp | ;;; x86-trap-support
;;;
Copyright ( C ) 2005 - 2009 Clozure Associates and contributors
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
;;; file "LICENSE". The LLGPL consi... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/level-1/x86-error-signal.lisp | lisp | x86-trap-support
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
stack and the way that the kernel saves/restores rsp and rbp
before calling ... | Copyright ( C ) 2005 - 2009 Clozure Associates and contributors
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as the file " LGPL " . W... |
182ddb3d43875bc67de62185beba9fbd4759dbc6605322420289e7b11567df31 | asmyczek/simple-avro | project.clj | (defproject simple-avro "0.0.5"
:description "Clojure wrapper for Avro schema and serialization."
:url "-avro"
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
[org.apache.avro/avro "1.5.1"]]
:dev-dependencies [[lein-eclipse "1.0.0"]]
... | null | https://raw.githubusercontent.com/asmyczek/simple-avro/25825319e008316e20e9d4d867e2d88fcd389c7c/project.clj | clojure | (defproject simple-avro "0.0.5"
:description "Clojure wrapper for Avro schema and serialization."
:url "-avro"
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
[org.apache.avro/avro "1.5.1"]]
:dev-dependencies [[lein-eclipse "1.0.0"]]
... | |
ea4b494d2238ea5816562f1aadc37038f625fb6080ea391ccfc4ea337adb493e | shirok/Gauche | charset-performance.scm | ;;
;; testing mutable and immutable char-set lookup speed
;;
(use gauche.time)
(use data.random)
(use gauche.sequence)
(use scheme.list)
(use scheme.charset)
(use srfi.42)
(define *cats* '(Lu Ll Lt Lm Lo Mn Nd Nl No Po Sm Zs Cc Co))
;; Returns a map
(define (setup-char-sets)
(let1 vec (vector-tabulate (length *cat... | null | https://raw.githubusercontent.com/shirok/Gauche/e606bfe5a94b100d5807bca9c2bb95df94f60aa6/test/charset-performance.scm | scheme |
testing mutable and immutable char-set lookup speed
Returns a map
] ) ) 2000000 ) )
returns (cat <time-result-mutable> <time-result-immutable>)
((<mutable> . <immutable>) ...) |
(use gauche.time)
(use data.random)
(use gauche.sequence)
(use scheme.list)
(use scheme.charset)
(use srfi.42)
(define *cats* '(Lu Ll Lt Lm Lo Mn Nd Nl No Po Sm Zs Cc Co))
(define (setup-char-sets)
(let1 vec (vector-tabulate (length *cats*) (^_ (char-set)))
(do-ec (: c 0 #x20000)
(let1 ch (ucs->char... |
ba8eee1fa0a2cfd8249fcafa60863f0d479d498955a1a396c67911adf3ab38b1 | DomainDrivenArchitecture/dda-serverspec-crate | file.clj | Licensed to the Apache Software Foundation ( ASF ) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
; "License"); you may not... | null | https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-serverspec-crate/0a2fd8cdd54a9efc3aad9e141098c2bf01d40861/main/src/dda/pallet/dda_serverspec_crate/infra/test/file.clj | clojure | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 b... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an " AS IS " BASIS ,
(ns dda.pallet.dda-serverspec-crate.infra.test.file
(:require
[schema.core :as s]
[dda.pallet.dda-serverspec-crate.infra.... |
a87a9eabc732126c84667b9774ba00be635a8b988af12fa43a4cc2dfd4c48559 | mirage/ocaml-cohttp | make.mli | (** HTTP server. *)
module Server (Flow : Mirage_flow.S) : sig
include Cohttp_lwt.S.Server with type IO.conn = Flow.flow
val listen : t -> IO.conn -> unit Lwt.t
end
| null | https://raw.githubusercontent.com/mirage/ocaml-cohttp/524674e453c5eeb3be156e5046bc2fdaf5b50779/cohttp-mirage/src/make.mli | ocaml | * HTTP server. | module Server (Flow : Mirage_flow.S) : sig
include Cohttp_lwt.S.Server with type IO.conn = Flow.flow
val listen : t -> IO.conn -> unit Lwt.t
end
|
eb02432de852a78a302827ba3b1cf05a0725af6f69220f1f9a27032c9bbed06a | dparis/gen-phzr | emitter.cljs | (ns phzr.impl.accessors.particles.arcade.emitter)
(def emitter-get-properties
{:alive "alive"
:alpha "alpha"
:alpha-data "alphaData"
:angle "angle"
:angular-drag "angularDrag"
:area "area"
:auto-alpha "autoAlpha"
:auto-scale "autoScale"
:blend-mode "blendMode"
:bottom "bottom"
:bounce "... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/particles/arcade/emitter.cljs | clojure | (ns phzr.impl.accessors.particles.arcade.emitter)
(def emitter-get-properties
{:alive "alive"
:alpha "alpha"
:alpha-data "alphaData"
:angle "angle"
:angular-drag "angularDrag"
:area "area"
:auto-alpha "autoAlpha"
:auto-scale "autoScale"
:blend-mode "blendMode"
:bottom "bottom"
:bounce "... | |
3c38a8af686de649c870a4447f4d3bcf03339ce75557bca27cec2e3b8bfd52ca | tezos/tezos-mirror | context.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/69656b8affed3d865d7ef37d6d04191fb769cc8f/src/proto_alpha/lib_protocol/test/helpers/context.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2022 < >
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 " , WITHOU... |
4c34b19322e94a273df9b3c1a7ebea90a6d5b7623bffe6ee5da4daf051367953 | korya/efuns | equality.ml | let x = [1;2;3]
let f x = 1 :: 2 :: 3 :: x
let _ =
if x = f [] then print_string "OK " else print_string "failed! ";
if stdout <> stderr then print_string "OK" else print_string "failed!";
print_newline()
| null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/inliner/perf/Moretest/equality.ml | ocaml | let x = [1;2;3]
let f x = 1 :: 2 :: 3 :: x
let _ =
if x = f [] then print_string "OK " else print_string "failed! ";
if stdout <> stderr then print_string "OK" else print_string "failed!";
print_newline()
| |
ab024d6083615d5c5d44a89d21dd1b5656eb0c1be9e0e16f59e5cd5c8f3cec99 | fetburner/Coq2SML | auto_ind_decl.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/toplevel/auto_ind_decl.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is about the auto... |
f056821430aa5b80a16541783f9581ae855f9d08eddc3c31fdfe455cfc777d12 | AbstractMachinesLab/caramel | jsonrpc_fiber.mli | open Import
open Jsonrpc
module Notify : sig
type t =
| Stop
| Continue
end
module Reply : sig
type t
val now : Response.t -> t
val later : ((Response.t -> unit Fiber.t) -> unit Fiber.t) -> t
end
* IO free implementation of the protocol . We stay completely agnostic
of transport by only deal... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/jsonrpc-fiber/src/jsonrpc_fiber.mli | ocaml | open Import
open Jsonrpc
module Notify : sig
type t =
| Stop
| Continue
end
module Reply : sig
type t
val now : Response.t -> t
val later : ((Response.t -> unit Fiber.t) -> unit Fiber.t) -> t
end
* IO free implementation of the protocol . We stay completely agnostic
of transport by only deal... | |
70f5d9d777efe3e00a47836d35531125ec133e6447ae0da917e4b1630d4c68f4 | iu-parfunc/HSBencher | plot_scaling.hs | #!/usr/bin/env runhaskell
{-# LANGUAGE NamedFieldPuns
#-}
This script generates gnuplot plots .
Give it a .dat file as input ... ( or it will try to open results.dat )
module Main where
-- import Text.PrettyPrint.HughesPJClass
import Text.Regex
import Data.List
import Data.Maybe (mapMaybe)
import Data.Function... | null | https://raw.githubusercontent.com/iu-parfunc/HSBencher/76782b75b3a4b276c45a2c159e0b4cb6bd8a2360/analyze/plot_scaling.hs | haskell | # LANGUAGE NamedFieldPuns
#
import Text.PrettyPrint.HughesPJClass
------------------------------------------------------------------------------
Settings
------------------------------------------------------------------------------
Removes single blanks and separates lines into groups based on double blanks.
----... | #!/usr/bin/env runhaskell
This script generates gnuplot plots .
Give it a .dat file as input ... ( or it will try to open results.dat )
module Main where
import Text.Regex
import Data.List
import Data.Maybe (mapMaybe)
import Data.Function
import Control.Monad
import System.Process (system)
import System.IO
impor... |
0bd95483a6e5b21b939da12518bf6282b24b2bce40fcf72762ecc02dc74d95c2 | GillianPlatform/Gillian | visitorUtils.ml | let ( |>> ) ast_el (getter, target) =
match ast_el with
| `None -> getter target
| some -> some
let list_visitor_builder getter id =
let rec aux lst =
match lst with
| [] -> `None
| el :: r -> getter id el |>> (aux, r)
in
aux
let list_visitor_builder2 getter id =
let rec aux lst =
match ... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/1c8d65120c04ef87cda689a9d41268e25b5ffa7e/wisl/lib/utils/visitorUtils.ml | ocaml | let ( |>> ) ast_el (getter, target) =
match ast_el with
| `None -> getter target
| some -> some
let list_visitor_builder getter id =
let rec aux lst =
match lst with
| [] -> `None
| el :: r -> getter id el |>> (aux, r)
in
aux
let list_visitor_builder2 getter id =
let rec aux lst =
match ... | |
cd31c54f9df1c2901630508b1730b202d6eec6931674981cc82403830f793d44 | zjhmale/Ntha | Ntha.hs | module Ntha
( module Ntha.Core.Ast
, module Ntha.Runtime.Value
, module Ntha.Type.Type
, module Ntha.Type.TypeScope
, module Ntha.Type.Refined
, module Ntha.Runtime.Eval
, module Ntha.Type.Infer
, module Ntha.Core.Prelude
, module Ntha.Parser.Parser
) where
import Ntha.Core.Ast
... | null | https://raw.githubusercontent.com/zjhmale/Ntha/dc47fafddf67cf821c90c5cd72566de67d996238/src/Ntha.hs | haskell | module Ntha
( module Ntha.Core.Ast
, module Ntha.Runtime.Value
, module Ntha.Type.Type
, module Ntha.Type.TypeScope
, module Ntha.Type.Refined
, module Ntha.Runtime.Eval
, module Ntha.Type.Infer
, module Ntha.Core.Prelude
, module Ntha.Parser.Parser
) where
import Ntha.Core.Ast
... | |
c2ad3af0d4436809310705e6eeaa62f74f0d4eb57dd157e432eaab98a79e44a9 | juxt/hire | core.cljs | (ns ^:figwheel-hooks air-quality-app.core
(:require [reagent.dom :as rd]))
(enable-console-print!)
(defn air-quality-component
[]
[:div "Hello Juxt"])
(defn ^:after-load ^:export init
[]
(rd/render [air-quality-component]
(.getElementById js/document "app")))
| null | https://raw.githubusercontent.com/juxt/hire/a383f5135dbdf49140ac856414f3045bede38ce8/src/air_quality_app/core.cljs | clojure | (ns ^:figwheel-hooks air-quality-app.core
(:require [reagent.dom :as rd]))
(enable-console-print!)
(defn air-quality-component
[]
[:div "Hello Juxt"])
(defn ^:after-load ^:export init
[]
(rd/render [air-quality-component]
(.getElementById js/document "app")))
| |
6cce92f5daaa2ae311957fdeb26d23663fd97777aa2aa91dd3b1dd6e70c59b8b | ocaml-ppx/ocamlformat | unclosed_module2.ml | module M = struct
let x =
let foo = foo in
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/9324ea439a77b4f3a31e9302b97ce1812cf8f17d/vendor/parser-recovery/test/expect/structure/unclosed_module2.ml | ocaml | module M = struct
let x =
let foo = foo in
| |
afd454ac0df59869a3678657b6a3215156abfd56c69aee98aedd1f742d56b150 | ocaml-sf/learn-ocaml-corpus | fail.ml | let make (n : int) (x : 'a) : 'a parray =
failwith "FUBAR" (* wrong *)
let set (base : 'a parray) (i : int) (value : 'a) =
ref (Apply { base; i; value })
let get (a : 'a parray) (i : int) : 'a =
failwith "SNAFU" (* wrong *)
| null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/persistent_arrays/wrong/fail.ml | ocaml | wrong
wrong | let make (n : int) (x : 'a) : 'a parray =
let set (base : 'a parray) (i : int) (value : 'a) =
ref (Apply { base; i; value })
let get (a : 'a parray) (i : int) : 'a =
|
c6201aefde05cbb27cd22a3851fb1c9db69fc03cacfe7feb13f7dac55fb294b9 | hyperfiddle/electric | hfql2.clj | (ns geoffrey.hfql2
(:require [clojure.test :refer [is]]
[clojure.walk :as walk]
[hyperfiddle.fabric :as df]
[hyperfiddle.hfql-examples3 :as examples])
(:import hyperfiddle.View))
(def a '[{(submissions needle) [{:gender [:db/ident
{(shi... | null | https://raw.githubusercontent.com/hyperfiddle/electric/e633dc635cf84e0a2320b664ba722b696ce0067b/scratch/geoffrey/2021/hfql2.clj | clojure | --------------------------------------------------------------------------------
is not enough it returns false for Cons cells which we use later on.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
---... | (ns geoffrey.hfql2
(:require [clojure.test :refer [is]]
[clojure.walk :as walk]
[hyperfiddle.fabric :as df]
[hyperfiddle.hfql-examples3 :as examples])
(:import hyperfiddle.View))
(def a '[{(submissions needle) [{:gender [:db/ident
{(shi... |
7754d705b8d65c24566dc1c72975a8dce835fe597c3c0eb0bfbaefb313e3591d | cbaggers/cepl | continuum.lisp | ;; A continuum is a generalization of sequence.
;; Sequence implies finite steps, continuum need not have that.
;; continuum is sampled to get data at a point.
;; Can be used for curves/waves etc
;; continuum can be:
;; - function based e.g. #'sin
- sequence based with no sampler ' ( 1 2 3 4 ) essentially becomes... | null | https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/protocode/_/continuum.lisp | lisp | A continuum is a generalization of sequence.
Sequence implies finite steps, continuum need not have that.
continuum is sampled to get data at a point.
Can be used for curves/waves etc
continuum can be:
- function based e.g. #'sin
- sequence based with sampler ('(1 2 3 4) #'lerp)
actually the no sampler option i... |
- sequence based with no sampler ' ( 1 2 3 4 ) essentially becomes a square wave
#'sin
(fn~ λ(elt '(1 2 3 4) (floor _)))
(fn~ λ(lerp (elt '(1 2 3 4) (floor _))
(elt '(1 2 3 4) (1+ (floor _)))))
three parts , data , sample - transform , result transform
|
2ca01e6d5a1758ae5118e61283b77090683bb789e4c324688c013e1cbce7e88a | boot-clj/boot-cljs | middleware.clj | (ns adzerk.boot-cljs.middleware
(:require [adzerk.boot-cljs.util :as util]
[boot.file :as file]
[boot.util :as butil]
[clojure.java.io :as io]
[clojure.string :as string]))
;; helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn- main-ns-... | null | https://raw.githubusercontent.com/boot-clj/boot-cljs/9ee43c278cfd3d56699242912e3e95195f549277/src/adzerk/boot_cljs/middleware.clj | clojure | helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
middleware ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
We set out own shim ns as :main, but if user provides :main,
include that in our shim ns requires
Under :none optimizations only true and false are valid values
... | (ns adzerk.boot-cljs.middleware
(:require [adzerk.boot-cljs.util :as util]
[boot.file :as file]
[boot.util :as butil]
[clojure.java.io :as io]
[clojure.string :as string]))
(defn- main-ns-forms
"Given a namespace symbol, ns-sym, a sorted set of namespace symbols thi... |
9b15afa552a36a18a2beb13b0bc6703679db9202a13314b2429bcd64fc6517ae | MasseR/zsh-battery | Files.hs |
- Copyright ( c ) 2010 Mats >
-
- Permission is hereby granted , free of charge , to any person
- obtaining a copy of this software and associated documentation
- files ( the " Software " ) , to deal in the Software without
- restriction , including without limitation the rights to use , ... | null | https://raw.githubusercontent.com/MasseR/zsh-battery/cdec01d2149293a352c38bd873dde9e40b3fb3ac/Files.hs | haskell |
- Copyright ( c ) 2010 Mats >
-
- Permission is hereby granted , free of charge , to any person
- obtaining a copy of this software and associated documentation
- files ( the " Software " ) , to deal in the Software without
- restriction , including without limitation the rights to use , ... | |
ea97c4eab41129d0a107546140e6b25855e6a0c76310fc754a4a4241574d54b2 | programaker-project/Programaker-Core | automate_rest_api_sessions_reset_password_update.erl | %%% @doc
%%% REST endpoint to manage password reset, when finally updating.
%%% @end
-module(automate_rest_api_sessions_reset_password_update).
-export([init/2]).
-export([ allowed_methods/2
, content_types_accepted/2
, options/2
]).
-export([accept_json_modify_collection/2]).
-define(UTILS, ... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_rest_api/src/automate_rest_api_sessions_reset_password_update.erl | erlang | @doc
REST endpoint to manage password reset, when finally updating.
@end
CORS
POST |
-module(automate_rest_api_sessions_reset_password_update).
-export([init/2]).
-export([ allowed_methods/2
, content_types_accepted/2
, options/2
]).
-export([accept_json_modify_collection/2]).
-define(UTILS, automate_rest_api_utils).
-include("./records.hrl").
-record(state, { }).
-spec ini... |
993753deb6b1aee56cc0e643032a74a9b3f1f57cc999f859d590686201f4e658 | mnasoft/math | ls-gauss.lisp | ;;;; ./src/tests/ls-gauss.lisp
(in-package #:math/tests)
(def-suite ls-gauss
:description
"Мастер-набор тестов по решению СЛАУ (системы линейных
алгебраических уравнений."
:in all)
(in-suite ls-gauss)
(def-test linear-system-convert-to-triangular-test ()
"Пример использования: (test-convert-to-triangular)"... | null | https://raw.githubusercontent.com/mnasoft/math/dca9f4212c800b418aa7ed4422fbe5ac7001bf35/src/tests/ls-gauss.lisp | lisp | ./src/tests/ls-gauss.lisp |
(in-package #:math/tests)
(def-suite ls-gauss
:description
"Мастер-набор тестов по решению СЛАУ (системы линейных
алгебраических уравнений."
:in all)
(in-suite ls-gauss)
(def-test linear-system-convert-to-triangular-test ()
"Пример использования: (test-convert-to-triangular)"
(let ((m1 (make-instance
... |
ab787a3eb6a42b6924188c96e0a98cfd91bc09d254a4100ba6a7dc6bac34f87b | xapi-project/xcp-rrdd | rrdd_fist.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xcp-rrdd/f810004ae88d308043b73365a959562302b1d4b5/bin/rrdd/rrdd_fist.ml | ocaml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | |
269415420bb34ff1f648ff752da3114113fe6f7c958e0611fce33d3749b02e42 | hexlet-basics/exercises-racket | test.rkt | #lang racket
(require "../../../src/tests.rkt")
(assert-output "100")
| null | https://raw.githubusercontent.com/hexlet-basics/exercises-racket/ae3a45453584de1e5082c841178d4e43dd47e08a/modules/20-definitions/10-definitions-define/test.rkt | racket | #lang racket
(require "../../../src/tests.rkt")
(assert-output "100")
| |
dce56cfa56aa4c67cd191d17aafcba5764245e484bc5b9cdcc821f421b4a9a01 | Athens/clojure | core_test.clj | (ns clj-gh.core-test
(:require [clojure.test :refer :all]
[clj-gh.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/Athens/clojure/4cbc4c22f78a6a1afb06597a30e58e3dff27c42d/dojos/2016-06-16/team5-clj-gh/test/clj_gh/core_test.clj | clojure | (ns clj-gh.core-test
(:require [clojure.test :refer :all]
[clj-gh.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
820e8a92f952eed9c21dcf09a63bb594c66b8dd480ae4186a12015775ebdbce5 | lijunsong/fl-compiler | selection.ml | open Batteries
open Assem
let instr_list : instr list ref = ref []
let sprintf = Printf.sprintf
let nop = OP("nop", [], [], None)
let emit instr : unit =
instr_list := instr :: !instr_list
let emit_comment_exp exp : unit =
if !Debug.debug = false then
()
else
let s = Ir.exp_to_string exp
... | null | https://raw.githubusercontent.com/lijunsong/fl-compiler/6d2938855012a7a0a8767dc342f6abb454c43eec/backend/selection.ml | ocaml | * TODO
todo: asm_str can be made easy if you reverse the template string!
*/ the following describe registers
* registers to which a call replaces its results
Caveat: CALL could be external calls (like calls in runtime),
or user defined tiger function calls. Keep name as it is
here. Any mangled name... | open Batteries
open Assem
let instr_list : instr list ref = ref []
let sprintf = Printf.sprintf
let nop = OP("nop", [], [], None)
let emit instr : unit =
instr_list := instr :: !instr_list
let emit_comment_exp exp : unit =
if !Debug.debug = false then
()
else
let s = Ir.exp_to_string exp
... |
45294807ebc598ad9f0ad64f90390103dfd05af255e110eb901f4e0f981e0b5c | manuel-serrano/bigloo | src.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Read / src.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/comptime/Read/src.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* We read the source file */
*===========================... | * serrano / prgm / project / bigloo / comptime / Read / src.scm * /
* Author : * /
* Creation : Mon Dec 26 10:44:03 1994 * /
* Last change : We d Feb 10 11:16:07 2016 ( serrano ) * /
* Cop... |
32a968ed2ed48a06f46d5fe856dc1d791c7d3168a6e05a38719c498a45191a3c | aeternity/aeternity | aevm_test_utils.erl | %%%-------------------------------------------------------------------
( C ) 2017 , Aeternity Anstalt
%%% @doc Help functions for running eunit tests for aevm
%%% @end
%%%-------------------------------------------------------------------
-module(aevm_test_utils).
-export([ testcase_generate/2
, testcase_g... | null | https://raw.githubusercontent.com/aeternity/aeternity/e66a588a41d8af5f4ce8467f28258d3f2c74cd8e/apps/aevm/test/aevm_test_utils.erl | erlang | -------------------------------------------------------------------
@doc Help functions for running eunit tests for aevm
@end
-------------------------------------------------------------------
====================================================================
API functions
========================================... | ( C ) 2017 , Aeternity Anstalt
-module(aevm_test_utils).
-export([ testcase_generate/2
, testcase_generate/3
, dump_words/1
]).
-define(EUNIT_NOAUTO, true).
-include_lib("eunit/include/eunit.hrl").
-include_lib("aecontract/include/aecontract.hrl").
-include_lib("aecontract/include/hard_for... |
e50566d78843fe4a35082dd4f2eea6932426b1bccbd6d3af01b6690635600b7a | sicmutils/sicmutils | interpolate.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.rational-function.interpolate
"This namespace contains a discussion of rational function interpolation, and
different methods for fitting rational functions to `N` points and evaluating
them at some value `x`."
(:require [sicmutils.algebra.fold :as af]
... | null | https://raw.githubusercontent.com/sicmutils/sicmutils/ce763b31153eb9253f165bd5b4e4e6a6087bf730/src/sicmutils/rational_function/interpolate.cljc | clojure |
This namespace contains implementations of rational function interpolation
methods. The [ALGLib]() user
guide has a nice page on [rational function
interpolation](), which
that there are better methods. We'd love implementations of the others if you
agree!
The main method in this package is an incremental vers... | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.rational-function.interpolate
"This namespace contains a discussion of rational function interpolation, and
different methods for fitting rational functions to `N` points and evaluating
them at some value `x`."
(:require [sicmutils.algebra.fold :as af]
... |
febccc5e0bfd78cb8eebc8716ac9c7fe51de000c69b888b1d15f657b68278fe9 | facebook/duckling | NL.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 GADTs #-}
module Duckling.Rules.NL
( defaultRules
, langRules
, localeRules
) where
i... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Rules/NL.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 GADTs # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Rules.NL
( defaultRules
, langRules
, localeRules
) where
import Prelude
import Duckling.Dimensions.Types
import Duckling.Locale
import Duckling.Types
import qualified Duckling.AmountOfMoney.NL.Rules as AmountOfMoney
import qualified Duckli... |
dad22eb9da5343638ec0c1a1bca4cdb1dc3830bcffbcc06e69087a679126480c | kenkeiras/EPC | httpd_stats.erl | -module(httpd_stats).
-export([stats/3]).
statsJson() ->
io_lib:format("{\"crawled_urls\": ~w, \"indexed_images\": ~w}",
[epc_dba:get_crawled_url_count(),
epc_dba:get_indexed_image_count()]).
%% @doc Manage search petition from the HTTP daemon
stats(SessionID, _Env, _Input) ->... | null | https://raw.githubusercontent.com/kenkeiras/EPC/1e903475e1e597fd602158df45c5805a764333bf/src/httpd_stats.erl | erlang | @doc Manage search petition from the HTTP daemon | -module(httpd_stats).
-export([stats/3]).
statsJson() ->
io_lib:format("{\"crawled_urls\": ~w, \"indexed_images\": ~w}",
[epc_dba:get_crawled_url_count(),
epc_dba:get_indexed_image_count()]).
stats(SessionID, _Env, _Input) ->
mod_esi:deliver(SessionID, statsJson()).
|
211a318475d86d6b0252014d131f1f21b439cd61dfc94ac55d97caff52a11463 | flotsfacetieux/sorcery-es | elements.lisp | (in-package :sorcery-es)
(defmacro make-game-entity ((entity-manager) &body components)
`(let ((entity (make-entity ,entity-manager)))
(dolist (component (list ,@components))
(when component
(add-component ,entity-manager entity component)))
entity))
(defun store-area (id area)
(setf (gethash i... | null | https://raw.githubusercontent.com/flotsfacetieux/sorcery-es/9780a31fa2b61451d294cc23775b30098fcd3b4d/elements.lisp | lisp |
Items
Weapons
Keys
Door
lock status
unlock key type | (in-package :sorcery-es)
(defmacro make-game-entity ((entity-manager) &body components)
`(let ((entity (make-entity ,entity-manager)))
(dolist (component (list ,@components))
(when component
(add-component ,entity-manager entity component)))
entity))
(defun store-area (id area)
(setf (gethash i... |
0d03d13845b6e92ea31cde0cd02084afe624945de1e7438a476019318707d48a | input-output-hk/project-icarus-importer | Types.hs |
module Cardano.Wallet.API.V0.Types where
| null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/src/Cardano/Wallet/API/V0/Types.hs | haskell |
module Cardano.Wallet.API.V0.Types where
| |
b0e88f0ee734397d14fd7c97a7d6d0313daa167b68203f41a35692c5abe8965f | adomokos/haskell-katas | Ex48_FaFoldableSpec.hs | module Ex48_FaFoldableSpec
( spec
) where
import qualified Data.Foldable as F
import Data.Monoid
import Test.Hspec
main :: IO ()
main = hspec spec
{- ___ -}
-- Define a tree Data Type
Add implementation for F.Foldable with F.foldMap to Tree
instance where
-- Create an sample tree sructure
testTree ... | null | https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Ex48_FaFoldableSpec.hs | haskell | ___
Define a tree Data Type
Create an sample tree sructure
Create an sample tree sructure
sum
product
___
___ | module Ex48_FaFoldableSpec
( spec
) where
import qualified Data.Foldable as F
import Data.Monoid
import Test.Hspec
main :: IO ()
main = hspec spec
Add implementation for F.Foldable with F.foldMap to Tree
instance where
testTree = Node 5
( Node 3
( Node 1 Empty Empty )
... |
b99bf6a36b9eaf3c45e21b476bcb78cd2c0cd8e07e3f9a5e739fd0dd5382027c | voltone/rebar3_sbom | rebar3_sbom.erl | -module(rebar3_sbom).
-export([init/1]).
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
init(State) ->
{ok, State1} = rebar3_sbom_prv:init(State),
{ok, State1}.
| null | https://raw.githubusercontent.com/voltone/rebar3_sbom/8cee20746396b84feb36d5ef041c1513b1b648fd/src/rebar3_sbom.erl | erlang | -module(rebar3_sbom).
-export([init/1]).
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
init(State) ->
{ok, State1} = rebar3_sbom_prv:init(State),
{ok, State1}.
| |
12d8711ced9b5d9e555e7b447f901909636a6cb5d024ecf34056f506d941dfa6 | objecthub/swift-lispkit | Prolog.scm | ;;; Simple Prolog interpreter
;;;
This code is a modified version of a tiny Prolog interpreter for MacLisp , originally
written by and later modified for XLISP by . It was inspired by other
tiny Lisp - based Prologs by and . This Prolog implementation
;;; does not use any side-effects. Though it is VERY s... | null | https://raw.githubusercontent.com/objecthub/swift-lispkit/a952f80bb85e6fd084770033141ed8edd2f46500/Sources/LispKit/Resources/Examples/Prolog.scm | scheme | Simple Prolog interpreter
does not use any side-effects. Though it is VERY slow of course.
The predicates are defined in a database of clauses (see example database `clauses`
below). Function `prolog` implements a small read-eval-print loop which can be used
to make requests. `prolog` either responds with a solu... | This code is a modified version of a tiny Prolog interpreter for MacLisp , originally
written by and later modified for XLISP by . It was inspired by other
tiny Lisp - based Prologs by and . This Prolog implementation
( prolog clauses )
? - ( father )
? - ( grandparent )
G = virginia
... |
67c538dc56ff90c1bac7a5aff7c68de42ae4846f80ccc145ded366b050c98bb7 | BitGameEN/bitgamex | lib_rpc.erl | %%%-----------------------------------
%%% @Module : lib_rpc
%%% @Description: rpc库模块
%%%-----------------------------------
-module(lib_rpc).
-export([rpc/4]).
-include("common.hrl").
-include("record.hrl").
rpc(SvrType, M, F, A) ->
Server = get_svr(SvrType),
case rpc:call(Server#server.node, M,... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/lib/lib_rpc.erl | erlang | -----------------------------------
@Module : lib_rpc
@Description: rpc库模块
-----------------------------------
| -module(lib_rpc).
-export([rpc/4]).
-include("common.hrl").
-include("record.hrl").
rpc(SvrType, M, F, A) ->
Server = get_svr(SvrType),
case rpc:call(Server#server.node, M, F, A) of
{badrpc, Reason} ->
?ERR("rpc exception:~nerr_msg=~p~n", [Reason]),
throw({?ERRNO_EXC... |
cb4856140181ad38999fffc73f08b468042149d89d52321bb63199bab74cdf5d | dpiponi/Moodler | primes.hs | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_4x1.png" (x, y) (Inside plane)
lab <- label' "primes" (x-25.0, y+75.0) (Inside plane)
parent panel lab
name <- new' "primes"
inp <- plugin' (name ++ ".gate") (x-21, y) (Inside plane)
setColour in... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/primes.hs | haskell | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_4x1.png" (x, y) (Inside plane)
lab <- label' "primes" (x-25.0, y+75.0) (Inside plane)
parent panel lab
name <- new' "primes"
inp <- plugin' (name ++ ".gate") (x-21, y) (Inside plane)
setColour in... | |
f5f56e5343c9f081c7397ffefed3726f727ac10fcda616ff9c513de2c07e7788 | datacraft-dsc/starfish-clj | test_surfer.clj | (ns integration.test-surfer
(:require [starfish.core :as s]
[clojurewerkz.propertied.properties :as p]
[clojure.java.io :as io]
[clojure.test :refer [is are testing deftest run-all-tests]]))
(defn get-remote-agent
[]
(let [props (p/load-from (io/resource "squid_test.properties... | null | https://raw.githubusercontent.com/datacraft-dsc/starfish-clj/d199c0f7c96f5dd6941507556bc3070396eb3a04/src/test/clojure/integration/test_surfer.clj | clojure | (ns integration.test-surfer
(:require [starfish.core :as s]
[clojurewerkz.propertied.properties :as p]
[clojure.java.io :as io]
[clojure.test :refer [is are testing deftest run-all-tests]]))
(defn get-remote-agent
[]
(let [props (p/load-from (io/resource "squid_test.properties... | |
3a722bd8827f919870f97664e0a173eed4fe9ed3e8e9137fb6b09a9f83a41271 | input-output-hk/ouroboros-network | TraceTransformer.hs | {-# LANGUAGE NamedFieldPuns #-}
# LANGUAGE RecordWildCards #
module Network.Mux.DeltaQ.TraceTransformer
( initDeltaQTracer
, initDeltaQTracer'
) where
import Control.Concurrent.Class.MonadSTM.Strict
import Control.Tracer
import Network.Mux.DeltaQ.TraceStats
import Netwo... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/a8c9cfc8636172e519f7522fac04b5f6e476037b/network-mux/src/Network/Mux/DeltaQ/TraceTransformer.hs | haskell | # LANGUAGE NamedFieldPuns #
| Create a trace transformer that will emit
seconds (when in use). | # LANGUAGE RecordWildCards #
module Network.Mux.DeltaQ.TraceTransformer
( initDeltaQTracer
, initDeltaQTracer'
) where
import Control.Concurrent.Class.MonadSTM.Strict
import Control.Tracer
import Network.Mux.DeltaQ.TraceStats
import Network.Mux.Trace
import Net... |
f037a0d34123bf571542546157f515c197c5f4344d06c8fa187b15309f4fdbf9 | davebryson/beepbeep | login_controller.erl | %% Controls login
-module(login_controller,[Env]).
-export([handle_request/2,before_filter/0]).
%% Return the login form
handle_request("new",[]) ->
{render,"login/new.html",[]};
%% Get the post params from the form and verify
handle_request("create",[]) ->
Un = beepbeep_args:get_param("un",Env),
Pw = b... | null | https://raw.githubusercontent.com/davebryson/beepbeep/62db46d268c6cb6ad86345562b3c77f8ff070b27/example/blog/src/login_controller.erl | erlang | Controls login
Return the login form
Get the post params from the form and verify
Check if the user entered the proper Username and Password.
In this case it's hard code - foo:foobar
Set the user_id in the session and redirect
Bad username and password - redirect back to the login page
No filter used | -module(login_controller,[Env]).
-export([handle_request/2,before_filter/0]).
handle_request("new",[]) ->
{render,"login/new.html",[]};
handle_request("create",[]) ->
Un = beepbeep_args:get_param("un",Env),
Pw = beepbeep_args:get_param("pw",Env),
case Un =:= "foo" andalso Pw =:= "foobar" of
true ->... |
e5e22047952fc730da94ef6fc7138d45426eb23f9a33afa2c261ff031d500590 | magnars/what-the-emacsd | posts.clj | (ns what-the-emacsd.posts
(:require [clj-time.coerce]))
(defn- extract-date [content]
(-> (re-find #"^<!-- (\d+) -->" content) second
(str "000") Long/parseLong clj-time.coerce/from-long))
(defn- to-post [[path content]]
{:path path
:content content
:date (extract-date content)
:name (subs path 1... | null | https://raw.githubusercontent.com/magnars/what-the-emacsd/df4fc396b079e17e476336b497f4e9a38f09a977/src/what_the_emacsd/posts.clj | clojure | chop off / and .html | (ns what-the-emacsd.posts
(:require [clj-time.coerce]))
(defn- extract-date [content]
(-> (re-find #"^<!-- (\d+) -->" content) second
(str "000") Long/parseLong clj-time.coerce/from-long))
(defn- to-post [[path content]]
{:path path
:content content
:date (extract-date content)
(defn get-posts [fil... |
77db046223cd68a089286ed93fe65bfb97ab21caf00433dbc27e9b4c0f5b4809 | fpco/ide-backend | Db.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program.Db
Copyright : 2006 , 2007 - 2009
--
-- Maintainer :
-- Portability : portable
--
This provides a ' ProgramDb ' type which holds configured and not - yet
-- configured progra... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.14.0/Distribution/Simple/Program/Db.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Simple.Program.Db
Maintainer :
Portability : portable
configured programs. It is the parameter to lots of actions elsewhere in
helpers like --with-foo-args --foo-path= and extra-foo-args.
hookedProgr... | Copyright : 2006 , 2007 - 2009
This provides a ' ProgramDb ' type which holds configured and not - yet
Cabal that need to look up and run programs . If we had a Cabal monad ,
the ' ProgramDb ' would probably be a reader or state component of it .
One nice thing about using it is that any program that... |
26a5f2ecb633cb34d6c99f98032b3dfca413ddc55ec03cd52c8b2fdfe899688c | cram2/cram | gumbel2.lisp | The type 2 random number distribution
, Sun Oct 29 2006
Time - stamp : < 2010 - 01 - 17 10:23:29EST gumbel2.lisp >
;;
Copyright 2006 , 2007 , 2008 , 2009
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under th... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/random/gumbel2.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publi... | The type 2 random number distribution
, Sun Oct 29 2006
Time - stamp : < 2010 - 01 - 17 10:23:29EST gumbel2.lisp >
Copyright 2006 , 2007 , 2008 , 2009
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software ... |
5aee30bb0f135b7d7f9270d0acd54fa25a5031318fef749e6fc80e1276cf11da | composewell/streamly | Mut.hs | #include "inline.hs"
-- |
Module : Streamly . Internal . Data . Array . Mut
Copyright : ( c ) 2020 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
pinned mutable array type for ' ' types with an option to use
foreign ( non... | null | https://raw.githubusercontent.com/composewell/streamly/7263d811534b62615e8d1ad8cc14cfa49abe8081/core/src/Streamly/Internal/Data/Array/Mut.hs | haskell | |
License : BSD-3-Clause
Maintainer :
Stability : experimental
* Random access (array)
* Efficient storage (unboxed)
* Performance (unboxed access)
* Performance - in-place operations (mutable)
* Performance - GC (pinned, mutable)
* interfacing with OS (pinned)
* Fragmentation control (foreign allo... | #include "inline.hs"
Module : Streamly . Internal . Data . Array . Mut
Copyright : ( c ) 2020 Composewell Technologies
Portability : GHC
pinned mutable array type for ' ' types with an option to use
foreign ( non - GHC ) memory allocators . the following goals :
Stream and Fold APIs allow easy ... |
dfcbb9cde368bf852e5273316de522e2bbd8f4975a2009eddf4ee83739cb0cc0 | zotonic/zotonic | zotonic_listen_http_metrics.erl | @author < >
2021
%% @doc Metrics for the http listener.
Copyright 2021
%%
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/zotonic/zotonic/6b59bf25bff312721779192c105e73ff9e25e4f1/apps/zotonic_listen_http/src/zotonic_listen_http_metrics.erl | erlang | @doc Metrics for the http listener.
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... | @author < >
2021
Copyright 2021
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(zotonic_listen_http_metrics).
-export([
metrics_callback/1,
req_filter/1,
resp_headers_filter/1
]).
-spec r... |
b9b6b507f54077457c0a5b053261c090fa8ae2328222226671a69a5c7d1568ab | tisnik/clojure-examples | core.clj | ;
( C ) Copyright 2016 , 2020
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(ns async10.core
(:gen-class))
... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/async10/src/async10/core.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
chvili pockame | ( C ) Copyright 2016 , 2020
-v10.html
(ns async10.core
(:gen-class))
nacteme vsechny potrebne funkce , makra a symboly z
( schvalne se funkce , protoze by
takove , map apod . )
(require '[clojure.core.async :refer (go go-loop chan >! <! timeout sliding-buffer close!)])
(defn w... |
74f7a830a62c61cfe918557c33a0ff20a5b10fcf6c7cde4043b094bdb8e5207e | ocaml/odoc | foo.mli | type t
(**
default {!foo}
module {!module-foo}
page {!page-foo}
*)
| null | https://raw.githubusercontent.com/ocaml/odoc/890287793aa425a62626586588b7fdfc24073385/test/xref2/github_issue_917.t/foo.mli | ocaml | *
default {!foo}
module {!module-foo}
page {!page-foo}
| type t
|
5e71f47928c1aca70733e3e27b0393b0d84b769c55f561f74ac1aaf41484ea21 | number571/Haskell | frequency.hs | module Main where
qsort' :: Ord a => [a] -> [a]
qsort' [] = []
qsort' (x:xs) = qsort' [y | y <- xs, y < x] ++ [x] ++ qsort' [y | y <- xs, y >= x]
map' :: (a -> b) -> [a] -> [b]
map' _ [] = []
map' f (x:xs) = f x : map' f xs
sum' :: Num a => [a] -> a
sum' [] = 0
sum' (x:xs) = x + sum' xs
length' :: [a] -> Int
length... | null | https://raw.githubusercontent.com/number571/Haskell/7da2676c2604706d43791dc89c0ca8c9842aea48/Templates/frequency.hs | haskell | module Main where
qsort' :: Ord a => [a] -> [a]
qsort' [] = []
qsort' (x:xs) = qsort' [y | y <- xs, y < x] ++ [x] ++ qsort' [y | y <- xs, y >= x]
map' :: (a -> b) -> [a] -> [b]
map' _ [] = []
map' f (x:xs) = f x : map' f xs
sum' :: Num a => [a] -> a
sum' [] = 0
sum' (x:xs) = x + sum' xs
length' :: [a] -> Int
length... | |
194e0927ab883540c685d4f6d69858092d4ac972c8e7aacd80f03c7310cd64d0 | naveensundarg/prover | coder.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark-user -*-
;;; File: coder.lisp
The contents of this file are subject to the Mozilla Public License
;;; Version 1.1 (the "License"); you may not use this file except in
;;; compliance with the License. You may obtain a copy of the License at
;;; /
;;;
Software d... | null | https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/coder.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark-user -*-
File: coder.lisp
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific l... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is SNARK .
The Initial Developer of the Original Code is SRI International .
Portions created by the Initial Developer are Copyright ( C ) 1981 - 2012 .
... |
517c32d8e3387e9ac324159ca25dce24cba6ddcfeee477ea7c7232f33bd592e2 | scrintal/heroicons-reagent | arrows_pointing_in.cljs | (ns com.scrintal.heroicons.mini.arrows-pointing-in)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M3.28 2.22a.75.75 0 00-1.06 1.06L5.44 6.5H2.75a.75.75 0 000 1.5h4.5A.75.75 0 008 7.25v-4.5a.75.75 0 00-1.5 0v2... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/arrows_pointing_in.cljs | clojure | (ns com.scrintal.heroicons.mini.arrows-pointing-in)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M3.28 2.22a.75.75 0 00-1.06 1.06L5.44 6.5H2.75a.75.75 0 000 1.5h4.5A.75.75 0 008 7.25v-4.5a.75.75 0 00-1.5 0v2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.