_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 |
|---|---|---|---|---|---|---|---|---|
c5467158e8bbef022c274d7cfb493ed6d146616feabca0e6e599fd8e70983c51 | mfp/obigstore | obs_conn.ml |
* Copyright ( C ) 2011 < >
* 2009
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) ... | null | https://raw.githubusercontent.com/mfp/obigstore/1b078eeb21e11c8de986717150c7108a94778095/src/core/obs_conn.ml | ocaml | adapted from lwt_io.ml
This may happen if the server closed the connection before us |
* Copyright ( C ) 2011 < >
* 2009
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) ... |
f36ffb99089109112469dbd7b8403314b1a257d51bf4247e872fbfd04eb725b3 | 2600hz-archive/whistle | rabbit_net.erl | 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 distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/rabbit_net.erl | erlang | 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 language governing rights and
limitations under the License.
----------------... | 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 RabbitMQ .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved .
-module(rabbi... |
040aac3041903298e3f63bd6234a85c425057f329c4c80dc448d9a53264e76c2 | elaforge/karya | LDebug.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
-- | Debugging utilities.
module Cmd.Repl.LDebug where
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Data.Text as Text
import qualified System.IO as ... | null | https://raw.githubusercontent.com/elaforge/karya/99194874139230dbb9c4d1918082f5a65d2a4d90/Cmd/Repl/LDebug.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Debugging utilities.
Also see 'LPerf.extract_debug' and similar functions.
* block
| Save state in a format that can be copy-pasted into a test, and loaded
with 'Derive.DeriveTest.derive_dump'.
| Like 'd... | Copyright 2013
module Cmd.Repl.LDebug where
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Data.Text as Text
import qualified System.IO as IO
import qualified Util.Log as Log
import qualified Util.Memory as Memory
import qualified Util.Num as Num
import qualified Util.PPrint a... |
bd555a73d8f4009d36467247a3a2bef5db05f50ec52ddb15da8cda2c8717de85 | nboldi/c-parser-in-haskell | Parser.hs | # LANGUAGE FlexibleContexts , KindSignatures #
-- | Generic components for a preprocessor. Support for macro definitions with or without parameters, comments, file includes, conditional compilation.
module Text.Preprocess.Parser where
import Text.Parsec hiding (label)
import Text.Preprocess.Rewrites
import Text... | null | https://raw.githubusercontent.com/nboldi/c-parser-in-haskell/1a92132e7d1b984cf93ec89d6836cc804257b57d/Text/Preprocess/Parser.hs | haskell | | Generic components for a preprocessor. Support for macro definitions with or without parameters, comments, file includes, conditional compilation.
| Contains the specification of the preprocessor
| Should parse all occasions where a macro replacement could occur.
| A default preprocessor with no parsers define... | # LANGUAGE FlexibleContexts , KindSignatures #
module Text.Preprocess.Parser where
import Text.Parsec hiding (label)
import Text.Preprocess.Rewrites
import Text.ParserCombinators.Parsec.Pos
import Text.Parsec.ExtraCombinators
import Control.Monad.Identity
import Control.Monad.Trans
import Control.Applicative... |
e4d047e6e6ee6dbd28570b5c3016a5d69c82d1a464eaf227e4b78fb1a6d22c6f | slipstream/SlipStreamServer | project.clj | (def +version+ "3.72-SNAPSHOT")
(defproject com.sixsq.slipstream/SlipStreamAsync "3.72-SNAPSHOT"
:description "utilities for asynchronous actions"
:url ""
:license {:name "Apache 2.0"
:url "-2.0.txt"
:distribution :repo}
:plugins [[lein-parent "0.3.2"]]
:parent-project {:coords... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/jar-async/project.clj | clojure | (def +version+ "3.72-SNAPSHOT")
(defproject com.sixsq.slipstream/SlipStreamAsync "3.72-SNAPSHOT"
:description "utilities for asynchronous actions"
:url ""
:license {:name "Apache 2.0"
:url "-2.0.txt"
:distribution :repo}
:plugins [[lein-parent "0.3.2"]]
:parent-project {:coords... | |
cbb517a397dd16cf372293b29b88949458398db3670b54c0a6c03747cd221277 | marick/fp-oo | class.clj | Exercise 1
(def method-from-message
(fn [message class]
(message (:__instance_methods__ class))))
(def class-from-instance
(fn [instance]
(eval (:__class_symbol__ instance))))
(def apply-message-to
(fn [class instance message args]
(apply (method-from-message message class)
... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/solutions/class.clj | clojure | For example:
^^^^^== New
^^^^^== New
Redefining a class changes the behavior of existing instances
because having an instance's :__class_symbol__ be a symbol that's
later `eval`ed adds a level of indirection. If the value were a
class map itself... | Exercise 1
(def method-from-message
(fn [message class]
(message (:__instance_methods__ class))))
(def class-from-instance
(fn [instance]
(eval (:__class_symbol__ instance))))
(def apply-message-to
(fn [class instance message args]
(apply (method-from-message message class)
... |
40023e08f45f458f5f841acc94a574f7e1122e1915b3b7cf3c46735286fc87e1 | pistacchio/deviantchecker | scraper.clj | (ns org.github.pistacchio.deviantchecker.scraper
(:use net.cgrand.enlive-html)
(:import java.net.URL))
;; ** utils ** ;;
(defn- enlive-slurp-page
"returns an enevelop form from string url"
[url] (-> url URL. html-resource ))
;; ** scrape methods ** ;;
(defn- last-page-gallery-url
"returns a string with the ... | null | https://raw.githubusercontent.com/pistacchio/deviantchecker/8b6c59e7f196b0051abba53b6a616fe4618fa080/src/org/github/pistacchio/deviantchecker/scraper.clj | clojure | ** utils ** ;;
** scrape methods ** ;;
/gallery/offset=2
offset=2 ]
** main methods ** ;;
removes trailing "/" if any
searches for ending /?offset=NUMBER | (ns org.github.pistacchio.deviantchecker.scraper
(:use net.cgrand.enlive-html)
(:import java.net.URL))
(defn- enlive-slurp-page
"returns an enevelop form from string url"
[url] (-> url URL. html-resource ))
(defn- last-page-gallery-url
"returns a string with the last page for the deviantart gallery at base-... |
c27801a245c90fd26f833a8487b9cb22f902f3b3e1ce566d60d410f7469aa2d7 | hiroshi-unno/coar | SCQM_BFSynthesizer.ml | open Core
module Config = struct
type t = { verbose: bool } [@@deriving yojson]
module type ConfigType = sig val config: t end
end
module Make (Cfg: Config.ConfigType) = struct
let synthesize _ _ = Or_error.unimplemented "SCQM_BFSynthesizer.synthesize"
end
| null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/PCSat/bf_synthesis/SCQM_BFSynthesizer.ml | ocaml | open Core
module Config = struct
type t = { verbose: bool } [@@deriving yojson]
module type ConfigType = sig val config: t end
end
module Make (Cfg: Config.ConfigType) = struct
let synthesize _ _ = Or_error.unimplemented "SCQM_BFSynthesizer.synthesize"
end
| |
dfa71a93d7e948671656ab10a94fcaf2a02d31c9f73b32cc9ed10fef0a784616 | qfpl/state-machine-testing-course | ExampleModelProperties.hs | module ExampleModelProperties where
import Hedgehog (MonadGen, PropertyT, Property, property, forAll, (===), withTests)
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import MyBTree
----------------------------------... | null | https://raw.githubusercontent.com/qfpl/state-machine-testing-course/98a93d0f71928e48afb1f6a5489818e12e1740e8/level00/ExampleModelProperties.hs | haskell | --------------------------------------------------------------------------
This module contains an example of an alternative technique for --
testing structures and simple actions. There are no exercises here. :) --
--------------------------------------------------------------------------
Sometimes when test... | module ExampleModelProperties where
import Hedgehog (MonadGen, PropertyT, Property, property, forAll, (===), withTests)
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import MyBTree
We will use the insert and del... |
1d8f56fa631568403f7dac826d9000a9fc7334ecd958fb1622f38dde1f44c5e5 | robert-stuttaford/bridge | data_test.clj | (ns bridge.person.data-test
(:require [bridge.data.datomic :as datomic]
[bridge.person.data :as person.data]
[bridge.person.schema :as person.schema]
[bridge.test.util :refer [conn db test-setup with-database]]
[clojure.spec.alpha :as s]
[clojure.test :refer... | null | https://raw.githubusercontent.com/robert-stuttaford/bridge/867d81354457c600cc5c25917de267a8e267c853/test/bridge/person/data_test.clj | clojure | (ns bridge.person.data-test
(:require [bridge.data.datomic :as datomic]
[bridge.person.data :as person.data]
[bridge.person.schema :as person.schema]
[bridge.test.util :refer [conn db test-setup with-database]]
[clojure.spec.alpha :as s]
[clojure.test :refer... | |
14497cc5b72e7bfef65b336e02e751cbf4dba9d3c22130bba33d9db002d7367d | locusmath/locus | object.clj | (ns locus.algebra.commutative.semigroup.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.mapping.general.core.ob... | null | https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/algebra/commutative/semigroup/object.clj | clojure | A commutative semigroup is a naturally preordered algebraic structure. The preordering on the
Green preorders by commutativity. By the universality of condensation, every commutative
semigroup can be condensed to form a commutative J-trivial semigroup by taking the quotient
of the commutative semigroup by the congr... | (ns locus.algebra.commutative.semigroup.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.mapping.general.core.ob... |
8b23504a04a2b36f90347dbde60aba39c3a8af495a7ab714dca27c6c0a38b2cb | oakes/Nightlight | dev.cljs | (ns nightlight.dev
(:require [nightlight.core]
[orchestra-cljs.spec.test :as st]
[expound.alpha :as expound]
[clojure.spec.alpha :as s]))
(st/instrument)
(set! s/*explain-out* expound/printer)
| null | https://raw.githubusercontent.com/oakes/Nightlight/51ed9bcd7286c2833bb48daf9cb0624e4e7b0e14/src/nightlight/dev.cljs | clojure | (ns nightlight.dev
(:require [nightlight.core]
[orchestra-cljs.spec.test :as st]
[expound.alpha :as expound]
[clojure.spec.alpha :as s]))
(st/instrument)
(set! s/*explain-out* expound/printer)
| |
57ffa3720a03ed79621ed2ac427c6d37979487e1708bfbe595573571969001ab | jimpil/Clondie24 | chess.clj | (ns Clondie24.games.chess
(:require [Clondie24.lib.util :as ut]
[Clondie24.lib.core :as core]
[Clondie24.lib.search :as s]
[Clondie24.lib.fmoves :as fmov]
[Clondie24.lib.gui :as gui]
[enclog.nnets :as ai]
;[clojure.core.memoize :a... | null | https://raw.githubusercontent.com/jimpil/Clondie24/7045fab11bfd6e94cd95c032149a97146bae8d89/src/Clondie24/games/chess.clj | clojure | [clojure.core.memoize :as memo]
----------------------------------------<SOURCE>--------------------------------------------------------------------
----------------------------------------<CODE>----------------------------------------------------------------------
funny colour name!
will need these
returning :out bec... | (ns Clondie24.games.chess
(:require [Clondie24.lib.util :as ut]
[Clondie24.lib.core :as core]
[Clondie24.lib.search :as s]
[Clondie24.lib.fmoves :as fmov]
[Clondie24.lib.gui :as gui]
[enclog.nnets :as ai]
#_[clj-tuple :refer [tupl... |
9bbee722b4e2a47a5144fc52d80b4df103a84775c748c25d88c21ffbd16a7bde | soywod/unfog | Notifier.hs | module Unfog.Subscriber.Notifier where
import Unfog.Command.Types (Command)
import qualified Unfog.Subscriber.Logger as Logger (subscriber)
import Unfog.Subscriber.Types (ShortenId)
notify :: ShortenId -> [Command] -> IO ()
notify shortenId cmds = mapM_ (notify' cmds) subscribers
where
subscribers = [Logger.sub... | null | https://raw.githubusercontent.com/soywod/unfog/9271f74cf92a2135888b97d9aa91b396bb1eff43/lib/Unfog/Subscriber/Notifier.hs | haskell | module Unfog.Subscriber.Notifier where
import Unfog.Command.Types (Command)
import qualified Unfog.Subscriber.Logger as Logger (subscriber)
import Unfog.Subscriber.Types (ShortenId)
notify :: ShortenId -> [Command] -> IO ()
notify shortenId cmds = mapM_ (notify' cmds) subscribers
where
subscribers = [Logger.sub... | |
419eb815f11a468dfc2479f6bf272f3bdc437411e45720e8677f79cee9bbdc93 | csabahruska/jhc-components | UnionFind.hs | module Util.UnionFind(
Element,
T,
find,
fromElement,
getW,
new,
new_,
putW,
union,
union_,
updateW
) where
import Control.Monad.Trans
import Data.IORef
import Data.Unique
import Control.Monad (when)
data Element w a = Element a !Unique {-# UNPACK #-} !(IORef (Link w a)... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-common/src/Util/UnionFind.hs | haskell | # UNPACK #
# UNPACK # | module Util.UnionFind(
Element,
T,
find,
fromElement,
getW,
new,
new_,
putW,
union,
union_,
updateW
) where
import Control.Monad.Trans
import Data.IORef
import Data.Unique
import Control.Monad (when)
type T = Element
new :: MonadIO m => w -> a -> m (Element w a)
new w... |
91403606e29115c11b51b7fea45f2bec5fd0796de6ec625f38d74d8ce0e49eb7 | roman01la/minimax | logger.clj | (ns minimax.logger
(:refer-clojure :exclude [time]))
(def debug? (System/getenv "MINIMAX_DEBUG"))
(defn debug* [file line column & args]
(let [file-str (str file ":" line ":" column)]
(apply println "[MINIMAX]" file-str args)))
(defmacro debug [& args]
(when debug?
(let [{:keys [line column]} (meta &fo... | null | https://raw.githubusercontent.com/roman01la/minimax/f371c199d55a2a219ed7cf5f2dd2e079be99f963/src/minimax/logger.clj | clojure | (ns minimax.logger
(:refer-clojure :exclude [time]))
(def debug? (System/getenv "MINIMAX_DEBUG"))
(defn debug* [file line column & args]
(let [file-str (str file ":" line ":" column)]
(apply println "[MINIMAX]" file-str args)))
(defmacro debug [& args]
(when debug?
(let [{:keys [line column]} (meta &fo... | |
5804d591f90346db85423eb8d7445a2b9dc32b19790898437192db9da1961e3f | buntine/Haskell--Craft-of-FP | MakeCode.hs | --
MakeCode.lhs
--
Huffman coding in Haskell .
--
( c ) , 1995 , 1998 .
--
module MakeCode ( codes, codeTable ) where
import Types
import Frequency ( frequency )
import MakeTree ( makeTree )
import CodeTable ( codeTable )
-- Putt... | null | https://raw.githubusercontent.com/buntine/Haskell--Craft-of-FP/a1a8cd70eb9d1609fd384e608b7fe26b2a878803/Huffman/MakeCode.hs | haskell |
Putting together frequency calculation and tree conversion | MakeCode.lhs
Huffman coding in Haskell .
( c ) , 1995 , 1998 .
module MakeCode ( codes, codeTable ) where
import Types
import Frequency ( frequency )
import MakeTree ( makeTree )
import CodeTable ( codeTable )
codes :: [Char] -> Tree
codes = makeTree . frequency... |
66d856b269892f97aeb1b0860face2e3eb76360406b7a7e5b6bd81665d858e5e | NalaGinrut/guile-lua-rebirth | type-inference.scm | Copyright ( C ) 2014,2016
" Mu Lei " known as " NalaGinrut " < >
;; This file 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 option) any later ... | null | https://raw.githubusercontent.com/NalaGinrut/guile-lua-rebirth/ca52e0f481d3b1702810b822c7d316b18456d13e/language/lua/type-inference.scm | scheme | This file is free software: you can redistribute it and/or modify
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public L... | Copyright ( C ) 2014,2016
" Mu Lei " known as " NalaGinrut " < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
NOTE : Although there 's ty... |
e7b7b61d23fcb4ea3bda846db3e35ee9796239876eb9b9f4ab23c6f417ce7bdf | chapmanb/r-var | external.clj | (comment "
Generate HTML link outs for external data references.
")
(ns rvar.external
(:use [clojure.string :only [lower-case]]
[hiccup.core]
[ring.util.codec :only [url-encode]]
[rvar.model])
(:require [clojure.contrib.str-utils2 :as str2]))
(defn- ext-link [url content]
[:a {:href ur... | null | https://raw.githubusercontent.com/chapmanb/r-var/6fce17dd0460c78c3a210a95f16aacbdd70ccf0a/src/rvar/external.clj | clojure | (comment "
Generate HTML link outs for external data references.
")
(ns rvar.external
(:use [clojure.string :only [lower-case]]
[hiccup.core]
[ring.util.codec :only [url-encode]]
[rvar.model])
(:require [clojure.contrib.str-utils2 :as str2]))
(defn- ext-link [url content]
[:a {:href ur... | |
15da30b920f4f86bfc05c06930a7d91618356e8e6556e0e286bfda613b46cf1a | charlieg/Sparser | rules.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1993 - 2005 -- all rights reserved
extensions copyright ( c ) 2008 BBNT Solutions LLC . All Rights Reserved
$ Id:$
;;;
;;; File: "rules"
;;; Module: "grammar;model:sl:reports:"
version : 0.1 March 2005
initiated 10/2... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/sl/reports/rules.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "rules"
Module: "grammar;model:sl:reports:"
(///which is too strong since people do these things too, albeit at
a lower frequency). Also pulled the 'shallow adverb' rules in favor of
moving them to the modifiers themselves.
0.2 11/13/08 Ind... | copyright ( c ) 1993 - 2005 -- all rights reserved
extensions copyright ( c ) 2008 BBNT Solutions LLC . All Rights Reserved
$ Id:$
version : 0.1 March 2005
initiated 10/22/93 v2.3 restarting from scratch . 1/8/96 added cs rule
for companies . 1/9 added vg rules .
0.1 3/11/05 Added variation cs ... |
abad82b9c6985ac76c49467cc1c771c577ee63a324c33b7710176287a97b66b1 | facebook/flow | files.ml |
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/9f965e5e4b635bc2f0eba1c5d81a6a31ba0d057a/src/common/files.ml | ocaml | ************* file filter utils **************
Every <file>.js can be imported by its path, so it effectively exports a
module by the name <file>.js. Every <file>.js.flow shadows the corresponding
<file>.js, so it effectively exports a module by the name <file>.js.
This is the set of file extensions which we w... |
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
e1398bbb5a62803c2f8f86923df14492092461e94dada5c6c31bdceb97b26072 | dhleong/wish | campaign_browser.cljs | (ns ^{:author "Daniel Leong"
:doc "campaign-browser"}
wish.views.campaign-browser
(:require [wish.util :refer [<sub]]
[wish.util.nav :refer [campaign-url]]
[wish.views.widgets :refer [icon link]]))
(defn page []
[:div
[:h3
[link {:href "/"}
(icon :home)]
"Campaigns"]... | null | https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/views/campaign_browser.cljs | clojure | (ns ^{:author "Daniel Leong"
:doc "campaign-browser"}
wish.views.campaign-browser
(:require [wish.util :refer [<sub]]
[wish.util.nav :refer [campaign-url]]
[wish.views.widgets :refer [icon link]]))
(defn page []
[:div
[:h3
[link {:href "/"}
(icon :home)]
"Campaigns"]... | |
bd9aa992d32b11e0b06f39e8df9194cc1ec1d3bb89b85d4ea909e04c04bb4024 | Eonblast/Scalaxis | comm_conn_rcv.erl | 2007 - 2011 Zuse Institute Berlin
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
di... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/comm_layer/comm_conn_rcv.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2007 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@author < >
-module(comm_conn_rcv).
-author('').
-author('').
-vsn('$Id$').
-define(TRACE(X,Y), ok).
-behaviou... |
3fa4b54054d5270a5b9337280f9530916a208ab0e368d9fa0bbc50ba2ee2a5d8 | janestreet/rpc_parallel | how_to_run.mli | open! Core
open Async
(** Describes everything needed for Rpc_parallel to launch a worker. *)
type t
(** A local worker needs no special information. Rpc_parallel runs the same executable
that the master is using. *)
val local : t
(** In order to run a worker remotely, you must ensure that the executable is avai... | null | https://raw.githubusercontent.com/janestreet/rpc_parallel/b37ce51ddfd9d9b6f96d285c81db7fc36d66a1d5/src/how_to_run.mli | ocaml | * Describes everything needed for Rpc_parallel to launch a worker.
* A local worker needs no special information. Rpc_parallel runs the same executable
that the master is using.
* In order to run a worker remotely, you must ensure that the executable is available on
the remote host. If [~assert_binary_hash:fa... | open! Core
open Async
type t
val local : t
val remote : ?assert_binary_hash:bool -> _ Remote_executable.t -> t
val wrap : t -> f:(Prog_and_args.t -> Prog_and_args.t) -> t
val run
: t
-> env:(string * string) list
-> worker_command_args:string list
-> Process.t Or_error.t Deferred.t
|
9dc0ace15da1b172e5478b8aafa05e32c1f1c56947f222dfc361e826b55357d8 | metabase/metabase | h2.clj | (ns metabase.driver.h2
(:require
[clojure.math.combinatorics :as math.combo]
[clojure.string :as str]
[java-time :as t]
[metabase.db.jdbc-protocols :as mdb.jdbc-protocols]
[metabase.db.spec :as mdb.spec]
[metabase.driver :as driver]
[metabase.driver.common :as driver.common]
[metabase.driver.h... | null | https://raw.githubusercontent.com/metabase/metabase/32adcb1dbfdf9df73ccdd20a77d1aa69132539ef/src/metabase/driver/h2.clj | clojure | +----------------------------------------------------------------------------------------------------------------+
| metabase.driver impls |
+--------------------------------------------------------------------------------------... | (ns metabase.driver.h2
(:require
[clojure.math.combinatorics :as math.combo]
[clojure.string :as str]
[java-time :as t]
[metabase.db.jdbc-protocols :as mdb.jdbc-protocols]
[metabase.db.spec :as mdb.spec]
[metabase.driver :as driver]
[metabase.driver.common :as driver.common]
[metabase.driver.h... |
c1f2152c299e7836a4549ad3e393b994efb166b148bd2f275caa52f36d122f54 | bob-cd/bob | artifact.clj | ; Copyright 2018- Rahul De
;
Use of this source code is governed by an MIT - style
; license that can be found in the LICENSE file or at
; .
(ns runner.artifact
(:require
[babashka.http-client :as http]
[clojure.spec.alpha :as spec]
[clojure.string :as s]
[clojure.tools.logging :as log]
[common.sche... | null | https://raw.githubusercontent.com/bob-cd/bob/ce340eafd179aee7f20bdaf29e291916c94a7337/runner/src/runner/artifact.clj | clojure | Copyright 2018- Rahul De
license that can be found in the LICENSE file or at
. | Use of this source code is governed by an MIT - style
(ns runner.artifact
(:require
[babashka.http-client :as http]
[clojure.spec.alpha :as spec]
[clojure.string :as s]
[clojure.tools.logging :as log]
[common.schemas]
[failjure.core :as f]
[runner.engine :as eng]
[xtdb.api :as xt]))
(defn ... |
7003720303f8444fa7dbca2f0e03e8831e64532945fc374a7613d37a13407e92 | bgamari/ghc-debug | Client.hs | | The main API for creating debuggers . For example , this API can be used
to connect to an instrumented process , query the GC roots and then decode
the first root up to depth 10 and displayed to the user .
@
main = withDebuggeeConnect " \/tmp\/ghc - debug " p1
p1 : : Debuggee - > IO ( )
p1 e = do
... | null | https://raw.githubusercontent.com/bgamari/ghc-debug/a72e75449df0833eaaccd9ae67948aabb6b3da38/client/src/GHC/Debug/Client.hs | haskell | * Running/Connecting to a debuggee
* Running DebugM
* Pause/Resume
* Basic Requests
* Building a Heap Graph
* Printing a heap graph
* Tracing
* Caching
* Types
controls how many levels to recurse. You nearly always want to set this
controls how many levels to recurse. You nearly always want to set this
memo... | | The main API for creating debuggers . For example , this API can be used
to connect to an instrumented process , query the GC roots and then decode
the first root up to depth 10 and displayed to the user .
@
main = withDebuggeeConnect " \/tmp\/ghc - debug " p1
p1 : : Debuggee - > IO ( )
p1 e = do
... |
0938bc6ca67110160c0a0e244bf990ee124f86fc62c2e1166a323bca03e5e992 | aprolog-lang/aprolog | nstbl.mli | (* Namespace tables *)
type sym =
Child of string * sym
| Base of string
;;
type path =
Root of sym
| Rel of sym
type 'a t;;
val pp_sym : sym Printer.printer;;
val ns2s : sym -> string;;
val pp_path : path Printer.printer;;
val p2s : path -> string;;
val get_base : sym -> string;;
val create : int ... | null | https://raw.githubusercontent.com/aprolog-lang/aprolog/410327a615919eb6827d71661e69de14279b8c50/src/nstbl.mli | ocaml | Namespace tables |
type sym =
Child of string * sym
| Base of string
;;
type path =
Root of sym
| Rel of sym
type 'a t;;
val pp_sym : sym Printer.printer;;
val ns2s : sym -> string;;
val pp_path : path Printer.printer;;
val p2s : path -> string;;
val get_base : sym -> string;;
val create : int -> 'a t;;
val find : 'a... |
ae46fd158cf06b15e7aa270b974a88745e9b18575c90c75fe4da3d707b1241a6 | ryanpbrewster/haskell | 12.hs | -- 12.hs
{-# LANGUAGE OverloadedStrings #-}
import Data.Aeson
import qualified Data.ByteString.Lazy as B
import qualified Data.HashMap.Strict as HM
import Data.Scientific
main = do
inp <- B.getContents
case eitherDecode inp :: Either String Value of
Left err -> putStrLn err
Right v -> do
print $ sumN... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/AdventOfCode-2015/12.hs | haskell | 12.hs
# LANGUAGE OverloadedStrings # | import Data.Aeson
import qualified Data.ByteString.Lazy as B
import qualified Data.HashMap.Strict as HM
import Data.Scientific
main = do
inp <- B.getContents
case eitherDecode inp :: Either String Value of
Left err -> putStrLn err
Right v -> do
print $ sumNumbers v
print $ sumNumbers $ dropRedO... |
e526de5cec2de031095a6a61a08862ab9e99a15118ee5fdb2e52e62791814550 | marianoguerra/efe | ast.erl | -module(ast).
An map transformer of Erlang abstract syntax based on erl_id_trans.erl
This module only traverses legal Erlang code . This is most noticeable
%% in guards where only a limited number of expressions are allowed.
%% N.B. if this module is to be used as a basis for transforms then
%% all the error case... | null | https://raw.githubusercontent.com/marianoguerra/efe/a8e748c98a5a32ef2338416232463b2e34a2d061/src/ast.erl | erlang | in guards where only a limited number of expressions are allowed.
N.B. if this module is to be used as a basis for transforms then
all the error cases must be handled otherwise this module just crashes!
-type form(Form) -> Form.
Here we show every known form and valid internal structure. We do not
that the orde... | -module(ast).
An map transformer of Erlang abstract syntax based on erl_id_trans.erl
This module only traverses legal Erlang code . This is most noticeable
-export([map/3, reduce/4]).
-export([clause/3, expr/3, exprs/3, head/3, guard/3, pattern/3,
function_type_list/3, farity_list/3, type/3, variable_li... |
1907db803eef8a9ca8358b90805d50bf3c279c3e68b5126267940b0448ac9f2f | haskell-opengl/OpenGLRaw | TextureView.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.TextureView
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
--------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/TextureView.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ARB.TextureView
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ARB.TextureView (
glGetARBTextureView,
gl_ARB_texture_view,
pattern GL_TEXTURE_IMMUTABLE_LEVELS,
pattern GL_TEXTURE_VIEW_MIN_LAYER,
pattern GL_TEXTURE_VIEW_MIN_LEVEL,
pattern GL_TEXTURE_VIEW_NUM_LAYERS... |
3640743172039fbf73a875c450a3a323ec3d5652f2e940f1e464b5f010666735 | oriansj/mes-m2 | quasiquote.scm | GNU --- Maxwell Equations of Software
Copyright © 2016,2018 Jan ( janneke ) Nieuwenhuizen < >
;;;
This file is part of GNU .
;;;
GNU 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... | null | https://raw.githubusercontent.com/oriansj/mes-m2/b44fbc976ae334252de4eb82a57c361a195f2194/test/test010/quasiquote.scm | scheme |
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Setup output file | GNU --- Maxwell Equations of Software
Copyright © 2016,2018 Jan ( janneke ) Nieuwenhuizen < >
This file is part of GNU .
under the terms of the GNU General Public License as published by
GNU is distributed in the hope that it will be useful , but
You should have received a copy of the GNU General Public... |
4bafc55b8e866c1820c05135ba48eec4a578ad37a8d5743c03d761f27db69929 | janestreet/async_inotify | ocaml_inotify.ml | module Inotify = Inotify
| null | https://raw.githubusercontent.com/janestreet/async_inotify/699a31ace8e04c8cbed616b538b89e6071415df0/src/ocaml_inotify.ml | ocaml | module Inotify = Inotify
| |
ae53a82a20fe85873482b4db7458580c3c716b0f9e83970b85cd411f10df241a | noinia/hgeometry | CmpAround.hs | module Geometry.Point.CmpAround where
import Control.Lens ((^.))
import Data.Ext
import Geometry.Point
import Geometry.Vector(qdA)
| Counter clockwise ordering of the points around c. Points are ordered with
-- respect to the positive x-axis.
ccwCmpAroundByQuadrant :: (Num r, Ord r)
... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/test/src/Geometry/Point/CmpAround.hs | haskell | respect to the positive x-axis.
if the quadrant differs, use the order
specified by the quadrant.
if the quadrant differs, use the order
specified by the quadrant.
| Original implementation of cw with distance check
if the quadrant differs, use the order
specified by the quadrant. | module Geometry.Point.CmpAround where
import Control.Lens ((^.))
import Data.Ext
import Geometry.Point
import Geometry.Vector(qdA)
| Counter clockwise ordering of the points around c. Points are ordered with
ccwCmpAroundByQuadrant :: (Num r, Ord r)
=> Point 2 r :+ qc -> Point 2 r... |
ce7e7f33075bf9b98f7bc71e71e381f7d6b6188e41a410e468283b1b8f87d0cc | tel/oauthenticated | MuLens.hs | # LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
-- |
Module : Network . OAuth . MuLens
Copyright : ( c ) 2013
License : MIT
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
Tiny , @Control . Lens@ compatibility layer .
module Network... | null | https://raw.githubusercontent.com/tel/oauthenticated/ce90a737ce6a887a5724e5fabd37acfc74a2fccd/src/Network/OAuth/MuLens.hs | haskell | # LANGUAGE RankNTypes #
|
Stability : experimental
Portability : non-portable
* Basics
* Generalizations
* Building
# INLINE set #
# INLINE (<&>) #
# INLINE (^.) #
# INLINE (%~) # | # LANGUAGE MultiParamTypeClasses #
Module : Network . OAuth . MuLens
Copyright : ( c ) 2013
License : MIT
Maintainer :
Tiny , @Control . Lens@ compatibility layer .
module Network.OAuth.MuLens (
view, set,
over, foldMapOf,
(<&>), (&), (^.), (.~), (%~),
) where
import Da... |
b8d93b868d14332a405b4561790f612599d1651cce0b2c90c9a7533d409d440f | amnh/PCG | Custom.hs | # LANGUAGE FlexibleContexts #
module Test.Custom (module X, nodeInvariantHolds) where
import Bio.PhyloGraph.Network
import Test.Custom.Constructions as X
import Test.Custom.Parse as X
import Test.Custom.Tree as X
import Test.Custom.Types ()
import Test.... | null | https://raw.githubusercontent.com/amnh/PCG/3a1b6bdde273ed4dc09717623986e1144b006904/lib/core/data-structures/src/Test/Custom.hs | haskell | # LANGUAGE FlexibleContexts #
module Test.Custom (module X, nodeInvariantHolds) where
import Bio.PhyloGraph.Network
import Test.Custom.Constructions as X
import Test.Custom.Parse as X
import Test.Custom.Tree as X
import Test.Custom.Types ()
import Test.... | |
f8f7c6617dfd7bd2e37f59f34a22ff8a5a85dbbea62711fd9d10cdf9731d1e74 | ghc/ghc | Main2.hs | module Main2 where
main :: IO ()
main = return ()
| null | https://raw.githubusercontent.com/ghc/ghc/85ecc1a0fd6536149ae2b54f4b1985d80c0e21cb/testsuite/tests/driver/fat-iface/T22405/Main2.hs | haskell | module Main2 where
main :: IO ()
main = return ()
| |
66909e6ed6d24627ea51db1b3c23ec53e4bc0600ef8f51ee0821316bf3258887 | joinr/spork | depq.clj | ;;Operations defining double-ended priority queues.
;;This arose from needing to have bounded operations in
;;beam search.
(ns spork.data.depq)
| null | https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/data/depq.clj | clojure | Operations defining double-ended priority queues.
This arose from needing to have bounded operations in
beam search.
| (ns spork.data.depq)
|
c277a6b7252aeb088e1427e2bd3b859da64648b413f9b9cb7b53eb094b08eb22 | haskell-tools/haskell-tools | BetweenImports_res.hs | # LANGUAGE CPP #
module CPP.BetweenImports where
import CPP.A(a)
#if !(MIN_VERSION_text(1,2,1))
#endif
x = a
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/CPP/BetweenImports_res.hs | haskell | # LANGUAGE CPP #
module CPP.BetweenImports where
import CPP.A(a)
#if !(MIN_VERSION_text(1,2,1))
#endif
x = a
| |
18b6bce69c1544f9a51244cefea9e32c0e8c397e83f78207645eac562bcd1d48 | camlspotter/ocamloscope.2 | render.ml | open Spotlib.Spot
open List
open Tyxml
module H = Html
let html_to_string html =
let b = Buffer.create 1000 in
let ppf = Format.formatter_of_buffer b in
H.pp () ppf html;
Format.pp_print_flush ppf ();
Buffer.contents b
(** Same as [html_to_string] but takes any elt *)
let html_elt_to_string html =
let b =... | null | https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/server/render.ml | ocaml | * Same as [html_to_string] but takes any elt
Trec_not or other
XXX I guess the return type is integrated into ty already
XXX I guess the retun type is integrated into ty already
CR jfuruse: todo None: closed, Some true: _.., Some false: ..
?
?
not sure...
XXX how abstract class is encoded??
@ [ spans " : ... | open Spotlib.Spot
open List
open Tyxml
module H = Html
let html_to_string html =
let b = Buffer.create 1000 in
let ppf = Format.formatter_of_buffer b in
H.pp () ppf html;
Format.pp_print_flush ppf ();
Buffer.contents b
let html_elt_to_string html =
let b = Buffer.create 1000 in
let ppf = Format.formatte... |
69ad4e2bb284be9f601d2d5c164a8b4097f1818ee34c80416510660d1c5553c2 | NorfairKing/tickler | VerificationEmailConverter.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Tickler.Server.Looper.VerificationEmailConverter
( VerificationEmailConverterSettings (..),
runVerificationEmailConverter,
verificationEmailSubject,
verificationEmai... | null | https://raw.githubusercontent.com/NorfairKing/tickler/71c6aec471d095fe2357e135bed90a92619de393/tickler-server/src/Tickler/Server/Looper/VerificationEmailConverter.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Tickler.Server.Looper.VerificationEmailConverter
( VerificationEmailConverterSettings (..),
runVerificationEmailConverter,
verificationEmailSubject,
verificationEmailTextContent,
verificationEmail... |
6e6f7bd5a942bad3fb4e47d8bd85f1e4b8f23e1e6f64891304aafc62f5805acb | YoshikuniJujo/funpaala | safeSqrt1.hs | safeSqrt x
| x >= 0 = Just (sqrt x)
| otherwise = Nothing
| null | https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/05_function/safeSqrt1.hs | haskell | safeSqrt x
| x >= 0 = Just (sqrt x)
| otherwise = Nothing
| |
15387b5dc34692d14855392554d56df529b04cd0a6ab51bca5b7714cf4e0dd19 | funimage/funimage | filters.clj | (ns funimage.filters
(:require [clojure.string :as string])
(:import [net.imglib2.img ImagePlusAdapter Img]
[net.imglib2.img.display.imagej ImageJFunctions]
[net.imglib2.type NativeType]
[net.imglib2.type.numeric NumericType]
[net.imglib2.type.numeric.real FloatType]
... | null | https://raw.githubusercontent.com/funimage/funimage/397d1ed9a1c11287f8562d05c10040ce24717f04/src/funimage/filters.clj | clojure | (ns funimage.filters
(:require [clojure.string :as string])
(:import [net.imglib2.img ImagePlusAdapter Img]
[net.imglib2.img.display.imagej ImageJFunctions]
[net.imglib2.type NativeType]
[net.imglib2.type.numeric NumericType]
[net.imglib2.type.numeric.real FloatType]
... | |
b1eef480959a7791518220be1d4020d7058bf3ffc6533bcc2e434fad67b85dbc | walmartlabs/active-status | progress.clj | (ns com.walmartlabs.active-status.progress
"Utilties to make it easier for long-running jobs to report progress."
{:added "0.1.15"}
(:require
[clojure.core.async :refer [put! timeout go <! >!]]
[com.walmartlabs.active-status :as as]
[clojure.string :as str]))
(defn report-progress?
"Returns true if... | null | https://raw.githubusercontent.com/walmartlabs/active-status/a56a571ab9e13051a05d9ccd4b65a64314867a0f/src/com/walmartlabs/active_status/progress.clj | clojure | returns channel that conveys rows
do work with the row
The job channel closes when the status board is itself shutdown. | (ns com.walmartlabs.active-status.progress
"Utilties to make it easier for long-running jobs to report progress."
{:added "0.1.15"}
(:require
[clojure.core.async :refer [put! timeout go <! >!]]
[com.walmartlabs.active-status :as as]
[clojure.string :as str]))
(defn report-progress?
"Returns true if... |
1c7f491aad37e2d18e325f6f612f656602f2d26601279bce39400b8e3a1154d7 | rudymatela/speculate | Misc.hs | -- |
-- Module : Test.Speculate.Utils.Misc
Copyright : ( c ) 2016 - 2019
License : 3 - Clause BSD ( see the file LICENSE )
Maintainer : < >
--
-- This module is part of Speculate.
--
-- Miscellaneous utilities.
module Test.Speculate.Utils.Misc where
import Data.Maybe
import Data.Ratio
impor... | null | https://raw.githubusercontent.com/rudymatela/speculate/8ec39747d03033db4349d554467d4b78bb72935d/src/Test/Speculate/Utils/Misc.hs | haskell | |
Module : Test.Speculate.Utils.Misc
This module is part of Speculate.
Miscellaneous utilities.
easy debug: | Copyright : ( c ) 2016 - 2019
License : 3 - Clause BSD ( see the file LICENSE )
Maintainer : < >
module Test.Speculate.Utils.Misc where
import Data.Maybe
import Data.Ratio
import Test.Speculate.Utils.String
import Test.Speculate.Utils.List
undefined1 :: a
undefined1 = error "undefined1"
undefi... |
c25f9e10acc547348834dccba0fbe185b81bf50199f4c518d6a3c15fa3c273eb | facundominguez/stitch-lh | Nat.hs | # OPTIONS_GHC -fplugin = LiquidHaskell #
module Language.Stitch.LH.Data.Nat where
import Prelude hiding (max)
@ type = { v : Int | v > = 0 } @
type Nat = Int
{-@ inline max @-}
max :: Ord a => a -> a -> a
max a b = if a > b then a else b
{-@ inline minus @-}
minus :: Nat -> Nat -> Nat
minus a b = max 0 (a - b)
| null | https://raw.githubusercontent.com/facundominguez/stitch-lh/506f1f3c9061e43b57d5f6bb1f616db0dd98e2c1/src/Language/Stitch/LH/Data/Nat.hs | haskell | @ inline max @
@ inline minus @ | # OPTIONS_GHC -fplugin = LiquidHaskell #
module Language.Stitch.LH.Data.Nat where
import Prelude hiding (max)
@ type = { v : Int | v > = 0 } @
type Nat = Int
max :: Ord a => a -> a -> a
max a b = if a > b then a else b
minus :: Nat -> Nat -> Nat
minus a b = max 0 (a - b)
|
cdefced104d203e2a1f90b0a8ed10a8374bec8b7abdadda8c17ff2beea797168 | mks-m/wower | wower_sup.erl | -module(wower_sup).
-author('keymone <>').
-behaviour(supervisor).
-export([start_link/0, upgrade/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
upgrade() ->
{ok, {_, Specs}} = init([]),
Old = sets:from_list([Name || {Name, _, _, _} <- supervisor:which_chil... | null | https://raw.githubusercontent.com/mks-m/wower/ce9724876cf57b67ce72f2a9a6f74bb1ebffd53a/common/src/wower_sup.erl | erlang | -module(wower_sup).
-author('keymone <>').
-behaviour(supervisor).
-export([start_link/0, upgrade/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
upgrade() ->
{ok, {_, Specs}} = init([]),
Old = sets:from_list([Name || {Name, _, _, _} <- supervisor:which_chil... | |
5dec23e695d8b4e13aed681faa369d79e5f0ab780a501350c29b31c847642604 | clojure-interop/google-cloud-clients | KeySet.clj | (ns com.google.cloud.spanner.KeySet
"Defines a collection of Cloud Spanner keys and/or key ranges. All the keys are expected to be in
the same table or index. The keys need not be sorted in any particular way.
If the same key is specified multiple times in the set (for example if two ranges, two keys,
or a key... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/KeySet.clj | clojure | (ns com.google.cloud.spanner.KeySet
"Defines a collection of Cloud Spanner keys and/or key ranges. All the keys are expected to be in
the same table or index. The keys need not be sorted in any particular way.
If the same key is specified multiple times in the set (for example if two ranges, two keys,
or a key... | |
6274eae5e52f99bc4646ad0a79055abbbb42711a7479ac950a86ba98062d9300 | input-output-hk/cardano-ledger | Common.hs | # LANGUAGE DisambiguateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Cardano.Chain.Byron.API.Common (
-- * Extract info from genesis config
allowedDelegator... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/49a84725c4c2ecabc80f6dac215881bc23920962/eras/byron/ledger/impl/src/Cardano/Chain/Byron/API/Common.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
* Extract info from genesis config
* Extract info from chain state
* Annotations
* Headers
------------------------------------------------------------------------------
Extract info from genesis config
--------------------------------------------------------... | # LANGUAGE DisambiguateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Cardano.Chain.Byron.API.Common (
allowedDelegators,
getDelegationMap,
getProtocolParams,
getMaxBlockSize,
reAnnotateBlock,
reAnnotateBoundar... |
1d7300893984433da6dcaec187f1b9ae9487745125d204a0dc879002a038eb14 | Andromedans/andromeda | json.mli | (** The type representing JSON values (simplified) *)
* We enforce the following conventions on exporting datatypes to JSON :
- types which already exist in JSON are exported as such ( ints , strings , lists , ... )
- a value [ { lbl1 = v1 ; ... = vN } ] of record type [ t ] is exported as a dictionary ... | null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/utils/json.mli | ocaml | * The type representing JSON values (simplified)
* [tuple lst] gives the JSON representation of a tuple with the given components.
* [record lst] gives the JSON representation of a record of type [ty] with fields and
values described by the associative list [lst].
* [tag "Tag" v] gives the JSON representation of... |
* We enforce the following conventions on exporting datatypes to JSON :
- types which already exist in JSON are exported as such ( ints , strings , lists , ... )
- a value [ { lbl1 = v1 ; ... = vN } ] of record type [ t ] is exported as a dictionary
[ { " lbl1 " : v1 , .. " " : vN } ]
- ... |
fcbadd314e97903f32901d9202cc333a7a42879192a86f4e62de2069fca82ad2 | kadena-io/chainweb-node | HostAddress.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# OPTI... | null | https://raw.githubusercontent.com/kadena-io/chainweb-node/7879416938b66f6604732b66b52a2dddf26da648/src/Chainweb/HostAddress.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
|
Stability: experimental
All hostnames are considered fully qualified and thus the final dot is
omitted.
@
hostport = host [ ":" port ]
host = hostname | IPv4address
toplabel = alpha | alpha *( alphanum | "-" ) alp... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - orphans #
Module : Chainweb . HostAddress
... |
783c8eb10a9020cd22682f74492ac398e4e7ca5672c08cfdd39845eb3de12b7d | yuriy-chumak/ol | identity_matrix.scm | ; #Ol
(define (make-identity-matrix n)
(map (lambda (i)
(append (repeat 0 i) '(1) (repeat 0 (- n i 1))))
(iota n)))
(for-each print (make-identity-matrix 3))
(for-each print (make-identity-matrix 17)) | null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/identity_matrix.scm | scheme | #Ol |
(define (make-identity-matrix n)
(map (lambda (i)
(append (repeat 0 i) '(1) (repeat 0 (- n i 1))))
(iota n)))
(for-each print (make-identity-matrix 3))
(for-each print (make-identity-matrix 17)) |
e6aee0c2971846f6fae20609d96d9a8ee5ce9ea1ee7129513c66e3e6df4aefba | ml-in-barcelona/server-reason-react | belt_internalBucketsType.ml | type 'a opt = 'a Js.undefined
include (
struct
type ('hash, 'eq, 'c) container =
{ mutable size : int
; mutable buckets : 'c opt array
; hash : 'hash
; eq : 'eq
}
let container :
size:int
-> buckets:'c opt array
-> hash:'hash
-> eq:'eq
... | null | https://raw.githubusercontent.com/ml-in-barcelona/server-reason-react/a5d22907eb2633bcb8e77808f6c677802062953a/lib/belt/belt_internalBucketsType.ml | ocaml | type 'a opt = 'a Js.undefined
include (
struct
type ('hash, 'eq, 'c) container =
{ mutable size : int
; mutable buckets : 'c opt array
; hash : 'hash
; eq : 'eq
}
let container :
size:int
-> buckets:'c opt array
-> hash:'hash
-> eq:'eq
... | |
20d33184ee4dc1b9d49c546e3d54a2dc293e9df4fbcb4f9ca5a0d8c4934f590d | facebookarchive/pfff | parsing_hacks_pp.mli |
val find_ifdef_funheaders:
Token_views_cpp.ifdef_grouped list -> unit
val find_ifdef_bool:
Token_views_cpp.ifdef_grouped list -> unit
val find_ifdef_mid:
Token_views_cpp.ifdef_grouped list -> unit
val find_define_init_brace_paren:
Token_views_cpp.paren_grouped list -> unit
val find_string_macro_paren:
T... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_cpp/parsing/parsing_hacks_pp.mli | ocaml |
val find_ifdef_funheaders:
Token_views_cpp.ifdef_grouped list -> unit
val find_ifdef_bool:
Token_views_cpp.ifdef_grouped list -> unit
val find_ifdef_mid:
Token_views_cpp.ifdef_grouped list -> unit
val find_define_init_brace_paren:
Token_views_cpp.paren_grouped list -> unit
val find_string_macro_paren:
T... | |
caddf72628eca701c23bade7057e72a2f65e9aeebf362ef8992f85d6c17be93a | dapphub/dapptools | Patricia.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
module EVM.Patricia where
import EVM.RLP
import EVM.Types hiding (Literal)
import Control.Monad.Free
import Control.Monad.State
import Data.ByteString (ByteString)
import Data.Foldable (toList)
import Data.List (stripPr... | null | https://raw.githubusercontent.com/dapphub/dapptools/beaaeb6a6ad1cde22989bd088b10bdd06718b73f/src/hevm/src/EVM/Patricia.hs | haskell | Collapses a series of puts and gets down to the monad of your choice
^ The 'put' function for our desired monad
^ The 'get' function for the same monad
^ The puts and gets to execute | # LANGUAGE DeriveFunctor #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
module EVM.Patricia where
import EVM.RLP
import EVM.Types hiding (Literal)
import Control.Monad.Free
import Control.Monad.State
import Data.ByteString (ByteString)
import Data.Foldable (toList)
import Data.List (stripPr... |
876dd8358c135bcb688663a3ba7679a136b55efe655e36181e80f49cf3628795 | cyverse-archive/DiscoveryEnvironmentBackend | metadata.clj | (ns data-info.services.metadata
(:use [clojure-commons.error-codes]
[clojure-commons.validators]
[clj-jargon.init :only [with-jargon]]
[clj-jargon.item-ops :only [copy-stream]]
[clj-jargon.metadata]
[clj-jargon.validations :only [validate-path-lengths]]
[kameleon.uuids ... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/data-info/src/data_info/services/metadata.clj | clojure | (ns data-info.services.metadata
(:use [clojure-commons.error-codes]
[clojure-commons.validators]
[clj-jargon.init :only [with-jargon]]
[clj-jargon.item-ops :only [copy-stream]]
[clj-jargon.metadata]
[clj-jargon.validations :only [validate-path-lengths]]
[kameleon.uuids ... | |
98f2dca243351d5da387bff4e52a7477d57e05486d5c8f420a5aef32bf609a43 | msakai/toysolver | PB.hs | # OPTIONS_GHC -Wall #
{-# OPTIONS_HADDOCK show-extensions #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
-----------------------------------------------------------------------------
-- |
Module : ToySolver . SAT.Store . PB
Copyright : ( c ) 2016
-... | null | https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/src/ToySolver/SAT/Store/PB.hs | haskell | # OPTIONS_HADDOCK show-extensions #
---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : experimental
Portability : non-portable
--------------------------------------------------------------------------- | # OPTIONS_GHC -Wall #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
Module : ToySolver . SAT.Store . PB
Copyright : ( c ) 2016
module ToySolver.SAT.Store.PB
( PBStore
, newPBStore
, getPBFormula
) where
import Control.Monad.Primitive
import D... |
cd9d9d63459914a605d6dd93acec0f532a601d25e1951f501ca0cb316d701d7b | kowey/GenI | GraphvizShowPolarity.hs | -- GenI surface realiser
Copyright ( C ) 2005 and
--
-- 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 2
of the License , or ( at your option ) any later version .
--
-- T... | null | https://raw.githubusercontent.com/kowey/GenI/570a6ef70e61a7cb01fe0fc29732cd9c1c8f2d7a/geni-gui/src/NLP/GenI/GraphvizShowPolarity.hs | haskell | GenI surface realiser
This program is free software; you can redistribute it and/or
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more det... | Copyright ( C ) 2005 and
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple ... |
a7d38e185d563543764355e327c5d52baf3e054bc9e51b74ec3d098439914f28 | Chase-C/Flocking-Simulation | Main.hs | # LANGUAGE ScopedTypeVariables , FlexibleContexts , TypeFamilies , , FlexibleInstances #
module Main (main) where
--------------------------------------------------------------------------------
import System.IO
import Control.Parallel.Strategies (parMap, rdeepseq)
import Control.Monad (unless, ... | null | https://raw.githubusercontent.com/Chase-C/Flocking-Simulation/897ee7adbe2cd7ae27faf37d65c41e6c2d189b0c/src/Main.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----... | # LANGUAGE ScopedTypeVariables , FlexibleContexts , TypeFamilies , , FlexibleInstances #
module Main (main) where
import System.IO
import Control.Parallel.Strategies (parMap, rdeepseq)
import Control.Monad (unless, when, void)
import Control.Monad.Trans.RWS.Strict (RWST, ask, asks, evalRWST, get... |
cb32b967012baa79feda8465528e3d1e531324122c72d8d5aec2f4394cd349fa | elaforge/karya | Z1Spec.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
# OPTIONS_GHC -fno - warn - unused - binds #
In ghc 8 change to :
{ - # OPTIONS_GHC -Wno - warn - unused - top - binds # - }
-- | Utilities to encode and generate z1 sysex dumps.
--
... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/User/Elaforge/Instrument/Z1Spec.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Utilities to encode and generate z1 sysex dumps.
Basic parsing and modification works, but some fields, like effects, are not
parsed.
* finish the effects
- finish osc types
so this works.
* program / ... | Copyright 2013
# OPTIONS_GHC -fno - warn - unused - binds #
In ghc 8 change to :
{ - # OPTIONS_GHC -Wno - warn - unused - top - binds # - }
TODO
module User.Elaforge.Instrument.Z1Spec (
decode, encode, spec_bytes
, program_dump_header, current_program_dump_header
, patch_spec, multiset_spec
) wh... |
39c95467cb844847a81aca03440ce3269aa03b0e3a5fba7914fc36e19b31ccf0 | bufferswap/ViralityEngine | context-defs.lisp | (in-package #:virality)
The gamedev facing interaface to the CORE abstraction for a running
;;;; game instance.
(defclass context ()
((%core :reader core
:initarg :core)
(%active-camera :accessor active-camera
:initform nil)
(%storage :reader storage
:initform (u:di... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/datatype/context-defs.lisp | lisp | game instance. | (in-package #:virality)
The gamedev facing interaface to the CORE abstraction for a running
(defclass context ()
((%core :reader core
:initarg :core)
(%active-camera :accessor active-camera
:initform nil)
(%storage :reader storage
:initform (u:dict #'eq))
(%state... |
26ba2107850a60533bc71c7e2ab1c61aa4f197d137d766f038f16c641ebcb983 | zshipko/resp | resp_unix.mli | module Reader : Resp.READER with type ic = Lwt_io.input_channel
module Writer : Resp.WRITER with type oc = Lwt_io.output_channel
module Backend (Data : Resp_server.DATA) :
Resp_server.SERVER
with type oc = Lwt_io.output_channel
and type ic = Lwt_io.input_channel
and type data = Data.data
module Serve... | null | https://raw.githubusercontent.com/zshipko/resp/4a31461621238d86775b3485adc4a1f0f7202ace/src/resp-unix/resp_unix.mli | ocaml | module Reader : Resp.READER with type ic = Lwt_io.input_channel
module Writer : Resp.WRITER with type oc = Lwt_io.output_channel
module Backend (Data : Resp_server.DATA) :
Resp_server.SERVER
with type oc = Lwt_io.output_channel
and type ic = Lwt_io.input_channel
and type data = Data.data
module Serve... | |
a69d9cded6c45d97df7cae4beb3067a61d3dba2dc15d17249de238a0073128f2 | ocaml/dune | virt.mli | val t : int
| null | https://raw.githubusercontent.com/ocaml/dune/445005f3da4c27dea34b130f7ceaf62ec7b86765/test/blackbox-tests/test-cases/melange/virtual_lib.t/vlib/virt.mli | ocaml | val t : int
| |
e35374c0e5c42bec4068f4007ca31423fac0972821ab5b8ab4c777c7f82f5537 | mvaldesdeleon/haskell-book | tests.hs | module Main where
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
import Exercises (Identity, List, Nope,
PhhhbbtttEither)
main :: IO ()
main =
hspec $... | null | https://raw.githubusercontent.com/mvaldesdeleon/haskell-book/ee4a70708041686abe2f1d951185786119470eb4/ch18/exercises/tests/tests.hs | haskell | module Main where
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
import Exercises (Identity, List, Nope,
PhhhbbtttEither)
main :: IO ()
main =
hspec $... | |
970529563bc5c4801684a1e5d8adb919e5ca403b04095c3a58212053d52cf014 | kitten/bs-rebel | Rebel.ml | (* This is the Rebel entrypoint;
* It's purposefully written so that modules are defined either
* from `src/native` or `src/js` depending on the backend. It's also
* written to support both bsb and bsb-native.
* You'll find the actual externally facing module types in the
* `src/dev/Rebel_types.re` file.
*)
#if ... | null | https://raw.githubusercontent.com/kitten/bs-rebel/21f1942f39b6898c59e45eaca6787300c67eaf8f/src/Rebel.ml | ocaml | This is the Rebel entrypoint;
* It's purposefully written so that modules are defined either
* from `src/native` or `src/js` depending on the backend. It's also
* written to support both bsb and bsb-native.
* You'll find the actual externally facing module types in the
* `src/dev/Rebel_types.re` file.
|
#if BS_NATIVE then
#if BSB_BACKEND = "js" then
module MutableQueue = MutableQueue_js
#else
module MutableQueue = MutableQueue_native
#end
#else
module MutableQueue = MutableQueue_js
#end
#if BS_NATIVE then
#if BSB_BACKEND = "js" then
module MutableStack = MutableStack_js
#else
module Mutab... |
496951ab8fdb1349a815e0662aabe925905b76965578ef28bdafc7869bf27b3c | homebaseio/homebase-react | macros.clj | (ns homebase.dev.macros
{:no-doc true})
(defmacro inline-resource [resource-path]
(slurp resource-path))
| null | https://raw.githubusercontent.com/homebaseio/homebase-react/8c499ade4ce258e0e6ee1d4d9f1aa82aea3ed627/src/dev/homebase/dev/macros.clj | clojure | (ns homebase.dev.macros
{:no-doc true})
(defmacro inline-resource [resource-path]
(slurp resource-path))
| |
a01c16ee007a26c85cac968af8b7dd0e009a9093e74c0b2af978923723a7b54e | TerrorJack/ghc-alter | StaticPtr.hs | {-# LANGUAGE CPP #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
-----------------------------------------------------------------------------
-- |
-- Module : GHC.StaticPtr
Copyright : ( C ) 2014 I / O Tweag
-... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/GHC/StaticPtr.hs | haskell | # LANGUAGE CPP #
---------------------------------------------------------------------------
|
Module : GHC.StaticPtr
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Symbolic references to values.
References to values are usually implemented with m... | # LANGUAGE ExistentialQuantification #
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
Copyright : ( C ) 2014 I / O Tweag
Portability : non - portable ( GHC Extensions )
table is known as the Static Pointer Table . The reference can then be
module GHC.StaticPtr
( StaticPt... |
f6a84248bcc0d399a46fe3547629a0a9327157983f700254e4b6802d74421e75 | bos/rwh | PCRE-nullary.hs | {-# LANGUAGE EmptyDataDecls #-}
module T where
{-- snippet nullary --}
data PCRE
{-- /snippet nullary --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch19/PCRE-nullary.hs | haskell | # LANGUAGE EmptyDataDecls #
- snippet nullary -
- /snippet nullary - |
module T where
data PCRE
|
c59e73fca563e36709d3da174cfa6a54b6e2fd1cdf3f9b7b84534089241a13da | nubank/workspaces | react.cljs | (ns nubank.workspaces.card-types.react
(:require-macros [nubank.workspaces.card-types.react])
(:require [nubank.workspaces.model :as wsm]
[nubank.workspaces.card-types.util :as ct.util]
[cljsjs.react.dom]
[goog.object :as gobj]
[nubank.workspaces.data :as data]
... | null | https://raw.githubusercontent.com/nubank/workspaces/c93802388e1d6e1028dda6868d4fece8a2df8ea1/src/nubank/workspaces/card_types/react.cljs | clojure | (ns nubank.workspaces.card-types.react
(:require-macros [nubank.workspaces.card-types.react])
(:require [nubank.workspaces.model :as wsm]
[nubank.workspaces.card-types.util :as ct.util]
[cljsjs.react.dom]
[goog.object :as gobj]
[nubank.workspaces.data :as data]
... | |
c5add8a2b4f837c3abab4893c5fbd84007fb27a7034f9e258d4d4773eb8b82a1 | jgoerzen/missingpy | Objects.hs | {-# OPTIONS -fallow-overlapping-instances #-}
arch - tag : Python type instances
Copyright ( C ) 2005 < >
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 2 of the Licen... | null | https://raw.githubusercontent.com/jgoerzen/missingpy/ab857768341f172c2b2e2bd496a97290c9fa3d46/Python/Objects.hs | haskell | # OPTIONS -fallow-overlapping-instances #
* Basic Object Types
* Conversions between Haskell and Python Objects
* Information about Python Objects
* Conversions between Python Objects
* Calling Python Objects
| Members of this class can be derived from a Python object.
-------------------------------------------... |
arch - tag : Python type instances
Copyright ( C ) 2005 < >
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 2 of the License , or
( at your option ) any later version... |
87c8a7fb926dd5fdc77283093e6e19b3f26d7e179c266f3f08f6ff691dc9894f | gebi/jungerl | spread_test.erl |
%%%
%%% To verify that something is happening when this test is run, run
%%% the "spuser" program on localhost or another spread-enabled machine,
%%% then use the command "j foo" to join the "foo" group, then run
%%% this test.
%%%
-module(spread_test).
-define(DRV, spread_drv).
-include("spread_drv.hrl").
-export(... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/spread_drv/test/spread_test.erl | erlang |
To verify that something is happening when this test is run, run
the "spuser" program on localhost or another spread-enabled machine,
then use the command "j foo" to join the "foo" group, then run
this test.
pathetic_smoke_coverage(Port2),
?DRV:shutdown(Port2),
This little test will generate all of the messages ... |
-module(spread_test).
-define(DRV, spread_drv).
-include("spread_drv.hrl").
-export([regression/0]).
-export([tiny_active_test/0]).
regression() ->
{ok, Port1} = ?DRV:start(),
pathetic_smoke_coverage(Port1),
?DRV:shutdown(Port1),
{ ok , Port2 } = ? : start_pipe ( ) ,
ok = tiny_active_test(),
... |
10db9419e2648df4542101788da2c7b0716e4fbd0fbe33188b5f8fba844b559b | danielsz/system | quartzite.clj | (ns system.components.quartzite
(:require
[com.stuartsierra.component :as component]
[clojurewerkz.quartzite.scheduler :as qs]))
(defrecord Scheduler [scheduler]
component/Lifecycle
(start [component]
(let [s (-> (qs/initialize) qs/start)]
(assoc component :scheduler s)))
(stop [component]
... | null | https://raw.githubusercontent.com/danielsz/system/4c8bf677e9988eec59033b3af4352567c459b50c/src/system/components/quartzite.clj | clojure | (ns system.components.quartzite
(:require
[com.stuartsierra.component :as component]
[clojurewerkz.quartzite.scheduler :as qs]))
(defrecord Scheduler [scheduler]
component/Lifecycle
(start [component]
(let [s (-> (qs/initialize) qs/start)]
(assoc component :scheduler s)))
(stop [component]
... | |
08581267e41ba9f4c468f04c4d00777942093abae3986cc0e6255721e74fffc8 | jafingerhut/cljol | dig9.clj | (ns cljol.dig9
(:refer-clojure :exclude [time])
(:import (java.lang.reflect Field Method Modifier))
(:import (org.openjdk.jol.info ClassLayout ClassData FieldData))
(:import (org.openjdk.jol.vm VM))
(:import (com.fingerhutpress.cljol_jvm_support GraphLayout2 GraphPathRecord2))
(:require [clojure.set :as set... | null | https://raw.githubusercontent.com/jafingerhut/cljol/2b0eb2b6ec3197434ede3adbd0a13d4b53c06dd0/src/clj/cljol/dig9.clj | clojure | all example source code mentioned below was found, library source
example command lines:
-tools/jol/
Function class-layout->str as adapted from the following source
code:
-tools/jol/file/a6a3bf9b6636/jol-cli/src/main/java/org/openjdk/jol/operations/ObjectInternals.java
Sample call:
(println (class-layout->str #... | (ns cljol.dig9
(:refer-clojure :exclude [time])
(:import (java.lang.reflect Field Method Modifier))
(:import (org.openjdk.jol.info ClassLayout ClassData FieldData))
(:import (org.openjdk.jol.vm VM))
(:import (com.fingerhutpress.cljol_jvm_support GraphLayout2 GraphPathRecord2))
(:require [clojure.set :as set... |
96f9312ae39359a914f871d2269de4c341f21241d7dd5a6425bfe263f59c5fac | mtgred/netrunner | core.clj | (ns web.core
(:require
[monger.collection :as mc]
[web.system :refer [start stop]])
(:gen-class :main true))
(defn -main [& _args]
(let [system (start)
port (-> system :web/server :port)
server-mode (:server/mode system)
db (-> system :mongodb/connection :db)
config (mc/find... | null | https://raw.githubusercontent.com/mtgred/netrunner/1f054e8d63a5146187f142827b28ad45ffa61d2e/src/clj/web/core.clj | clojure | (ns web.core
(:require
[monger.collection :as mc]
[web.system :refer [start stop]])
(:gen-class :main true))
(defn -main [& _args]
(let [system (start)
port (-> system :web/server :port)
server-mode (:server/mode system)
db (-> system :mongodb/connection :db)
config (mc/find... | |
ccf9ffd26d47746ebe443846800e2a976d47f7bdf0c9bbcccc8d8934f136c286 | binaryage/cljs-devtools | munging.cljs | (ns devtools.tests.munging
(:require-macros [devtools.oops :refer [oget oset ocall]])
(:require [cljs.test :refer-macros [deftest testing is are]]
[clojure.string :as string]
[devtools.munging :as m]
[devtools.core :as devtools]
[devtools.tests.env.core :as env]
... | null | https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/test/src/tests/devtools/tests/munging.cljs | clojure | (ns devtools.tests.munging
(:require-macros [devtools.oops :refer [oget oset ocall]])
(:require [cljs.test :refer-macros [deftest testing is are]]
[clojure.string :as string]
[devtools.munging :as m]
[devtools.core :as devtools]
[devtools.tests.env.core :as env]
... | |
a15853cc31dfeee585d0db7b3a1994805d74955d60ce7bebf9cee893548e69d2 | fare/lisp-interface-library | all.lisp | ;;;;; All interface transformations
(uiop:define-package :lil/transform/all
(:import-from :lil/pure/all)
(:import-from :lil/stateful/all)
(:import-from :lil/transform/linearize)
(:import-from :lil/transform/linearized-map)
(:import-from :lil/transform/mutating)
(:import-from :lil/transform/mutating-map)
... | null | https://raw.githubusercontent.com/fare/lisp-interface-library/ac2e0063dc65feb805f0c57715d52fda28d4dcd8/transform/all.lisp | lisp | All interface transformations |
(uiop:define-package :lil/transform/all
(:import-from :lil/pure/all)
(:import-from :lil/stateful/all)
(:import-from :lil/transform/linearize)
(:import-from :lil/transform/linearized-map)
(:import-from :lil/transform/mutating)
(:import-from :lil/transform/mutating-map)
(:import-from :lil/transform/classif... |
54708a0b3c1bfeb58e03ade6b4e5f4561c3c02067083f487045a6dc9a509ed61 | acl2/acl2 | unsigned-byte-listp-def.lisp | ; A book that cherry-picks the definition of unsigned-byte-listp
;
Copyright ( C ) 2021 - 2023 Kestrel Institute
;
License : A 3 - clause BSD license . See the file books/3BSD - mod.txt .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "ACL2")
;; U... | null | https://raw.githubusercontent.com/acl2/acl2/6ffa5e97ec3563025fcf1ab1b62cf9662e0761ad/books/kestrel/bv-lists/unsigned-byte-listp-def.lisp | lisp | A book that cherry-picks the definition of unsigned-byte-listp
Unlike all-unsigned-byte-p, this one implies true-listp.
Also in std/typed-lists/unsigned-byte-listp.lisp. | Copyright ( C ) 2021 - 2023 Kestrel Institute
License : A 3 - clause BSD license . See the file books/3BSD - mod.txt .
Author : ( )
(in-package "ACL2")
(defund unsigned-byte-listp (n x)
(declare (xargs :guard t))
(if (atom x)
(null x)
(and (unsigned-byte-p n (car x))
(unsigned-byte-li... |
e011e254ff4999fa375d509bd8104d0f1ba0f90014ea21748396b92252957291 | sellout/haskerwaul | Duoidal.hs | # language TypeApplications
, UndecidableInstances
, UndecidableSuperClasses #
, UndecidableInstances
, UndecidableSuperClasses #-}
module Haskerwaul.Category.Duoidal
( module Haskerwaul.Category.Duoidal
-- * extended modules
, module Haskerwaul.Category.Monoidal
... | null | https://raw.githubusercontent.com/sellout/haskerwaul/b32ecdb141a5f9cca04ed85dc952028242c160a8/src/Haskerwaul/Category/Duoidal.hs | haskell | * extended modules
| [nLab](+category)
interchange = unDiagonal . mu Proxy . Diagonal
`Compose`.
__NB__: This is currently specialized to `Endofunctor`s over __Hask__.
Should be able to generalize this. | # language TypeApplications
, UndecidableInstances
, UndecidableSuperClasses #
, UndecidableInstances
, UndecidableSuperClasses #-}
module Haskerwaul.Category.Duoidal
( module Haskerwaul.Category.Duoidal
, module Haskerwaul.Category.Monoidal
) where
import ... |
07986e666d89d3f628b846500fe223f971737ddd77182d5b3689d11ccd52ec21 | lettier/webviewhs | how-do-i-run-my-own-function-in-the-window-loop.hs |
webviewhs
( C ) 2018
lettier.com
webviewhs
(C) 2018 David Lettier
lettier.com
-}
{-# LANGUAGE
OverloadedStrings
, QuasiQuotes
#-}
import System.Random
import Data.Text
import Control.Concurrent.MVar
import Language.Javascript.JMacro
import qualified Graphics.UI.Webviewhs as WHS
main :: IO... | null | https://raw.githubusercontent.com/lettier/webviewhs/21ddd4b4872b2e7eb50c9735e70cfbdedf2c6c1a/examples/how-do-i-run-my-own-function-in-the-window-loop.hs | haskell | # LANGUAGE
OverloadedStrings
, QuasiQuotes
#
This function runs before the loop.
This function runs after the loop.
This function runs every window loop.
Return True to continue the loop or False to exit the loop.
Every so often, change the web page background color to a random color. |
webviewhs
( C ) 2018
lettier.com
webviewhs
(C) 2018 David Lettier
lettier.com
-}
import System.Random
import Data.Text
import Control.Concurrent.MVar
import Language.Javascript.JMacro
import qualified Graphics.UI.Webviewhs as WHS
main :: IO ()
main = do
counter <- newMVar (0 :: Int)
WHS.wit... |
2e56278b73793e94736aeff413d170e7c54b97d198f140873a59e1c0da5010fa | brendanhay/gogol | Custombatch.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Regionalinventory/Custombatch.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Updates regional inventory for multiple products or regions in a single request.
* Resource
** Constructing a Request
| Updates regional inventory for multiple products or regions in a single request.
/See:/ 'newContentRegio... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
d7ef99cd75dc8e952d63d5cf81c77a336d07cd566cc993de6bfb226bf6cd984d | open-company/open-company-storage | digest.clj | (ns oc.storage.representations.digest
"Resource representations for OpenCompany digest."
(:require [cheshire.core :as json]
[oc.lib.hateoas :as hateoas]
[oc.storage.representations.media-types :as mt]
[oc.storage.urls.org :as org-urls]
[oc.storage.representations.entr... | null | https://raw.githubusercontent.com/open-company/open-company-storage/9f084d8de3d889372a11c418d25206c8d55e768c/src/oc/storage/representations/digest.clj | clojure | (ns oc.storage.representations.digest
"Resource representations for OpenCompany digest."
(:require [cheshire.core :as json]
[oc.lib.hateoas :as hateoas]
[oc.storage.representations.media-types :as mt]
[oc.storage.urls.org :as org-urls]
[oc.storage.representations.entr... | |
a7dbaa607d2e338638f4057bcafe58263b6c923324d84bb46502cf74e6c766e7 | alex-gutev/static-dispatch | dispatch.lisp | ;;;; dispatch.lisp
;;;;
Copyright 2019 - 2021
;;;;
;;;; 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/alex-gutev/static-dispatch/52d8d6fc7aea587bddb99a6ccbbc86bbc59119cd/test/dispatch.lisp | lisp | dispatch.lisp
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 f... | Copyright 2019 - 2021
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 ,
1 . That Generic functions ar... |
0acbf7c348bc131206620ce537fbf6660f05a1decde74ec03fb2d25d2a0dcda3 | AccelerateHS/accelerate-llvm | Embed.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
-- |
-- Module : Data.Array.Accelerate.LLVM.PTX.Embed
Copyright : [ 2017 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability : experim... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/0dec9b4deeb86a28fe89fb330f93aa025ef38745/accelerate-llvm-ptx/src/Data/Array/Accelerate/LLVM/PTX/Embed.hs | haskell | # LANGUAGE CPP #
# LANGUAGE QuasiQuotes #
|
Module : Data.Array.Accelerate.LLVM.PTX.Embed
License : BSD3
Stability : experimental
Embed the given object code and set up to be reloaded at execution time.
Generate the embedded kernel executable. This will load the embedded object
code... | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
Copyright : [ 2017 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.LLVM.PTX.Embed (
module Data.Array.Accelerate.LLVM.Embed,
) where
import Data.ByteString.... |
9774aef4899f0c4a6fc7d4d898f79136d34c431a4feede4c984c6c6fe1e86382 | clj-holmes/clj-watson | sarif.clj | (ns clj-watson.logic.sarif
(:require
[clj-watson.logic.template :as logic.template]
[clojure.java.io :as io]
[clojure.string :as string]))
(def ^:private sarif-boilerplate
{:$schema "-2.1.0-rtm.5.json"
:version "2.1.0"
:runs [{:tool
{:driver {:name "clj-watson"
... | null | https://raw.githubusercontent.com/clj-holmes/clj-watson/7990c86ab7050d91dea35f70ab71c38fc7dbdf32/src/clj_watson/logic/sarif.clj | clojure | needs to remove it from here | (ns clj-watson.logic.sarif
(:require
[clj-watson.logic.template :as logic.template]
[clojure.java.io :as io]
[clojure.string :as string]))
(def ^:private sarif-boilerplate
{:$schema "-2.1.0-rtm.5.json"
:version "2.1.0"
:runs [{:tool
{:driver {:name "clj-watson"
... |
e7613f7bbca059dfa46dc9ba279a3cbd5025d2f183899d3f336b5a75ee31be8e | nokia/web-assembly-self-certifying-compilation-framework | block_merge_pass.ml | *
Copyright 2020 Nokia
Licensed under the BSD 3 - Clause License .
SPDX - License - Identifier : BSD-3 - Clause
Copyright 2020 Nokia
Licensed under the BSD 3-Clause License.
SPDX-License-Identifier: BSD-3-Clause
*)
open Digraph
open Solver_types
open To_smt_ir
open Instr_graph
open Func_ty... | null | https://raw.githubusercontent.com/nokia/web-assembly-self-certifying-compilation-framework/8c31df0bd7d2d94cfbc22089944f5cabb3a61158/src/compiler/passes/block_merge_pass.ml | ocaml | Given a particular vertex labeled as a basic block,
* provided it has only one successor that happens to be a basic block,
* which also only has one predecessor,
* then that's grounds for removal.
* We track in a singleton list the edge that ends up removed.
We only consider cases where it's a basic block
We ... | *
Copyright 2020 Nokia
Licensed under the BSD 3 - Clause License .
SPDX - License - Identifier : BSD-3 - Clause
Copyright 2020 Nokia
Licensed under the BSD 3-Clause License.
SPDX-License-Identifier: BSD-3-Clause
*)
open Digraph
open Solver_types
open To_smt_ir
open Instr_graph
open Func_ty... |
e784aaaca78324ee894ba4c32fb78e19da6ddaf0e718da9af9f77c8954e5b82d | links-lang/links | transform.ml | module type INTERFACE = sig
type state
type 'a result
val name : string
val program : state ->
Sugartypes.program ->
Sugartypes.program result
val sentence : state ->
Sugartypes.sentence ->
Sugartypes.sentence result
end
module type UNTYPED... | null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/core/transform.ml | ocaml | This virtual class helps break the dependency cycle:
Value -> DesugarDatatypes -> Transform -> TransformSugar -> DesugarDatatypes -> Transform
Identity transformer. | module type INTERFACE = sig
type state
type 'a result
val name : string
val program : state ->
Sugartypes.program ->
Sugartypes.program result
val sentence : state ->
Sugartypes.sentence ->
Sugartypes.sentence result
end
module type UNTYPED... |
cc2976a8313e6792ca6ec6e5fc1ebc12f7d5fcef10fbee0d74de478ea776f109 | khibino/haskell-relational-record | Config.hs | -- |
Module : Database . Relational . Schema .
Copyright : 2014 - 2019
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
module Database.Relational.Schema.MySQL.Config (config) where
import Database.Relational (Config (..), defaultConfig)
-- | Configura... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-schemas/src/Database/Relational/Schema/MySQL/Config.hs | haskell | |
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
| Configuration parameter against MySQL. | Module : Database . Relational . Schema .
Copyright : 2014 - 2019
module Database.Relational.Schema.MySQL.Config (config) where
import Database.Relational (Config (..), defaultConfig)
config :: Config
config = defaultConfig { normalizedTableName = False }
|
d73cdb231d05001e4c9cab25e3d79e654879995dd28f943f12caea036946e0a2 | DalekBaldwin/check-it | regenerate.lisp | (in-package :check-it)
(defgeneric regenerate (generator)
(:documentation
"Regenerate a value equivalent to the previous value created with GENERATE."))
(defmethod regenerate (generator)
"Treat non-generators as constants."
generator)
(defmethod regenerate :around ((generator generator))
(setf (cached-val... | null | https://raw.githubusercontent.com/DalekBaldwin/check-it/b79c9103665be3976915b56b570038f03486e62f/src/regenerate.lisp | lisp | (in-package :check-it)
(defgeneric regenerate (generator)
(:documentation
"Regenerate a value equivalent to the previous value created with GENERATE."))
(defmethod regenerate (generator)
"Treat non-generators as constants."
generator)
(defmethod regenerate :around ((generator generator))
(setf (cached-val... | |
928bbaa0028650098768d24f37a5afc216cbf686c57b76d5130c2f48ae2d6d68 | noloop/cacau | cacau-examples-asdf-integration-test.lisp | (defpackage #:cacau-examples-asdf-integration-test
(:use #:common-lisp
#:cacau
#:assert-p
#:cacau-examples-asdf-integration))
(in-package #:cacau-examples-asdf-integration-test)
(deftest "Test-add-multiplication" ()
(eql-p (add-multiplication 1 2) 5))
| null | https://raw.githubusercontent.com/noloop/cacau/ba0fb36a284ded884f1dab0bd3f0f41ec14e3038/examples/asdf-intregration/cacau-examples-asdf-integration-test.lisp | lisp | (defpackage #:cacau-examples-asdf-integration-test
(:use #:common-lisp
#:cacau
#:assert-p
#:cacau-examples-asdf-integration))
(in-package #:cacau-examples-asdf-integration-test)
(deftest "Test-add-multiplication" ()
(eql-p (add-multiplication 1 2) 5))
| |
139c0c4f646df5d6f43ffbd4c864d80b0bc0349d8fa42a57dc8b429cf37f092d | dalaing/little-languages | Parse.hs | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
module Component.Term.NatBool.Parse (
parseTermInput
) where
impo... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/modular/nb-lang/src/Component/Term/NatBool/Parse.hs | haskell | |
^
^ | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
module Component.Term.NatBool.Parse (
parseTermInput
) where
impo... |
0ec8d6bc8c51844193b6dd018fe20ad0c81cdc775f64b6e0b33f9f8dc79e0dd2 | stumpwm/mahogany | group-interface.lisp | (defpackage :mahogany/tree/group-interface
(:use :cl))
(defclass group ()
((name :initarg :name
:accessor group-name
:type string)
(number :initarg :number
:accessor group-number
:type integer)
(views :initarg :views
:accessor group-views
:type list
:documentation "The list of all client... | null | https://raw.githubusercontent.com/stumpwm/mahogany/3d8a4e761c5b17496a1b9c02a3562b8cedcd351e/lisp/tree/group-interface.lisp | lisp | (defpackage :mahogany/tree/group-interface
(:use :cl))
(defclass group ()
((name :initarg :name
:accessor group-name
:type string)
(number :initarg :number
:accessor group-number
:type integer)
(views :initarg :views
:accessor group-views
:type list
:documentation "The list of all client... | |
15a4a3e5eae1b1d76ad85874924055857f591e7e492fca11d72f0a68199f5233 | facebookarchive/pfff | highlight_cpp.ml |
*
* Copyright ( C ) 2010 , 2014 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_cpp/analyze/highlight_cpp.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
* TODO:
* - take into account class qualifier as a use
* - take inheritance as a class use
***********************************************************... |
*
* Copyright ( C ) 2010 , 2014 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file... |
32a71ae802469f9af1024688af66112a30dc95cbb922e5a9841eba4587871d25 | rescript-lang/rescript-compiler | js_exn.mli | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/c3fcc430360079546a6aabd2b2770303480f8486/jscomp/others/js_exn.mli | ocaml | * Provide utilities for dealing with JS exceptions.
* internal use only | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
3ed28fe9ce463d757b3776c607d46088b6a13f07962bf234001862757c400667 | gafiatulin/codewars | Combinations.hs | -- Combinations
/
module Combinations where
combinations :: Int -> [a] -> [[a]]
combinations 0 _ = [[]]
combinations _ [] = []
combinations n (x:xs) = [ x:c | c <- combinations (n-1) xs] ++ (combinations n xs)
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Combinations.hs | haskell | Combinations | /
module Combinations where
combinations :: Int -> [a] -> [[a]]
combinations 0 _ = [[]]
combinations _ [] = []
combinations n (x:xs) = [ x:c | c <- combinations (n-1) xs] ++ (combinations n xs)
|
f4fe4266a73e5482f90c6ba525fd2a1731088e2fc3c5e2b9e8955fca7144fb35 | karamellpelle/grid | Segment.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid 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/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/Game/Grid/Helpers/Segment.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid 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
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module Game.Grid.Helpers.Segment
(
segmentEat... |
ebb7749caba81506f6450849fab208fc650baf272bda7c764589dfc934954615 | anoma/juvix | InfoTable.hs | module Juvix.Compiler.Concrete.Data.InfoTable where
import Juvix.Compiler.Concrete.Data.ScopedName qualified as S
import Juvix.Compiler.Concrete.Language
import Juvix.Prelude
newtype FunctionInfo = FunctionInfo
{ _functionInfoType :: Expression
}
deriving stock (Eq, Show)
newtype ConstructorInfo = ConstructorI... | null | https://raw.githubusercontent.com/anoma/juvix/447f2f1dcf6dc0b4b6513f4396daf5eca0c99652/src/Juvix/Compiler/Concrete/Data/InfoTable.hs | haskell | module Juvix.Compiler.Concrete.Data.InfoTable where
import Juvix.Compiler.Concrete.Data.ScopedName qualified as S
import Juvix.Compiler.Concrete.Language
import Juvix.Prelude
newtype FunctionInfo = FunctionInfo
{ _functionInfoType :: Expression
}
deriving stock (Eq, Show)
newtype ConstructorInfo = ConstructorI... | |
a79f6c3cc4a9be3f44cc3b1d617a2b2e3b16c1bc423a41303f79c3b6d472e835 | gregr/experiments | cps-simple.rkt | #lang racket
(print-as-expression #f)
This is a one - pass CPS transformation that uses both a first - order and
;; higher-order representation of continuations to avoid introducing any new
;; administrative redexes.
(define (rename n)
(string->symbol (string-append (symbol->string n) ".cps")))
(define (fresh-k-v... | null | https://raw.githubusercontent.com/gregr/experiments/cd4c7953f45102539081077bbd6195cf834ba2fa/control/cps-simple.rkt | racket | higher-order representation of continuations to avoid introducing any new
administrative redexes. | #lang racket
(print-as-expression #f)
This is a one - pass CPS transformation that uses both a first - order and
(define (rename n)
(string->symbol (string-append (symbol->string n) ".cps")))
(define (fresh-k-var i)
(string->symbol (string-append "r." (number->string i))))
(define (return k i v) (if (proc... |
634d612e40816e72731d686dd5c5a841db458e365bad446ece70c86a0538412f | garrigue/lablgl | dino.mli |
Original Copyright ( c ) , 1997 .
Translation Copyright ( c ) Issac Trotts , 2002 .
(* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. *)
(* return value is display list hand... | null | https://raw.githubusercontent.com/garrigue/lablgl/d76e4ac834b6d803e7a6c07c3b71bff0e534614f/LablGlut/examples/glut3.7/demos/underwater/dino.mli | ocaml | This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain.
return value is display list handle |
Original Copyright ( c ) , 1997 .
Translation Copyright ( c ) Issac Trotts , 2002 .
val makeDinosaur: unit -> int
|
178b5b3b853171dfc2a63f72b78dbef633dcdc496d20aeef676d595b0b09c71f | PaNaVTEC/csv2beancount | core_test.clj | (ns csv2beancount.core-test
(:require [clojure.test :refer :all]
[csv2beancount.core :refer :all]
[clojure.java.io :as io])
(:use midje.sweet))
(def help-output (str " -c, --csv CSV Csv Path\n"
" -y, --yaml Yaml Yaml Path\n"
" -h, --help\n"... | null | https://raw.githubusercontent.com/PaNaVTEC/csv2beancount/4f914fa6643004c374f99e7406d4f5d433409eb1/test/csv2beancount/core_test.clj | clojure | (ns csv2beancount.core-test
(:require [clojure.test :refer :all]
[csv2beancount.core :refer :all]
[clojure.java.io :as io])
(:use midje.sweet))
(def help-output (str " -c, --csv CSV Csv Path\n"
" -y, --yaml Yaml Yaml Path\n"
" -h, --help\n"... | |
450626ad672b98ce6ca967fdd64b7275bbd65f8fa90d8c4bbe58fe8c2875132a | sbcl/sbcl | tests.lisp | (defpackage "SB-BSD-SOCKETS-TEST"
(:import-from #:test-util #:deftest)
(:use "CL" "SB-BSD-SOCKETS"))
(in-package :sb-bsd-sockets-test)
;;; a real address
(deftest make-inet-address
(equalp (make-inet-address "127.0.0.1") #(127 0 0 1))
t)
and an address with bit 8 set on some octets
(deftest make-inet-addre... | null | https://raw.githubusercontent.com/sbcl/sbcl/5107bdf03b69d18f5315d72749daed9eaf6ef904/contrib/sb-bsd-sockets/tests.lisp | lisp | a real address
See /+bug/659857
for unknown protocols...
make a socket
make a socket
fail to make a socket: check correct error return. There's no nice
way to check the condition stuff on its own, which is a shame
here, not socket-type-not-supported-error or
protocol-not-supported-error.
same again with keyw... | (defpackage "SB-BSD-SOCKETS-TEST"
(:import-from #:test-util #:deftest)
(:use "CL" "SB-BSD-SOCKETS"))
(in-package :sb-bsd-sockets-test)
(deftest make-inet-address
(equalp (make-inet-address "127.0.0.1") #(127 0 0 1))
t)
and an address with bit 8 set on some octets
(deftest make-inet-address2
(equalp (make... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.