_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 |
|---|---|---|---|---|---|---|---|---|
1a89f75f6f61d0e2111c98c85ce7cf3c9fb0e7304112de428c86f3ff7cd09386 | OCamlPro/socaml-analyzer | hgraph.ml | open Hgraph_types
module MakeT ( V : CloneOrderedHashedType ) ( H : CloneOrderedHashedType )
: T with type vertex = V.t
and type hedge = H.t
and module Vertex = V
and module Hedge = H =
struct
type vertex = V.t
type hedge = H.t
module Vertex = V
module Hedge = H
let print_vertex = V.p... | null | https://raw.githubusercontent.com/OCamlPro/socaml-analyzer/f39121e1d05a9e5bb6f005497eaaa5a67f256d4c/src/hgraph/hgraph.ml | ocaml | module T = T
extended_vertex are the vertex accepted as input or output of an edge
import hedge nodes in out_graph
import links for input and output vertices | open Hgraph_types
module MakeT ( V : CloneOrderedHashedType ) ( H : CloneOrderedHashedType )
: T with type vertex = V.t
and type hedge = H.t
and module Vertex = V
and module Hedge = H =
struct
type vertex = V.t
type hedge = H.t
module Vertex = V
module Hedge = H
let print_vertex = V.p... |
768a9d314d22a42161761bbaaedd96f8cf2cf90e55fadb8b8676021308213aa0 | ltoth/unison | abort.ml | Unison file synchronizer : src / abort.ml
Copyright 1999 - 2010 ,
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 optio... | null | https://raw.githubusercontent.com/ltoth/unison/e763510165e3d93c5140a4c5f2ea0dcbf5825a0c/abort.ml | ocaml | **
**
**
**
** | Unison file synchronizer : src / abort.ml
Copyright 1999 - 2010 ,
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 optio... |
70a8672fc3a1c3ae110046228ffb926f6720b68c12cdc3b3e0c0734f7395cc23 | OlivierSohn/hamazed | Color.hs | # LANGUAGE NoImplicitPrelude #
module Imj.Graphics.Color
(
* 8 - bits colors
| There are
< #Colors several types of colors we can use to draw in a terminal > .
Here , we support 8 - bit colors .
8 - bit colors have 6 * 6 * 6 = 216 rgb colors , 24 grays and are represented by
' Color8 ' .... | null | https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-base/src/Imj/Graphics/Color.hs | haskell | ** Create a single color
** Get / modify hue
** Primary colors
** Secondary colors
** Tertiary colors
** Quaternary colors
** Predefined colors | # LANGUAGE NoImplicitPrelude #
module Imj.Graphics.Color
(
* 8 - bits colors
| There are
< #Colors several types of colors we can use to draw in a terminal > .
Here , we support 8 - bit colors .
8 - bit colors have 6 * 6 * 6 = 216 rgb colors , 24 grays and are represented by
' Color8 ' .... |
b0cfa1f9db20cf57eb00053c50df309662df587ff0033d9fdd18877a40c9f5ba | anuyts/menkar | Main.hs | module Main where
import qualified Menkar.Main
main :: IO ()
main = Menkar.Main.main
| null | https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/app/Main.hs | haskell | module Main where
import qualified Menkar.Main
main :: IO ()
main = Menkar.Main.main
| |
5a873f72a113e1b73dae79711e2fa9e0338f3fd21298f6af1f3d7609d1fce81f | sneerteam/sneer | CoreLoader.clj | (ns sneer.impl.CoreLoader
(:gen-class :implements [sneer.commons.Container$ComponentLoader])
(:require sneer.admin
sneer.contacts
sneer.interfaces
sneer.flux
sneer.convos
sneer.convo-summarization
sneer.message-subs
sneer.notificati... | null | https://raw.githubusercontent.com/sneerteam/sneer/b093c46321a5a42ae9418df427dbb237489b7bcb/core/src/main/clojure/sneer/impl/CoreLoader.clj | clojure | (ns sneer.impl.CoreLoader
(:gen-class :implements [sneer.commons.Container$ComponentLoader])
(:require sneer.admin
sneer.contacts
sneer.interfaces
sneer.flux
sneer.convos
sneer.convo-summarization
sneer.message-subs
sneer.notificati... | |
16a5ed389b713ee467b537d9ff65b0f6927bf5d5b7c02549f04f76ce29df07f3 | igarnier/vplot | graph.ml | open Gg
open Vlayout
type color = Color.t
type style = Circle of float * color | Square of float * color
type initial_distribution = Sphere of float
type screen = { xres : int; yres : int; zoom : float }
type (_, _) data =
| Graph :
{ impl : ('t, 'v, 'e) Graph_sig.impl; graph : 't; screen : screen }
... | null | https://raw.githubusercontent.com/igarnier/vplot/146467257f110f71d48415fc3ddaf0f46a71035a/lib/graph.ml | ocaml | -------------------------------------------------------------------------
Rendering functions
transform and project the node on the screen
transform point to world space
transform point to camera space
project to screen
project on screen
Now draw objects. Use a false pointer array to index nodes. | open Gg
open Vlayout
type color = Color.t
type style = Circle of float * color | Square of float * color
type initial_distribution = Sphere of float
type screen = { xres : int; yres : int; zoom : float }
type (_, _) data =
| Graph :
{ impl : ('t, 'v, 'e) Graph_sig.impl; graph : 't; screen : screen }
... |
59f7657bacf52e121f8622f9ec5d255578357a73b13c5a31006c15673a81da91 | ntoronto/pict3d | group.rkt | #lang typed/racket/base
(require racket/list
racket/match
racket/unsafe/ops
racket/flonum
(prefix-in h: pfds/heap/pairing)
"../math.rkt"
"query.rkt"
"types.rkt")
(provide face-soup-group
face-soup-chunk)
(: face-soup-group (All (A B) (-> (face-s... | null | https://raw.githubusercontent.com/ntoronto/pict3d/09283c9d930c63b6a6a3f2caa43e029222091bdb/pict3d/private/soup/group.rkt | racket | Break face soup into connected components
Best-first search for splitting and connected components
Sort axes by size, decreasing
Try each axis in descending order of size | #lang typed/racket/base
(require racket/list
racket/match
racket/unsafe/ops
racket/flonum
(prefix-in h: pfds/heap/pairing)
"../math.rkt"
"query.rkt"
"types.rkt")
(provide face-soup-group
face-soup-chunk)
(: face-soup-group (All (A B) (-> (face-s... |
2b1d698ef0b0c846b380e59f467d5835f0bf6a3d34f1aa3f72e5fb017241c050 | yariv/twoorl | twitter_client.erl | Copyright ( c ) 2008 < >
%%
%% Permission is hereby granted, free of charge, to any person
%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
%% restriction, including without limitation the rights to use,
%% copy, modify, merge, publis... | null | https://raw.githubusercontent.com/yariv/twoorl/77b6bea2e29283d09a95d8db131b916e16d2960b/elib/twitter_client/twitter_client.erl | erlang |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condi... | Copyright ( c ) 2008 < >
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
@author < >
2008
... |
09e8b2b357c6c6ac85d27d65875b834689dd4bf40943746b031c025e1b70290e | fosskers/org-mode | Org.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
-- |
-- Module : Data.Org
Copyright : ( c ) , 2020 - 2021
-- License : BSD3
Maintainer : < >
--
This library parses text in the < / Emacs Org Mode > format .
--
-- Us... | null | https://raw.githubusercontent.com/fosskers/org-mode/1ec2c27014a20923213ca6ff09b0003ecb518a93/org-mode/lib/Data/Org.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveAnyClass #
|
Module : Data.Org
License : BSD3
Use the `org` function to parse a `T.Text` value.
* Types
** Top-level
** Timestamps
* Parsing
** Internal Parsers
| These are exposed for testing purposes.
* Pretty Printing
----------------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
Copyright : ( c ) , 2020 - 2021
Maintainer : < >
This library parses text in the < / Emacs Org Mode > format .
module Data.Org
OrgFile(..)
, emptyOrgFile
, OrgDoc(..)
, emptyDoc
, allDocTags
, OrgDateTime(..)
, OrgTime(..)
,... |
f1640d2fbe85ef5c678e01c65b8097faad7d2631d0eca13e5d0141073f74bfb5 | cloudant-labs/hastings | hastings_epi.erl | 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
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/cloudant-labs/hastings/a69ce0991134cf0e7c3889c35b8d4edb2ad89d14/src/hastings_epi.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(hastings_epi).
-behaviour(couch_epi_plugin).
-export([
app/0,
providers/0,
services/0,
data_subscriptions/0,
data_providers/0,... |
0bdb743c486fb17a49aa5253e736dd05d82abed7d2a53a9fbc1c19515b006378 | metanivek/irmin-ipfs | store.ml | module Object_storage =
functor
(Key : Irmin.Type.S)
(Value : Irmin.Type.S)
->
struct
(** Types *)
type t = unit
* [ t ] is [ unit ] because we read / write directly with IPFS .
type key = Key.t
type value = Value.t
(** Initialisation / Closing *)
let v _config = Lwt.return_unit
... | null | https://raw.githubusercontent.com/metanivek/irmin-ipfs/80c8704f1cefa1cc304b416e122f9453764c8064/src/store.ml | ocaml | * Types
* Initialisation / Closing
* Operations
* Types
* Internal map handling
* Initialisation / Closing
* Operations
Use [String_v2] to avoid "prehash prefixing". | module Object_storage =
functor
(Key : Irmin.Type.S)
(Value : Irmin.Type.S)
->
struct
type t = unit
* [ t ] is [ unit ] because we read / write directly with IPFS .
type key = Key.t
type value = Value.t
let v _config = Lwt.return_unit
let close _t = Lwt.return_unit
let set t key va... |
f8835af902c48f8b537fc4280ce5986dbc9da64c2271525b9db70e297f70b396 | patrikja/AFPcourse | Types.hs | module Types where
import qualified Prelude
import Prelude hiding ((>>=),return)
import Data.Monoid
class Monad1 m where
return1 :: a -> m a
bind1 :: m a -> (a -> m b) -> m b
class Functor m => Monad2 m where
return :: a -> m a
join :: m (m a) -> m a
-- a)
bind2 :: Monad2 m => m a -> (a -> m... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/exam/2014-03/Types.hs | haskell | a)
b)
c)
d)
planted bug | module Types where
import qualified Prelude
import Prelude hiding ((>>=),return)
import Data.Monoid
class Monad1 m where
return1 :: a -> m a
bind1 :: m a -> (a -> m b) -> m b
class Functor m => Monad2 m where
return :: a -> m a
join :: m (m a) -> m a
bind2 :: Monad2 m => m a -> (a -> m b) ->... |
ffd840c0b4e5a51fca8f3577d56a9d7fffe8cda3da3908daf37728ad75a005d7 | alpmestan/servant | BaseUrlSpec.hs | # OPTIONS_GHC -fno - warn - orphans #
module Servant.Common.BaseUrlSpec where
import Control.Applicative
import Control.DeepSeq
import Test.Hspec
import Test.QuickCheck
import Servant.Common.BaseUrl
spec :: Spec
spec = do
describe "showBaseUrl" $ do
it "shows a BaseUrl" $ do
showBaseUrl (BaseUrl Http "fo... | null | https://raw.githubusercontent.com/alpmestan/servant/d67b5e1f3e9af4b249f95ed72dcaebc4ce328a96/servant-client/test/Servant/Common/BaseUrlSpec.hs | haskell | this does not perfectly mirror the url standard, but I hope it's good
enough. | # OPTIONS_GHC -fno - warn - orphans #
module Servant.Common.BaseUrlSpec where
import Control.Applicative
import Control.DeepSeq
import Test.Hspec
import Test.QuickCheck
import Servant.Common.BaseUrl
spec :: Spec
spec = do
describe "showBaseUrl" $ do
it "shows a BaseUrl" $ do
showBaseUrl (BaseUrl Http "fo... |
6400fdfad6a811992c77e4d4fc91450f4f1d220bf493f077f78171b3958e0938 | metametadata/carry | ui.cljs | (ns app.home.ui
(:require [carry-reagent.core :as carry-reagent]))
(defn view-model
[model]
(carry-reagent/track-keys model [:clicks]))
(defn view
[clicks dispatch]
[:div
[:div>button {:on-click #(dispatch :app.home.signals/on-click)} (str "Click me (" @clicks ")")]
[:div>button {:on-click #(dispatch ... | null | https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/examples/blueprint-splitting-multimethods-core-match/src/app/home/ui.cljs | clojure | (ns app.home.ui
(:require [carry-reagent.core :as carry-reagent]))
(defn view-model
[model]
(carry-reagent/track-keys model [:clicks]))
(defn view
[clicks dispatch]
[:div
[:div>button {:on-click #(dispatch :app.home.signals/on-click)} (str "Click me (" @clicks ")")]
[:div>button {:on-click #(dispatch ... | |
399c3921429d2e14a7874667de20badbeb72011c4f166e499eca43f97879356f | mk270/archipelago | light.mli |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | null | https://raw.githubusercontent.com/mk270/archipelago/4241bdc994da6d846637bcc079051405ee905c9b/src/model/light.mli | ocaml |
Archipelago , a multi - user dungeon ( MUD ) server , by ( C ) 2009 - 2012
This programme is free software ; you may redistribute and/or modify
it under the terms of the GNU Affero General Public Licence as published by
the Free Software Foundation , either version 3 of said Licence , or
( ... | |
81e42c4cf6942b18ae09520309f278175dfda01cd9be30f9cd5f0a34d33b813d | lixiangqi/medic | src4-medic.rkt | #lang medic
(layer layer1
(in #:module "src4.rkt"
(with-behavior f @{f: sum of @x squared and @y squared is @ret2 #:renamed ret ret2 })
[on-exit (log (f 3 4))
(log (f 4 5))])) | null | https://raw.githubusercontent.com/lixiangqi/medic/0920090d3c77d6873b8481841622a5f2d13a732c/demos/demo4/src4-medic.rkt | racket | #lang medic
(layer layer1
(in #:module "src4.rkt"
(with-behavior f @{f: sum of @x squared and @y squared is @ret2 #:renamed ret ret2 })
[on-exit (log (f 3 4))
(log (f 4 5))])) | |
26e20872b2c09487aad18a91cd2d01f65390c14e0dd488b653075a4d52c4c77a | jumarko/clojure-experiments | rule_30.clj | # Rule 30 🕹
;; Let's explore cellular automata in a Clerk Notebook. We start by requiring the custom viewers.
(ns whatever.rule-30
(:require [nextjournal.clerk :as clerk]))
(def viewers
[{:pred number?
:render-fn '#(v/html [:div.inline-block {:style {:width 16 :height 16}
... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/a87098fe69044ad65813a68cb870d824c2c2d18f/src/clojure_experiments/visualizations/clerk/notebooks/rule_30.clj | clojure | Let's explore cellular automata in a Clerk Notebook. We start by requiring the custom viewers.
Finally, we can evolve the board. | # Rule 30 🕹
(ns whatever.rule-30
(:require [nextjournal.clerk :as clerk]))
(def viewers
[{:pred number?
:render-fn '#(v/html [:div.inline-block {:style {:width 16 :height 16}
:class (if (pos? %) "bg-black" "bg-white border-solid border-2 border-black")}])}
{:p... |
3017f658e8dc110d24ac8b090d0f0abb7c2375d779935c83bf9ac77f19a5ebfb | zaneli/hdbc-clickhouse | Exception.hs | module Database.HDBC.ClickHouse.Exception where
import Control.Exception
import Data.Word
import qualified Data.ByteString as B
data ClickHouseException = ServerException {
code :: Int,
name :: String,
message :: String,
stackTrace :: String,
nested :: Maybe ClickHouseException
} | ClientException {
mess... | null | https://raw.githubusercontent.com/zaneli/hdbc-clickhouse/bf2ea2583ba5de63b943e95f597f17ac336920d8/src/Database/HDBC/ClickHouse/Exception.hs | haskell | module Database.HDBC.ClickHouse.Exception where
import Control.Exception
import Data.Word
import qualified Data.ByteString as B
data ClickHouseException = ServerException {
code :: Int,
name :: String,
message :: String,
stackTrace :: String,
nested :: Maybe ClickHouseException
} | ClientException {
mess... | |
f0f1da317b901ae8afedff24ad884f307beb6fbb0ebe44a9e0e167fc8503de0f | archimag/cliki2 | view.lisp | ;;;; render.lisp
(in-package #:cliki2)
(defgeneric apply-template (drawer template &rest args &key &allow-other-keys))
(defgeneric render-key-data (drawer pagetype &rest args &key &allow-other-keys))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; drawer
;;;;... | null | https://raw.githubusercontent.com/archimag/cliki2/f0b6910f040907c70fd842ed76472af2d645c984/src/view.lisp | lisp | render.lisp
drawer
article
key data
edit-article-page
article-not-found
article-preview-page
article-history-page
revisions-diff-page
article-revision-page
login
register
register-sendmail-page
confirm-registration
person
edit-person-page
preview-person-page
recent-changes-page
search-page
forbidd... |
(in-package #:cliki2)
(defgeneric apply-template (drawer template &rest args &key &allow-other-keys))
(defgeneric render-key-data (drawer pagetype &rest args &key &allow-other-keys))
(defclass drawer () ())
(defmethod apply-template ((drawer drawer) template &rest args &key &allow-other-keys)
(funcall template
... |
e66271090396d6d1ad47c30573771528f713d23e106f3fff3461dfcf2e861192 | incoherentsoftware/defect-process | Util.hs | module Console.Util
( setControlsInputAliasConsole
, setGraphicsResolutionConsole
, setGraphicsWindowModeConsole
, updateRenderConfigWinDisplayIndexConsole
, setSoundVolumeConsole
, setMusicVolumeConsole
, setEnemyHealthConsole
, setPauseMenuHintsConsole
, setBattleMusicConsole
,... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/7f300ab0b76ddd634b4f6f53076185614fd8a14f/src/Console/Util.hs | haskell | clear input alias bindings
add input alias binding | module Console.Util
( setControlsInputAliasConsole
, setGraphicsResolutionConsole
, setGraphicsWindowModeConsole
, updateRenderConfigWinDisplayIndexConsole
, setSoundVolumeConsole
, setMusicVolumeConsole
, setEnemyHealthConsole
, setPauseMenuHintsConsole
, setBattleMusicConsole
,... |
60eb06a14b1341d80ec2c99b257ca7a5ccd744e59009dc0cb93bef8c0910b2e4 | redplanetlabs/specter | zipper.cljc | (ns com.rpl.specter.zipper
#?(:cljs (:require-macros
[com.rpl.specter
:refer [defnav nav declarepath providepath recursive-path]]))
#?(:clj
(:use
[com.rpl.specter :only [defnav nav declarepath providepath
recursive-path]]))
(:require [com... | null | https://raw.githubusercontent.com/redplanetlabs/specter/e8225f0e5883746c2fd17612c42334ccda6cc73d/src/clj/com/rpl/specter/zipper.cljc | clojure | (multi-path RIGHT LEFT) will not navigate to the right and left
of the currently navigated element because locations aren't stable
like they are for maps/graphs. The path following RIGHT could
insert lots of elements all over the sequence, and there's no
way to determine how to get "back". | (ns com.rpl.specter.zipper
#?(:cljs (:require-macros
[com.rpl.specter
:refer [defnav nav declarepath providepath recursive-path]]))
#?(:clj
(:use
[com.rpl.specter :only [defnav nav declarepath providepath
recursive-path]]))
(:require [com... |
116e331f8bf02ee26ef9038379d6602d73f06afb193f122e3abca59ff3d9240f | samply/blaze | codec_test.clj | (ns blaze.page-store.cassandra.codec-test
(:require
[blaze.page-store.cassandra.codec :as codec]
[blaze.spec]
[blaze.test-util :as tu :refer [satisfies-prop]]
[clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as st]
[clojure.test :as test :refer [deftest]]
[clojure.test.check.properties... | null | https://raw.githubusercontent.com/samply/blaze/6441a0a2f988b8784ed555c1d20f634ef2df7e4a/modules/page-store-cassandra/test/blaze/page_store/cassandra/codec_test.clj | clojure | (ns blaze.page-store.cassandra.codec-test
(:require
[blaze.page-store.cassandra.codec :as codec]
[blaze.spec]
[blaze.test-util :as tu :refer [satisfies-prop]]
[clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as st]
[clojure.test :as test :refer [deftest]]
[clojure.test.check.properties... | |
35f5ad419f32b9470c3cff3a339c082cbd5fba936183ed0eaf7e3cc138c862cd | skinkade/uniformity | random.cljc | (ns uniformity.random
(:require [clojure.set :refer [intersection]]
[clojure.string :as string]
[uniformity.internals.validation :refer [compat-count]]
[uniformity.util :as util]
#?(:clj [uniformity.internals.java.rand :as internals]
:cljs [uniformity.int... | null | https://raw.githubusercontent.com/skinkade/uniformity/e9d007a7be833e70b4358c02700fd81866de775a/src/uniformity/random.cljc | clojure | (ns uniformity.random
(:require [clojure.set :refer [intersection]]
[clojure.string :as string]
[uniformity.internals.validation :refer [compat-count]]
[uniformity.util :as util]
#?(:clj [uniformity.internals.java.rand :as internals]
:cljs [uniformity.int... | |
6d046173eff7d7caeca8f03315f1e80c2bbc630a735757eb2e3c2ba24d689138 | spurious/sagittarius-scheme-mirror | %3a10.scm | (import (rnrs)
(crypto)
(rsa pkcs :10)
(clos user)
(rfc pem)
(asn.1)
(srfi :64))
(test-begin "PKCS 10")
(let ()
(define key-pem
"-----BEGIN PUBLIC KEY-----
MIIBHzANBgkqhkiG9w0BAQEFAAOCAQwAMIIBBwKBgQMwO3kPsUnaNAbUlaubn7ip
4pNEXjvUOxjvLwUhtybr6Ng4undLtSQPCPf7ygoUKh1KYeqXMpTmhKjRos3xioTy
23CZuOl3WIsLiRKSVYyq... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/rsa/pkcs/%253a10.scm | scheme | (import (rnrs)
(crypto)
(rsa pkcs :10)
(clos user)
(rfc pem)
(asn.1)
(srfi :64))
(test-begin "PKCS 10")
(let ()
(define key-pem
"-----BEGIN PUBLIC KEY-----
MIIBHzANBgkqhkiG9w0BAQEFAAOCAQwAMIIBBwKBgQMwO3kPsUnaNAbUlaubn7ip
4pNEXjvUOxjvLwUhtybr6Ng4undLtSQPCPf7ygoUKh1KYeqXMpTmhKjRos3xioTy
23CZuOl3WIsLiRKSVYyq... | |
0b03c68d689796ed5f834139f3f9d4a42a4e91bc9a4523dcfcefd02708056a7a | janestreet/memtrace_viewer_with_deps | start_app.ml | open! Core_kernel
open Virtual_dom
open Async_kernel
open Js_of_ocaml
let timer_start s ~debug = if debug then Firebug.console##time (Js.string s)
let timer_stop s ~debug = if debug then Firebug.console##timeEnd (Js.string s)
module Request_ids : sig
type t
val create : unit -> t
val set_once_exn
: t
... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/incr_dom/src/start_app.ml | ocaml | This should not happen, but let's be defensive.
We capture the current context to use it later when handling callbacks from
requestAnimationFrame, since exceptions raised to that would otherwise not go through
our ordinary Async monitor.
* The Js_of_ocaml type Dom_html.element doesn't have the correct opt... | open! Core_kernel
open Virtual_dom
open Async_kernel
open Js_of_ocaml
let timer_start s ~debug = if debug then Firebug.console##time (Js.string s)
let timer_stop s ~debug = if debug then Firebug.console##timeEnd (Js.string s)
module Request_ids : sig
type t
val create : unit -> t
val set_once_exn
: t
... |
3c51386293ab66e51a7e95a6393fd1b4160e8df19bae0d131edd9c6cc0e12b56 | ocaml/dune | flock_tests.ml | open Stdune
module Flock = Dune_util.Flock
let%expect_test "blocking lock" =
let fd = Unix.openfile "tlc1" [ Unix.O_CREAT ] 0o777 in
let lock = Flock.create fd in
print_endline "acquiring lock";
(match Flock.lock_block lock Exclusive with
| Ok () -> print_endline "acquired lock"
| Error _ -> assert false);... | null | https://raw.githubusercontent.com/ocaml/dune/f6bb45ac4d2f47ce41a349a58c93532cd9cd535e/test/expect-tests/dune_util/flock_tests.ml | ocaml | open Stdune
module Flock = Dune_util.Flock
let%expect_test "blocking lock" =
let fd = Unix.openfile "tlc1" [ Unix.O_CREAT ] 0o777 in
let lock = Flock.create fd in
print_endline "acquiring lock";
(match Flock.lock_block lock Exclusive with
| Ok () -> print_endline "acquired lock"
| Error _ -> assert false);... | |
15cc1cf9708e75773a667f3097fb5a99aa5993e59ddd8fd95d27e551d82badd0 | TerrorJack/ghc-alter | OldList.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables , MagicHash #
-----------------------------------------------------------------------------
-- |
-- Module : Data.List
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Data/OldList.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.List
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
---------------------------------------------------------------------------
* Basi... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables , MagicHash #
Copyright : ( c ) The University of Glasgow 2001
Operations on lists .
module Data.OldList
(
(++)
, head
, last
, tail
, init
, uncons
, null
, length
, map
, reverse
, int... |
592b26ea156ed6c50ce2104d13c01e04d66386bca6226aaa38f91a087795ef3b | erlangonrails/devdb | kai_memcache_SUITE.erl | 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
distributed under the License is distributed on an ... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/kai-0.4.0/test/kai_memcache_SUITE.erl | erlang | the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
wait for starting kai_memcache
{ok, Buckets ... | 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
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(kai_memcache_SUITE).
-compile(export_all).
-include("ct.hrl").
-... |
b1e365fa65c07232f577ac70174d79550ec76f4182866bed4a6dba38a4ddb569 | revelytix/carbonite | project.clj | (def shared
'[[com.googlecode/kryo "1.04"]])
(defproject carbonite "1.0.0-SNAPSHOT"
:description "Write Clojure data to and from bytes using Kryo."
:warn-on-reflection true
:dev-dependencies [[lein-multi "1.1.0-SNAPSHOT"]]
:dependencies ~(conj shared '[org.clojure/clojure "1.3.0"])
:multi-deps {"1.2" ~(con... | null | https://raw.githubusercontent.com/revelytix/carbonite/c0199e4f82c16d1681638336c226ffe26b50852a/project.clj | clojure | (def shared
'[[com.googlecode/kryo "1.04"]])
(defproject carbonite "1.0.0-SNAPSHOT"
:description "Write Clojure data to and from bytes using Kryo."
:warn-on-reflection true
:dev-dependencies [[lein-multi "1.1.0-SNAPSHOT"]]
:dependencies ~(conj shared '[org.clojure/clojure "1.3.0"])
:multi-deps {"1.2" ~(con... | |
6a334d8b243e4d0160c3ac535a86912b3b710b6d1f663d508289ecbf55c2c717 | tip-org/tools | Pipeline.hs | # LANGUAGE ScopedTypeVariables #
module Tip.Pass.Pipeline where
import Tip.Lint
import Tip.Types (Theory)
import Tip.Utils
import Tip.Fresh
import Data.List (intercalate)
import Control.Monad ((>=>))
import Data.Monoid ((<>))
import Options.Applicative
class Pass p where
runPass :: Name a => p -> Theory a -> ... | null | https://raw.githubusercontent.com/tip-org/tools/34350072587bd29157d18331eb895a1b2819555f/tip-lib/src/Tip/Pass/Pipeline.hs | haskell | | 'either' for 'Choice' | # LANGUAGE ScopedTypeVariables #
module Tip.Pass.Pipeline where
import Tip.Lint
import Tip.Types (Theory)
import Tip.Utils
import Tip.Fresh
import Data.List (intercalate)
import Control.Monad ((>=>))
import Data.Monoid ((<>))
import Options.Applicative
class Pass p where
runPass :: Name a => p -> Theory a -> ... |
129141fea43021b2107763c9f45bbd830438eab10933be11792e9baa43387c89 | RyanGlScott/text-show | RankNTypesSpec.hs | |
Module : Spec . Derived . RankNTypesSpec
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
@hspec@ tests for data types with rank - n voodoo .
Module: Spec.Derived.RankNTypesSpec
Copyright: ... | null | https://raw.githubusercontent.com/RyanGlScott/text-show/5ea297d0c7ae2d043f000c791cc12ac53f469944/tests/Spec/Derived/RankNTypesSpec.hs | haskell | |
Module : Spec . Derived . RankNTypesSpec
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
@hspec@ tests for data types with rank - n voodoo .
Module: Spec.Derived.RankNTypesSpec
Copyright: ... | |
5fb14a8ca94aa542af2de99b8720b7bd3f5240b23911c14b026ba517cb0dc52d | blak3mill3r/noah | core_test.clj | (ns noah.core-test
"The obligatory word-count"
(:require
[clojure.test :as t :refer [deftest is]]
[noah.core :as n]
[noah.test-utils :as tu :refer [topology-test-driver record-factory *topic* output-topic-seq]]
[clojure.string :as str]
[noah.fn-wrap :as fn-wrap]))
(defn topology []
(let [b (n/stre... | null | https://raw.githubusercontent.com/blak3mill3r/noah/b81081c3b4b1e4cd7914c7863c90b6d68810717b/test/noah/core_test.clj | clojure | (ns noah.core-test
"The obligatory word-count"
(:require
[clojure.test :as t :refer [deftest is]]
[noah.core :as n]
[noah.test-utils :as tu :refer [topology-test-driver record-factory *topic* output-topic-seq]]
[clojure.string :as str]
[noah.fn-wrap :as fn-wrap]))
(defn topology []
(let [b (n/stre... | |
042913dfbe7a395c4949ecce1fdd842e67f30bc0a81913ef134660fe7c990a31 | nbeloglazov/blog-projects | cljsbin.clj | (ns cljsbin
(:require [compojure.core :refer [defroutes GET POST]]
[compojure.route :refer [files]]
[ring.middleware.json :as json]
[ring.adapter.jetty :refer [run-jetty]]
[ring.util.response :as resp]
[hiccup.page :refer [html5]]
[cljs.closure :... | null | https://raw.githubusercontent.com/nbeloglazov/blog-projects/51fce76b8cf7ca208a2f7e87dcff73795c537471/cljsbin/src/cljsbin.clj | clojure | It is used to speed up compilation: clojurescript compiler stores
intermediate results there, like translated to js cljs.core and
clojure.* namespaces. The directory is optional.
input/outputs so we create temp files for the source
and compiled output
Write source into the temp file.
Compile source using :simple... | (ns cljsbin
(:require [compojure.core :refer [defroutes GET POST]]
[compojure.route :refer [files]]
[ring.middleware.json :as json]
[ring.adapter.jetty :refer [run-jetty]]
[ring.util.response :as resp]
[hiccup.page :refer [html5]]
[cljs.closure :... |
54abf62b479130b5c0db707b81fe5879183ea3f6388a27deb7fa385227a778a3 | gas2serra/mcclim-desktop | pkg-doc-config.lisp | (in-package :desktop-user)
(setf (application-entry-fn *application*)
#'(lambda (app &rest args)
(declare (ignore app args))
(clim-pkg-doc:pkg-doc)))
| null | https://raw.githubusercontent.com/gas2serra/mcclim-desktop/f85d19c57d76322ae3c05f98ae43bfc8c0d0a554/dot-mcclim-desktop/config/pkg-doc-config.lisp | lisp | (in-package :desktop-user)
(setf (application-entry-fn *application*)
#'(lambda (app &rest args)
(declare (ignore app args))
(clim-pkg-doc:pkg-doc)))
| |
30097d41cdfe960a2db58b8b7fbb2b34bf0cb4bbb85e219d0d486b76ac807d6e | hemmi/coq2scala | autoinstance.ml | (************************************************************************)
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/toplevel/autoinstance.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
s
* Automatic detection of (som... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Printer
open Nam... |
5b42ac94be2fa08c49649b986d4ae2887e0a6f92ea3d52bd5ad2c7fbc7c5b696 | thephoeron/quipper-language | SmithReduction.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
-- | This module provides functions for reducing ... | null | https://raw.githubusercontent.com/thephoeron/quipper-language/15e555343a15c07b9aa97aced1ada22414f04af6/Algorithms/CL/SmithReduction.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
| This module provides functions for reducing (non-square) matrices
(more generally, matrices over any principal ideal domain)
m... | This file is part of Quipper . Copyright ( C ) 2011 - 2014 . Please see the
towards Smith Normal Form , and hence for computing the structure of
finitely - presented Abelian groups .
The SNF transformation is similar to Gaussian elimination , but over integer matrices ,
For background on how this is used to ... |
99a15b85a64025201f4198c82bc34070632acd7d3ff3e57e6e601f653fe0b06c | mauricioszabo/paprika | collection.cljc | (ns paprika.collection
(:require [clojure.core.reducers :as reducers]))
(defn map-kv [f clj-map]
(->> clj-map
(map (fn [[k v]] (f k v)))
(into {})))
(defn map-keys [f clj-map]
(map-kv #(vector (f %1) %2) clj-map))
(defn map-values [f clj-map]
(map-kv #(vector %1 (f %2)) clj-map))
(defn update-... | null | https://raw.githubusercontent.com/mauricioszabo/paprika/b1923abb581ab12ce00971fa4e184c0974602ef9/src/paprika/collection.cljc | clojure | (ns paprika.collection
(:require [clojure.core.reducers :as reducers]))
(defn map-kv [f clj-map]
(->> clj-map
(map (fn [[k v]] (f k v)))
(into {})))
(defn map-keys [f clj-map]
(map-kv #(vector (f %1) %2) clj-map))
(defn map-values [f clj-map]
(map-kv #(vector %1 (f %2)) clj-map))
(defn update-... | |
bf60d5cc1b79c5f21fa1a90efb781f250b5c52a6462c1c56e33b1a6c353879a3 | Holmusk/elm-street | Compat.hs | # LANGUAGE CPP #
module Internal.Prettyprinter.Compat (module PP) where
#if MIN_VERSION_prettyprinter(1,7,0)
import Prettyprinter as PP
#else
import Data.Text.Prettyprint.Doc as PP
#endif
| null | https://raw.githubusercontent.com/Holmusk/elm-street/dfe0e4125591e93a297c1771918307dc93784710/src/Internal/Prettyprinter/Compat.hs | haskell | # LANGUAGE CPP #
module Internal.Prettyprinter.Compat (module PP) where
#if MIN_VERSION_prettyprinter(1,7,0)
import Prettyprinter as PP
#else
import Data.Text.Prettyprint.Doc as PP
#endif
| |
e5376218a49ec8679ec20bc3d804614d7b05a6fe4b4a3e4860aec888e8b92de5 | stylewarning/deprecated-coalton-prototype | impl-debug-routines.lisp | ;;;; impl-debug-routines.lisp
(in-package #:coalton-impl)
;;; This file has some general debug and introspection routines that
;;; are useful for development, but are not needed or a part of the
;;; functionality of the system.
(defun print-value-db (&key (symbol-table **global-value-definitions**)
... | null | https://raw.githubusercontent.com/stylewarning/deprecated-coalton-prototype/4a42ffb4222fde3abfd1b50d96e455ff2eef9fe8/src/impl-debug-routines.lisp | lisp | impl-debug-routines.lisp
This file has some general debug and introspection routines that
are useful for development, but are not needed or a part of the
functionality of the system.
Print package prefixes.
Print package prefixes. |
(in-package #:coalton-impl)
(defun print-value-db (&key (symbol-table **global-value-definitions**)
(stream *standard-output*))
(let ((*package* (find-package "KEYWORD"))
(*print-pretty* nil))
(maphash (lambda (sym entry)
(format stream "~A (package: ~A)~% ... |
36e05b62a228c0fa8068db0a99c1d8f52df3968a7827bd74ea7339c28b69f9f3 | jgrodziski/keycloak-clojure | server.clj | (ns myapp.backend.server
(:require
[myapp.backend.keycloak :as keycloak]
[taoensso.timbre :as timbre]
[hiccup.page :refer [html5]]
[mount.core :as mount :refer [defstate]]
[aleph.middleware.session :refer [wrap-session]]
[yada.security :refer [verify]]
[yada.cookies :refer [parse-cookies]]
[ya... | null | https://raw.githubusercontent.com/jgrodziski/keycloak-clojure/b811fe4f3e5b0d5cea7b1ce0aba7825b447b7696/sample/yada-backend/src/myapp/backend/server.clj | clojure | Ensure the client is accessing the restricted part only if the token is correct
["keycloak-callback (resource )"] | (ns myapp.backend.server
(:require
[myapp.backend.keycloak :as keycloak]
[taoensso.timbre :as timbre]
[hiccup.page :refer [html5]]
[mount.core :as mount :refer [defstate]]
[aleph.middleware.session :refer [wrap-session]]
[yada.security :refer [verify]]
[yada.cookies :refer [parse-cookies]]
[ya... |
9aa067799234d1a0706fa9ca4d06650eeb001960dfdced56832fbebb4c62b51e | err0r500/realworld-app-simple-haskell | HasqlSpec.hs | module Storage.HasqlSpec where
import qualified Domain.User as D
import RIO
import qualified Storage.Lib as Lib
import qualified Storage.Specs.User as UserRepo
import Test.Hspec
import qualified TestContainers.Hspec as TC
import qualified Usecase.Interactor as UC
import Utils
spec :: Spec
spec =
aroundAll (TC.withC... | null | https://raw.githubusercontent.com/err0r500/realworld-app-simple-haskell/e499fd2eb03f6bcde5ac99a136d1907700cf026d/test/Storage/HasqlSpec.hs | haskell | module Storage.HasqlSpec where
import qualified Domain.User as D
import RIO
import qualified Storage.Lib as Lib
import qualified Storage.Specs.User as UserRepo
import Test.Hspec
import qualified TestContainers.Hspec as TC
import qualified Usecase.Interactor as UC
import Utils
spec :: Spec
spec =
aroundAll (TC.withC... | |
bf47f1391c0296eb7fef31f62029b05bfcd4076f7b5fb23a94c033ee505e08fe | keigoi/session-ocaml | schannel.ml | type 'a t = 'a Event.channel
let create = Event.new_channel
let send ch x = Event.sync (Event.send ch x)
let receive ch = Event.sync (Event.receive ch)
| null | https://raw.githubusercontent.com/keigoi/session-ocaml/f365456043b349874a5ce5444d313f365d5573c6/lib/schannel.ml | ocaml | type 'a t = 'a Event.channel
let create = Event.new_channel
let send ch x = Event.sync (Event.send ch x)
let receive ch = Event.sync (Event.receive ch)
| |
51050a8c62cc4cb30421457049bb2c8048682fb74fe660b91570cf9757d0e9c6 | clojureverse/clojurians-log-app | server_info.clj | (ns clojurians-log.components.server-info
(:require [com.stuartsierra.component :as component]))
(defrecord ServerInfoPrinter [http]
component/Lifecycle
(start [component]
(println "Started clojurians-log on" (str "http://" (:host http) ":" (:port http)))
component)
(stop [component]
component))
(... | null | https://raw.githubusercontent.com/clojureverse/clojurians-log-app/d34c9bd715e492c8f1899653548716d32c623fad/src/clojurians_log/components/server_info.clj | clojure | (ns clojurians-log.components.server-info
(:require [com.stuartsierra.component :as component]))
(defrecord ServerInfoPrinter [http]
component/Lifecycle
(start [component]
(println "Started clojurians-log on" (str "http://" (:host http) ":" (:port http)))
component)
(stop [component]
component))
(... | |
c1a14f65e2314a8114878feb077f8738177a97a6b698d5480a361af8f6846279 | janestreet/memtrace_viewer_with_deps | reconcile.mli | (** Determine whether a test's output matches its expected output. *)
open! Base
open Import
open Expect_test_common
module Result : sig
type 'a t =
| Match
| Correction of 'a
[@@deriving_inline compare, sexp_of]
include sig
[@@@ocaml.warning "-32"]
val compare : ('a -> 'a -> int) -> 'a t -> '... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/ppx_expect/matcher/reconcile.mli | ocaml | * Determine whether a test's output matches its expected output.
*/*
_ See the Jane Street Style Guide for an explanation of [Private] submodules:
/#private-submodules |
open! Base
open Import
open Expect_test_common
module Result : sig
type 'a t =
| Match
| Correction of 'a
[@@deriving_inline compare, sexp_of]
include sig
[@@@ocaml.warning "-32"]
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val sexp_of_t : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a ... |
9ce9e4c155a5dda8682a48864de90d9981121a6e2cff90fe08f33fc0279e4eec | haskell-repa/repa | Exp.hs | # LANGUAGE TemplateHaskell , QuasiQuotes #
module Data.Repa.Query.Build.Repa.Exp
( expOfExp
, expOfScalarOp
, expOfLit
, expOfMask
, expOfDelimFields
, expOfDelim
, expOfFieldsFormat
, expOfFieldFormat
, expOfNat)
where
import Language.Haskell.TH ... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-query/Data/Repa/Query/Build/Repa/Exp.hs | haskell | -------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
| Create a Haskell expression for a field mask.
---------------------------------------------------------------------------... | # LANGUAGE TemplateHaskell , QuasiQuotes #
module Data.Repa.Query.Build.Repa.Exp
( expOfExp
, expOfScalarOp
, expOfLit
, expOfMask
, expOfDelimFields
, expOfDelim
, expOfFieldsFormat
, expOfFieldFormat
, expOfNat)
where
import Language.Haskell.TH ... |
ba5f28263745dad7faac3dd08b6175b0a5db6bdb714142d9ce5a505204007d66 | restyled-io/restyled.io | Factories.hs | module Restyled.Test.Factories
(
-- * User
genUser
, genAdmin
-- * Job
, genJob
, setJobIncomplete
, setJobComplete
-- * Marketplace
, genAccount
, setAccountUnexpired
, setAccountExpired
, setPlanPublic
, setPlanLimited
, setPlanUnlimited
) where
imp... | null | https://raw.githubusercontent.com/restyled-io/restyled.io/42842ea0bf114342e95ea9c5df19c92dbc8f7d4c/test/Restyled/Test/Factories.hs | haskell | * User
* Job
* Marketplace
^ Email | module Restyled.Test.Factories
(
genUser
, genAdmin
, genJob
, setJobIncomplete
, setJobComplete
, genAccount
, setAccountUnexpired
, setAccountExpired
, setPlanPublic
, setPlanLimited
, setPlanUnlimited
) where
import Restyled.Prelude hiding (fieldLens)
import ... |
6a4c1d8f3b647150c71c6f81c6e0b83c631b0c904fc20e63940f87e83b7fb9f2 | travis/covenant | core.clj | (ns covenant.test.core
(:use [covenant.core] :reload)
(:use [clojure.test]))
(deftest replace-me ;; FIXME: write
(is false "No tests have been written."))
| null | https://raw.githubusercontent.com/travis/covenant/25b73a56ce6cc5dffa02f01e1c3a6d3541731f35/test/covenant/test/core.clj | clojure | FIXME: write | (ns covenant.test.core
(:use [covenant.core] :reload)
(:use [clojure.test]))
(is false "No tests have been written."))
|
5fe7dbf53bf59f6cbe99b8ffc680102e72f711af1bc6255c097b905117ae2bfc | patricoferris/ocaml-multihash | uvarint.mli | type t = int
val encode : t -> Cstruct.t
(** Encode an integer as a varint *)
val decode : Cstruct.t -> t * int
* an integer as a varint , also returns length read to decode
val decode_string : string -> t * int
(** Same as {!decode} only for strings. *)
| null | https://raw.githubusercontent.com/patricoferris/ocaml-multihash/2b121ae5c4e01b52a64d10a96231e52641fc5947/src/multihash/uvarint.mli | ocaml | * Encode an integer as a varint
* Same as {!decode} only for strings. | type t = int
val encode : t -> Cstruct.t
val decode : Cstruct.t -> t * int
* an integer as a varint , also returns length read to decode
val decode_string : string -> t * int
|
9c0106c3fa01fe7ae3bd054e98cc9646d303d586e4e502a3456c4493182f235a | IvanIvanov/fp2013 | queue.scm | Задачата не беше коректно зададена ,
така че не обръщайте особено внимание на решението
(define (queue-make)
(list))
(define (queue-add Q . args)
(append Q args))
(define (queue-empty? Q)
(null? Q))
(define (drop l n)
(reverse (take (reverse l) (- (length l) n))))
(define (take l n)
(cond
((o... | null | https://raw.githubusercontent.com/IvanIvanov/fp2013/2ac1bb1102cb65e0ecbfa8d2fb3ca69953ae4ecf/lab2-and-3/homework7/queue.scm | scheme | Задачата не беше коректно зададена ,
така че не обръщайте особено внимание на решението
(define (queue-make)
(list))
(define (queue-add Q . args)
(append Q args))
(define (queue-empty? Q)
(null? Q))
(define (drop l n)
(reverse (take (reverse l) (- (length l) n))))
(define (take l n)
(cond
((o... | |
8bf464520b73db7879ccd62a14c5d3c75e84221e932e09aa2041918adb675f33 | ygmpkk/house | SkewHeap.hs | Copyright ( c ) 1998 - 1999 .
-- See COPYRIGHT file for terms and conditions.
module SkewHeap (
-- type of skew heaps
instance of Coll / CollX , OrdColl / OrdCollX
CollX operations
empty,single,fromSeq,insert,insertSeq,union,unionSeq,delete,deleteAll,
deleteSeq,null,size,member,count,
-- Co... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/hslibs/data/edison/Coll/SkewHeap.hs | haskell | See COPYRIGHT file for terms and conditions.
type of skew heaps
Coll operations
OrdCollX operations
other supported operations
documentation
Adapted from
For delete,deleteAll,filter,partition: could compute fringe and reduce
rather that rebuilding with union at every deleted node
????
the remaining function... | Copyright ( c ) 1998 - 1999 .
module SkewHeap (
instance of Coll / CollX , OrdColl / OrdCollX
CollX operations
empty,single,fromSeq,insert,insertSeq,union,unionSeq,delete,deleteAll,
deleteSeq,null,size,member,count,
toSeq, lookup, lookupM, lookupAll, lookupWithDefault, fold, fold1,
filter, ... |
8dc3db40aa11fa2edaa0b92f8a66729eeba75bad86153aa6cd1893bb60d0a73a | exercism/clojure | leap.clj | (ns leap)
(defn leap-year? [year] ;; <- argslist goes here
;; your code goes here
)
| null | https://raw.githubusercontent.com/exercism/clojure/7ed96a5ae3c471c37db2602baf3db2be3b5a2d1a/exercises/practice/leap/src/leap.clj | clojure | <- argslist goes here
your code goes here | (ns leap)
)
|
f10b5d401771a2158ecebb803df618cfef3302f55aa01c0ec4858460b355a8bb | xapi-project/xen-api-libs | backtrace.ml |
* Copyright ( C ) 2006 - 2009 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 describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/stdext/backtrace.ml | ocaml |
* Copyright ( C ) 2006 - 2009 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 describe... | |
f27cb0ace1eedb9f15f4d008f6890188c90e1247c3384d97af756da22064ebe7 | thoughtstem/game-engine | carry-util.rkt | #lang racket
(provide movable
nearest-to-player?
nearest-entity-to-player-is?
near-player?
get-carry-offset-x
get-carry-offset-y
carried?
carried-by)
(require "../game-entities.rkt"
"../components/backdrop.rkt"
"../components/lock-to.rkt... | null | https://raw.githubusercontent.com/thoughtstem/game-engine/98c4b9e9b8c071818e564ef7efb55465cff487a8/entity-helpers/carry-util.rkt | racket | === GENENRIC RULES AND HELPERS ===
TODO: add to game engine
(add-component (remove-component e lock-to?) (physical-collider))
(define e-height (image-height (render (get-component e animated-sprite?))))
(define p-height (image-height (render (get-component player animated-sprite?))))
added optional location of a carr... | #lang racket
(provide movable
nearest-to-player?
nearest-entity-to-player-is?
near-player?
get-carry-offset-x
get-carry-offset-y
carried?
carried-by)
(require "../game-entities.rkt"
"../components/backdrop.rkt"
"../components/lock-to.rkt... |
919a5a22bf8bf4386a3bb6d10454d7f02aca988620bfc9e8464a6a400754e9d4 | project-oak/hafnium-verification | PulseArithmetic.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/pulse/PulseArithmetic.ml | ocaml | * we write i1][i2 for these
is [l1, u1] inside [l2, u2]?
* [remove_element e a] compute [a - {e}] if representable and if it is not [a]
empty sets are not allowed to be represented
can't have [l-1 = u+1] because [l≤u]
∃x. (x<l1 ∨ x>u1) ∧ (x<l2 ∨ x>u2) ∧ li<=ui
l1≥l2 ∧ u1>u2
non-empty intersection and each pr... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
09f4b733379ff78727f8e5725d4dad463852d67bcb0e8b01305f179b07eff676 | acieroid/scala-am | ch5.scm | (define atom?
(lambda (x)
(and (not (pair? x)) (not (null? x)))))
(define add1
(lambda (x)
(+ x 1)))
(define rember?
(lambda (a l)
(cond ((null? l) '())
((atom? (car l))
(cond ((eq? (car l) a) (rember* a (cdr l)))
(else (cons (car l) (rember* a (cdr l))))))
... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/WeiChenRompf2019/the-little-schemer/ch5.scm | scheme | (lambda (l1 l2)
(cond
((and (null? l1) (null? l2)) #t)
((and (null? l1) (atom? (car l2))) #f)
((null? l1) #f)
((and (atom? (car l1)) (null? l2)) #f)
((and (atom? (car l1)) (atom? (car l2)))
(and (eqan? (car l1) (car l2))
((atom? (car l1)) #f)
((null? l2) #f)
... | (define atom?
(lambda (x)
(and (not (pair? x)) (not (null? x)))))
(define add1
(lambda (x)
(+ x 1)))
(define rember?
(lambda (a l)
(cond ((null? l) '())
((atom? (car l))
(cond ((eq? (car l) a) (rember* a (cdr l)))
(else (cons (car l) (rember* a (cdr l))))))
... |
ec844fec48cb4d631c5ea02693bd22d97156e598b53e4b06eb250420e65eb82f | herbelin/coq-hh | goptions.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/library/goptions.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This module manages customization p... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Libob... |
067a57e31e6b8b4a3afbce3fdcabc416a909e1a9b1676da337e8e93754b21dd0 | jmillikin/anansi | Tests.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Main (tests, main) where
import Prelude hiding (FilePath)
import qualified Control.Monad.State as State
import Control.Monad.Identity (runIdentity)
import Data.ByteString (ByteString)
import qualified Data.ByteString... | null | https://raw.githubusercontent.com/jmillikin/anansi/f222a9195093c1fc3a96e7defd2803440c714b0e/tests/Tests.hs | haskell | # LANGUAGE OverloadedStrings #
test custom #line formatting | # LANGUAGE TemplateHaskell #
module Main (tests, main) where
import Prelude hiding (FilePath)
import qualified Control.Monad.State as State
import Control.Monad.Identity (runIdentity)
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as ByteString
import qualifi... |
e7edca3bebce35e9dfb5645cc3548c1289fbb549a4ffea8f59d5f6cf7b35838e | GlideAngle/flare-timing | Stats.hs | module Stats
( TimeStats(..)
, FlightStats(..)
, DashPathInputs(..)
, nullStats
, altToAlt
) where
import Data.Time.Clock (UTCTime)
import Data.UnitsOfMeasure (u)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.LatLng (QAlt, Alt(..))
import Flight.Kml (Altitude(..))
import Fli... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/flare-timing/prod-apps/mask-lead/Stats.hs | haskell | ^ The time taken from the start.
^ The time taken from the start gate.
^ The time the pilot arrived at the end of the speed section. | module Stats
( TimeStats(..)
, FlightStats(..)
, DashPathInputs(..)
, nullStats
, altToAlt
) where
import Data.Time.Clock (UTCTime)
import Data.UnitsOfMeasure (u)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.LatLng (QAlt, Alt(..))
import Flight.Kml (Altitude(..))
import Fli... |
ae9ff70823702b23829958300bb78b9cfad43539038177bdc591a5638a5c5c5d | RefactoringTools/HaRe | SubSubPatternIn1_TokOut.hs | module SubSubPatternIn1 where
f :: [Int] -> Int
f ((x : (y : ys@[]))) = x + y
f ((x : (y : ys@(b_1 : b_2)))) = x + y
f ((x : (y : ys))) = x + y | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/subIntroPattern/SubSubPatternIn1_TokOut.hs | haskell | module SubSubPatternIn1 where
f :: [Int] -> Int
f ((x : (y : ys@[]))) = x + y
f ((x : (y : ys@(b_1 : b_2)))) = x + y
f ((x : (y : ys))) = x + y | |
4e02f9b0db1d4d9d70606c559281f2e58dfacbe00d0f47a98c31549ab996e77c | typelead/eta | tcfail119.hs | -- Gave a nasty
-- tcLookupGlobal: `FunnyError.$dmb' is not in scope
failure in GHC 6.2 , because the type - checking of
-- the default method didn't recover.
module ShouldFail where
class A x where
a :: x -> ()
b :: x -> Bool -> ()
b x "Foo" = () -- deliberate type error
instance A Int where
a _ ... | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/fail/tcfail119.hs | haskell | Gave a nasty
tcLookupGlobal: `FunnyError.$dmb' is not in scope
the default method didn't recover.
deliberate type error | failure in GHC 6.2 , because the type - checking of
module ShouldFail where
class A x where
a :: x -> ()
b :: x -> Bool -> ()
instance A Int where
a _ = ()
|
79604aeb216c7c7e4bfdeb2a760eaaeb42b8e495b77e8a7277f76c3ffcedc542 | litxio/ptghci | Engine.hs | # LANGUAGE QuasiQuotes #
module Language.Haskell.PtGhci.Engine where
import Language.Haskell.PtGhci.Prelude hiding (Rep, unwords)
import Control.Monad
import Control.Exception (try, AsyncException(..))
import Text.Printf
import Data.IORef
import Data.Maybe
import Data.List (last, unwords)
import System.ZMQ4
import S... | null | https://raw.githubusercontent.com/litxio/ptghci/bbb3c5fdf2e73a557864b6b1e26833fffb34fc84/src/Language/Haskell/PtGhci/Engine.hs | haskell | hiding (Error)
the main loop runs, and an IO action that will cause the loop to terminate.
double conversion inefficient
Capture all stdout between the command and next prompt
Inlcude errRes b/c sometimes there are both errors
and output
Don't capture result, just echo over the iopub socket
This request is used... | # LANGUAGE QuasiQuotes #
module Language.Haskell.PtGhci.Engine where
import Language.Haskell.PtGhci.Prelude hiding (Rep, unwords)
import Control.Monad
import Control.Exception (try, AsyncException(..))
import Text.Printf
import Data.IORef
import Data.Maybe
import Data.List (last, unwords)
import System.ZMQ4
import S... |
9c7938061dd4fffb7d521d228230d8a9c2937499446b48e4a7e7f1f5ab97aa3c | mwotton/roboservant | Valid.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeOperators #
module Valid where
import Data.Void
import GHC.Generics
import Servant
import Servant.Server.Generic
type Api =
Get '[JSON] Int
:<|> Capture "void" Void :> Get '[JSON... | null | https://raw.githubusercontent.com/mwotton/roboservant/c89e1693fc146ea653ea48d411124082e01dec2d/test/Valid.hs | haskell | # LANGUAGE OverloadedStrings #
routedApi = genericApi (Proxy :: Proxy Routes) | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE TypeOperators #
module Valid where
import Data.Void
import GHC.Generics
import Servant
import Servant.Server.Generic
type Api =
Get '[JSON] Int
:<|> Capture "void" Void :> Get '[JSON] ()
data Routes route
= Routes
... |
c09a53ac8f41fad5da1fffbf5e7b3b59c2b80714d2780847bbb2aa81eff66e09 | RolfRolles/PandemicML | PL.ml | exception Unimplemented of string
exception Unvaluated of string
type tval =
| False
| True
let string_of_tval = function
| False -> "false"
| True -> "true"
type prop =
| Constant of tval
| Variable of string
| And of prop * prop
| Or of prop * prop
| Not of prop
| Implies of prop * prop
| Iff of prop * prop
le... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/SMT/Propositional%20Logic/PL.ml | ocaml | False
True
False
True
False
True
False
True
False
True
False
True
False
True
False
True | exception Unimplemented of string
exception Unvaluated of string
type tval =
| False
| True
let string_of_tval = function
| False -> "false"
| True -> "true"
type prop =
| Constant of tval
| Variable of string
| And of prop * prop
| Or of prop * prop
| Not of prop
| Implies of prop * prop
| Iff of prop * prop
le... |
fe4ee4dae0b74e42caea4105211039b8b00808417a14969cfac7444fc665f14c | loguntsov/reliable_udp | rudp_app.erl | -module(rudp_app).
-author("Sergey Loguntsov <>").
-behaviour(application).
%% Application callbacks
-export([
start/2,
stop/1
]).
-define(APP, rudp).
-export([
main/0,
env/1
]).
main() ->
{ ok, _ } = application:ensure_all_started(rudp),
spawn(fun ( ) - > t :p ( ) , timer : sleep(300000 ) end ) ,
ok.
... | null | https://raw.githubusercontent.com/loguntsov/reliable_udp/6544c08a551397182f33ca89ce2ff1db470a0daa/src/rudp_app.erl | erlang | Application callbacks
===================================================================
=================================================================== | -module(rudp_app).
-author("Sergey Loguntsov <>").
-behaviour(application).
-export([
start/2,
stop/1
]).
-define(APP, rudp).
-export([
main/0,
env/1
]).
main() ->
{ ok, _ } = application:ensure_all_started(rudp),
spawn(fun ( ) - > t :p ( ) , timer : sleep(300000 ) end ) ,
ok.
start(_StartType, _Start... |
b26902ac00f097ace1332ecbdfbc4ddfce5e22e59405e7c668c7d45651c6bbf0 | mirage/ocaml-vhd | block.mli |
* 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/mirage/ocaml-vhd/4838c4537c7b35ca8e9b770c435f064e3871d91e/vhd_format_lwt/block.mli | 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... | |
1dac03dc1ba4097c7ec88164b6d91ae4a60aebbaa73cb165679af4843c64a1f4 | binsec/haunted | dba_printer.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/f670f9a02fabc64e08c9f7b091b4a71d205d89a9/src/dba/dba_printer.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
2f2ba9eac6ac2bbfcf798fcfc6af5d6e4090d4cf91651f82efe3cc35f3aa5ed0 | nixeagle/nisp | check.lisp | ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
(in-package :Eos)
(defvar *test-dribble* t)
(defmacro with-*test-dribble* (stream &body body)
`(let ((*test-dribble* ,stream))
(declare (special *test-dribble*))
,@body))
(defmacro bind-run-state (requested-vars &body body)
`(let... | null | https://raw.githubusercontent.com/nixeagle/nisp/680b40b3b9ea4c33db0455ac73cbe3756afdbb1e/with-fbound/check.lisp | lisp | -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
make sure EXPECTED is holding the entry that starts with 'values
make sure EXPECTED is holding the entry that starts with 'values |
(in-package :Eos)
(defvar *test-dribble* t)
(defmacro with-*test-dribble* (stream &body body)
`(let ((*test-dribble* ,stream))
(declare (special *test-dribble*))
,@body))
(defmacro bind-run-state (requested-vars &body body)
`(let ,requested-vars
(declare (special ,@(mapcar 'car requested-vars)))
... |
2b7944a7d0ea2e4551b772da59fcec677024aec56339bbd8df2d048901085898 | keigoi/hlist-ocaml | hlist.ml | type ('a, 'b, 'xs, 'ys) idx =
| Zero : ('a, 'b, [ `cons of 'a * 'tl ], [ `cons of 'b * 'tl ]) idx
| Succ :
('a, 'b, 'aa, 'bb) idx
-> ('a, 'b, [ `cons of 'hd * 'aa ], [ `cons of 'hd * 'bb ]) idx
module type ElemType = sig
type 'a t
val unit : unit t
end
module type S = sig
type 'a elem
type '... | null | https://raw.githubusercontent.com/keigoi/hlist-ocaml/b2d46a0ef4edefa07928a365063f7df539f24898/hlist.ml | ocaml | type ('a, 'b, 'xs, 'ys) idx =
| Zero : ('a, 'b, [ `cons of 'a * 'tl ], [ `cons of 'b * 'tl ]) idx
| Succ :
('a, 'b, 'aa, 'bb) idx
-> ('a, 'b, [ `cons of 'hd * 'aa ], [ `cons of 'hd * 'bb ]) idx
module type ElemType = sig
type 'a t
val unit : unit t
end
module type S = sig
type 'a elem
type '... | |
5fd8ec97f51f89e8cee1250421dfdfea3987c57d9cf86141afd5d63f43e4aa3d | quchen/prettyprinter | MultilineTh.hs | module MultilineTh (multiline) where
import qualified Data.Text as T
import Language.Haskell.TH
import Language.Haskell.TH.Quote
import Language.Haskell.TH.Syntax
import Prelude
multiline :: QuasiQuoter
multiline = QuasiQuoter
{ quoteExp = quoteUnlines
... | null | https://raw.githubusercontent.com/quchen/prettyprinter/11e8bf12aed2f698e619c3a8c07eca3af4da1aed/prettyprinter/app/MultilineTh.hs | haskell | module MultilineTh (multiline) where
import qualified Data.Text as T
import Language.Haskell.TH
import Language.Haskell.TH.Quote
import Language.Haskell.TH.Syntax
import Prelude
multiline :: QuasiQuoter
multiline = QuasiQuoter
{ quoteExp = quoteUnlines
... | |
48d6c5707fd9b4455dac2a4281ac8ffcfbb1e47dec83502cdb0a63ec2b84c0e1 | BranchTaken/Hemlock | test_of_list_remove.ml | open! Basis.Rudiments
open! Basis
open Ordset
let test () =
let test m ordset descr = begin
let ordset' = remove m ordset in
File.Fmt.stdout
|> Fmt.fmt "--- "
|> Fmt.fmt descr
|> Fmt.fmt " ---\nremove "
|> Uns.pp m
|> Fmt.fmt "\n"
|> fmt ordset
|> Fmt.fmt " -> "
|> fmt ordset'... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a21b462fe7f70475591d2ffae185c91552bf6372/bootstrap/test/basis/ordset/test_of_list_remove.ml | ocaml | open! Basis.Rudiments
open! Basis
open Ordset
let test () =
let test m ordset descr = begin
let ordset' = remove m ordset in
File.Fmt.stdout
|> Fmt.fmt "--- "
|> Fmt.fmt descr
|> Fmt.fmt " ---\nremove "
|> Uns.pp m
|> Fmt.fmt "\n"
|> fmt ordset
|> Fmt.fmt " -> "
|> fmt ordset'... | |
07cc2023d52fa5885bb16bdeb016a37dc7fe9e31f5a8b61ecd03d65ea0a1cb24 | lanl/APPFL | add2.hs | # LANGUAGE MagicHash , UnboxedTuples #
module Test where
import AppflPrelude
main = (2 + 5) == (3 + 4)
| null | https://raw.githubusercontent.com/lanl/APPFL/0f29f390d4735e863904348711a48b8f38ca5d03/test/hs/add2.hs | haskell | # LANGUAGE MagicHash , UnboxedTuples #
module Test where
import AppflPrelude
main = (2 + 5) == (3 + 4)
| |
392c3fb3da5402c7399b26080e28633fdefa924f12792cb91dbb62ec68296ba2 | district0x/cljs-web3 | utils.cljs | (ns cljs-web3.utils
(:require [camel-snake-kebab.core :as cs :include-macros true]
[camel-snake-kebab.extras :refer [transform-keys]]
[cljs.core.async :refer [>! chan]]
[clojure.string :as string])
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn safe-case [case-f]
... | null | https://raw.githubusercontent.com/district0x/cljs-web3/14ba12e37dd944c90f4741d92c8c94394b9a3dba/src/cljs_web3/utils.cljs | clojure | Prevent weird bug in advanced optimisations | (ns cljs-web3.utils
(:require [camel-snake-kebab.core :as cs :include-macros true]
[camel-snake-kebab.extras :refer [transform-keys]]
[cljs.core.async :refer [>! chan]]
[clojure.string :as string])
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn safe-case [case-f]
... |
9f9baa52b2ec6b324488db063595fbaaca2212824fcd3afd025ef2f5c4ae8986 | yziquel/OCaml-R | conversion.ml | (*********************************************************************************)
(* OCaml-R *)
(* *)
Copyright ( C ) 2008 - 2010 Institut National de Recherche en ... | null | https://raw.githubusercontent.com/yziquel/OCaml-R/4690dd0ede4858d7048f573d75519e4643a40532/src/conversion.ml | ocaml | *******************************************************************************
OCaml-R
... | Copyright ( C ) 2008 - 2010 Institut National de Recherche en
Informatique et en Automatique . All rights reserved .
Copyright ( C ) 2009 - 2010 . All rights reserved .
it under the terms of the GNU General Public License as
... |
d92f3091c9a8196334fc02a18a73bdca25c11cf54cfa8ad3430f4dc7513c3595 | appleshan/cl-http | cl-http-70-75.lisp | -*- Mode : LISP ; Syntax : ansi - common - lisp ; Package : http ; Base : 10 ; Patch - File : t -*-
Patch file for CL - HTTP version 70.75
;;; Reason: Function HTTP::INTERN-ACCESS-LOG: clean up
;;; Function HTTP::CREATE-NOTIFICATION-ACCESS-LOG: -
Function HTTP::PARSE - EXPIRES - HEADER : explicitly handle zer... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-75.lisp | lisp | Syntax : ansi - common - lisp ; Package : http ; Base : 10 ; Patch - File : t -*-
Reason: Function HTTP::INTERN-ACCESS-LOG: clean up
Function HTTP::CREATE-NOTIFICATION-ACCESS-LOG: -
Function HTTP::PRINT-EXPIRES-HEADER: -
DOMAIN - FIXES.LISP.33 ) ,
MAILBOX - FORMAT.LISP.24 ) ,
MAILER - FIXES.LISP.15 ) ,
Patch TC... | Patch file for CL - HTTP version 70.75
Function HTTP::PARSE - EXPIRES - HEADER : explicitly handle zero - valued expires .
DEFINE - HEADER : EXPIRES : update .
Written by JCMa , 9/18/00 17:57:07
while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5.vlod
with Open ... |
d7bc11b4d80b4d8b2e437f3c5aba098e5cd64154710ddaf89f6705b93e6d9be0 | layerware/pgqueue | nippy.clj | (ns pgqueue.serializer.nippy
(:require [pgqueue.serializer.protocol :as s]
[taoensso.nippy :as nippy]))
(deftype NippySerializer []
s/Serializer
(serialize [this object]
(nippy/freeze object))
(deserialize [this bytes]
(if (nil? bytes) nil (nippy/thaw bytes))))
(defn nippy-serializer []
... | null | https://raw.githubusercontent.com/layerware/pgqueue/2af3f578338d25332e48ee30d9aea2c83eaf05c8/src/pgqueue/serializer/nippy.clj | clojure | (ns pgqueue.serializer.nippy
(:require [pgqueue.serializer.protocol :as s]
[taoensso.nippy :as nippy]))
(deftype NippySerializer []
s/Serializer
(serialize [this object]
(nippy/freeze object))
(deserialize [this bytes]
(if (nil? bytes) nil (nippy/thaw bytes))))
(defn nippy-serializer []
... | |
dfc422dd96e17bee0e5e377b5d701d75e01055e515b3f5ab115e8d73f5d647c8 | 223kazuki/clj-graphql-server | lacinia.clj | (ns graphql-server.lacinia
(:require [integrant.core :as ig]
[io.pedestal.http.route :as route]
[com.walmartlabs.lacinia.pedestal :as lacinia]
[com.walmartlabs.lacinia.util :refer [attach-resolvers attach-streamers]]
[com.walmartlabs.lacinia.schema :as schema]
... | null | https://raw.githubusercontent.com/223kazuki/clj-graphql-server/0994d2bb98cd483dcb1c02a8175766e4fd35c861/src/graphql_server/lacinia.clj | clojure | (ns graphql-server.lacinia
(:require [integrant.core :as ig]
[io.pedestal.http.route :as route]
[com.walmartlabs.lacinia.pedestal :as lacinia]
[com.walmartlabs.lacinia.util :refer [attach-resolvers attach-streamers]]
[com.walmartlabs.lacinia.schema :as schema]
... | |
556c816408050f980be3c185014cf7669b3139e849cefcade765ffb9aeb2a676 | ThatGeoGuy/chicken-graphs | utils.scm | Copyright ( c ) 2015 ,
;;;; All rights reserved.
;;;;
;;;; Redistribution and use in source and binary forms, with or without
;;;; modification, are permitted provided that the following conditions are met:
;;;;
1 . Redistributions of source code must retain the above copyright notice ,
;;;; this list of... | null | https://raw.githubusercontent.com/ThatGeoGuy/chicken-graphs/5642ad70e40c44b06a5efed6a0917096d4182d52/src/utils.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:
this list of conditions and the following disclaimer.
this list of conditions and the following disclaimer in the documentation
and/or othe... | Copyright ( c ) 2015 ,
1 . Redistributions of source code must retain the above copyright notice ,
2 . Redistributions in binary form must reproduce the above copyright notice ,
3 . Neither the name of the copyright holder nor the names of its
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND C... |
2f1d85cd286e9b232c264d0e3fcdb3741895b04eb3ec332316c5ec8f5f544d68 | thizanne/cormoran | cormoran.ml | open Batteries
open Cmdliner
let info =
let doc = "Analyses a program under TSO." in
let man = [
`S "BUGS";
`P "Probably.";
] in
Term.(
info
"cormoran"
~version:"0.1"
~doc
~man
~exits:default_exits
)
let main param =
try
let module P = Param in
let (progra... | null | https://raw.githubusercontent.com/thizanne/cormoran/46d13330ebd1c8224a0603fd473d8e6bed48bf53/src/cormoran.ml | ocaml | Printf.printf "done.\nChecking properties...\n";
reset colors | open Batteries
open Cmdliner
let info =
let doc = "Analyses a program under TSO." in
let man = [
`S "BUGS";
`P "Probably.";
] in
Term.(
info
"cormoran"
~version:"0.1"
~doc
~man
~exits:default_exits
)
let main param =
try
let module P = Param in
let (progra... |
8d4dc64cfe1979f7e5246b06f7184b425df1d6a4307618825689663459efb0a5 | onaio/vega-viewer | grouped_bar_chart.cljs | (ns vega-viewer.components.grouped-bar-chart
(:require [om.core :as om :include-macros true]
[sablono.core :refer-macros [html]]
[vega-viewer.components.vega-viewer :refer [vega-viewer]]
[vega-viewer.vega.specs.grouped-bar-chart
:refer [generate-grouped-bar-chart-vega-... | null | https://raw.githubusercontent.com/onaio/vega-viewer/591c310131d2b662d96aef21546a718fcc0752a8/src/vega_viewer/components/grouped_bar_chart.cljs | clojure | (ns vega-viewer.components.grouped-bar-chart
(:require [om.core :as om :include-macros true]
[sablono.core :refer-macros [html]]
[vega-viewer.components.vega-viewer :refer [vega-viewer]]
[vega-viewer.vega.specs.grouped-bar-chart
:refer [generate-grouped-bar-chart-vega-... | |
3cf335030d5a5ada0b820b677969dea72b96a0679b0547037c86bc8e1e7de395 | iand675/hs-opentelemetry | Detector.hs | module OpenTelemetry.Resource.Process.Detector where
import Control.Exception (throwIO, try)
import qualified Data.Text as T
import Data.Version
import OpenTelemetry.Resource.Process
import System.Environment (
getArgs,
getExecutablePath,
getProgName,
)
import System.IO.Error
import System.Info
import System.Po... | null | https://raw.githubusercontent.com/iand675/hs-opentelemetry/b08550db292ca0d8b9ce9156988e6d08dd6a2e61/sdk/src/OpenTelemetry/Resource/Process/Detector.hs | haskell | module OpenTelemetry.Resource.Process.Detector where
import Control.Exception (throwIO, try)
import qualified Data.Text as T
import Data.Version
import OpenTelemetry.Resource.Process
import System.Environment (
getArgs,
getExecutablePath,
getProgName,
)
import System.IO.Error
import System.Info
import System.Po... | |
ffaaef528c2069da4aa60d95f3c32f6bd8a41206fd88040afb5638457c2f322c | janestreet/learn-ocaml-workshop | problem.mli | open! Base
val factorial : int -> int
| null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/02-exercises/07-simple_recursion/problem.mli | ocaml | open! Base
val factorial : int -> int
| |
fe69e837825faf23309d50c8e518894f61ae85f2c935b7c7120487e2445868e7 | hiroshi-unno/coar | max-e.ml | let max max2 (x:int) (y:int) (z:int) : int = max2 (max2 x y) y
let f x y : int = if x >= y then x else y
let main (x:int) y z =
let m = max f x y z in
assert (f x m = m && f y m = m && f z m = m)
[@@@assert "typeof(main) <: int -> int -> int -> unit"]
| null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/max-e.ml | ocaml | let max max2 (x:int) (y:int) (z:int) : int = max2 (max2 x y) y
let f x y : int = if x >= y then x else y
let main (x:int) y z =
let m = max f x y z in
assert (f x m = m && f y m = m && f z m = m)
[@@@assert "typeof(main) <: int -> int -> int -> unit"]
| |
94882631c157029c3bb34802a12b5ee7f352eb300968a79980290936d33fd9f1 | hslua/hslua | Trace.hs | # LANGUAGE TypeApplications #
|
Module : HsLua . Core . Trace
Copyright : © 2017 - 2023 : MIT
Maintainer : < tarleb+ >
Helper functions to call Lua functions with tracebacks .
Module : HsLua.Core.Trace
Copyright : © 2017-2023 Albert Krewinkel
License : MIT
Maintainer : Alber... | null | https://raw.githubusercontent.com/hslua/hslua/178c225f3da193f09fc27877a5a30e66eef069fb/hslua-core/src/HsLua/Core/Trace.hs | haskell | | Like @'pcall'@, but sets an appropriate message handler function,
thereby adding a stack traceback if an error occurs.
function index
| Like @'call'@, but adds a traceback if an error occurs.
traceback to the error message if an error occurs.
| Helper function used as message handler if the function given to
T... | # LANGUAGE TypeApplications #
|
Module : HsLua . Core . Trace
Copyright : © 2017 - 2023 : MIT
Maintainer : < tarleb+ >
Helper functions to call Lua functions with tracebacks .
Module : HsLua.Core.Trace
Copyright : © 2017-2023 Albert Krewinkel
License : MIT
Maintainer : Alber... |
014f2fd74bfb3d85e0793f91ca3d262e2a918ec44f2320ed802bd67c91be8544 | goldfirere/thesis | robby.hs | -- Encoding a little calculus (no lambda!) with a proved-safe optimizer.
# LANGUAGE GADTs , PolyKinds , TypeOperators ,
DataKinds , TypeFamilies , ImpredicativeTypes ,
RankNTypes , ScopedTypeVariables ,
UndecidableInstances , FlexibleContexts ,
FlexibleInstan... | null | https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/hs/robby.hs | haskell | Encoding a little calculus (no lambda!) with a proved-safe optimizer.
# OPTIONS_GHC -fprint-explicit-kinds #
Part 0: Trivial examples
types with kind signatures
type level numbers
type level list
Part 1: Dynamic Typing in a Statically Typed Language
entire expression
numbers
Sing is a data family for singlet... |
# LANGUAGE GADTs , PolyKinds , TypeOperators ,
DataKinds , TypeFamilies , ImpredicativeTypes ,
RankNTypes , ScopedTypeVariables ,
UndecidableInstances , FlexibleContexts ,
FlexibleInstances #
DataKinds, TypeFamilies, ImpredicativeTypes,
... |
583095e2b8005219a2974ccfa2b634e7ded557a1a1e4eba9fb07e9e48cc58dc2 | kadena-io/chainweb-node | SPV.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
-- |
Module : Chainweb . Pact . RestAPI.SPV
Copyright : Copyright © 2021 Kadena LLC .
License : MIT
Maintainer : < >
-- Stability: experimental
--
-- Types and... | null | https://raw.githubusercontent.com/kadena-io/chainweb-node/62e5eeccd1ae4a5e4ca56452f7c85d07cdb483c4/src/Chainweb/Pact/RestAPI/SPV.hs | haskell | # LANGUAGE OverloadedStrings #
|
Stability: experimental
Types and Utils for the Pact SPV2 API
internal modules
-------------------------------------------------------------------------- --
-------------------------------------------------------------------------- --
SPV Subject Type
-------------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
Module : Chainweb . Pact . RestAPI.SPV
Copyright : Copyright © 2021 Kadena LLC .
License : MIT
Maintainer : < >
module Chainweb.Pact.RestAPI.SPV
( SpvAlgorithm(..)
, SpvSubjectType(..)
, SpvSubj... |
5d754fada074d127a91182028bfaa7fd368c0a12a4fb2482e9acd2fb1da85d6e | bhauman/figwheel-main | npm.clj | (ns figwheel.main.npm
(:require
[clojure.java.io :as io]
[clojure.data.json :as json]
[clojure.string :as string]))
;; ------------------------------------------------------------
;; utils
;; ------------------------------------------------------------
(defn kebab-case
"Converts CamelCase / camelCase to ... | null | https://raw.githubusercontent.com/bhauman/figwheel-main/ead06b94b1b2747ed37e5d8c37118d6e7ae77193/src/figwheel/main/npm.clj | clojure | ------------------------------------------------------------
utils
------------------------------------------------------------
------------------------------------------------------------
Gen index file
------------------------------------------------------------
experimental not currently used
---------------... | (ns figwheel.main.npm
(:require
[clojure.java.io :as io]
[clojure.data.json :as json]
[clojure.string :as string]))
(defn kebab-case
"Converts CamelCase / camelCase to kebab-case"
[s]
(-> s
(string/replace #"[a-z\d][A-Z]"
(fn [x]
(str (first x) \- (... |
297022f7b2555c04b8ad7ca67ba5993c8fa5b2a73d312cd4806bed560436a2ab | dnlkrgr/hsreduce | Pragmas.hs | module Reduce.Passes.Pragmas (reduce) where
import Control.Concurrent.STM.Lifted (readTVarIO)
import Control.Monad.Reader (MonadReader (ask))
import Lens.Micro.Platform ((%~))
import Util.Types (R, RConf (_tState), RState (_pragmas), pragmas)
import Util.Util (isTestStillFresh, printInfo, tryNewState)
reduce :: R IO ... | null | https://raw.githubusercontent.com/dnlkrgr/hsreduce/8f66fdee036f8639053067572b55d9a64359d22c/src/Reduce/Passes/Pragmas.hs | haskell | module Reduce.Passes.Pragmas (reduce) where
import Control.Concurrent.STM.Lifted (readTVarIO)
import Control.Monad.Reader (MonadReader (ask))
import Lens.Micro.Platform ((%~))
import Util.Types (R, RConf (_tState), RState (_pragmas), pragmas)
import Util.Util (isTestStillFresh, printInfo, tryNewState)
reduce :: R IO ... | |
712895d7a39ad90302d7f3fc88da12bab6f5634c5ca3e89cb3a515911816111f | lachenmayer/arrowsmith | Tabs.hs | {-# LANGUAGE OverloadedStrings #-}
|
Purpose of this module is to provide a simple , functional way to
define tabs in Snap applications .
Purpose of this module is to provide a simple, functional way to
define tabs in Snap applications.
-}
module Snap.Extras.Tabs
(
* Define Tabs in DOM ... | null | https://raw.githubusercontent.com/lachenmayer/arrowsmith/34b6bdeddddb2d8b9c6f41002e87ec65ce8a701a/snap-extras-0.9/src/Snap/Extras/Tabs.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------
Splice-Driven --
-----------------
-... | |
Purpose of this module is to provide a simple , functional way to
define tabs in Snap applications .
Purpose of this module is to provide a simple, functional way to
define tabs in Snap applications.
-}
module Snap.Extras.Tabs
(
* Define Tabs in DOM via Heist
initTabs
, tabs... |
22405d3a2b5b7e72fe19e479d20b7a744885bdbbbe99cdce6a1abfd91442eef5 | sonowz/advent-of-code-haskell | Day14.hs | module Y2019.Day14 where
import Relude
import Relude.Extra.Bifunctor
import Relude.Extra.CallStack
import Relude.Extra.Foldable1
import Relude.Extra.Map
import Relude.Extra.Newtype
import Relude.Extra.Tuple
import Relude.Unsafe ((!!))
import Algebra.Graph
import Algebra.Graph.ToGraph
import Text.Parsec.Char
import Tex... | null | https://raw.githubusercontent.com/sonowz/advent-of-code-haskell/6cec825c5172bbec687aab510e43832e6f2c0372/src/Y2019/Day14.hs | haskell | ---------------------
Type declarations --
---------------------
Inputs, output
----------
Part 1 --
----------
Calculate required ores by triggering reaction in reverse order
----------
----------
Find least number which satisfies the predicate
------------------
------------------ | module Y2019.Day14 where
import Relude
import Relude.Extra.Bifunctor
import Relude.Extra.CallStack
import Relude.Extra.Foldable1
import Relude.Extra.Map
import Relude.Extra.Newtype
import Relude.Extra.Tuple
import Relude.Unsafe ((!!))
import Algebra.Graph
import Algebra.Graph.ToGraph
import Text.Parsec.Char
import Tex... |
ffdd828f2b6fdf086b7df5eb1eef4d0cefa7ddd06ec0f352b7b1583fc56a2783 | vlasenkov/Denga | FFI.hs | # LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE OverloadedStrings #-}
denga , Haskell trading framework
Copyright ( C ) 2016 < >
-- | This module provides low-level interface for @txmlconnector@ library (</>).
-- For more details on how to use these functions see official TXmlConnector user guide.
... | null | https://raw.githubusercontent.com/vlasenkov/Denga/8167c36addaee5ad063ea93de558c5a00d062ee3/denga-transaq/Denga/Transaq/FFI.hs | haskell | # LANGUAGE OverloadedStrings #
| This module provides low-level interface for @txmlconnector@ library (</>).
For more details on how to use these functions see official TXmlConnector user guide.
| Callback function pointer type for @SetCallback@ function
| Callback function pointer type for @SetCallbackEx@ funct... | # LANGUAGE ForeignFunctionInterface #
denga , Haskell trading framework
Copyright ( C ) 2016 < >
module Denga.Transaq.FFI
( getServiceInfo
, initialize
, unInitialize
, sendCommand
, setCallback
, setCallbackEx
, TCallback
, TCallbackEx
) where
import... |
c8c1a74a2408cc771a6edfc687b573778cfeed6e9f48c07c9e9557961218453b | ztellman/cambrian-collections | java.clj | (ns cambrian-collections.java
(:refer-clojure
:exclude [class import cond])
(:import
[org.eclipse.jdt.core.formatter
CodeFormatter]
[org.eclipse.jdt.internal.formatter
DefaultCodeFormatter]
[org.eclipse.jface.text
Document]))
(def code "public class geo{public static void main(String... | null | https://raw.githubusercontent.com/ztellman/cambrian-collections/35c80f0afde9f5bf33e63f93c859d4baa9981f4c/generate/cambrian_collections/java.clj | clojure | (ns cambrian-collections.java
(:refer-clojure
:exclude [class import cond])
(:import
[org.eclipse.jdt.core.formatter
CodeFormatter]
[org.eclipse.jdt.internal.formatter
DefaultCodeFormatter]
[org.eclipse.jface.text
Document]))
(def code "public class geo{public static void main(String... | |
5102f62d115c7e990362f47d7c9362eaeb10a9ca0397d411e24a1952a6e3079f | racket/racket7 | main.rkt | #lang racket/base
(require "parameter.rkt"
"string.rkt"
"collate.rkt"
"recase.rkt")
(provide current-locale
locale-string-encoding
system-language+country
bytes->string/locale
string->bytes/locale
string-locale<?
string-locale=?
... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/locale/main.rkt | racket | #lang racket/base
(require "parameter.rkt"
"string.rkt"
"collate.rkt"
"recase.rkt")
(provide current-locale
locale-string-encoding
system-language+country
bytes->string/locale
string->bytes/locale
string-locale<?
string-locale=?
... | |
19673faf2f2d86166bf2af15da1748db20d39557e47f21a6c6b75c747629cec1 | gusenov/stepik-functional-programming-hs | Demo.hs | module Demo where
import Data.Function
{- Íåêàððèðîâàííàÿ ôóíêöèÿ -}
avg :: (Double,Double) -> Double
avg p = (fst p + snd p) / 2
| null | https://raw.githubusercontent.com/gusenov/stepik-functional-programming-hs/904164012b9b842a15d5ba3af05cfe589295fa5c/Avg/Demo.hs | haskell | Íåêàððèðîâàííàÿ ôóíêöèÿ | module Demo where
import Data.Function
avg :: (Double,Double) -> Double
avg p = (fst p + snd p) / 2
|
d58009ff478fd558652e9501f057bf18bbc5d258c8224fea3d092d67e68d7510 | craigl64/clim-ccl | buffer.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
This file contains definitions for the BUFFER object for Common - Lisp X
windows version 11
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas ... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/xlib/buffer.lisp | lisp | Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
... |
This file contains definitions for the BUFFER object for Common - Lisp X
windows version 11
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
1 . The BUFFER imple... |
6836703fc6aec6f125cd284b7bf4045df8488e6baa3d1563d43a7aa5b248730d | nasa/Common-Metadata-Repository | index_set_service.clj | (ns cmr.indexer.services.index-set-service
"Provide functions to store, retrieve, delete index-sets"
(:require
[cheshire.core :as json]
[clojure.string :as string]
[cmr.common.config :as common-config]
[cmr.common.log :as log :refer [info]]
[cmr.common.rebalancing-collections :as rebalancing-collect... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/e740c38151ed3c045192eb55545212ce883c5855/indexer-app/src/cmr/indexer/services/index_set_service.clj | clojure | rollback index-set creation if index creation fails
TODO: Generic work: why does this fail to roll back with bad generics?
Update the index set. This will create the new collection indexes as needed.
Update the index set. This will create the new collection indexes as needed.
delete indices assoc with index-set | (ns cmr.indexer.services.index-set-service
"Provide functions to store, retrieve, delete index-sets"
(:require
[cheshire.core :as json]
[clojure.string :as string]
[cmr.common.config :as common-config]
[cmr.common.log :as log :refer [info]]
[cmr.common.rebalancing-collections :as rebalancing-collect... |
34d42bca5c419fdd1d3e35810bbd9860a3d694862dbc8c03b5fc01f85e57f12d | 8c6794b6/haskell-sc-scratch | dial.hs | module Main where
import Pssd.TelephoneBells.Eighties
main :: IO ()
main = dial | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/pssd/src/run/dial.hs | haskell | module Main where
import Pssd.TelephoneBells.Eighties
main :: IO ()
main = dial | |
29c934e134b6d7b0962c0fc2968339bdc5d109d434cce21a856ab295e8161e19 | rudymatela/extrapolate | gencalc.hs | {-# Language TemplateHaskell #-}
for GHC < = 7.8
Example taken from :
--
-- The version here is the one from the paper (similar to the one in the README
-- file). I chose the one in the paper as it is clearer.
import Control.Monad
import Test.Extrapolate hiding (eval)
import Data.Maybe
#if __GLASGOW_HASK... | null | https://raw.githubusercontent.com/rudymatela/extrapolate/0b3ca28eed0d04358b2fb033664476f8b29821a6/eg/gencalc.hs | haskell | # Language TemplateHaskell #
The version here is the one from the paper (similar to the one in the README
file). I chose the one in the paper as it is clearer.
deriveGeneralizable ''Exp
{-
-}
The following generalized counter-example from the paper is wrong!
setting x to (Div (C 0) (C 0)) makes the property p... | for GHC < = 7.8
Example taken from :
import Control.Monad
import Test.Extrapolate hiding (eval)
import Data.Maybe
#if __GLASGOW_HASKELL__ < 710
import Data.Typeable (Typeable)
deriving instance Typeable Exp
#endif
data Exp a = C a
| Add (Exp a) (Exp a)
| Div (Exp a) (Exp a)
derivin... |
2ea628e246e15df6bd1cc3e7643b49dbfbac5a6941894e10589a6e3e5a14c98e | JoelSanchez/ventas | cldr.clj | (ns ventas.i18n.cldr
"CLDR importer. Supports countries and states.
See for more information."
(:require
[clojure.string :as str]
[clojure.xml :as xml]
[datomic.api :as d]
[ventas.common.utils :as common.utils]
[ventas.database :as db]
[ventas.database.entity :as entity]
[ventas.utils :as u... | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/clj/ventas/i18n/cldr.clj | clojure | (ns ventas.i18n.cldr
"CLDR importer. Supports countries and states.
See for more information."
(:require
[clojure.string :as str]
[clojure.xml :as xml]
[datomic.api :as d]
[ventas.common.utils :as common.utils]
[ventas.database :as db]
[ventas.database.entity :as entity]
[ventas.utils :as u... | |
55d7e9d63ff93fec0fd0993639af4b5f807debdc3e3e40d2c54cf2f7d4a1f835 | marineschimel/ilqr_vae | covariance.mli | include module type of Covariance_typ
module Covariance : sig
module P : Owl_parameters.T with type 'a prm = 'a Covariance_P.prm
val init
: ?no_triangle:bool
-> ?pin_diag:bool
-> ?sigma2:float
-> Owl_parameters.setter
-> int
-> P.p
val to_chol_factor : P.p -> AD.t
val invert : P.p ->... | null | https://raw.githubusercontent.com/marineschimel/ilqr_vae/8bdda2bfcf0729f965b2ab9e5aab5042a240c64d/lib/covariance.mli | ocaml | include module type of Covariance_typ
module Covariance : sig
module P : Owl_parameters.T with type 'a prm = 'a Covariance_P.prm
val init
: ?no_triangle:bool
-> ?pin_diag:bool
-> ?sigma2:float
-> Owl_parameters.setter
-> int
-> P.p
val to_chol_factor : P.p -> AD.t
val invert : P.p ->... | |
3ebdb4fecba55c5f095e57cc7531e5434dd9b7e6fbd50b43a181b82d05955a22 | part-cw/lambdanative | ssax.scm | ssax module based on the public domain parser by
(define self #f)
(define ssax:warningmsg #f)
(define ssax:errormsg #f)
(define (xml->sxml str)
(set! ssax:warningmsg #f)
(set! ssax:errormsg #f)
(let ((res (with-input-from-string str (lambda ()
(SSAX:XML->SXML (current-input-port) '() )))))
(if ssax:e... | null | https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/modules/ssax/ssax.scm | scheme | ssax module based on the public domain parser by
(define self #f)
(define ssax:warningmsg #f)
(define ssax:errormsg #f)
(define (xml->sxml str)
(set! ssax:warningmsg #f)
(set! ssax:errormsg #f)
(let ((res (with-input-from-string str (lambda ()
(SSAX:XML->SXML (current-input-port) '() )))))
(if ssax:e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.