semvec/pypi-packages huggingface dataset:
fab-addon-geoalchemy 0.4.1
Add support for GeoAlchemy2 Geometry fields to Flask Appbuilder
License: MIT

# fab_addon_geoalchemy

[![Build status](https://travis-ci.com/dolfandringa/fab_addon_geoalchemy.svg?branch=master)](https://travis-ci.com/dolfandringa/fab_addon_geoalchemy)

Implementation of GeoAlchemy fields for Flask Appbuilder.

It automatically transforms POINT Geometry columns to widgets with a field for latitude and longitude
and a leaflet map. The map has a pointer for the location, and there is two way binding where dragging 
the pointer changes the value in the input fields and vice-versa.
Later on, support for line and polygon columns may be added as well (pull requests welcome).

## Installation

Run `pip install fab-addon-geoalchemy`.

## Usage
You can find examples in the unittests in the tests folder.
But in short, this is what you need to do:

Add the following to your config.py:

```
ADDON_MANAGERS = ['fab_addon_geoalchemy.manager.GeoAlchemyManager']
```

And then use this for your models and views:


```
from sqlalchemy import Column, String
from fab_addon_geoalchemy.views import GeoModelView
from fab_addon_geoalchemy.models import GeoSQLAInterface, Geometry

class Observation(Model):
    id = Column(Integer, primary_key=True)
    name = Column(String)
    location = Column(Geometry(geometry_type='POINT', srid=4326))

    def __repr__(self):
        if self.name:
            return self.name
        else:
            return 'Person Type %s' % self.id


class ObservationView(GeoModelView):
    datamodel = GeoSQLAInterface(Observation)
    add_columns = ['name', 'location']

```

This will automatically create the LatLonWidget in the form, and process the data to transform the latitude and longitude values into a point geometry in the database. The srid form the column is used by the field for the conversion of the text coordinates to the geometry. No validation is done if the entered coordinates are actually valid for the specified SRID.
dayu-oiio 0.2
a python wrapper for OpenImageIO oiiotool.
License: MIT

dayu_oiio
=========

是OpenImageIO 中oiiotool 的python 封装。将操作转换为stream
的概念，可以帮助用户不用记忆繁杂的终端命令行，直观的生成处理代码。
OpenImageIO 是非常强力的序列帧转码工具，包括生成tx
的工具都可以直接通过OpenImageIO 实现！

准备工作
========

首先通过pip 进行安装

.. code:: python

   pip install -U dayu_oiio

然后，需要用户自行安装或者编译OpenImageIO 中的oiiotool
工具。具体的操作可以参照： https://github.com/OpenImageIO/oiio

对于mac 用户，可以比较简单，直接使用brew 进行安装即可：

.. code:: shell

   /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
   brew install openimageio

linux 用户也可以自行进行编译。windows
用户相对来说麻烦一些，需要自己按照OpenImageIO 官方手册自行编译。

使用方法
========

假设，用户希望对一套序列帧进行如下的操作：

1. 缩放
2. 使用ocio 转换色彩空间
3. 输出

那么对应的代码就非常简单：

.. code:: python

   from dayu_oiio.stream import *

   cmd = OIIO() >> \
         Input('/some/input/files.%04d.exr', start=1001, end=1008) >> \
         Resize(1920, 1080) >> \
         ColorConvert('Input - ARRI - V3 LogC (EI800) - Wide Gamut',
                      'ACES - ACEScg',
                      ocio='/some/ocio/config/file.config') >> \
         Output('/some/output/file.%04d', start=1101, end=1108)

   for _ in cmd.run():
       print cmd.progress

高级扩展
========

毕竟这里只封装了常用的 oiiotool
指令，如果用户需要使用的指令没有被封装，那么可以自己进行扩展：

.. code:: python

   from dayu_oiio.base import UnaryFilterStream

   class Multiply(UnaryFilterStream):
       _name = 'mul'    # 这里对应oiio 中的指令

       def __init__(self, multiply_value):    # 这里的参数是对应指令的参数
           super(Multiply, self).__init__()
           self.mul = multiply_value

       def combine(self)
           # 这里务必将oiio 拼接的指令加到 self._value 这个变量中
           self._value += '--{param} {mul}'.format(param=self._name,
                                                   mul=self.mul)

这样，就完成了一个multiply 操作的自定义封装。之后就可以直接使用了：

.. code:: python

   cmd = OIIO() >> \
         Input('/some/input/files.%04d.exr', start=1001, end=1008) >> \
         Multiply(1.4) >> \
         Output('/some/output/file.%04d', start=1101, end=1108)

   for _ in cmd.run():
       print cmd.progress

一些已知的问题
==============

-  由于oiiotool 的命令行工具，再输出运行指令的时候不是每行都flush
   到stdout，因此python 的subprocess
   在运行结束之前无法无阻塞的获得运行状态。 因此，只能够每隔1s
   进行扫描硬盘，来获得输出素材的进度

-  如果想要同时使用ocio 的色彩管理，那么需要在编译的时候加入opencolorIO
   的支持。（Mac 通过brew 安装的已经支持了）
country-via 0.0.6
Route Configuring Tool for Country
License: MIT
Keywords: network route

# Country Via

Naive Scripts to help you manage routes to specific country.

## Installation

```
~> pip install country-via
```

## Usage

```
~> country-via --help
usage: country-via [-h] (--country COUNTRY_CODE | --file FILE) [--via VIA]
                   [--dev DEV] [--type TYPE] [--table TABLE]
                   [--format {ip_route,systemd_network,plain_list}]

Generate route for given country

optional arguments:
  -h, --help            show this help message and exit
  --country COUNTRY_CODE, -c COUNTRY_CODE
                        fetch addresses from nirsoft with the country code
  --file FILE           read addresses from plain text
  --format {ip_route,systemd_network,plain_list}, -f {ip_route,systemd_network,plain_list}
                        the format of the output

variables for the template:
  --via VIA, -v VIA     the gateway for the country
  --dev DEV, -d DEV     the device name of gateway
  --type TYPE, -t TYPE  the routing type
  --table TABLE         the routing table number to be operated
```

## Examples

To dump networks of China:

```
~> country-via --country cn --format plain_list
```

To set up routes for China with [systemd-networkd](https://github.com/systemd/systemd):

```
~> country-via --country cn --format systemd_network --via 10.233.0.1 > /etc/systemd/network/ol.network.d/cn.conf
```

To set up routes for China on the fly (with [iproute2](https://github.com/shemminger/iproute2)):

```
~> country-via --country cn --format systemd_network --via 10.233.0.1 | sudo bash
```

To set up routes table for custom addresses:

```
~> country-via --file campus.txt --format systemd_network --via 10.233.0.1 > /etc/systemd/network/ol.network.d/campus.conf
```