semvec/pypi-packages huggingface dataset:
fishhook-extended 0.0.2
Extended: Allows for runtime hooking of static class functions AND other type slots

# Fishhook Extended

This module allows for swapping out the slot pointers contained in static
classes with the **generic** slot pointers used by python for heap classes.
This allows for assigning arbitrary python functions to static class dunders
using *hook* and *hook_cls* and for applying new functionality to previously
unused dunders. A hooked static dunder can be restored to original
functionality using the *unhook* function

Extended from [fishhook](https://pypi.org/project/fishhook/) by [chilaxan](https://github.com/chilaxan)

# Calling original methods
`orig(self, *args, **kwargs)` is a special function that looks up the original implementation of a hooked dunder in the methods cache. It will only work properly when used inside a hooked method where an original implementation existed
Extended: `orig` also now looks up the original attribute of a hooked type slot in the attributes cache. Can work anywhere, provided it is given the hooked class.

### hooking single methods
```py
@hook(int)
def __add__(self, other):
  ...
  return orig(self, other)
```

### hooking multiple methods
```py
@hook_cls(int)
class int_hook:
  attr = ...

  def __add__(self, other):
    ...
```

### Extended: hooking type slots
```py
int_dict_hook = {'a': 3}
hook(int, '__dict__')(int_dict_hook)
```

#### Links

[Github](https://github.com/thatbirdguythatuknownot/fishhook)

[PyPi](https://pypi.org/project/fishhook-extended/)
apertools 0.7.0
Tools for gathering and processing InSAR data

[![Build Status](https://travis-ci.org/scottstanie/apertools.svg?branch=master)](https://travis-ci.org/scottstanie/apertools)

# Apertools: tools for InSAR (Interferometric Synthetic Aperture Radar)


Other helping tools: [sentineleof](https://github.com/scottstanie/sentineleof) for downloading Sentinel 1 EOF precise orbit files.


## Setup and installation

```bash
pip install apertools
```


#### sario.py

Input/Output functions for SAR data.
Contains methods to load Sentinel, UAVSAR and DEM files

Main function: 

```python
import apertools.sario
my_slc = apertools.sario.load('/file/path/radar.slc')
geocoded_slc = apertools.sario.load('/file/path/myslc.geo')
my_int = apertools.sario.load('/file/path/interferogram.int')
unwrapped_int = apertools.sario.load('/file/path/igram.unw')
my_dem = apertools.sario.load('/file/path/elevation.dem')
my_hgt = apertools.sario.load('/file/path/N20W100.hgt')
```

#### latlon.py
Contains LatlonImage class, which loads metadata about an image and acts as a smart numpy array.
Includes functionality for slicing/selecting pixels by latitude/longitude, among other things.

Also contains helper functions for maniuplating lat/lon data.

#### plotting.py
Useful plotting functions, including center-shifted colormap (to make 0 values a neutral color), and 3D stack viewing function


#### los.py
Line of sight utilities


#### gps.py
Several functions for using GPS data in conjunction with InSAR stacks


#### parsers.py

Classes to deal with extracting relevant data from SAR filenames.
Example:

```python
from apertools.parsers import Sentinel

parser = Sentinel('S1A_IW_SLC__1SDV_20180408T043025_20180408T043053_021371_024C9B_1B70.zip')
parser.start_time
    datetime.datetime(2018, 4, 8, 4, 30, 25)

parser.mission
    'S1A'

parser.polarization
    'DV'
parser.full_parse
('S1A',
 'IW',
 'SLC',
 '_',
 '1',
 'S',
 'DV',
 '20180408T043025',
 '20180408T043053',
 '021371',
 '024C9B',
 '1B70')


parser.field_meanings
('Mission',
 'Beam',
 'Product type',
 'Resolution class',
 'Product level',
 'Product class',
 'Polarization',
 'Start datetime',
 'Stop datetime',
 'Orbit number',
 'data-take identified',
 'product unique id')

```

UAVSAR parser also exists.


#### log.py

Module to make logging pretty with times and module names.

If you also `pip install colorlog`, it will become colored (didn't require this in case people like non-color logs.)

```python
from apertools.log import get_log
logger = get_log()
logger.info("Better than printing")
```

```
[05/29 16:28:19] [INFO log.py] Better than printing
```
APIDjango 1.3
django api

# django_api_deal

#### 打包命令
```angular2html
python setup.py sdist
```
#### 上传命令   
```angular2html
twine upload dist/*
```
#### 主要功能

1. 简化常见列表类接口
    1. get、post、put、delete都有对应的my_get、my_post、my_put、my_delete方法。
2. 简化参数的校验及检验失败的提示信息
   1. 参数类型
      1. StrArgument 字符串参数
      2. StrOfIntArgument 整形的字符串参数
      3. EmailArgument 邮箱参数 必须有@
      4. UrlArgument url参数 必须http 或 https开头
      5. ListArgument 列表参数
      6. DictArgument 字典参数
      7. ListNestDictArgument 列表嵌套字典参数 可多层嵌套
      8. ChoiceArgument 固定可选值参数 一般用来 True, False，或者其他固定可选项
      9. BoolArgument bool参数
      10. StrOfBoolArgument bool类型的字符串参数
      11. DateStrArgument 日期参数，可自定义日期格式 datetime_format
      12. IntArgument FloatArgument DecimalArgument
   2.简化参数的参数
      13. desc 名称 
      14. name 上传字段名称 
      15. must 是否必填 
      16. query_type 查询时的方式：icontains 
      17. relate_name 查询字段与name字段不一致时使用或关联查询时使用


4. core跨域解决
   1. 在settings中的中间件增加下面的代码

   ```angular2html
   'api_deal.middlewares.cors.MyCorsMiddleware', 
   ```

5. 通用的异常处理
   1. 在settings中的中间件增加下面的代码

      ```angular2html
         'api_deal.middlewares.error.MyErrorMiddleware',
      ```

代码示例：

```angular2html

class BookListView(ApiListView):
    model = Book
    id_arg = IntArgument("ID", "id", must=True)
    name_arg = StrArgument("名称", "name", must=True, query_type="icontains", )
    get_params_list = [
        name_arg,
    ]

    def get(self, request):
        return self.my_get(request)

    post_params_list = [
        name_arg,
    ]

    def post(self, request):
        return self.my_post(request)

    select_put_params_list = [
        id_arg,
    ]
    put_params_list = [
        name_arg,
    ]

    def put(self, request):
        return self.my_put(request)

    delete_params_list = [
        id_arg
    ]

    def delete(self, request):
        return self.my_delete(request)

```

正确返回示例
```angular2html
{
    "errmsg": "ok"
    "data": {...}
}
```

错误返回示例
```
{
    "errmsg": "参数名称是必填项"
    "data": null
}
```
homebase-whatware 1.0
a simple python app that has lots of basic functions.
Requires Python: >=3.6

# homebase
WhatWare HomeBase application

This is a simple python app that has lots of basic functions.

### dependencies

Run the command `pip install -r requirements.txt` in the directory of `requirements.txt`

### dev version info

The dev version is only tested on windows until we are ready to release a new version, then we test it on all platforms. Because of this, some functions may not work and it may be unstable on operating systems other than windows. Your best bet if you don't know anything about python is to comment out the line. `#comment it with a hashtag like this`

### other info

The `settings.json` file in the main directory is unused. Homebase creates the settings file in your operating systems appdata folder. On windows, this is `C:\Users\[user]\AppData\Local\WhatWare\Homebase`, Mac OS X `/Users/[user]/Library/Application Support/Homebase`, and Linux `/home/[user]/.local/share/Homebase`.