topology

Defining non-unary functions in Cubical mode

做~自己de王妃 提交于 2019-12-03 15:38:33
I'd like to define a function with two, higher inductive typed, arguments in Cubical mode. I am using the cubical package as my "prelude" library. I first define a quotient type for integers as a HIT: {-# OPTIONS --cubical #-} module _ where open import Data.Nat renaming (_+_ to _+̂_) open import Cubical.Core.Prelude data ℤ : Set where _-_ : (x : ℕ) → (y : ℕ) → ℤ quot : ∀ {x y x′ y′} → (x ℕ+ y′) ≡ (x′ ℕ+ y) → (x - y) ≡ (x′ - y′) I can then define a unary function using pattern matching: _+1 : ℤ → ℤ (x - y) +1 = suc x - y quot {x} {y} prf i +1 = quot {suc x} {y} (cong suc prf) i So far, so good

How to perform a vector overlay of two SpatialPolygonsDataFrame objects?

守給你的承諾、 提交于 2019-12-03 14:16:20
I have two GIS layers -- call them Soils and Parcels -- stored as SpatialPolygonsDataFrame s ( SPDF s), and I would like to "overlay" them, in the sense described here . The result of the overlay operation should be a new SPDF in which: The SpatialPolygons component contains polygons formed by the intersection of the two layers. (Think all of the atomic polygons formed by overlaying two mylars on an overhead projector). The data.frame component records the attributes of the Soils and Parcels polygons within which each atomic polygon falls. My question(s): Is there an existing R function that

What does each definition in configtx.yaml means in Hyperledger fabric v1.0?

允我心安 提交于 2019-12-03 04:01:54
This is related to Hyperledger fabric v1.0 network topology. From the example, configtx.yaml contains following definitions: Profiles: TwoOrgsOrdererGenesis: Orderer: <<: *OrdererDefaults Organizations: - *OrdererOrg Consortiums: SampleConsortium: Organizations: - *Org1 - *Org2 TwoOrgsChannel: Consortium: SampleConsortium Application: <<: *ApplicationDefaults Organizations: - *Org1 - *Org2 There are two main sections. TwoOrgsOrdererGenesis This defines the orderer service and the genesis block details. TwoOrgsChannel This defines the channel details. Such as how many organization/entity are

comparing open source java graph drawing frameworks(JUNG and Prefuse) for drawing network topology

僤鯓⒐⒋嵵緔 提交于 2019-12-03 03:40:02
问题 which of the open source Java graph drawing frameworks to use for a network diagram with the following requirements? The graph will have less than 1000 nodes. 1) has parallel edges 2) directed and undirected edges within a single graph 3) nodes represented by images 4) user interaction with nodes and edges 5) dynamically adding/deleting nodes and edges 6) multiple labelling on nodes and edges , different levels of labelling can be turned off/on by users. (like drawing in layers and turning

Storm入门 第二章 构建Topology

南楼画角 提交于 2019-12-02 20:41:31
2.1 Storm 基本概念 在运行一个Storm任务之前,需要了解一些概念: Topologies Streams Spouts Bolts Stream groupings Reliability Tasks Workers Configuration Storm集群和Hadoop集群表面上看很类似。但是Hadoop上运行的是MapReduce jobs,而在Storm上运行的是拓扑(topology),这两者之间是非常不一样的。一个关键的区别是: 一个MapReduce job最终会结束, 而一个topology永远会运行(除非你手动kill掉)。 在Storm的集群里面有两种节点: 控制节点(master node)和工作节点(worker node)。控制节点上面运行一个叫Nimbus后台程序,它的作用类似Hadoop里面的JobTracker。Nimbus负责在集群里面分发代码,分配计算任务给机器, 并且监控状态。 每一个工作节点上面运行一个叫做Supervisor的节点。Supervisor会监听分配给它那台机器的工作,根据需要启动/关闭工作进程。每一个工作进程执行一个topology的一个子集;一个运行的topology由运行在很多机器上的很多工作进程组成。 Nimbus和Supervisor之间的所有协调工作都是通过Zookeeper集群完成。另外

How to do a contour plot from x,y,z coordinates in matplotlib? (plt.contourf or plt.contour)

无人久伴 提交于 2019-12-02 11:04:21
问题 These meshgrid is a little confusing to use for me. I'm trying to do a scatter plot with the x and y coordinates with a contour plot overlaid on the scatter with a continuous spread for the z coordinates. Similar to an elevation map. If I use meshgrid with the x,y, and z coordinates then I get 3D array for each which is still the incorrect input. df_xyz = pd.read_table("https://pastebin.com/raw/f87krHFK", sep="\t", index_col=0) x = df_xyz.iloc[:,0].values y = df_xyz.iloc[:,1].values z = df

IRichBolt Error when running topology on storm-1.0.0 and pyleus-0.3.0

蹲街弑〆低调 提交于 2019-12-02 05:59:11
I'm running storm topology " pyleus --verbose local xyz_topology.jar " using storm-1.0.0, pyleus-0.3.0, centos-6.6 and getting the Error Exception in thread "main" java.lang.NoClassDefFoundError: backtype/storm/topology/IRichBolt Running: java -client -Ddaemon.name= -Dstorm.options= -Dstorm.home=/usr/local/apache-storm-1.0.0 -Dstorm.log.dir=/usr/local/apache-storm-1.0.0/logs -Djava.library.path=/usr/local/ lib:/opt/local/lib:/usr/lib -Dstorm.conf.file= -cp /usr/local/apache-storm-1.0.0/lib/asm-5.0.3.jar: /usr/local/apache-storm-1.0.0/lib/clojure-1.7.0.jar:/usr/local/apache-storm-1.0.0/lib

Tessellating an arbitrary polygon by tiling triangles

一曲冷凌霜 提交于 2019-11-30 09:24:20
I need to fill an arbitrary polygon using a near-uniform tiling of triangles. How would I do this? You may provide either references to existing algorithms or even simply ideas or hints of your own. The following is presumed: The polygon may be convex (but bonus points if you come up with an algorithm that works for concave shapes) The polygon has an arbitrary number of edges (3 or more) The amount of tessellation (preferably the number of vertices added by the algorithm) should be parametrized The polygon's edges may be divided by the algorithm Triangles should be nearly uniform in size and

storm-环境搭建和第一个topology

半腔热情 提交于 2019-11-30 07:26:50
从原理到操作,还是有点距离 :) 基于 Linux ubuntu 3.13.0-24-generic ------------- 预备工作 * java * python(>=2.6) * zeromq * jzmq * zookeeper 下载(不需安装) wget https://github.com/downloads/nathanmarz/storm/storm-0.8.1.zip unzip storm-0.8.1.zip cd storm-0.8.1/ 配置--vim conf/storm.yaml ------------------------------------ # zookeeper的集群服务器地址(可多个) storm.zookeeper.servers: - "127.0.0.1" # nimbus 服务器 # 各个Supervisor工作节点需要知道哪个机器是Nimbus,以便下载Topologies的jars、confs等文件 nimbus.host: "127.0.0.1" # Nimbus和Supervisor进程用于存储少量状态,如jars、confs等的本地磁盘目录,需要提前创建该目录并给以足够的访问权限 storm.local.dir: "/home/admin/storm/workdir" # 对于每个Supervisor工作节点

Tessellating an arbitrary polygon by tiling triangles

爷,独闯天下 提交于 2019-11-29 13:58:17
问题 I need to fill an arbitrary polygon using a near-uniform tiling of triangles. How would I do this? You may provide either references to existing algorithms or even simply ideas or hints of your own. The following is presumed: The polygon may be convex (but bonus points if you come up with an algorithm that works for concave shapes) The polygon has an arbitrary number of edges (3 or more) The amount of tessellation (preferably the number of vertices added by the algorithm) should be