blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 3
616
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
112
| license_type
stringclasses 2
values | repo_name
stringlengths 5
115
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringclasses 777
values | visit_date
timestamp[us]date 2015-08-06 10:31:46
2023-09-06 10:44:38
| revision_date
timestamp[us]date 1970-01-01 02:38:32
2037-05-03 13:00:00
| committer_date
timestamp[us]date 1970-01-01 02:38:32
2023-09-06 01:08:06
| github_id
int64 4.92k
681M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us]date 2012-06-04 01:52:49
2023-09-14 21:59:50
⌀ | gha_created_at
timestamp[us]date 2008-05-22 07:58:19
2023-08-21 12:35:19
⌀ | gha_language
stringclasses 149
values | src_encoding
stringclasses 26
values | language
stringclasses 1
value | is_vendor
bool 2
classes | is_generated
bool 2
classes | length_bytes
int64 3
10.2M
| extension
stringclasses 188
values | content
stringlengths 3
10.2M
| authors
listlengths 1
1
| author_id
stringlengths 1
132
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
62761c4213e8d3fd11ac2734a38d39fed0be7f54 | 44b6bc41fe8e424196f98dbc5b2f050c1f9645f8 | /platforms/windows/dos/34480.py | 15fb0b06f9a6f2300b2fa265f1402a0d1a77a6aa | [] | no_license | angeloobeta/exploit-database | 21283dd8549f47836a35af6f3ea7b63b8dba11ea | 43f3d9e94c01a7f51e30561a96214af231dd9d36 | refs/heads/master | 2021-08-08T21:07:38.794539 | 2017-11-11T05:01:28 | 2017-11-11T05:01:28 | 110,380,452 | 0 | 1 | null | 2017-11-11T21:09:05 | 2017-11-11T21:09:04 | null | UTF-8 | Python | false | false | 1,201 | py | source: http://www.securityfocus.com/bid/42473/info
Xilisoft Video Converter is prone to a buffer-overflow vulnerability because it fails to perform adequate boundary checks on user-supplied data.
Attackers may leverage this issue to execute arbitrary code in the context of the application. Failed attacks will cause denial-of-service conditions.
Xilisoft Video Converter 3.1.8.0720b is vulnerable; other versions may also be affected.
################PoC Start##############################################
print "\nXilisoft Video Converter Wizard 3 ogg file processing DoS"
#Download from
# http://www.downloadatoz.com/xilisoft-video-converter/order.php?download=xilisoft-video-converter&url=downloadatoz.com/xilisoft-video-converter/wizard.html/__xilisoft-video-converter__d1
#http://www.downloadatoz.com/xilisoft-video-converter/wizard.html
buff = "D" * 8400
try:
oggfile = open("XilVC_ogg_crash.ogg","w")
oggfile.write(buff)
oggfile.close()
print "[+]Successfully created ogg file\n"
print "[+]Coded by Praveen Darshanam\n"
except:
print "[+]Cannot create File\n"
################PoC End################################################ | [
"[email protected]"
] | |
5f7a9b2612c79430d4c1e5242715bc642e2d3fac | f64e31cb76909a6f7fb592ad623e0a94deec25ae | /leetcode/p1143_longest_common_subsequence.py | 85183f69cab74bceb6e18858c63272d6a774702d | [] | no_license | weak-head/leetcode | 365d635cb985e1d154985188f6728c18cab1f877 | 9a20e1835652f5e6c33ef5c238f622e81f84ca26 | refs/heads/main | 2023-05-11T14:19:58.205709 | 2023-05-05T20:57:13 | 2023-05-05T20:57:13 | 172,853,059 | 0 | 1 | null | 2022-12-09T05:22:32 | 2019-02-27T05:58:54 | Python | UTF-8 | Python | false | false | 1,521 | py | from functools import lru_cache
def lcs_bu_optimized(a, b):
"""
Dynamic Programming, bottom-up
Optimized for space
Time: O(a * b)
Space: O(min(a, b))
a - length of 'a'
b - length of 'b'
"""
if a < b:
a, b = b, a
pre = [0] * (len(b) + 1)
cur = [0] * (len(b) + 1)
for r in range(1, len(a) + 1):
for c in range(1, len(b) + 1):
if a[r - 1] == b[c - 1]:
cur[c] = pre[c - 1] + 1
else:
cur[c] = max(pre[c], cur[c - 1])
pre, cur = cur, pre
return pre[-1]
def lcs_bu(a, b):
"""
Dynamic Programming, bottom-up
Could be optimized for space
Time: (a * b)
Space: (a * b)
a - length of 'a'
b - length of 'b'
"""
m = [[0 for _ in range(len(b) + 1)] for _ in range(len(a) + 1)]
for r in range(1, len(a) + 1):
for c in range(1, len(b) + 1):
if a[r - 1] == b[c - 1]:
m[r][c] = m[r - 1][c - 1] + 1
else:
m[r][c] = max(m[r][c - 1], m[r - 1][c])
return m[-1][-1]
def lcs_td(a, b):
"""
Dynamic programming, top-down
Time: (a * b)
Space: (a * b)
a - length of 'a'
b - length of 'b'
"""
@lru_cache(None)
def lcs(a, b):
if not a or not b:
return 0
if a[-1] == b[-1]:
return 1 + lcs(a[:-1], b[:-1])
else:
return max(lcs(a, b[:-1]), lcs(a[:-1], b))
return lcs(a, b)
| [
"[email protected]"
] | |
1270e18c86fefef7504af98a1f66c65d422ca3a5 | bdbeca3fdc7ea3ef2f1b66aab9ea50e15cfbc553 | /django_sample/urls.py | 5153d54fffd528e7e5124cdc3fe449615124944d | [] | no_license | socialcomputing/django_sample | d99b35b4d02ef98e319efec6ef7feee3b29211d7 | ded880a08afdbdd4b899112a7c6d74f07d7c176f | refs/heads/master | 2021-01-13T01:58:08.970181 | 2013-10-24T12:05:54 | 2013-10-24T12:05:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 592 | py | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'english_learner.views.home', name='home'),
# url(r'^english_learner/', include('english_learner.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
)
| [
"[email protected]"
] | |
3a21cb6bea3daf9fdb83c7cc3b6c5ea806fcbf2c | 01d92ca39cd4836aaef67e2efcf88a44671c7213 | /code_pack_22/1_threading/locking_with_context.py | d2ee717504e82208c6cb39cf3f7507afc038a607 | [] | no_license | manuelpereira292/py3_bootcamp | 247f411b80f09c46aeeba90a96e6a5d3fd329f2c | 1988553394cb993db82c39993ed397e497bd5ae8 | refs/heads/master | 2022-08-20T02:25:51.265204 | 2020-05-15T22:26:27 | 2020-05-15T22:26:27 | 263,367,513 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 370 | py | import threading
total = 0
lock = threading.Lock()
def update_total(amount):
"""
Updates the total by the given amount
"""
global total
with lock:
total += amount
print (total)
if __name__ == '__main__':
for i in range(10):
my_thread = threading.Thread(
target=update_total, args=(5,))
my_thread.start() | [
"[email protected]"
] | |
9bf24903265c1bc14d6e5a9f7216a605a464b36c | b2f84608cc28c492430e972028fa0e178865c78c | /source_py2/combi/_python_toolbox/third_party/unittest2/__init__.py | 49e2cceae502115ad7682c8ecd14fb5abac2f8b0 | [
"Python-2.0",
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | cool-RR/combi | 54efa752403a4acb6933475102702e43de93c81d | 9c5c143a792ffd8fb38b6470f926268c8bacbc31 | refs/heads/master | 2021-09-23T10:02:52.984204 | 2021-09-18T08:45:57 | 2021-09-18T08:45:57 | 25,787,956 | 24 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,548 | py | """
unittest2
unittest2 is a backport of the new features added to the unittest testing
framework in Python 2.7 and beyond. It is tested to run on Python 2.4 - 2.7.
To use unittest2 instead of unittest simply replace ``import unittest`` with
``import python_toolbox.third_party.unittest2``.
Copyright (c) 1999-2003 Steve Purcell
Copyright (c) 2003-2010 Python Software Foundation
This module is free software, and you may redistribute it and/or modify
it under the same terms as Python itself, so long as this copyright message
and disclaimer are retained in their original form.
IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
"""
__all__ = ['TestResult', 'TestCase', 'TestSuite',
'TextTestRunner', 'TestLoader', 'FunctionTestCase', 'main',
'defaultTestLoader', 'SkipTest', 'skip', 'skipIf', 'skipUnless',
'expectedFailure', 'TextTestResult', '__version__', 'collector']
__version__ = '1.0.1'
# Expose obsolete functions for backwards compatibility
__all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases'])
from combi._python_toolbox.third_party.unittest2.collector import collector
from combi._python_toolbox.third_party.unittest2.result import TestResult
from combi._python_toolbox.third_party.unittest2.case import (
TestCase, FunctionTestCase, SkipTest, skip, skipIf,
skipUnless, expectedFailure
)
from combi._python_toolbox.third_party.unittest2.suite import BaseTestSuite, TestSuite
from combi._python_toolbox.third_party.unittest2.loader import (
TestLoader, defaultTestLoader, makeSuite, getTestCaseNames,
findTestCases
)
from combi._python_toolbox.third_party.unittest2.main import TestProgram, main
from combi._python_toolbox.third_party.unittest2.runner import TextTestRunner, TextTestResult
try:
from combi._python_toolbox.third_party.unittest2.signals import (
installHandler, registerResult, removeResult, removeHandler
)
except ImportError:
# Compatibility with platforms that don't have the signal module
pass
else:
__all__.extend(['installHandler', 'registerResult', 'removeResult',
'removeHandler'])
# deprecated
_TextTestResult = TextTestResult
# There are no tests here, so don't try to run anything discovered from
# introspecting the symbols (e.g. FunctionTestCase). Instead, all our
# tests come from within unittest.test.
def load_tests(loader, tests, pattern):
import os.path
# top level directory cached on loader instance
this_dir = os.path.dirname(__file__)
return loader.discover(start_dir=this_dir, pattern=pattern)
__unittest = True
def load_tests(loader, tests, pattern):
# All our tests are in test/ - the test objects found in unittest2 itself
# are base classes not intended to be executed. This load_tests intercepts
# discovery to prevent that.
import python_toolbox.third_party.unittest2.test
result = loader.suiteClass()
for path in unittest2.test.__path__:
result.addTests(loader.discover(path, pattern=pattern))
return result
| [
"[email protected]"
] | |
021f1314d0644e555809568baade395ac69141b5 | 0a973640f0b02d7f3cf9211fcce33221c3a50c88 | /.history/src/easy-money_20210129090305.py | ef65231461d111f8f831f2b4447d7863c8308ec4 | [] | no_license | JiajunChen123/IPO_under_review_crawler | 5468b9079950fdd11c5e3ce45af2c75ccb30323c | 031aac915ebe350ec816c05a29b5827fde588567 | refs/heads/main | 2023-02-26T08:23:09.622725 | 2021-02-04T10:11:16 | 2021-02-04T10:11:16 | 332,619,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,586 | py | # 东方财富网 首发申报
from datetime import datetime,timedelta
from urllib.parse import urlencode
import pandas as pd
import requests
import re
import time
base_url = 'https://datainterface.eastmoney.com/EM_DataCenter/JS.aspx?'
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36'}
query = {'type': 'NS',
'sty' : 'NSFR',
'st' : '1',
'sr' : '-1',
'p' : '1',
'ps' : '5000',
'js' : 'var IBhynDx={pages:(pc),data:[(x)]}',
'mkt' : '1',
'rt' : '53721774'
}
def date_gen():
r = requests.get('http://data.eastmoney.com/xg/xg/sbqy.html',headers=headers)
r.encoding = 'gbk'
soup = BeautifulSoup(r.text,'html.parser')
dateList = [i.text for i in soup.findAll('option')]
yield dateList
def get_eastmoneyData(dateList):
query = {'type': 'NS',
'sty' : 'NSFR',
'st' : '1',
'sr' : '-1',
'p' : '1',
'ps' : '5000',
'js' : 'var IBhynDx={pages:(pc),data:[(x)]}',
'mkt' : '1',
'rt' : '53721774'
}
main_data = []
for date in dateList:
query['fd'] = dateList
# start = datetime.strptime('2017-01-05','%Y-%m-%d').date()
# while start < datetime.today().date():
# query['fd'] = start
url = base_url + urlencode(query)
# yield url
# start += timedelta(days=7)
rs = requests.get(url,headers=headers)
if rs.text == '':
continue
js = rs.text.split('var IBhynDx={pages:1,data:')[1]
data = eval(js[:-1])
main_data.extend(data)
time.sleep(2)
temp = [i.split(',') for i in main_data]
columns = ['会计师事务所','保荐代表人','保荐机构','xxx','律师事务所','日期','所属行业','板块','是否提交财务自查报告',
'注册地','类型','机构名称','签字会计师','签字律师','时间戳','简称']
df = pd.DataFrame(temp,columns=columns)
df['文件链接'] = df['时间戳'].apply(lambda x: "https://notice.eastmoney.com/pdffile/web/H2_" + x + "_1.pdf")
df = df[['机构名称', '类型', '板块', '注册地', '保荐机构','保荐代表人', '律师事务所', '签字律师','会计师事务所',
'签字会计师', '是否提交财务自查报告', '所属行业','日期','xxx', '时间戳', '保荐机构','文件链接']]
# df = df[df['板块'] != '创业板']
df.to_csv('C:/Users/chen/Desktop/IPO_info/eastmoney_pre_data.csv',index=False,encoding='utf-8-sig')
# for i in ['2','4']:
# query = {'type': 'NS',
# 'sty' : 'NSSH',
# 'st' : '1',
# 'sr' : '-1',
# 'p' : '1',
# 'ps' : '5000',
# 'js' : 'var IBhynDx={pages:(pc),data:[(x)]}',
# 'mkt' : i,
# 'rt' : '53723990'
# }
# url = base_url + urlencode(query)
# rss = requests.get(url,headers=headers)
# jss = rss.text.split('var KIBhynDx={pages:1,data:')[1]
# data = eval(jss[:-1])
# temp = [j.split(',') for j in data]
# columns = ['时间戳','yyy','公司代码','机构名称','详情链接','申报日期','上会日期','申购日期','上市日期','9','拟发行数量','发行前总股本','发行后总股本','13','占发行后总股本比例','当前状态','上市地点','主承销商','承销方式','发审委委员','网站','简称']
# df = pd.DataFrame(temp,columns=columns)
# df['文件链接'] = df['时间戳'].apply(lambda x: "https://notice.eastmoney.com/pdffile/web/H2_" + x + "_1.pdf")
# df['详情链接'] = df['公司代码'].apply(lambda x: "data.eastmoney.com/xg/gh/detail/" + x + ".html")
# df = df[['机构名称', '当前状态', '上市地点', '拟发行数量', '申报日期','上会日期', '申购日期', '上市日期', '主承销商','承销方式', '9', '发行前总股本','发行后总股本','13','占发行后总股本比例','发审委委员','网站','公司代码','yyy','时间戳', '简称', '详情链接','文件链接']]
# df.to_csv('C:/Users/chen/Desktop/IPO_info/easymoney_data_{}_onmeeting.csv'.format(i),index=False,encoding='utf-8-sig')
from urllib.parse import urlencode
import time
import requests
from bs4 import BeautifulSoup
import pandas as pd
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36'}
base_url = 'https://datainterface.eastmoney.com/EM_DataCenter/JS.aspx?'
v
zzsc_dict = {}
for date in dateList:
query = {'type': 'NS',
'sty' : 'NSSE',
'st' : '1',
'sr' : '-1',
'p' : '1',
'ps' : '500',
'js' : 'var IBhynDx={pages:(pc),data:[(x)]}',
'mkt' : '4',
'stat':'zzsc',
'fd' : date,
'rt' : '53727636'
}
url = base_url + urlencode(query)
rss = requests.get(url,headers=headers)
if rss.text == 'var IBhynDx={pages:0,data:[{stats:false}]}':
continue
jss = rss.text.split('var IBhynDx={pages:1,data:')[1]
data = eval(jss[:-1])
for i in data:
name = i.split(',')[1]
if name not in zzsc_dict:
zzsc_dict[name] = i.split(',')[2]
else:
continue
time.sleep(2)
zzsc = pd.DataFrame(zzsc_dict.items(),columns = ['机构名称','决定终止审查时间'])
zzsc.to_csv('C:/Users/chen/Desktop/IPO_info/zzsc.csv',encoding='utf-8-sig',index=False)
| [
"[email protected]"
] | |
304e3957bdc086d84bb32f2b58268c58ea73ca28 | 55c250525bd7198ac905b1f2f86d16a44f73e03a | /Python/Games/Cheese Boys/cheeseboys/sprites/speech.py | 5e1567b82b17412d9134367a27d554ca30c1da16 | [] | no_license | NateWeiler/Resources | 213d18ba86f7cc9d845741b8571b9e2c2c6be916 | bd4a8a82a3e83a381c97d19e5df42cbababfc66c | refs/heads/master | 2023-09-03T17:50:31.937137 | 2023-08-28T23:50:57 | 2023-08-28T23:50:57 | 267,368,545 | 2 | 1 | null | 2022-09-08T15:20:18 | 2020-05-27T16:18:17 | null | UTF-8 | Python | false | false | 129 | py | version https://git-lfs.github.com/spec/v1
oid sha256:c6cecd706830ed02d31a0263b2cde423305efa564853d608ed6bd0df573421f1
size 5969
| [
"[email protected]"
] | |
b611f93e5bc12f60c52864354fd9bc2e6658c7e2 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5751500831719424_1/Python/knabbers/game.py | 381bdefdea24efb577b9752009b3a139eb774628 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 2,449 | py | def solve(file):
f = open(file,'r')
lines = f.readlines()
nCases = int(lines[0])
outf = open("output.txt",'w')
i = 1 # line number
n = 1 # case number
while nCases > 0:
#print("case: " + str(n))
line = lines[i].replace('\n', "").split(" ")
N = int(line[0])
s = []
c = []
repl = []
repn = []
for j in range(0,N):
line = lines[i+1+j].replace('\n', "").split(" ")
s.append(line[0])
c.append(0)
repl.append('a')
repn.append(-1)
#print (s)
result = "nothing"
moves = 0
imp = False
while True:
for j in range(0,len(s)):
l = s[j][c[j]]
count = 0
while c[j] < len(s[j]) and s[j][c[j]] == l:
count += 1
c[j]+=1
repl[j] = l
repn[j] = count
#print(repl)
#print(repn)
l = repl[0]
for j in range(1,len(repl)):
if repl[j] != l:
imp = True
#print(imp)
if imp==True:
break
repn.sort()
med = repn[int((len(repn)-1)/2)]
#print(med)
for j in range(0,len(repn)):
off = repn[j]-med
if off < 0:
off = -off
moves += off
#print(moves)
#check done
notdone = False
done = False
for j in range(0,len(c)):
if c[j]==len(s[j]):
done = True
else:
notdone = True
#print(done)
#print(notdone)
if (done == True and notdone == True):
imp = True
break
if (done == True and notdone == False):
break
if (imp == True):
result = "Fegla Won";
else:
result = str(moves)
outf.write("Case #" + str(n) +": " + result + "\n")
i += N+1
nCases -= 1
n+=1
f.close()
outf.close()
| [
"[email protected]"
] | |
b064f1e3de40121d067b76ce1f86adb8ee3c312d | 70410a0fd7fa9004b1d789ca165b21a6bba80b85 | /polls/models.py | 09cec8b62f0c474d5fc67415413ab19d3abdaebd | [] | no_license | Sukhrobjon/django-starter-tutorial | a310907a132d86ae9a7d0ba757642955b0f49569 | 9b6a6f7a8d98b1b85fe24d64d3ca3b7cf12a3932 | refs/heads/master | 2023-04-29T12:05:05.800364 | 2019-07-14T04:17:10 | 2019-07-14T04:17:10 | 189,487,751 | 0 | 0 | null | 2023-04-21T20:37:03 | 2019-05-30T21:57:15 | Python | UTF-8 | Python | false | false | 1,055 | py | import datetime
from django.db import models
from django.utils import timezone
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __str__(self):
"""Return string representation of question text."""
return self.question_text
def was_published_recently(self):
""" Return questions are posted at least one day ago from current day"""
now = timezone.now()
return now - datetime.timedelta(days=1) <= self.pub_date <= now
was_published_recently.admin_order_field = 'pub_date'
was_published_recently.boolean = True
was_published_recently.short_description = 'Published recently?'
class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)
def __str__(self):
""" Return string representation of the text of the choice """
return self.choice_text
| [
"[email protected]"
] | |
c1d98ac5b74e244d504b655e8dc8754ce0952e07 | 76f2a4ea3896a74b155ff970b3ddd538f268ebd4 | /03_function/func_04.py | 8396ab8de7831fcca64ba2b5deb71e7225301c05 | [] | no_license | jnjnslab/python-sample | fb91c34aa274ae6371c9548637e9fe2994da63ff | ce71ceff2854e59c020c646831360a04f6eba0c0 | refs/heads/main | 2023-02-03T01:36:59.926884 | 2020-12-23T10:18:13 | 2020-12-23T10:18:13 | 309,023,319 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 137 | py | #ローカル変数のスコープ
def spam():
eggs = 99
bacon()
print(eggs)
def bacon():
ham = 101
eggs = 0
spam() | [
"[email protected]"
] | |
7e0c8d8062192d16e4bffd7fe377b23e38eb03c8 | 9469e6459a56566ee84731b023eb18bcc14417e6 | /powerapp_pocket/signals.py | 7a41a308f503b8d894e44053cff82286ef5e5733 | [] | no_license | Doist/powerapp-pocket | b5adca6b768f98ed61299e5436018535309de60c | 920beb7892527f8302c8ea53a2e1edf161ccae91 | refs/heads/master | 2021-01-25T12:07:27.533750 | 2015-06-04T23:47:33 | 2015-06-04T23:47:33 | 35,607,506 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 655 | py | # -*- coding: utf-8 -*-
from logging import getLogger
from django.dispatch.dispatcher import receiver
from .apps import AppConfig
from .tasks import process_item
from powerapp.core.todoist_utils import get_personal_project
logger = getLogger(__name__)
PROJECT_NAME = 'Pocket task list'
@receiver(AppConfig.signals.todoist_task_added)
@receiver(AppConfig.signals.todoist_task_updated)
def on_task_added_edited(sender, integration=None, obj=None, **kw):
project = get_personal_project(integration, PROJECT_NAME)
if obj['project_id'] == project['id'] and not obj['checked']:
process_item.delay(integration.id, obj['content'], obj['id'])
| [
"[email protected]"
] | |
6dde344d937bbde2680824f18e8a250bc34d3438 | 7a550d2268bc4bc7e2fec608ffb1db4b2e5e94a0 | /0601-0700/0606-Construct String from Binary Tree/0606-Construct String from Binary Tree.py | 671610319831f8a2afe833ffb4c97b48a252abe7 | [
"MIT"
] | permissive | jiadaizhao/LeetCode | be31bd0db50cc6835d9c9eff8e0175747098afc6 | 4ddea0a532fe7c5d053ffbd6870174ec99fc2d60 | refs/heads/master | 2021-11-05T04:38:47.252590 | 2021-10-31T09:54:53 | 2021-10-31T09:54:53 | 99,655,604 | 52 | 28 | MIT | 2020-10-02T12:47:47 | 2017-08-08T05:57:26 | C++ | UTF-8 | Python | false | false | 467 | py | # Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def tree2str(self, t: TreeNode) -> str:
if t is None:
return ''
left = '({})'.format(self.tree2str(t.left)) if t.left or t.right else ''
right = '({})'.format(self.tree2str(t.right)) if t.right else ''
return '{}{}{}'.format(str(t.val), left, right)
| [
"[email protected]"
] | |
c0678c6993c807e664ea8ec4b97700245f70a249 | acb8e84e3b9c987fcab341f799f41d5a5ec4d587 | /langs/8/tmq.py | 27bf48cf32fb5e4b44eceb5c0914b07b54d6bd96 | [] | no_license | G4te-Keep3r/HowdyHackers | 46bfad63eafe5ac515da363e1c75fa6f4b9bca32 | fb6d391aaecb60ab5c4650d4ae2ddd599fd85db2 | refs/heads/master | 2020-08-01T12:08:10.782018 | 2016-11-13T20:45:50 | 2016-11-13T20:45:50 | 73,624,224 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | import sys
def printFunction(lineRemaining):
if lineRemaining[0] == '"' and lineRemaining[-1] == '"':
if len(lineRemaining) > 2:
#data to print
lineRemaining = lineRemaining[1:-1]
print ' '.join(lineRemaining)
else:
print
def main(fileName):
with open(fileName) as f:
for line in f:
data = line.split()
if data[0] == 'tMQ':
printFunction(data[1:])
else:
print 'ERROR'
return
if __name__ == '__main__':
main(sys.argv[1]) | [
"[email protected]"
] | |
3bdbcd894aca2764c5f613e61735a26b4dcd9682 | 60b1f668808de2b82c2fcb62b07b45bb165219f2 | /egoi-api/models/contact_tags_bulk.py | 777973f2f1f9803fe088a3eca9cc254351553231 | [] | no_license | andersonmiguel/Egoi | 6d37bf7a3a7555e764f7a6e792b3ef1c68fe8e20 | b5f59f9b33ea94e170f4e7e26c6a37a78d2874c2 | refs/heads/master | 2022-06-21T07:18:44.920786 | 2020-05-04T17:29:02 | 2020-05-04T17:29:02 | 261,250,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,818 | py | # coding: utf-8
"""
APIv3 (Beta)
# Introduction Just a quick peek!!! This is our new version of API. Remember, it is not stable yet!!! But we invite you play with it and give us your feedback ;) # Getting Started E-goi can be integrated with many environments and programming languages via our REST API. We've created a developer focused portal to give your organization a clear and quick overview of how to integrate with E-goi. The developer portal focuses on scenarios for integration and flow of events. We recommend familiarizing yourself with all of the content in the developer portal, before start using our rest API. The E-goi APIv3 is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported. Request data is passed to the API by POSTing JSON objects to the API endpoints with the appropriate parameters. BaseURL = api.egoiapp.com # RESTful Services This API supports 5 HTTP methods: * <b>GET</b>: The HTTP GET method is used to **read** (or retrieve) a representation of a resource. * <b>POST</b>: The POST verb is most-often utilized to **create** new resources. * <b>PATCH</b>: PATCH is used for **modify** capabilities. The PATCH request only needs to contain the changes to the resource, not the complete resource * <b>PUT</b>: PUT is most-often utilized for **update** capabilities, PUT-ing to a known resource URI with the request body containing the newly-updated representation of the original resource. * <b>DELETE</b>: DELETE is pretty easy to understand. It is used to **delete** a resource identified by a URI. # Authentication We use a custom authentication method, you will need a apikey that you can find in your account settings. Below you will see a curl example to get your account information: #!/bin/bash curl -X GET 'https://api.egoiapp.com/my-account' \\ -H 'accept: application/json' \\ -H 'Apikey: <YOUR_APY_KEY>' Here you can see a curl Post example with authentication: #!/bin/bash curl -X POST 'http://api.egoiapp.com/tags' \\ -H 'accept: application/json' \\ -H 'Apikey: <YOUR_APY_KEY>' \\ -H 'Content-Type: application/json' \\ -d '{`name`:`Your custom tag`,`color`:`#FFFFFF`}' # SDK Get started quickly with E-goi with our integration tools. Our SDK is a modern open source library that makes it easy to integrate your application with E-goi services. * <b><a href='https://github.com/E-goi/sdk-java'>Java</a></b> * <b><a href='https://github.com/E-goi/sdk-php'>PHP</a></b> * <b><a href='https://github.com/E-goi/sdk-python'>Python</a></b> <security-definitions/> # noqa: E501
The version of the OpenAPI document: 3.0.0-beta
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from egoi-api.configuration import Configuration
class ContactTagsBulk(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'tags': 'list[int]'
}
attribute_map = {
'tags': 'tags'
}
def __init__(self, tags=None, local_vars_configuration=None): # noqa: E501
"""ContactTagsBulk - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._tags = None
self.discriminator = None
if tags is not None:
self.tags = tags
@property
def tags(self):
"""Gets the tags of this ContactTagsBulk. # noqa: E501
Array of tags for this contact # noqa: E501
:return: The tags of this ContactTagsBulk. # noqa: E501
:rtype: list[int]
"""
return self._tags
@tags.setter
def tags(self, tags):
"""Sets the tags of this ContactTagsBulk.
Array of tags for this contact # noqa: E501
:param tags: The tags of this ContactTagsBulk. # noqa: E501
:type: list[int]
"""
self._tags = tags
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ContactTagsBulk):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, ContactTagsBulk):
return True
return self.to_dict() != other.to_dict()
| [
"[email protected]"
] | |
3e1f295e6825076419cc4b9a199f74184b8640d6 | b6cdef81a572e02c0cbd795a8fb6bbc74f99d627 | /market/urls.py | 638b0bfb0222ca32b774f2061af49d1e112a6482 | [
"MIT"
] | permissive | sodatta/Stocks-Screener | 4afbdd68c1e80dafece50e3e0b967af35dd83c07 | 0b8da91da40b715beaf3a79163b1bdf6ea3be3b9 | refs/heads/master | 2023-07-27T13:14:47.798403 | 2021-05-03T20:04:51 | 2021-05-03T20:04:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | from django.urls import path
from market.views import *
app_name = "market"
urlpatterns = [
path('list', list_stocks, name='list_stocks'),
path('create', create_stock, name='create_stock'),
path('update/<int:pk>', update_stock, name='update_stock'),
path('delete/<int:pk>', delete_stock, name='delete_stock'),
path('<int:pk>', view_stock, name='view_stock'),
path('stock_weekly/<int:pk>', view_stock_weekly, name='view_stock_weekly'),
path('stock_monthly/<int:pk>', view_stock_monthly, name='view_stock_monthly'),
path('sectors', sectors, name='sectors'),
]
| [
"[email protected]"
] | |
0235ff898c02b1ea6cffade6cdbd16bf275f62db | 054ddbc1fa0e1b1d0a999bbe877591e942aa0f12 | /python/02-python高级-2/07-调试程序.py | fe40b41d92b7c298c62ebdd30a2a6a9627d046fd | [] | no_license | VinceBy/newone | 66c8cf77159344c7d2ec196233d58a412e1c3073 | ffc6a0d9ccbdb3f66c4995834f01e3bc2df0415d | refs/heads/master | 2022-02-22T23:00:21.720497 | 2019-07-09T08:47:25 | 2019-07-09T08:47:25 | 195,958,240 | 0 | 0 | null | 2022-02-12T09:19:32 | 2019-07-09T07:42:20 | Python | UTF-8 | Python | false | false | 337 | py | #coding=utf-8
import pdb
def add3Nums(a1,a2,a3):
result = a1+a2+a3
return result
def get3NumsAvarage(s1,s2):
s3 = s1 + s2 + s1
result = 0
result = add3Nums(s1,s2,s3)/3
return result
if __name__ == '__main__':
a = 11
# pdb.set_trace()
b = 12
final = get3NumsAvarage(a,b)
print final | [
"[email protected]"
] | |
1dfa288faab5484bb37471149f7533c066d2365c | b37e40e4dc4ad3fc9c317b68284fb86955a64bf5 | /a1/venv/lib/python3.6/site-packages/probability/distributions/functions/discrete_function_1d.py | 604d6e50deadbe409568e07b3f193e7efeeefe6d | [] | no_license | bateikoEd/Text-mining | 89c57dec1b6ffcae82a49fc6a23acab89d7ca60e | ccd3f50b694b90269450e5304c504fac5a117f59 | refs/heads/master | 2021-01-14T18:02:35.642837 | 2021-01-13T14:04:56 | 2021-01-13T14:04:56 | 242,695,063 | 0 | 1 | null | 2020-05-20T09:46:22 | 2020-02-24T09:28:46 | Python | UTF-8 | Python | false | false | 2,324 | py | from matplotlib.axes import Axes
from pandas import Series
from scipy.stats import rv_discrete
from typing import Iterable, overload
from probability.distributions.mixins.plottable_mixin import PlottableMixin
from probability.plots import new_axes
class DiscreteFunction1d(object):
def __init__(self, distribution: rv_discrete, method_name: str, name: str,
parent: PlottableMixin):
self._distribution = distribution
self._method_name: str = method_name
self._name: str = name
self._method = getattr(distribution, method_name)
self._parent: PlottableMixin = parent
@overload
def at(self, k: int) -> int:
pass
@overload
def at(self, k: Iterable[int]) -> Series:
pass
def at(self, k):
"""
Evaluation of the function for each value of k.
"""
if isinstance(k, int):
return self._method(k)
elif isinstance(k, Iterable):
return Series(index=k, data=self._method(k), name=self._name)
def plot(self, k: Iterable[int], color: str = 'C0', kind: str = 'bar', ax: Axes = None,
**kwargs) -> Axes:
"""
Plot the function.
:param k: Range of values of k to plot p(k) over.
:param color: Optional color for the series.
:param kind: Kind of plot e.g. 'bar', 'line'.
:param ax: Optional matplotlib axes to plot on.
:param kwargs: Additional arguments for the matplotlib plot function.
"""
data: Series = self.at(k)
ax = ax or new_axes()
# special kwargs
vlines = None
if 'vlines' in kwargs.keys():
vlines = kwargs.pop('vlines')
if self._name == 'PMF':
data.plot(kind=kind, label=self._parent.label, color=color,
ax=ax, **kwargs)
elif self._name == 'CDF':
data.plot(kind='line', label=self._parent.label, color=color,
drawstyle='steps-post', ax=ax,
**kwargs)
else:
raise ValueError('plot not implemented for {}'.format(self._name))
if vlines:
ax.vlines(x=k, ymin=0, ymax=data.values, color=color)
ax.set_xlabel(self._parent.x_label)
ax.set_ylabel(self._name)
return ax
| [
"[email protected]"
] | |
28d07593900fbe9c33f4f5c559e0ca97f30e0ba5 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/DatadigitalFincloudFinsaasDigitalrmbSendSyncResponse.py | 230307b7cea48730702e6bdd98d81bd253790e93 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 497 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class DatadigitalFincloudFinsaasDigitalrmbSendSyncResponse(AlipayResponse):
def __init__(self):
super(DatadigitalFincloudFinsaasDigitalrmbSendSyncResponse, self).__init__()
def parse_response_content(self, response_content):
response = super(DatadigitalFincloudFinsaasDigitalrmbSendSyncResponse, self).parse_response_content(response_content)
| [
"[email protected]"
] | |
7158e87783927fb9354ce9b8d81f6f0ec4788c5e | 2fcc860bcc2c76f91e899de880e4c6d8a4b1abfb | /spider/users/tests/test_forms.py | caca2bfdb6e0549bfa0f222376dd815227564165 | [
"MIT"
] | permissive | dcopm999/spider | 54de2e10def4db662ce15f4e4fd3682927f2999b | 889d2ee6d3d5f54ccb1f22a645244bc7395bb202 | refs/heads/master | 2022-12-24T23:15:32.343792 | 2020-10-02T14:33:45 | 2020-10-02T14:33:45 | 300,559,008 | 0 | 0 | MIT | 2020-10-02T14:33:46 | 2020-10-02T09:03:09 | Python | UTF-8 | Python | false | false | 1,111 | py | import pytest
from spider.users.forms import UserCreationForm
from spider.users.tests.factories import UserFactory
pytestmark = pytest.mark.django_db
class TestUserCreationForm:
def test_clean_username(self):
# A user with proto_user params does not exist yet.
proto_user = UserFactory.build()
form = UserCreationForm(
{
"username": proto_user.username,
"password1": proto_user._password,
"password2": proto_user._password,
}
)
assert form.is_valid()
assert form.clean_username() == proto_user.username
# Creating a user.
form.save()
# The user with proto_user params already exists,
# hence cannot be created.
form = UserCreationForm(
{
"username": proto_user.username,
"password1": proto_user._password,
"password2": proto_user._password,
}
)
assert not form.is_valid()
assert len(form.errors) == 1
assert "username" in form.errors
| [
"[email protected]"
] | |
f3ccf27cfb27169b20dc78aba448e82e482efb89 | a7371301cea503bacc82619fde651aac85f2738b | /mccabe_group/scripts/test/modify_water_xml.py | 171abb566e3b394533209315a25f7a6a686931f5 | [] | no_license | PTC-CMC/McCabeGroup | b9931a022d0af52aeb2891b548c6294ebc0ab7b7 | 19e0578e91fc82cc24e974b9cc2e3b6a6722d36b | refs/heads/master | 2021-06-11T05:05:53.034326 | 2020-03-24T01:40:05 | 2020-03-24T01:40:05 | 128,414,852 | 1 | 3 | null | 2020-03-06T17:46:44 | 2018-04-06T15:47:17 | Python | UTF-8 | Python | false | false | 3,192 | py | import pdb
from lxml import etree
import numpy as np
#KJ_TO_KCAL = 0.239
#NM_TO_A = 10
# Units from the chodera group were in agreement with foyer/openmm units
# leave everything in terms of kj and nm, but I'm too lazy to modify the
# functions below, so i'm leaving the conversions here
KJ_TO_KCAL = 1
NM_TO_A = 1
# This code is supposed to modify the charmm36.xml code from the Chodera group
# In a format suitable for Foyer
# Note that this xml has some additional atomtypes specified from Tim's parameters
#tree = etree.parse('charmm36_nowaters.xml')
tree = etree.parse('waters_ions_default.xml')
root = tree.getroot()
# All the relevant XML elements
atomTypes = root.findall('AtomTypes')[0]
harmonicBondForce = root.findall('HarmonicBondForce')[0]
harmonicAngleForce = root.findall('HarmonicAngleForce')[0]
nonbondedForce = root.findall('NonbondedForce')[0]
lennardJonesForce = root.findall("LennardJonesForce")[0]
new_root = etree.Element('ForceField')
# Atomtypes
for type_element in atomTypes:
# Need to add underscores for all elements and definitions
# This is to avoid having to use SMARTS to atomtype a system
# Similar to CG methodology for forcefields
if type_element.attrib['name'] != 'ZN':
type_element.attrib['def'] = "[_{}]".format(type_element.attrib['name'])
type_element.attrib['element'] = "_{}".format(type_element.attrib['name'])
else:
atomTypes.remove(type_element)
new_root.append(atomTypes)
# Bonds
for bond_element in harmonicBondForce:
# Do unit conversions for them all
bond_element.attrib['k'] = "{:15.5f}".format( KJ_TO_KCAL * (NM_TO_A **-2) *\
float(bond_element.attrib['k'])).strip()
bond_element.attrib['length']="{:7.4f}".format(NM_TO_A * \
float(bond_element.attrib['length'])).strip()
new_root.append(harmonicBondForce)
# Angles
for angle_element in harmonicAngleForce:
angle_element.attrib['k'] = "{:15.5f}".format(KJ_TO_KCAL * \
float(angle_element.attrib['k'])).strip()
angle_element.attrib['angle'] = "{:15.5f}".format(\
float(angle_element.attrib['angle'])).strip()
new_root.append(harmonicAngleForce)
# LJ force terms move into the nonbondedforce terms
for nonbond_element in nonbondedForce:
# Look through each nonbonded force
if nonbond_element.tag != "UseAttributeFromResidue" and \
nonbond_element.attrib['type'] != "ZN":
for lj_element in lennardJonesForce:
# Find the lennard jones force with the associated type
if nonbond_element.tag=="Atom" and lj_element.tag=="Atom":
if nonbond_element.attrib['type'] == lj_element.attrib['type']:
nonbond_element.attrib['sigma'] = lj_element.attrib['sigma']
nonbond_element.attrib['epsilon'] = lj_element.attrib['epsilon']
nonbond_element.attrib['charge'] = "0.0"
else:
nonbondedForce.remove(nonbond_element)
new_root.append(nonbondedForce)
# Construct tree and save
new_tree = etree.ElementTree(new_root)
new_tree.write("foyer_water.xml", pretty_print=True)
| [
"[email protected]"
] | |
677aa3639fe10a720b5b170c8406f7544d2a8ab4 | 64832dd1e64cfc6de83c5abf099461eda50f648c | /major/migrations/0006_auto_20190212_1502.py | 9a52e37c1930c929474d4d021feb9c920e6e2d76 | [] | no_license | showzvan/mysite | d7e79e16eb8c2d3598d00d1a96fa0b1940765913 | 32826c83915a2f95440c04ed20a7800d2c343ac1 | refs/heads/master | 2020-04-27T17:05:19.143296 | 2019-03-08T09:09:45 | 2019-03-08T09:09:45 | 174,504,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 420 | py | # Generated by Django 2.1.5 on 2019-02-12 15:02
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('major', '0005_auto_20190212_1457'),
]
operations = [
migrations.AlterModelOptions(
name='majors',
options={'ordering': ['major_name'], 'verbose_name': '专业信息', 'verbose_name_plural': '专业信息'},
),
]
| [
"[email protected]"
] | |
df10c7affbd76dbac828bbf7e7e2e2c2252c50a9 | 54982f9506789cacd236a8890cd67c48d0e8df0e | /git_laser_scanner/devel/_setup_util.py | a6b174641e4b24fbaad0f283baadafe28bebdc2a | [] | no_license | bassie8881/ROS_stuff | 53e0d750c35f653bf9f93cf28ee7d7b604a69af6 | 627b114c6dd469a4e81085a894676e60aeb23691 | refs/heads/master | 2021-01-17T17:03:25.219628 | 2016-07-14T03:12:04 | 2016-07-14T03:12:04 | 63,243,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,356 | py | #!/usr/bin/python
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Willow Garage, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
'''This file generates shell code for the setup.SHELL scripts to set environment variables'''
from __future__ import print_function
import argparse
import copy
import errno
import os
import platform
import sys
CATKIN_MARKER_FILE = '.catkin'
system = platform.system()
IS_DARWIN = (system == 'Darwin')
IS_WINDOWS = (system == 'Windows')
# subfolder of workspace prepended to CMAKE_PREFIX_PATH
ENV_VAR_SUBFOLDERS = {
'CMAKE_PREFIX_PATH': '',
'CPATH': 'include',
'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': ['lib', os.path.join('lib', 'arm-linux-gnueabihf')],
'PATH': 'bin',
'PKG_CONFIG_PATH': [os.path.join('lib', 'pkgconfig'), os.path.join('lib', 'arm-linux-gnueabihf', 'pkgconfig')],
'PYTHONPATH': 'lib/python2.7/dist-packages',
}
def rollback_env_variables(environ, env_var_subfolders):
'''
Generate shell code to reset environment variables
by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH.
This does not cover modifications performed by environment hooks.
'''
lines = []
unmodified_environ = copy.copy(environ)
for key in sorted(env_var_subfolders.keys()):
subfolders = env_var_subfolders[key]
if not isinstance(subfolders, list):
subfolders = [subfolders]
for subfolder in subfolders:
value = _rollback_env_variable(unmodified_environ, key, subfolder)
if value is not None:
environ[key] = value
lines.append(assignment(key, value))
if lines:
lines.insert(0, comment('reset environment variables by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH'))
return lines
def _rollback_env_variable(environ, name, subfolder):
'''
For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder.
:param subfolder: str '' or subfoldername that may start with '/'
:returns: the updated value of the environment variable.
'''
value = environ[name] if name in environ else ''
env_paths = [path for path in value.split(os.pathsep) if path]
value_modified = False
if subfolder:
if subfolder.startswith(os.path.sep) or (os.path.altsep and subfolder.startswith(os.path.altsep)):
subfolder = subfolder[1:]
if subfolder.endswith(os.path.sep) or (os.path.altsep and subfolder.endswith(os.path.altsep)):
subfolder = subfolder[:-1]
for ws_path in _get_workspaces(environ, include_fuerte=True, include_non_existing=True):
path_to_find = os.path.join(ws_path, subfolder) if subfolder else ws_path
path_to_remove = None
for env_path in env_paths:
env_path_clean = env_path[:-1] if env_path and env_path[-1] in [os.path.sep, os.path.altsep] else env_path
if env_path_clean == path_to_find:
path_to_remove = env_path
break
if path_to_remove:
env_paths.remove(path_to_remove)
value_modified = True
new_value = os.pathsep.join(env_paths)
return new_value if value_modified else None
def _get_workspaces(environ, include_fuerte=False, include_non_existing=False):
'''
Based on CMAKE_PREFIX_PATH return all catkin workspaces.
:param include_fuerte: The flag if paths starting with '/opt/ros/fuerte' should be considered workspaces, ``bool``
'''
# get all cmake prefix paths
env_name = 'CMAKE_PREFIX_PATH'
value = environ[env_name] if env_name in environ else ''
paths = [path for path in value.split(os.pathsep) if path]
# remove non-workspace paths
workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE)) or (include_fuerte and path.startswith('/opt/ros/fuerte')) or (include_non_existing and not os.path.exists(path))]
return workspaces
def prepend_env_variables(environ, env_var_subfolders, workspaces):
'''
Generate shell code to prepend environment variables
for the all workspaces.
'''
lines = []
lines.append(comment('prepend folders of workspaces to environment variables'))
paths = [path for path in workspaces.split(os.pathsep) if path]
prefix = _prefix_env_variable(environ, 'CMAKE_PREFIX_PATH', paths, '')
lines.append(prepend(environ, 'CMAKE_PREFIX_PATH', prefix))
for key in sorted([key for key in env_var_subfolders.keys() if key != 'CMAKE_PREFIX_PATH']):
subfolder = env_var_subfolders[key]
prefix = _prefix_env_variable(environ, key, paths, subfolder)
lines.append(prepend(environ, key, prefix))
return lines
def _prefix_env_variable(environ, name, paths, subfolders):
'''
Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items.
'''
value = environ[name] if name in environ else ''
environ_paths = [path for path in value.split(os.pathsep) if path]
checked_paths = []
for path in paths:
if not isinstance(subfolders, list):
subfolders = [subfolders]
for subfolder in subfolders:
path_tmp = path
if subfolder:
path_tmp = os.path.join(path_tmp, subfolder)
# exclude any path already in env and any path we already added
if path_tmp not in environ_paths and path_tmp not in checked_paths:
checked_paths.append(path_tmp)
prefix_str = os.pathsep.join(checked_paths)
if prefix_str != '' and environ_paths:
prefix_str += os.pathsep
return prefix_str
def assignment(key, value):
if not IS_WINDOWS:
return 'export %s="%s"' % (key, value)
else:
return 'set %s=%s' % (key, value)
def comment(msg):
if not IS_WINDOWS:
return '# %s' % msg
else:
return 'REM %s' % msg
def prepend(environ, key, prefix):
if key not in environ or not environ[key]:
return assignment(key, prefix)
if not IS_WINDOWS:
return 'export %s="%s$%s"' % (key, prefix, key)
else:
return 'set %s=%s%%%s%%' % (key, prefix, key)
def find_env_hooks(environ, cmake_prefix_path):
'''
Generate shell code with found environment hooks
for the all workspaces.
'''
lines = []
lines.append(comment('found environment hooks in workspaces'))
generic_env_hooks = []
generic_env_hooks_workspace = []
specific_env_hooks = []
specific_env_hooks_workspace = []
generic_env_hooks_by_filename = {}
specific_env_hooks_by_filename = {}
generic_env_hook_ext = 'bat' if IS_WINDOWS else 'sh'
specific_env_hook_ext = environ['CATKIN_SHELL'] if not IS_WINDOWS and 'CATKIN_SHELL' in environ and environ['CATKIN_SHELL'] else None
# remove non-workspace paths
workspaces = [path for path in cmake_prefix_path.split(os.pathsep) if path and os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))]
for workspace in reversed(workspaces):
env_hook_dir = os.path.join(workspace, 'etc', 'catkin', 'profile.d')
if os.path.isdir(env_hook_dir):
for filename in sorted(os.listdir(env_hook_dir)):
if filename.endswith('.%s' % generic_env_hook_ext):
# remove previous env hook with same name if present
if filename in generic_env_hooks_by_filename:
i = generic_env_hooks.index(generic_env_hooks_by_filename[filename])
generic_env_hooks.pop(i)
generic_env_hooks_workspace.pop(i)
# append env hook
generic_env_hooks.append(os.path.join(env_hook_dir, filename))
generic_env_hooks_workspace.append(workspace)
generic_env_hooks_by_filename[filename] = generic_env_hooks[-1]
elif specific_env_hook_ext is not None and filename.endswith('.%s' % specific_env_hook_ext):
# remove previous env hook with same name if present
if filename in specific_env_hooks_by_filename:
i = specific_env_hooks.index(specific_env_hooks_by_filename[filename])
specific_env_hooks.pop(i)
specific_env_hooks_workspace.pop(i)
# append env hook
specific_env_hooks.append(os.path.join(env_hook_dir, filename))
specific_env_hooks_workspace.append(workspace)
specific_env_hooks_by_filename[filename] = specific_env_hooks[-1]
env_hooks = generic_env_hooks + specific_env_hooks
env_hooks_workspace = generic_env_hooks_workspace + specific_env_hooks_workspace
count = len(env_hooks)
lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_COUNT', count))
for i in range(count):
lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d' % i, env_hooks[i]))
lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d_WORKSPACE' % i, env_hooks_workspace[i]))
return lines
def _parse_arguments(args=None):
parser = argparse.ArgumentParser(description='Generates code blocks for the setup.SHELL script.')
parser.add_argument('--extend', action='store_true', help='Skip unsetting previous environment variables to extend context')
return parser.parse_known_args(args=args)[0]
if __name__ == '__main__':
try:
try:
args = _parse_arguments()
except Exception as e:
print(e, file=sys.stderr)
sys.exit(1)
# environment at generation time
CMAKE_PREFIX_PATH = '/home/odroid/bit_laser_scanner/devel;/home/odroid/catkin_ws/devel;/home/odroid/git_laser_scanner/devel;/opt/ros/indigo'.split(';')
# prepend current workspace if not already part of CPP
base_path = os.path.dirname(__file__)
if base_path not in CMAKE_PREFIX_PATH:
CMAKE_PREFIX_PATH.insert(0, base_path)
CMAKE_PREFIX_PATH = os.pathsep.join(CMAKE_PREFIX_PATH)
environ = dict(os.environ)
lines = []
if not args.extend:
lines += rollback_env_variables(environ, ENV_VAR_SUBFOLDERS)
lines += prepend_env_variables(environ, ENV_VAR_SUBFOLDERS, CMAKE_PREFIX_PATH)
lines += find_env_hooks(environ, CMAKE_PREFIX_PATH)
print('\n'.join(lines))
# need to explicitly flush the output
sys.stdout.flush()
except IOError as e:
# and catch potantial "broken pipe" if stdout is not writable
# which can happen when piping the output to a file but the disk is full
if e.errno == errno.EPIPE:
print(e, file=sys.stderr)
sys.exit(2)
raise
sys.exit(0)
| [
"[email protected]"
] | |
c50f4d0827019512e5a5c1ff85c3e4ed26cc6f05 | f9684c301ce50a6bbb5a75280cd4c70277119f27 | /yelpdetails/yelpdetails/middlewares.py | b5a408ed741194ce385e883725c5905470a0166d | [] | no_license | vaibhav89000/yelpdetails | 76149f2feed5cbad98b3e67d3a786223289fc1f4 | b7ce6f739a7f76fbe665e27eb097475775c0c489 | refs/heads/master | 2022-11-25T05:09:56.803075 | 2020-07-06T12:45:54 | 2020-07-06T12:45:54 | 269,969,213 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,591 | py | # -*- coding: utf-8 -*-
# Define here the models for your spider middleware
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/spider-middleware.html
from scrapy import signals
class YelpdetailsSpiderMiddleware:
# Not all methods need to be defined. If a method is not defined,
# scrapy acts as if the spider middleware does not modify the
# passed objects.
@classmethod
def from_crawler(cls, crawler):
# This method is used by Scrapy to create your spiders.
s = cls()
crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)
return s
def process_spider_input(self, response, spider):
# Called for each response that goes through the spider
# middleware and into the spider.
# Should return None or raise an exception.
return None
def process_spider_output(self, response, result, spider):
# Called with the results returned from the Spider, after
# it has processed the response.
# Must return an iterable of Request, dict or Item objects.
for i in result:
yield i
def process_spider_exception(self, response, exception, spider):
# Called when a spider or process_spider_input() method
# (from other spider middleware) raises an exception.
# Should return either None or an iterable of Request, dict
# or Item objects.
pass
def process_start_requests(self, start_requests, spider):
# Called with the start requests of the spider, and works
# similarly to the process_spider_output() method, except
# that it doesn’t have a response associated.
# Must return only requests (not items).
for r in start_requests:
yield r
def spider_opened(self, spider):
spider.logger.info('Spider opened: %s' % spider.name)
class YelpdetailsDownloaderMiddleware:
# Not all methods need to be defined. If a method is not defined,
# scrapy acts as if the downloader middleware does not modify the
# passed objects.
@classmethod
def from_crawler(cls, crawler):
# This method is used by Scrapy to create your spiders.
s = cls()
crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)
return s
def process_request(self, request, spider):
# Called for each request that goes through the downloader
# middleware.
# Must either:
# - return None: continue processing this request
# - or return a Response object
# - or return a Request object
# - or raise IgnoreRequest: process_exception() methods of
# installed downloader middleware will be called
return None
def process_response(self, request, response, spider):
# Called with the response returned from the downloader.
# Must either;
# - return a Response object
# - return a Request object
# - or raise IgnoreRequest
return response
def process_exception(self, request, exception, spider):
# Called when a download handler or a process_request()
# (from other downloader middleware) raises an exception.
# Must either:
# - return None: continue processing this exception
# - return a Response object: stops process_exception() chain
# - return a Request object: stops process_exception() chain
pass
def spider_opened(self, spider):
spider.logger.info('Spider opened: %s' % spider.name)
| [
"[email protected]"
] | |
3d9532f5a3b3bbc62b89f781bbac4a6bf43b70d0 | 4b0e7c654249cc098ed2230f16e5a19a9329ca4b | /Day3/whileExample.py | 3d9dde6bc49db6e3f2a7ceffb0e1a7139ec1ea48 | [] | no_license | aravindanath/rio_de_janeiro | 5a1d41e4ff4201f2b6be2f81437376c01ae30238 | 43a6c0f704ff5d55256705da13057d1532510f16 | refs/heads/master | 2020-07-24T13:40:55.655457 | 2019-12-02T02:47:16 | 2019-12-02T02:47:16 | 207,945,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 221 | py |
empty=[]
tup= (1,2,3,55.3,3)
x = 0
while x<=10:
print(x)
empty.append(x)
x=x+3
# break
else:
print("Out of loop!..")
print(empty)
empty.sort(reverse=True)
print(empty)
empty.pop()
print(empty) | [
"[email protected]"
] | |
05f77bf55f362c947875830112ac1b7baf13a757 | 118f14634ea34b6301f076cc0137272e2a683322 | /store/migrations/0002_store.py | 5faf770281abebb25befe598b0d8fbf90754fb2f | [
"MIT"
] | permissive | vollov/ecomstore | 10fce347c100fcbaa86687a5738dcf57dba05fc9 | ba9d7e6d74b29de2e3e9411a481248afdc172a40 | refs/heads/master | 2021-01-09T21:54:21.976982 | 2015-10-28T20:31:07 | 2015-10-28T20:31:07 | 45,086,698 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,128 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import uuid
class Migration(migrations.Migration):
dependencies = [
('store', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Store',
fields=[
('id', models.CharField(default=uuid.uuid4, max_length=64, serialize=False, verbose_name='Activation key', primary_key=True)),
('name', models.CharField(max_length=60, unique=True, null=True)),
('code', models.CharField(max_length=10, unique=True, null=True)),
('currency_rate', models.DecimalField(default=5.0, max_digits=9, decimal_places=2, blank=True)),
('tax_rate', models.DecimalField(default=0.13, max_digits=9, decimal_places=2, blank=True)),
('agent_share', models.DecimalField(default=0.4, max_digits=9, decimal_places=2, blank=True)),
('created', models.DateTimeField(auto_now_add=True)),
('active', models.BooleanField(default=True)),
],
),
]
| [
"[email protected]"
] | |
a826b762da02774c07c94c4213076ad10aa14a12 | ee9a391b2023ec3d02dfa44a00e9b219a56c1890 | /exercises/timers_ex1.py | f93d350c0d02c0795a340ef5fbc0a32cbaea678c | [
"Unlicense"
] | permissive | kotalbert/interprog1 | b12b5f281bd93440818275b6da6a987e206e1cec | a49ecef14453839518f1e8a6551fb3af493b1c2c | refs/heads/master | 2021-05-29T01:51:13.758768 | 2015-03-12T15:38:34 | 2015-03-12T15:38:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 523 | py | """
An Introduction to Interactive Programming in Python (Part 1)
Practice exercises for timers # 1.
Counter to console.
"""
# Counter ticks
###################################################
# Student should add code where relevant to the following.
import simpleguitk as simplegui
counter = 0
# Timer handler
def tick():
global counter
print counter
counter += 1
# create timer
timer = simplegui.create_timer(1000, tick)
frame = simplegui.create_frame("Ticks.", 200, 200)
timer.start()
frame.start() | [
"[email protected]"
] | |
85ed587604b914ef8a8d2922a8737395eb48e553 | 946ff3fa181aa5ebb3e4f8d4bb7c15b6f6fe63a9 | /tests/algorithms/conftest.py | 5686332d238c67925b0c84ee05c1ed34a4376821 | [
"BSD-3-Clause"
] | permissive | VIDA-NYU/openclean-metanome | 9908e725d482fab12903e9e87307c5ddf06590c8 | 37948eb25142ed4ba884fc07bfe0cad5666769e8 | refs/heads/master | 2023-06-04T15:42:02.600499 | 2021-06-16T08:38:54 | 2021-06-16T08:38:54 | 294,754,491 | 1 | 0 | BSD-3-Clause | 2021-06-16T08:38:54 | 2020-09-11T17:02:45 | Python | UTF-8 | Python | false | false | 641 | py | # This file is part of the Data Cleaning Library (openclean).
#
# Copyright (C) 2018-2021 New York University.
#
# openclean is released under the Revised BSD License. See file LICENSE for
# full license details.
"""Fixtures for Metanome algorithm unit tests."""
import pandas as pd
import pytest
from openclean.data.types import Column
@pytest.fixture
def dataset():
"""Simple pandas data frame with one row and three columns."""
return pd.DataFrame(
data=[[1, 2, 3]],
columns=[
Column(colid=1, name='A'),
Column(colid=2, name='B'),
Column(colid=3, name='C')
]
)
| [
"[email protected]"
] | |
f672cb05e879429500f154f105cba25f6049575f | 87e6c47bf745f0b00de2dd9bfe4d4c202cd25def | /projects/vcf/__main__.py | 6d2f55cc310ca95d19a815a07c0850ab7de4803d | [
"Apache-2.0"
] | permissive | Scsabiii/vcf-automation | 16b32fabf63b63022bcf95f12d22e62d11bd5478 | b76bba2b7d490bc7c1581c9f8d75c4052baaa4e9 | refs/heads/master | 2023-06-11T20:36:50.321149 | 2021-07-07T08:50:40 | 2021-07-07T08:50:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,641 | py | """An OpenStack Python Pulumi program"""
import pulumi
from pulumi_openstack import Provider
from vcf import ManagementStack, WorkloadStack
# stack
config = pulumi.Config()
stack_name = pulumi.get_stack()
stack_type = config.require("stackType")
###################################################################################
# ccadmin/cloud_admin and ccadmin/master provider
###################################################################################
openstack_config = pulumi.Config("openstack")
auth_url = openstack_config.require("authUrl")
region = openstack_config.require("region")
user_name = openstack_config.require("userName")
password = openstack_config.require_secret("password")
provider_cloud_admin = Provider(
"cloud_admin",
user_name=user_name,
password=password,
auth_url=auth_url,
insecure=True,
project_domain_name="ccadmin",
user_domain_name="ccadmin",
tenant_name="cloud_admin",
)
provider_ccadmin_master = Provider(
"ccadmin_master",
user_name=user_name,
password=password,
auth_url=auth_url,
insecure=True,
project_domain_name="ccadmin",
user_domain_name="ccadmin",
tenant_name="master",
)
###################################################################################
# provision
###################################################################################
if stack_type == "management":
ms = ManagementStack(provider_cloud_admin, provider_ccadmin_master)
ms.provision()
exit(0)
if stack_type == "workload":
ws = WorkloadStack(provider_cloud_admin, provider_ccadmin_master)
ws.provision()
exit(0)
| [
"[email protected]"
] | |
043e2c0866d46c3ddd37eb76fe44483a7ca5e30b | aa4024b6a846d2f6032a9b79a89d2e29b67d0e49 | /UMLRT2Kiltera_MM/StateMachineElement.py | 9e700e1b1b320c32953b3d9ae77e4000af6b9adb | [
"MIT"
] | permissive | levilucio/SyVOLT | 41311743d23fdb0b569300df464709c4954b8300 | 0f88827a653f2e9d3bb7b839a5253e74d48379dc | refs/heads/master | 2023-08-11T22:14:01.998341 | 2023-07-21T13:33:36 | 2023-07-21T13:33:36 | 36,246,850 | 3 | 2 | MIT | 2023-07-21T13:33:39 | 2015-05-25T18:15:26 | Python | UTF-8 | Python | false | false | 3,875 | py | """
__StateMachineElement.py_____________________________________________________
Automatically generated AToM3 syntactic object (DO NOT MODIFY DIRECTLY)
Author: gehan
Modified: Sat Aug 30 18:23:40 2014
_____________________________________________________________________________
"""
from ASGNode import *
from ATOM3Type import *
from ATOM3String import *
from graph_StateMachineElement import *
class StateMachineElement(ASGNode, ATOM3Type):
def __init__(self, parent = None):
ASGNode.__init__(self)
ATOM3Type.__init__(self)
self.superTypes = ['NamedElement', 'MetaModelElement_S']
self.graphClass_ = graph_StateMachineElement
self.isGraphObjectVisual = True
if(hasattr(self, '_setHierarchicalLink')):
self._setHierarchicalLink(False)
if(hasattr(self, '_setHierarchicalNode')):
self._setHierarchicalNode(False)
self.parent = parent
self.cardinality=ATOM3String('1', 20)
self.cardinality=ATOM3String('1', 20)
self.cardinality=ATOM3String('1', 20)
self.classtype=ATOM3String('t_', 20)
self.classtype=ATOM3String('t_', 20)
self.classtype=ATOM3String('t_', 20)
self.name=ATOM3String('s_', 20)
self.name=ATOM3String('s_', 20)
self.name=ATOM3String('s_', 20)
self.generatedAttributes = {'cardinality': ('ATOM3String', ),
'cardinality': ('ATOM3String', ),
'cardinality': ('ATOM3String', ),
'classtype': ('ATOM3String', ),
'classtype': ('ATOM3String', ),
'classtype': ('ATOM3String', ),
'name': ('ATOM3String', ),
'name': ('ATOM3String', ),
'name': ('ATOM3String', ) }
self.realOrder = ['cardinality','cardinality','cardinality','classtype','classtype','classtype','name','name','name']
self.directEditing = [1,1,1,1,1,1,1,1,1]
def clone(self):
cloneObject = StateMachineElement( self.parent )
for atr in self.realOrder:
cloneObject.setAttrValue(atr, self.getAttrValue(atr).clone() )
ASGNode.cloneActions(self, cloneObject)
return cloneObject
def copy(self, other):
ATOM3Type.copy(self, other)
for atr in self.realOrder:
self.setAttrValue(atr, other.getAttrValue(atr) )
ASGNode.copy(self, other)
def preCondition (self, actionID, * params):
if self.graphObject_:
return self.graphObject_.preCondition(actionID, params)
else: return None
def postCondition (self, actionID, * params):
if self.graphObject_:
return self.graphObject_.postCondition(actionID, params)
else: return None
def preAction (self, actionID, * params):
if self.graphObject_:
return self.graphObject_.preAction(actionID, params)
else: return None
def postAction (self, actionID, * params):
if self.graphObject_:
return self.graphObject_.postAction(actionID, params)
else: return None
def QOCA(self, params):
"""
QOCA Constraint Template
NOTE: DO NOT select a POST/PRE action trigger
Constraints will be added/removed in a logical manner by other mechanisms.
"""
return # <---- Remove this to use QOCA
""" Get the high level constraint helper and solver """
from Qoca.atom3constraints.OffsetConstraints import OffsetConstraints
oc = OffsetConstraints(self.parent.qocaSolver)
"""
Example constraint, see Kernel/QOCA/atom3constraints/OffsetConstraints.py
For more types of constraints
"""
oc.fixedWidth(self.graphObject_, self.graphObject_.sizeX)
oc.fixedHeight(self.graphObject_, self.graphObject_.sizeY)
| [
"levi"
] | levi |
385b947796cd7f565fd783fac4dea3070265ab44 | f9609ff4f2bbea570f3cb4cd3f9fe6b3595d4145 | /commands/cmd_pick.py | bc62e4f118aaf1f658d5fc3efcd20ce0ae76c432 | [] | no_license | VladThePaler/PythonWars-1996 | 2628bd2fb302faacc91688ad942799537c974f50 | d8fbc27d90f1deb9755c0ad0e1cf2c110f406e28 | refs/heads/master | 2023-05-08T19:51:28.586440 | 2021-05-14T04:19:17 | 2021-05-14T04:19:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,025 | py | # PythonWars copyright © 2020, 2021 by Paul Penner. All rights reserved.
# In order to use this codebase you must comply with all licenses.
#
# Original Diku Mud copyright © 1990, 1991 by Sebastian Hammer,
# Michael Seifert, Hans Henrik Stærfeldt, Tom Madsen, and Katja Nyboe.
#
# Merc Diku Mud improvements copyright © 1992, 1993 by Michael
# Chastain, Michael Quan, and Mitchell Tse.
#
# GodWars improvements copyright © 1995, 1996 by Richard Woolcock.
#
# ROM 2.4 is copyright 1993-1998 Russ Taylor. ROM has been brought to
# you by the ROM consortium: Russ Taylor ([email protected]),
# Gabrielle Taylor ([email protected]), and Brian Moore ([email protected]).
#
# Ported to Python by Davion of MudBytes.net using Miniboa
# (https://code.google.com/p/miniboa/).
#
# In order to use any part of this Merc Diku Mud, you must comply with
# both the original Diku license in 'license.doc' as well the Merc
# license in 'license.txt'. In particular, you may not remove either of
# these copyright notices.
#
# Much time and thought has gone into this software, and you are
# benefiting. We hope that you share your changes too. What goes
# around, comes around.
import const
import game_utils
import handler_game
import handler_room
import instance
import interp
import merc
import state_checks
def cmd_pick(ch, argument):
argument, arg = game_utils.read_word(argument)
if not arg:
ch.send("Pick what?\n")
return
ch.wait_state(const.skill_table["pick lock"].beats)
# look for guards
for gch_id in ch.in_room.people:
gch = instance.characters[gch_id]
if gch.is_npc() and gch.is_awake() and ch.level + 5 < gch.level:
handler_game.act("$N is standing too close to the lock.", ch, None, gch, merc.TO_CHAR)
return
if not ch.is_npc() and game_utils.number_percent() > ch.learned["pick lock"]:
ch.send("You failed.\n")
return
item = ch.get_item_here(arg)
if item:
# 'pick object'
if item.item_type != merc.ITEM_CONTAINER:
ch.send("That's not a container.\n")
return
if not state_checks.is_set(item.value[1], merc.CONT_CLOSED):
ch.send("It's not closed.\n")
return
if item.value < 0:
ch.send("It can't be unlocked.\n")
return
if not state_checks.is_set(item.value[1], merc.CONT_LOCKED):
ch.send("It's already unlocked.\n")
return
if state_checks.is_set(item.value[1], merc.CONT_PICKPROOF):
ch.send("You failed.\n")
return
state_checks.remove_bit(item.value[1], merc.CONT_LOCKED)
ch.send("*Click*\n")
handler_game.act("$n picks $p.", ch, item, None, merc.TO_ROOM)
return
door = handler_room.find_door(ch, arg)
if door >= 0:
# 'pick door'
pexit = ch.in_room.exit[door]
if not pexit.exit_info.is_set(merc.EX_CLOSED):
ch.send("It's not closed.\n")
return
if pexit.key < 0:
ch.send("It can't be picked.\n")
return
if not pexit.exit_info.is_set(merc.EX_LOCKED):
ch.send("It's already unlocked.\n")
return
if pexit.exit_info.is_set(merc.EX_PICKPROOF):
ch.send("You failed.\n")
return
pexit.exit_info.rem_bit(merc.EX_LOCKED)
ch.send("*Click*\n")
handler_game.act("$n picks the $d.", ch, None, pexit.keyword, merc.TO_ROOM)
# pick the other side
to_room = instance.rooms[pexit.to_room]
if to_room and to_room.exit[merc.rev_dir[door]] != 0 and to_room.exit[merc.rev_dir[door]].to_room == ch.in_room:
to_room.exit[merc.rev_dir[door]].exit_info.rem_bit(merc.EX_LOCKED)
interp.register_command(
interp.CmdType(
name="pick",
cmd_fun=cmd_pick,
position=merc.POS_SITTING, level=0,
log=merc.LOG_NORMAL, show=True,
default_arg=""
)
)
| [
"[email protected]"
] | |
74bf53139b3f8bfc328dc22a1fe0d0984f23aa1e | 48983b88ebd7a81bfeba7abd6f45d6462adc0385 | /HakerRank/algorithms/warmup/staircase.py | f66d8b95f9711713c81d74b72fc3f7ae9288baed | [] | no_license | lozdan/oj | c6366f450bb6fed5afbaa5573c7091adffb4fa4f | 79007879c5a3976da1e4713947312508adef2e89 | refs/heads/master | 2018-09-24T01:29:49.447076 | 2018-06-19T14:33:37 | 2018-06-19T14:33:37 | 109,335,964 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 286 | py | # author: Daniel Lozano
# source: HackerRank ( https://www.hackerrank.com )
# problem name: Algorithms: Warmup: Staircase
# problem url: https://www.hackerrank.com/challenges/staircase/problem
# date: 7/10/2017
n = int(input())
for i in range(n):
print(" " * (n-1-i) + '#' * (i+1)) | [
"[email protected]"
] | |
9ac452966e223226c3e1db9ec7adaaf16dfac7a3 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_34/108.py | 8e333fdaa30e655bb563ae427b87024a7b16ab27 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,289 | py | #!/usr/bin/env python
def main():
dict = [];
fin = open("A-large.in","r");
fout = open("output.out","w");
st = [];
st = (fin.readline().split());
L = int(st[0]);
# print L;
D = int(st[1]);
N = int(st[2]);
for i in range(D):
dict.append(fin.readline());
flag = 0;
for i in range(N):
str = fin.readline()[:-1];
word = [];
# print str.__len__();
for j in range(str.__len__()):
if str[j] == '(':
flag = 1;
word.append(set());
elif str[j] == ')':
flag = 0;
else:
if flag == 0:
word.append(set(str[j]));
else:
word[word.__len__()-1].add(str[j]);
# print word.__len__();
if word.__len__() != L:
fout.write("Case #{0}: 0\n".format(i+1));
continue;
ans = 0;
for d in range(D):
success = 1;
for j in range(L):
if dict[d][j] not in word[j]:
success = 0;
break;
if success == 1:
ans += 1;
fout.write("Case #{0}: {1}\n".format(i+1, ans));
if __name__ == '__main__':
main();
| [
"[email protected]"
] | |
c79ad8ea925dbcbafa6913dc553dcbc36d642ec6 | 8ac3fe3d861a222210912a02effea2110456d052 | /django_for_beginners/project_5_newspaper_app/project_5_newspaper_app/wsgi.py | cca475eb69cb94b0610ce991e98ef571d9d83dc4 | [
"MIT"
] | permissive | rednafi/django-unchained | 40446960f52f0c905a6ba3e318154ca11a31188b | 0f71c8d056699496d4af3ab049f9b2f9d057486b | refs/heads/master | 2022-12-10T10:11:52.906880 | 2020-09-01T17:43:58 | 2020-09-01T17:43:58 | 282,356,752 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | """
WSGI config for project_5_newspaper_app 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/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_5_newspaper_app.settings")
application = get_wsgi_application()
| [
"[email protected]"
] | |
bea4cd0cbd5c164f7b157b32e2a4113a59ad3e38 | 228ebc9fb20f25dd3ed2a6959aac41fd31314e64 | /google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/types/automl_text_classification.py | bd52a0e808e5760a15e7a8f060d804b2c5a3c921 | [
"Apache-2.0"
] | permissive | orionnye/python-aiplatform | 746e3df0c75025582af38223829faeb2656dc653 | e3ea683bf754832340853a15bdb0a0662500a70f | refs/heads/main | 2023-08-03T06:14:50.689185 | 2021-09-24T03:24:14 | 2021-09-24T03:24:14 | 410,091,957 | 1 | 0 | Apache-2.0 | 2021-09-24T20:21:01 | 2021-09-24T20:21:00 | null | UTF-8 | Python | false | false | 1,485 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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.
#
import proto # type: ignore
__protobuf__ = proto.module(
package="google.cloud.aiplatform.v1beta1.schema.trainingjob.definition",
manifest={"AutoMlTextClassification", "AutoMlTextClassificationInputs",},
)
class AutoMlTextClassification(proto.Message):
r"""A TrainingJob that trains and uploads an AutoML Text
Classification Model.
Attributes:
inputs (google.cloud.aiplatform.v1beta1.schema.trainingjob.definition_v1beta1.types.AutoMlTextClassificationInputs):
The input parameters of this TrainingJob.
"""
inputs = proto.Field(
proto.MESSAGE, number=1, message="AutoMlTextClassificationInputs",
)
class AutoMlTextClassificationInputs(proto.Message):
r"""
Attributes:
multi_label (bool):
"""
multi_label = proto.Field(proto.BOOL, number=1,)
__all__ = tuple(sorted(__protobuf__.manifest))
| [
"[email protected]"
] | |
c00fd188b7a82678a3bc54928e908cf3ac38606d | 0fa3ad9a3d14c4b7a6cb44833795449d761b3ffd | /day13_all/day13/exercise01.py | 3be55a1b970b4e3020ba5ee3075394ff7c75dee3 | [] | no_license | dalaAM/month-01 | 3426f08237a895bd9cfac029117c70b50ffcc013 | e4b4575ab31c2a2962e7c476166b4c3fbf253eab | refs/heads/master | 2022-11-22T23:49:43.037014 | 2020-07-24T07:37:35 | 2020-07-24T07:37:35 | 282,154,216 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,049 | py | """
重写下列类型的str方法,体会重写
"""
class Employee:
def __init__(self, eid, did, name, money):
self.eid = eid
self.did = did
self.name = name
self.money = money
def __str__(self):
return f"{self.name}的员工编号是{self.eid},部门编号是{self.did},月薪是{self.money}"
class Department:
def __init__(self, did, title):
self.did = did
self.title = title
def __str__(self):
return f"{self.title}的编号是{self.did},"
class Skill:
def __init__(self, name="", atk_rate=0, cost_sp=0, duration=0):
self.name = name
self.atk_rate = atk_rate
self.cost_sp = cost_sp
self.duration = duration
def __str__(self):
return f"{self.name}的攻击率{self.atk_rate}需要sp{self.cost_sp},持续时间{self.duration}"
e01 = Employee(1001, 9002, "师父", 60000)
print(e01) # e01.__str__()
d01 = Department(9001, "教学部")
print(d01)
s01 = Skill("乾坤大挪移", 1, -10)
print(s01)
| [
"[email protected]"
] | |
240fb61b081a081b9f3c81c6e1a9ad742e59c0bf | 1bfad01139237049eded6c42981ee9b4c09bb6de | /RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/bgp/ipv4multicast.py | 2baf3dbdd4ebc6ddbc3f29808a704fecd9fbf9e5 | [
"MIT"
] | permissive | kakkotetsu/IxNetwork | 3a395c2b4de1488994a0cfe51bca36d21e4368a5 | f9fb614b51bb8988af035967991ad36702933274 | refs/heads/master | 2020-04-22T09:46:37.408010 | 2019-02-07T18:12:20 | 2019-02-07T18:12:20 | 170,284,084 | 0 | 0 | MIT | 2019-02-12T08:51:02 | 2019-02-12T08:51:01 | null | UTF-8 | Python | false | false | 7,158 | py |
# Copyright 1997 - 2018 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
from ixnetwork_restpy.base import Base
from ixnetwork_restpy.files import Files
class Ipv4Multicast(Base):
"""The Ipv4Multicast class encapsulates a system managed ipv4Multicast node in the ixnetwork hierarchy.
An instance of the class can be obtained by accessing the Ipv4Multicast property from a parent instance.
The internal properties list will be empty when the property is accessed and is populated from the server by using the find method.
"""
_SDM_NAME = 'ipv4Multicast'
def __init__(self, parent):
super(Ipv4Multicast, self).__init__(parent)
@property
def AsPath(self):
"""Indicates the local IP address of the BGP router.
Returns:
str
"""
return self._get_attribute('asPath')
@property
def BlockOffset(self):
"""The label block offset (VBO) is the value used to help define this specific label block uniquely as a subset of all of the possible labels.
Returns:
number
"""
return self._get_attribute('blockOffset')
@property
def BlockSize(self):
"""The size of the label block, in bytes.
Returns:
number
"""
return self._get_attribute('blockSize')
@property
def ControlWordEnabled(self):
"""If true, the route label uses a control word, as part of the extended community information. (One of the control flags.)
Returns:
bool
"""
return self._get_attribute('controlWordEnabled')
@property
def IpPrefix(self):
"""The route IP prefix.
Returns:
str
"""
return self._get_attribute('ipPrefix')
@property
def LabelBase(self):
"""The first label to be assigned to the FEC.
Returns:
number
"""
return self._get_attribute('labelBase')
@property
def LocalPreference(self):
"""Indicates the value of the local preference attribute.
Returns:
number
"""
return self._get_attribute('localPreference')
@property
def MaxLabel(self):
"""The last label to use.
Returns:
number
"""
return self._get_attribute('maxLabel')
@property
def MultiExitDiscriminator(self):
"""A metric field of the route file.
Returns:
number
"""
return self._get_attribute('multiExitDiscriminator')
@property
def Neighbor(self):
"""The descriptive identifier for the BGP neighbor.
Returns:
str
"""
return self._get_attribute('neighbor')
@property
def NextHop(self):
"""A 4-octet IP address which indicates the next hop.
Returns:
str
"""
return self._get_attribute('nextHop')
@property
def OriginType(self):
"""An indication of where the route entry originated.
Returns:
str
"""
return self._get_attribute('originType')
@property
def PrefixLength(self):
"""The length of the route IP prefix, in bytes.
Returns:
number
"""
return self._get_attribute('prefixLength')
@property
def RouteDistinguisher(self):
"""The route distinguisher for the route, for use with IPv4 and IPv6 MPLS VPN address types.
Returns:
str
"""
return self._get_attribute('routeDistinguisher')
@property
def SeqDeliveryEnabled(self):
"""Indicates if sequential delivery is enabled.
Returns:
bool
"""
return self._get_attribute('seqDeliveryEnabled')
@property
def SiteId(self):
"""The site ID.
Returns:
number
"""
return self._get_attribute('siteId')
def find(self, AsPath=None, BlockOffset=None, BlockSize=None, ControlWordEnabled=None, IpPrefix=None, LabelBase=None, LocalPreference=None, MaxLabel=None, MultiExitDiscriminator=None, Neighbor=None, NextHop=None, OriginType=None, PrefixLength=None, RouteDistinguisher=None, SeqDeliveryEnabled=None, SiteId=None):
"""Finds and retrieves ipv4Multicast data from the server.
All named parameters support regex and can be used to selectively retrieve ipv4Multicast data from the server.
By default the find method takes no parameters and will retrieve all ipv4Multicast data from the server.
Args:
AsPath (str): Indicates the local IP address of the BGP router.
BlockOffset (number): The label block offset (VBO) is the value used to help define this specific label block uniquely as a subset of all of the possible labels.
BlockSize (number): The size of the label block, in bytes.
ControlWordEnabled (bool): If true, the route label uses a control word, as part of the extended community information. (One of the control flags.)
IpPrefix (str): The route IP prefix.
LabelBase (number): The first label to be assigned to the FEC.
LocalPreference (number): Indicates the value of the local preference attribute.
MaxLabel (number): The last label to use.
MultiExitDiscriminator (number): A metric field of the route file.
Neighbor (str): The descriptive identifier for the BGP neighbor.
NextHop (str): A 4-octet IP address which indicates the next hop.
OriginType (str): An indication of where the route entry originated.
PrefixLength (number): The length of the route IP prefix, in bytes.
RouteDistinguisher (str): The route distinguisher for the route, for use with IPv4 and IPv6 MPLS VPN address types.
SeqDeliveryEnabled (bool): Indicates if sequential delivery is enabled.
SiteId (number): The site ID.
Returns:
self: This instance with matching ipv4Multicast data retrieved from the server available through an iterator or index
Raises:
ServerError: The server has encountered an uncategorized error condition
"""
return self._select(locals())
def read(self, href):
"""Retrieves a single instance of ipv4Multicast data from the server.
Args:
href (str): An href to the instance to be retrieved
Returns:
self: This instance with the ipv4Multicast data from the server available through an iterator or index
Raises:
NotFoundError: The requested resource does not exist on the server
ServerError: The server has encountered an uncategorized error condition
"""
return self._read(href)
| [
"[email protected]"
] | |
4d10320d891c2f97f5555759930874aabd3c98d3 | 0c42cb64dfe3ec9a046fc95bd26543faa4e0aa6b | /users/forms.py | 3785a73dcb9b70433314f4a6da334bb0885e8f3b | [] | no_license | shahjalalh/zed | 38bf0e4ad2eea4b066b6be55e6a7f1aefffc00e5 | 7bc9dc5b5e1921204c2b7cf72afe43d798953599 | refs/heads/master | 2022-12-12T10:17:19.797791 | 2021-01-27T15:31:48 | 2021-01-27T15:31:48 | 171,094,577 | 0 | 0 | null | 2021-01-27T15:32:54 | 2019-02-17T07:35:58 | CSS | UTF-8 | Python | false | false | 3,605 | py | from django import forms
from users.models import User
from django.contrib.auth.forms import UserCreationForm
from allauth.account.forms import LoginForm, SignupForm
# login form
class CustomLoginForm(LoginForm):
def __init__(self, *args, **kwargs):
super(CustomLoginForm, self).__init__(*args, **kwargs)
self.fields['login'].widget = forms.TextInput(attrs={'type': 'text', 'class': 'form-control form-control-user', 'placeholder': 'Username', 'autofocus':''})
self.fields['password'].widget = forms.PasswordInput(attrs={'class': 'form-control form-control-user', 'placeholder': 'Password'})
self.fields['remember'].widget = forms.CheckboxInput(attrs={'class': 'custom-control-input'})
def login(self, *args, **kwargs):
# Add your own processing here.
# You must return the original result.
return super(CustomLoginForm, self).login(*args, **kwargs)
class Meta:
model = User
fields = {'username', 'password'}
# for all forms
class CustomSignupForm(SignupForm):
def __init__(self, *args, **kwargs):
super(CustomSignupForm, self).__init__(*args, **kwargs)
self.fields['username'].widget = forms.TextInput(attrs={'type': 'text', 'class': 'form-control form-control-user', 'placeholder': 'Username', 'autofocus':''})
self.fields['email'].widget = forms.TextInput(attrs={'type': 'email', 'class': 'form-control form-control-user', 'placeholder': 'E-mail address', 'required':''})
self.fields['password1'].widget = forms.PasswordInput(attrs={'class': 'form-control form-control-user', 'placeholder': 'Password'})
self.fields['password2'].widget = forms.PasswordInput(attrs={'class': 'form-control form-control-user', 'placeholder': 'Password (again)'})
def save(self, request):
# Ensure you call the parent classes save.
# .save() returns a User object.
user = super(CustomSignupForm, self).save(request)
# Add your own processing here.
# You must return the original result.
return user
class Meta:
model = User
fields = {'username', 'email', 'password1', 'password2'}
# Profile Edit Form
class UserDetailUpdateForm(forms.ModelForm):
first_name = forms.CharField(max_length=30, widget=forms.TextInput(attrs={'class': 'form-control form-control-user', 'placeholder': 'First Name'}))
last_name = forms.CharField(max_length=30, widget=forms.TextInput(attrs={'class': 'form-control form-control-user', 'placeholder': 'First Name'}))
email = forms.CharField(max_length=254, widget=forms.EmailInput(attrs={'class': 'form-control form-control-user'}))
portfolio_site = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control form-control-user'}))
birth_date = forms.DateField(widget=forms.DateInput(attrs={'class': 'form-control form-control-user'}))
location = forms.CharField(max_length=30, widget=forms.TextInput(attrs={'class': 'form-control form-control-user', 'placeholder': 'First Name'}))
bio = forms.CharField(max_length=200, widget=forms.Textarea(attrs={'class': 'form-control form-control-user'}), help_text='Write here your message!')
phone = forms.CharField(max_length=100, widget=forms.TextInput(attrs={'class': 'form-control form-control-user'}))
profession = forms.CharField(max_length=100, widget=forms.TextInput(attrs={'class': 'form-control form-control-user'}))
class Meta:
model = User
fields = {'first_name', 'last_name', 'email', 'portfolio_site', 'birth_date', 'location', 'bio'}
| [
"[email protected]"
] | |
860481e131fd0dc2c26a1d2ead6ea3a7a31f40ac | e5cf5fd657b28d1c01d8fd954a911d72526e3112 | /rflx/OLD/rflx_fun.py | 6b410b651f85f51fbb1669486baa8c55b88da077 | [] | no_license | parkermac/ptools | 6b100f13a44ff595de03705a6ebf14a2fdf80291 | a039261cd215fe13557baee322a5cae3e976c9fd | refs/heads/master | 2023-01-09T11:04:16.998228 | 2023-01-02T19:09:18 | 2023-01-02T19:09:18 | 48,205,248 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,582 | py | """
Functions for the rflx code.
"""
import numpy as np
# function to create Sin and Sout
def get_Sio_chatwin(Qr, Socn, ds, nx):
L0 = 50e3 # length of salt intrusion for Qr = Qr0
Qr0 = 1e3 # m3/s
L= L0 * (Qr/Qr0)**(-1/3) # length of salt intrusion (m)
a = Socn/(L**1.5)
alpha = ds/L
x = np.linspace((alpha/(2*a))**2,L,nx)
Sin = a*x**1.5 + alpha*x/2
Sout = a*x**1.5 - alpha*x/2
return Sin, Sout, x, L
def qa_calc(Qin, Qout, Sin, Sout, I):
# Use I = 0 to ignore the second river part
# calculate Efflux-Reflux fractions (a21 and a34), at xm
q1 = Qin[1:]
q3 = Qin[:-1]
q2 = -Qout[1:]
q4 = -Qout[:-1]
s1 = Sin[1:]
s3 = Sin[:-1]
s2 = Sout[1:]
s4 = Sout[:-1]
# notation follows Cokelet and Stewart (1985)
a21 = (q2/q1)*(s2-s4)/(s1-s4) # efflux - up
a34 = (q3/q4)*(s1-s3)/(s1-s4) # reflux - down
# add the upwelling required for the second river
if I > 0:
a21x = np.zeros_like(a21)
a21x[I] = (q1[I]-q1[I-1])/q1[I]
a21 = a21 + a21x
return q1, q2, q3, q4, a21, a34
def c_calc(csp, cdp, info_tup, riv=0, ocn=0, riv2=0, do_age=False):
# unpack some parameters
NS, NX, NT, dt, dvs, dvd, q1, q2, q3, q4, a21, a34, o_Qr, I = info_tup
NTs = int(NT/NS) # save interval, in timesteps
if do_age:
# arrays for age calculation
ccsp = csp.copy()
ccdp = cdp.copy()
# arrays to save in
csa = np.nan * np.ones((NS,NX-1))
cda = np.nan * np.ones((NS,NX-1))
# time series to save in
c_tot = np.nan * np.ones(NT) # net amount of tracer
t_vec = np.nan * np.ones(NT) # time (s)
# these will be time series of the tracer flux at open boundaries
f1_vec = np.nan * np.ones(NT)
f2_vec = np.nan * np.ones(NT)
f3_vec = np.nan * np.ones(NT)
f4_vec = np.nan * np.ones(NT)
friv2_vec = np.nan * np.ones(NT)
#
riv_mask = np.zeros(NX-1)
riv_mask[I] = 1
tta = 0 # index for periodic saves
for tt in range(NT):
# boundary conditions
c4 = np.concatenate(([riv], csp[:-1])) # river
c1 = np.concatenate((cdp[1:], [ocn])) # ocean
if do_age:
cc4 = np.concatenate(([riv], ccsp[:-1])) # river
cc1 = np.concatenate((ccdp[1:], [ocn])) # ocean
# save time series entries
t_vec[tt] = tt*dt
c_tot[tt] = np.sum(csp*dvs + cdp*dvd)
f1_vec[tt] = q1[-1]*c1[-1]
f2_vec[tt] = - q2[-1]*csp[-1]
f3_vec[tt] = - q3[0]*cdp[0]
f4_vec[tt] = q4[0]*c4[0]
friv2_vec[tt] = o_Qr*riv2
# update fields
cs = csp + (dt/dvs)*(q4*c4 + a21*q1*cdp - a34*q4*csp - q2*csp + o_Qr*riv2*riv_mask)
cd = cdp + (dt/dvs)*(q1*c1 - a21*q1*cdp + a34*q4*csp - q3*cdp)
if do_age:
# ageing versions
ccs = ccsp + (dt/dvs)*(q4*cc4 + a21*q1*ccdp - a34*q4*ccsp - q2*ccsp + o_Qr*riv2*riv_mask) + dt*csp/86400
ccd = ccdp + (dt/dvs)*(q1*cc1 - a21*q1*ccdp + a34*q4*ccsp - q3*ccdp) + dt*cdp/86400
ccsp = ccs.copy()
ccdp = ccd.copy()
csp = cs.copy()
cdp = cd.copy()
if (np.mod(tt, NTs) == 0) and tta < NS:
# periodic save
csa[tta,:] = cs
cda[tta,:] = cd
tta += 1
# work on time series
T = t_vec/86400 # time axis in days
# pack things
f_tup = (T, c_tot, f1_vec, f2_vec, f3_vec, f4_vec, friv2_vec)
if do_age:
age_tup = (cs, cd, ccs, ccd)
return csa, cda, f_tup, age_tup
else:
return csa, cda, f_tup | [
"[email protected]"
] | |
ecb1c92c6cb9c09b5bd1f743a447b6cca333fd5f | 3c47fdc334c003a205a35eb9e1b39963e62c3161 | /iotedgehubdev/composeproject.py | 24873eabdbcdb968b9e45817b09996d7da378087 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | Azure/iotedgehubdev | 9b67a5c1af43ba787025dfade2ecc655cfcd7d62 | 7eede7286a0603e565c8b183d090f2585521aae6 | refs/heads/main | 2023-09-04T02:54:46.212462 | 2022-11-04T00:37:49 | 2022-11-04T00:37:49 | 138,967,965 | 97 | 37 | NOASSERTION | 2022-11-04T00:37:50 | 2018-06-28T04:57:46 | Python | UTF-8 | Python | false | false | 8,781 | py | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import json
import os
import sys
import yaml
from collections import OrderedDict
from io import StringIO
from .compose_parser import CreateOptionParser
from .output import Output
COMPOSE_VERSION = 3.6
CREATE_OPTIONS_MAX_CHUNKS = 100
class ComposeProject(object):
def __init__(self, module_content):
self.module_content = module_content
self.yaml_dict = OrderedDict()
self.Services = OrderedDict()
self.Networks = {}
self.Volumes = {}
self.edge_info = {}
def compose(self):
modules = {
self.edge_info['hub_name']:
self.module_content['$edgeAgent']['properties.desired']['systemModules']['edgeHub']
}
modules.update(self.module_content['$edgeAgent']['properties.desired']['modules'])
for service_name, config in modules.items():
self.Services[service_name] = {}
create_option_str = ComposeProject._join_create_options(config['settings'])
if create_option_str:
create_option = json.loads(create_option_str)
create_option_parser = CreateOptionParser(create_option)
self.Services[service_name].update(create_option_parser.parse_create_option())
self.Services[service_name]['image'] = config['settings']['image']
self.Services[service_name]['container_name'] = service_name
if 'networks' not in self.Services[service_name]:
self.Services[service_name]['networks'] = {}
self.Services[service_name]['networks'][self.edge_info['network_info']['NW_NAME']] = None
if 'network_mode' in self.Services[service_name]:
del self.Services[service_name]['network_mode']
if 'host' in self.Services[service_name]['networks']:
self.Services[service_name]['network_mode'] = 'host'
del self.Services[service_name]['networks']
if 'labels' not in self.Services[service_name]:
self.Services[service_name]['labels'] = {self.edge_info['labels']: ""}
else:
self.Services[service_name]['labels'][self.edge_info['labels']] = ""
try:
# Default restart policy is 'on-unhealthy'
# https://github.com/Azure/iotedge/blob/8bd573590cdc149c014cf994dba58fc63f1a5c74/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Core/Constants.cs#L18
restart_policy = config.get('restartPolicy', 'on-unhealthy')
self.Services[service_name]['restart'] = {
'never': 'no',
'on-failure': 'on-failure',
'always': 'always',
'on-unhealthy': 'always',
'unknown': 'no'
}[restart_policy]
if restart_policy == 'on-unhealthy':
Output().warning('Unsupported restart policy \'{0}\' in solution mode. Falling back to \'always\'.'
.format(restart_policy))
except KeyError as e:
raise KeyError('Unsupported restart policy {0} in solution mode.'.format(e))
if 'env' in config:
self.Services[service_name]['environment'] = self.config_env(
self.Services[service_name].get('environment', []), config['env'])
if service_name == self.edge_info['hub_name']:
self.config_edge_hub(service_name)
else:
self.config_modules(service_name)
if 'networks' in self.Services[service_name]:
for nw in self.Services[service_name]['networks']:
self.Networks[nw] = {
'external': True
}
for vol in self.Services[service_name]['volumes']:
if vol['type'] == 'volume':
self.Volumes[vol['source']] = {
'name': vol['source']
}
def set_edge_info(self, info):
self.edge_info = info
def config_modules(self, service_name):
config = self.Services[service_name]
if 'volumes' not in config:
config['volumes'] = []
config['volumes'].append({
'type': 'volume',
'source': self.edge_info['volume_info']['MODULE_VOLUME'],
'target': self.edge_info['volume_info']['MODULE_MOUNT']
})
if 'environment' not in config:
config['environment'] = []
for module_env in self.edge_info['env_info']['module_env']:
config['environment'].append(module_env)
config['environment'].append(
'EdgeHubConnectionString=' + self.edge_info['ConnStr_info'][service_name]
)
if 'depends_on' not in config:
config['depends_on'] = []
config['depends_on'].append(self.edge_info['hub_name'])
def config_edge_hub(self, service_name):
config = self.Services[service_name]
if 'volumes' not in config:
config['volumes'] = []
config['volumes'].append({
'type': 'volume',
'source': self.edge_info['volume_info']['HUB_VOLUME'],
'target': self.edge_info['volume_info']['HUB_MOUNT']
})
config['networks'][self.edge_info['network_info']['NW_NAME']] = {
'aliases': [self.edge_info['network_info']['ALIASES']]
}
if 'environment' not in config:
config['environment'] = []
routes_env = self.parse_routes()
for e in routes_env:
config['environment'].append(e)
config['environment'].append(
'IotHubConnectionString=' + self.edge_info['ConnStr_info']['$edgeHub'])
config['environment'].extend(self.edge_info['env_info']['hub_env'])
def config_env(self, env_list, env_section):
env_dict = {}
for env in env_list:
if '=' in env:
k, v = env.split('=', 1)
else:
k, v = env, ''
env_dict[k] = v
for k, v in env_section.items():
if 'value' not in v:
env_dict[k] = ''
else:
env_dict[k] = v['value']
ret = []
for k, v in env_dict.items():
ret.append("{0}={1}".format(k, v))
return ret
def parse_routes(self):
routes = self.module_content['$edgeHub']['properties.desired']['routes']
schema_version = self.module_content['$edgeHub']['properties.desired']['schemaVersion']
routes_env = []
route_id = 1
for route in routes.values():
if isinstance(route, str):
routes_env.append('routes__r{0}={1}'.format(route_id, route))
else:
if schema_version >= "1.1":
routes_env.append('routes__r{0}={1}'.format(route_id, route["route"]))
else:
raise Exception("Route priority/TTL is not supported in schema {0}.".format(schema_version))
route_id = route_id + 1
return routes_env
def dump(self, target):
def setup_yaml():
def represent_dict_order(self, data):
return self.represent_mapping('tag:yaml.org,2002:map', data.items())
yaml.add_representer(OrderedDict, represent_dict_order)
setup_yaml()
def my_unicode_repr(self, data):
return self.represent_str(data.encode('utf-8'))
self.yaml_dict['version'] = str(COMPOSE_VERSION)
self.yaml_dict['services'] = self.Services
self.yaml_dict['networks'] = self.Networks
self.yaml_dict['volumes'] = self.Volumes
if sys.version_info[0] < 3:
# Add # noqa: F821 to ignore undefined name 'unicode' error
yaml.add_representer(unicode, my_unicode_repr) # noqa: F821
yml_stream = StringIO()
yaml.dump(self.yaml_dict, yml_stream, default_flow_style=False)
yml_str = yml_stream.getvalue().replace('$', '$$')
if not os.path.exists(os.path.dirname(target)):
os.makedirs(os.path.dirname(target))
with open(target, 'w') as f:
f.write(yml_str)
@staticmethod
def _join_create_options(settings):
if 'createOptions' not in settings:
return ''
res = settings['createOptions']
i = 0
while True:
i += 1
key = 'createOptions{0:0=2d}'.format(i)
if i < CREATE_OPTIONS_MAX_CHUNKS and key in settings:
res += settings[key]
else:
break
return res
| [
"[email protected]"
] | |
737148ea7829692220c67ae1a0891bebe51dbb7c | be84cb7f6d239e72ffe0bd727124ced688560e83 | /zhiyou/items.py | ee8914e431897f6604ba475639a0cd5daa8e2752 | [] | no_license | liuyuqiong88/youji_spider | 6fded24514256907e463377ecf0abb48bca2c71e | 2c2ae28a4e3654d46c025b3d1e736d5db7ca8d2d | refs/heads/master | 2020-03-17T12:51:22.029216 | 2018-05-16T03:34:21 | 2018-05-16T03:34:21 | 133,606,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 641 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class ZhiyouItem(scrapy.Item):
# define the fields for your item here like:
data_source = scrapy.Field()
time_stamp = scrapy.Field()
company_name = scrapy.Field()
category = scrapy.Field()
num = scrapy.Field()
industry = scrapy.Field()
desc = scrapy.Field()
good = scrapy.Field()
salary = scrapy.Field()
fancing_info = scrapy.Field()
address = scrapy.Field()
contact = scrapy.Field()
qq = scrapy.Field()
pass
| [
"[email protected]"
] | |
fac4b28d499e22ce687f715e8ecc4a4f5f132391 | 362224f8a23387e8b369b02a6ff8690c200a2bce | /django/django_orm/wall/login_app/migrations/0003_auto_20210511_1328.py | 2728d4dbaa480b108c62108ed84f8255c853d617 | [] | no_license | Helenyixuanwang/python_stack | ac94c7c532655bf47592a8453738daac10f220ad | 97fbc77e3971b5df1fe3e79652b294facf8d6cee | refs/heads/main | 2023-06-11T02:17:27.277551 | 2021-06-21T17:01:09 | 2021-06-21T17:01:09 | 364,336,066 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 677 | py | # Generated by Django 2.2 on 2021-05-11 20:28
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('login_app', '0002_comment_message'),
]
operations = [
migrations.AddField(
model_name='comment',
name='comment',
field=models.TextField(default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='message',
name='message',
field=models.TextField(default=django.utils.timezone.now),
preserve_default=False,
),
]
| [
"[email protected]"
] | |
8c6e52f21979f9c706821df3c1e10416bad935da | 910d4dd8e56e9437cf09dd8b9c61167673140a1f | /0219 stack 2/부분집합.py | 9cc5973c23a43a26be7da70e2af42e568605cd34 | [] | no_license | nopasanadamindy/Algorithms | 10825b212395680401b200a37ab4fde9085bc61f | 44b82d2f129c4cc6e811b651c0202a18719689cb | refs/heads/master | 2022-09-28T11:39:54.630487 | 2020-05-29T09:49:56 | 2020-05-29T09:49:56 | 237,923,602 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 686 | py | # {1, 2, 3} 모든 부분집합 출력하기
N = 3
A = [0 for _ in range(N)] # 원소의 포함여부 저장(0,1)
# print(A)
data = [1, 2, 3]
def printSet(n):
for i in range(n): # 각 부분 배열의 원소 출력
if A[i] ==1: # A[i]가 1이면 포함된 것이므로 출력
print(data[i], end =" ")
print()
def powerset(n, k): # n : 원소의 갯수, k : 현재 depth
if n == k: # Basis Part
printSet(n)
else: # Inductive Part
A[k] = 1 # k번 요소 O
powerset(n, k + 1) # 다음 요소 포함 여부 결정
A[k] = 0 # k번 요소 X
powerset(n, k + 1) # 다음 요소 포함 여부 결정
powerset(N, 0) | [
"[email protected]"
] | |
30651ba1a8f4ce79c71012e118c0a9a7428f5387 | e951c686fc947efd10ff41069b43a7b875672c33 | /server/network_monitor_web_server/db/mysql_relevant/sql_str/monitor_detail.py | 92f774d13f2e381df4822faef8d8b106510b5dba | [] | no_license | JasonBourne-sxy/host-web | f48c794f2eb2ec7f8a5148620b6ca3f9b062b924 | 649d1a61ac15182b55c17e47c126d98d9b956b44 | refs/heads/master | 2022-12-20T09:21:57.947230 | 2019-10-28T07:23:41 | 2019-10-28T07:23:41 | 208,742,511 | 1 | 0 | null | 2022-12-11T06:57:55 | 2019-09-16T07:56:38 | Python | UTF-8 | Python | false | false | 354 | py | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: monitor_detail
Description :
Author : 'li'
date: 2019/9/27
-------------------------------------------------
Change Activity:
2019/9/27:
-------------------------------------------------
"""
__author__ = 'li' | [
"[email protected]"
] | |
6be47ea1b25a7f616323e96ebf21cd91bbb04755 | 8e39a4f4ae1e8e88d3b2d731059689ad5b201a56 | /media-libs/mesa/mesa-10.2.6.py | 0a7a0fdb1972e3f63a51df926253636303e94fa2 | [] | no_license | wdysln/new | d5f5193f81a1827769085932ab7327bb10ef648e | b643824b26148e71859a1afe4518fe05a79d333c | refs/heads/master | 2020-05-31T00:12:05.114056 | 2016-01-04T11:38:40 | 2016-01-04T11:38:40 | 37,287,357 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,869 | py | metadata = """
summary @ Mesa 3-D graphics libraries and include files
homepage @ http://mesa3d.sourceforge.net/
license @ custom
src_url @ http://ftp.osuosl.org/pub/blfs/conglomeration/MesaLib/MesaLib-$version.tar.bz2
arch @ ~x86_64
"""
depends = """
build @ x11-libs/libXdamage x11-libs/libXext x11-libs/libXfixes
x11-libs/libXxf86vm x11-libs/libdrm sys-libs/talloc x11-proto/dri3proto
x11-proto/glproto x11-libs/libXt x11-misc/makedepend x11-proto/presentproto x11-libs/libxshmfence
runtime @ x11-libs/libXdamage x11-libs/libXext x11-libs/libXfixes
x11-libs/libXxf86vm x11-libs/libdrm sys-libs/talloc
x11-proto/glproto x11-libs/libXt x11-misc/makedepend
"""
srcdir = "Mesa-%s" % version
def configure():
"""conf("--with-dri-driverdir=/usr/lib/xorg/modules/dri \
--with-gallium-drivers=r300,r600,nouveau,svga,swrast \
--enable-gallium-llvm \
--enable-gallium-egl --enable-shared-glapi\
--enable-glx-tls \
--with-driver=dri \
--enable-xcb \
--with-state-trackers=dri,glx \
--disable-glut \
--enable-gles1 \
--enable-gles2 \
--enable-egl \
--disable-gallium-egl")
#LOLWUT# sed("configs/autoconf", "(PYTHON_FLAGS) = .*", r"\1 = -t")
#autoreconf("-vif")
#conf("--enable-pic \
# --disable-xcb \
# --enable-glx-tls \
# --disable-gl-osmesa \
# --disable-egl \
# --disable-glw \
# --disable-glut \
# --enable-gallium \
# --enable-gallium-llvm \
# --disable-gallium-svga \
# --disable-gallium-i915 \
# --disable-gallium-i965 \
# --enable-gallium-radeon \
# --enable-gallium-r600 \
# --enable-gallium-nouveau \
# --with-driver=dri \
# --with-dri-driverdir=/usr/lib/xorg/modules/dri \
# --with-dri-drivers=i810,i915,i965,mach64,nouveau,r128,r200,r600,radeon,sis,tdfx \
# --with-state-trackers=dri,glx")
"""
autoreconf("-vif")
conf("--with-dri-driverdir=/usr/lib/xorg/modules/dri",
"--with-gallium-drivers=nouveau,svga,swrast",
"--with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast",
"--with-egl-platforms=x11,drm",
"--disable-gallium-llvm",
"--enable-gallium-egl",
"--enable-shared-glapi",
"--enable-glx-tls",
"--enable-dri",
"--enable-glx",
"--enable-osmesa",
"--enable-gles1",
"--enable-gles2",
"--enable-egl",
"--enable-texture-float",
"--enable-xa")
def build():
export("PYTHONDONTWRITEBYTECODE", "1")
make()
def install():
raw_install("DESTDIR=%s" % install_dir)
| [
"[email protected]"
] | |
9e3a392c6349b84aba9f6ca914893cfcbd83c8b2 | 73f9ce203129a8a5b3742655ab36bb0014ebf30b | /example/test.py | 32cb2da78bf4cec3f3e51de4b3b902d3b6be2bb3 | [
"MIT"
] | permissive | masterliuf/akshare | bd20c6999253a8e4ccc7949a8d89c4fc5559b3bf | 15907161341041dce0fd7a7bdcad7bda4b999187 | refs/heads/master | 2022-07-15T22:57:19.249644 | 2022-06-21T01:26:12 | 2022-06-21T01:26:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,819 | py | import akshare
import empyrical
def test():
print('测试及功能展示: ')
# ----------------------------------------------------------------------
print('\n' + '-' * 80 + '\n一个品种在时间轴上的展期收益率')
df = akshare.get_roll_yield_bar(type_method='date', var='RB', start_day='20181206', end_day='20181210', plot=False)
print(df)
# ----------------------------------------------------------------------
print('\n' + '-' * 80 + '\n一个品种在不同交割标的上的价格比较')
df = akshare.get_roll_yield_bar(type_method='symbol', var='RB', date='20181210', plot=False)
print(df)
# ----------------------------------------------------------------------
print('\n' + '-' * 80 + '\n多个品种在某天的展期收益率横截面比较')
df = akshare.get_roll_yield_bar(type_method='var', date='20181210', plot=False)
print(df)
# ----------------------------------------------------------------------
print('\n' + '-' * 80 + '\n特定两个标的的展期收益率')
df = akshare.get_roll_yield(date='20181210', var='IF', symbol1='IF1812', symbol2='IF1901')
print(df)
# ----------------------------------------------------------------------
print('\n' + '-' * 80 + '\n特定品种、特定时段的交易所注册仓单')
df = akshare.get_receipt(start_day='20181207', end_day='20181210', vars_list=['CU', 'NI'])
print(df)
# ----------------------------------------------------------------------
print('\n' + '-' * 80 + '\n特定日期的现货价格及基差')
df = akshare.get_spot_price('20181210')
print(df)
# ----------------------------------------------------------------------
print('\n' + '-' * 80 + '\n特定品种、特定时段的现货价格及基差')
df = akshare.get_spot_price_daily(start_day='20181210', end_day='20181210', vars_list=['CU', 'RB'])
print(df)
# ----------------------------------------------------------------------
print('\n' + '-' * 80 + '\n特定品种、特定时段的会员持仓排名求和')
df = akshare.get_rank_sum_daily(start_day='20181210', end_day='20181210', vars_list=['IF', 'C'])
print(df)
# ----------------------------------------------------------------------
print('\n' + '-' * 80 + '\n大商所会员持仓排名细节;郑商所、上期所、中金所分别改成get_czce_rank_table、get_shfe_rank_table、get_cffex_rank_table')
df = akshare.get_dce_rank_table('20181210')
print(df)
# ----------------------------------------------------------------------
print('\n' + '-' * 80 + '\n日线行情获取')
df = akshare.get_futures_daily(start_day='20181210', end_day='20181210', market='DCE', index_bar=True)
print(df)
if __name__ == '__main__':
test()
| [
"[email protected]"
] | |
f5b582683a9ff2eb527d8b9eb52ab2071db25516 | ff56fa387876e07d0d64114cfefec84c9437a6a1 | /share/gcompris/python/braille_lotto.py | ab8dc9d1fb5f77414e66620527c873821cba88d8 | [] | no_license | sugar-activities/4313-activity | 8dc44f413b5657a807c77310a5d5ae67d201321b | 7a82fcb52c5c6ea816950f7980e8da177041b479 | refs/heads/master | 2021-01-19T23:15:32.356071 | 2017-04-21T04:56:00 | 2017-04-21T04:56:00 | 88,937,425 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,668 | py | # gcompris - braille_lotto.py
#
# Copyright (C) 2011 Bruno Coudoin and Srishti Sethi
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# braille_lotto activity.
import gtk
import gtk.gdk
import gcompris
import gobject
import gcompris.utils
import gcompris.skin
import gcompris.bonus
import gcompris.timer
import gcompris.anim
import gcompris.sound
import goocanvas
import random
import pango
from BrailleChar import *
from BrailleMap import *
from gcompris import gcompris_gettext as _
COLOR_ON = 0X00FFFF
COLOR_OFF = 0X000000
CIRCLE_FILL = "light green"
CIRCLE_STROKE = "black"
CELL_WIDTH = 30
class Gcompris_braille_lotto:
"""Empty gcompris python class"""
def __init__(self, gcomprisBoard):
# Save the gcomprisBoard, it defines everything we need
# to know from the core
self.gcomprisBoard = gcomprisBoard
# Needed to get key_press
gcomprisBoard.disable_im_context = True
def start(self):
# Set a background image
gcompris.set_default_background(self.gcomprisBoard.canvas.get_root_item())
#Boolean variable declaration
self.mapActive = False
#CONSTANT Declarations
self.board_paused = 0
self.timerAnim = 0
self.counter = 0
self.gamewon = 0
self.score_player_a = 0
self.score_player_b = 0
self.tile_counter = 0
self.rectangle_counter = 0
#REPEAT ICON
pixmap = gcompris.utils.load_svg("braille_alphabets/target.svg")
gcompris.bar_set_repeat_icon(pixmap)
gcompris.bar_set(gcompris.BAR_REPEAT_ICON)
gcompris.bar_location(320,-1,0.8)
# Create our rootitem. We put each canvas item in it so at the end we
# only have to kill it. The canvas deletes all the items it contains
# automaticaly.
self.root = goocanvas.Group(parent =
self.gcomprisBoard.canvas.get_root_item())
self.lotto_board()
# The root item for the help
self.map_rootitem = \
goocanvas.Group( parent = self.gcomprisBoard.canvas.get_root_item() )
BrailleMap(self.map_rootitem, self.move_back)
self.map_rootitem.props.visibility = goocanvas.ITEM_INVISIBLE
def move_back(self,event,target,item):
self.map_rootitem.props.visibility = goocanvas.ITEM_INVISIBLE
self.mapActive = False
def lotto_board(self):
#Display Rectangle Ticket Boxes
self.rect = []
self.rect_x = []
self.rect_y = []
self.displayTicketBox(40 , 40)
self.displayTicketBox(420, 40)
#Rectangle box with ticket number is made clickable
index = 0
even = 0
while (index < 12):
if(even % 2 == 0):
gcompris.utils.item_focus_init(self.rect[even],None)
self.rect[even].connect("button_press_event",
self.cross_number, index)
even += 2
index += 1
#Displaying player_one and player_two
#PLAYER 1
goocanvas.Text(
parent = self.root,
x=200.0,
y=300.0,
text=_("PLAYER 1"),
fill_color="black",
anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER,
)
#PLAYER TWO
goocanvas.Text(
parent = self.root,
x=580.0,
y=300.0,
text=_("PLAYER 2"),
fill_color="black",
anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER,
)
#Button to display the number to be checked in the ticket
goocanvas.Rect(parent = self.root,
x = 25,
y = 350,
width = 170,
height = 120,
radius_x = 5,
radius_y = 5,
stroke_color = "black",
fill_color = "#d38d5f" ,
line_width = 2)
#Check number
goocanvas.Text(
parent = self.root,
text= _("Check Number"),
font = gcompris.skin.get_font("gcompris/board/medium"),
x = 100,
y = 384,
width = 140,
anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER,
)
#Buttons for Clue
svghandle = gcompris.utils.load_svg("braille_lotto/button1.svg")
#LEFT Button
self.hint_left_button = goocanvas.Svg(
parent = self.root,
svg_handle = svghandle,
svg_id = "#FIG1",
tooltip = _("Click me to get some hint")
)
self.hint_left_button.translate(200, 330)
self.hint_left_button.connect("button_press_event", self.clue_left)
gcompris.utils.item_focus_init(self.hint_left_button, None)
#RIGHT Button
self.hint_right_button = goocanvas.Svg(
parent = self.root,
svg_handle = svghandle,
svg_id = "#FIG2",
tooltip = _("Click me to get some hint")
)
self.hint_right_button.translate(290, 330)
self.hint_right_button.connect("button_press_event", self.clue_right)
gcompris.utils.item_focus_init(self.hint_right_button, None)
#Displaying text on clue buttons
self.text_array = []
for index in range(2):
#Translators : Do not translate the token {number}
clue_text = goocanvas.Text(
parent = self.root,
text = _("I don't have this number PLAYER {number}").format(number = str(index + 1)),
font = gcompris.skin.get_font("gcompris/board/medium"),
x = 290 if index == 0 else 540,
y = 395,
width = 140,
anchor=gtk.ANCHOR_CENTER,
)
self.text_array.append(clue_text)
gcompris.utils.item_focus_init(self.text_array[0], self.hint_left_button)
self.text_array[0].connect("button_press_event", self.clue_left)
gcompris.utils.item_focus_init(self.text_array[1], self.hint_right_button)
self.text_array[1].connect("button_press_event", self.clue_right)
#Displaying Tux Lotto Master
goocanvas.Image(parent = self.root,
pixbuf = gcompris.utils.load_pixmap("braille_lotto/tux.svg"),
x = 360,
y = 330,
)
goocanvas.Text(
parent = self.root,
text = _("Lotto Master"),
font = gcompris.skin.get_font("gcompris/board/medium"),
x = 410,
y = 460,
anchor=gtk.ANCHOR_CENTER,
)
#Generate Number Button
generate_number = goocanvas.Rect(parent = self.root,
x = 610,
y = 350,
width = 170,
height = 120,
radius_x = 5,
radius_y = 5,
stroke_color = "black",
fill_color = "#d33e5f",
line_width = 2)
generate_number.connect("button_press_event", self.generateNumber)
gcompris.utils.item_focus_init(generate_number, None)
generate_text = goocanvas.Text(
parent = self.root,
text = _("Generate a number"),
font = gcompris.skin.get_font("gcompris/board/medium"),
x = 695,
y = 410,
width = 50,
anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER,
)
generate_text.connect("button_press_event", self.generateNumber)
gcompris.utils.item_focus_init(generate_text, generate_number)
#An array to store the ticket numbers
self.ticket_array = []
#Displaying the Braille Code for TICKETS A & B
#TICKET A
self.displayTicket(1, 25, 60, 50)
self.displayTicket(1, 25, 60, 200)
self.displayTicket(26, 50, 145, 125)
self.displayTicket(51, 75, 230, 50)
self.displayTicket(51, 75, 230, 200)
self.displayTicket(76, 90, 320, 125)
#TICKET B
self.displayTicket(1, 25, 440, 50)
self.displayTicket(1, 25, 440, 200)
self.displayTicket(26, 50, 525, 125)
self.displayTicket(51, 75, 610, 50)
self.displayTicket(51, 75, 610, 200)
self.displayTicket(76, 90, 700, 125)
#Copy the contents of ticket array into another for shuffling
self.check_random = self.ticket_array[:]
random.shuffle(self.check_random)
#Calling the random number and checking it on lotto board
self.number_call()
def clue_left(self, event , target, item):
self.callout1 = goocanvas.Image(parent = self.root,
pixbuf = gcompris.utils.load_pixmap("braille_lotto/callout1.svg"),
x = 230,
y =250,
)
self.status_one = goocanvas.Text(
parent = self.root,
text= "",
x=315,
y=310,
width = 130,
font = "SANS 10 BOLD",
anchor=gtk.ANCHOR_CENTER,
)
if (self.check_random[self.counter] in self.ticket_array[0:6]):
#Translators : Do not translate the token {column}
self.status_one.props.text = \
_("Hey, you have it. It is there in your {column} column").format( column = self.findColumn() )
else :
self.status_one.props.text = _("Oops, this number is not in your ticket!")
self.timerAnim = gobject.timeout_add(1500, self.hideCalloutLeft)
def clue_right(self, event , target, item):
self.callout2 = goocanvas.Image(parent = self.root,
pixbuf = gcompris.utils.load_pixmap("braille_lotto/callout2.svg"),
x = 410,
y = 250,
)
self.status_two = goocanvas.Text(
parent = self.root,
text= "",
x=510,
y=310,
width = 130,
font = "SANS 10 BOLD",
anchor=gtk.ANCHOR_CENTER,
)
if (self.check_random[self.counter] in self.ticket_array[6:12]):
#Translators : Do not translate the token {column}
self.status_two.props.text = \
_("Hey, you have it. It is there in your {column} column").format( column = self.findColumn() )
else :
self.status_two.props.text = _("Oops, this number is not in your ticket!")
self.timerAnim = gobject.timeout_add(1500, self.hideCalloutRight)
def hideCalloutLeft(self):
self.callout1.props.visibility = goocanvas.ITEM_INVISIBLE
self.status_one.props.text = ""
def hideCalloutRight(self):
self.callout2.props.visibility = goocanvas.ITEM_INVISIBLE
self.status_two.props.text = ""
def findColumn(self):
if self.check_random[self.counter] <= 25:
column = _("1st")
elif self.check_random[self.counter] <= 50 \
and self.check_random[self.counter] > 25:
column = _("2nd")
elif self.check_random[self.counter] <= 75 \
and self.check_random[self.counter] > 50:
column = _("3rd")
else :
column = _("4th")
return column
def generateNumber(self, item, event, target):
self.check_number.set_property("text","")
self.counter += 1
self.number_call()
def number_call(self):
if(self.counter == 11):
self.displayGameStatus( _("Game Over") )
self.timer_inc = gobject.timeout_add(5000, self.game_over)
elif (self.counter < 11):
gcompris.sound.play_ogg("sounds/flip.wav")
self.check_number = \
goocanvas.Text(parent = self.root,
text = self.check_random[self.counter],
x=110,
y=440,
font = gcompris.skin.get_font("gcompris/board/title bold"),
anchor=gtk.ANCHOR_CENTER,
)
def game_over(self):
# Hide the game status
self.game.props.visibility = goocanvas.ITEM_INVISIBLE
self.game_status.props.visibility = goocanvas.ITEM_INVISIBLE
self.gamewon = 1
gcompris.bonus.display(gcompris.bonus.LOOSE, gcompris.bonus.FLOWER)
def displayTicketBox(self, x, y):
goocanvas.Rect(
parent = self.root,
x = x + 5,
y = y + 5,
width = 350,
height = 230,
stroke_color_rgba = 0x223344FFL,
fill_color_rgba = 0x00000000L,
radius_x = 5.0,
radius_y = 5.0,
line_width=7)
for i in range(4):
for j in range(3):
box = goocanvas.Rect(
parent = self.root,
x = x + 7 + 88 * i,
y = y + 7 + 77 * j,
width = 82,
height = 73,
stroke_color_rgba = 0x223344FFL,
fill_color_rgba = 0x66666666L,
line_width=2)
self.rect.append(box)
self.rect_x.append(x + 7 + 88 * i)
self.rect_y.append(y + 7 + 77 * j)
def displayTicket(self, a, b, x, y):
ticket = random.randint(a, b)
self.ticket_array.append(ticket)
if (ticket < 10):
obj = BrailleChar(self.root, x, y, 50 , ticket,
COLOR_ON, COLOR_OFF ,
CIRCLE_FILL, CIRCLE_STROKE,
False, False ,False, None)
obj.ticket_focus(self.rect[self.rectangle_counter],
self.cross_number, self.tile_counter)
else :
tens_digit = ticket / 10
ones_digit = ticket % 10
obj1 = BrailleChar(self.root, x - 8, y, 43 ,tens_digit,
COLOR_ON, COLOR_OFF ,
CIRCLE_FILL, CIRCLE_STROKE,
False, False ,False, None)
obj1.ticket_focus(self.rect[self.rectangle_counter],
self.cross_number, self.tile_counter)
obj2 = BrailleChar(self.root, x + 29, y, 43 , ones_digit,
COLOR_ON, COLOR_OFF ,
CIRCLE_FILL, CIRCLE_STROKE,
False, False ,False, None)
obj2.ticket_focus(self.rect[self.rectangle_counter],
self.cross_number, self.tile_counter)
self.rectangle_counter += 2
self.tile_counter += 1
def cross_number(self, item, event, target, index):
if( self.check_random[self.counter] == self.ticket_array[index]):
# This is a win
gcompris.sound.play_ogg("sounds/tuxok.wav")
if(index in (0, 1, 2, 3, 4, 5)):
self.score_player_a +=1
else:
self.score_player_b +=1
#Checked_button
goocanvas.Image(parent = self.root,
pixbuf = gcompris.utils.load_pixmap("braille_lotto/button_checked.png"),
x = self.rect_x[index * 2] + 8,
y = self.rect_y[index * 2] + 5,
)
else :
# This is a loss, indicate it with a cross mark
gcompris.sound.play_ogg("sounds/crash.wav")
item = \
goocanvas.Image(parent = self.root,
pixbuf = gcompris.utils.load_pixmap("braille_lotto/cross_button.png"),
x = self.rect_x[index * 2] + 8,
y = self.rect_y[index * 2] + 5,
)
gobject.timeout_add( 1000, lambda: item.remove() )
winner = 0
if(self.score_player_a == 6):
winner = 1
elif(self.score_player_b == 6):
winner = 2
if winner:
self.displayGameStatus( \
_("Congratulation player {player_id}, you won").format(player_id = str(winner) ) )
self.timer_inc = gobject.timeout_add(5000, self.timer_loop)
def displayGameStatus(self, message):
self.game = goocanvas.Image(parent = self.root,
pixbuf = gcompris.utils.load_pixmap("braille_lotto/game.svg"),
x = 200 ,
y = 100,
)
self.game_status = goocanvas.Text(
parent = self.root,
text = message,
x = 365,
y = 200,
width = 100,
font = gcompris.skin.get_font("gcompris/board/title bold"),
fill_color = "black",
anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER,
)
def timer_loop(self):
# Hide the game status
self.game.props.visibility = goocanvas.ITEM_INVISIBLE
self.game_status.props.visibility = goocanvas.ITEM_INVISIBLE
self.gamewon = 1
gcompris.bonus.display(gcompris.bonus.WIN, gcompris.bonus.FLOWER)
def end(self):
# Remove the root item removes all the others inside it
self.root.remove()
self.map_rootitem.remove()
def ok(self):
pass
def repeat(self):
if(self.mapActive):
self.map_rootitem.props.visibility = goocanvas.ITEM_INVISIBLE
self.mapActive = False
else :
self.map_rootitem.props.visibility = goocanvas.ITEM_VISIBLE
self.mapActive = True
def config(self):
pass
def key_press(self, keyval, commit_str, preedit_str):
pass
def pause(self, pause):
self.board_paused = pause
if(self.board_paused and (self.counter == 11 or self.gamewon == 1)):
self.end()
self.start()
def set_level(self, level):
pass
| [
"[email protected]"
] | |
9971c8b78a57215b996b334a79046ce2255c989c | 1acafe9b0497db2a481828a0505ceb042a80e43b | /tree/stack.py | f0de889ef2a86a55f572bd1b888554abc397cca7 | [] | no_license | weiweiECNU/pythonDataStructure | fbe6dc1579deb85483b805ff416a61a513e41dea | 971a2f74423eec581bf6134c6aa21719209608ee | refs/heads/master | 2020-06-13T21:36:37.844642 | 2019-08-07T10:55:01 | 2019-08-07T10:55:01 | 194,793,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,001 | py | class Stack:
def __init__(self):
'''Stack()创建一个新的空栈。不需要参数,并返回一个空栈'''
self.items = []
def push(self, item):
'''Push(item)将新项添加到堆栈的顶部。它需要参数 item 并且没有返回值'''
self.items.append(item)
def pop(self):
'''pop()从栈顶删除项目。它不需要参数,返回 item。栈被修改'''
return self.items.pop()
def peek(self):
"""返回栈顶的项,不删除它。它不需要参数。堆栈不被修改。"""
return self.items[-1]
def isEmpty(self):
"""测试看栈是否为空。它不需要参数,返回一个布尔值。"""
if len(self.items) == 0:
return True
else:
return False
def size(self):
"""返回栈的项目数。它不需要参数,返回一个整数。"""
return len(self.items)
def __str__(self):
return str(self.items)
| [
"[email protected]"
] | |
67e7fa2072ca379da2b2785d764631b9a9e688bd | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/scattergl/marker/colorbar/_tick0.py | 6ae415fecf9370dbd6eba565777c31f610d94a67 | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 498 | py | import _plotly_utils.basevalidators
class Tick0Validator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name="tick0", parent_name="scattergl.marker.colorbar", **kwargs
):
super(Tick0Validator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kwargs.pop("edit_type", "calc"),
implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}),
**kwargs
)
| [
"[email protected]"
] | |
9cf5b65f60eebae66537830916a502043fbbc1cf | a27cde0fa2415f2cb296369dd9bfab65f655164c | /5/5-11.py | 43e4de162f8e7246940f7518e5bd2bcb8b928de6 | [] | no_license | paalso/hse_python_course | c47ea010ba4173fefbcbb6b97fc3c74a84a9fd12 | 9e9d2001143afbd873152833dafb9682b5bae824 | refs/heads/master | 2021-06-25T05:12:37.368806 | 2020-12-21T09:48:37 | 2020-12-21T09:48:37 | 187,812,620 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 891 | py | # https://www.coursera.org/learn/python-osnovy-programmirovaniya/programming/NY8PQ/diofantovo-uravnieniie-2/submission
# Потерянная карточка
# Для настольной игры используются карточки с номерами от 1 до N.Одна карточка
# потерялась. Найдите ее, зная номера оставшихся карточек.
#
# Формат ввода / вывода
#
# Дано число N, далее N-1 номер оставшихся карточек (различные числа от 1 до N)
# Программа должна вывести номер потерянной карточки.
n = int(input())
expected_sum = n * (n + 1) // 2
actual_sum = 0
for k in range(1, n):
actual_sum += int(input())
missed_card = expected_sum - actual_sum
print(missed_card)
| [
"[email protected]"
] | |
9703bc9d35531437a484a615653587eca9a9b406 | 62553a9743257f06dc4a77d57c85aa99bfd51c0f | /FN/nn_tutorial/explanation_tf.py | 3e07932c7f5ba130571686a91d88f60905167d10 | [
"Apache-2.0"
] | permissive | tetsuoh0103/baby-steps-of-rl-ja | 21a855e0f0e38ba48de5c6d13522372fd4de0d24 | 6e0f44b0906cb28ac883546d3d8a30d21d5895b5 | refs/heads/master | 2020-11-23T22:42:02.127637 | 2020-01-03T03:16:46 | 2020-01-03T03:16:46 | 227,851,226 | 0 | 0 | Apache-2.0 | 2019-12-13T13:55:09 | 2019-12-13T13:55:08 | null | UTF-8 | Python | false | false | 611 | py | import numpy as np
import tensorflow as tf
# Weight (row=4 x col=2).
a = tf.Variable(np.random.rand(4, 2))
# Bias (row=4 x col=1).
b = tf.Variable(np.random.rand(4, 1))
# Input(x) (row=2 x col=1).
x = tf.compat.v1.placeholder(tf.float64, shape=(2, 1))
# Output(y) (row=4 x col=1).
y = tf.matmul(a, x) + b
with tf.Session() as sess:
# Initialize variable.
init = tf.global_variables_initializer()
sess.run(init)
# Make input to x.
x_value = np.random.rand(2, 1)
# Execute culculation.
y_output = sess.run(y, feed_dict={x: x_value})
print(y_output.shape) # Will be (4, 1)
| [
"[email protected]"
] | |
a91bfe7e1f20e9b957296cb8f1a23459f5b562aa | 536656cd89e4fa3a92b5dcab28657d60d1d244bd | /build/android/gyp/extract_unwind_tables.py | ea13c6a3e79e3886b9c00b55ffb98fce742d6739 | [
"BSD-3-Clause"
] | permissive | ECS-251-W2020/chromium | 79caebf50443f297557d9510620bf8d44a68399a | ac814e85cb870a6b569e184c7a60a70ff3cb19f9 | refs/heads/master | 2022-08-19T17:42:46.887573 | 2020-03-18T06:08:44 | 2020-03-18T06:08:44 | 248,141,336 | 7 | 8 | BSD-3-Clause | 2022-07-06T20:32:48 | 2020-03-18T04:52:18 | null | UTF-8 | Python | false | false | 10,416 | py | #!/usr/bin/env python
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Extracts the unwind tables in from breakpad symbol files
Runs dump_syms on the given binary file and extracts the CFI data into the
given output file.
The output file is a binary file containing CFI rows ordered based on function
address. The output file only contains rows that match the most popular rule
type in CFI table, to reduce the output size and specify data in compact format.
See doc https://github.com/google/breakpad/blob/master/docs/symbol_files.md.
1. The CFA rules should be of postfix form "SP <val> +".
2. The RA rules should be of postfix form "CFA <val> + ^".
Note: breakpad represents dereferencing address with '^' operator.
The output file has 2 tables UNW_INDEX and UNW_DATA, inspired from ARM EHABI
format. The first table contains function addresses and an index into the
UNW_DATA table. The second table contains one or more rows for the function
unwind information.
The output file starts with 4 bytes counting the number of entries in UNW_INDEX.
Then UNW_INDEX table and UNW_DATA table.
UNW_INDEX contains two columns of N rows each, where N is the number of
functions.
1. First column 4 byte rows of all the function start address as offset from
start of the binary, in sorted order.
2. For each function addr, the second column contains 2 byte indices in order.
The indices are offsets (in count of 2 bytes) of the CFI data from start of
UNW_DATA.
The last entry in the table always contains CANT_UNWIND index to specify the
end address of the last function.
UNW_DATA contains data of all the functions. Each function data contains N rows.
The data found at the address pointed from UNW_INDEX will be:
2 bytes: N - number of rows that belong to current function.
N * 4 bytes: N rows of data. 16 bits : Address offset from function start.
14 bits : CFA offset / 4.
2 bits : RA offset / 4.
The function is not added to the unwind table in following conditions:
C1. If length of the function code (number of instructions) is greater than
0xFFFF (2 byte address span). This is because we use 16 bits to refer to
offset of instruction from start of the address.
C2. If the function moves the SP by more than 0xFFFF bytes. This is because we
use 14 bits to denote CFA offset (last 2 bits are 0).
C3. If the Return Address is stored at an offset >= 16 from the CFA. Some
functions which have variable arguments can have offset upto 16.
TODO(ssid): We can actually store offset 16 by subtracting 1 from RA/4 since
we never have 0.
C4: Some functions do not have unwind information defined in dwarf info. These
functions have index value CANT_UNWIND(0xFFFF) in UNW_INDEX table.
Usage:
extract_unwind_tables.py --input_path [root path to unstripped chrome.so]
--output_path [output path] --dump_syms_path [path to dump_syms binary]
"""
import argparse
import re
import struct
import subprocess
import sys
import tempfile
_CFA_REG = '.cfa'
_RA_REG = '.ra'
_ADDR_ENTRY = 0
_LENGTH_ENTRY = 1
_CANT_UNWIND = 0xFFFF
def _Write4Bytes(output_file, val):
"""Writes a 32 bit unsigned integer to the given output file."""
output_file.write(struct.pack('<L', val));
def _Write2Bytes(output_file, val):
"""Writes a 16 bit unsigned integer to the given output file."""
output_file.write(struct.pack('<H', val));
def _FindRuleForRegister(cfi_row, reg):
"""Returns the postfix expression as string for a given register.
Breakpad CFI row format specifies rules for unwinding each register in postfix
expression form separated by space. Each rule starts with register name and a
colon. Eg: "CFI R1: <rule> R2: <rule>".
"""
out = []
found_register = False
for part in cfi_row:
if found_register:
if part[-1] == ':':
break
out.append(part)
elif part == reg + ':':
found_register = True
return ' '.join(out)
def _GetCfaAndRaOffset(cfi_row):
"""Returns a tuple with 2 numbers (cfa_offset, ra_offset).
Returns right values if rule matches the predefined criteria. Returns (0, 0)
otherwise. The criteria for CFA rule is postfix form "SP <val> +" and RA rule
is postfix form "CFA -<val> + ^".
"""
cfa_offset = 0
ra_offset = 0
cfa_rule = _FindRuleForRegister(cfi_row, _CFA_REG)
ra_rule = _FindRuleForRegister(cfi_row, _RA_REG)
if cfa_rule and re.match(r'sp [0-9]+ \+', cfa_rule):
cfa_offset = int(cfa_rule.split()[1], 10)
if ra_rule:
if not re.match(r'.cfa -[0-9]+ \+ \^', ra_rule):
return (0, 0)
ra_offset = -1 * int(ra_rule.split()[1], 10)
return (cfa_offset, ra_offset)
def _GetAllCfiRows(symbol_file):
"""Returns parsed CFI data from given symbol_file.
Each entry in the cfi data dictionary returned is a map from function start
address to array of function rows, starting with FUNCTION type, followed by
one or more CFI rows.
"""
cfi_data = {}
current_func = []
for line in symbol_file:
if 'STACK CFI' not in line:
continue
parts = line.split()
data = {}
if parts[2] == 'INIT':
# Add the previous function to the output
if len(current_func) > 1:
cfi_data[current_func[0][_ADDR_ENTRY]] = current_func
current_func = []
# The function line is of format "STACK CFI INIT <addr> <length> ..."
data[_ADDR_ENTRY] = int(parts[3], 16)
data[_LENGTH_ENTRY] = int(parts[4], 16)
# Condition C1: Skip if length is large.
if data[_LENGTH_ENTRY] == 0 or data[_LENGTH_ENTRY] > 0xffff:
continue # Skip the current function.
else:
# The current function is skipped.
if len(current_func) == 0:
continue
# The CFI row is of format "STACK CFI <addr> .cfa: <expr> .ra: <expr> ..."
data[_ADDR_ENTRY] = int(parts[2], 16)
(data[_CFA_REG], data[_RA_REG]) = _GetCfaAndRaOffset(parts)
# Condition C2 and C3: Skip based on limits on offsets.
if data[_CFA_REG] == 0 or data[_RA_REG] >= 16 or data[_CFA_REG] > 0xffff:
current_func = []
continue
assert data[_CFA_REG] % 4 == 0
# Since we skipped functions with code size larger than 0xffff, we should
# have no function offset larger than the same value.
assert data[_ADDR_ENTRY] - current_func[0][_ADDR_ENTRY] < 0xffff
if data[_ADDR_ENTRY] == 0:
# Skip current function, delete all previous entries.
current_func = []
continue
assert data[_ADDR_ENTRY] % 2 == 0
current_func.append(data)
# Condition C4: Skip function without CFI rows.
if len(current_func) > 1:
cfi_data[current_func[0][_ADDR_ENTRY]] = current_func
return cfi_data
def _WriteCfiData(cfi_data, out_file):
"""Writes the CFI data in defined format to out_file."""
# Stores the final data that will be written to UNW_DATA table, in order
# with 2 byte items.
unw_data = []
# Represent all the CFI data of functions as set of numbers and map them to an
# index in the |unw_data|. This index is later written to the UNW_INDEX table
# for each function. This map is used to find index of the data for functions.
data_to_index = {}
# Store mapping between the functions to the index.
func_addr_to_index = {}
previous_func_end = 0
for addr, function in sorted(cfi_data.iteritems()):
# Add an empty function entry when functions CFIs are missing between 2
# functions.
if previous_func_end != 0 and addr - previous_func_end > 4:
func_addr_to_index[previous_func_end + 2] = _CANT_UNWIND
previous_func_end = addr + cfi_data[addr][0][_LENGTH_ENTRY]
assert len(function) > 1
func_data_arr = []
func_data = 0
# The first row contains the function address and length. The rest of the
# rows have CFI data. Create function data array as given in the format.
for row in function[1:]:
addr_offset = row[_ADDR_ENTRY] - addr
cfa_offset = (row[_CFA_REG]) | (row[_RA_REG] / 4)
func_data_arr.append(addr_offset)
func_data_arr.append(cfa_offset)
# Consider all the rows in the data as one large integer and add it as a key
# to the |data_to_index|.
for data in func_data_arr:
func_data = (func_data << 16) | data
row_count = len(func_data_arr) / 2
if func_data not in data_to_index:
# When data is not found, create a new index = len(unw_data), and write
# the data to |unw_data|.
index = len(unw_data)
data_to_index[func_data] = index
unw_data.append(row_count)
for row in func_data_arr:
unw_data.append(row)
else:
# If the data was found, then use the same index for the function.
index = data_to_index[func_data]
assert row_count == unw_data[index]
func_addr_to_index[addr] = data_to_index[func_data]
# Mark the end end of last function entry.
func_addr_to_index[previous_func_end + 2] = _CANT_UNWIND
# Write the size of UNW_INDEX file in bytes.
_Write4Bytes(out_file, len(func_addr_to_index))
# Write the UNW_INDEX table. First list of addresses and then indices.
sorted_unw_index = sorted(func_addr_to_index.iteritems())
for addr, index in sorted_unw_index:
_Write4Bytes(out_file, addr)
for addr, index in sorted_unw_index:
_Write2Bytes(out_file, index)
# Write the UNW_DATA table.
for data in unw_data:
_Write2Bytes(out_file, data)
def _ParseCfiData(sym_file, output_path):
with open(sym_file, 'r') as f:
cfi_data = _GetAllCfiRows(f)
with open(output_path, 'wb') as out_file:
_WriteCfiData(cfi_data, out_file)
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
'--input_path', required=True,
help='The input path of the unstripped binary')
parser.add_argument(
'--output_path', required=True,
help='The path of the output file')
parser.add_argument(
'--dump_syms_path', required=True,
help='The path of the dump_syms binary')
args = parser.parse_args()
with tempfile.NamedTemporaryFile() as sym_file:
out = subprocess.call(
['./' +args.dump_syms_path, args.input_path], stdout=sym_file)
assert not out
sym_file.flush()
_ParseCfiData(sym_file.name, args.output_path)
return 0
if __name__ == '__main__':
sys.exit(main())
| [
"[email protected]"
] | |
515ec4e7f1567a0c9deee0a837eb0859fd622ebc | 4c32103014a7893a59b15210aab7d76422c542b1 | /generank/api/models/news_feed.py | c1f82436adac02478a68ebf7c11b7c4efb451645 | [
"MIT"
] | permissive | shuchenliu/mygenerank-api | cfd49e3d4786de7cd97da9848b50f3f894929b55 | 3c36cb733816c9aa305f02773487f35e194b6566 | refs/heads/master | 2020-03-25T12:14:04.248263 | 2018-08-08T23:44:46 | 2018-08-08T23:44:46 | 143,765,629 | 0 | 0 | null | 2018-08-06T18:12:20 | 2018-08-06T18:12:19 | null | UTF-8 | Python | false | false | 806 | py | import uuid
from django.conf import settings
from django.db import models
from django.utils import timezone
class Item(models.Model):
""" An model that represents an item in the global news feed. These models
will have various extensions added to them with additional data depending
on their source.
"""
SOURCES = {
'reddit': 0,
}
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
source = models.IntegerField()
link = models.URLField()
title = models.CharField(max_length=300)
image = models.URLField(null=True, blank=True)
description = models.CharField(max_length=450, null=True, blank=True)
created_on = models.DateTimeField(default=timezone.now)
def __str__(self):
return '<Item: %s>' % self.title
| [
"[email protected]"
] | |
07a96c972f722c090d0379879a87e26635e8403c | 5537eec7f43098d216d2b550678c8d10b2a26f09 | /venv/tower/lib/python2.7/site-packages/azure/mgmt/compute/models/os_disk_image.py | 465c5d3ec4e5434147ab908f71e2b2aba896e679 | [] | no_license | wipro-sdx/Automation | f0ae1512b8d9d491d7bacec94c8906d06d696407 | a8c46217d0fbe51a71597b5db87cbe98ed19297a | refs/heads/master | 2021-07-08T11:09:05.314435 | 2018-05-02T07:18:54 | 2018-05-02T07:18:54 | 131,812,982 | 0 | 1 | null | 2020-07-23T23:22:33 | 2018-05-02T07:15:28 | Python | UTF-8 | Python | false | false | 1,154 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
class OSDiskImage(Model):
"""Contains the os disk image information.
:param operating_system: the operating system of the osDiskImage.
Possible values include: 'Windows', 'Linux'
:type operating_system: str or :class:`OperatingSystemTypes
<azure.mgmt.compute.models.OperatingSystemTypes>`
"""
_validation = {
'operating_system': {'required': True},
}
_attribute_map = {
'operating_system': {'key': 'operatingSystem', 'type': 'OperatingSystemTypes'},
}
def __init__(self, operating_system):
self.operating_system = operating_system
| [
"[email protected]"
] | |
97fbfcb2881b5f3663fae1b99173fae2a50d54bb | 085406a6754c33957ca694878db9bbe37f84b970 | /Django_02/Django_02/wsgi.py | 30b5f8d71d360b56789738de45e22ceadcedb05e | [] | no_license | dewlytg/Python-example | 82157958da198ce42014e678dfe507c72ed67ef0 | 1e179e4037eccd9fefabefd252b060564a2eafce | refs/heads/master | 2021-01-01T18:36:08.868861 | 2019-01-18T10:39:08 | 2019-01-18T10:39:08 | 98,375,528 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | """
WSGI config for Django_02 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.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Django_02.settings")
application = get_wsgi_application()
| [
"[email protected]"
] | |
d68c5d52273c100d5cf88c590229d5e956a4b6ba | 7de919cf9031d46df68942c13e23c652edb5efe8 | /pyspider/processor/project_module.py | 47a6e10d0daa5136146b36355954e5243eef8496 | [
"Apache-2.0"
] | permissive | cash2one/pyspider_note | 5ea12cc26d49cae3bcf8323dbad6c74bb1623e68 | c5e590982beceb56d40c7c4fe1b610a99767cadc | refs/heads/master | 2021-01-01T17:12:03.783973 | 2017-02-27T05:43:08 | 2017-02-27T05:43:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,751 | py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<[email protected]>
# http://binux.me
# Created on 2014-02-16 22:24:20
import os
import six
import sys
import imp
import time
import weakref
import logging
import inspect
import traceback
import linecache
from pyspider.libs import utils
from pyspider.libs.log import SaveLogHandler, LogFormatter
logger = logging.getLogger("processor")
class ProjectManager(object):
"""
load projects from projectdb, update project
"""
CHECK_PROJECTS_INTERVAL = 5 * 60 # 检查project的时间间隔
RELOAD_PROJECT_INTERVAL = 60 * 60 # 重载project的时间间隔
@staticmethod
def build_module(project, env={}):
'''Build project script as module'''
from pyspider.libs import base_handler
assert 'name' in project, 'need name of project'
assert 'script' in project, 'need script of project'
# fix for old non-package version scripts
pyspider_path = os.path.join(os.path.dirname(__file__), "..")
if pyspider_path not in sys.path:
sys.path.insert(1, pyspider_path)
env = dict(env)
env.update({
'debug': project.get('status', 'DEBUG') == 'DEBUG',
})
loader = ProjectLoader(project)
module = loader.load_module(project['name'])
# logger inject
module.log_buffer = []
module.logging = module.logger = logging.Logger(project['name'])
# 允许标准输出
if env.get('enable_stdout_capture', True):
handler = SaveLogHandler(module.log_buffer)
handler.setFormatter(LogFormatter(color=False))
else:
handler = logging.StreamHandler()
handler.setFormatter(LogFormatter(color=True))
module.logger.addHandler(handler)
if '__handler_cls__' not in module.__dict__:
BaseHandler = module.__dict__.get('BaseHandler', base_handler.BaseHandler)
for each in list(six.itervalues(module.__dict__)):
if inspect.isclass(each) and each is not BaseHandler \
and issubclass(each, BaseHandler):
module.__dict__['__handler_cls__'] = each
_class = module.__dict__.get('__handler_cls__')
assert _class is not None, "need BaseHandler in project module"
instance = _class()
instance.__env__ = env
instance.project_name = project['name']
instance.project = project
return {
'loader': loader,
'module': module,
'class': _class,
'instance': instance,
'exception': None,
'exception_log': '',
'info': project,
'load_time': time.time(),
}
def __init__(self, projectdb, env):
self.projectdb = projectdb
self.env = env
self.projects = {}
self.last_check_projects = time.time()
def _need_update(self, project_name, updatetime=None, md5sum=None):
'''
检查project是否需要update
Check if project_name need update
'''
if project_name not in self.projects:
return True
# 每个project都根据其脚本内容有一个md5
elif md5sum and md5sum != self.projects[project_name]['info'].get('md5sum'):
return True
# 大于rpoject的updatetime大于给定的updatetime
elif updatetime and updatetime > self.projects[project_name]['info'].get('updatetime', 0):
return True
# 大于RELOAD_PROJECT_INTERVAL
elif time.time() - self.projects[project_name]['load_time'] > self.RELOAD_PROJECT_INTERVAL:
return True
return False
def _check_projects(self):
'''Check projects by last update time'''
for project in self.projectdb.check_update(self.last_check_projects,
['name', 'updatetime']):
if project['name'] not in self.projects:
continue
if project['updatetime'] > self.projects[project['name']]['info'].get('updatetime', 0):
self._update_project(project['name'])
self.last_check_projects = time.time()
def _update_project(self, project_name):
'''Update one project from database'''
project = self.projectdb.get(project_name)
if not project:
return None
return self._load_project(project)
def _load_project(self, project):
'''Load project into self.projects from project info dict'''
try:
project['md5sum'] = utils.md5string(project['script'])
ret = self.build_module(project, self.env)
self.projects[project['name']] = ret
except Exception as e:
logger.exception("load project %s error", project.get('name', None))
ret = {
'loader': None,
'module': None,
'class': None,
'instance': None,
'exception': e,
'exception_log': traceback.format_exc(),
'info': project,
'load_time': time.time(),
}
self.projects[project['name']] = ret
return False
logger.debug('project: %s updated.', project.get('name', None))
return True
def get(self, project_name, updatetime=None, md5sum=None):
'''get project data object, return None if not exists'''
if time.time() - self.last_check_projects > self.CHECK_PROJECTS_INTERVAL:
self._check_projects()
if self._need_update(project_name, updatetime, md5sum):
self._update_project(project_name)
return self.projects.get(project_name, None)
class ProjectFinder(object):
'''ProjectFinder class for sys.meta_path'''
def __init__(self, projectdb):
self.get_projectdb = weakref.ref(projectdb)
@property
def projectdb(self):
return self.get_projectdb()
def find_module(self, fullname, path=None):
if fullname == 'projects':
return self
parts = fullname.split('.')
if len(parts) == 2 and parts[0] == 'projects':
name = parts[1]
if not self.projectdb:
return
info = self.projectdb.get(name)
if info:
return ProjectLoader(info)
def load_module(self, fullname):
mod = imp.new_module(fullname)
mod.__file__ = '<projects>'
mod.__loader__ = self
mod.__path__ = ['<projects>']
mod.__package__ = 'projects'
return mod
def is_package(self, fullname):
return True
class ProjectLoader(object):
'''ProjectLoader class for sys.meta_path'''
def __init__(self, project, mod=None):
self.project = project
self.name = project['name']
self.mod = mod
def load_module(self, fullname):
# 动态加载模块
if self.mod is None:
# new_module: Return a new empty module object called fullname. This object is not inserted in sys.modules.
self.mod = mod = imp.new_module(fullname)
else:
mod = self.mod
# 初始化
mod.__file__ = '<%s>' % self.name
mod.__loader__ = self
mod.__project__ = self.project
mod.__package__ = ''
code = self.get_code(fullname)
# six.exec_(code, globals=None, locals=None)
six.exec_(code, mod.__dict__)
# 检查缓存的有效性。如果在缓存中的文件在硬盘上发生了变化,并且你需要更新版本,使用这个函数。如果省略filename,将检查缓存里的所有条目。
linecache.clearcache()
return mod
def is_package(self, fullname):
return False
def get_code(self, fullname):
# 将source编译为代码或者AST对象。代码对象能够通过exec语句来执行或者eval()进行求值。
# compile(source, filename, mode[, flags[, dont_inherit]])
"""
>>> code = "for i in range(0, 10): print i"
>>> cmpcode = compile(code, '', 'exec')
>>> exec cmpcode
0
1
2
3
4
5
6
7
8
9
>>> str = "3 * 4 + 5"
>>> a = compile(str,'','eval')
>>> eval(a)
17
"""
return compile(self.get_source(fullname), '<%s>' % self.name, 'exec')
def get_source(self, fullname):
script = self.project['script']
if isinstance(script, six.text_type):
return script.encode('utf8')
return script
| [
"[email protected]"
] | |
341333740509c486def6c606e86184f76da82b95 | b3b066a566618f49ae83c81e963543a9b956a00a | /Unsupervised Learning in Python/03_Decorrelating your data and dimension reduction/01_Correlated data in nature.py | 47f750e21c91db0e713455c2d355c1df22d6f1fb | [] | no_license | ahmed-gharib89/DataCamp_Data_Scientist_with_Python_2020 | 666c4129c3f0b5d759b511529a365dfd36c12f1a | f3d20b788c8ef766e7c86c817e6c2ef7b69520b8 | refs/heads/master | 2022-12-22T21:09:13.955273 | 2020-09-30T01:16:05 | 2020-09-30T01:16:05 | 289,991,534 | 2 | 0 | null | 2020-08-24T17:15:43 | 2020-08-24T17:15:42 | null | UTF-8 | Python | false | false | 1,366 | py | '''
Correlated data in nature
You are given an array grains giving the width and length of samples of grain. You suspect that width and length will be correlated. To confirm this, make a scatter plot of width vs length and measure their Pearson correlation.
INSTRUCTIONS
100XP
Import:
matplotlib.pyplot as plt.
pearsonr from scipy.stats.
Assign column 0 of grains to width and column 1 of grains to length.
Make a scatter plot with width on the x-axis and length on the y-axis.
Use the pearsonr() function to calculate the Pearson correlation of width and length.
'''
# Perform the necessary imports
import matplotlib.pyplot as plt
from scipy.stats import pearsonr
# Assign the 0th column of grains: width
width = grains[:,0]
# Assign the 1st column of grains: length
length = grains[:,1]
# Scatter plot width vs length
plt.scatter(width, length)
plt.axis('equal')
plt.show()
# Calculate the Pearson correlation
correlation, pvalue = pearsonr(width, length)
# Display the correlation
print(correlation)
#========================================================#
# DEVELOPER #
# BasitAminBhatti #
# Github #
# https://github.com/basitaminbhatti #
#========================================================# | [
"Your-Email"
] | Your-Email |
c83b9b05ea3394c8d408353555f98b20d69ba9e7 | 6a1390ec579dc16ef20255517a2fe566c0e514d5 | /try_conv3d.py | 551a298994cdbc8366961880b2c6a9abc931fe74 | [
"BSD-3-Clause"
] | permissive | imandr/cconv | 71f6b24502ba9249de08ed9618951d8363bf8b43 | 45e1e404b11070fd823bf5345875f447d9574c2f | refs/heads/master | 2021-08-01T07:59:42.878692 | 2021-07-27T22:49:02 | 2021-07-27T22:49:02 | 186,833,374 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,026 | py | import numpy as np
from cconv import convolve_3d
def convolve_xw(inp, w, mode):
# inp: (nb, nx, ny, nc_in)
# w: (nx, ny, nc_in, nc_out)
# returns (nb, x, y, nc_out)
mode = 0 if mode == 'valid' else 1
inp = inp.transpose((0,4,1,2,3)) # -> [mb, ic, x, y, z]
w = w.transpose((4,3,0,1,2)) # -> [oc, ic, x, y, z]
#print "convolve_xw: convolve_3d..."
return convolve_3d(inp, w, mode).transpose((0,2,3,4,1)) # -> [mb, x,y,z, oc]
def convolve_xy(x, y):
# x: (nb, nx, ny, nc_in)
# y: (nb, mx, my, nc_out) (mx,my) < (nx,ny)
# returns (fx, fy, nc_in, nc_out)
x = x.transpose((4,0,1,2,3)) # -> [ic, mb, x, y, z]
y = y.transpose((4,0,1,2,3)) # -> [oc, mb, x, y, z]
#print "convolve_xy: convolve_3d..."
return convolve_3d(x, y, 0).transpose((2,3,4,0,1)) # -> [x,y,z,ic,oc]
image = np.ones((1,4,3,2,1))
filter = np.ones((2,2,2,1,1))
#filter[0,0,0,:,:] = 1
filtered = convolve_xw(image, filter, 'valid')
print filtered | [
"[email protected]"
] | |
8550417b7422369930a90a9291698978faa2d2eb | d1d633abb313c235b4c178ccf2939537bd4232b0 | /team_app/tests/test_team.py | 92afcfe0235389acab16d1b0b7799c2fa986da3a | [
"MIT"
] | permissive | dcopm999/initpy | ee82229bf5ac311d83297d484012a7048c015a02 | 26aa6bda25947f67ab842d298ce2f121b89616bf | refs/heads/master | 2022-12-01T23:45:35.446225 | 2022-06-09T04:58:26 | 2022-06-09T04:58:26 | 195,928,228 | 0 | 1 | MIT | 2019-07-15T04:13:26 | 2019-07-09T03:47:10 | JavaScript | UTF-8 | Python | false | false | 1,710 | py | from django.contrib.auth.models import User
from django.test import TestCase
from team_app import models
# Create your tests here.
class TeamTestCase(TestCase):
fixtures = ['auth.json', 'team.json']
def test_team_str(self):
team = models.TeamModel.objects.get(id=1)
self.assertEqual(team.__str__(), 'Павел Таньчев')
def test_skill_str(self):
skill = models.SkillModel.objects.get(id=1)
self.assertEqual(skill.__str__(), 'Системный администратор Linux')
def test_contact_str(self):
contact = models.ContactModel.objects.get(id=1)
self.assertEqual(contact.__str__(), '998909199375 998909199375 [email protected]')
def test_service_str(self):
service = models.ServiceModel.objects.get(id=1)
self.assertEqual(service.__str__(), 'Разработка Web приложений')
def test_service_item_str(self):
item = models.ServiceItemModel.objects.get(id=1)
self.assertEqual(item.__str__(), 'Django Web framework')
def test_about_str(self):
about = models.AboutModel.objects.get(id=1)
self.assertEqual(about.__str__(), 'Наши услуги')
def test_about_item_str(self):
item = models.AboutItemModel.objects.get(id=1)
self.assertEqual(item.__str__(), 'Автоматизация бизнес процессов.')
def test_certs_str(self):
cert = models.CertificatesModel.objects.get(id=1)
self.assertEqual(cert.__str__(), 'Павел Таньчев')
def test_feedback_str(self):
feed = models.FeedbackModel.objects.get(id=1)
self.assertEqual(feed.__str__(), '[email protected]')
| [
"[email protected]"
] | |
81b4b87bad12384a7baf4cb6c743426e8c881ed7 | 08e039046e2b3c526b5fd2169e02d5c5bbe253c5 | /0x03-python-data_structures/5-no_c.py | 0e51fd28731f21eb9788cffa39f09fc7c0575fa4 | [] | no_license | VinneyJ/alx-higher_level_programming | 22a976a22583334aff1f0c4120fb81117905e35b | 0ea8719ec5f28c76faf06bb5e67c14abb71fa3d0 | refs/heads/main | 2023-07-31T15:44:30.390103 | 2021-10-01T21:27:31 | 2021-10-01T21:27:31 | 361,816,988 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 212 | py | #!/usr/bin/python3
def no_c(my_string):
letter = ""
for x in range(0, len(my_string)):
if my_string[x] != 'C' and my_string[x] != 'c':
letter = letter + my_string[x]
return letter
| [
"[email protected]"
] | |
999664ee9f32896f3b0d3260623259b784d7764a | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_117/1065.py | 7fe863e98eee741f39826ab2ec8ae886728b8035 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,541 | py | inputFile = open("B-large.in")
line = inputFile.readline()[:-1]
number = int(line)
def validCut(mow, lawn):
for i in range(len(lawn)):
theseCuts = []
for cutLength in lawn[i]:
if cutLength not in theseCuts:
theseCuts.append(cutLength)
theseCuts.sort()
for thisCut in theseCuts:
cols = []
for j in range(len(lawn[i])):
if lawn[i][j] == thisCut:
cols.append(j)
if (not checkRow(thisCut, i, lawn)) and (not checkCol(thisCut, cols, lawn)):
print "Case #" + str(mow + 1) + ": NO"
return
print "Case #" + str(mow + 1) + ": YES"
return
def checkRow(cut, row, lawn):
if len(lawn[row]) == 0:
return True
for j in range(len(lawn[row])):
if lawn[row][j] > cut:
return False
return True
def checkCol(cut, cols, lawn):
if len(lawn) == 1:
return True
for col in cols:
for i in range(len(lawn)):
if lawn[i][col] > cut:
return False
return True
for mow in range(number):
line = inputFile.readline()[:-1]
dimensions = line.split(" ")
rows = int(dimensions[0])
cols = int(dimensions[1])
lawn = []
for row in range(rows):
line = inputFile.readline()[:-1]
thisRow = line.split(" ")
lawn.append(thisRow)
for row in range(rows):
for col in range(cols):
lawn[row][col] = int(lawn[row][col])
validCut(mow, lawn)
| [
"[email protected]"
] | |
a378ca25ff41ae997cff492bb1e2b971b1f461bd | 58de6fcc92384be5042f2e829abd3d39b7e5f92c | /tests/test_01_config.py | 2d03f65ddf4354c4ce89e6f72c87cb1042c03539 | [
"Apache-2.0"
] | permissive | solcaj/python-icat | 4a186396602bfae6f6794121a0fc6f4042b5487d | 6e6d63e5ddf52880b8ef482704459831a9a967d7 | refs/heads/master | 2021-01-22T13:51:46.607811 | 2016-07-22T15:02:37 | 2016-07-22T15:02:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 26,731 | py | """Test module icat.config
"""
import os.path
import getpass
import pytest
import icat.config
import icat.exception
# ============================= helper =============================
# Deliberately not using the 'tmpdir' fixture provided by pytest,
# because it seem to use a predictable directory name in /tmp wich is
# insecure.
# Content of the configuration file used in the tests
configfilestr = """
[example_root]
url = https://icat.example.com/ICATService/ICAT?wsdl
auth = simple
username = root
password = secret
idsurl = https://icat.example.com/ids
ldap_uri = ldap://ldap.example.com
ldap_base = ou=People,dc=example,dc=com
[example_jdoe]
url = https://icat.example.com/ICATService/ICAT?wsdl
auth = ldap
username = jdoe
password = pass
greeting = Hello %(username)s!
num = 42
invnum = forty-two
flag1 = true
flag2 = off
[example_nbour]
url = https://icat.example.com/ICATService/ICAT?wsdl
auth = ldap
username = nbour
[test21]
url = https://icat.example.com/ICATService/ICAT?wsdl
auth = simple
username = root
password = secret
promptPass = Yes
"""
class ConfigFile(object):
def __init__(self, confdir, content):
self.dir = confdir
self.path = os.path.join(self.dir, "icat.cfg")
with open(self.path, "w") as f:
f.write(content)
@pytest.fixture(scope="module")
def tmpconfigfile(tmpdirsec):
return ConfigFile(tmpdirsec.dir, configfilestr)
# ============================= tests ==============================
def test_config_minimal():
"""Minimal example.
No login credentials, only relevant config option is the url which
is provided as command line argument.
"""
args = ["-w", "https://icat.example.com/ICATService/ICAT?wsdl"]
conf = icat.config.Config(needlogin=False).getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'http_proxy',
'https_proxy', 'no_proxy', 'url' ]
# Deliberately not checking client_kwargs, configFile, configDir,
# http_proxy, and https_proxy. configFile contains the default
# location of the config file which is not relevant here. *_proxy
# may be set from environment variables. client_kwargs should be
# opaque for the user of the module anyway. It may contain the
# proxy settings, if any are set, and may also contain other stuff
# in future versions.
assert conf.configSection is None
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
def test_config_minimal_file(tmpconfigfile, monkeypatch):
"""Minimal example.
Almost the same as test_config_minimal(), but read the url from
a config file this time.
"""
# Let the config file be found in the default location, but
# manipulate the search path such that only the cwd exists.
cfgdirs = [ os.path.join(tmpconfigfile.dir, ".icat"), ""]
monkeypatch.setattr(icat.config, "cfgdirs", cfgdirs)
monkeypatch.chdir(tmpconfigfile.dir)
args = ["-s", "example_root"]
conf = icat.config.Config(needlogin=False).getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'http_proxy',
'https_proxy', 'no_proxy', 'url' ]
assert conf.configFile == ["icat.cfg"]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_root"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
def test_config_simple_login(tmpconfigfile):
"""Simple login example.
Standard usage, read everything from a config file.
"""
args = ["-c", tmpconfigfile.path, "-s", "example_root"]
conf = icat.config.Config().getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'http_proxy', 'https_proxy', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_root"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.auth == "simple"
assert conf.username == "root"
assert conf.password == "secret"
assert conf.promptPass == False
assert conf.credentials == {'username': 'root', 'password': 'secret'}
def test_config_override(tmpconfigfile):
"""
Read some stuff from a config file, override some other options
with command line arguments.
"""
args = ["-c", tmpconfigfile.path, "-s", "example_root",
"-a", "db", "-u", "rbeck", "-p", "geheim"]
conf = icat.config.Config().getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'http_proxy', 'https_proxy', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_root"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.auth == "db"
assert conf.username == "rbeck"
assert conf.password == "geheim"
assert conf.promptPass == False
assert conf.credentials == {'username': 'rbeck', 'password': 'geheim'}
def test_config_askpass(tmpconfigfile, monkeypatch):
"""
Same as test_config_override(), but do not pass the password in
the command line arguments. In this case, getconfig() should
prompt for the password.
"""
def mockgetpass(prompt='Password: '):
return "mockpass"
monkeypatch.setattr(getpass, "getpass", mockgetpass)
args = ["-c", tmpconfigfile.path, "-s", "example_root",
"-a", "db", "-u", "rbeck"]
conf = icat.config.Config().getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'http_proxy', 'https_proxy', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_root"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.auth == "db"
assert conf.username == "rbeck"
assert conf.password == "mockpass"
assert conf.promptPass == True
assert conf.credentials == {'username': 'rbeck', 'password': 'mockpass'}
def test_config_nopass_askpass(tmpconfigfile, monkeypatch):
"""
Same as test_config_askpass(), but with no password set in the
config file. Very early versions of icat.config had a bug to
raise an error if no password was set at all even if interactive
prompt for the password was explictely requested. (Fixed in
67e91ed.)
"""
def mockgetpass(prompt='Password: '):
return "mockpass"
monkeypatch.setattr(getpass, "getpass", mockgetpass)
args = ["-c", tmpconfigfile.path, "-s", "example_nbour", "-P"]
conf = icat.config.Config().getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'http_proxy', 'https_proxy', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_nbour"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.auth == "ldap"
assert conf.username == "nbour"
assert conf.password == "mockpass"
assert conf.promptPass == True
assert conf.credentials == {'username': 'nbour', 'password': 'mockpass'}
def test_config_askpass_file(tmpconfigfile, monkeypatch):
"""
Set promptPass in the configuration file. This should force
prompting for the password. Issue #21.
"""
def mockgetpass(prompt='Password: '):
return "mockpass"
monkeypatch.setattr(getpass, "getpass", mockgetpass)
args = ["-c", tmpconfigfile.path, "-s", "test21"]
conf = icat.config.Config().getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'http_proxy', 'https_proxy', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "test21"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.auth == "simple"
assert conf.username == "root"
assert conf.password == "mockpass"
assert conf.promptPass == True
assert conf.credentials == {'username': 'root', 'password': 'mockpass'}
def test_config_environment(tmpconfigfile, monkeypatch):
"""Set some config variables from the environment.
"""
monkeypatch.setenv("ICAT_CFG", tmpconfigfile.path)
monkeypatch.setenv("ICAT_AUTH", "db")
monkeypatch.setenv("http_proxy", "http://www-cache.example.org:3128/")
monkeypatch.setenv("https_proxy", "http://www-cache.example.org:3128/")
monkeypatch.setenv("no_proxy", "localhost, .example.org")
args = ["-s", "example_root", "-u", "rbeck", "-p", "geheim"]
conf = icat.config.Config().getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'http_proxy', 'https_proxy', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_root"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.http_proxy == "http://www-cache.example.org:3128/"
assert conf.https_proxy == "http://www-cache.example.org:3128/"
assert conf.no_proxy == "localhost, .example.org"
assert conf.auth == "db"
assert conf.username == "rbeck"
assert conf.password == "geheim"
assert conf.promptPass == False
assert conf.credentials == {'username': 'rbeck', 'password': 'geheim'}
assert conf.client_kwargs['proxy'] == {
'http': 'http://www-cache.example.org:3128/',
'https': 'http://www-cache.example.org:3128/',
}
def test_config_ids(tmpconfigfile):
"""Simple login example.
Ask for the idsurl configuration variable.
"""
# We set ids="optional", the idsurl is present in section example_root.
args = ["-c", tmpconfigfile.path, "-s", "example_root"]
conf = icat.config.Config(ids="optional").getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'http_proxy', 'https_proxy', 'idsurl', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_root"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.idsurl == "https://icat.example.com/ids"
assert conf.auth == "simple"
assert conf.username == "root"
assert conf.password == "secret"
assert conf.promptPass == False
assert conf.credentials == {'username': 'root', 'password': 'secret'}
# In section example_jdoe, idsurl is not set, so the configuration
# variable is present, but set to None.
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe"]
conf = icat.config.Config(ids="optional").getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'http_proxy', 'https_proxy', 'idsurl', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.idsurl == None
assert conf.auth == "ldap"
assert conf.username == "jdoe"
assert conf.password == "pass"
assert conf.promptPass == False
assert conf.credentials == {'username': 'jdoe', 'password': 'pass'}
def test_config_custom_var(tmpconfigfile):
"""Define custom configuration variables.
"""
# Note that ldap_filter is not defined in the configuration file,
# but we have a default value defined here, so this is ok.
args = ["-c", tmpconfigfile.path, "-s", "example_root"]
config = icat.config.Config()
config.add_variable('ldap_uri', ("-l", "--ldap-uri"),
dict(help="URL of the LDAP server"),
envvar='LDAP_URI')
config.add_variable('ldap_base', ("-b", "--ldap-base"),
dict(help="base DN for searching the LDAP server"),
envvar='LDAP_BASE')
config.add_variable('ldap_filter', ("-f", "--ldap-filter"),
dict(help="search filter to select the user entries"),
default='(uid=*)')
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'http_proxy', 'https_proxy', 'ldap_base',
'ldap_filter', 'ldap_uri', 'no_proxy', 'password',
'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_root"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.auth == "simple"
assert conf.username == "root"
assert conf.password == "secret"
assert conf.promptPass == False
assert conf.ldap_uri == "ldap://ldap.example.com"
assert conf.ldap_base == "ou=People,dc=example,dc=com"
assert conf.ldap_filter == "(uid=*)"
assert conf.credentials == {'username': 'root', 'password': 'secret'}
def test_config_subst_nosubst(tmpconfigfile):
"""Use a format string in a configuration variable.
But disable the substitution.
"""
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe"]
config = icat.config.Config()
config.add_variable('greeting', ("--greeting",),
dict(help="Greeting message"),
subst=False)
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'greeting', 'http_proxy', 'https_proxy', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.auth == "ldap"
assert conf.username == "jdoe"
assert conf.password == "pass"
assert conf.promptPass == False
assert conf.greeting == "Hello %(username)s!"
assert conf.credentials == {'username': 'jdoe', 'password': 'pass'}
def test_config_subst(tmpconfigfile):
"""Use a format string in a configuration variable.
Same as above, but enable the substitution this time.
"""
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe"]
config = icat.config.Config()
config.add_variable('greeting', ("--greeting",),
dict(help="Greeting message"),
subst=True)
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'greeting', 'http_proxy', 'https_proxy', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.auth == "ldap"
assert conf.username == "jdoe"
assert conf.password == "pass"
assert conf.promptPass == False
assert conf.greeting == "Hello jdoe!"
assert conf.credentials == {'username': 'jdoe', 'password': 'pass'}
def test_config_subst_cmdline(tmpconfigfile):
"""Use a format string in a configuration variable.
Same as above, but set the referenced variable from the command
line.
"""
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe",
"-u", "jonny", "-p", "pass"]
config = icat.config.Config()
config.add_variable('greeting', ("--greeting",),
dict(help="Greeting message"),
subst=True)
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'greeting', 'http_proxy', 'https_proxy', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.auth == "ldap"
assert conf.username == "jonny"
assert conf.password == "pass"
assert conf.promptPass == False
assert conf.greeting == "Hello jonny!"
assert conf.credentials == {'username': 'jonny', 'password': 'pass'}
def test_config_subst_confdir(tmpconfigfile):
"""Substitute configDir in the default of a variable.
"""
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe"]
config = icat.config.Config(needlogin=False)
config.add_variable('extracfg', ("--extracfg",),
dict(help="Extra config file"),
default="%(configDir)s/extra.xml", subst=True)
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'extracfg',
'http_proxy', 'https_proxy', 'no_proxy', 'url' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert os.path.dirname(conf.extracfg) == tmpconfigfile.dir
def test_config_type_int(tmpconfigfile):
"""Read an integer variable from the configuration file.
"""
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe"]
config = icat.config.Config(needlogin=False)
config.add_variable('num', ("--num",),
dict(help="Integer variable"), type=int)
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'http_proxy',
'https_proxy', 'no_proxy', 'num', 'url' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.num == 42
def test_config_type_int_err(tmpconfigfile):
"""Read an integer variable from the configuration file.
Same as last one, but have an invalid value this time.
"""
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe"]
config = icat.config.Config(needlogin=False)
config.add_variable('invnum', ("--invnum",),
dict(help="Integer variable"), type=int)
with pytest.raises(icat.exception.ConfigError) as err:
conf = config.getconfig(args)
assert 'invalid int value' in str(err.value)
def test_config_type_boolean(tmpconfigfile):
"""Test a boolean configuration variable.
"""
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe"]
config = icat.config.Config(needlogin=False)
config.add_variable('flag1', ("--flag1",),
dict(help="Flag 1", action='store_const', const=True),
type=icat.config.boolean)
config.add_variable('flag2', ("--flag2",),
dict(help="Flag 2", action='store_const', const=True),
type=icat.config.boolean)
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'flag1', 'flag2',
'http_proxy', 'https_proxy', 'no_proxy', 'url' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.flag1 == True
assert conf.flag2 == False
# Now override flag2 from the command line
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe", "--flag2"]
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'flag1', 'flag2',
'http_proxy', 'https_proxy', 'no_proxy', 'url' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.flag1 == True
assert conf.flag2 == True
def test_config_type_flag(tmpconfigfile):
"""Test the special configuration variable type flag.
"""
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe"]
config = icat.config.Config(needlogin=False)
config.add_variable('flag1', ("--flag1",),
dict(help="Flag 1"), type=icat.config.flag)
config.add_variable('flag2', ("--flag2",),
dict(help="Flag 2"), type=icat.config.flag)
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'flag1', 'flag2',
'http_proxy', 'https_proxy', 'no_proxy', 'url' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.flag1 == True
assert conf.flag2 == False
# Now override the flags from the command line
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe",
"--no-flag1", "--flag2"]
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'flag1', 'flag2',
'http_proxy', 'https_proxy', 'no_proxy', 'url' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.flag1 == False
assert conf.flag2 == True
def test_config_positional(tmpconfigfile):
"""Test adding a positional argument on the command line.
(There used to be a bug in adding positional arguments, fixed in
7d10764.)
"""
args = ["-c", tmpconfigfile.path, "-s", "example_jdoe", "test.dat"]
config = icat.config.Config()
config.add_variable('datafile', ("datafile",),
dict(metavar="input.dat",
help="name of the input datafile"))
conf = config.getconfig(args)
attrs = [ a for a in sorted(conf.__dict__.keys()) if a[0] != '_' ]
assert attrs == [ 'auth', 'checkCert', 'client_kwargs', 'configDir',
'configFile', 'configSection', 'credentials',
'datafile', 'http_proxy', 'https_proxy', 'no_proxy',
'password', 'promptPass', 'url', 'username' ]
assert conf.configFile == [tmpconfigfile.path]
assert conf.configDir == tmpconfigfile.dir
assert conf.configSection == "example_jdoe"
assert conf.url == "https://icat.example.com/ICATService/ICAT?wsdl"
assert conf.auth == "ldap"
assert conf.username == "jdoe"
assert conf.password == "pass"
assert conf.promptPass == False
assert conf.credentials == {'username': 'jdoe', 'password': 'pass'}
assert conf.datafile == "test.dat"
| [
"[email protected]"
] | |
f268dd933cd218e12a64595b1355f3d0575fd7f4 | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/pa2/sample/stmt_if-5.py | d295903a8ceb0fbaadc06acb64c9b79824817385 | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 76 | py | if $Literal:
pass
elif True:
if 1 == 1:
pass
else:
pass
| [
"[email protected]"
] | |
53e916a2354173ad94fe2ffd901c9249e8a2572a | 539af892f18d9a63f1d6966a15a100f004a5a908 | /next-greater-number.py | cd9e250103832cc5ad5f3643d483ac75584f541a | [] | no_license | woofan/leetcode | 5f0e7cfbcd9d0fddd7b25c7a96896e6a24ccbd15 | 4a13026b6e04a71d5da56c7c35ac58877b27f69b | refs/heads/master | 2022-12-05T17:27:00.979915 | 2022-11-09T08:58:01 | 2022-11-09T08:58:01 | 226,093,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | def nextGreaterElement( nums1, nums2) :
res = [-1] * len(nums1)
for i in range(len(nums1)):
for j in range(nums2.index(nums1[i]),len(nums2)):
if nums2[j] > nums1[i]:
res[i] = nums2[j]
break
if j == len(nums2):
res[i] = -1
return res
print(nextGreaterElement([4,1,2],[1,3,4,2])) | [
"[email protected]"
] | |
d1b6d651f777c45464dcbacff005184aa87ae11f | 8da91c26d423bacbeee1163ac7e969904c7e4338 | /pyvisdk/do/vim_esx_cl_ifcoeadapterlist_fcoe_adapter_device.py | 3330a86d5a6754317ae63e082cfb7c861561ad0d | [] | no_license | pexip/os-python-infi-pyvisdk | 5d8f3a3858cdd61fb76485574e74ae525cdc7e25 | 1aadea0afbc306d09f6ecb9af0e683dbbf961d20 | refs/heads/master | 2023-08-28T02:40:28.789786 | 2020-07-16T04:00:53 | 2020-07-16T04:00:53 | 10,032,240 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,122 | py |
import logging
from pyvisdk.exceptions import InvalidArgumentError
# This module is NOT auto-generated
# Inspired by decompiled Java classes from vCenter's internalvim25stubs.jar
# Unless states otherside, the methods and attributes were not used by esxcli,
# and thus not tested
log = logging.getLogger(__name__)
def VimEsxCLIfcoeadapterlistFcoeAdapterDevice(vim, *args, **kwargs):
obj = vim.client.factory.create('{urn:vim25}VimEsxCLIfcoeadapterlistFcoeAdapterDevice')
# do some validation checking...
if (len(args) + len(kwargs)) < 0:
raise IndexError('Expected at least 1 arguments got: %d' % len(args))
required = [ ]
optional = [ 'AdapterName', 'FCFMAC', 'PhysicalNIC', 'SourceMAC', 'UserPriority', 'VLANid', 'VNPortMAC' ]
for name, arg in zip(required + optional, args):
setattr(obj, name, arg)
for name, value in kwargs.items():
if name in required + optional:
setattr(obj, name, value)
else:
raise InvalidArgumentError("Invalid argument: %s. Expected one of %s" % (name, ", ".join(required + optional)))
return obj | [
"[email protected]"
] | |
0b4cd98072362cc8682d11ed73c4125e6c758daa | f707303e4dfe383cf82c23a6bb42ccfdc4cfdb67 | /pandas-ml-common/pandas_ml_common_test/unit/utils/test_random.py | 6a133b3025ab3ed9c52849c9e9d31683a5abd8f8 | [
"MIT"
] | permissive | jcoffi/pandas-ml-quant | 1830ec256f8c09c04f1aa77e2eecfba07d34fe68 | 650a8e8f77bc4d71136518d1c7ee65c194a99cf0 | refs/heads/master | 2023-08-31T06:45:38.060737 | 2021-09-09T04:44:35 | 2021-09-09T04:44:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 380 | py | from unittest import TestCase
import numpy as np
from pandas_ml_common.utils import normalize_probabilities
class TestRandumUtils(TestCase):
def test_probs_normalisation(self):
p1 = [0.2, 0.8]
p2 = [2, 8]
np.testing.assert_equal(np.array(p1), normalize_probabilities(p1))
np.testing.assert_equal(np.array(p1), normalize_probabilities(p2))
| [
"[email protected]"
] | |
e967581074ee231c67a7f10c06ca6d07b6452aba | 51f6443116ef09aa91cca0ac91387c1ce9cb445a | /Curso_de_Python_3_do_Basico_Ao_Avancado_Udemy/aula165/aula165/wsgi.py | 6a1760d3a621190f05ff162edb5cb0e32301a322 | [
"MIT"
] | permissive | DanilooSilva/Cursos_de_Python | f449f75bc586f7cb5a7e43000583a83fff942e53 | 8f167a4c6e16f01601e23b6f107578aa1454472d | refs/heads/main | 2023-07-30T02:11:27.002831 | 2021-10-01T21:52:15 | 2021-10-01T21:52:15 | 331,683,041 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | """
WSGI config for aula165 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/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'aula165.settings')
application = get_wsgi_application()
| [
"[email protected]"
] | |
427be95a3e10919c7f60362ba818390acf5a3f9b | 1b7929f6e521042595fa5d8b04753b09fcf4825c | /webdev/public_catering/hello_py.py | cf5c547298ec0d27dc37cca15384c843c4bae85b | [] | no_license | xyzza/convert_hg | a73b8c5b3681decd75540570ff6ba0c7cf1ce576 | 9cfd9b34fcebbb2c0583b6bb19a98f28870c293d | refs/heads/master | 2021-01-10T21:07:04.499530 | 2014-04-15T13:09:36 | 2014-04-15T13:09:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 138 | py | #coding:utf-8
"""
This is new python module for some stuff
ok, i'll fix it!
"""
import os
import sys
print "hello module 01 in task 003" | [
"devnull@localhost"
] | devnull@localhost |
771f82b1529867ea4e13963c6cf6ef6d6932fb22 | 16d4474e7777da03aef6ead78e112edf8931d131 | /core/migrations/0007_category_direct_link.py | e10d5e9b585a815fcb128bd6f83b63203f61be65 | [] | no_license | BijoySingh/HomePageMaker | f91dd03bc1e2b6a46893b8738f87686d105968b8 | ba366dfd9514b10cc6283bb4e120037f8229fc1e | refs/heads/master | 2020-12-06T23:51:51.122187 | 2017-01-30T23:31:38 | 2017-01-30T23:31:38 | 66,867,578 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 483 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-09-01 06:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0006_content_cover'),
]
operations = [
migrations.AddField(
model_name='category',
name='direct_link',
field=models.CharField(blank=True, default='', max_length=256, null=True),
),
]
| [
"[email protected]"
] | |
b3c6f8b199115f12bd32d0061f4a571a117ca082 | 0bde5f7f09aa537ed1f4828d4e5ebee66475918f | /h2o-py/tests/testdir_apis/Data_Manipulation/pyunit_h2oH2OFrame_mult.py | f2690d0cf18bb0a449c22efbf81071d98ed0caba | [
"Apache-2.0"
] | permissive | Winfredemalx54/h2o-3 | d69f1c07e1f5d2540cb0ce5e6073415fa0780d32 | dfb163c82ff3bfa6f88cdf02465a9bb4c8189cb7 | refs/heads/master | 2022-12-14T08:59:04.109986 | 2020-09-23T08:36:59 | 2020-09-23T08:36:59 | 297,947,978 | 2 | 0 | Apache-2.0 | 2020-09-23T11:28:54 | 2020-09-23T11:28:54 | null | UTF-8 | Python | false | false | 1,178 | py | from __future__ import print_function
import sys
sys.path.insert(1,"../../../")
from tests import pyunit_utils
import h2o
import numpy as np
from h2o.utils.typechecks import assert_is_type
from h2o.frame import H2OFrame
import random
def h2o_H2OFrame_mult():
"""
Python API test: h2o.frame.H2OFrame.mult(matrix)
Copied from pyunit_mmult.py
"""
data = [[random.uniform(-10000,10000)] for c in range(100)]
h2o_data = h2o.H2OFrame(data)
np_data = np.array(data)
h2o_mm = h2o_data.mult(h2o_data.transpose())
np_mm = np.dot(np_data, np.transpose(np_data))
assert_is_type(h2o_mm, H2OFrame)
for x in range(10):
for y in range(10):
r = random.randint(0,99)
c = random.randint(0,99)
h2o_val = h2o_mm[r,c]
np_val = np_mm[r][c]
assert abs(h2o_val - np_val) < 1e-06, "check unsuccessful! h2o computed {0} and numpy computed {1}. expected " \
"equal quantile values between h2o and numpy".format(h2o_val,np_val)
if __name__ == "__main__":
pyunit_utils.standalone_test(h2o_H2OFrame_mult())
else:
h2o_H2OFrame_mult()
| [
"[email protected]"
] | |
b691d12b39a29cffccfd1c54e721682c233e2320 | 7f2fc00415c152538520df84387549def73c4320 | /s_backbones/shufflenetv2.py | 8c6ee5b4b58efa8e8aad08950d4b0e06328ee77f | [
"MIT"
] | permissive | mxer/face_project | da326be7c70c07ae510c2b5b8063902b27ae3a5b | 8d70858817da4d15c7b513ae492034784f57f35f | refs/heads/main | 2023-08-06T09:24:49.842098 | 2021-09-18T08:32:18 | 2021-09-18T08:32:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,920 | py | import torch
from torch import Tensor
import torch.nn as nn
from typing import Callable, Any, List
__all__ = [
'ShuffleNetV2', 'shufflenet_v2_x0_1', 'shufflenet_v2_x0_5', 'shufflenet_v2_x1_0',
'shufflenet_v2_x1_5', 'shufflenet_v2_x2_0'
]
def channel_shuffle(x: Tensor, groups: int) -> Tensor:
batchsize, num_channels, height, width = x.size()
channels_per_group = num_channels // groups
# reshape
x = x.view(batchsize, groups,
channels_per_group, height, width)
x = torch.transpose(x, 1, 2).contiguous()
# flatten
x = x.view(batchsize, -1, height, width)
return x
class InvertedResidual(nn.Module):
def __init__(
self,
inp: int,
oup: int,
stride: int
) -> None:
super(InvertedResidual, self).__init__()
if not (1 <= stride <= 3):
raise ValueError('illegal stride value')
self.stride = stride
branch_features = oup // 2
assert (self.stride != 1) or (inp == branch_features << 1)
if self.stride > 1:
self.branch1 = nn.Sequential(
self.depthwise_conv(inp, inp, kernel_size=3, stride=self.stride, padding=1),
nn.BatchNorm2d(inp),
nn.Conv2d(inp, branch_features, kernel_size=1, stride=1, padding=0, bias=False),
nn.BatchNorm2d(branch_features),
nn.ReLU(inplace=True),
)
else:
self.branch1 = nn.Sequential()
self.branch2 = nn.Sequential(
nn.Conv2d(inp if (self.stride > 1) else branch_features,
branch_features, kernel_size=1, stride=1, padding=0, bias=False),
nn.BatchNorm2d(branch_features),
nn.ReLU(inplace=True),
self.depthwise_conv(branch_features, branch_features, kernel_size=3, stride=self.stride, padding=1),
nn.BatchNorm2d(branch_features),
nn.Conv2d(branch_features, branch_features, kernel_size=1, stride=1, padding=0, bias=False),
nn.BatchNorm2d(branch_features),
nn.ReLU(inplace=True),
)
@staticmethod
def depthwise_conv(
i: int,
o: int,
kernel_size: int,
stride: int = 1,
padding: int = 0,
bias: bool = False
) -> nn.Conv2d:
return nn.Conv2d(i, o, kernel_size, stride, padding, bias=bias, groups=i)
def forward(self, x: Tensor) -> Tensor:
if self.stride == 1:
x1, x2 = x.chunk(2, dim=1)
out = torch.cat((x1, self.branch2(x2)), dim=1)
else:
out = torch.cat((self.branch1(x), self.branch2(x)), dim=1)
out = channel_shuffle(out, 2)
return out
class ShuffleNetV2(nn.Module):
def __init__(
self,
stages_repeats: List[int],
stages_out_channels: List[int],
embedding_size: int = 512,
inverted_residual: Callable[..., nn.Module] = InvertedResidual,
dropout = 0, cfg = None
) -> None:
super(ShuffleNetV2, self).__init__()
if len(stages_repeats) != 4:
raise ValueError('expected stages_repeats as list of 3 positive ints')
if len(stages_out_channels) != 6:
raise ValueError('expected stages_out_channels as list of 5 positive ints')
self._stage_out_channels = stages_out_channels
input_channels = 3
output_channels = self._stage_out_channels[0]
self.conv1 = nn.Sequential(
nn.Conv2d(input_channels, output_channels, 3, 1, 1, bias=False),
nn.BatchNorm2d(output_channels),
nn.ReLU(inplace=True),
)
input_channels = output_channels
# Static annotations for mypy
self.stage2: nn.Sequential
self.stage3: nn.Sequential
self.stage4: nn.Sequential
self.stage5: nn.Sequential
stage_names = ['stage{}'.format(i) for i in [2, 3, 4, 5]]
for name, repeats, output_channels in zip(
stage_names, stages_repeats, self._stage_out_channels[1:]):
seq = [inverted_residual(input_channels, output_channels, 2)]
for i in range(repeats - 1):
seq.append(inverted_residual(output_channels, output_channels, 1))
setattr(self, name, nn.Sequential(*seq))
input_channels = output_channels
output_channels = self._stage_out_channels[-1]
self.conv5 = nn.Sequential(
nn.Conv2d(input_channels, output_channels, 1, 1, 0, bias=False),
nn.BatchNorm2d(output_channels),
nn.ReLU(inplace=True),
)
self.fc = nn.Linear(output_channels, embedding_size)
def _forward_impl(self, x: Tensor) -> Tensor:
# See note [TorchScript super()]
x = self.conv1(x)
x = self.stage2(x)
x = self.stage3(x)
x = self.stage4(x)
x = self.stage5(x)
x = self.conv5(x)
x = x.mean([2, 3]) # globalpool
x = self.fc(x)
return x
def forward(self, x: Tensor) -> Tensor:
return self._forward_impl(x)
def _shufflenetv2(arch: str, pretrained: bool, progress: bool, *args: Any, **kwargs: Any) -> ShuffleNetV2:
model = ShuffleNetV2(*args, **kwargs)
return model
def shufflenet_v2_x0_1(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> ShuffleNetV2:
"""
Constructs a ShuffleNetV2 with 0.5x output channels, as described in
`"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design"
<https://arxiv.org/abs/1807.11164>`_.
Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
progress (bool): If True, displays a progress bar of the download to stderr
"""
return _shufflenetv2('shufflenet_v2_x0.1', pretrained, progress,
[4, 8, 3, 2], [16, 24, 48, 96, 192, 384], **kwargs)
def shufflenet_v2_x0_5(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> ShuffleNetV2:
"""
Constructs a ShuffleNetV2 with 0.5x output channels, as described in
`"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design"
<https://arxiv.org/abs/1807.11164>`_.
Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
progress (bool): If True, displays a progress bar of the download to stderr
"""
return _shufflenetv2('shufflenetv2_x0.5', pretrained, progress,
[4, 8, 4, 2], [24, 48, 96, 192, 384, 1024], **kwargs)
def shufflenet_v2_x1_0(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> ShuffleNetV2:
"""
Constructs a ShuffleNetV2 with 1.0x output channels, as described in
`"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design"
<https://arxiv.org/abs/1807.11164>`_.
Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
progress (bool): If True, displays a progress bar of the download to stderr
"""
return _shufflenetv2('shufflenetv2_x1.0', pretrained, progress,
[4, 8, 4, 2], [24, 116, 232, 464, 928, 1024], **kwargs)
def shufflenet_v2_x1_5(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> ShuffleNetV2:
"""
Constructs a ShuffleNetV2 with 1.5x output channels, as described in
`"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design"
<https://arxiv.org/abs/1807.11164>`_.
Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
progress (bool): If True, displays a progress bar of the download to stderr
"""
return _shufflenetv2('shufflenetv2_x1.5', pretrained, progress,
[4, 8, 4, 2], [24, 176, 352, 704, 1408, 1024], **kwargs)
def shufflenet_v2_x2_0(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> ShuffleNetV2:
"""
Constructs a ShuffleNetV2 with 2.0x output channels, as described in
`"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design"
<https://arxiv.org/abs/1807.11164>`_.
Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
progress (bool): If True, displays a progress bar of the download to stderr
"""
return _shufflenetv2('shufflenetv2_x2.0', pretrained, progress,
[4, 8, 4, 2], [24, 244, 488, 976, 1952, 2048], **kwargs)
if __name__ == '__main__':
import os
net = shufflenet_v2_x0_1()
torch.save(net.state_dict(), 'shufflenetv2.pth')
# to onnx
net.eval()
dummy_input = torch.randn(10, 3, 112, 112)
input_names = ["actual_input_1"]
torch.onnx.export(net, dummy_input, 'shufflenet_v2_x0_1.onnx',
verbose=False, input_names=input_names,
operator_export_type=torch.onnx.OperatorExportTypes.ONNX, opset_version=11)
| [
"[email protected]"
] | |
808270b56854e917ed75cbf6c97e1c769dfb54cd | bc7b5d2477ca3b0c54383c97a19d29cb7cb63bc5 | /sdk/lusid/models/resource_list_of_order.py | c5bac180964942bdd13bef10b9e59403e18824e9 | [
"MIT"
] | permissive | mb-a/lusid-sdk-python-2 | 342b6e7b61ca0c93f43e72f69e572478e3a7be4f | 0eee79c8e36188a735aaae578a9c4be2a8497aed | refs/heads/master | 2023-07-15T16:15:11.878079 | 2021-08-25T20:52:27 | 2021-08-25T20:52:27 | 214,153,732 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,906 | py | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.3430
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class ResourceListOfOrder(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
required_map (dict): The key is attribute name
and the value is whether it is 'required' or 'optional'.
"""
openapi_types = {
'values': 'list[Order]',
'href': 'str',
'links': 'list[Link]',
'next_page': 'str',
'previous_page': 'str'
}
attribute_map = {
'values': 'values',
'href': 'href',
'links': 'links',
'next_page': 'nextPage',
'previous_page': 'previousPage'
}
required_map = {
'values': 'required',
'href': 'optional',
'links': 'optional',
'next_page': 'optional',
'previous_page': 'optional'
}
def __init__(self, values=None, href=None, links=None, next_page=None, previous_page=None): # noqa: E501
"""
ResourceListOfOrder - a model defined in OpenAPI
:param values: The resources to list. (required)
:type values: list[lusid.Order]
:param href: The URI of the resource list.
:type href: str
:param links: Collection of links.
:type links: list[lusid.Link]
:param next_page: The next page of results.
:type next_page: str
:param previous_page: The previous page of results.
:type previous_page: str
""" # noqa: E501
self._values = None
self._href = None
self._links = None
self._next_page = None
self._previous_page = None
self.discriminator = None
self.values = values
self.href = href
self.links = links
self.next_page = next_page
self.previous_page = previous_page
@property
def values(self):
"""Gets the values of this ResourceListOfOrder. # noqa: E501
The resources to list. # noqa: E501
:return: The values of this ResourceListOfOrder. # noqa: E501
:rtype: list[Order]
"""
return self._values
@values.setter
def values(self, values):
"""Sets the values of this ResourceListOfOrder.
The resources to list. # noqa: E501
:param values: The values of this ResourceListOfOrder. # noqa: E501
:type: list[Order]
"""
if values is None:
raise ValueError("Invalid value for `values`, must not be `None`") # noqa: E501
self._values = values
@property
def href(self):
"""Gets the href of this ResourceListOfOrder. # noqa: E501
The URI of the resource list. # noqa: E501
:return: The href of this ResourceListOfOrder. # noqa: E501
:rtype: str
"""
return self._href
@href.setter
def href(self, href):
"""Sets the href of this ResourceListOfOrder.
The URI of the resource list. # noqa: E501
:param href: The href of this ResourceListOfOrder. # noqa: E501
:type: str
"""
self._href = href
@property
def links(self):
"""Gets the links of this ResourceListOfOrder. # noqa: E501
Collection of links. # noqa: E501
:return: The links of this ResourceListOfOrder. # noqa: E501
:rtype: list[Link]
"""
return self._links
@links.setter
def links(self, links):
"""Sets the links of this ResourceListOfOrder.
Collection of links. # noqa: E501
:param links: The links of this ResourceListOfOrder. # noqa: E501
:type: list[Link]
"""
self._links = links
@property
def next_page(self):
"""Gets the next_page of this ResourceListOfOrder. # noqa: E501
The next page of results. # noqa: E501
:return: The next_page of this ResourceListOfOrder. # noqa: E501
:rtype: str
"""
return self._next_page
@next_page.setter
def next_page(self, next_page):
"""Sets the next_page of this ResourceListOfOrder.
The next page of results. # noqa: E501
:param next_page: The next_page of this ResourceListOfOrder. # noqa: E501
:type: str
"""
self._next_page = next_page
@property
def previous_page(self):
"""Gets the previous_page of this ResourceListOfOrder. # noqa: E501
The previous page of results. # noqa: E501
:return: The previous_page of this ResourceListOfOrder. # noqa: E501
:rtype: str
"""
return self._previous_page
@previous_page.setter
def previous_page(self, previous_page):
"""Sets the previous_page of this ResourceListOfOrder.
The previous page of results. # noqa: E501
:param previous_page: The previous_page of this ResourceListOfOrder. # noqa: E501
:type: str
"""
self._previous_page = previous_page
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ResourceListOfOrder):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
| [
"[email protected]"
] | |
8b4e464b1ad0ef3c918a96fd380ac7b91b8c909d | 7f57c12349eb4046c40c48acb35b0f0a51a344f6 | /2015/ConstructBinaryTreeFromPreorderAndInorderTraversal_v0.py | daaa268e1414a2c429629aa49eadb7c663488efa | [] | no_license | everbird/leetcode-py | 0a1135952a93b93c02dcb9766a45e481337f1131 | b093920748012cddb77258b1900c6c177579bff8 | refs/heads/master | 2022-12-13T07:53:31.895212 | 2022-12-10T00:48:39 | 2022-12-10T00:48:39 | 11,116,752 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,120 | py | #!/usr/bin/env python
# encoding: utf-8
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
# @param {integer[]} preorder
# @param {integer[]} inorder
# @return {TreeNode}
def buildTree(self, preorder, inorder):
if not inorder or not preorder:
return None
p = preorder.pop(0)
t = TreeNode(p)
k = inorder.index(p)
t.left = self.buildTree(preorder, inorder[:k])
t.right = self.buildTree(preorder, inorder[k+1:])
return t
def inorder(self, root):
if not root:
return
self.inorder(root.left)
print root.val
self.inorder(root.right)
def preorder(self, root):
if not root:
return
print root.val
self.inorder(root.left)
self.inorder(root.right)
if __name__ == '__main__':
s = Solution()
h = s.buildTree([1,2,3,4,5], [2,1,4,3,5])
s.inorder(h)
print '-' * 6
s.preorder(h)
h = s.buildTree([], [])
| [
"[email protected]"
] | |
bc0b93fd8478e0c280277ddeab4f81620aed29f5 | 6d42b5219f25cb12626c79d4ec45a0eab0b51d9c | /pthbldr/datasets/tests/test_datasets.py | 38d66b8c1dd1cd81729e649848f3bb94db6e55e0 | [
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | kastnerkyle/pthbldr | cc370182126784645f6a4b24af81aefb12e2adcc | 4dd65f9973a0199b920fb7b76d9b3163b5928675 | refs/heads/master | 2020-12-30T13:20:07.846618 | 2017-11-06T23:45:07 | 2017-11-06T23:45:07 | 91,346,119 | 2 | 0 | null | 2017-11-06T23:45:08 | 2017-05-15T14:16:43 | Python | UTF-8 | Python | false | false | 324 | py | from pthbldr.datasets import load_digits
from pthbldr.datasets import load_iris
from nose.tools import assert_equal
def test_digits():
digits = load_digits()
assert_equal(len(digits["data"]), len(digits["target"]))
def test_iris():
iris = load_iris()
assert_equal(len(iris["data"]), len(iris["target"]))
| [
"[email protected]"
] | |
436d1079e865e48d975bd6ffa89a5f3ed150f80d | bdfd3889e1cc02f97b3e2dc0032ce0c9b59bf37e | /src/gork/contrib/gtag/forms.py | f975a8005e00e6d6fd6d68bfd55cee536a5ff863 | [
"MIT"
] | permissive | indexofire/gork | c85728953cfa9ab98c59b79a440d4e12212cbc4e | c5e172b896a51c15f358d3aabbcb66af837b54b2 | refs/heads/master | 2016-09-06T04:58:01.435002 | 2014-02-06T08:35:51 | 2014-02-06T08:35:51 | 9,260,830 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 767 | py | # -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext as _
from gtag.utils import parse_tags, edit_string_for_tags
class TagWidget(forms.TextInput):
def render(self, name, value, attrs=None):
if value is not None and not isinstance(value, basestring):
value = edit_string_for_tags([o.tag for o in value.select_related("tag")])
return super(TagWidget, self).render(name, value, attrs)
class TagField(forms.CharField):
widget = TagWidget
def clean(self, value):
value = super(TagField, self).clean(value)
try:
return parse_tags(value)
except ValueError:
raise forms.ValidationError(_("Please provide a comma-separated list of tags."))
| [
"[email protected]"
] | |
4da322ad7373ffcc99ec58259c8b3e4c2ab58673 | 59166105545cdd87626d15bf42e60a9ee1ef2413 | /dbpedia/models/historic_place.py | 792b569a8a3a2806daf5872b1931f2b92b0c12fe | [] | no_license | mosoriob/dbpedia_api_client | 8c594fc115ce75235315e890d55fbf6bd555fa85 | 8d6f0d04a3a30a82ce0e9277e4c9ce00ecd0c0cc | refs/heads/master | 2022-11-20T01:42:33.481024 | 2020-05-12T23:22:54 | 2020-05-12T23:22:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411,588 | py | # coding: utf-8
"""
DBpedia
This is the API of the DBpedia Ontology # noqa: E501
The version of the OpenAPI document: v0.0.1
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from dbpedia.configuration import Configuration
class HistoricPlace(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'city_type': 'list[str]',
'irish_name': 'list[str]',
'reff_bourgmestre': 'list[object]',
'community_iso_code': 'list[str]',
'anthem': 'list[object]',
'rank_agreement': 'list[int]',
'wilaya': 'list[object]',
'parliament': 'list[object]',
'moldavian_name': 'list[str]',
'rank_population': 'list[int]',
'quote': 'list[str]',
'initially_used_for': 'list[str]',
'commissioner_date': 'list[str]',
'demographics_as_of': 'list[str]',
'largest_settlement': 'list[object]',
'distance_to_london': 'list[float]',
'geoloc_dual': 'list[str]',
'distance_to_capital': 'list[float]',
'subregion': 'list[object]',
'sharing_out_area': 'list[str]',
'phone_prefix_name': 'list[str]',
'time_zone': 'list[object]',
'gross_domestic_product_as_of': 'list[str]',
'population': 'list[object]',
'senior': 'list[str]',
'human_development_index_rank': 'list[str]',
'population_rural': 'list[int]',
'gaelic_name': 'list[str]',
'area_total_ranking': 'list[int]',
'route': 'list[str]',
'leader_name': 'list[object]',
'principal_area': 'list[object]',
'plant': 'list[object]',
'green_long_distance_piste_number': 'list[int]',
'cannon_number': 'list[int]',
'purchasing_power_parity': 'list[str]',
'grid_reference': 'list[str]',
'barangays': 'list[str]',
'bioclimate': 'list[str]',
'dissolution_year': 'list[str]',
'patron_saint': 'list[object]',
'apskritis': 'list[str]',
'area_of_catchment_quote': 'list[str]',
'sea': 'list[object]',
'life_expectancy': 'list[str]',
'tamazight_name': 'list[str]',
'ski_lift': 'list[int]',
'insee_code': 'list[int]',
'governorate': 'list[str]',
'region_link': 'list[str]',
'vice_leader_party': 'list[object]',
'political_seats': 'list[int]',
'artificial_snow_area': 'list[float]',
'located_in_area': 'list[object]',
'address': 'list[str]',
'saint': 'list[object]',
'gnl': 'list[str]',
'licence_number': 'list[str]',
'map_description': 'list[str]',
'infant_mortality': 'list[float]',
'area_metro': 'list[object]',
'number_of_cantons': 'list[int]',
'information_name': 'list[str]',
'information': 'list[str]',
'river': 'list[object]',
'ethnic_group': 'list[object]',
'heritage_register': 'list[object]',
'subdivisions': 'list[int]',
'refcul': 'list[str]',
'italian_name': 'list[str]',
'dissolution_date': 'list[str]',
'added': 'list[str]',
'structural_system': 'list[object]',
'building_end_year': 'list[str]',
'ist': 'list[str]',
'geoloc_department': 'list[object]',
'borough': 'list[object]',
'official_name': 'list[str]',
'maximum_elevation': 'list[float]',
'colonial_name': 'list[str]',
'named_by_language': 'list[object]',
'volume_quote': 'list[str]',
'province_link': 'list[object]',
'parish': 'list[object]',
'old_name': 'list[str]',
'bird': 'list[object]',
'president_general_council_mandate': 'list[str]',
'regional_prefecture': 'list[str]',
'term_of_office': 'list[str]',
'code_settlement': 'list[str]',
'winter_temperature': 'list[float]',
'construction_material': 'list[object]',
'commissioner': 'list[str]',
'refpol': 'list[str]',
'number_of_counties': 'list[int]',
'area': 'list[object]',
'population_quote': 'list[str]',
'biggest_city': 'list[object]',
'nis_code': 'list[object]',
'other_information': 'list[str]',
'opening_year': 'list[str]',
'area_code': 'list[str]',
'average_depth_quote': 'list[str]',
'geologic_period': 'list[str]',
'coast_line': 'list[float]',
'unitary_authority': 'list[object]',
'area_land': 'list[float]',
'population_metro_density': 'list[object]',
'previous_population': 'list[object]',
'iso_code_region': 'list[object]',
'gini_coefficient': 'list[float]',
'neighbour_region': 'list[str]',
'event_date': 'list[str]',
'income': 'list[str]',
'touristic_site': 'list[object]',
'next_entity': 'list[object]',
'political_majority': 'list[object]',
'area_quote': 'list[str]',
'ski_tow': 'list[int]',
'international_phone_prefix': 'list[str]',
'largest_metro': 'list[object]',
'gagaouze': 'list[str]',
'label': 'list[str]',
'iso_code': 'list[str]',
'finnish_name': 'list[str]',
'width_quote': 'list[str]',
'agglomeration_population_year': 'list[str]',
'daylight_saving_time_zone': 'list[object]',
'long_distance_piste_number': 'list[int]',
'political_leader': 'list[object]',
'same_name': 'list[str]',
'agglomeration': 'list[object]',
'red_long_distance_piste_number': 'list[int]',
'area_water': 'list[float]',
'currently_used_for': 'list[str]',
'output': 'list[float]',
'previous_demographics': 'list[object]',
'region_type': 'list[str]',
'police_name': 'list[str]',
'neighboring_municipality': 'list[object]',
'population_pct_children': 'list[int]',
'id': 'str',
'distance_to_charing_cross': 'list[float]',
'lieutenancy': 'list[str]',
'delegate_mayor': 'list[object]',
'rebuilding_year': 'list[str]',
'minimum_elevation': 'list[float]',
'number_of_capital_deputies': 'list[int]',
'ceremonial_county': 'list[object]',
'scotish_name': 'list[str]',
'work_area': 'list[float]',
'watercourse': 'list[str]',
'metropolitan_borough': 'list[object]',
'coast_length': 'list[float]',
'joint_community': 'list[object]',
'ekatte_code': 'list[str]',
'per_capita_income': 'list[float]',
'settlement': 'list[object]',
'sharing_out_population_year': 'list[str]',
'foundation_date': 'list[str]',
'maximum_depth': 'list[float]',
'teryt_code': 'list[object]',
'demolition_year': 'list[str]',
'smallest_country': 'list[object]',
'algerian_name': 'list[str]',
'map': 'list[object]',
'localization_thumbnail_caption': 'list[str]',
'unlc_code': 'list[str]',
'sicilian_name': 'list[str]',
'department_position': 'list[str]',
'population_pct_men': 'list[int]',
'law_country': 'list[str]',
'summer_temperature': 'list[float]',
'area_date': 'list[str]',
'kind_of_coordinate': 'list[str]',
'black_long_distance_piste_number': 'list[int]',
'water_area': 'list[float]',
'frontier_length': 'list[float]',
'tamazight_settlement_name': 'list[str]',
'reopening_date': 'list[str]',
'okato_code': 'list[str]',
'disappearance_date': 'list[str]',
'seating_capacity': 'list[int]',
'population_urban_density': 'list[object]',
'building_type': 'list[object]',
'largest_country': 'list[object]',
'phone_prefix': 'list[int]',
'capital': 'list[object]',
'status_year': 'list[str]',
'flora': 'list[str]',
'agglomeration_area': 'list[object]',
'cornish_name': 'list[str]',
'largest_city': 'list[object]',
'licence_number_label': 'list[str]',
'limit': 'list[str]',
'scots_name': 'list[str]',
'refgeo': 'list[str]',
'refgen': 'list[str]',
'population_as_of': 'list[str]',
'different': 'list[str]',
'emblem': 'list[str]',
'representative': 'list[int]',
'maximum_area_quote': 'list[str]',
'utc_offset': 'list[str]',
'pluviometry': 'list[str]',
'german_name': 'list[str]',
'per_capita_income_rank': 'list[str]',
'ski_piste_kilometre': 'list[float]',
'distance_to_edinburgh': 'list[float]',
'minimum_area': 'list[str]',
'municipality_code': 'list[str]',
'population_rural_density': 'list[float]',
'kabyle_name': 'list[str]',
'red_ski_piste_number': 'list[int]',
'other_name': 'list[str]',
'welsh_name': 'list[str]',
'lake': 'list[object]',
'collectivity_minority': 'list[object]',
'regional_language': 'list[object]',
'chaoui_name': 'list[str]',
'english_name': 'list[str]',
'county_seat': 'list[object]',
'purchasing_power_parity_year': 'list[str]',
'lieutenancy_area': 'list[object]',
'historical_map': 'list[str]',
'people_name': 'list[str]',
'regency': 'list[object]',
'code_municipal_monument': 'list[str]',
'architectural_style': 'list[object]',
'purchasing_power_parity_rank': 'list[str]',
'depth_quote': 'list[str]',
'reopening_year': 'list[str]',
'avifauna_population': 'list[str]',
'construction': 'list[object]',
'land': 'list[object]',
'sharing_out': 'list[str]',
'department': 'list[object]',
'opening_date': 'list[str]',
'other_language': 'list[str]',
'ofs_code': 'list[str]',
'elevation': 'list[float]',
'endangered_since': 'list[str]',
'rank_area': 'list[int]',
'prov_code': 'list[str]',
'visitors_percentage_change': 'list[float]',
'merger_date': 'list[str]',
'seniunija': 'list[str]',
'rebuilding_date': 'list[str]',
'city_since': 'list[str]',
'nuts_code': 'list[str]',
'authority_mandate': 'list[str]',
'gnis_code': 'list[str]',
'deme': 'list[str]',
'maximum_depth_quote': 'list[str]',
'canton': 'list[object]',
'province_iso_code': 'list[str]',
'human_development_index_ranking_category': 'list[object]',
'nation': 'list[str]',
'arrondissement': 'list[object]',
'french_name': 'list[str]',
'supply': 'list[object]',
'agglomeration_population': 'list[object]',
'green_ski_piste_number': 'list[int]',
'province': 'list[object]',
'meaning': 'list[str]',
'leader_party': 'list[object]',
'population_total_ranking': 'list[int]',
'twin_city': 'list[object]',
'sharing_out_population': 'list[int]',
'piscicultural_population': 'list[str]',
'distance_to_dublin': 'list[float]',
'sharing_out_name': 'list[object]',
'land_percentage': 'list[float]',
'visitors_total': 'list[int]',
'elevator_count': 'list[int]',
'population_year': 'list[str]',
'nrhp_type': 'list[object]',
'administrative_collectivity': 'list[object]',
'per_capita_income_as_of': 'list[str]',
'architectual_bureau': 'list[object]',
'circle': 'list[str]',
'occitan_name': 'list[str]',
'blue_long_distance_piste_number': 'list[int]',
'building_start_date': 'list[str]',
'algerian_settlement_name': 'list[str]',
'gross_domestic_product_purchasing_power_parity_per_capita': 'list[object]',
'date_agreement': 'list[str]',
'frazioni': 'list[object]',
'mayor_article': 'list[str]',
'iso31661_code': 'list[str]',
'simc_code': 'list[object]',
'council_area': 'list[object]',
'unesco': 'list[object]',
'gross_domestic_product': 'list[object]',
'gross_domestic_product_rank': 'list[str]',
'distance_to_douglas': 'list[float]',
'visitor_statistics_as_of': 'list[str]',
'number_of_municipalities': 'list[int]',
'coordinates': 'list[str]',
'gini_coefficient_ranking': 'list[int]',
'highest_point': 'list[object]',
'flower': 'list[object]',
'hra_state': 'list[str]',
'depths': 'list[object]',
'cca_state': 'list[str]',
'politic_government_department': 'list[object]',
'currency_code': 'list[str]',
'tu': 'list[str]',
'population_metro': 'list[int]',
'climb_up_number': 'list[int]',
'founding_person': 'list[object]',
'postal_code': 'list[str]',
'land_area': 'list[float]',
'code_national_monument': 'list[str]',
'originally_used_for': 'list[str]',
'president_regional_council_mandate': 'list[str]',
'retention_time': 'list[str]',
'gini_coefficient_category': 'list[object]',
'sardinian_name': 'list[str]',
'features': 'list[object]',
'forester_district': 'list[object]',
'illiteracy': 'list[float]',
'gross_domestic_product_per_people': 'list[str]',
'kind_of_rock': 'list[str]',
'arberisht_name': 'list[str]',
'manx_name': 'list[str]',
'protection_status': 'list[str]',
'fips_code': 'list[str]',
'greek_name': 'list[str]',
'population_density': 'list[object]',
'elevation_quote': 'list[str]',
'outskirts': 'list[str]',
'area_urban': 'list[object]',
'unlo_code': 'list[str]',
'district': 'list[object]',
'merged_settlement': 'list[object]',
'parliament_type': 'list[str]',
'previous_entity': 'list[object]',
'federal_state': 'list[object]',
'maximum_area': 'list[str]',
'demolition_date': 'list[str]',
'population_urban': 'list[int]',
'scottish_name': 'list[str]',
'sovereign_country': 'list[object]',
'phone_prefix_label': 'list[str]',
'official_language': 'list[object]',
'previous_population_total': 'list[int]',
'commune': 'list[object]',
'annual_temperature': 'list[float]',
'description': 'list[str]',
'number_of_state_deputies': 'list[int]',
'average_depth': 'list[str]',
'arabic_name': 'list[str]',
'ski_piste_number': 'list[int]',
'subdivision': 'list[object]',
'human_development_index': 'list[object]',
'alemmanic_name': 'list[str]',
'human_development_index_as_of': 'list[str]',
'capital_coordinates': 'list[str]',
'touareg_name': 'list[str]',
'administrative_head_city': 'list[object]',
'maintained_by': 'list[object]',
'visitors_per_day': 'list[int]',
'kanji_name': 'list[str]',
'blue_ski_piste_number': 'list[int]',
'historical_name': 'list[str]',
'area_rank': 'list[str]',
'first_mention': 'list[str]',
'number_of_visitors_as_of': 'list[str]',
'localization_thumbnail': 'list[object]',
'nrhp_reference_number': 'list[str]',
'cable_car': 'list[int]',
'administrative_district': 'list[object]',
'type': 'list[str]',
'linked_space': 'list[str]',
'lowest_point': 'list[object]',
'daira': 'list[object]',
'number_of_island': 'list[str]',
'cyrillique_name': 'list[str]',
'tenant': 'list[object]',
'catholic_percentage': 'list[str]',
'old_district': 'list[object]',
'area_rural': 'list[float]',
'water_percentage': 'list[float]',
'lowest': 'list[str]',
'sharing_out_population_name': 'list[str]',
'building_end_date': 'list[str]',
'number_of_federal_deputies': 'list[int]',
'map_caption': 'list[str]',
'previous_name': 'list[str]',
'city_link': 'list[str]',
'architect': 'list[object]',
'leader_title': 'list[str]',
'foundation': 'list[str]',
'agglomeration_demographics': 'list[object]',
'calabrian_name': 'list[str]',
'type_coordinate': 'list[str]',
'floor_area': 'list[object]',
'touareg_settlement_name': 'list[str]',
'distance_to_belfast': 'list[float]',
'code_provincial_monument': 'list[str]',
'floor_count': 'list[int]',
'climate': 'list[object]',
'bourgmestre': 'list[object]',
'depth': 'list[float]',
'governing_body': 'list[object]',
'black_ski_piste_number': 'list[int]',
'protestant_percentage': 'list[str]',
'related_places': 'list[object]',
'zip_code': 'list[str]',
'fauna': 'list[str]',
'year_of_construction': 'list[str]',
'subsystem': 'list[str]',
'historical_region': 'list[str]',
'international_phone_prefix_label': 'list[str]',
'minority': 'list[object]',
'space': 'list[int]',
'frioulan_name': 'list[str]',
'reference': 'list[str]',
'code_land_registry': 'list[str]',
'distance_to_cardiff': 'list[float]',
'population_date': 'list[str]',
'dutch_name': 'list[str]',
'day': 'list[str]',
'sheading': 'list[object]',
'local_phone_prefix': 'list[int]',
'population_pct_women': 'list[int]',
'tree': 'list[object]',
'old_province': 'list[object]',
'vehicle_code': 'list[str]',
'water': 'list[str]',
'gross_domestic_product_nominal_per_capita': 'list[object]',
'association_of_local_government': 'list[object]',
'topic': 'list[str]',
'main_island': 'list[object]',
'maori_name': 'list[str]',
'istat': 'list[str]',
'minimum_area_quote': 'list[str]',
'altitude': 'list[object]',
'national_topographic_system_map_number': 'list[str]',
'budget_year': 'list[str]',
'gini_coefficient_as_of': 'list[str]',
'scale': 'list[str]',
'long_distance_piste_kilometre': 'list[float]',
'building_start_year': 'list[str]',
'sub_prefecture': 'list[str]',
'snow_park_number': 'list[int]',
'security': 'list[str]',
'luxembourgish_name': 'list[str]',
'tower_height': 'list[int]',
'area_total': 'list[object]',
'population_total_reference': 'list[object]',
'length_quote': 'list[str]',
'relief': 'list[str]',
'census_year': 'list[str]',
'visitors_per_year': 'list[int]',
'ladin_name': 'list[str]',
'subdivision_link': 'list[str]',
'cost': 'list[float]',
'operated_by': 'list[object]',
'mozabite_name': 'list[str]',
'nearest_city': 'list[object]',
'subsystem_link': 'list[str]',
'whole_area': 'list[object]',
'delegation': 'list[str]',
'vice_leader': 'list[object]',
'demographics': 'list[object]'
}
attribute_map = {
'city_type': 'cityType',
'irish_name': 'irishName',
'reff_bourgmestre': 'reffBourgmestre',
'community_iso_code': 'communityIsoCode',
'anthem': 'anthem',
'rank_agreement': 'rankAgreement',
'wilaya': 'wilaya',
'parliament': 'parliament',
'moldavian_name': 'moldavianName',
'rank_population': 'rankPopulation',
'quote': 'quote',
'initially_used_for': 'initiallyUsedFor',
'commissioner_date': 'commissionerDate',
'demographics_as_of': 'demographicsAsOf',
'largest_settlement': 'largestSettlement',
'distance_to_london': 'distanceToLondon',
'geoloc_dual': 'geolocDual',
'distance_to_capital': 'distanceToCapital',
'subregion': 'subregion',
'sharing_out_area': 'sharingOutArea',
'phone_prefix_name': 'phonePrefixName',
'time_zone': 'timeZone',
'gross_domestic_product_as_of': 'grossDomesticProductAsOf',
'population': 'population',
'senior': 'senior',
'human_development_index_rank': 'humanDevelopmentIndexRank',
'population_rural': 'populationRural',
'gaelic_name': 'gaelicName',
'area_total_ranking': 'areaTotalRanking',
'route': 'route',
'leader_name': 'leaderName',
'principal_area': 'principalArea',
'plant': 'plant',
'green_long_distance_piste_number': 'greenLongDistancePisteNumber',
'cannon_number': 'cannonNumber',
'purchasing_power_parity': 'purchasingPowerParity',
'grid_reference': 'gridReference',
'barangays': 'barangays',
'bioclimate': 'bioclimate',
'dissolution_year': 'dissolutionYear',
'patron_saint': 'patronSaint',
'apskritis': 'apskritis',
'area_of_catchment_quote': 'areaOfCatchmentQuote',
'sea': 'sea',
'life_expectancy': 'lifeExpectancy',
'tamazight_name': 'tamazightName',
'ski_lift': 'skiLift',
'insee_code': 'inseeCode',
'governorate': 'governorate',
'region_link': 'regionLink',
'vice_leader_party': 'viceLeaderParty',
'political_seats': 'politicalSeats',
'artificial_snow_area': 'artificialSnowArea',
'located_in_area': 'locatedInArea',
'address': 'address',
'saint': 'saint',
'gnl': 'gnl',
'licence_number': 'licenceNumber',
'map_description': 'mapDescription',
'infant_mortality': 'infantMortality',
'area_metro': 'areaMetro',
'number_of_cantons': 'numberOfCantons',
'information_name': 'informationName',
'information': 'information',
'river': 'river',
'ethnic_group': 'ethnicGroup',
'heritage_register': 'heritageRegister',
'subdivisions': 'subdivisions',
'refcul': 'refcul',
'italian_name': 'italianName',
'dissolution_date': 'dissolutionDate',
'added': 'added',
'structural_system': 'structuralSystem',
'building_end_year': 'buildingEndYear',
'ist': 'ist',
'geoloc_department': 'geolocDepartment',
'borough': 'borough',
'official_name': 'officialName',
'maximum_elevation': 'maximumElevation',
'colonial_name': 'colonialName',
'named_by_language': 'namedByLanguage',
'volume_quote': 'volumeQuote',
'province_link': 'provinceLink',
'parish': 'parish',
'old_name': 'oldName',
'bird': 'bird',
'president_general_council_mandate': 'presidentGeneralCouncilMandate',
'regional_prefecture': 'regionalPrefecture',
'term_of_office': 'termOfOffice',
'code_settlement': 'codeSettlement',
'winter_temperature': 'winterTemperature',
'construction_material': 'constructionMaterial',
'commissioner': 'commissioner',
'refpol': 'refpol',
'number_of_counties': 'numberOfCounties',
'area': 'area',
'population_quote': 'populationQuote',
'biggest_city': 'biggestCity',
'nis_code': 'nisCode',
'other_information': 'otherInformation',
'opening_year': 'openingYear',
'area_code': 'areaCode',
'average_depth_quote': 'averageDepthQuote',
'geologic_period': 'geologicPeriod',
'coast_line': 'coastLine',
'unitary_authority': 'unitaryAuthority',
'area_land': 'areaLand',
'population_metro_density': 'populationMetroDensity',
'previous_population': 'previousPopulation',
'iso_code_region': 'isoCodeRegion',
'gini_coefficient': 'giniCoefficient',
'neighbour_region': 'neighbourRegion',
'event_date': 'eventDate',
'income': 'income',
'touristic_site': 'touristicSite',
'next_entity': 'nextEntity',
'political_majority': 'politicalMajority',
'area_quote': 'areaQuote',
'ski_tow': 'skiTow',
'international_phone_prefix': 'internationalPhonePrefix',
'largest_metro': 'largestMetro',
'gagaouze': 'gagaouze',
'label': 'label',
'iso_code': 'isoCode',
'finnish_name': 'finnishName',
'width_quote': 'widthQuote',
'agglomeration_population_year': 'agglomerationPopulationYear',
'daylight_saving_time_zone': 'daylightSavingTimeZone',
'long_distance_piste_number': 'longDistancePisteNumber',
'political_leader': 'politicalLeader',
'same_name': 'sameName',
'agglomeration': 'agglomeration',
'red_long_distance_piste_number': 'redLongDistancePisteNumber',
'area_water': 'areaWater',
'currently_used_for': 'currentlyUsedFor',
'output': 'output',
'previous_demographics': 'previousDemographics',
'region_type': 'regionType',
'police_name': 'policeName',
'neighboring_municipality': 'neighboringMunicipality',
'population_pct_children': 'populationPctChildren',
'id': 'id',
'distance_to_charing_cross': 'distanceToCharingCross',
'lieutenancy': 'lieutenancy',
'delegate_mayor': 'delegateMayor',
'rebuilding_year': 'rebuildingYear',
'minimum_elevation': 'minimumElevation',
'number_of_capital_deputies': 'numberOfCapitalDeputies',
'ceremonial_county': 'ceremonialCounty',
'scotish_name': 'scotishName',
'work_area': 'workArea',
'watercourse': 'watercourse',
'metropolitan_borough': 'metropolitanBorough',
'coast_length': 'coastLength',
'joint_community': 'jointCommunity',
'ekatte_code': 'ekatteCode',
'per_capita_income': 'perCapitaIncome',
'settlement': 'settlement',
'sharing_out_population_year': 'sharingOutPopulationYear',
'foundation_date': 'foundationDate',
'maximum_depth': 'maximumDepth',
'teryt_code': 'terytCode',
'demolition_year': 'demolitionYear',
'smallest_country': 'smallestCountry',
'algerian_name': 'algerianName',
'map': 'map',
'localization_thumbnail_caption': 'localizationThumbnailCaption',
'unlc_code': 'unlcCode',
'sicilian_name': 'sicilianName',
'department_position': 'departmentPosition',
'population_pct_men': 'populationPctMen',
'law_country': 'lawCountry',
'summer_temperature': 'summerTemperature',
'area_date': 'areaDate',
'kind_of_coordinate': 'kindOfCoordinate',
'black_long_distance_piste_number': 'blackLongDistancePisteNumber',
'water_area': 'waterArea',
'frontier_length': 'frontierLength',
'tamazight_settlement_name': 'tamazightSettlementName',
'reopening_date': 'reopeningDate',
'okato_code': 'okatoCode',
'disappearance_date': 'disappearanceDate',
'seating_capacity': 'seatingCapacity',
'population_urban_density': 'populationUrbanDensity',
'building_type': 'buildingType',
'largest_country': 'largestCountry',
'phone_prefix': 'phonePrefix',
'capital': 'capital',
'status_year': 'statusYear',
'flora': 'flora',
'agglomeration_area': 'agglomerationArea',
'cornish_name': 'cornishName',
'largest_city': 'largestCity',
'licence_number_label': 'licenceNumberLabel',
'limit': 'limit',
'scots_name': 'scotsName',
'refgeo': 'refgeo',
'refgen': 'refgen',
'population_as_of': 'populationAsOf',
'different': 'different',
'emblem': 'emblem',
'representative': 'representative',
'maximum_area_quote': 'maximumAreaQuote',
'utc_offset': 'utcOffset',
'pluviometry': 'pluviometry',
'german_name': 'germanName',
'per_capita_income_rank': 'perCapitaIncomeRank',
'ski_piste_kilometre': 'skiPisteKilometre',
'distance_to_edinburgh': 'distanceToEdinburgh',
'minimum_area': 'minimumArea',
'municipality_code': 'municipalityCode',
'population_rural_density': 'populationRuralDensity',
'kabyle_name': 'kabyleName',
'red_ski_piste_number': 'redSkiPisteNumber',
'other_name': 'otherName',
'welsh_name': 'welshName',
'lake': 'lake',
'collectivity_minority': 'collectivityMinority',
'regional_language': 'regionalLanguage',
'chaoui_name': 'chaouiName',
'english_name': 'englishName',
'county_seat': 'countySeat',
'purchasing_power_parity_year': 'purchasingPowerParityYear',
'lieutenancy_area': 'lieutenancyArea',
'historical_map': 'historicalMap',
'people_name': 'peopleName',
'regency': 'regency',
'code_municipal_monument': 'codeMunicipalMonument',
'architectural_style': 'architecturalStyle',
'purchasing_power_parity_rank': 'purchasingPowerParityRank',
'depth_quote': 'depthQuote',
'reopening_year': 'reopeningYear',
'avifauna_population': 'avifaunaPopulation',
'construction': 'construction',
'land': 'land',
'sharing_out': 'sharingOut',
'department': 'department',
'opening_date': 'openingDate',
'other_language': 'otherLanguage',
'ofs_code': 'ofsCode',
'elevation': 'elevation',
'endangered_since': 'endangeredSince',
'rank_area': 'rankArea',
'prov_code': 'provCode',
'visitors_percentage_change': 'visitorsPercentageChange',
'merger_date': 'mergerDate',
'seniunija': 'seniunija',
'rebuilding_date': 'rebuildingDate',
'city_since': 'citySince',
'nuts_code': 'nutsCode',
'authority_mandate': 'authorityMandate',
'gnis_code': 'gnisCode',
'deme': 'deme',
'maximum_depth_quote': 'maximumDepthQuote',
'canton': 'canton',
'province_iso_code': 'provinceIsoCode',
'human_development_index_ranking_category': 'humanDevelopmentIndexRankingCategory',
'nation': 'nation',
'arrondissement': 'arrondissement',
'french_name': 'frenchName',
'supply': 'supply',
'agglomeration_population': 'agglomerationPopulation',
'green_ski_piste_number': 'greenSkiPisteNumber',
'province': 'province',
'meaning': 'meaning',
'leader_party': 'leaderParty',
'population_total_ranking': 'populationTotalRanking',
'twin_city': 'twinCity',
'sharing_out_population': 'sharingOutPopulation',
'piscicultural_population': 'pisciculturalPopulation',
'distance_to_dublin': 'distanceToDublin',
'sharing_out_name': 'sharingOutName',
'land_percentage': 'landPercentage',
'visitors_total': 'visitorsTotal',
'elevator_count': 'elevatorCount',
'population_year': 'populationYear',
'nrhp_type': 'nrhpType',
'administrative_collectivity': 'administrativeCollectivity',
'per_capita_income_as_of': 'perCapitaIncomeAsOf',
'architectual_bureau': 'architectualBureau',
'circle': 'circle',
'occitan_name': 'occitanName',
'blue_long_distance_piste_number': 'blueLongDistancePisteNumber',
'building_start_date': 'buildingStartDate',
'algerian_settlement_name': 'algerianSettlementName',
'gross_domestic_product_purchasing_power_parity_per_capita': 'grossDomesticProductPurchasingPowerParityPerCapita',
'date_agreement': 'dateAgreement',
'frazioni': 'frazioni',
'mayor_article': 'mayorArticle',
'iso31661_code': 'iso31661Code',
'simc_code': 'simcCode',
'council_area': 'councilArea',
'unesco': 'unesco',
'gross_domestic_product': 'grossDomesticProduct',
'gross_domestic_product_rank': 'grossDomesticProductRank',
'distance_to_douglas': 'distanceToDouglas',
'visitor_statistics_as_of': 'visitorStatisticsAsOf',
'number_of_municipalities': 'numberOfMunicipalities',
'coordinates': 'coordinates',
'gini_coefficient_ranking': 'giniCoefficientRanking',
'highest_point': 'highestPoint',
'flower': 'flower',
'hra_state': 'hraState',
'depths': 'depths',
'cca_state': 'ccaState',
'politic_government_department': 'politicGovernmentDepartment',
'currency_code': 'currencyCode',
'tu': 'tu',
'population_metro': 'populationMetro',
'climb_up_number': 'climbUpNumber',
'founding_person': 'foundingPerson',
'postal_code': 'postalCode',
'land_area': 'landArea',
'code_national_monument': 'codeNationalMonument',
'originally_used_for': 'originallyUsedFor',
'president_regional_council_mandate': 'presidentRegionalCouncilMandate',
'retention_time': 'retentionTime',
'gini_coefficient_category': 'giniCoefficientCategory',
'sardinian_name': 'sardinianName',
'features': 'features',
'forester_district': 'foresterDistrict',
'illiteracy': 'illiteracy',
'gross_domestic_product_per_people': 'grossDomesticProductPerPeople',
'kind_of_rock': 'kindOfRock',
'arberisht_name': 'arberishtName',
'manx_name': 'manxName',
'protection_status': 'protectionStatus',
'fips_code': 'fipsCode',
'greek_name': 'greekName',
'population_density': 'populationDensity',
'elevation_quote': 'elevationQuote',
'outskirts': 'outskirts',
'area_urban': 'areaUrban',
'unlo_code': 'unloCode',
'district': 'district',
'merged_settlement': 'mergedSettlement',
'parliament_type': 'parliamentType',
'previous_entity': 'previousEntity',
'federal_state': 'federalState',
'maximum_area': 'maximumArea',
'demolition_date': 'demolitionDate',
'population_urban': 'populationUrban',
'scottish_name': 'scottishName',
'sovereign_country': 'sovereignCountry',
'phone_prefix_label': 'phonePrefixLabel',
'official_language': 'officialLanguage',
'previous_population_total': 'previousPopulationTotal',
'commune': 'commune',
'annual_temperature': 'annualTemperature',
'description': 'description',
'number_of_state_deputies': 'numberOfStateDeputies',
'average_depth': 'averageDepth',
'arabic_name': 'arabicName',
'ski_piste_number': 'skiPisteNumber',
'subdivision': 'subdivision',
'human_development_index': 'humanDevelopmentIndex',
'alemmanic_name': 'alemmanicName',
'human_development_index_as_of': 'humanDevelopmentIndexAsOf',
'capital_coordinates': 'capitalCoordinates',
'touareg_name': 'touaregName',
'administrative_head_city': 'administrativeHeadCity',
'maintained_by': 'maintainedBy',
'visitors_per_day': 'visitorsPerDay',
'kanji_name': 'kanjiName',
'blue_ski_piste_number': 'blueSkiPisteNumber',
'historical_name': 'historicalName',
'area_rank': 'areaRank',
'first_mention': 'firstMention',
'number_of_visitors_as_of': 'numberOfVisitorsAsOf',
'localization_thumbnail': 'localizationThumbnail',
'nrhp_reference_number': 'nrhpReferenceNumber',
'cable_car': 'cableCar',
'administrative_district': 'administrativeDistrict',
'type': 'type',
'linked_space': 'linkedSpace',
'lowest_point': 'lowestPoint',
'daira': 'daira',
'number_of_island': 'numberOfIsland',
'cyrillique_name': 'cyrilliqueName',
'tenant': 'tenant',
'catholic_percentage': 'catholicPercentage',
'old_district': 'oldDistrict',
'area_rural': 'areaRural',
'water_percentage': 'waterPercentage',
'lowest': 'lowest',
'sharing_out_population_name': 'sharingOutPopulationName',
'building_end_date': 'buildingEndDate',
'number_of_federal_deputies': 'numberOfFederalDeputies',
'map_caption': 'mapCaption',
'previous_name': 'previousName',
'city_link': 'cityLink',
'architect': 'architect',
'leader_title': 'leaderTitle',
'foundation': 'foundation',
'agglomeration_demographics': 'agglomerationDemographics',
'calabrian_name': 'calabrianName',
'type_coordinate': 'typeCoordinate',
'floor_area': 'floorArea',
'touareg_settlement_name': 'touaregSettlementName',
'distance_to_belfast': 'distanceToBelfast',
'code_provincial_monument': 'codeProvincialMonument',
'floor_count': 'floorCount',
'climate': 'climate',
'bourgmestre': 'bourgmestre',
'depth': 'depth',
'governing_body': 'governingBody',
'black_ski_piste_number': 'blackSkiPisteNumber',
'protestant_percentage': 'protestantPercentage',
'related_places': 'relatedPlaces',
'zip_code': 'zipCode',
'fauna': 'fauna',
'year_of_construction': 'yearOfConstruction',
'subsystem': 'subsystem',
'historical_region': 'historicalRegion',
'international_phone_prefix_label': 'internationalPhonePrefixLabel',
'minority': 'minority',
'space': 'space',
'frioulan_name': 'frioulanName',
'reference': 'reference',
'code_land_registry': 'codeLandRegistry',
'distance_to_cardiff': 'distanceToCardiff',
'population_date': 'populationDate',
'dutch_name': 'dutchName',
'day': 'day',
'sheading': 'sheading',
'local_phone_prefix': 'localPhonePrefix',
'population_pct_women': 'populationPctWomen',
'tree': 'tree',
'old_province': 'oldProvince',
'vehicle_code': 'vehicleCode',
'water': 'water',
'gross_domestic_product_nominal_per_capita': 'grossDomesticProductNominalPerCapita',
'association_of_local_government': 'associationOfLocalGovernment',
'topic': 'topic',
'main_island': 'mainIsland',
'maori_name': 'maoriName',
'istat': 'istat',
'minimum_area_quote': 'minimumAreaQuote',
'altitude': 'altitude',
'national_topographic_system_map_number': 'nationalTopographicSystemMapNumber',
'budget_year': 'budgetYear',
'gini_coefficient_as_of': 'giniCoefficientAsOf',
'scale': 'scale',
'long_distance_piste_kilometre': 'longDistancePisteKilometre',
'building_start_year': 'buildingStartYear',
'sub_prefecture': 'subPrefecture',
'snow_park_number': 'snowParkNumber',
'security': 'security',
'luxembourgish_name': 'luxembourgishName',
'tower_height': 'towerHeight',
'area_total': 'areaTotal',
'population_total_reference': 'populationTotalReference',
'length_quote': 'lengthQuote',
'relief': 'relief',
'census_year': 'censusYear',
'visitors_per_year': 'visitorsPerYear',
'ladin_name': 'ladinName',
'subdivision_link': 'subdivisionLink',
'cost': 'cost',
'operated_by': 'operatedBy',
'mozabite_name': 'mozabiteName',
'nearest_city': 'nearestCity',
'subsystem_link': 'subsystemLink',
'whole_area': 'wholeArea',
'delegation': 'delegation',
'vice_leader': 'viceLeader',
'demographics': 'demographics'
}
def __init__(self, city_type=None, irish_name=None, reff_bourgmestre=None, community_iso_code=None, anthem=None, rank_agreement=None, wilaya=None, parliament=None, moldavian_name=None, rank_population=None, quote=None, initially_used_for=None, commissioner_date=None, demographics_as_of=None, largest_settlement=None, distance_to_london=None, geoloc_dual=None, distance_to_capital=None, subregion=None, sharing_out_area=None, phone_prefix_name=None, time_zone=None, gross_domestic_product_as_of=None, population=None, senior=None, human_development_index_rank=None, population_rural=None, gaelic_name=None, area_total_ranking=None, route=None, leader_name=None, principal_area=None, plant=None, green_long_distance_piste_number=None, cannon_number=None, purchasing_power_parity=None, grid_reference=None, barangays=None, bioclimate=None, dissolution_year=None, patron_saint=None, apskritis=None, area_of_catchment_quote=None, sea=None, life_expectancy=None, tamazight_name=None, ski_lift=None, insee_code=None, governorate=None, region_link=None, vice_leader_party=None, political_seats=None, artificial_snow_area=None, located_in_area=None, address=None, saint=None, gnl=None, licence_number=None, map_description=None, infant_mortality=None, area_metro=None, number_of_cantons=None, information_name=None, information=None, river=None, ethnic_group=None, heritage_register=None, subdivisions=None, refcul=None, italian_name=None, dissolution_date=None, added=None, structural_system=None, building_end_year=None, ist=None, geoloc_department=None, borough=None, official_name=None, maximum_elevation=None, colonial_name=None, named_by_language=None, volume_quote=None, province_link=None, parish=None, old_name=None, bird=None, president_general_council_mandate=None, regional_prefecture=None, term_of_office=None, code_settlement=None, winter_temperature=None, construction_material=None, commissioner=None, refpol=None, number_of_counties=None, area=None, population_quote=None, biggest_city=None, nis_code=None, other_information=None, opening_year=None, area_code=None, average_depth_quote=None, geologic_period=None, coast_line=None, unitary_authority=None, area_land=None, population_metro_density=None, previous_population=None, iso_code_region=None, gini_coefficient=None, neighbour_region=None, event_date=None, income=None, touristic_site=None, next_entity=None, political_majority=None, area_quote=None, ski_tow=None, international_phone_prefix=None, largest_metro=None, gagaouze=None, label=None, iso_code=None, finnish_name=None, width_quote=None, agglomeration_population_year=None, daylight_saving_time_zone=None, long_distance_piste_number=None, political_leader=None, same_name=None, agglomeration=None, red_long_distance_piste_number=None, area_water=None, currently_used_for=None, output=None, previous_demographics=None, region_type=None, police_name=None, neighboring_municipality=None, population_pct_children=None, id=None, distance_to_charing_cross=None, lieutenancy=None, delegate_mayor=None, rebuilding_year=None, minimum_elevation=None, number_of_capital_deputies=None, ceremonial_county=None, scotish_name=None, work_area=None, watercourse=None, metropolitan_borough=None, coast_length=None, joint_community=None, ekatte_code=None, per_capita_income=None, settlement=None, sharing_out_population_year=None, foundation_date=None, maximum_depth=None, teryt_code=None, demolition_year=None, smallest_country=None, algerian_name=None, map=None, localization_thumbnail_caption=None, unlc_code=None, sicilian_name=None, department_position=None, population_pct_men=None, law_country=None, summer_temperature=None, area_date=None, kind_of_coordinate=None, black_long_distance_piste_number=None, water_area=None, frontier_length=None, tamazight_settlement_name=None, reopening_date=None, okato_code=None, disappearance_date=None, seating_capacity=None, population_urban_density=None, building_type=None, largest_country=None, phone_prefix=None, capital=None, status_year=None, flora=None, agglomeration_area=None, cornish_name=None, largest_city=None, licence_number_label=None, limit=None, scots_name=None, refgeo=None, refgen=None, population_as_of=None, different=None, emblem=None, representative=None, maximum_area_quote=None, utc_offset=None, pluviometry=None, german_name=None, per_capita_income_rank=None, ski_piste_kilometre=None, distance_to_edinburgh=None, minimum_area=None, municipality_code=None, population_rural_density=None, kabyle_name=None, red_ski_piste_number=None, other_name=None, welsh_name=None, lake=None, collectivity_minority=None, regional_language=None, chaoui_name=None, english_name=None, county_seat=None, purchasing_power_parity_year=None, lieutenancy_area=None, historical_map=None, people_name=None, regency=None, code_municipal_monument=None, architectural_style=None, purchasing_power_parity_rank=None, depth_quote=None, reopening_year=None, avifauna_population=None, construction=None, land=None, sharing_out=None, department=None, opening_date=None, other_language=None, ofs_code=None, elevation=None, endangered_since=None, rank_area=None, prov_code=None, visitors_percentage_change=None, merger_date=None, seniunija=None, rebuilding_date=None, city_since=None, nuts_code=None, authority_mandate=None, gnis_code=None, deme=None, maximum_depth_quote=None, canton=None, province_iso_code=None, human_development_index_ranking_category=None, nation=None, arrondissement=None, french_name=None, supply=None, agglomeration_population=None, green_ski_piste_number=None, province=None, meaning=None, leader_party=None, population_total_ranking=None, twin_city=None, sharing_out_population=None, piscicultural_population=None, distance_to_dublin=None, sharing_out_name=None, land_percentage=None, visitors_total=None, elevator_count=None, population_year=None, nrhp_type=None, administrative_collectivity=None, per_capita_income_as_of=None, architectual_bureau=None, circle=None, occitan_name=None, blue_long_distance_piste_number=None, building_start_date=None, algerian_settlement_name=None, gross_domestic_product_purchasing_power_parity_per_capita=None, date_agreement=None, frazioni=None, mayor_article=None, iso31661_code=None, simc_code=None, council_area=None, unesco=None, gross_domestic_product=None, gross_domestic_product_rank=None, distance_to_douglas=None, visitor_statistics_as_of=None, number_of_municipalities=None, coordinates=None, gini_coefficient_ranking=None, highest_point=None, flower=None, hra_state=None, depths=None, cca_state=None, politic_government_department=None, currency_code=None, tu=None, population_metro=None, climb_up_number=None, founding_person=None, postal_code=None, land_area=None, code_national_monument=None, originally_used_for=None, president_regional_council_mandate=None, retention_time=None, gini_coefficient_category=None, sardinian_name=None, features=None, forester_district=None, illiteracy=None, gross_domestic_product_per_people=None, kind_of_rock=None, arberisht_name=None, manx_name=None, protection_status=None, fips_code=None, greek_name=None, population_density=None, elevation_quote=None, outskirts=None, area_urban=None, unlo_code=None, district=None, merged_settlement=None, parliament_type=None, previous_entity=None, federal_state=None, maximum_area=None, demolition_date=None, population_urban=None, scottish_name=None, sovereign_country=None, phone_prefix_label=None, official_language=None, previous_population_total=None, commune=None, annual_temperature=None, description=None, number_of_state_deputies=None, average_depth=None, arabic_name=None, ski_piste_number=None, subdivision=None, human_development_index=None, alemmanic_name=None, human_development_index_as_of=None, capital_coordinates=None, touareg_name=None, administrative_head_city=None, maintained_by=None, visitors_per_day=None, kanji_name=None, blue_ski_piste_number=None, historical_name=None, area_rank=None, first_mention=None, number_of_visitors_as_of=None, localization_thumbnail=None, nrhp_reference_number=None, cable_car=None, administrative_district=None, type=None, linked_space=None, lowest_point=None, daira=None, number_of_island=None, cyrillique_name=None, tenant=None, catholic_percentage=None, old_district=None, area_rural=None, water_percentage=None, lowest=None, sharing_out_population_name=None, building_end_date=None, number_of_federal_deputies=None, map_caption=None, previous_name=None, city_link=None, architect=None, leader_title=None, foundation=None, agglomeration_demographics=None, calabrian_name=None, type_coordinate=None, floor_area=None, touareg_settlement_name=None, distance_to_belfast=None, code_provincial_monument=None, floor_count=None, climate=None, bourgmestre=None, depth=None, governing_body=None, black_ski_piste_number=None, protestant_percentage=None, related_places=None, zip_code=None, fauna=None, year_of_construction=None, subsystem=None, historical_region=None, international_phone_prefix_label=None, minority=None, space=None, frioulan_name=None, reference=None, code_land_registry=None, distance_to_cardiff=None, population_date=None, dutch_name=None, day=None, sheading=None, local_phone_prefix=None, population_pct_women=None, tree=None, old_province=None, vehicle_code=None, water=None, gross_domestic_product_nominal_per_capita=None, association_of_local_government=None, topic=None, main_island=None, maori_name=None, istat=None, minimum_area_quote=None, altitude=None, national_topographic_system_map_number=None, budget_year=None, gini_coefficient_as_of=None, scale=None, long_distance_piste_kilometre=None, building_start_year=None, sub_prefecture=None, snow_park_number=None, security=None, luxembourgish_name=None, tower_height=None, area_total=None, population_total_reference=None, length_quote=None, relief=None, census_year=None, visitors_per_year=None, ladin_name=None, subdivision_link=None, cost=None, operated_by=None, mozabite_name=None, nearest_city=None, subsystem_link=None, whole_area=None, delegation=None, vice_leader=None, demographics=None, local_vars_configuration=None): # noqa: E501
"""HistoricPlace - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._city_type = None
self._irish_name = None
self._reff_bourgmestre = None
self._community_iso_code = None
self._anthem = None
self._rank_agreement = None
self._wilaya = None
self._parliament = None
self._moldavian_name = None
self._rank_population = None
self._quote = None
self._initially_used_for = None
self._commissioner_date = None
self._demographics_as_of = None
self._largest_settlement = None
self._distance_to_london = None
self._geoloc_dual = None
self._distance_to_capital = None
self._subregion = None
self._sharing_out_area = None
self._phone_prefix_name = None
self._time_zone = None
self._gross_domestic_product_as_of = None
self._population = None
self._senior = None
self._human_development_index_rank = None
self._population_rural = None
self._gaelic_name = None
self._area_total_ranking = None
self._route = None
self._leader_name = None
self._principal_area = None
self._plant = None
self._green_long_distance_piste_number = None
self._cannon_number = None
self._purchasing_power_parity = None
self._grid_reference = None
self._barangays = None
self._bioclimate = None
self._dissolution_year = None
self._patron_saint = None
self._apskritis = None
self._area_of_catchment_quote = None
self._sea = None
self._life_expectancy = None
self._tamazight_name = None
self._ski_lift = None
self._insee_code = None
self._governorate = None
self._region_link = None
self._vice_leader_party = None
self._political_seats = None
self._artificial_snow_area = None
self._located_in_area = None
self._address = None
self._saint = None
self._gnl = None
self._licence_number = None
self._map_description = None
self._infant_mortality = None
self._area_metro = None
self._number_of_cantons = None
self._information_name = None
self._information = None
self._river = None
self._ethnic_group = None
self._heritage_register = None
self._subdivisions = None
self._refcul = None
self._italian_name = None
self._dissolution_date = None
self._added = None
self._structural_system = None
self._building_end_year = None
self._ist = None
self._geoloc_department = None
self._borough = None
self._official_name = None
self._maximum_elevation = None
self._colonial_name = None
self._named_by_language = None
self._volume_quote = None
self._province_link = None
self._parish = None
self._old_name = None
self._bird = None
self._president_general_council_mandate = None
self._regional_prefecture = None
self._term_of_office = None
self._code_settlement = None
self._winter_temperature = None
self._construction_material = None
self._commissioner = None
self._refpol = None
self._number_of_counties = None
self._area = None
self._population_quote = None
self._biggest_city = None
self._nis_code = None
self._other_information = None
self._opening_year = None
self._area_code = None
self._average_depth_quote = None
self._geologic_period = None
self._coast_line = None
self._unitary_authority = None
self._area_land = None
self._population_metro_density = None
self._previous_population = None
self._iso_code_region = None
self._gini_coefficient = None
self._neighbour_region = None
self._event_date = None
self._income = None
self._touristic_site = None
self._next_entity = None
self._political_majority = None
self._area_quote = None
self._ski_tow = None
self._international_phone_prefix = None
self._largest_metro = None
self._gagaouze = None
self._label = None
self._iso_code = None
self._finnish_name = None
self._width_quote = None
self._agglomeration_population_year = None
self._daylight_saving_time_zone = None
self._long_distance_piste_number = None
self._political_leader = None
self._same_name = None
self._agglomeration = None
self._red_long_distance_piste_number = None
self._area_water = None
self._currently_used_for = None
self._output = None
self._previous_demographics = None
self._region_type = None
self._police_name = None
self._neighboring_municipality = None
self._population_pct_children = None
self._id = None
self._distance_to_charing_cross = None
self._lieutenancy = None
self._delegate_mayor = None
self._rebuilding_year = None
self._minimum_elevation = None
self._number_of_capital_deputies = None
self._ceremonial_county = None
self._scotish_name = None
self._work_area = None
self._watercourse = None
self._metropolitan_borough = None
self._coast_length = None
self._joint_community = None
self._ekatte_code = None
self._per_capita_income = None
self._settlement = None
self._sharing_out_population_year = None
self._foundation_date = None
self._maximum_depth = None
self._teryt_code = None
self._demolition_year = None
self._smallest_country = None
self._algerian_name = None
self._map = None
self._localization_thumbnail_caption = None
self._unlc_code = None
self._sicilian_name = None
self._department_position = None
self._population_pct_men = None
self._law_country = None
self._summer_temperature = None
self._area_date = None
self._kind_of_coordinate = None
self._black_long_distance_piste_number = None
self._water_area = None
self._frontier_length = None
self._tamazight_settlement_name = None
self._reopening_date = None
self._okato_code = None
self._disappearance_date = None
self._seating_capacity = None
self._population_urban_density = None
self._building_type = None
self._largest_country = None
self._phone_prefix = None
self._capital = None
self._status_year = None
self._flora = None
self._agglomeration_area = None
self._cornish_name = None
self._largest_city = None
self._licence_number_label = None
self._limit = None
self._scots_name = None
self._refgeo = None
self._refgen = None
self._population_as_of = None
self._different = None
self._emblem = None
self._representative = None
self._maximum_area_quote = None
self._utc_offset = None
self._pluviometry = None
self._german_name = None
self._per_capita_income_rank = None
self._ski_piste_kilometre = None
self._distance_to_edinburgh = None
self._minimum_area = None
self._municipality_code = None
self._population_rural_density = None
self._kabyle_name = None
self._red_ski_piste_number = None
self._other_name = None
self._welsh_name = None
self._lake = None
self._collectivity_minority = None
self._regional_language = None
self._chaoui_name = None
self._english_name = None
self._county_seat = None
self._purchasing_power_parity_year = None
self._lieutenancy_area = None
self._historical_map = None
self._people_name = None
self._regency = None
self._code_municipal_monument = None
self._architectural_style = None
self._purchasing_power_parity_rank = None
self._depth_quote = None
self._reopening_year = None
self._avifauna_population = None
self._construction = None
self._land = None
self._sharing_out = None
self._department = None
self._opening_date = None
self._other_language = None
self._ofs_code = None
self._elevation = None
self._endangered_since = None
self._rank_area = None
self._prov_code = None
self._visitors_percentage_change = None
self._merger_date = None
self._seniunija = None
self._rebuilding_date = None
self._city_since = None
self._nuts_code = None
self._authority_mandate = None
self._gnis_code = None
self._deme = None
self._maximum_depth_quote = None
self._canton = None
self._province_iso_code = None
self._human_development_index_ranking_category = None
self._nation = None
self._arrondissement = None
self._french_name = None
self._supply = None
self._agglomeration_population = None
self._green_ski_piste_number = None
self._province = None
self._meaning = None
self._leader_party = None
self._population_total_ranking = None
self._twin_city = None
self._sharing_out_population = None
self._piscicultural_population = None
self._distance_to_dublin = None
self._sharing_out_name = None
self._land_percentage = None
self._visitors_total = None
self._elevator_count = None
self._population_year = None
self._nrhp_type = None
self._administrative_collectivity = None
self._per_capita_income_as_of = None
self._architectual_bureau = None
self._circle = None
self._occitan_name = None
self._blue_long_distance_piste_number = None
self._building_start_date = None
self._algerian_settlement_name = None
self._gross_domestic_product_purchasing_power_parity_per_capita = None
self._date_agreement = None
self._frazioni = None
self._mayor_article = None
self._iso31661_code = None
self._simc_code = None
self._council_area = None
self._unesco = None
self._gross_domestic_product = None
self._gross_domestic_product_rank = None
self._distance_to_douglas = None
self._visitor_statistics_as_of = None
self._number_of_municipalities = None
self._coordinates = None
self._gini_coefficient_ranking = None
self._highest_point = None
self._flower = None
self._hra_state = None
self._depths = None
self._cca_state = None
self._politic_government_department = None
self._currency_code = None
self._tu = None
self._population_metro = None
self._climb_up_number = None
self._founding_person = None
self._postal_code = None
self._land_area = None
self._code_national_monument = None
self._originally_used_for = None
self._president_regional_council_mandate = None
self._retention_time = None
self._gini_coefficient_category = None
self._sardinian_name = None
self._features = None
self._forester_district = None
self._illiteracy = None
self._gross_domestic_product_per_people = None
self._kind_of_rock = None
self._arberisht_name = None
self._manx_name = None
self._protection_status = None
self._fips_code = None
self._greek_name = None
self._population_density = None
self._elevation_quote = None
self._outskirts = None
self._area_urban = None
self._unlo_code = None
self._district = None
self._merged_settlement = None
self._parliament_type = None
self._previous_entity = None
self._federal_state = None
self._maximum_area = None
self._demolition_date = None
self._population_urban = None
self._scottish_name = None
self._sovereign_country = None
self._phone_prefix_label = None
self._official_language = None
self._previous_population_total = None
self._commune = None
self._annual_temperature = None
self._description = None
self._number_of_state_deputies = None
self._average_depth = None
self._arabic_name = None
self._ski_piste_number = None
self._subdivision = None
self._human_development_index = None
self._alemmanic_name = None
self._human_development_index_as_of = None
self._capital_coordinates = None
self._touareg_name = None
self._administrative_head_city = None
self._maintained_by = None
self._visitors_per_day = None
self._kanji_name = None
self._blue_ski_piste_number = None
self._historical_name = None
self._area_rank = None
self._first_mention = None
self._number_of_visitors_as_of = None
self._localization_thumbnail = None
self._nrhp_reference_number = None
self._cable_car = None
self._administrative_district = None
self._type = None
self._linked_space = None
self._lowest_point = None
self._daira = None
self._number_of_island = None
self._cyrillique_name = None
self._tenant = None
self._catholic_percentage = None
self._old_district = None
self._area_rural = None
self._water_percentage = None
self._lowest = None
self._sharing_out_population_name = None
self._building_end_date = None
self._number_of_federal_deputies = None
self._map_caption = None
self._previous_name = None
self._city_link = None
self._architect = None
self._leader_title = None
self._foundation = None
self._agglomeration_demographics = None
self._calabrian_name = None
self._type_coordinate = None
self._floor_area = None
self._touareg_settlement_name = None
self._distance_to_belfast = None
self._code_provincial_monument = None
self._floor_count = None
self._climate = None
self._bourgmestre = None
self._depth = None
self._governing_body = None
self._black_ski_piste_number = None
self._protestant_percentage = None
self._related_places = None
self._zip_code = None
self._fauna = None
self._year_of_construction = None
self._subsystem = None
self._historical_region = None
self._international_phone_prefix_label = None
self._minority = None
self._space = None
self._frioulan_name = None
self._reference = None
self._code_land_registry = None
self._distance_to_cardiff = None
self._population_date = None
self._dutch_name = None
self._day = None
self._sheading = None
self._local_phone_prefix = None
self._population_pct_women = None
self._tree = None
self._old_province = None
self._vehicle_code = None
self._water = None
self._gross_domestic_product_nominal_per_capita = None
self._association_of_local_government = None
self._topic = None
self._main_island = None
self._maori_name = None
self._istat = None
self._minimum_area_quote = None
self._altitude = None
self._national_topographic_system_map_number = None
self._budget_year = None
self._gini_coefficient_as_of = None
self._scale = None
self._long_distance_piste_kilometre = None
self._building_start_year = None
self._sub_prefecture = None
self._snow_park_number = None
self._security = None
self._luxembourgish_name = None
self._tower_height = None
self._area_total = None
self._population_total_reference = None
self._length_quote = None
self._relief = None
self._census_year = None
self._visitors_per_year = None
self._ladin_name = None
self._subdivision_link = None
self._cost = None
self._operated_by = None
self._mozabite_name = None
self._nearest_city = None
self._subsystem_link = None
self._whole_area = None
self._delegation = None
self._vice_leader = None
self._demographics = None
self.discriminator = None
self.city_type = city_type
self.irish_name = irish_name
self.reff_bourgmestre = reff_bourgmestre
self.community_iso_code = community_iso_code
self.anthem = anthem
self.rank_agreement = rank_agreement
self.wilaya = wilaya
self.parliament = parliament
self.moldavian_name = moldavian_name
self.rank_population = rank_population
self.quote = quote
self.initially_used_for = initially_used_for
self.commissioner_date = commissioner_date
self.demographics_as_of = demographics_as_of
self.largest_settlement = largest_settlement
self.distance_to_london = distance_to_london
self.geoloc_dual = geoloc_dual
self.distance_to_capital = distance_to_capital
self.subregion = subregion
self.sharing_out_area = sharing_out_area
self.phone_prefix_name = phone_prefix_name
self.time_zone = time_zone
self.gross_domestic_product_as_of = gross_domestic_product_as_of
self.population = population
self.senior = senior
self.human_development_index_rank = human_development_index_rank
self.population_rural = population_rural
self.gaelic_name = gaelic_name
self.area_total_ranking = area_total_ranking
self.route = route
self.leader_name = leader_name
self.principal_area = principal_area
self.plant = plant
self.green_long_distance_piste_number = green_long_distance_piste_number
self.cannon_number = cannon_number
self.purchasing_power_parity = purchasing_power_parity
self.grid_reference = grid_reference
self.barangays = barangays
self.bioclimate = bioclimate
self.dissolution_year = dissolution_year
self.patron_saint = patron_saint
self.apskritis = apskritis
self.area_of_catchment_quote = area_of_catchment_quote
self.sea = sea
self.life_expectancy = life_expectancy
self.tamazight_name = tamazight_name
self.ski_lift = ski_lift
self.insee_code = insee_code
self.governorate = governorate
self.region_link = region_link
self.vice_leader_party = vice_leader_party
self.political_seats = political_seats
self.artificial_snow_area = artificial_snow_area
self.located_in_area = located_in_area
self.address = address
self.saint = saint
self.gnl = gnl
self.licence_number = licence_number
self.map_description = map_description
self.infant_mortality = infant_mortality
self.area_metro = area_metro
self.number_of_cantons = number_of_cantons
self.information_name = information_name
self.information = information
self.river = river
self.ethnic_group = ethnic_group
self.heritage_register = heritage_register
self.subdivisions = subdivisions
self.refcul = refcul
self.italian_name = italian_name
self.dissolution_date = dissolution_date
self.added = added
self.structural_system = structural_system
self.building_end_year = building_end_year
self.ist = ist
self.geoloc_department = geoloc_department
self.borough = borough
self.official_name = official_name
self.maximum_elevation = maximum_elevation
self.colonial_name = colonial_name
self.named_by_language = named_by_language
self.volume_quote = volume_quote
self.province_link = province_link
self.parish = parish
self.old_name = old_name
self.bird = bird
self.president_general_council_mandate = president_general_council_mandate
self.regional_prefecture = regional_prefecture
self.term_of_office = term_of_office
self.code_settlement = code_settlement
self.winter_temperature = winter_temperature
self.construction_material = construction_material
self.commissioner = commissioner
self.refpol = refpol
self.number_of_counties = number_of_counties
self.area = area
self.population_quote = population_quote
self.biggest_city = biggest_city
self.nis_code = nis_code
self.other_information = other_information
self.opening_year = opening_year
self.area_code = area_code
self.average_depth_quote = average_depth_quote
self.geologic_period = geologic_period
self.coast_line = coast_line
self.unitary_authority = unitary_authority
self.area_land = area_land
self.population_metro_density = population_metro_density
self.previous_population = previous_population
self.iso_code_region = iso_code_region
self.gini_coefficient = gini_coefficient
self.neighbour_region = neighbour_region
self.event_date = event_date
self.income = income
self.touristic_site = touristic_site
self.next_entity = next_entity
self.political_majority = political_majority
self.area_quote = area_quote
self.ski_tow = ski_tow
self.international_phone_prefix = international_phone_prefix
self.largest_metro = largest_metro
self.gagaouze = gagaouze
self.label = label
self.iso_code = iso_code
self.finnish_name = finnish_name
self.width_quote = width_quote
self.agglomeration_population_year = agglomeration_population_year
self.daylight_saving_time_zone = daylight_saving_time_zone
self.long_distance_piste_number = long_distance_piste_number
self.political_leader = political_leader
self.same_name = same_name
self.agglomeration = agglomeration
self.red_long_distance_piste_number = red_long_distance_piste_number
self.area_water = area_water
self.currently_used_for = currently_used_for
self.output = output
self.previous_demographics = previous_demographics
self.region_type = region_type
self.police_name = police_name
self.neighboring_municipality = neighboring_municipality
self.population_pct_children = population_pct_children
if id is not None:
self.id = id
self.distance_to_charing_cross = distance_to_charing_cross
self.lieutenancy = lieutenancy
self.delegate_mayor = delegate_mayor
self.rebuilding_year = rebuilding_year
self.minimum_elevation = minimum_elevation
self.number_of_capital_deputies = number_of_capital_deputies
self.ceremonial_county = ceremonial_county
self.scotish_name = scotish_name
self.work_area = work_area
self.watercourse = watercourse
self.metropolitan_borough = metropolitan_borough
self.coast_length = coast_length
self.joint_community = joint_community
self.ekatte_code = ekatte_code
self.per_capita_income = per_capita_income
self.settlement = settlement
self.sharing_out_population_year = sharing_out_population_year
self.foundation_date = foundation_date
self.maximum_depth = maximum_depth
self.teryt_code = teryt_code
self.demolition_year = demolition_year
self.smallest_country = smallest_country
self.algerian_name = algerian_name
self.map = map
self.localization_thumbnail_caption = localization_thumbnail_caption
self.unlc_code = unlc_code
self.sicilian_name = sicilian_name
self.department_position = department_position
self.population_pct_men = population_pct_men
self.law_country = law_country
self.summer_temperature = summer_temperature
self.area_date = area_date
self.kind_of_coordinate = kind_of_coordinate
self.black_long_distance_piste_number = black_long_distance_piste_number
self.water_area = water_area
self.frontier_length = frontier_length
self.tamazight_settlement_name = tamazight_settlement_name
self.reopening_date = reopening_date
self.okato_code = okato_code
self.disappearance_date = disappearance_date
self.seating_capacity = seating_capacity
self.population_urban_density = population_urban_density
self.building_type = building_type
self.largest_country = largest_country
self.phone_prefix = phone_prefix
self.capital = capital
self.status_year = status_year
self.flora = flora
self.agglomeration_area = agglomeration_area
self.cornish_name = cornish_name
self.largest_city = largest_city
self.licence_number_label = licence_number_label
self.limit = limit
self.scots_name = scots_name
self.refgeo = refgeo
self.refgen = refgen
self.population_as_of = population_as_of
self.different = different
self.emblem = emblem
self.representative = representative
self.maximum_area_quote = maximum_area_quote
self.utc_offset = utc_offset
self.pluviometry = pluviometry
self.german_name = german_name
self.per_capita_income_rank = per_capita_income_rank
self.ski_piste_kilometre = ski_piste_kilometre
self.distance_to_edinburgh = distance_to_edinburgh
self.minimum_area = minimum_area
self.municipality_code = municipality_code
self.population_rural_density = population_rural_density
self.kabyle_name = kabyle_name
self.red_ski_piste_number = red_ski_piste_number
self.other_name = other_name
self.welsh_name = welsh_name
self.lake = lake
self.collectivity_minority = collectivity_minority
self.regional_language = regional_language
self.chaoui_name = chaoui_name
self.english_name = english_name
self.county_seat = county_seat
self.purchasing_power_parity_year = purchasing_power_parity_year
self.lieutenancy_area = lieutenancy_area
self.historical_map = historical_map
self.people_name = people_name
self.regency = regency
self.code_municipal_monument = code_municipal_monument
self.architectural_style = architectural_style
self.purchasing_power_parity_rank = purchasing_power_parity_rank
self.depth_quote = depth_quote
self.reopening_year = reopening_year
self.avifauna_population = avifauna_population
self.construction = construction
self.land = land
self.sharing_out = sharing_out
self.department = department
self.opening_date = opening_date
self.other_language = other_language
self.ofs_code = ofs_code
self.elevation = elevation
self.endangered_since = endangered_since
self.rank_area = rank_area
self.prov_code = prov_code
self.visitors_percentage_change = visitors_percentage_change
self.merger_date = merger_date
self.seniunija = seniunija
self.rebuilding_date = rebuilding_date
self.city_since = city_since
self.nuts_code = nuts_code
self.authority_mandate = authority_mandate
self.gnis_code = gnis_code
self.deme = deme
self.maximum_depth_quote = maximum_depth_quote
self.canton = canton
self.province_iso_code = province_iso_code
self.human_development_index_ranking_category = human_development_index_ranking_category
self.nation = nation
self.arrondissement = arrondissement
self.french_name = french_name
self.supply = supply
self.agglomeration_population = agglomeration_population
self.green_ski_piste_number = green_ski_piste_number
self.province = province
self.meaning = meaning
self.leader_party = leader_party
self.population_total_ranking = population_total_ranking
self.twin_city = twin_city
self.sharing_out_population = sharing_out_population
self.piscicultural_population = piscicultural_population
self.distance_to_dublin = distance_to_dublin
self.sharing_out_name = sharing_out_name
self.land_percentage = land_percentage
self.visitors_total = visitors_total
self.elevator_count = elevator_count
self.population_year = population_year
self.nrhp_type = nrhp_type
self.administrative_collectivity = administrative_collectivity
self.per_capita_income_as_of = per_capita_income_as_of
self.architectual_bureau = architectual_bureau
self.circle = circle
self.occitan_name = occitan_name
self.blue_long_distance_piste_number = blue_long_distance_piste_number
self.building_start_date = building_start_date
self.algerian_settlement_name = algerian_settlement_name
self.gross_domestic_product_purchasing_power_parity_per_capita = gross_domestic_product_purchasing_power_parity_per_capita
self.date_agreement = date_agreement
self.frazioni = frazioni
self.mayor_article = mayor_article
self.iso31661_code = iso31661_code
self.simc_code = simc_code
self.council_area = council_area
self.unesco = unesco
self.gross_domestic_product = gross_domestic_product
self.gross_domestic_product_rank = gross_domestic_product_rank
self.distance_to_douglas = distance_to_douglas
self.visitor_statistics_as_of = visitor_statistics_as_of
self.number_of_municipalities = number_of_municipalities
self.coordinates = coordinates
self.gini_coefficient_ranking = gini_coefficient_ranking
self.highest_point = highest_point
self.flower = flower
self.hra_state = hra_state
self.depths = depths
self.cca_state = cca_state
self.politic_government_department = politic_government_department
self.currency_code = currency_code
self.tu = tu
self.population_metro = population_metro
self.climb_up_number = climb_up_number
self.founding_person = founding_person
self.postal_code = postal_code
self.land_area = land_area
self.code_national_monument = code_national_monument
self.originally_used_for = originally_used_for
self.president_regional_council_mandate = president_regional_council_mandate
self.retention_time = retention_time
self.gini_coefficient_category = gini_coefficient_category
self.sardinian_name = sardinian_name
self.features = features
self.forester_district = forester_district
self.illiteracy = illiteracy
self.gross_domestic_product_per_people = gross_domestic_product_per_people
self.kind_of_rock = kind_of_rock
self.arberisht_name = arberisht_name
self.manx_name = manx_name
self.protection_status = protection_status
self.fips_code = fips_code
self.greek_name = greek_name
self.population_density = population_density
self.elevation_quote = elevation_quote
self.outskirts = outskirts
self.area_urban = area_urban
self.unlo_code = unlo_code
self.district = district
self.merged_settlement = merged_settlement
self.parliament_type = parliament_type
self.previous_entity = previous_entity
self.federal_state = federal_state
self.maximum_area = maximum_area
self.demolition_date = demolition_date
self.population_urban = population_urban
self.scottish_name = scottish_name
self.sovereign_country = sovereign_country
self.phone_prefix_label = phone_prefix_label
self.official_language = official_language
self.previous_population_total = previous_population_total
self.commune = commune
self.annual_temperature = annual_temperature
self.description = description
self.number_of_state_deputies = number_of_state_deputies
self.average_depth = average_depth
self.arabic_name = arabic_name
self.ski_piste_number = ski_piste_number
self.subdivision = subdivision
self.human_development_index = human_development_index
self.alemmanic_name = alemmanic_name
self.human_development_index_as_of = human_development_index_as_of
self.capital_coordinates = capital_coordinates
self.touareg_name = touareg_name
self.administrative_head_city = administrative_head_city
self.maintained_by = maintained_by
self.visitors_per_day = visitors_per_day
self.kanji_name = kanji_name
self.blue_ski_piste_number = blue_ski_piste_number
self.historical_name = historical_name
self.area_rank = area_rank
self.first_mention = first_mention
self.number_of_visitors_as_of = number_of_visitors_as_of
self.localization_thumbnail = localization_thumbnail
self.nrhp_reference_number = nrhp_reference_number
self.cable_car = cable_car
self.administrative_district = administrative_district
self.type = type
self.linked_space = linked_space
self.lowest_point = lowest_point
self.daira = daira
self.number_of_island = number_of_island
self.cyrillique_name = cyrillique_name
self.tenant = tenant
self.catholic_percentage = catholic_percentage
self.old_district = old_district
self.area_rural = area_rural
self.water_percentage = water_percentage
self.lowest = lowest
self.sharing_out_population_name = sharing_out_population_name
self.building_end_date = building_end_date
self.number_of_federal_deputies = number_of_federal_deputies
self.map_caption = map_caption
self.previous_name = previous_name
self.city_link = city_link
self.architect = architect
self.leader_title = leader_title
self.foundation = foundation
self.agglomeration_demographics = agglomeration_demographics
self.calabrian_name = calabrian_name
self.type_coordinate = type_coordinate
self.floor_area = floor_area
self.touareg_settlement_name = touareg_settlement_name
self.distance_to_belfast = distance_to_belfast
self.code_provincial_monument = code_provincial_monument
self.floor_count = floor_count
self.climate = climate
self.bourgmestre = bourgmestre
self.depth = depth
self.governing_body = governing_body
self.black_ski_piste_number = black_ski_piste_number
self.protestant_percentage = protestant_percentage
self.related_places = related_places
self.zip_code = zip_code
self.fauna = fauna
self.year_of_construction = year_of_construction
self.subsystem = subsystem
self.historical_region = historical_region
self.international_phone_prefix_label = international_phone_prefix_label
self.minority = minority
self.space = space
self.frioulan_name = frioulan_name
self.reference = reference
self.code_land_registry = code_land_registry
self.distance_to_cardiff = distance_to_cardiff
self.population_date = population_date
self.dutch_name = dutch_name
self.day = day
self.sheading = sheading
self.local_phone_prefix = local_phone_prefix
self.population_pct_women = population_pct_women
self.tree = tree
self.old_province = old_province
self.vehicle_code = vehicle_code
self.water = water
self.gross_domestic_product_nominal_per_capita = gross_domestic_product_nominal_per_capita
self.association_of_local_government = association_of_local_government
self.topic = topic
self.main_island = main_island
self.maori_name = maori_name
self.istat = istat
self.minimum_area_quote = minimum_area_quote
self.altitude = altitude
self.national_topographic_system_map_number = national_topographic_system_map_number
self.budget_year = budget_year
self.gini_coefficient_as_of = gini_coefficient_as_of
self.scale = scale
self.long_distance_piste_kilometre = long_distance_piste_kilometre
self.building_start_year = building_start_year
self.sub_prefecture = sub_prefecture
self.snow_park_number = snow_park_number
self.security = security
self.luxembourgish_name = luxembourgish_name
self.tower_height = tower_height
self.area_total = area_total
self.population_total_reference = population_total_reference
self.length_quote = length_quote
self.relief = relief
self.census_year = census_year
self.visitors_per_year = visitors_per_year
self.ladin_name = ladin_name
self.subdivision_link = subdivision_link
self.cost = cost
self.operated_by = operated_by
self.mozabite_name = mozabite_name
self.nearest_city = nearest_city
self.subsystem_link = subsystem_link
self.whole_area = whole_area
self.delegation = delegation
self.vice_leader = vice_leader
self.demographics = demographics
@property
def city_type(self):
"""Gets the city_type of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The city_type of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._city_type
@city_type.setter
def city_type(self, city_type):
"""Sets the city_type of this HistoricPlace.
Description not available # noqa: E501
:param city_type: The city_type of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._city_type = city_type
@property
def irish_name(self):
"""Gets the irish_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The irish_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._irish_name
@irish_name.setter
def irish_name(self, irish_name):
"""Sets the irish_name of this HistoricPlace.
Description not available # noqa: E501
:param irish_name: The irish_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._irish_name = irish_name
@property
def reff_bourgmestre(self):
"""Gets the reff_bourgmestre of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The reff_bourgmestre of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._reff_bourgmestre
@reff_bourgmestre.setter
def reff_bourgmestre(self, reff_bourgmestre):
"""Sets the reff_bourgmestre of this HistoricPlace.
Description not available # noqa: E501
:param reff_bourgmestre: The reff_bourgmestre of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._reff_bourgmestre = reff_bourgmestre
@property
def community_iso_code(self):
"""Gets the community_iso_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The community_iso_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._community_iso_code
@community_iso_code.setter
def community_iso_code(self, community_iso_code):
"""Sets the community_iso_code of this HistoricPlace.
Description not available # noqa: E501
:param community_iso_code: The community_iso_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._community_iso_code = community_iso_code
@property
def anthem(self):
"""Gets the anthem of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The anthem of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._anthem
@anthem.setter
def anthem(self, anthem):
"""Sets the anthem of this HistoricPlace.
Description not available # noqa: E501
:param anthem: The anthem of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._anthem = anthem
@property
def rank_agreement(self):
"""Gets the rank_agreement of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The rank_agreement of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._rank_agreement
@rank_agreement.setter
def rank_agreement(self, rank_agreement):
"""Sets the rank_agreement of this HistoricPlace.
Description not available # noqa: E501
:param rank_agreement: The rank_agreement of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._rank_agreement = rank_agreement
@property
def wilaya(self):
"""Gets the wilaya of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The wilaya of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._wilaya
@wilaya.setter
def wilaya(self, wilaya):
"""Sets the wilaya of this HistoricPlace.
Description not available # noqa: E501
:param wilaya: The wilaya of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._wilaya = wilaya
@property
def parliament(self):
"""Gets the parliament of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The parliament of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._parliament
@parliament.setter
def parliament(self, parliament):
"""Sets the parliament of this HistoricPlace.
Description not available # noqa: E501
:param parliament: The parliament of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._parliament = parliament
@property
def moldavian_name(self):
"""Gets the moldavian_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The moldavian_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._moldavian_name
@moldavian_name.setter
def moldavian_name(self, moldavian_name):
"""Sets the moldavian_name of this HistoricPlace.
Description not available # noqa: E501
:param moldavian_name: The moldavian_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._moldavian_name = moldavian_name
@property
def rank_population(self):
"""Gets the rank_population of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The rank_population of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._rank_population
@rank_population.setter
def rank_population(self, rank_population):
"""Sets the rank_population of this HistoricPlace.
Description not available # noqa: E501
:param rank_population: The rank_population of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._rank_population = rank_population
@property
def quote(self):
"""Gets the quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._quote
@quote.setter
def quote(self, quote):
"""Sets the quote of this HistoricPlace.
Description not available # noqa: E501
:param quote: The quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._quote = quote
@property
def initially_used_for(self):
"""Gets the initially_used_for of this HistoricPlace. # noqa: E501
Initial use of the architectural structure. # noqa: E501
:return: The initially_used_for of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._initially_used_for
@initially_used_for.setter
def initially_used_for(self, initially_used_for):
"""Sets the initially_used_for of this HistoricPlace.
Initial use of the architectural structure. # noqa: E501
:param initially_used_for: The initially_used_for of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._initially_used_for = initially_used_for
@property
def commissioner_date(self):
"""Gets the commissioner_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The commissioner_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._commissioner_date
@commissioner_date.setter
def commissioner_date(self, commissioner_date):
"""Sets the commissioner_date of this HistoricPlace.
Description not available # noqa: E501
:param commissioner_date: The commissioner_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._commissioner_date = commissioner_date
@property
def demographics_as_of(self):
"""Gets the demographics_as_of of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The demographics_as_of of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._demographics_as_of
@demographics_as_of.setter
def demographics_as_of(self, demographics_as_of):
"""Sets the demographics_as_of of this HistoricPlace.
Description not available # noqa: E501
:param demographics_as_of: The demographics_as_of of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._demographics_as_of = demographics_as_of
@property
def largest_settlement(self):
"""Gets the largest_settlement of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The largest_settlement of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._largest_settlement
@largest_settlement.setter
def largest_settlement(self, largest_settlement):
"""Sets the largest_settlement of this HistoricPlace.
Description not available # noqa: E501
:param largest_settlement: The largest_settlement of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._largest_settlement = largest_settlement
@property
def distance_to_london(self):
"""Gets the distance_to_london of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The distance_to_london of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._distance_to_london
@distance_to_london.setter
def distance_to_london(self, distance_to_london):
"""Sets the distance_to_london of this HistoricPlace.
Description not available # noqa: E501
:param distance_to_london: The distance_to_london of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._distance_to_london = distance_to_london
@property
def geoloc_dual(self):
"""Gets the geoloc_dual of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The geoloc_dual of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._geoloc_dual
@geoloc_dual.setter
def geoloc_dual(self, geoloc_dual):
"""Sets the geoloc_dual of this HistoricPlace.
Description not available # noqa: E501
:param geoloc_dual: The geoloc_dual of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._geoloc_dual = geoloc_dual
@property
def distance_to_capital(self):
"""Gets the distance_to_capital of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The distance_to_capital of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._distance_to_capital
@distance_to_capital.setter
def distance_to_capital(self, distance_to_capital):
"""Sets the distance_to_capital of this HistoricPlace.
Description not available # noqa: E501
:param distance_to_capital: The distance_to_capital of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._distance_to_capital = distance_to_capital
@property
def subregion(self):
"""Gets the subregion of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The subregion of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._subregion
@subregion.setter
def subregion(self, subregion):
"""Sets the subregion of this HistoricPlace.
Description not available # noqa: E501
:param subregion: The subregion of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._subregion = subregion
@property
def sharing_out_area(self):
"""Gets the sharing_out_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sharing_out_area of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._sharing_out_area
@sharing_out_area.setter
def sharing_out_area(self, sharing_out_area):
"""Sets the sharing_out_area of this HistoricPlace.
Description not available # noqa: E501
:param sharing_out_area: The sharing_out_area of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._sharing_out_area = sharing_out_area
@property
def phone_prefix_name(self):
"""Gets the phone_prefix_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The phone_prefix_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._phone_prefix_name
@phone_prefix_name.setter
def phone_prefix_name(self, phone_prefix_name):
"""Sets the phone_prefix_name of this HistoricPlace.
Description not available # noqa: E501
:param phone_prefix_name: The phone_prefix_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._phone_prefix_name = phone_prefix_name
@property
def time_zone(self):
"""Gets the time_zone of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The time_zone of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._time_zone
@time_zone.setter
def time_zone(self, time_zone):
"""Sets the time_zone of this HistoricPlace.
Description not available # noqa: E501
:param time_zone: The time_zone of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._time_zone = time_zone
@property
def gross_domestic_product_as_of(self):
"""Gets the gross_domestic_product_as_of of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gross_domestic_product_as_of of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._gross_domestic_product_as_of
@gross_domestic_product_as_of.setter
def gross_domestic_product_as_of(self, gross_domestic_product_as_of):
"""Sets the gross_domestic_product_as_of of this HistoricPlace.
Description not available # noqa: E501
:param gross_domestic_product_as_of: The gross_domestic_product_as_of of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._gross_domestic_product_as_of = gross_domestic_product_as_of
@property
def population(self):
"""Gets the population of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._population
@population.setter
def population(self, population):
"""Sets the population of this HistoricPlace.
Description not available # noqa: E501
:param population: The population of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._population = population
@property
def senior(self):
"""Gets the senior of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The senior of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._senior
@senior.setter
def senior(self, senior):
"""Sets the senior of this HistoricPlace.
Description not available # noqa: E501
:param senior: The senior of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._senior = senior
@property
def human_development_index_rank(self):
"""Gets the human_development_index_rank of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The human_development_index_rank of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._human_development_index_rank
@human_development_index_rank.setter
def human_development_index_rank(self, human_development_index_rank):
"""Sets the human_development_index_rank of this HistoricPlace.
Description not available # noqa: E501
:param human_development_index_rank: The human_development_index_rank of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._human_development_index_rank = human_development_index_rank
@property
def population_rural(self):
"""Gets the population_rural of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_rural of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._population_rural
@population_rural.setter
def population_rural(self, population_rural):
"""Sets the population_rural of this HistoricPlace.
Description not available # noqa: E501
:param population_rural: The population_rural of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._population_rural = population_rural
@property
def gaelic_name(self):
"""Gets the gaelic_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gaelic_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._gaelic_name
@gaelic_name.setter
def gaelic_name(self, gaelic_name):
"""Sets the gaelic_name of this HistoricPlace.
Description not available # noqa: E501
:param gaelic_name: The gaelic_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._gaelic_name = gaelic_name
@property
def area_total_ranking(self):
"""Gets the area_total_ranking of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_total_ranking of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._area_total_ranking
@area_total_ranking.setter
def area_total_ranking(self, area_total_ranking):
"""Sets the area_total_ranking of this HistoricPlace.
Description not available # noqa: E501
:param area_total_ranking: The area_total_ranking of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._area_total_ranking = area_total_ranking
@property
def route(self):
"""Gets the route of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The route of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._route
@route.setter
def route(self, route):
"""Sets the route of this HistoricPlace.
Description not available # noqa: E501
:param route: The route of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._route = route
@property
def leader_name(self):
"""Gets the leader_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The leader_name of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._leader_name
@leader_name.setter
def leader_name(self, leader_name):
"""Sets the leader_name of this HistoricPlace.
Description not available # noqa: E501
:param leader_name: The leader_name of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._leader_name = leader_name
@property
def principal_area(self):
"""Gets the principal_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The principal_area of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._principal_area
@principal_area.setter
def principal_area(self, principal_area):
"""Sets the principal_area of this HistoricPlace.
Description not available # noqa: E501
:param principal_area: The principal_area of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._principal_area = principal_area
@property
def plant(self):
"""Gets the plant of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The plant of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._plant
@plant.setter
def plant(self, plant):
"""Sets the plant of this HistoricPlace.
Description not available # noqa: E501
:param plant: The plant of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._plant = plant
@property
def green_long_distance_piste_number(self):
"""Gets the green_long_distance_piste_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The green_long_distance_piste_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._green_long_distance_piste_number
@green_long_distance_piste_number.setter
def green_long_distance_piste_number(self, green_long_distance_piste_number):
"""Sets the green_long_distance_piste_number of this HistoricPlace.
Description not available # noqa: E501
:param green_long_distance_piste_number: The green_long_distance_piste_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._green_long_distance_piste_number = green_long_distance_piste_number
@property
def cannon_number(self):
"""Gets the cannon_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The cannon_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._cannon_number
@cannon_number.setter
def cannon_number(self, cannon_number):
"""Sets the cannon_number of this HistoricPlace.
Description not available # noqa: E501
:param cannon_number: The cannon_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._cannon_number = cannon_number
@property
def purchasing_power_parity(self):
"""Gets the purchasing_power_parity of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The purchasing_power_parity of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._purchasing_power_parity
@purchasing_power_parity.setter
def purchasing_power_parity(self, purchasing_power_parity):
"""Sets the purchasing_power_parity of this HistoricPlace.
Description not available # noqa: E501
:param purchasing_power_parity: The purchasing_power_parity of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._purchasing_power_parity = purchasing_power_parity
@property
def grid_reference(self):
"""Gets the grid_reference of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The grid_reference of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._grid_reference
@grid_reference.setter
def grid_reference(self, grid_reference):
"""Sets the grid_reference of this HistoricPlace.
Description not available # noqa: E501
:param grid_reference: The grid_reference of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._grid_reference = grid_reference
@property
def barangays(self):
"""Gets the barangays of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The barangays of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._barangays
@barangays.setter
def barangays(self, barangays):
"""Sets the barangays of this HistoricPlace.
Description not available # noqa: E501
:param barangays: The barangays of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._barangays = barangays
@property
def bioclimate(self):
"""Gets the bioclimate of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The bioclimate of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._bioclimate
@bioclimate.setter
def bioclimate(self, bioclimate):
"""Sets the bioclimate of this HistoricPlace.
Description not available # noqa: E501
:param bioclimate: The bioclimate of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._bioclimate = bioclimate
@property
def dissolution_year(self):
"""Gets the dissolution_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The dissolution_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._dissolution_year
@dissolution_year.setter
def dissolution_year(self, dissolution_year):
"""Sets the dissolution_year of this HistoricPlace.
Description not available # noqa: E501
:param dissolution_year: The dissolution_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._dissolution_year = dissolution_year
@property
def patron_saint(self):
"""Gets the patron_saint of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The patron_saint of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._patron_saint
@patron_saint.setter
def patron_saint(self, patron_saint):
"""Sets the patron_saint of this HistoricPlace.
Description not available # noqa: E501
:param patron_saint: The patron_saint of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._patron_saint = patron_saint
@property
def apskritis(self):
"""Gets the apskritis of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The apskritis of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._apskritis
@apskritis.setter
def apskritis(self, apskritis):
"""Sets the apskritis of this HistoricPlace.
Description not available # noqa: E501
:param apskritis: The apskritis of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._apskritis = apskritis
@property
def area_of_catchment_quote(self):
"""Gets the area_of_catchment_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_of_catchment_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._area_of_catchment_quote
@area_of_catchment_quote.setter
def area_of_catchment_quote(self, area_of_catchment_quote):
"""Sets the area_of_catchment_quote of this HistoricPlace.
Description not available # noqa: E501
:param area_of_catchment_quote: The area_of_catchment_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._area_of_catchment_quote = area_of_catchment_quote
@property
def sea(self):
"""Gets the sea of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sea of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._sea
@sea.setter
def sea(self, sea):
"""Sets the sea of this HistoricPlace.
Description not available # noqa: E501
:param sea: The sea of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._sea = sea
@property
def life_expectancy(self):
"""Gets the life_expectancy of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The life_expectancy of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._life_expectancy
@life_expectancy.setter
def life_expectancy(self, life_expectancy):
"""Sets the life_expectancy of this HistoricPlace.
Description not available # noqa: E501
:param life_expectancy: The life_expectancy of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._life_expectancy = life_expectancy
@property
def tamazight_name(self):
"""Gets the tamazight_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The tamazight_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._tamazight_name
@tamazight_name.setter
def tamazight_name(self, tamazight_name):
"""Sets the tamazight_name of this HistoricPlace.
Description not available # noqa: E501
:param tamazight_name: The tamazight_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._tamazight_name = tamazight_name
@property
def ski_lift(self):
"""Gets the ski_lift of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The ski_lift of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._ski_lift
@ski_lift.setter
def ski_lift(self, ski_lift):
"""Sets the ski_lift of this HistoricPlace.
Description not available # noqa: E501
:param ski_lift: The ski_lift of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._ski_lift = ski_lift
@property
def insee_code(self):
"""Gets the insee_code of this HistoricPlace. # noqa: E501
numerical indexing code used by the French National Institute for Statistics and Economic Studies (INSEE) to identify various entities # noqa: E501
:return: The insee_code of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._insee_code
@insee_code.setter
def insee_code(self, insee_code):
"""Sets the insee_code of this HistoricPlace.
numerical indexing code used by the French National Institute for Statistics and Economic Studies (INSEE) to identify various entities # noqa: E501
:param insee_code: The insee_code of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._insee_code = insee_code
@property
def governorate(self):
"""Gets the governorate of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The governorate of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._governorate
@governorate.setter
def governorate(self, governorate):
"""Sets the governorate of this HistoricPlace.
Description not available # noqa: E501
:param governorate: The governorate of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._governorate = governorate
@property
def region_link(self):
"""Gets the region_link of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The region_link of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._region_link
@region_link.setter
def region_link(self, region_link):
"""Sets the region_link of this HistoricPlace.
Description not available # noqa: E501
:param region_link: The region_link of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._region_link = region_link
@property
def vice_leader_party(self):
"""Gets the vice_leader_party of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The vice_leader_party of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._vice_leader_party
@vice_leader_party.setter
def vice_leader_party(self, vice_leader_party):
"""Sets the vice_leader_party of this HistoricPlace.
Description not available # noqa: E501
:param vice_leader_party: The vice_leader_party of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._vice_leader_party = vice_leader_party
@property
def political_seats(self):
"""Gets the political_seats of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The political_seats of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._political_seats
@political_seats.setter
def political_seats(self, political_seats):
"""Sets the political_seats of this HistoricPlace.
Description not available # noqa: E501
:param political_seats: The political_seats of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._political_seats = political_seats
@property
def artificial_snow_area(self):
"""Gets the artificial_snow_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The artificial_snow_area of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._artificial_snow_area
@artificial_snow_area.setter
def artificial_snow_area(self, artificial_snow_area):
"""Sets the artificial_snow_area of this HistoricPlace.
Description not available # noqa: E501
:param artificial_snow_area: The artificial_snow_area of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._artificial_snow_area = artificial_snow_area
@property
def located_in_area(self):
"""Gets the located_in_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The located_in_area of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._located_in_area
@located_in_area.setter
def located_in_area(self, located_in_area):
"""Sets the located_in_area of this HistoricPlace.
Description not available # noqa: E501
:param located_in_area: The located_in_area of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._located_in_area = located_in_area
@property
def address(self):
"""Gets the address of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The address of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._address
@address.setter
def address(self, address):
"""Sets the address of this HistoricPlace.
Description not available # noqa: E501
:param address: The address of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._address = address
@property
def saint(self):
"""Gets the saint of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The saint of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._saint
@saint.setter
def saint(self, saint):
"""Sets the saint of this HistoricPlace.
Description not available # noqa: E501
:param saint: The saint of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._saint = saint
@property
def gnl(self):
"""Gets the gnl of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gnl of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._gnl
@gnl.setter
def gnl(self, gnl):
"""Sets the gnl of this HistoricPlace.
Description not available # noqa: E501
:param gnl: The gnl of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._gnl = gnl
@property
def licence_number(self):
"""Gets the licence_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The licence_number of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._licence_number
@licence_number.setter
def licence_number(self, licence_number):
"""Sets the licence_number of this HistoricPlace.
Description not available # noqa: E501
:param licence_number: The licence_number of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._licence_number = licence_number
@property
def map_description(self):
"""Gets the map_description of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The map_description of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._map_description
@map_description.setter
def map_description(self, map_description):
"""Sets the map_description of this HistoricPlace.
Description not available # noqa: E501
:param map_description: The map_description of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._map_description = map_description
@property
def infant_mortality(self):
"""Gets the infant_mortality of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The infant_mortality of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._infant_mortality
@infant_mortality.setter
def infant_mortality(self, infant_mortality):
"""Sets the infant_mortality of this HistoricPlace.
Description not available # noqa: E501
:param infant_mortality: The infant_mortality of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._infant_mortality = infant_mortality
@property
def area_metro(self):
"""Gets the area_metro of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_metro of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._area_metro
@area_metro.setter
def area_metro(self, area_metro):
"""Sets the area_metro of this HistoricPlace.
Description not available # noqa: E501
:param area_metro: The area_metro of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._area_metro = area_metro
@property
def number_of_cantons(self):
"""Gets the number_of_cantons of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The number_of_cantons of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._number_of_cantons
@number_of_cantons.setter
def number_of_cantons(self, number_of_cantons):
"""Sets the number_of_cantons of this HistoricPlace.
Description not available # noqa: E501
:param number_of_cantons: The number_of_cantons of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._number_of_cantons = number_of_cantons
@property
def information_name(self):
"""Gets the information_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The information_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._information_name
@information_name.setter
def information_name(self, information_name):
"""Sets the information_name of this HistoricPlace.
Description not available # noqa: E501
:param information_name: The information_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._information_name = information_name
@property
def information(self):
"""Gets the information of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The information of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._information
@information.setter
def information(self, information):
"""Sets the information of this HistoricPlace.
Description not available # noqa: E501
:param information: The information of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._information = information
@property
def river(self):
"""Gets the river of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The river of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._river
@river.setter
def river(self, river):
"""Sets the river of this HistoricPlace.
Description not available # noqa: E501
:param river: The river of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._river = river
@property
def ethnic_group(self):
"""Gets the ethnic_group of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The ethnic_group of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._ethnic_group
@ethnic_group.setter
def ethnic_group(self, ethnic_group):
"""Sets the ethnic_group of this HistoricPlace.
Description not available # noqa: E501
:param ethnic_group: The ethnic_group of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._ethnic_group = ethnic_group
@property
def heritage_register(self):
"""Gets the heritage_register of this HistoricPlace. # noqa: E501
registered in a heritage register : inventory of cultural properties, natural and man-made, tangible and intangible, movable and immovable, that are deemed to be of sufficient heritage value to be separately identified and recorded. # noqa: E501
:return: The heritage_register of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._heritage_register
@heritage_register.setter
def heritage_register(self, heritage_register):
"""Sets the heritage_register of this HistoricPlace.
registered in a heritage register : inventory of cultural properties, natural and man-made, tangible and intangible, movable and immovable, that are deemed to be of sufficient heritage value to be separately identified and recorded. # noqa: E501
:param heritage_register: The heritage_register of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._heritage_register = heritage_register
@property
def subdivisions(self):
"""Gets the subdivisions of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The subdivisions of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._subdivisions
@subdivisions.setter
def subdivisions(self, subdivisions):
"""Sets the subdivisions of this HistoricPlace.
Description not available # noqa: E501
:param subdivisions: The subdivisions of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._subdivisions = subdivisions
@property
def refcul(self):
"""Gets the refcul of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The refcul of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._refcul
@refcul.setter
def refcul(self, refcul):
"""Sets the refcul of this HistoricPlace.
Description not available # noqa: E501
:param refcul: The refcul of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._refcul = refcul
@property
def italian_name(self):
"""Gets the italian_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The italian_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._italian_name
@italian_name.setter
def italian_name(self, italian_name):
"""Sets the italian_name of this HistoricPlace.
Description not available # noqa: E501
:param italian_name: The italian_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._italian_name = italian_name
@property
def dissolution_date(self):
"""Gets the dissolution_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The dissolution_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._dissolution_date
@dissolution_date.setter
def dissolution_date(self, dissolution_date):
"""Sets the dissolution_date of this HistoricPlace.
Description not available # noqa: E501
:param dissolution_date: The dissolution_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._dissolution_date = dissolution_date
@property
def added(self):
"""Gets the added of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The added of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._added
@added.setter
def added(self, added):
"""Sets the added of this HistoricPlace.
Description not available # noqa: E501
:param added: The added of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._added = added
@property
def structural_system(self):
"""Gets the structural_system of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The structural_system of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._structural_system
@structural_system.setter
def structural_system(self, structural_system):
"""Sets the structural_system of this HistoricPlace.
Description not available # noqa: E501
:param structural_system: The structural_system of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._structural_system = structural_system
@property
def building_end_year(self):
"""Gets the building_end_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The building_end_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._building_end_year
@building_end_year.setter
def building_end_year(self, building_end_year):
"""Sets the building_end_year of this HistoricPlace.
Description not available # noqa: E501
:param building_end_year: The building_end_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._building_end_year = building_end_year
@property
def ist(self):
"""Gets the ist of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The ist of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._ist
@ist.setter
def ist(self, ist):
"""Sets the ist of this HistoricPlace.
Description not available # noqa: E501
:param ist: The ist of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._ist = ist
@property
def geoloc_department(self):
"""Gets the geoloc_department of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The geoloc_department of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._geoloc_department
@geoloc_department.setter
def geoloc_department(self, geoloc_department):
"""Sets the geoloc_department of this HistoricPlace.
Description not available # noqa: E501
:param geoloc_department: The geoloc_department of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._geoloc_department = geoloc_department
@property
def borough(self):
"""Gets the borough of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The borough of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._borough
@borough.setter
def borough(self, borough):
"""Sets the borough of this HistoricPlace.
Description not available # noqa: E501
:param borough: The borough of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._borough = borough
@property
def official_name(self):
"""Gets the official_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The official_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._official_name
@official_name.setter
def official_name(self, official_name):
"""Sets the official_name of this HistoricPlace.
Description not available # noqa: E501
:param official_name: The official_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._official_name = official_name
@property
def maximum_elevation(self):
"""Gets the maximum_elevation of this HistoricPlace. # noqa: E501
maximum elevation above the sea level # noqa: E501
:return: The maximum_elevation of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._maximum_elevation
@maximum_elevation.setter
def maximum_elevation(self, maximum_elevation):
"""Sets the maximum_elevation of this HistoricPlace.
maximum elevation above the sea level # noqa: E501
:param maximum_elevation: The maximum_elevation of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._maximum_elevation = maximum_elevation
@property
def colonial_name(self):
"""Gets the colonial_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The colonial_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._colonial_name
@colonial_name.setter
def colonial_name(self, colonial_name):
"""Sets the colonial_name of this HistoricPlace.
Description not available # noqa: E501
:param colonial_name: The colonial_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._colonial_name = colonial_name
@property
def named_by_language(self):
"""Gets the named_by_language of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The named_by_language of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._named_by_language
@named_by_language.setter
def named_by_language(self, named_by_language):
"""Sets the named_by_language of this HistoricPlace.
Description not available # noqa: E501
:param named_by_language: The named_by_language of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._named_by_language = named_by_language
@property
def volume_quote(self):
"""Gets the volume_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The volume_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._volume_quote
@volume_quote.setter
def volume_quote(self, volume_quote):
"""Sets the volume_quote of this HistoricPlace.
Description not available # noqa: E501
:param volume_quote: The volume_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._volume_quote = volume_quote
@property
def province_link(self):
"""Gets the province_link of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The province_link of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._province_link
@province_link.setter
def province_link(self, province_link):
"""Sets the province_link of this HistoricPlace.
Description not available # noqa: E501
:param province_link: The province_link of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._province_link = province_link
@property
def parish(self):
"""Gets the parish of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The parish of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._parish
@parish.setter
def parish(self, parish):
"""Sets the parish of this HistoricPlace.
Description not available # noqa: E501
:param parish: The parish of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._parish = parish
@property
def old_name(self):
"""Gets the old_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The old_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._old_name
@old_name.setter
def old_name(self, old_name):
"""Sets the old_name of this HistoricPlace.
Description not available # noqa: E501
:param old_name: The old_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._old_name = old_name
@property
def bird(self):
"""Gets the bird of this HistoricPlace. # noqa: E501
Τα πτηνά είναι ζώα ομοιόθερμα σπονδυλωτά, που στη συντριπτική πλειονότητα τους μπορούν να πετούν με τις πτέρυγες ή φτερούγες τους. # noqa: E501
:return: The bird of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._bird
@bird.setter
def bird(self, bird):
"""Sets the bird of this HistoricPlace.
Τα πτηνά είναι ζώα ομοιόθερμα σπονδυλωτά, που στη συντριπτική πλειονότητα τους μπορούν να πετούν με τις πτέρυγες ή φτερούγες τους. # noqa: E501
:param bird: The bird of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._bird = bird
@property
def president_general_council_mandate(self):
"""Gets the president_general_council_mandate of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The president_general_council_mandate of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._president_general_council_mandate
@president_general_council_mandate.setter
def president_general_council_mandate(self, president_general_council_mandate):
"""Sets the president_general_council_mandate of this HistoricPlace.
Description not available # noqa: E501
:param president_general_council_mandate: The president_general_council_mandate of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._president_general_council_mandate = president_general_council_mandate
@property
def regional_prefecture(self):
"""Gets the regional_prefecture of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The regional_prefecture of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._regional_prefecture
@regional_prefecture.setter
def regional_prefecture(self, regional_prefecture):
"""Sets the regional_prefecture of this HistoricPlace.
Description not available # noqa: E501
:param regional_prefecture: The regional_prefecture of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._regional_prefecture = regional_prefecture
@property
def term_of_office(self):
"""Gets the term_of_office of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The term_of_office of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._term_of_office
@term_of_office.setter
def term_of_office(self, term_of_office):
"""Sets the term_of_office of this HistoricPlace.
Description not available # noqa: E501
:param term_of_office: The term_of_office of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._term_of_office = term_of_office
@property
def code_settlement(self):
"""Gets the code_settlement of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The code_settlement of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._code_settlement
@code_settlement.setter
def code_settlement(self, code_settlement):
"""Sets the code_settlement of this HistoricPlace.
Description not available # noqa: E501
:param code_settlement: The code_settlement of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._code_settlement = code_settlement
@property
def winter_temperature(self):
"""Gets the winter_temperature of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The winter_temperature of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._winter_temperature
@winter_temperature.setter
def winter_temperature(self, winter_temperature):
"""Sets the winter_temperature of this HistoricPlace.
Description not available # noqa: E501
:param winter_temperature: The winter_temperature of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._winter_temperature = winter_temperature
@property
def construction_material(self):
"""Gets the construction_material of this HistoricPlace. # noqa: E501
Construction material (eg. concrete, steel, iron, stone, brick, wood). # noqa: E501
:return: The construction_material of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._construction_material
@construction_material.setter
def construction_material(self, construction_material):
"""Sets the construction_material of this HistoricPlace.
Construction material (eg. concrete, steel, iron, stone, brick, wood). # noqa: E501
:param construction_material: The construction_material of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._construction_material = construction_material
@property
def commissioner(self):
"""Gets the commissioner of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The commissioner of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._commissioner
@commissioner.setter
def commissioner(self, commissioner):
"""Sets the commissioner of this HistoricPlace.
Description not available # noqa: E501
:param commissioner: The commissioner of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._commissioner = commissioner
@property
def refpol(self):
"""Gets the refpol of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The refpol of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._refpol
@refpol.setter
def refpol(self, refpol):
"""Sets the refpol of this HistoricPlace.
Description not available # noqa: E501
:param refpol: The refpol of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._refpol = refpol
@property
def number_of_counties(self):
"""Gets the number_of_counties of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The number_of_counties of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._number_of_counties
@number_of_counties.setter
def number_of_counties(self, number_of_counties):
"""Sets the number_of_counties of this HistoricPlace.
Description not available # noqa: E501
:param number_of_counties: The number_of_counties of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._number_of_counties = number_of_counties
@property
def area(self):
"""Gets the area of this HistoricPlace. # noqa: E501
The area of a owl:Thing in square metre. # noqa: E501
:return: The area of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._area
@area.setter
def area(self, area):
"""Sets the area of this HistoricPlace.
The area of a owl:Thing in square metre. # noqa: E501
:param area: The area of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._area = area
@property
def population_quote(self):
"""Gets the population_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._population_quote
@population_quote.setter
def population_quote(self, population_quote):
"""Sets the population_quote of this HistoricPlace.
Description not available # noqa: E501
:param population_quote: The population_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._population_quote = population_quote
@property
def biggest_city(self):
"""Gets the biggest_city of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The biggest_city of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._biggest_city
@biggest_city.setter
def biggest_city(self, biggest_city):
"""Sets the biggest_city of this HistoricPlace.
Description not available # noqa: E501
:param biggest_city: The biggest_city of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._biggest_city = biggest_city
@property
def nis_code(self):
"""Gets the nis_code of this HistoricPlace. # noqa: E501
Indexing code used by the Belgium National Statistical Institute to identify populated places. # noqa: E501
:return: The nis_code of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._nis_code
@nis_code.setter
def nis_code(self, nis_code):
"""Sets the nis_code of this HistoricPlace.
Indexing code used by the Belgium National Statistical Institute to identify populated places. # noqa: E501
:param nis_code: The nis_code of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._nis_code = nis_code
@property
def other_information(self):
"""Gets the other_information of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The other_information of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._other_information
@other_information.setter
def other_information(self, other_information):
"""Sets the other_information of this HistoricPlace.
Description not available # noqa: E501
:param other_information: The other_information of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._other_information = other_information
@property
def opening_year(self):
"""Gets the opening_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The opening_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._opening_year
@opening_year.setter
def opening_year(self, opening_year):
"""Sets the opening_year of this HistoricPlace.
Description not available # noqa: E501
:param opening_year: The opening_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._opening_year = opening_year
@property
def area_code(self):
"""Gets the area_code of this HistoricPlace. # noqa: E501
Area code for telephone numbers. # noqa: E501
:return: The area_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._area_code
@area_code.setter
def area_code(self, area_code):
"""Sets the area_code of this HistoricPlace.
Area code for telephone numbers. # noqa: E501
:param area_code: The area_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._area_code = area_code
@property
def average_depth_quote(self):
"""Gets the average_depth_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The average_depth_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._average_depth_quote
@average_depth_quote.setter
def average_depth_quote(self, average_depth_quote):
"""Sets the average_depth_quote of this HistoricPlace.
Description not available # noqa: E501
:param average_depth_quote: The average_depth_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._average_depth_quote = average_depth_quote
@property
def geologic_period(self):
"""Gets the geologic_period of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The geologic_period of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._geologic_period
@geologic_period.setter
def geologic_period(self, geologic_period):
"""Sets the geologic_period of this HistoricPlace.
Description not available # noqa: E501
:param geologic_period: The geologic_period of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._geologic_period = geologic_period
@property
def coast_line(self):
"""Gets the coast_line of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The coast_line of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._coast_line
@coast_line.setter
def coast_line(self, coast_line):
"""Sets the coast_line of this HistoricPlace.
Description not available # noqa: E501
:param coast_line: The coast_line of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._coast_line = coast_line
@property
def unitary_authority(self):
"""Gets the unitary_authority of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The unitary_authority of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._unitary_authority
@unitary_authority.setter
def unitary_authority(self, unitary_authority):
"""Sets the unitary_authority of this HistoricPlace.
Description not available # noqa: E501
:param unitary_authority: The unitary_authority of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._unitary_authority = unitary_authority
@property
def area_land(self):
"""Gets the area_land of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_land of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._area_land
@area_land.setter
def area_land(self, area_land):
"""Sets the area_land of this HistoricPlace.
Description not available # noqa: E501
:param area_land: The area_land of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._area_land = area_land
@property
def population_metro_density(self):
"""Gets the population_metro_density of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_metro_density of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._population_metro_density
@population_metro_density.setter
def population_metro_density(self, population_metro_density):
"""Sets the population_metro_density of this HistoricPlace.
Description not available # noqa: E501
:param population_metro_density: The population_metro_density of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._population_metro_density = population_metro_density
@property
def previous_population(self):
"""Gets the previous_population of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The previous_population of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._previous_population
@previous_population.setter
def previous_population(self, previous_population):
"""Sets the previous_population of this HistoricPlace.
Description not available # noqa: E501
:param previous_population: The previous_population of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._previous_population = previous_population
@property
def iso_code_region(self):
"""Gets the iso_code_region of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The iso_code_region of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._iso_code_region
@iso_code_region.setter
def iso_code_region(self, iso_code_region):
"""Sets the iso_code_region of this HistoricPlace.
Description not available # noqa: E501
:param iso_code_region: The iso_code_region of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._iso_code_region = iso_code_region
@property
def gini_coefficient(self):
"""Gets the gini_coefficient of this HistoricPlace. # noqa: E501
is a measure of the inequality of a distribution. It is commonly used as a measure of inequality of income or wealth. # noqa: E501
:return: The gini_coefficient of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._gini_coefficient
@gini_coefficient.setter
def gini_coefficient(self, gini_coefficient):
"""Sets the gini_coefficient of this HistoricPlace.
is a measure of the inequality of a distribution. It is commonly used as a measure of inequality of income or wealth. # noqa: E501
:param gini_coefficient: The gini_coefficient of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._gini_coefficient = gini_coefficient
@property
def neighbour_region(self):
"""Gets the neighbour_region of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The neighbour_region of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._neighbour_region
@neighbour_region.setter
def neighbour_region(self, neighbour_region):
"""Sets the neighbour_region of this HistoricPlace.
Description not available # noqa: E501
:param neighbour_region: The neighbour_region of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._neighbour_region = neighbour_region
@property
def event_date(self):
"""Gets the event_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The event_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._event_date
@event_date.setter
def event_date(self, event_date):
"""Sets the event_date of this HistoricPlace.
Description not available # noqa: E501
:param event_date: The event_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._event_date = event_date
@property
def income(self):
"""Gets the income of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The income of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._income
@income.setter
def income(self, income):
"""Sets the income of this HistoricPlace.
Description not available # noqa: E501
:param income: The income of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._income = income
@property
def touristic_site(self):
"""Gets the touristic_site of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The touristic_site of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._touristic_site
@touristic_site.setter
def touristic_site(self, touristic_site):
"""Sets the touristic_site of this HistoricPlace.
Description not available # noqa: E501
:param touristic_site: The touristic_site of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._touristic_site = touristic_site
@property
def next_entity(self):
"""Gets the next_entity of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The next_entity of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._next_entity
@next_entity.setter
def next_entity(self, next_entity):
"""Sets the next_entity of this HistoricPlace.
Description not available # noqa: E501
:param next_entity: The next_entity of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._next_entity = next_entity
@property
def political_majority(self):
"""Gets the political_majority of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The political_majority of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._political_majority
@political_majority.setter
def political_majority(self, political_majority):
"""Sets the political_majority of this HistoricPlace.
Description not available # noqa: E501
:param political_majority: The political_majority of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._political_majority = political_majority
@property
def area_quote(self):
"""Gets the area_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._area_quote
@area_quote.setter
def area_quote(self, area_quote):
"""Sets the area_quote of this HistoricPlace.
Description not available # noqa: E501
:param area_quote: The area_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._area_quote = area_quote
@property
def ski_tow(self):
"""Gets the ski_tow of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The ski_tow of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._ski_tow
@ski_tow.setter
def ski_tow(self, ski_tow):
"""Sets the ski_tow of this HistoricPlace.
Description not available # noqa: E501
:param ski_tow: The ski_tow of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._ski_tow = ski_tow
@property
def international_phone_prefix(self):
"""Gets the international_phone_prefix of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The international_phone_prefix of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._international_phone_prefix
@international_phone_prefix.setter
def international_phone_prefix(self, international_phone_prefix):
"""Sets the international_phone_prefix of this HistoricPlace.
Description not available # noqa: E501
:param international_phone_prefix: The international_phone_prefix of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._international_phone_prefix = international_phone_prefix
@property
def largest_metro(self):
"""Gets the largest_metro of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The largest_metro of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._largest_metro
@largest_metro.setter
def largest_metro(self, largest_metro):
"""Sets the largest_metro of this HistoricPlace.
Description not available # noqa: E501
:param largest_metro: The largest_metro of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._largest_metro = largest_metro
@property
def gagaouze(self):
"""Gets the gagaouze of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gagaouze of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._gagaouze
@gagaouze.setter
def gagaouze(self, gagaouze):
"""Sets the gagaouze of this HistoricPlace.
Description not available # noqa: E501
:param gagaouze: The gagaouze of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._gagaouze = gagaouze
@property
def label(self):
"""Gets the label of this HistoricPlace. # noqa: E501
short description of the resource # noqa: E501
:return: The label of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._label
@label.setter
def label(self, label):
"""Sets the label of this HistoricPlace.
short description of the resource # noqa: E501
:param label: The label of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._label = label
@property
def iso_code(self):
"""Gets the iso_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The iso_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._iso_code
@iso_code.setter
def iso_code(self, iso_code):
"""Sets the iso_code of this HistoricPlace.
Description not available # noqa: E501
:param iso_code: The iso_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._iso_code = iso_code
@property
def finnish_name(self):
"""Gets the finnish_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The finnish_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._finnish_name
@finnish_name.setter
def finnish_name(self, finnish_name):
"""Sets the finnish_name of this HistoricPlace.
Description not available # noqa: E501
:param finnish_name: The finnish_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._finnish_name = finnish_name
@property
def width_quote(self):
"""Gets the width_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The width_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._width_quote
@width_quote.setter
def width_quote(self, width_quote):
"""Sets the width_quote of this HistoricPlace.
Description not available # noqa: E501
:param width_quote: The width_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._width_quote = width_quote
@property
def agglomeration_population_year(self):
"""Gets the agglomeration_population_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The agglomeration_population_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._agglomeration_population_year
@agglomeration_population_year.setter
def agglomeration_population_year(self, agglomeration_population_year):
"""Sets the agglomeration_population_year of this HistoricPlace.
Description not available # noqa: E501
:param agglomeration_population_year: The agglomeration_population_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._agglomeration_population_year = agglomeration_population_year
@property
def daylight_saving_time_zone(self):
"""Gets the daylight_saving_time_zone of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The daylight_saving_time_zone of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._daylight_saving_time_zone
@daylight_saving_time_zone.setter
def daylight_saving_time_zone(self, daylight_saving_time_zone):
"""Sets the daylight_saving_time_zone of this HistoricPlace.
Description not available # noqa: E501
:param daylight_saving_time_zone: The daylight_saving_time_zone of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._daylight_saving_time_zone = daylight_saving_time_zone
@property
def long_distance_piste_number(self):
"""Gets the long_distance_piste_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The long_distance_piste_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._long_distance_piste_number
@long_distance_piste_number.setter
def long_distance_piste_number(self, long_distance_piste_number):
"""Sets the long_distance_piste_number of this HistoricPlace.
Description not available # noqa: E501
:param long_distance_piste_number: The long_distance_piste_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._long_distance_piste_number = long_distance_piste_number
@property
def political_leader(self):
"""Gets the political_leader of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The political_leader of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._political_leader
@political_leader.setter
def political_leader(self, political_leader):
"""Sets the political_leader of this HistoricPlace.
Description not available # noqa: E501
:param political_leader: The political_leader of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._political_leader = political_leader
@property
def same_name(self):
"""Gets the same_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The same_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._same_name
@same_name.setter
def same_name(self, same_name):
"""Sets the same_name of this HistoricPlace.
Description not available # noqa: E501
:param same_name: The same_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._same_name = same_name
@property
def agglomeration(self):
"""Gets the agglomeration of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The agglomeration of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._agglomeration
@agglomeration.setter
def agglomeration(self, agglomeration):
"""Sets the agglomeration of this HistoricPlace.
Description not available # noqa: E501
:param agglomeration: The agglomeration of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._agglomeration = agglomeration
@property
def red_long_distance_piste_number(self):
"""Gets the red_long_distance_piste_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The red_long_distance_piste_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._red_long_distance_piste_number
@red_long_distance_piste_number.setter
def red_long_distance_piste_number(self, red_long_distance_piste_number):
"""Sets the red_long_distance_piste_number of this HistoricPlace.
Description not available # noqa: E501
:param red_long_distance_piste_number: The red_long_distance_piste_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._red_long_distance_piste_number = red_long_distance_piste_number
@property
def area_water(self):
"""Gets the area_water of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_water of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._area_water
@area_water.setter
def area_water(self, area_water):
"""Sets the area_water of this HistoricPlace.
Description not available # noqa: E501
:param area_water: The area_water of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._area_water = area_water
@property
def currently_used_for(self):
"""Gets the currently_used_for of this HistoricPlace. # noqa: E501
Current use of the architectural structure, if it is currently being used as anything other than its original purpose. # noqa: E501
:return: The currently_used_for of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._currently_used_for
@currently_used_for.setter
def currently_used_for(self, currently_used_for):
"""Sets the currently_used_for of this HistoricPlace.
Current use of the architectural structure, if it is currently being used as anything other than its original purpose. # noqa: E501
:param currently_used_for: The currently_used_for of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._currently_used_for = currently_used_for
@property
def output(self):
"""Gets the output of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The output of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._output
@output.setter
def output(self, output):
"""Sets the output of this HistoricPlace.
Description not available # noqa: E501
:param output: The output of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._output = output
@property
def previous_demographics(self):
"""Gets the previous_demographics of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The previous_demographics of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._previous_demographics
@previous_demographics.setter
def previous_demographics(self, previous_demographics):
"""Sets the previous_demographics of this HistoricPlace.
Description not available # noqa: E501
:param previous_demographics: The previous_demographics of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._previous_demographics = previous_demographics
@property
def region_type(self):
"""Gets the region_type of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The region_type of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._region_type
@region_type.setter
def region_type(self, region_type):
"""Sets the region_type of this HistoricPlace.
Description not available # noqa: E501
:param region_type: The region_type of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._region_type = region_type
@property
def police_name(self):
"""Gets the police_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The police_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._police_name
@police_name.setter
def police_name(self, police_name):
"""Sets the police_name of this HistoricPlace.
Description not available # noqa: E501
:param police_name: The police_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._police_name = police_name
@property
def neighboring_municipality(self):
"""Gets the neighboring_municipality of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The neighboring_municipality of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._neighboring_municipality
@neighboring_municipality.setter
def neighboring_municipality(self, neighboring_municipality):
"""Sets the neighboring_municipality of this HistoricPlace.
Description not available # noqa: E501
:param neighboring_municipality: The neighboring_municipality of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._neighboring_municipality = neighboring_municipality
@property
def population_pct_children(self):
"""Gets the population_pct_children of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_pct_children of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._population_pct_children
@population_pct_children.setter
def population_pct_children(self, population_pct_children):
"""Sets the population_pct_children of this HistoricPlace.
Description not available # noqa: E501
:param population_pct_children: The population_pct_children of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._population_pct_children = population_pct_children
@property
def id(self):
"""Gets the id of this HistoricPlace. # noqa: E501
identifier # noqa: E501
:return: The id of this HistoricPlace. # noqa: E501
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this HistoricPlace.
identifier # noqa: E501
:param id: The id of this HistoricPlace. # noqa: E501
:type: str
"""
self._id = id
@property
def distance_to_charing_cross(self):
"""Gets the distance_to_charing_cross of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The distance_to_charing_cross of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._distance_to_charing_cross
@distance_to_charing_cross.setter
def distance_to_charing_cross(self, distance_to_charing_cross):
"""Sets the distance_to_charing_cross of this HistoricPlace.
Description not available # noqa: E501
:param distance_to_charing_cross: The distance_to_charing_cross of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._distance_to_charing_cross = distance_to_charing_cross
@property
def lieutenancy(self):
"""Gets the lieutenancy of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The lieutenancy of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._lieutenancy
@lieutenancy.setter
def lieutenancy(self, lieutenancy):
"""Sets the lieutenancy of this HistoricPlace.
Description not available # noqa: E501
:param lieutenancy: The lieutenancy of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._lieutenancy = lieutenancy
@property
def delegate_mayor(self):
"""Gets the delegate_mayor of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The delegate_mayor of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._delegate_mayor
@delegate_mayor.setter
def delegate_mayor(self, delegate_mayor):
"""Sets the delegate_mayor of this HistoricPlace.
Description not available # noqa: E501
:param delegate_mayor: The delegate_mayor of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._delegate_mayor = delegate_mayor
@property
def rebuilding_year(self):
"""Gets the rebuilding_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The rebuilding_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._rebuilding_year
@rebuilding_year.setter
def rebuilding_year(self, rebuilding_year):
"""Sets the rebuilding_year of this HistoricPlace.
Description not available # noqa: E501
:param rebuilding_year: The rebuilding_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._rebuilding_year = rebuilding_year
@property
def minimum_elevation(self):
"""Gets the minimum_elevation of this HistoricPlace. # noqa: E501
minimum elevation above the sea level # noqa: E501
:return: The minimum_elevation of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._minimum_elevation
@minimum_elevation.setter
def minimum_elevation(self, minimum_elevation):
"""Sets the minimum_elevation of this HistoricPlace.
minimum elevation above the sea level # noqa: E501
:param minimum_elevation: The minimum_elevation of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._minimum_elevation = minimum_elevation
@property
def number_of_capital_deputies(self):
"""Gets the number_of_capital_deputies of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The number_of_capital_deputies of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._number_of_capital_deputies
@number_of_capital_deputies.setter
def number_of_capital_deputies(self, number_of_capital_deputies):
"""Sets the number_of_capital_deputies of this HistoricPlace.
Description not available # noqa: E501
:param number_of_capital_deputies: The number_of_capital_deputies of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._number_of_capital_deputies = number_of_capital_deputies
@property
def ceremonial_county(self):
"""Gets the ceremonial_county of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The ceremonial_county of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._ceremonial_county
@ceremonial_county.setter
def ceremonial_county(self, ceremonial_county):
"""Sets the ceremonial_county of this HistoricPlace.
Description not available # noqa: E501
:param ceremonial_county: The ceremonial_county of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._ceremonial_county = ceremonial_county
@property
def scotish_name(self):
"""Gets the scotish_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The scotish_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._scotish_name
@scotish_name.setter
def scotish_name(self, scotish_name):
"""Sets the scotish_name of this HistoricPlace.
Description not available # noqa: E501
:param scotish_name: The scotish_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._scotish_name = scotish_name
@property
def work_area(self):
"""Gets the work_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The work_area of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._work_area
@work_area.setter
def work_area(self, work_area):
"""Sets the work_area of this HistoricPlace.
Description not available # noqa: E501
:param work_area: The work_area of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._work_area = work_area
@property
def watercourse(self):
"""Gets the watercourse of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The watercourse of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._watercourse
@watercourse.setter
def watercourse(self, watercourse):
"""Sets the watercourse of this HistoricPlace.
Description not available # noqa: E501
:param watercourse: The watercourse of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._watercourse = watercourse
@property
def metropolitan_borough(self):
"""Gets the metropolitan_borough of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The metropolitan_borough of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._metropolitan_borough
@metropolitan_borough.setter
def metropolitan_borough(self, metropolitan_borough):
"""Sets the metropolitan_borough of this HistoricPlace.
Description not available # noqa: E501
:param metropolitan_borough: The metropolitan_borough of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._metropolitan_borough = metropolitan_borough
@property
def coast_length(self):
"""Gets the coast_length of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The coast_length of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._coast_length
@coast_length.setter
def coast_length(self, coast_length):
"""Sets the coast_length of this HistoricPlace.
Description not available # noqa: E501
:param coast_length: The coast_length of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._coast_length = coast_length
@property
def joint_community(self):
"""Gets the joint_community of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The joint_community of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._joint_community
@joint_community.setter
def joint_community(self, joint_community):
"""Sets the joint_community of this HistoricPlace.
Description not available # noqa: E501
:param joint_community: The joint_community of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._joint_community = joint_community
@property
def ekatte_code(self):
"""Gets the ekatte_code of this HistoricPlace. # noqa: E501
Indexing code used by the Bulgarian National Statistical Institute to identify populated places # noqa: E501
:return: The ekatte_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._ekatte_code
@ekatte_code.setter
def ekatte_code(self, ekatte_code):
"""Sets the ekatte_code of this HistoricPlace.
Indexing code used by the Bulgarian National Statistical Institute to identify populated places # noqa: E501
:param ekatte_code: The ekatte_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._ekatte_code = ekatte_code
@property
def per_capita_income(self):
"""Gets the per_capita_income of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The per_capita_income of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._per_capita_income
@per_capita_income.setter
def per_capita_income(self, per_capita_income):
"""Sets the per_capita_income of this HistoricPlace.
Description not available # noqa: E501
:param per_capita_income: The per_capita_income of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._per_capita_income = per_capita_income
@property
def settlement(self):
"""Gets the settlement of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The settlement of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._settlement
@settlement.setter
def settlement(self, settlement):
"""Sets the settlement of this HistoricPlace.
Description not available # noqa: E501
:param settlement: The settlement of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._settlement = settlement
@property
def sharing_out_population_year(self):
"""Gets the sharing_out_population_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sharing_out_population_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._sharing_out_population_year
@sharing_out_population_year.setter
def sharing_out_population_year(self, sharing_out_population_year):
"""Sets the sharing_out_population_year of this HistoricPlace.
Description not available # noqa: E501
:param sharing_out_population_year: The sharing_out_population_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._sharing_out_population_year = sharing_out_population_year
@property
def foundation_date(self):
"""Gets the foundation_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The foundation_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._foundation_date
@foundation_date.setter
def foundation_date(self, foundation_date):
"""Sets the foundation_date of this HistoricPlace.
Description not available # noqa: E501
:param foundation_date: The foundation_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._foundation_date = foundation_date
@property
def maximum_depth(self):
"""Gets the maximum_depth of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The maximum_depth of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._maximum_depth
@maximum_depth.setter
def maximum_depth(self, maximum_depth):
"""Sets the maximum_depth of this HistoricPlace.
Description not available # noqa: E501
:param maximum_depth: The maximum_depth of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._maximum_depth = maximum_depth
@property
def teryt_code(self):
"""Gets the teryt_code of this HistoricPlace. # noqa: E501
indexing code used by the Polish National Official Register of the Territorial Division of the Country (TERYT) to identify various entities # noqa: E501
:return: The teryt_code of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._teryt_code
@teryt_code.setter
def teryt_code(self, teryt_code):
"""Sets the teryt_code of this HistoricPlace.
indexing code used by the Polish National Official Register of the Territorial Division of the Country (TERYT) to identify various entities # noqa: E501
:param teryt_code: The teryt_code of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._teryt_code = teryt_code
@property
def demolition_year(self):
"""Gets the demolition_year of this HistoricPlace. # noqa: E501
The year the building was demolished. # noqa: E501
:return: The demolition_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._demolition_year
@demolition_year.setter
def demolition_year(self, demolition_year):
"""Sets the demolition_year of this HistoricPlace.
The year the building was demolished. # noqa: E501
:param demolition_year: The demolition_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._demolition_year = demolition_year
@property
def smallest_country(self):
"""Gets the smallest_country of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The smallest_country of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._smallest_country
@smallest_country.setter
def smallest_country(self, smallest_country):
"""Sets the smallest_country of this HistoricPlace.
Description not available # noqa: E501
:param smallest_country: The smallest_country of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._smallest_country = smallest_country
@property
def algerian_name(self):
"""Gets the algerian_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The algerian_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._algerian_name
@algerian_name.setter
def algerian_name(self, algerian_name):
"""Sets the algerian_name of this HistoricPlace.
Description not available # noqa: E501
:param algerian_name: The algerian_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._algerian_name = algerian_name
@property
def map(self):
"""Gets the map of this HistoricPlace. # noqa: E501
A map of the place. # noqa: E501
:return: The map of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._map
@map.setter
def map(self, map):
"""Sets the map of this HistoricPlace.
A map of the place. # noqa: E501
:param map: The map of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._map = map
@property
def localization_thumbnail_caption(self):
"""Gets the localization_thumbnail_caption of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The localization_thumbnail_caption of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._localization_thumbnail_caption
@localization_thumbnail_caption.setter
def localization_thumbnail_caption(self, localization_thumbnail_caption):
"""Sets the localization_thumbnail_caption of this HistoricPlace.
Description not available # noqa: E501
:param localization_thumbnail_caption: The localization_thumbnail_caption of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._localization_thumbnail_caption = localization_thumbnail_caption
@property
def unlc_code(self):
"""Gets the unlc_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The unlc_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._unlc_code
@unlc_code.setter
def unlc_code(self, unlc_code):
"""Sets the unlc_code of this HistoricPlace.
Description not available # noqa: E501
:param unlc_code: The unlc_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._unlc_code = unlc_code
@property
def sicilian_name(self):
"""Gets the sicilian_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sicilian_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._sicilian_name
@sicilian_name.setter
def sicilian_name(self, sicilian_name):
"""Sets the sicilian_name of this HistoricPlace.
Description not available # noqa: E501
:param sicilian_name: The sicilian_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._sicilian_name = sicilian_name
@property
def department_position(self):
"""Gets the department_position of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The department_position of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._department_position
@department_position.setter
def department_position(self, department_position):
"""Sets the department_position of this HistoricPlace.
Description not available # noqa: E501
:param department_position: The department_position of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._department_position = department_position
@property
def population_pct_men(self):
"""Gets the population_pct_men of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_pct_men of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._population_pct_men
@population_pct_men.setter
def population_pct_men(self, population_pct_men):
"""Sets the population_pct_men of this HistoricPlace.
Description not available # noqa: E501
:param population_pct_men: The population_pct_men of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._population_pct_men = population_pct_men
@property
def law_country(self):
"""Gets the law_country of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The law_country of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._law_country
@law_country.setter
def law_country(self, law_country):
"""Sets the law_country of this HistoricPlace.
Description not available # noqa: E501
:param law_country: The law_country of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._law_country = law_country
@property
def summer_temperature(self):
"""Gets the summer_temperature of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The summer_temperature of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._summer_temperature
@summer_temperature.setter
def summer_temperature(self, summer_temperature):
"""Sets the summer_temperature of this HistoricPlace.
Description not available # noqa: E501
:param summer_temperature: The summer_temperature of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._summer_temperature = summer_temperature
@property
def area_date(self):
"""Gets the area_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._area_date
@area_date.setter
def area_date(self, area_date):
"""Sets the area_date of this HistoricPlace.
Description not available # noqa: E501
:param area_date: The area_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._area_date = area_date
@property
def kind_of_coordinate(self):
"""Gets the kind_of_coordinate of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The kind_of_coordinate of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._kind_of_coordinate
@kind_of_coordinate.setter
def kind_of_coordinate(self, kind_of_coordinate):
"""Sets the kind_of_coordinate of this HistoricPlace.
Description not available # noqa: E501
:param kind_of_coordinate: The kind_of_coordinate of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._kind_of_coordinate = kind_of_coordinate
@property
def black_long_distance_piste_number(self):
"""Gets the black_long_distance_piste_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The black_long_distance_piste_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._black_long_distance_piste_number
@black_long_distance_piste_number.setter
def black_long_distance_piste_number(self, black_long_distance_piste_number):
"""Sets the black_long_distance_piste_number of this HistoricPlace.
Description not available # noqa: E501
:param black_long_distance_piste_number: The black_long_distance_piste_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._black_long_distance_piste_number = black_long_distance_piste_number
@property
def water_area(self):
"""Gets the water_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The water_area of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._water_area
@water_area.setter
def water_area(self, water_area):
"""Sets the water_area of this HistoricPlace.
Description not available # noqa: E501
:param water_area: The water_area of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._water_area = water_area
@property
def frontier_length(self):
"""Gets the frontier_length of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The frontier_length of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._frontier_length
@frontier_length.setter
def frontier_length(self, frontier_length):
"""Sets the frontier_length of this HistoricPlace.
Description not available # noqa: E501
:param frontier_length: The frontier_length of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._frontier_length = frontier_length
@property
def tamazight_settlement_name(self):
"""Gets the tamazight_settlement_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The tamazight_settlement_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._tamazight_settlement_name
@tamazight_settlement_name.setter
def tamazight_settlement_name(self, tamazight_settlement_name):
"""Sets the tamazight_settlement_name of this HistoricPlace.
Description not available # noqa: E501
:param tamazight_settlement_name: The tamazight_settlement_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._tamazight_settlement_name = tamazight_settlement_name
@property
def reopening_date(self):
"""Gets the reopening_date of this HistoricPlace. # noqa: E501
Date of reopening the architectural structure. # noqa: E501
:return: The reopening_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._reopening_date
@reopening_date.setter
def reopening_date(self, reopening_date):
"""Sets the reopening_date of this HistoricPlace.
Date of reopening the architectural structure. # noqa: E501
:param reopening_date: The reopening_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._reopening_date = reopening_date
@property
def okato_code(self):
"""Gets the okato_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The okato_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._okato_code
@okato_code.setter
def okato_code(self, okato_code):
"""Sets the okato_code of this HistoricPlace.
Description not available # noqa: E501
:param okato_code: The okato_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._okato_code = okato_code
@property
def disappearance_date(self):
"""Gets the disappearance_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The disappearance_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._disappearance_date
@disappearance_date.setter
def disappearance_date(self, disappearance_date):
"""Sets the disappearance_date of this HistoricPlace.
Description not available # noqa: E501
:param disappearance_date: The disappearance_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._disappearance_date = disappearance_date
@property
def seating_capacity(self):
"""Gets the seating_capacity of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The seating_capacity of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._seating_capacity
@seating_capacity.setter
def seating_capacity(self, seating_capacity):
"""Sets the seating_capacity of this HistoricPlace.
Description not available # noqa: E501
:param seating_capacity: The seating_capacity of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._seating_capacity = seating_capacity
@property
def population_urban_density(self):
"""Gets the population_urban_density of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_urban_density of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._population_urban_density
@population_urban_density.setter
def population_urban_density(self, population_urban_density):
"""Sets the population_urban_density of this HistoricPlace.
Description not available # noqa: E501
:param population_urban_density: The population_urban_density of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._population_urban_density = population_urban_density
@property
def building_type(self):
"""Gets the building_type of this HistoricPlace. # noqa: E501
Type is too general. We should be able to distinguish types of music from types of architecture # noqa: E501
:return: The building_type of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._building_type
@building_type.setter
def building_type(self, building_type):
"""Sets the building_type of this HistoricPlace.
Type is too general. We should be able to distinguish types of music from types of architecture # noqa: E501
:param building_type: The building_type of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._building_type = building_type
@property
def largest_country(self):
"""Gets the largest_country of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The largest_country of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._largest_country
@largest_country.setter
def largest_country(self, largest_country):
"""Sets the largest_country of this HistoricPlace.
Description not available # noqa: E501
:param largest_country: The largest_country of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._largest_country = largest_country
@property
def phone_prefix(self):
"""Gets the phone_prefix of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The phone_prefix of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._phone_prefix
@phone_prefix.setter
def phone_prefix(self, phone_prefix):
"""Sets the phone_prefix of this HistoricPlace.
Description not available # noqa: E501
:param phone_prefix: The phone_prefix of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._phone_prefix = phone_prefix
@property
def capital(self):
"""Gets the capital of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The capital of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._capital
@capital.setter
def capital(self, capital):
"""Sets the capital of this HistoricPlace.
Description not available # noqa: E501
:param capital: The capital of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._capital = capital
@property
def status_year(self):
"""Gets the status_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The status_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._status_year
@status_year.setter
def status_year(self, status_year):
"""Sets the status_year of this HistoricPlace.
Description not available # noqa: E501
:param status_year: The status_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._status_year = status_year
@property
def flora(self):
"""Gets the flora of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The flora of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._flora
@flora.setter
def flora(self, flora):
"""Sets the flora of this HistoricPlace.
Description not available # noqa: E501
:param flora: The flora of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._flora = flora
@property
def agglomeration_area(self):
"""Gets the agglomeration_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The agglomeration_area of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._agglomeration_area
@agglomeration_area.setter
def agglomeration_area(self, agglomeration_area):
"""Sets the agglomeration_area of this HistoricPlace.
Description not available # noqa: E501
:param agglomeration_area: The agglomeration_area of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._agglomeration_area = agglomeration_area
@property
def cornish_name(self):
"""Gets the cornish_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The cornish_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._cornish_name
@cornish_name.setter
def cornish_name(self, cornish_name):
"""Sets the cornish_name of this HistoricPlace.
Description not available # noqa: E501
:param cornish_name: The cornish_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._cornish_name = cornish_name
@property
def largest_city(self):
"""Gets the largest_city of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The largest_city of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._largest_city
@largest_city.setter
def largest_city(self, largest_city):
"""Sets the largest_city of this HistoricPlace.
Description not available # noqa: E501
:param largest_city: The largest_city of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._largest_city = largest_city
@property
def licence_number_label(self):
"""Gets the licence_number_label of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The licence_number_label of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._licence_number_label
@licence_number_label.setter
def licence_number_label(self, licence_number_label):
"""Sets the licence_number_label of this HistoricPlace.
Description not available # noqa: E501
:param licence_number_label: The licence_number_label of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._licence_number_label = licence_number_label
@property
def limit(self):
"""Gets the limit of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The limit of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._limit
@limit.setter
def limit(self, limit):
"""Sets the limit of this HistoricPlace.
Description not available # noqa: E501
:param limit: The limit of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._limit = limit
@property
def scots_name(self):
"""Gets the scots_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The scots_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._scots_name
@scots_name.setter
def scots_name(self, scots_name):
"""Sets the scots_name of this HistoricPlace.
Description not available # noqa: E501
:param scots_name: The scots_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._scots_name = scots_name
@property
def refgeo(self):
"""Gets the refgeo of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The refgeo of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._refgeo
@refgeo.setter
def refgeo(self, refgeo):
"""Sets the refgeo of this HistoricPlace.
Description not available # noqa: E501
:param refgeo: The refgeo of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._refgeo = refgeo
@property
def refgen(self):
"""Gets the refgen of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The refgen of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._refgen
@refgen.setter
def refgen(self, refgen):
"""Sets the refgen of this HistoricPlace.
Description not available # noqa: E501
:param refgen: The refgen of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._refgen = refgen
@property
def population_as_of(self):
"""Gets the population_as_of of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_as_of of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._population_as_of
@population_as_of.setter
def population_as_of(self, population_as_of):
"""Sets the population_as_of of this HistoricPlace.
Description not available # noqa: E501
:param population_as_of: The population_as_of of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._population_as_of = population_as_of
@property
def different(self):
"""Gets the different of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The different of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._different
@different.setter
def different(self, different):
"""Sets the different of this HistoricPlace.
Description not available # noqa: E501
:param different: The different of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._different = different
@property
def emblem(self):
"""Gets the emblem of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The emblem of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._emblem
@emblem.setter
def emblem(self, emblem):
"""Sets the emblem of this HistoricPlace.
Description not available # noqa: E501
:param emblem: The emblem of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._emblem = emblem
@property
def representative(self):
"""Gets the representative of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The representative of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._representative
@representative.setter
def representative(self, representative):
"""Sets the representative of this HistoricPlace.
Description not available # noqa: E501
:param representative: The representative of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._representative = representative
@property
def maximum_area_quote(self):
"""Gets the maximum_area_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The maximum_area_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._maximum_area_quote
@maximum_area_quote.setter
def maximum_area_quote(self, maximum_area_quote):
"""Sets the maximum_area_quote of this HistoricPlace.
Description not available # noqa: E501
:param maximum_area_quote: The maximum_area_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._maximum_area_quote = maximum_area_quote
@property
def utc_offset(self):
"""Gets the utc_offset of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The utc_offset of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._utc_offset
@utc_offset.setter
def utc_offset(self, utc_offset):
"""Sets the utc_offset of this HistoricPlace.
Description not available # noqa: E501
:param utc_offset: The utc_offset of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._utc_offset = utc_offset
@property
def pluviometry(self):
"""Gets the pluviometry of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The pluviometry of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._pluviometry
@pluviometry.setter
def pluviometry(self, pluviometry):
"""Sets the pluviometry of this HistoricPlace.
Description not available # noqa: E501
:param pluviometry: The pluviometry of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._pluviometry = pluviometry
@property
def german_name(self):
"""Gets the german_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The german_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._german_name
@german_name.setter
def german_name(self, german_name):
"""Sets the german_name of this HistoricPlace.
Description not available # noqa: E501
:param german_name: The german_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._german_name = german_name
@property
def per_capita_income_rank(self):
"""Gets the per_capita_income_rank of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The per_capita_income_rank of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._per_capita_income_rank
@per_capita_income_rank.setter
def per_capita_income_rank(self, per_capita_income_rank):
"""Sets the per_capita_income_rank of this HistoricPlace.
Description not available # noqa: E501
:param per_capita_income_rank: The per_capita_income_rank of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._per_capita_income_rank = per_capita_income_rank
@property
def ski_piste_kilometre(self):
"""Gets the ski_piste_kilometre of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The ski_piste_kilometre of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._ski_piste_kilometre
@ski_piste_kilometre.setter
def ski_piste_kilometre(self, ski_piste_kilometre):
"""Sets the ski_piste_kilometre of this HistoricPlace.
Description not available # noqa: E501
:param ski_piste_kilometre: The ski_piste_kilometre of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._ski_piste_kilometre = ski_piste_kilometre
@property
def distance_to_edinburgh(self):
"""Gets the distance_to_edinburgh of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The distance_to_edinburgh of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._distance_to_edinburgh
@distance_to_edinburgh.setter
def distance_to_edinburgh(self, distance_to_edinburgh):
"""Sets the distance_to_edinburgh of this HistoricPlace.
Description not available # noqa: E501
:param distance_to_edinburgh: The distance_to_edinburgh of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._distance_to_edinburgh = distance_to_edinburgh
@property
def minimum_area(self):
"""Gets the minimum_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The minimum_area of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._minimum_area
@minimum_area.setter
def minimum_area(self, minimum_area):
"""Sets the minimum_area of this HistoricPlace.
Description not available # noqa: E501
:param minimum_area: The minimum_area of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._minimum_area = minimum_area
@property
def municipality_code(self):
"""Gets the municipality_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The municipality_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._municipality_code
@municipality_code.setter
def municipality_code(self, municipality_code):
"""Sets the municipality_code of this HistoricPlace.
Description not available # noqa: E501
:param municipality_code: The municipality_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._municipality_code = municipality_code
@property
def population_rural_density(self):
"""Gets the population_rural_density of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_rural_density of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._population_rural_density
@population_rural_density.setter
def population_rural_density(self, population_rural_density):
"""Sets the population_rural_density of this HistoricPlace.
Description not available # noqa: E501
:param population_rural_density: The population_rural_density of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._population_rural_density = population_rural_density
@property
def kabyle_name(self):
"""Gets the kabyle_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The kabyle_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._kabyle_name
@kabyle_name.setter
def kabyle_name(self, kabyle_name):
"""Sets the kabyle_name of this HistoricPlace.
Description not available # noqa: E501
:param kabyle_name: The kabyle_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._kabyle_name = kabyle_name
@property
def red_ski_piste_number(self):
"""Gets the red_ski_piste_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The red_ski_piste_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._red_ski_piste_number
@red_ski_piste_number.setter
def red_ski_piste_number(self, red_ski_piste_number):
"""Sets the red_ski_piste_number of this HistoricPlace.
Description not available # noqa: E501
:param red_ski_piste_number: The red_ski_piste_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._red_ski_piste_number = red_ski_piste_number
@property
def other_name(self):
"""Gets the other_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The other_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._other_name
@other_name.setter
def other_name(self, other_name):
"""Sets the other_name of this HistoricPlace.
Description not available # noqa: E501
:param other_name: The other_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._other_name = other_name
@property
def welsh_name(self):
"""Gets the welsh_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The welsh_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._welsh_name
@welsh_name.setter
def welsh_name(self, welsh_name):
"""Sets the welsh_name of this HistoricPlace.
Description not available # noqa: E501
:param welsh_name: The welsh_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._welsh_name = welsh_name
@property
def lake(self):
"""Gets the lake of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The lake of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._lake
@lake.setter
def lake(self, lake):
"""Sets the lake of this HistoricPlace.
Description not available # noqa: E501
:param lake: The lake of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._lake = lake
@property
def collectivity_minority(self):
"""Gets the collectivity_minority of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The collectivity_minority of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._collectivity_minority
@collectivity_minority.setter
def collectivity_minority(self, collectivity_minority):
"""Sets the collectivity_minority of this HistoricPlace.
Description not available # noqa: E501
:param collectivity_minority: The collectivity_minority of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._collectivity_minority = collectivity_minority
@property
def regional_language(self):
"""Gets the regional_language of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The regional_language of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._regional_language
@regional_language.setter
def regional_language(self, regional_language):
"""Sets the regional_language of this HistoricPlace.
Description not available # noqa: E501
:param regional_language: The regional_language of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._regional_language = regional_language
@property
def chaoui_name(self):
"""Gets the chaoui_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The chaoui_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._chaoui_name
@chaoui_name.setter
def chaoui_name(self, chaoui_name):
"""Sets the chaoui_name of this HistoricPlace.
Description not available # noqa: E501
:param chaoui_name: The chaoui_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._chaoui_name = chaoui_name
@property
def english_name(self):
"""Gets the english_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The english_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._english_name
@english_name.setter
def english_name(self, english_name):
"""Sets the english_name of this HistoricPlace.
Description not available # noqa: E501
:param english_name: The english_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._english_name = english_name
@property
def county_seat(self):
"""Gets the county_seat of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The county_seat of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._county_seat
@county_seat.setter
def county_seat(self, county_seat):
"""Sets the county_seat of this HistoricPlace.
Description not available # noqa: E501
:param county_seat: The county_seat of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._county_seat = county_seat
@property
def purchasing_power_parity_year(self):
"""Gets the purchasing_power_parity_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The purchasing_power_parity_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._purchasing_power_parity_year
@purchasing_power_parity_year.setter
def purchasing_power_parity_year(self, purchasing_power_parity_year):
"""Sets the purchasing_power_parity_year of this HistoricPlace.
Description not available # noqa: E501
:param purchasing_power_parity_year: The purchasing_power_parity_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._purchasing_power_parity_year = purchasing_power_parity_year
@property
def lieutenancy_area(self):
"""Gets the lieutenancy_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The lieutenancy_area of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._lieutenancy_area
@lieutenancy_area.setter
def lieutenancy_area(self, lieutenancy_area):
"""Sets the lieutenancy_area of this HistoricPlace.
Description not available # noqa: E501
:param lieutenancy_area: The lieutenancy_area of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._lieutenancy_area = lieutenancy_area
@property
def historical_map(self):
"""Gets the historical_map of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The historical_map of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._historical_map
@historical_map.setter
def historical_map(self, historical_map):
"""Sets the historical_map of this HistoricPlace.
Description not available # noqa: E501
:param historical_map: The historical_map of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._historical_map = historical_map
@property
def people_name(self):
"""Gets the people_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The people_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._people_name
@people_name.setter
def people_name(self, people_name):
"""Sets the people_name of this HistoricPlace.
Description not available # noqa: E501
:param people_name: The people_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._people_name = people_name
@property
def regency(self):
"""Gets the regency of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The regency of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._regency
@regency.setter
def regency(self, regency):
"""Sets the regency of this HistoricPlace.
Description not available # noqa: E501
:param regency: The regency of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._regency = regency
@property
def code_municipal_monument(self):
"""Gets the code_municipal_monument of this HistoricPlace. # noqa: E501
Code assigned to (Dutch) monuments at the municipal level, deemed to be of local value # noqa: E501
:return: The code_municipal_monument of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._code_municipal_monument
@code_municipal_monument.setter
def code_municipal_monument(self, code_municipal_monument):
"""Sets the code_municipal_monument of this HistoricPlace.
Code assigned to (Dutch) monuments at the municipal level, deemed to be of local value # noqa: E501
:param code_municipal_monument: The code_municipal_monument of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._code_municipal_monument = code_municipal_monument
@property
def architectural_style(self):
"""Gets the architectural_style of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The architectural_style of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._architectural_style
@architectural_style.setter
def architectural_style(self, architectural_style):
"""Sets the architectural_style of this HistoricPlace.
Description not available # noqa: E501
:param architectural_style: The architectural_style of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._architectural_style = architectural_style
@property
def purchasing_power_parity_rank(self):
"""Gets the purchasing_power_parity_rank of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The purchasing_power_parity_rank of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._purchasing_power_parity_rank
@purchasing_power_parity_rank.setter
def purchasing_power_parity_rank(self, purchasing_power_parity_rank):
"""Sets the purchasing_power_parity_rank of this HistoricPlace.
Description not available # noqa: E501
:param purchasing_power_parity_rank: The purchasing_power_parity_rank of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._purchasing_power_parity_rank = purchasing_power_parity_rank
@property
def depth_quote(self):
"""Gets the depth_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The depth_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._depth_quote
@depth_quote.setter
def depth_quote(self, depth_quote):
"""Sets the depth_quote of this HistoricPlace.
Description not available # noqa: E501
:param depth_quote: The depth_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._depth_quote = depth_quote
@property
def reopening_year(self):
"""Gets the reopening_year of this HistoricPlace. # noqa: E501
Year of reopening the architectural structure. # noqa: E501
:return: The reopening_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._reopening_year
@reopening_year.setter
def reopening_year(self, reopening_year):
"""Sets the reopening_year of this HistoricPlace.
Year of reopening the architectural structure. # noqa: E501
:param reopening_year: The reopening_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._reopening_year = reopening_year
@property
def avifauna_population(self):
"""Gets the avifauna_population of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The avifauna_population of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._avifauna_population
@avifauna_population.setter
def avifauna_population(self, avifauna_population):
"""Sets the avifauna_population of this HistoricPlace.
Description not available # noqa: E501
:param avifauna_population: The avifauna_population of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._avifauna_population = avifauna_population
@property
def construction(self):
"""Gets the construction of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The construction of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._construction
@construction.setter
def construction(self, construction):
"""Sets the construction of this HistoricPlace.
Description not available # noqa: E501
:param construction: The construction of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._construction = construction
@property
def land(self):
"""Gets the land of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The land of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._land
@land.setter
def land(self, land):
"""Sets the land of this HistoricPlace.
Description not available # noqa: E501
:param land: The land of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._land = land
@property
def sharing_out(self):
"""Gets the sharing_out of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sharing_out of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._sharing_out
@sharing_out.setter
def sharing_out(self, sharing_out):
"""Sets the sharing_out of this HistoricPlace.
Description not available # noqa: E501
:param sharing_out: The sharing_out of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._sharing_out = sharing_out
@property
def department(self):
"""Gets the department of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The department of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._department
@department.setter
def department(self, department):
"""Sets the department of this HistoricPlace.
Description not available # noqa: E501
:param department: The department of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._department = department
@property
def opening_date(self):
"""Gets the opening_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The opening_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._opening_date
@opening_date.setter
def opening_date(self, opening_date):
"""Sets the opening_date of this HistoricPlace.
Description not available # noqa: E501
:param opening_date: The opening_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._opening_date = opening_date
@property
def other_language(self):
"""Gets the other_language of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The other_language of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._other_language
@other_language.setter
def other_language(self, other_language):
"""Sets the other_language of this HistoricPlace.
Description not available # noqa: E501
:param other_language: The other_language of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._other_language = other_language
@property
def ofs_code(self):
"""Gets the ofs_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The ofs_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._ofs_code
@ofs_code.setter
def ofs_code(self, ofs_code):
"""Sets the ofs_code of this HistoricPlace.
Description not available # noqa: E501
:param ofs_code: The ofs_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._ofs_code = ofs_code
@property
def elevation(self):
"""Gets the elevation of this HistoricPlace. # noqa: E501
average elevation above the sea level # noqa: E501
:return: The elevation of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._elevation
@elevation.setter
def elevation(self, elevation):
"""Sets the elevation of this HistoricPlace.
average elevation above the sea level # noqa: E501
:param elevation: The elevation of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._elevation = elevation
@property
def endangered_since(self):
"""Gets the endangered_since of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The endangered_since of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._endangered_since
@endangered_since.setter
def endangered_since(self, endangered_since):
"""Sets the endangered_since of this HistoricPlace.
Description not available # noqa: E501
:param endangered_since: The endangered_since of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._endangered_since = endangered_since
@property
def rank_area(self):
"""Gets the rank_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The rank_area of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._rank_area
@rank_area.setter
def rank_area(self, rank_area):
"""Sets the rank_area of this HistoricPlace.
Description not available # noqa: E501
:param rank_area: The rank_area of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._rank_area = rank_area
@property
def prov_code(self):
"""Gets the prov_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The prov_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._prov_code
@prov_code.setter
def prov_code(self, prov_code):
"""Sets the prov_code of this HistoricPlace.
Description not available # noqa: E501
:param prov_code: The prov_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._prov_code = prov_code
@property
def visitors_percentage_change(self):
"""Gets the visitors_percentage_change of this HistoricPlace. # noqa: E501
Percentage increase or decrease. # noqa: E501
:return: The visitors_percentage_change of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._visitors_percentage_change
@visitors_percentage_change.setter
def visitors_percentage_change(self, visitors_percentage_change):
"""Sets the visitors_percentage_change of this HistoricPlace.
Percentage increase or decrease. # noqa: E501
:param visitors_percentage_change: The visitors_percentage_change of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._visitors_percentage_change = visitors_percentage_change
@property
def merger_date(self):
"""Gets the merger_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The merger_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._merger_date
@merger_date.setter
def merger_date(self, merger_date):
"""Sets the merger_date of this HistoricPlace.
Description not available # noqa: E501
:param merger_date: The merger_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._merger_date = merger_date
@property
def seniunija(self):
"""Gets the seniunija of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The seniunija of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._seniunija
@seniunija.setter
def seniunija(self, seniunija):
"""Sets the seniunija of this HistoricPlace.
Description not available # noqa: E501
:param seniunija: The seniunija of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._seniunija = seniunija
@property
def rebuilding_date(self):
"""Gets the rebuilding_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The rebuilding_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._rebuilding_date
@rebuilding_date.setter
def rebuilding_date(self, rebuilding_date):
"""Sets the rebuilding_date of this HistoricPlace.
Description not available # noqa: E501
:param rebuilding_date: The rebuilding_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._rebuilding_date = rebuilding_date
@property
def city_since(self):
"""Gets the city_since of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The city_since of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._city_since
@city_since.setter
def city_since(self, city_since):
"""Sets the city_since of this HistoricPlace.
Description not available # noqa: E501
:param city_since: The city_since of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._city_since = city_since
@property
def nuts_code(self):
"""Gets the nuts_code of this HistoricPlace. # noqa: E501
Nomenclature of Territorial Units for Statistics (NUTS) is a geocode standard for referencing the subdivisions of countries for statistical purposes. The standard is developed and regulated by the European Union, and thus only covers the member states of the EU in detail. # noqa: E501
:return: The nuts_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._nuts_code
@nuts_code.setter
def nuts_code(self, nuts_code):
"""Sets the nuts_code of this HistoricPlace.
Nomenclature of Territorial Units for Statistics (NUTS) is a geocode standard for referencing the subdivisions of countries for statistical purposes. The standard is developed and regulated by the European Union, and thus only covers the member states of the EU in detail. # noqa: E501
:param nuts_code: The nuts_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._nuts_code = nuts_code
@property
def authority_mandate(self):
"""Gets the authority_mandate of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The authority_mandate of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._authority_mandate
@authority_mandate.setter
def authority_mandate(self, authority_mandate):
"""Sets the authority_mandate of this HistoricPlace.
Description not available # noqa: E501
:param authority_mandate: The authority_mandate of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._authority_mandate = authority_mandate
@property
def gnis_code(self):
"""Gets the gnis_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gnis_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._gnis_code
@gnis_code.setter
def gnis_code(self, gnis_code):
"""Sets the gnis_code of this HistoricPlace.
Description not available # noqa: E501
:param gnis_code: The gnis_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._gnis_code = gnis_code
@property
def deme(self):
"""Gets the deme of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The deme of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._deme
@deme.setter
def deme(self, deme):
"""Sets the deme of this HistoricPlace.
Description not available # noqa: E501
:param deme: The deme of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._deme = deme
@property
def maximum_depth_quote(self):
"""Gets the maximum_depth_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The maximum_depth_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._maximum_depth_quote
@maximum_depth_quote.setter
def maximum_depth_quote(self, maximum_depth_quote):
"""Sets the maximum_depth_quote of this HistoricPlace.
Description not available # noqa: E501
:param maximum_depth_quote: The maximum_depth_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._maximum_depth_quote = maximum_depth_quote
@property
def canton(self):
"""Gets the canton of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The canton of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._canton
@canton.setter
def canton(self, canton):
"""Sets the canton of this HistoricPlace.
Description not available # noqa: E501
:param canton: The canton of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._canton = canton
@property
def province_iso_code(self):
"""Gets the province_iso_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The province_iso_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._province_iso_code
@province_iso_code.setter
def province_iso_code(self, province_iso_code):
"""Sets the province_iso_code of this HistoricPlace.
Description not available # noqa: E501
:param province_iso_code: The province_iso_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._province_iso_code = province_iso_code
@property
def human_development_index_ranking_category(self):
"""Gets the human_development_index_ranking_category of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The human_development_index_ranking_category of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._human_development_index_ranking_category
@human_development_index_ranking_category.setter
def human_development_index_ranking_category(self, human_development_index_ranking_category):
"""Sets the human_development_index_ranking_category of this HistoricPlace.
Description not available # noqa: E501
:param human_development_index_ranking_category: The human_development_index_ranking_category of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._human_development_index_ranking_category = human_development_index_ranking_category
@property
def nation(self):
"""Gets the nation of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The nation of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._nation
@nation.setter
def nation(self, nation):
"""Sets the nation of this HistoricPlace.
Description not available # noqa: E501
:param nation: The nation of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._nation = nation
@property
def arrondissement(self):
"""Gets the arrondissement of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The arrondissement of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._arrondissement
@arrondissement.setter
def arrondissement(self, arrondissement):
"""Sets the arrondissement of this HistoricPlace.
Description not available # noqa: E501
:param arrondissement: The arrondissement of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._arrondissement = arrondissement
@property
def french_name(self):
"""Gets the french_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The french_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._french_name
@french_name.setter
def french_name(self, french_name):
"""Sets the french_name of this HistoricPlace.
Description not available # noqa: E501
:param french_name: The french_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._french_name = french_name
@property
def supply(self):
"""Gets the supply of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The supply of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._supply
@supply.setter
def supply(self, supply):
"""Sets the supply of this HistoricPlace.
Description not available # noqa: E501
:param supply: The supply of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._supply = supply
@property
def agglomeration_population(self):
"""Gets the agglomeration_population of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The agglomeration_population of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._agglomeration_population
@agglomeration_population.setter
def agglomeration_population(self, agglomeration_population):
"""Sets the agglomeration_population of this HistoricPlace.
Description not available # noqa: E501
:param agglomeration_population: The agglomeration_population of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._agglomeration_population = agglomeration_population
@property
def green_ski_piste_number(self):
"""Gets the green_ski_piste_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The green_ski_piste_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._green_ski_piste_number
@green_ski_piste_number.setter
def green_ski_piste_number(self, green_ski_piste_number):
"""Sets the green_ski_piste_number of this HistoricPlace.
Description not available # noqa: E501
:param green_ski_piste_number: The green_ski_piste_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._green_ski_piste_number = green_ski_piste_number
@property
def province(self):
"""Gets the province of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The province of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._province
@province.setter
def province(self, province):
"""Sets the province of this HistoricPlace.
Description not available # noqa: E501
:param province: The province of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._province = province
@property
def meaning(self):
"""Gets the meaning of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The meaning of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._meaning
@meaning.setter
def meaning(self, meaning):
"""Sets the meaning of this HistoricPlace.
Description not available # noqa: E501
:param meaning: The meaning of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._meaning = meaning
@property
def leader_party(self):
"""Gets the leader_party of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The leader_party of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._leader_party
@leader_party.setter
def leader_party(self, leader_party):
"""Sets the leader_party of this HistoricPlace.
Description not available # noqa: E501
:param leader_party: The leader_party of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._leader_party = leader_party
@property
def population_total_ranking(self):
"""Gets the population_total_ranking of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_total_ranking of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._population_total_ranking
@population_total_ranking.setter
def population_total_ranking(self, population_total_ranking):
"""Sets the population_total_ranking of this HistoricPlace.
Description not available # noqa: E501
:param population_total_ranking: The population_total_ranking of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._population_total_ranking = population_total_ranking
@property
def twin_city(self):
"""Gets the twin_city of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The twin_city of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._twin_city
@twin_city.setter
def twin_city(self, twin_city):
"""Sets the twin_city of this HistoricPlace.
Description not available # noqa: E501
:param twin_city: The twin_city of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._twin_city = twin_city
@property
def sharing_out_population(self):
"""Gets the sharing_out_population of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sharing_out_population of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._sharing_out_population
@sharing_out_population.setter
def sharing_out_population(self, sharing_out_population):
"""Sets the sharing_out_population of this HistoricPlace.
Description not available # noqa: E501
:param sharing_out_population: The sharing_out_population of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._sharing_out_population = sharing_out_population
@property
def piscicultural_population(self):
"""Gets the piscicultural_population of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The piscicultural_population of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._piscicultural_population
@piscicultural_population.setter
def piscicultural_population(self, piscicultural_population):
"""Sets the piscicultural_population of this HistoricPlace.
Description not available # noqa: E501
:param piscicultural_population: The piscicultural_population of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._piscicultural_population = piscicultural_population
@property
def distance_to_dublin(self):
"""Gets the distance_to_dublin of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The distance_to_dublin of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._distance_to_dublin
@distance_to_dublin.setter
def distance_to_dublin(self, distance_to_dublin):
"""Sets the distance_to_dublin of this HistoricPlace.
Description not available # noqa: E501
:param distance_to_dublin: The distance_to_dublin of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._distance_to_dublin = distance_to_dublin
@property
def sharing_out_name(self):
"""Gets the sharing_out_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sharing_out_name of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._sharing_out_name
@sharing_out_name.setter
def sharing_out_name(self, sharing_out_name):
"""Sets the sharing_out_name of this HistoricPlace.
Description not available # noqa: E501
:param sharing_out_name: The sharing_out_name of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._sharing_out_name = sharing_out_name
@property
def land_percentage(self):
"""Gets the land_percentage of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The land_percentage of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._land_percentage
@land_percentage.setter
def land_percentage(self, land_percentage):
"""Sets the land_percentage of this HistoricPlace.
Description not available # noqa: E501
:param land_percentage: The land_percentage of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._land_percentage = land_percentage
@property
def visitors_total(self):
"""Gets the visitors_total of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The visitors_total of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._visitors_total
@visitors_total.setter
def visitors_total(self, visitors_total):
"""Sets the visitors_total of this HistoricPlace.
Description not available # noqa: E501
:param visitors_total: The visitors_total of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._visitors_total = visitors_total
@property
def elevator_count(self):
"""Gets the elevator_count of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The elevator_count of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._elevator_count
@elevator_count.setter
def elevator_count(self, elevator_count):
"""Sets the elevator_count of this HistoricPlace.
Description not available # noqa: E501
:param elevator_count: The elevator_count of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._elevator_count = elevator_count
@property
def population_year(self):
"""Gets the population_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._population_year
@population_year.setter
def population_year(self, population_year):
"""Sets the population_year of this HistoricPlace.
Description not available # noqa: E501
:param population_year: The population_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._population_year = population_year
@property
def nrhp_type(self):
"""Gets the nrhp_type of this HistoricPlace. # noqa: E501
Type of historic place as defined by the US National Park Service. For instance National Historic Landmark, National Monument or National Battlefield. # noqa: E501
:return: The nrhp_type of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._nrhp_type
@nrhp_type.setter
def nrhp_type(self, nrhp_type):
"""Sets the nrhp_type of this HistoricPlace.
Type of historic place as defined by the US National Park Service. For instance National Historic Landmark, National Monument or National Battlefield. # noqa: E501
:param nrhp_type: The nrhp_type of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._nrhp_type = nrhp_type
@property
def administrative_collectivity(self):
"""Gets the administrative_collectivity of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The administrative_collectivity of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._administrative_collectivity
@administrative_collectivity.setter
def administrative_collectivity(self, administrative_collectivity):
"""Sets the administrative_collectivity of this HistoricPlace.
Description not available # noqa: E501
:param administrative_collectivity: The administrative_collectivity of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._administrative_collectivity = administrative_collectivity
@property
def per_capita_income_as_of(self):
"""Gets the per_capita_income_as_of of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The per_capita_income_as_of of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._per_capita_income_as_of
@per_capita_income_as_of.setter
def per_capita_income_as_of(self, per_capita_income_as_of):
"""Sets the per_capita_income_as_of of this HistoricPlace.
Description not available # noqa: E501
:param per_capita_income_as_of: The per_capita_income_as_of of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._per_capita_income_as_of = per_capita_income_as_of
@property
def architectual_bureau(self):
"""Gets the architectual_bureau of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The architectual_bureau of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._architectual_bureau
@architectual_bureau.setter
def architectual_bureau(self, architectual_bureau):
"""Sets the architectual_bureau of this HistoricPlace.
Description not available # noqa: E501
:param architectual_bureau: The architectual_bureau of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._architectual_bureau = architectual_bureau
@property
def circle(self):
"""Gets the circle of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The circle of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._circle
@circle.setter
def circle(self, circle):
"""Sets the circle of this HistoricPlace.
Description not available # noqa: E501
:param circle: The circle of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._circle = circle
@property
def occitan_name(self):
"""Gets the occitan_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The occitan_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._occitan_name
@occitan_name.setter
def occitan_name(self, occitan_name):
"""Sets the occitan_name of this HistoricPlace.
Description not available # noqa: E501
:param occitan_name: The occitan_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._occitan_name = occitan_name
@property
def blue_long_distance_piste_number(self):
"""Gets the blue_long_distance_piste_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The blue_long_distance_piste_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._blue_long_distance_piste_number
@blue_long_distance_piste_number.setter
def blue_long_distance_piste_number(self, blue_long_distance_piste_number):
"""Sets the blue_long_distance_piste_number of this HistoricPlace.
Description not available # noqa: E501
:param blue_long_distance_piste_number: The blue_long_distance_piste_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._blue_long_distance_piste_number = blue_long_distance_piste_number
@property
def building_start_date(self):
"""Gets the building_start_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The building_start_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._building_start_date
@building_start_date.setter
def building_start_date(self, building_start_date):
"""Sets the building_start_date of this HistoricPlace.
Description not available # noqa: E501
:param building_start_date: The building_start_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._building_start_date = building_start_date
@property
def algerian_settlement_name(self):
"""Gets the algerian_settlement_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The algerian_settlement_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._algerian_settlement_name
@algerian_settlement_name.setter
def algerian_settlement_name(self, algerian_settlement_name):
"""Sets the algerian_settlement_name of this HistoricPlace.
Description not available # noqa: E501
:param algerian_settlement_name: The algerian_settlement_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._algerian_settlement_name = algerian_settlement_name
@property
def gross_domestic_product_purchasing_power_parity_per_capita(self):
"""Gets the gross_domestic_product_purchasing_power_parity_per_capita of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gross_domestic_product_purchasing_power_parity_per_capita of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._gross_domestic_product_purchasing_power_parity_per_capita
@gross_domestic_product_purchasing_power_parity_per_capita.setter
def gross_domestic_product_purchasing_power_parity_per_capita(self, gross_domestic_product_purchasing_power_parity_per_capita):
"""Sets the gross_domestic_product_purchasing_power_parity_per_capita of this HistoricPlace.
Description not available # noqa: E501
:param gross_domestic_product_purchasing_power_parity_per_capita: The gross_domestic_product_purchasing_power_parity_per_capita of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._gross_domestic_product_purchasing_power_parity_per_capita = gross_domestic_product_purchasing_power_parity_per_capita
@property
def date_agreement(self):
"""Gets the date_agreement of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The date_agreement of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._date_agreement
@date_agreement.setter
def date_agreement(self, date_agreement):
"""Sets the date_agreement of this HistoricPlace.
Description not available # noqa: E501
:param date_agreement: The date_agreement of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._date_agreement = date_agreement
@property
def frazioni(self):
"""Gets the frazioni of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The frazioni of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._frazioni
@frazioni.setter
def frazioni(self, frazioni):
"""Sets the frazioni of this HistoricPlace.
Description not available # noqa: E501
:param frazioni: The frazioni of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._frazioni = frazioni
@property
def mayor_article(self):
"""Gets the mayor_article of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The mayor_article of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._mayor_article
@mayor_article.setter
def mayor_article(self, mayor_article):
"""Sets the mayor_article of this HistoricPlace.
Description not available # noqa: E501
:param mayor_article: The mayor_article of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._mayor_article = mayor_article
@property
def iso31661_code(self):
"""Gets the iso31661_code of this HistoricPlace. # noqa: E501
defines codes for the names of countries, dependent territories, and special areas of geographical interest # noqa: E501
:return: The iso31661_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._iso31661_code
@iso31661_code.setter
def iso31661_code(self, iso31661_code):
"""Sets the iso31661_code of this HistoricPlace.
defines codes for the names of countries, dependent territories, and special areas of geographical interest # noqa: E501
:param iso31661_code: The iso31661_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._iso31661_code = iso31661_code
@property
def simc_code(self):
"""Gets the simc_code of this HistoricPlace. # noqa: E501
indexing code used by the Polish National Official Register of the Territorial Division of the Country (TERYT) to identify various entities # noqa: E501
:return: The simc_code of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._simc_code
@simc_code.setter
def simc_code(self, simc_code):
"""Sets the simc_code of this HistoricPlace.
indexing code used by the Polish National Official Register of the Territorial Division of the Country (TERYT) to identify various entities # noqa: E501
:param simc_code: The simc_code of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._simc_code = simc_code
@property
def council_area(self):
"""Gets the council_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The council_area of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._council_area
@council_area.setter
def council_area(self, council_area):
"""Sets the council_area of this HistoricPlace.
Description not available # noqa: E501
:param council_area: The council_area of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._council_area = council_area
@property
def unesco(self):
"""Gets the unesco of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The unesco of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._unesco
@unesco.setter
def unesco(self, unesco):
"""Sets the unesco of this HistoricPlace.
Description not available # noqa: E501
:param unesco: The unesco of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._unesco = unesco
@property
def gross_domestic_product(self):
"""Gets the gross_domestic_product of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gross_domestic_product of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._gross_domestic_product
@gross_domestic_product.setter
def gross_domestic_product(self, gross_domestic_product):
"""Sets the gross_domestic_product of this HistoricPlace.
Description not available # noqa: E501
:param gross_domestic_product: The gross_domestic_product of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._gross_domestic_product = gross_domestic_product
@property
def gross_domestic_product_rank(self):
"""Gets the gross_domestic_product_rank of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gross_domestic_product_rank of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._gross_domestic_product_rank
@gross_domestic_product_rank.setter
def gross_domestic_product_rank(self, gross_domestic_product_rank):
"""Sets the gross_domestic_product_rank of this HistoricPlace.
Description not available # noqa: E501
:param gross_domestic_product_rank: The gross_domestic_product_rank of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._gross_domestic_product_rank = gross_domestic_product_rank
@property
def distance_to_douglas(self):
"""Gets the distance_to_douglas of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The distance_to_douglas of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._distance_to_douglas
@distance_to_douglas.setter
def distance_to_douglas(self, distance_to_douglas):
"""Sets the distance_to_douglas of this HistoricPlace.
Description not available # noqa: E501
:param distance_to_douglas: The distance_to_douglas of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._distance_to_douglas = distance_to_douglas
@property
def visitor_statistics_as_of(self):
"""Gets the visitor_statistics_as_of of this HistoricPlace. # noqa: E501
Year visitor information was gathered. # noqa: E501
:return: The visitor_statistics_as_of of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._visitor_statistics_as_of
@visitor_statistics_as_of.setter
def visitor_statistics_as_of(self, visitor_statistics_as_of):
"""Sets the visitor_statistics_as_of of this HistoricPlace.
Year visitor information was gathered. # noqa: E501
:param visitor_statistics_as_of: The visitor_statistics_as_of of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._visitor_statistics_as_of = visitor_statistics_as_of
@property
def number_of_municipalities(self):
"""Gets the number_of_municipalities of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The number_of_municipalities of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._number_of_municipalities
@number_of_municipalities.setter
def number_of_municipalities(self, number_of_municipalities):
"""Sets the number_of_municipalities of this HistoricPlace.
Description not available # noqa: E501
:param number_of_municipalities: The number_of_municipalities of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._number_of_municipalities = number_of_municipalities
@property
def coordinates(self):
"""Gets the coordinates of this HistoricPlace. # noqa: E501
ένα σύστημα συντεταγμένων με δύο μεγέθη. # noqa: E501
:return: The coordinates of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._coordinates
@coordinates.setter
def coordinates(self, coordinates):
"""Sets the coordinates of this HistoricPlace.
ένα σύστημα συντεταγμένων με δύο μεγέθη. # noqa: E501
:param coordinates: The coordinates of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._coordinates = coordinates
@property
def gini_coefficient_ranking(self):
"""Gets the gini_coefficient_ranking of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gini_coefficient_ranking of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._gini_coefficient_ranking
@gini_coefficient_ranking.setter
def gini_coefficient_ranking(self, gini_coefficient_ranking):
"""Sets the gini_coefficient_ranking of this HistoricPlace.
Description not available # noqa: E501
:param gini_coefficient_ranking: The gini_coefficient_ranking of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._gini_coefficient_ranking = gini_coefficient_ranking
@property
def highest_point(self):
"""Gets the highest_point of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The highest_point of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._highest_point
@highest_point.setter
def highest_point(self, highest_point):
"""Sets the highest_point of this HistoricPlace.
Description not available # noqa: E501
:param highest_point: The highest_point of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._highest_point = highest_point
@property
def flower(self):
"""Gets the flower of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The flower of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._flower
@flower.setter
def flower(self, flower):
"""Sets the flower of this HistoricPlace.
Description not available # noqa: E501
:param flower: The flower of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._flower = flower
@property
def hra_state(self):
"""Gets the hra_state of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The hra_state of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._hra_state
@hra_state.setter
def hra_state(self, hra_state):
"""Sets the hra_state of this HistoricPlace.
Description not available # noqa: E501
:param hra_state: The hra_state of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._hra_state = hra_state
@property
def depths(self):
"""Gets the depths of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The depths of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._depths
@depths.setter
def depths(self, depths):
"""Sets the depths of this HistoricPlace.
Description not available # noqa: E501
:param depths: The depths of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._depths = depths
@property
def cca_state(self):
"""Gets the cca_state of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The cca_state of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._cca_state
@cca_state.setter
def cca_state(self, cca_state):
"""Sets the cca_state of this HistoricPlace.
Description not available # noqa: E501
:param cca_state: The cca_state of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._cca_state = cca_state
@property
def politic_government_department(self):
"""Gets the politic_government_department of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The politic_government_department of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._politic_government_department
@politic_government_department.setter
def politic_government_department(self, politic_government_department):
"""Sets the politic_government_department of this HistoricPlace.
Description not available # noqa: E501
:param politic_government_department: The politic_government_department of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._politic_government_department = politic_government_department
@property
def currency_code(self):
"""Gets the currency_code of this HistoricPlace. # noqa: E501
ISO 4217 currency designators. # noqa: E501
:return: The currency_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._currency_code
@currency_code.setter
def currency_code(self, currency_code):
"""Sets the currency_code of this HistoricPlace.
ISO 4217 currency designators. # noqa: E501
:param currency_code: The currency_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._currency_code = currency_code
@property
def tu(self):
"""Gets the tu of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The tu of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._tu
@tu.setter
def tu(self, tu):
"""Sets the tu of this HistoricPlace.
Description not available # noqa: E501
:param tu: The tu of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._tu = tu
@property
def population_metro(self):
"""Gets the population_metro of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_metro of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._population_metro
@population_metro.setter
def population_metro(self, population_metro):
"""Sets the population_metro of this HistoricPlace.
Description not available # noqa: E501
:param population_metro: The population_metro of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._population_metro = population_metro
@property
def climb_up_number(self):
"""Gets the climb_up_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The climb_up_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._climb_up_number
@climb_up_number.setter
def climb_up_number(self, climb_up_number):
"""Sets the climb_up_number of this HistoricPlace.
Description not available # noqa: E501
:param climb_up_number: The climb_up_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._climb_up_number = climb_up_number
@property
def founding_person(self):
"""Gets the founding_person of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The founding_person of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._founding_person
@founding_person.setter
def founding_person(self, founding_person):
"""Sets the founding_person of this HistoricPlace.
Description not available # noqa: E501
:param founding_person: The founding_person of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._founding_person = founding_person
@property
def postal_code(self):
"""Gets the postal_code of this HistoricPlace. # noqa: E501
A postal code (known in various countries as a post code, postcode, or ZIP code) is a series of letters and/or digits appended to a postal address for the purpose of sorting mail. # noqa: E501
:return: The postal_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._postal_code
@postal_code.setter
def postal_code(self, postal_code):
"""Sets the postal_code of this HistoricPlace.
A postal code (known in various countries as a post code, postcode, or ZIP code) is a series of letters and/or digits appended to a postal address for the purpose of sorting mail. # noqa: E501
:param postal_code: The postal_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._postal_code = postal_code
@property
def land_area(self):
"""Gets the land_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The land_area of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._land_area
@land_area.setter
def land_area(self, land_area):
"""Sets the land_area of this HistoricPlace.
Description not available # noqa: E501
:param land_area: The land_area of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._land_area = land_area
@property
def code_national_monument(self):
"""Gets the code_national_monument of this HistoricPlace. # noqa: E501
Code assigned to (Dutch) monuments at the national level, deemed to be of national value # noqa: E501
:return: The code_national_monument of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._code_national_monument
@code_national_monument.setter
def code_national_monument(self, code_national_monument):
"""Sets the code_national_monument of this HistoricPlace.
Code assigned to (Dutch) monuments at the national level, deemed to be of national value # noqa: E501
:param code_national_monument: The code_national_monument of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._code_national_monument = code_national_monument
@property
def originally_used_for(self):
"""Gets the originally_used_for of this HistoricPlace. # noqa: E501
Original use of the architectural structure, if it is currently being used as anything other than its original purpose. # noqa: E501
:return: The originally_used_for of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._originally_used_for
@originally_used_for.setter
def originally_used_for(self, originally_used_for):
"""Sets the originally_used_for of this HistoricPlace.
Original use of the architectural structure, if it is currently being used as anything other than its original purpose. # noqa: E501
:param originally_used_for: The originally_used_for of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._originally_used_for = originally_used_for
@property
def president_regional_council_mandate(self):
"""Gets the president_regional_council_mandate of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The president_regional_council_mandate of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._president_regional_council_mandate
@president_regional_council_mandate.setter
def president_regional_council_mandate(self, president_regional_council_mandate):
"""Sets the president_regional_council_mandate of this HistoricPlace.
Description not available # noqa: E501
:param president_regional_council_mandate: The president_regional_council_mandate of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._president_regional_council_mandate = president_regional_council_mandate
@property
def retention_time(self):
"""Gets the retention_time of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The retention_time of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._retention_time
@retention_time.setter
def retention_time(self, retention_time):
"""Sets the retention_time of this HistoricPlace.
Description not available # noqa: E501
:param retention_time: The retention_time of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._retention_time = retention_time
@property
def gini_coefficient_category(self):
"""Gets the gini_coefficient_category of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gini_coefficient_category of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._gini_coefficient_category
@gini_coefficient_category.setter
def gini_coefficient_category(self, gini_coefficient_category):
"""Sets the gini_coefficient_category of this HistoricPlace.
Description not available # noqa: E501
:param gini_coefficient_category: The gini_coefficient_category of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._gini_coefficient_category = gini_coefficient_category
@property
def sardinian_name(self):
"""Gets the sardinian_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sardinian_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._sardinian_name
@sardinian_name.setter
def sardinian_name(self, sardinian_name):
"""Sets the sardinian_name of this HistoricPlace.
Description not available # noqa: E501
:param sardinian_name: The sardinian_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._sardinian_name = sardinian_name
@property
def features(self):
"""Gets the features of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The features of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._features
@features.setter
def features(self, features):
"""Sets the features of this HistoricPlace.
Description not available # noqa: E501
:param features: The features of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._features = features
@property
def forester_district(self):
"""Gets the forester_district of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The forester_district of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._forester_district
@forester_district.setter
def forester_district(self, forester_district):
"""Sets the forester_district of this HistoricPlace.
Description not available # noqa: E501
:param forester_district: The forester_district of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._forester_district = forester_district
@property
def illiteracy(self):
"""Gets the illiteracy of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The illiteracy of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._illiteracy
@illiteracy.setter
def illiteracy(self, illiteracy):
"""Sets the illiteracy of this HistoricPlace.
Description not available # noqa: E501
:param illiteracy: The illiteracy of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._illiteracy = illiteracy
@property
def gross_domestic_product_per_people(self):
"""Gets the gross_domestic_product_per_people of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gross_domestic_product_per_people of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._gross_domestic_product_per_people
@gross_domestic_product_per_people.setter
def gross_domestic_product_per_people(self, gross_domestic_product_per_people):
"""Sets the gross_domestic_product_per_people of this HistoricPlace.
Description not available # noqa: E501
:param gross_domestic_product_per_people: The gross_domestic_product_per_people of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._gross_domestic_product_per_people = gross_domestic_product_per_people
@property
def kind_of_rock(self):
"""Gets the kind_of_rock of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The kind_of_rock of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._kind_of_rock
@kind_of_rock.setter
def kind_of_rock(self, kind_of_rock):
"""Sets the kind_of_rock of this HistoricPlace.
Description not available # noqa: E501
:param kind_of_rock: The kind_of_rock of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._kind_of_rock = kind_of_rock
@property
def arberisht_name(self):
"""Gets the arberisht_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The arberisht_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._arberisht_name
@arberisht_name.setter
def arberisht_name(self, arberisht_name):
"""Sets the arberisht_name of this HistoricPlace.
Description not available # noqa: E501
:param arberisht_name: The arberisht_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._arberisht_name = arberisht_name
@property
def manx_name(self):
"""Gets the manx_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The manx_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._manx_name
@manx_name.setter
def manx_name(self, manx_name):
"""Sets the manx_name of this HistoricPlace.
Description not available # noqa: E501
:param manx_name: The manx_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._manx_name = manx_name
@property
def protection_status(self):
"""Gets the protection_status of this HistoricPlace. # noqa: E501
The sort of status that is granted to a protected Building or Monument. This is not about being protected or not, this is about the nature of the protection regime. E.g., in the Netherlands the protection status 'rijksmonument' points to more elaborate protection than other statuses. # noqa: E501
:return: The protection_status of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._protection_status
@protection_status.setter
def protection_status(self, protection_status):
"""Sets the protection_status of this HistoricPlace.
The sort of status that is granted to a protected Building or Monument. This is not about being protected or not, this is about the nature of the protection regime. E.g., in the Netherlands the protection status 'rijksmonument' points to more elaborate protection than other statuses. # noqa: E501
:param protection_status: The protection_status of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._protection_status = protection_status
@property
def fips_code(self):
"""Gets the fips_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The fips_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._fips_code
@fips_code.setter
def fips_code(self, fips_code):
"""Sets the fips_code of this HistoricPlace.
Description not available # noqa: E501
:param fips_code: The fips_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._fips_code = fips_code
@property
def greek_name(self):
"""Gets the greek_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The greek_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._greek_name
@greek_name.setter
def greek_name(self, greek_name):
"""Sets the greek_name of this HistoricPlace.
Description not available # noqa: E501
:param greek_name: The greek_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._greek_name = greek_name
@property
def population_density(self):
"""Gets the population_density of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_density of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._population_density
@population_density.setter
def population_density(self, population_density):
"""Sets the population_density of this HistoricPlace.
Description not available # noqa: E501
:param population_density: The population_density of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._population_density = population_density
@property
def elevation_quote(self):
"""Gets the elevation_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The elevation_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._elevation_quote
@elevation_quote.setter
def elevation_quote(self, elevation_quote):
"""Sets the elevation_quote of this HistoricPlace.
Description not available # noqa: E501
:param elevation_quote: The elevation_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._elevation_quote = elevation_quote
@property
def outskirts(self):
"""Gets the outskirts of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The outskirts of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._outskirts
@outskirts.setter
def outskirts(self, outskirts):
"""Sets the outskirts of this HistoricPlace.
Description not available # noqa: E501
:param outskirts: The outskirts of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._outskirts = outskirts
@property
def area_urban(self):
"""Gets the area_urban of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_urban of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._area_urban
@area_urban.setter
def area_urban(self, area_urban):
"""Sets the area_urban of this HistoricPlace.
Description not available # noqa: E501
:param area_urban: The area_urban of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._area_urban = area_urban
@property
def unlo_code(self):
"""Gets the unlo_code of this HistoricPlace. # noqa: E501
UN/LOCODE, the United Nations Code for Trade and Transport Locations, is a geographic coding scheme developed and maintained by United Nations Economic Commission for Europe (UNECE), a unit of the United Nations. UN/LOCODE assigns codes to locations used in trade and transport with functions such as seaports, rail and road terminals, airports, post offices and border crossing points. # noqa: E501
:return: The unlo_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._unlo_code
@unlo_code.setter
def unlo_code(self, unlo_code):
"""Sets the unlo_code of this HistoricPlace.
UN/LOCODE, the United Nations Code for Trade and Transport Locations, is a geographic coding scheme developed and maintained by United Nations Economic Commission for Europe (UNECE), a unit of the United Nations. UN/LOCODE assigns codes to locations used in trade and transport with functions such as seaports, rail and road terminals, airports, post offices and border crossing points. # noqa: E501
:param unlo_code: The unlo_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._unlo_code = unlo_code
@property
def district(self):
"""Gets the district of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The district of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._district
@district.setter
def district(self, district):
"""Sets the district of this HistoricPlace.
Description not available # noqa: E501
:param district: The district of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._district = district
@property
def merged_settlement(self):
"""Gets the merged_settlement of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The merged_settlement of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._merged_settlement
@merged_settlement.setter
def merged_settlement(self, merged_settlement):
"""Sets the merged_settlement of this HistoricPlace.
Description not available # noqa: E501
:param merged_settlement: The merged_settlement of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._merged_settlement = merged_settlement
@property
def parliament_type(self):
"""Gets the parliament_type of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The parliament_type of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._parliament_type
@parliament_type.setter
def parliament_type(self, parliament_type):
"""Sets the parliament_type of this HistoricPlace.
Description not available # noqa: E501
:param parliament_type: The parliament_type of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._parliament_type = parliament_type
@property
def previous_entity(self):
"""Gets the previous_entity of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The previous_entity of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._previous_entity
@previous_entity.setter
def previous_entity(self, previous_entity):
"""Sets the previous_entity of this HistoricPlace.
Description not available # noqa: E501
:param previous_entity: The previous_entity of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._previous_entity = previous_entity
@property
def federal_state(self):
"""Gets the federal_state of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The federal_state of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._federal_state
@federal_state.setter
def federal_state(self, federal_state):
"""Sets the federal_state of this HistoricPlace.
Description not available # noqa: E501
:param federal_state: The federal_state of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._federal_state = federal_state
@property
def maximum_area(self):
"""Gets the maximum_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The maximum_area of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._maximum_area
@maximum_area.setter
def maximum_area(self, maximum_area):
"""Sets the maximum_area of this HistoricPlace.
Description not available # noqa: E501
:param maximum_area: The maximum_area of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._maximum_area = maximum_area
@property
def demolition_date(self):
"""Gets the demolition_date of this HistoricPlace. # noqa: E501
The date the building was demolished. # noqa: E501
:return: The demolition_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._demolition_date
@demolition_date.setter
def demolition_date(self, demolition_date):
"""Sets the demolition_date of this HistoricPlace.
The date the building was demolished. # noqa: E501
:param demolition_date: The demolition_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._demolition_date = demolition_date
@property
def population_urban(self):
"""Gets the population_urban of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_urban of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._population_urban
@population_urban.setter
def population_urban(self, population_urban):
"""Sets the population_urban of this HistoricPlace.
Description not available # noqa: E501
:param population_urban: The population_urban of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._population_urban = population_urban
@property
def scottish_name(self):
"""Gets the scottish_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The scottish_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._scottish_name
@scottish_name.setter
def scottish_name(self, scottish_name):
"""Sets the scottish_name of this HistoricPlace.
Description not available # noqa: E501
:param scottish_name: The scottish_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._scottish_name = scottish_name
@property
def sovereign_country(self):
"""Gets the sovereign_country of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sovereign_country of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._sovereign_country
@sovereign_country.setter
def sovereign_country(self, sovereign_country):
"""Sets the sovereign_country of this HistoricPlace.
Description not available # noqa: E501
:param sovereign_country: The sovereign_country of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._sovereign_country = sovereign_country
@property
def phone_prefix_label(self):
"""Gets the phone_prefix_label of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The phone_prefix_label of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._phone_prefix_label
@phone_prefix_label.setter
def phone_prefix_label(self, phone_prefix_label):
"""Sets the phone_prefix_label of this HistoricPlace.
Description not available # noqa: E501
:param phone_prefix_label: The phone_prefix_label of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._phone_prefix_label = phone_prefix_label
@property
def official_language(self):
"""Gets the official_language of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The official_language of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._official_language
@official_language.setter
def official_language(self, official_language):
"""Sets the official_language of this HistoricPlace.
Description not available # noqa: E501
:param official_language: The official_language of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._official_language = official_language
@property
def previous_population_total(self):
"""Gets the previous_population_total of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The previous_population_total of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._previous_population_total
@previous_population_total.setter
def previous_population_total(self, previous_population_total):
"""Sets the previous_population_total of this HistoricPlace.
Description not available # noqa: E501
:param previous_population_total: The previous_population_total of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._previous_population_total = previous_population_total
@property
def commune(self):
"""Gets the commune of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The commune of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._commune
@commune.setter
def commune(self, commune):
"""Sets the commune of this HistoricPlace.
Description not available # noqa: E501
:param commune: The commune of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._commune = commune
@property
def annual_temperature(self):
"""Gets the annual_temperature of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The annual_temperature of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._annual_temperature
@annual_temperature.setter
def annual_temperature(self, annual_temperature):
"""Sets the annual_temperature of this HistoricPlace.
Description not available # noqa: E501
:param annual_temperature: The annual_temperature of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._annual_temperature = annual_temperature
@property
def description(self):
"""Gets the description of this HistoricPlace. # noqa: E501
small description # noqa: E501
:return: The description of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this HistoricPlace.
small description # noqa: E501
:param description: The description of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._description = description
@property
def number_of_state_deputies(self):
"""Gets the number_of_state_deputies of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The number_of_state_deputies of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._number_of_state_deputies
@number_of_state_deputies.setter
def number_of_state_deputies(self, number_of_state_deputies):
"""Sets the number_of_state_deputies of this HistoricPlace.
Description not available # noqa: E501
:param number_of_state_deputies: The number_of_state_deputies of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._number_of_state_deputies = number_of_state_deputies
@property
def average_depth(self):
"""Gets the average_depth of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The average_depth of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._average_depth
@average_depth.setter
def average_depth(self, average_depth):
"""Sets the average_depth of this HistoricPlace.
Description not available # noqa: E501
:param average_depth: The average_depth of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._average_depth = average_depth
@property
def arabic_name(self):
"""Gets the arabic_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The arabic_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._arabic_name
@arabic_name.setter
def arabic_name(self, arabic_name):
"""Sets the arabic_name of this HistoricPlace.
Description not available # noqa: E501
:param arabic_name: The arabic_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._arabic_name = arabic_name
@property
def ski_piste_number(self):
"""Gets the ski_piste_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The ski_piste_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._ski_piste_number
@ski_piste_number.setter
def ski_piste_number(self, ski_piste_number):
"""Sets the ski_piste_number of this HistoricPlace.
Description not available # noqa: E501
:param ski_piste_number: The ski_piste_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._ski_piste_number = ski_piste_number
@property
def subdivision(self):
"""Gets the subdivision of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The subdivision of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._subdivision
@subdivision.setter
def subdivision(self, subdivision):
"""Sets the subdivision of this HistoricPlace.
Description not available # noqa: E501
:param subdivision: The subdivision of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._subdivision = subdivision
@property
def human_development_index(self):
"""Gets the human_development_index of this HistoricPlace. # noqa: E501
a composite statistic used to rank countries by level of \"human development\" # noqa: E501
:return: The human_development_index of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._human_development_index
@human_development_index.setter
def human_development_index(self, human_development_index):
"""Sets the human_development_index of this HistoricPlace.
a composite statistic used to rank countries by level of \"human development\" # noqa: E501
:param human_development_index: The human_development_index of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._human_development_index = human_development_index
@property
def alemmanic_name(self):
"""Gets the alemmanic_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The alemmanic_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._alemmanic_name
@alemmanic_name.setter
def alemmanic_name(self, alemmanic_name):
"""Sets the alemmanic_name of this HistoricPlace.
Description not available # noqa: E501
:param alemmanic_name: The alemmanic_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._alemmanic_name = alemmanic_name
@property
def human_development_index_as_of(self):
"""Gets the human_development_index_as_of of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The human_development_index_as_of of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._human_development_index_as_of
@human_development_index_as_of.setter
def human_development_index_as_of(self, human_development_index_as_of):
"""Sets the human_development_index_as_of of this HistoricPlace.
Description not available # noqa: E501
:param human_development_index_as_of: The human_development_index_as_of of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._human_development_index_as_of = human_development_index_as_of
@property
def capital_coordinates(self):
"""Gets the capital_coordinates of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The capital_coordinates of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._capital_coordinates
@capital_coordinates.setter
def capital_coordinates(self, capital_coordinates):
"""Sets the capital_coordinates of this HistoricPlace.
Description not available # noqa: E501
:param capital_coordinates: The capital_coordinates of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._capital_coordinates = capital_coordinates
@property
def touareg_name(self):
"""Gets the touareg_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The touareg_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._touareg_name
@touareg_name.setter
def touareg_name(self, touareg_name):
"""Sets the touareg_name of this HistoricPlace.
Description not available # noqa: E501
:param touareg_name: The touareg_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._touareg_name = touareg_name
@property
def administrative_head_city(self):
"""Gets the administrative_head_city of this HistoricPlace. # noqa: E501
city where stand the administrative power # noqa: E501
:return: The administrative_head_city of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._administrative_head_city
@administrative_head_city.setter
def administrative_head_city(self, administrative_head_city):
"""Sets the administrative_head_city of this HistoricPlace.
city where stand the administrative power # noqa: E501
:param administrative_head_city: The administrative_head_city of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._administrative_head_city = administrative_head_city
@property
def maintained_by(self):
"""Gets the maintained_by of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The maintained_by of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._maintained_by
@maintained_by.setter
def maintained_by(self, maintained_by):
"""Sets the maintained_by of this HistoricPlace.
Description not available # noqa: E501
:param maintained_by: The maintained_by of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._maintained_by = maintained_by
@property
def visitors_per_day(self):
"""Gets the visitors_per_day of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The visitors_per_day of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._visitors_per_day
@visitors_per_day.setter
def visitors_per_day(self, visitors_per_day):
"""Sets the visitors_per_day of this HistoricPlace.
Description not available # noqa: E501
:param visitors_per_day: The visitors_per_day of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._visitors_per_day = visitors_per_day
@property
def kanji_name(self):
"""Gets the kanji_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The kanji_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._kanji_name
@kanji_name.setter
def kanji_name(self, kanji_name):
"""Sets the kanji_name of this HistoricPlace.
Description not available # noqa: E501
:param kanji_name: The kanji_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._kanji_name = kanji_name
@property
def blue_ski_piste_number(self):
"""Gets the blue_ski_piste_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The blue_ski_piste_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._blue_ski_piste_number
@blue_ski_piste_number.setter
def blue_ski_piste_number(self, blue_ski_piste_number):
"""Sets the blue_ski_piste_number of this HistoricPlace.
Description not available # noqa: E501
:param blue_ski_piste_number: The blue_ski_piste_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._blue_ski_piste_number = blue_ski_piste_number
@property
def historical_name(self):
"""Gets the historical_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The historical_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._historical_name
@historical_name.setter
def historical_name(self, historical_name):
"""Sets the historical_name of this HistoricPlace.
Description not available # noqa: E501
:param historical_name: The historical_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._historical_name = historical_name
@property
def area_rank(self):
"""Gets the area_rank of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_rank of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._area_rank
@area_rank.setter
def area_rank(self, area_rank):
"""Sets the area_rank of this HistoricPlace.
Description not available # noqa: E501
:param area_rank: The area_rank of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._area_rank = area_rank
@property
def first_mention(self):
"""Gets the first_mention of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The first_mention of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._first_mention
@first_mention.setter
def first_mention(self, first_mention):
"""Sets the first_mention of this HistoricPlace.
Description not available # noqa: E501
:param first_mention: The first_mention of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._first_mention = first_mention
@property
def number_of_visitors_as_of(self):
"""Gets the number_of_visitors_as_of of this HistoricPlace. # noqa: E501
The year in which number of visitors occurred. # noqa: E501
:return: The number_of_visitors_as_of of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._number_of_visitors_as_of
@number_of_visitors_as_of.setter
def number_of_visitors_as_of(self, number_of_visitors_as_of):
"""Sets the number_of_visitors_as_of of this HistoricPlace.
The year in which number of visitors occurred. # noqa: E501
:param number_of_visitors_as_of: The number_of_visitors_as_of of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._number_of_visitors_as_of = number_of_visitors_as_of
@property
def localization_thumbnail(self):
"""Gets the localization_thumbnail of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The localization_thumbnail of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._localization_thumbnail
@localization_thumbnail.setter
def localization_thumbnail(self, localization_thumbnail):
"""Sets the localization_thumbnail of this HistoricPlace.
Description not available # noqa: E501
:param localization_thumbnail: The localization_thumbnail of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._localization_thumbnail = localization_thumbnail
@property
def nrhp_reference_number(self):
"""Gets the nrhp_reference_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The nrhp_reference_number of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._nrhp_reference_number
@nrhp_reference_number.setter
def nrhp_reference_number(self, nrhp_reference_number):
"""Sets the nrhp_reference_number of this HistoricPlace.
Description not available # noqa: E501
:param nrhp_reference_number: The nrhp_reference_number of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._nrhp_reference_number = nrhp_reference_number
@property
def cable_car(self):
"""Gets the cable_car of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The cable_car of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._cable_car
@cable_car.setter
def cable_car(self, cable_car):
"""Sets the cable_car of this HistoricPlace.
Description not available # noqa: E501
:param cable_car: The cable_car of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._cable_car = cable_car
@property
def administrative_district(self):
"""Gets the administrative_district of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The administrative_district of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._administrative_district
@administrative_district.setter
def administrative_district(self, administrative_district):
"""Sets the administrative_district of this HistoricPlace.
Description not available # noqa: E501
:param administrative_district: The administrative_district of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._administrative_district = administrative_district
@property
def type(self):
"""Gets the type of this HistoricPlace. # noqa: E501
type of the resource # noqa: E501
:return: The type of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._type
@type.setter
def type(self, type):
"""Sets the type of this HistoricPlace.
type of the resource # noqa: E501
:param type: The type of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._type = type
@property
def linked_space(self):
"""Gets the linked_space of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The linked_space of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._linked_space
@linked_space.setter
def linked_space(self, linked_space):
"""Sets the linked_space of this HistoricPlace.
Description not available # noqa: E501
:param linked_space: The linked_space of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._linked_space = linked_space
@property
def lowest_point(self):
"""Gets the lowest_point of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The lowest_point of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._lowest_point
@lowest_point.setter
def lowest_point(self, lowest_point):
"""Sets the lowest_point of this HistoricPlace.
Description not available # noqa: E501
:param lowest_point: The lowest_point of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._lowest_point = lowest_point
@property
def daira(self):
"""Gets the daira of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The daira of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._daira
@daira.setter
def daira(self, daira):
"""Sets the daira of this HistoricPlace.
Description not available # noqa: E501
:param daira: The daira of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._daira = daira
@property
def number_of_island(self):
"""Gets the number_of_island of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The number_of_island of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._number_of_island
@number_of_island.setter
def number_of_island(self, number_of_island):
"""Sets the number_of_island of this HistoricPlace.
Description not available # noqa: E501
:param number_of_island: The number_of_island of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._number_of_island = number_of_island
@property
def cyrillique_name(self):
"""Gets the cyrillique_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The cyrillique_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._cyrillique_name
@cyrillique_name.setter
def cyrillique_name(self, cyrillique_name):
"""Sets the cyrillique_name of this HistoricPlace.
Description not available # noqa: E501
:param cyrillique_name: The cyrillique_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._cyrillique_name = cyrillique_name
@property
def tenant(self):
"""Gets the tenant of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The tenant of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._tenant
@tenant.setter
def tenant(self, tenant):
"""Sets the tenant of this HistoricPlace.
Description not available # noqa: E501
:param tenant: The tenant of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._tenant = tenant
@property
def catholic_percentage(self):
"""Gets the catholic_percentage of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The catholic_percentage of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._catholic_percentage
@catholic_percentage.setter
def catholic_percentage(self, catholic_percentage):
"""Sets the catholic_percentage of this HistoricPlace.
Description not available # noqa: E501
:param catholic_percentage: The catholic_percentage of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._catholic_percentage = catholic_percentage
@property
def old_district(self):
"""Gets the old_district of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The old_district of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._old_district
@old_district.setter
def old_district(self, old_district):
"""Sets the old_district of this HistoricPlace.
Description not available # noqa: E501
:param old_district: The old_district of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._old_district = old_district
@property
def area_rural(self):
"""Gets the area_rural of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_rural of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._area_rural
@area_rural.setter
def area_rural(self, area_rural):
"""Sets the area_rural of this HistoricPlace.
Description not available # noqa: E501
:param area_rural: The area_rural of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._area_rural = area_rural
@property
def water_percentage(self):
"""Gets the water_percentage of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The water_percentage of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._water_percentage
@water_percentage.setter
def water_percentage(self, water_percentage):
"""Sets the water_percentage of this HistoricPlace.
Description not available # noqa: E501
:param water_percentage: The water_percentage of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._water_percentage = water_percentage
@property
def lowest(self):
"""Gets the lowest of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The lowest of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._lowest
@lowest.setter
def lowest(self, lowest):
"""Sets the lowest of this HistoricPlace.
Description not available # noqa: E501
:param lowest: The lowest of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._lowest = lowest
@property
def sharing_out_population_name(self):
"""Gets the sharing_out_population_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sharing_out_population_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._sharing_out_population_name
@sharing_out_population_name.setter
def sharing_out_population_name(self, sharing_out_population_name):
"""Sets the sharing_out_population_name of this HistoricPlace.
Description not available # noqa: E501
:param sharing_out_population_name: The sharing_out_population_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._sharing_out_population_name = sharing_out_population_name
@property
def building_end_date(self):
"""Gets the building_end_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The building_end_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._building_end_date
@building_end_date.setter
def building_end_date(self, building_end_date):
"""Sets the building_end_date of this HistoricPlace.
Description not available # noqa: E501
:param building_end_date: The building_end_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._building_end_date = building_end_date
@property
def number_of_federal_deputies(self):
"""Gets the number_of_federal_deputies of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The number_of_federal_deputies of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._number_of_federal_deputies
@number_of_federal_deputies.setter
def number_of_federal_deputies(self, number_of_federal_deputies):
"""Sets the number_of_federal_deputies of this HistoricPlace.
Description not available # noqa: E501
:param number_of_federal_deputies: The number_of_federal_deputies of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._number_of_federal_deputies = number_of_federal_deputies
@property
def map_caption(self):
"""Gets the map_caption of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The map_caption of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._map_caption
@map_caption.setter
def map_caption(self, map_caption):
"""Sets the map_caption of this HistoricPlace.
Description not available # noqa: E501
:param map_caption: The map_caption of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._map_caption = map_caption
@property
def previous_name(self):
"""Gets the previous_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The previous_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._previous_name
@previous_name.setter
def previous_name(self, previous_name):
"""Sets the previous_name of this HistoricPlace.
Description not available # noqa: E501
:param previous_name: The previous_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._previous_name = previous_name
@property
def city_link(self):
"""Gets the city_link of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The city_link of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._city_link
@city_link.setter
def city_link(self, city_link):
"""Sets the city_link of this HistoricPlace.
Description not available # noqa: E501
:param city_link: The city_link of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._city_link = city_link
@property
def architect(self):
"""Gets the architect of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The architect of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._architect
@architect.setter
def architect(self, architect):
"""Sets the architect of this HistoricPlace.
Description not available # noqa: E501
:param architect: The architect of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._architect = architect
@property
def leader_title(self):
"""Gets the leader_title of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The leader_title of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._leader_title
@leader_title.setter
def leader_title(self, leader_title):
"""Sets the leader_title of this HistoricPlace.
Description not available # noqa: E501
:param leader_title: The leader_title of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._leader_title = leader_title
@property
def foundation(self):
"""Gets the foundation of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The foundation of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._foundation
@foundation.setter
def foundation(self, foundation):
"""Sets the foundation of this HistoricPlace.
Description not available # noqa: E501
:param foundation: The foundation of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._foundation = foundation
@property
def agglomeration_demographics(self):
"""Gets the agglomeration_demographics of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The agglomeration_demographics of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._agglomeration_demographics
@agglomeration_demographics.setter
def agglomeration_demographics(self, agglomeration_demographics):
"""Sets the agglomeration_demographics of this HistoricPlace.
Description not available # noqa: E501
:param agglomeration_demographics: The agglomeration_demographics of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._agglomeration_demographics = agglomeration_demographics
@property
def calabrian_name(self):
"""Gets the calabrian_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The calabrian_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._calabrian_name
@calabrian_name.setter
def calabrian_name(self, calabrian_name):
"""Sets the calabrian_name of this HistoricPlace.
Description not available # noqa: E501
:param calabrian_name: The calabrian_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._calabrian_name = calabrian_name
@property
def type_coordinate(self):
"""Gets the type_coordinate of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The type_coordinate of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._type_coordinate
@type_coordinate.setter
def type_coordinate(self, type_coordinate):
"""Sets the type_coordinate of this HistoricPlace.
Description not available # noqa: E501
:param type_coordinate: The type_coordinate of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._type_coordinate = type_coordinate
@property
def floor_area(self):
"""Gets the floor_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The floor_area of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._floor_area
@floor_area.setter
def floor_area(self, floor_area):
"""Sets the floor_area of this HistoricPlace.
Description not available # noqa: E501
:param floor_area: The floor_area of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._floor_area = floor_area
@property
def touareg_settlement_name(self):
"""Gets the touareg_settlement_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The touareg_settlement_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._touareg_settlement_name
@touareg_settlement_name.setter
def touareg_settlement_name(self, touareg_settlement_name):
"""Sets the touareg_settlement_name of this HistoricPlace.
Description not available # noqa: E501
:param touareg_settlement_name: The touareg_settlement_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._touareg_settlement_name = touareg_settlement_name
@property
def distance_to_belfast(self):
"""Gets the distance_to_belfast of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The distance_to_belfast of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._distance_to_belfast
@distance_to_belfast.setter
def distance_to_belfast(self, distance_to_belfast):
"""Sets the distance_to_belfast of this HistoricPlace.
Description not available # noqa: E501
:param distance_to_belfast: The distance_to_belfast of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._distance_to_belfast = distance_to_belfast
@property
def code_provincial_monument(self):
"""Gets the code_provincial_monument of this HistoricPlace. # noqa: E501
Code assigned to (Dutch) monuments at the provincial level, mostly for monuments in the countryside, or for waterworks # noqa: E501
:return: The code_provincial_monument of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._code_provincial_monument
@code_provincial_monument.setter
def code_provincial_monument(self, code_provincial_monument):
"""Sets the code_provincial_monument of this HistoricPlace.
Code assigned to (Dutch) monuments at the provincial level, mostly for monuments in the countryside, or for waterworks # noqa: E501
:param code_provincial_monument: The code_provincial_monument of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._code_provincial_monument = code_provincial_monument
@property
def floor_count(self):
"""Gets the floor_count of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The floor_count of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._floor_count
@floor_count.setter
def floor_count(self, floor_count):
"""Sets the floor_count of this HistoricPlace.
Description not available # noqa: E501
:param floor_count: The floor_count of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._floor_count = floor_count
@property
def climate(self):
"""Gets the climate of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The climate of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._climate
@climate.setter
def climate(self, climate):
"""Sets the climate of this HistoricPlace.
Description not available # noqa: E501
:param climate: The climate of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._climate = climate
@property
def bourgmestre(self):
"""Gets the bourgmestre of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The bourgmestre of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._bourgmestre
@bourgmestre.setter
def bourgmestre(self, bourgmestre):
"""Sets the bourgmestre of this HistoricPlace.
Description not available # noqa: E501
:param bourgmestre: The bourgmestre of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._bourgmestre = bourgmestre
@property
def depth(self):
"""Gets the depth of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The depth of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._depth
@depth.setter
def depth(self, depth):
"""Sets the depth of this HistoricPlace.
Description not available # noqa: E501
:param depth: The depth of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._depth = depth
@property
def governing_body(self):
"""Gets the governing_body of this HistoricPlace. # noqa: E501
Body that owns/operates the Place. # noqa: E501
:return: The governing_body of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._governing_body
@governing_body.setter
def governing_body(self, governing_body):
"""Sets the governing_body of this HistoricPlace.
Body that owns/operates the Place. # noqa: E501
:param governing_body: The governing_body of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._governing_body = governing_body
@property
def black_ski_piste_number(self):
"""Gets the black_ski_piste_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The black_ski_piste_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._black_ski_piste_number
@black_ski_piste_number.setter
def black_ski_piste_number(self, black_ski_piste_number):
"""Sets the black_ski_piste_number of this HistoricPlace.
Description not available # noqa: E501
:param black_ski_piste_number: The black_ski_piste_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._black_ski_piste_number = black_ski_piste_number
@property
def protestant_percentage(self):
"""Gets the protestant_percentage of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The protestant_percentage of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._protestant_percentage
@protestant_percentage.setter
def protestant_percentage(self, protestant_percentage):
"""Sets the protestant_percentage of this HistoricPlace.
Description not available # noqa: E501
:param protestant_percentage: The protestant_percentage of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._protestant_percentage = protestant_percentage
@property
def related_places(self):
"""Gets the related_places of this HistoricPlace. # noqa: E501
This property is to accommodate the list field that contains a list of, e.g., monuments in the same town # noqa: E501
:return: The related_places of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._related_places
@related_places.setter
def related_places(self, related_places):
"""Sets the related_places of this HistoricPlace.
This property is to accommodate the list field that contains a list of, e.g., monuments in the same town # noqa: E501
:param related_places: The related_places of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._related_places = related_places
@property
def zip_code(self):
"""Gets the zip_code of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The zip_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._zip_code
@zip_code.setter
def zip_code(self, zip_code):
"""Sets the zip_code of this HistoricPlace.
Description not available # noqa: E501
:param zip_code: The zip_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._zip_code = zip_code
@property
def fauna(self):
"""Gets the fauna of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The fauna of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._fauna
@fauna.setter
def fauna(self, fauna):
"""Sets the fauna of this HistoricPlace.
Description not available # noqa: E501
:param fauna: The fauna of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._fauna = fauna
@property
def year_of_construction(self):
"""Gets the year_of_construction of this HistoricPlace. # noqa: E501
The year in which construction of the Place was finished. # noqa: E501
:return: The year_of_construction of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._year_of_construction
@year_of_construction.setter
def year_of_construction(self, year_of_construction):
"""Sets the year_of_construction of this HistoricPlace.
The year in which construction of the Place was finished. # noqa: E501
:param year_of_construction: The year_of_construction of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._year_of_construction = year_of_construction
@property
def subsystem(self):
"""Gets the subsystem of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The subsystem of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._subsystem
@subsystem.setter
def subsystem(self, subsystem):
"""Sets the subsystem of this HistoricPlace.
Description not available # noqa: E501
:param subsystem: The subsystem of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._subsystem = subsystem
@property
def historical_region(self):
"""Gets the historical_region of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The historical_region of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._historical_region
@historical_region.setter
def historical_region(self, historical_region):
"""Sets the historical_region of this HistoricPlace.
Description not available # noqa: E501
:param historical_region: The historical_region of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._historical_region = historical_region
@property
def international_phone_prefix_label(self):
"""Gets the international_phone_prefix_label of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The international_phone_prefix_label of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._international_phone_prefix_label
@international_phone_prefix_label.setter
def international_phone_prefix_label(self, international_phone_prefix_label):
"""Sets the international_phone_prefix_label of this HistoricPlace.
Description not available # noqa: E501
:param international_phone_prefix_label: The international_phone_prefix_label of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._international_phone_prefix_label = international_phone_prefix_label
@property
def minority(self):
"""Gets the minority of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The minority of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._minority
@minority.setter
def minority(self, minority):
"""Sets the minority of this HistoricPlace.
Description not available # noqa: E501
:param minority: The minority of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._minority = minority
@property
def space(self):
"""Gets the space of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The space of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._space
@space.setter
def space(self, space):
"""Sets the space of this HistoricPlace.
Description not available # noqa: E501
:param space: The space of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._space = space
@property
def frioulan_name(self):
"""Gets the frioulan_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The frioulan_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._frioulan_name
@frioulan_name.setter
def frioulan_name(self, frioulan_name):
"""Sets the frioulan_name of this HistoricPlace.
Description not available # noqa: E501
:param frioulan_name: The frioulan_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._frioulan_name = frioulan_name
@property
def reference(self):
"""Gets the reference of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The reference of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._reference
@reference.setter
def reference(self, reference):
"""Sets the reference of this HistoricPlace.
Description not available # noqa: E501
:param reference: The reference of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._reference = reference
@property
def code_land_registry(self):
"""Gets the code_land_registry of this HistoricPlace. # noqa: E501
Land Registry code designating a parcel of land # noqa: E501
:return: The code_land_registry of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._code_land_registry
@code_land_registry.setter
def code_land_registry(self, code_land_registry):
"""Sets the code_land_registry of this HistoricPlace.
Land Registry code designating a parcel of land # noqa: E501
:param code_land_registry: The code_land_registry of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._code_land_registry = code_land_registry
@property
def distance_to_cardiff(self):
"""Gets the distance_to_cardiff of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The distance_to_cardiff of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._distance_to_cardiff
@distance_to_cardiff.setter
def distance_to_cardiff(self, distance_to_cardiff):
"""Sets the distance_to_cardiff of this HistoricPlace.
Description not available # noqa: E501
:param distance_to_cardiff: The distance_to_cardiff of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._distance_to_cardiff = distance_to_cardiff
@property
def population_date(self):
"""Gets the population_date of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_date of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._population_date
@population_date.setter
def population_date(self, population_date):
"""Sets the population_date of this HistoricPlace.
Description not available # noqa: E501
:param population_date: The population_date of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._population_date = population_date
@property
def dutch_name(self):
"""Gets the dutch_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The dutch_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._dutch_name
@dutch_name.setter
def dutch_name(self, dutch_name):
"""Sets the dutch_name of this HistoricPlace.
Description not available # noqa: E501
:param dutch_name: The dutch_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._dutch_name = dutch_name
@property
def day(self):
"""Gets the day of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The day of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._day
@day.setter
def day(self, day):
"""Sets the day of this HistoricPlace.
Description not available # noqa: E501
:param day: The day of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._day = day
@property
def sheading(self):
"""Gets the sheading of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sheading of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._sheading
@sheading.setter
def sheading(self, sheading):
"""Sets the sheading of this HistoricPlace.
Description not available # noqa: E501
:param sheading: The sheading of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._sheading = sheading
@property
def local_phone_prefix(self):
"""Gets the local_phone_prefix of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The local_phone_prefix of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._local_phone_prefix
@local_phone_prefix.setter
def local_phone_prefix(self, local_phone_prefix):
"""Sets the local_phone_prefix of this HistoricPlace.
Description not available # noqa: E501
:param local_phone_prefix: The local_phone_prefix of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._local_phone_prefix = local_phone_prefix
@property
def population_pct_women(self):
"""Gets the population_pct_women of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_pct_women of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._population_pct_women
@population_pct_women.setter
def population_pct_women(self, population_pct_women):
"""Sets the population_pct_women of this HistoricPlace.
Description not available # noqa: E501
:param population_pct_women: The population_pct_women of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._population_pct_women = population_pct_women
@property
def tree(self):
"""Gets the tree of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The tree of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._tree
@tree.setter
def tree(self, tree):
"""Sets the tree of this HistoricPlace.
Description not available # noqa: E501
:param tree: The tree of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._tree = tree
@property
def old_province(self):
"""Gets the old_province of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The old_province of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._old_province
@old_province.setter
def old_province(self, old_province):
"""Sets the old_province of this HistoricPlace.
Description not available # noqa: E501
:param old_province: The old_province of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._old_province = old_province
@property
def vehicle_code(self):
"""Gets the vehicle_code of this HistoricPlace. # noqa: E501
Region related vehicle code on the vehicle plates. # noqa: E501
:return: The vehicle_code of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._vehicle_code
@vehicle_code.setter
def vehicle_code(self, vehicle_code):
"""Sets the vehicle_code of this HistoricPlace.
Region related vehicle code on the vehicle plates. # noqa: E501
:param vehicle_code: The vehicle_code of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._vehicle_code = vehicle_code
@property
def water(self):
"""Gets the water of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The water of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._water
@water.setter
def water(self, water):
"""Sets the water of this HistoricPlace.
Description not available # noqa: E501
:param water: The water of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._water = water
@property
def gross_domestic_product_nominal_per_capita(self):
"""Gets the gross_domestic_product_nominal_per_capita of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gross_domestic_product_nominal_per_capita of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._gross_domestic_product_nominal_per_capita
@gross_domestic_product_nominal_per_capita.setter
def gross_domestic_product_nominal_per_capita(self, gross_domestic_product_nominal_per_capita):
"""Sets the gross_domestic_product_nominal_per_capita of this HistoricPlace.
Description not available # noqa: E501
:param gross_domestic_product_nominal_per_capita: The gross_domestic_product_nominal_per_capita of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._gross_domestic_product_nominal_per_capita = gross_domestic_product_nominal_per_capita
@property
def association_of_local_government(self):
"""Gets the association_of_local_government of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The association_of_local_government of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._association_of_local_government
@association_of_local_government.setter
def association_of_local_government(self, association_of_local_government):
"""Sets the association_of_local_government of this HistoricPlace.
Description not available # noqa: E501
:param association_of_local_government: The association_of_local_government of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._association_of_local_government = association_of_local_government
@property
def topic(self):
"""Gets the topic of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The topic of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._topic
@topic.setter
def topic(self, topic):
"""Sets the topic of this HistoricPlace.
Description not available # noqa: E501
:param topic: The topic of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._topic = topic
@property
def main_island(self):
"""Gets the main_island of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The main_island of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._main_island
@main_island.setter
def main_island(self, main_island):
"""Sets the main_island of this HistoricPlace.
Description not available # noqa: E501
:param main_island: The main_island of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._main_island = main_island
@property
def maori_name(self):
"""Gets the maori_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The maori_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._maori_name
@maori_name.setter
def maori_name(self, maori_name):
"""Sets the maori_name of this HistoricPlace.
Description not available # noqa: E501
:param maori_name: The maori_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._maori_name = maori_name
@property
def istat(self):
"""Gets the istat of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The istat of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._istat
@istat.setter
def istat(self, istat):
"""Sets the istat of this HistoricPlace.
Description not available # noqa: E501
:param istat: The istat of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._istat = istat
@property
def minimum_area_quote(self):
"""Gets the minimum_area_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The minimum_area_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._minimum_area_quote
@minimum_area_quote.setter
def minimum_area_quote(self, minimum_area_quote):
"""Sets the minimum_area_quote of this HistoricPlace.
Description not available # noqa: E501
:param minimum_area_quote: The minimum_area_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._minimum_area_quote = minimum_area_quote
@property
def altitude(self):
"""Gets the altitude of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The altitude of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._altitude
@altitude.setter
def altitude(self, altitude):
"""Sets the altitude of this HistoricPlace.
Description not available # noqa: E501
:param altitude: The altitude of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._altitude = altitude
@property
def national_topographic_system_map_number(self):
"""Gets the national_topographic_system_map_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The national_topographic_system_map_number of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._national_topographic_system_map_number
@national_topographic_system_map_number.setter
def national_topographic_system_map_number(self, national_topographic_system_map_number):
"""Sets the national_topographic_system_map_number of this HistoricPlace.
Description not available # noqa: E501
:param national_topographic_system_map_number: The national_topographic_system_map_number of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._national_topographic_system_map_number = national_topographic_system_map_number
@property
def budget_year(self):
"""Gets the budget_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The budget_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._budget_year
@budget_year.setter
def budget_year(self, budget_year):
"""Sets the budget_year of this HistoricPlace.
Description not available # noqa: E501
:param budget_year: The budget_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._budget_year = budget_year
@property
def gini_coefficient_as_of(self):
"""Gets the gini_coefficient_as_of of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The gini_coefficient_as_of of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._gini_coefficient_as_of
@gini_coefficient_as_of.setter
def gini_coefficient_as_of(self, gini_coefficient_as_of):
"""Sets the gini_coefficient_as_of of this HistoricPlace.
Description not available # noqa: E501
:param gini_coefficient_as_of: The gini_coefficient_as_of of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._gini_coefficient_as_of = gini_coefficient_as_of
@property
def scale(self):
"""Gets the scale of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The scale of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._scale
@scale.setter
def scale(self, scale):
"""Sets the scale of this HistoricPlace.
Description not available # noqa: E501
:param scale: The scale of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._scale = scale
@property
def long_distance_piste_kilometre(self):
"""Gets the long_distance_piste_kilometre of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The long_distance_piste_kilometre of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._long_distance_piste_kilometre
@long_distance_piste_kilometre.setter
def long_distance_piste_kilometre(self, long_distance_piste_kilometre):
"""Sets the long_distance_piste_kilometre of this HistoricPlace.
Description not available # noqa: E501
:param long_distance_piste_kilometre: The long_distance_piste_kilometre of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._long_distance_piste_kilometre = long_distance_piste_kilometre
@property
def building_start_year(self):
"""Gets the building_start_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The building_start_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._building_start_year
@building_start_year.setter
def building_start_year(self, building_start_year):
"""Sets the building_start_year of this HistoricPlace.
Description not available # noqa: E501
:param building_start_year: The building_start_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._building_start_year = building_start_year
@property
def sub_prefecture(self):
"""Gets the sub_prefecture of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The sub_prefecture of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._sub_prefecture
@sub_prefecture.setter
def sub_prefecture(self, sub_prefecture):
"""Sets the sub_prefecture of this HistoricPlace.
Description not available # noqa: E501
:param sub_prefecture: The sub_prefecture of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._sub_prefecture = sub_prefecture
@property
def snow_park_number(self):
"""Gets the snow_park_number of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The snow_park_number of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._snow_park_number
@snow_park_number.setter
def snow_park_number(self, snow_park_number):
"""Sets the snow_park_number of this HistoricPlace.
Description not available # noqa: E501
:param snow_park_number: The snow_park_number of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._snow_park_number = snow_park_number
@property
def security(self):
"""Gets the security of this HistoricPlace. # noqa: E501
Safety precautions that are used in the building. # noqa: E501
:return: The security of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._security
@security.setter
def security(self, security):
"""Sets the security of this HistoricPlace.
Safety precautions that are used in the building. # noqa: E501
:param security: The security of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._security = security
@property
def luxembourgish_name(self):
"""Gets the luxembourgish_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The luxembourgish_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._luxembourgish_name
@luxembourgish_name.setter
def luxembourgish_name(self, luxembourgish_name):
"""Sets the luxembourgish_name of this HistoricPlace.
Description not available # noqa: E501
:param luxembourgish_name: The luxembourgish_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._luxembourgish_name = luxembourgish_name
@property
def tower_height(self):
"""Gets the tower_height of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The tower_height of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._tower_height
@tower_height.setter
def tower_height(self, tower_height):
"""Sets the tower_height of this HistoricPlace.
Description not available # noqa: E501
:param tower_height: The tower_height of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._tower_height = tower_height
@property
def area_total(self):
"""Gets the area_total of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The area_total of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._area_total
@area_total.setter
def area_total(self, area_total):
"""Sets the area_total of this HistoricPlace.
Description not available # noqa: E501
:param area_total: The area_total of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._area_total = area_total
@property
def population_total_reference(self):
"""Gets the population_total_reference of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The population_total_reference of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._population_total_reference
@population_total_reference.setter
def population_total_reference(self, population_total_reference):
"""Sets the population_total_reference of this HistoricPlace.
Description not available # noqa: E501
:param population_total_reference: The population_total_reference of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._population_total_reference = population_total_reference
@property
def length_quote(self):
"""Gets the length_quote of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The length_quote of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._length_quote
@length_quote.setter
def length_quote(self, length_quote):
"""Sets the length_quote of this HistoricPlace.
Description not available # noqa: E501
:param length_quote: The length_quote of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._length_quote = length_quote
@property
def relief(self):
"""Gets the relief of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The relief of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._relief
@relief.setter
def relief(self, relief):
"""Sets the relief of this HistoricPlace.
Description not available # noqa: E501
:param relief: The relief of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._relief = relief
@property
def census_year(self):
"""Gets the census_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The census_year of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._census_year
@census_year.setter
def census_year(self, census_year):
"""Sets the census_year of this HistoricPlace.
Description not available # noqa: E501
:param census_year: The census_year of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._census_year = census_year
@property
def visitors_per_year(self):
"""Gets the visitors_per_year of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The visitors_per_year of this HistoricPlace. # noqa: E501
:rtype: list[int]
"""
return self._visitors_per_year
@visitors_per_year.setter
def visitors_per_year(self, visitors_per_year):
"""Sets the visitors_per_year of this HistoricPlace.
Description not available # noqa: E501
:param visitors_per_year: The visitors_per_year of this HistoricPlace. # noqa: E501
:type: list[int]
"""
self._visitors_per_year = visitors_per_year
@property
def ladin_name(self):
"""Gets the ladin_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The ladin_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._ladin_name
@ladin_name.setter
def ladin_name(self, ladin_name):
"""Sets the ladin_name of this HistoricPlace.
Description not available # noqa: E501
:param ladin_name: The ladin_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._ladin_name = ladin_name
@property
def subdivision_link(self):
"""Gets the subdivision_link of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The subdivision_link of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._subdivision_link
@subdivision_link.setter
def subdivision_link(self, subdivision_link):
"""Sets the subdivision_link of this HistoricPlace.
Description not available # noqa: E501
:param subdivision_link: The subdivision_link of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._subdivision_link = subdivision_link
@property
def cost(self):
"""Gets the cost of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The cost of this HistoricPlace. # noqa: E501
:rtype: list[float]
"""
return self._cost
@cost.setter
def cost(self, cost):
"""Sets the cost of this HistoricPlace.
Description not available # noqa: E501
:param cost: The cost of this HistoricPlace. # noqa: E501
:type: list[float]
"""
self._cost = cost
@property
def operated_by(self):
"""Gets the operated_by of this HistoricPlace. # noqa: E501
Organisation or city who is the operator of the ArchitecturalStructure. Not to confuse with maintainer or the owner. # noqa: E501
:return: The operated_by of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._operated_by
@operated_by.setter
def operated_by(self, operated_by):
"""Sets the operated_by of this HistoricPlace.
Organisation or city who is the operator of the ArchitecturalStructure. Not to confuse with maintainer or the owner. # noqa: E501
:param operated_by: The operated_by of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._operated_by = operated_by
@property
def mozabite_name(self):
"""Gets the mozabite_name of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The mozabite_name of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._mozabite_name
@mozabite_name.setter
def mozabite_name(self, mozabite_name):
"""Sets the mozabite_name of this HistoricPlace.
Description not available # noqa: E501
:param mozabite_name: The mozabite_name of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._mozabite_name = mozabite_name
@property
def nearest_city(self):
"""Gets the nearest_city of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The nearest_city of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._nearest_city
@nearest_city.setter
def nearest_city(self, nearest_city):
"""Sets the nearest_city of this HistoricPlace.
Description not available # noqa: E501
:param nearest_city: The nearest_city of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._nearest_city = nearest_city
@property
def subsystem_link(self):
"""Gets the subsystem_link of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The subsystem_link of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._subsystem_link
@subsystem_link.setter
def subsystem_link(self, subsystem_link):
"""Sets the subsystem_link of this HistoricPlace.
Description not available # noqa: E501
:param subsystem_link: The subsystem_link of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._subsystem_link = subsystem_link
@property
def whole_area(self):
"""Gets the whole_area of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The whole_area of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._whole_area
@whole_area.setter
def whole_area(self, whole_area):
"""Sets the whole_area of this HistoricPlace.
Description not available # noqa: E501
:param whole_area: The whole_area of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._whole_area = whole_area
@property
def delegation(self):
"""Gets the delegation of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The delegation of this HistoricPlace. # noqa: E501
:rtype: list[str]
"""
return self._delegation
@delegation.setter
def delegation(self, delegation):
"""Sets the delegation of this HistoricPlace.
Description not available # noqa: E501
:param delegation: The delegation of this HistoricPlace. # noqa: E501
:type: list[str]
"""
self._delegation = delegation
@property
def vice_leader(self):
"""Gets the vice_leader of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The vice_leader of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._vice_leader
@vice_leader.setter
def vice_leader(self, vice_leader):
"""Sets the vice_leader of this HistoricPlace.
Description not available # noqa: E501
:param vice_leader: The vice_leader of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._vice_leader = vice_leader
@property
def demographics(self):
"""Gets the demographics of this HistoricPlace. # noqa: E501
Description not available # noqa: E501
:return: The demographics of this HistoricPlace. # noqa: E501
:rtype: list[object]
"""
return self._demographics
@demographics.setter
def demographics(self, demographics):
"""Sets the demographics of this HistoricPlace.
Description not available # noqa: E501
:param demographics: The demographics of this HistoricPlace. # noqa: E501
:type: list[object]
"""
self._demographics = demographics
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, HistoricPlace):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, HistoricPlace):
return True
return self.to_dict() != other.to_dict()
| [
"[email protected]"
] | |
72301ec7c64df86bd3500a01d59262d2037866dd | e59f696a96f216cdeea8d638f05b75bb0c26ef55 | /4 Python_Programs/1 Problems on numbers/10_EvenFactors/Demo.py | 2f5e56dcd12e00dd9d0888a7d45b09e65f1ca07a | [] | no_license | Aditya-A-Pardeshi/Coding-Hands-On | 6858686bdf8f4f1088f6cc2fc0035a53c4875d81 | 0d72d45e92cb0698129636412f7bf5a8d865fd2f | refs/heads/main | 2023-05-29T05:35:34.052868 | 2021-06-14T18:52:57 | 2021-06-14T18:52:57 | 376,928,262 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | '''
Write a program which accept number from user and print even factors of that number
Input : 24
Output: 2 4 6 8 12
'''
def PrintEvenFactors(no):
if(no<0):
no = -no;
for i in range(2,int(no/2)+1):
if(no%i == 0):
print("{} ".format(i),end = " ");
def main():
no = int(input("Enter number:"));
PrintEvenFactors(no);
if __name__ == "__main__":
main(); | [
"[email protected]"
] | |
a6256c9b5837cca69a8b8c95003b3e2521477bcd | 210ecd63113ce90c5f09bc2b09db3e80ff98117a | /AbletonLive9_RemoteScripts/LiveControl_2_0/LC2Modulator.py | 764d6d49f7649a6e5881ede73c976d2d050d3616 | [] | no_license | ajasver/MidiScripts | 86a765b8568657633305541c46ccc1fd1ea34501 | f727a2e63c95a9c5e980a0738deb0049363ba536 | refs/heads/master | 2021-01-13T02:03:55.078132 | 2015-07-16T18:27:30 | 2015-07-16T18:27:30 | 38,516,112 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,938 | py | #Embedded file name: /Applications/Ableton Live 9 Suite.app/Contents/App-Resources/MIDI Remote Scripts/LiveControl_2_0/LC2Modulator.py
from _Generic.Devices import *
from _Framework.ControlSurfaceComponent import ControlSurfaceComponent
from _Framework.DeviceComponent import DeviceComponent
from _Framework.InputControlElement import *
from LC2ParameterElement import LC2ParameterElement
from LC2Sysex import LC2Sysex, LC2SysexParser
import Live
class LC2Modulator(DeviceComponent):
def __init__(self):
self._parameter_offset = 0
self._selected_param = 0
self._selected_parameter = None
DeviceComponent.__init__(self)
LC2ParameterElement.set_select_param(self.select_parameter)
self._xys = [ LC2ParameterElement(MIDI_PB_TYPE, i, 0) for i in range(8) ]
self._device_banks = {}
self.song().view.add_selected_parameter_listener(self._on_selected_parameter_changed)
def send_xy_map(self):
sysex = LC2Sysex('XY_MAP')
for p in self._xys:
sysex.byte(int(p.mapped_parameter() is not None))
sysex.send()
def send_params(self):
if self._parameter_controls is not None:
for p in self._parameter_controls:
p._send_param_val(True)
self._on_device_name_changed()
def _on_device_name_changed(self):
DeviceComponent._on_device_name_changed(self)
name = 'Please select a device in Live'
if self._device is not None:
if self._device.canonical_parent.name:
pre = self._device.canonical_parent.name
else:
pre = 'Chain'
name = pre + ': ' + unicode(self._device.name)
sysex = LC2Sysex('DEVICE_NAME')
sysex.ascii(name)
sysex.send()
def select_parameter(self, param):
self._selected_parameter = param
self._send_id_param()
def _on_selected_parameter_changed(self):
self._selected_parameter = self.song().view.selected_parameter
self._send_id_param()
def handle_sysex(self, sysex):
cmds = [self._select_xy,
self._set_param,
self._select_param,
self._select_chain,
self._select_chain_device,
self._select_parent]
if sysex[0] < len(cmds):
cmds[sysex[0]](LC2SysexParser(sysex[1:]))
def disconnect(self):
self.song().view.remove_selected_parameter_listener(self._on_selected_parameter_changed)
def _select_chain(self, sysex):
self._selected_chain_id = sysex.parse('b')
self._send_chain_devices()
def _select_chain_device(self, sysex):
id = sysex.parse('b')
if self._device is not None:
if self._selected_chain_id < len(self._device.chains):
if id < len(self._device.chains[self._selected_chain_id].devices):
self.song().view.select_device(self._device.chains[self._selected_chain_id].devices[id])
def _select_parent(self, sysex):
if self._device is not None:
parent = self._device.canonical_parent.canonical_parent
if isinstance(parent, Live.Device.Device):
self.song().view.select_device(parent)
def _select_param(self, sysex):
id = sysex.parse('b')
if id < len(self._parameter_controls):
p = self._parameter_controls[id].mapped_parameter()
if p is not None:
self._selected_parameter = p
self._send_id_param()
def _set_param(self, sysex):
v = sysex.parse('b')
if v:
if self._selected_parameter is not None:
for xy in self._xys:
if xy.mapped_parameter() == self._selected_parameter:
xy.release_parameter()
self._xys[self._selected_param].connect_to(self._selected_parameter)
else:
self._xys[self._selected_param].release_parameter()
self.send_xy_map()
def _select_xy(self, sysex):
pid = sysex.parse('b')
LC2Sysex.log_message('SELECTING XY ' + str(pid))
if pid < len(self._xys):
self._selected_param = pid
param = self._xys[pid]
if param.mapped_parameter() is not None:
if isinstance(param.mapped_parameter().canonical_parent, Live.Device.Device):
self.song().view.select_device(param.mapped_parameter().canonical_parent)
self._send_id_param()
def _send_id_param(self):
param = self._xys[self._selected_param]
if param.mapped_parameter() is not None:
mapped = 1
pid, name = param.settings()
else:
mapped = 0
if self._selected_parameter is not None:
if hasattr(self._selected_parameter, 'canonical_parent'):
parent = self._selected_parameter.canonical_parent
if not hasattr(parent, 'name'):
if hasattr(parent, 'canonical_parent'):
parent = parent.canonical_parent
pid = unicode(parent.name)
name = unicode(self._selected_parameter.name)
else:
pid = ''
name = ''
else:
pid = ''
name = ''
sysex = LC2Sysex('XY_ID_NAME')
sysex.byte(mapped)
sysex.ascii(pid)
sysex.ascii(name)
sysex.send()
def update(self):
DeviceComponent.update(self)
if self.is_enabled():
if self._lock_button != None:
if self._locked_to_device:
self._lock_button.turn_on()
else:
self._lock_button.turn_off()
self._on_on_off_changed()
def set_device(self, device):
DeviceComponent.set_device(self, device)
if device is not None:
if hasattr(device, 'chains'):
LC2Sysex.log_message(str(len(device.chains)))
if hasattr(device, 'drum_pads'):
LC2Sysex.log_message(str(len(device.drum_pads)))
LC2Sysex.log_message(str(len(device.drum_pads[0].chains)))
cl = 0
par = False
if self._device is not None:
if hasattr(self._device, 'canonical_parent'):
if not isinstance(self._device.canonical_parent, Live.Device.Device):
par = isinstance(self._device.canonical_parent, Live.Chain.Chain)
else:
par = False
if hasattr(self._device, 'chains'):
chains = len(self._device.chains) > 0 and [ '' for i in range(8) if not (i < len(self._device.chains) and (self._device.chains[i].name == '' and 'Chain ' + str(i + 1) or self._device.chains[i].name)) ]
cl = min(8, len(self._device.chains))
else:
chains = [ '' for i in range(8) ]
else:
chains = [ '' for i in range(8) ]
else:
chains = [ '' for i in range(8) ]
sysex = LC2Sysex('CHAIN_NAMES')
sysex.byte(cl)
sysex.byte(int(par))
for i in range(8):
sysex.ascii(chains[i])
sysex.send()
self._selected_chain_id = 0
self._send_chain_devices()
def _send_chain_devices(self):
cdl = 0
if self._device is not None:
if hasattr(self._device, 'chains'):
if self._selected_chain_id < len(self._device.chains):
devices = [ '' for i in range(8) if not (i < len(self._device.chains[self._selected_chain_id].devices) and self._device.chains[self._selected_chain_id].devices[i].name) ]
cdl = min(8, len(self._device.chains[self._selected_chain_id].devices))
else:
devices = [ '' for i in range(8) ]
else:
devices = [ '' for i in range(8) ]
else:
devices = [ '' for i in range(8) ]
sysex = LC2Sysex('CHAIN_DEVICES')
sysex.byte(cdl)
for i in range(8):
sysex.ascii(devices[i])
sysex.send()
def set_device_select_buttons(self, buttons):
raise isinstance(tuple, buttons) or AssertionError
self._device_select_buttons = buttons
def _bank_up_value(self, value):
if self.is_enabled():
if not self._bank_up_button.is_momentary() or value is not 0:
if self._device != None:
num_banks = self.number_of_parameter_banks(self._device)
if num_banks > self._bank_index + 1:
self._bank_index += 1
self.update()
if num_banks == self._bank_index + 1:
self._bank_up_button.turn_off()
def _bank_down_value(self, value):
DeviceComponent._bank_down_value(self, value)
if self._bank_index == 0:
self._bank_down_button.turn_off()
def number_of_parameter_banks(self, device):
result = 0
if device != None:
param_count = len(list(device.parameters))
result = param_count / 16
if not param_count % 16 == 0:
result += 1
return result
def _assign_parameters(self):
raise self.is_enabled() or AssertionError
raise self._device != None or AssertionError
raise self._parameter_controls != None or AssertionError
parameters = self._device_parameters_to_map()
num_controls = len(self._parameter_controls)
index = self._bank_index * num_controls
for control in self._parameter_controls:
if index < len(parameters):
control.connect_to(parameters[index])
else:
control.release_parameter()
index += 1 | [
"[email protected]"
] | |
4030f63098bbbd19a41102250c7f615bf1a647c3 | dd87194dee537c2291cf0c0de809e2b1bf81b5b2 | /test/test_v1_job.py | 2a33786b9e31d281aa3aff1f99a840af636abb55 | [
"Apache-2.0"
] | permissive | Arvinhub/client-python | 3ea52640ab02e4bf5677d0fd54fdb4503ecb7768 | d67df30f635231d68dc4c20b9b7e234c616c1e6a | refs/heads/master | 2023-08-31T03:25:57.823810 | 2016-11-02T22:44:36 | 2016-11-02T22:44:36 | 73,865,578 | 1 | 0 | Apache-2.0 | 2018-10-10T12:16:45 | 2016-11-15T23:47:17 | Python | UTF-8 | Python | false | false | 1,310 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: unversioned
Generated by: https://github.com/swagger-api/swagger-codegen.git
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
import os
import sys
import unittest
import k8sclient
from k8sclient.rest import ApiException
from k8sclient.models.v1_job import V1Job
class TestV1Job(unittest.TestCase):
""" V1Job unit test stubs """
def setUp(self):
pass
def tearDown(self):
pass
def testV1Job(self):
"""
Test V1Job
"""
model = k8sclient.models.v1_job.V1Job()
if __name__ == '__main__':
unittest.main()
| [
"[email protected]"
] | |
6fe83533c4985956254a959f901bbfd8e7e686f8 | b63e42047081bc2be186d506bc08417cd13d547c | /rice/deps/prompt_toolkit/document.py | 2a9d1d79373438880647ed777ae41e7a1f6f0e56 | [
"MIT"
] | permissive | Arrendi/rice | dbd999aa632b4dacae10c6edd18c3eb31fd3ffde | 5bebd14556127613c9af4ac3fc1f95063110077d | refs/heads/master | 2021-08-28T15:25:49.239846 | 2017-12-12T15:56:51 | 2017-12-12T15:56:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 36,209 | py | """
The `Document` that implements all the text operations/querying.
"""
from __future__ import unicode_literals
import bisect
import re
import six
import string
import weakref
from six.moves import range, map
from .selection import SelectionType, SelectionState, PasteMode
from .clipboard import ClipboardData
__all__ = ('Document',)
# Regex for finding "words" in documents. (We consider a group of alnum
# characters a word, but also a group of special characters a word, as long as
# it doesn't contain a space.)
# (This is a 'word' in Vi.)
_FIND_WORD_RE = re.compile(r'([a-zA-Z0-9_]+|[^a-zA-Z0-9_\s]+)')
_FIND_CURRENT_WORD_RE = re.compile(r'^([a-zA-Z0-9_]+|[^a-zA-Z0-9_\s]+)')
_FIND_CURRENT_WORD_INCLUDE_TRAILING_WHITESPACE_RE = re.compile(r'^(([a-zA-Z0-9_]+|[^a-zA-Z0-9_\s]+)\s*)')
# Regex for finding "WORDS" in documents.
# (This is a 'WORD in Vi.)
_FIND_BIG_WORD_RE = re.compile(r'([^\s]+)')
_FIND_CURRENT_BIG_WORD_RE = re.compile(r'^([^\s]+)')
_FIND_CURRENT_BIG_WORD_INCLUDE_TRAILING_WHITESPACE_RE = re.compile(r'^([^\s]+\s*)')
# Share the Document._cache between all Document instances.
# (Document instances are considered immutable. That means that if another
# `Document` is constructed with the same text, it should have the same
# `_DocumentCache`.)
_text_to_document_cache = weakref.WeakValueDictionary() # Maps document.text to DocumentCache instance.
class _ImmutableLineList(list):
"""
Some protection for our 'lines' list, which is assumed to be immutable in the cache.
(Useful for detecting obvious bugs.)
"""
def _error(self, *a, **kw):
raise NotImplementedError('Attempt to modifiy an immutable list.')
__setitem__ = _error
append = _error
clear = _error
extend = _error
insert = _error
pop = _error
remove = _error
reverse = _error
sort = _error
class _DocumentCache(object):
def __init__(self):
#: List of lines for the Document text.
self.lines = None
#: List of index positions, pointing to the start of all the lines.
self.line_indexes = None
class Document(object):
"""
This is a immutable class around the text and cursor position, and contains
methods for querying this data, e.g. to give the text before the cursor.
This class is usually instantiated by a :class:`~prompt_toolkit.buffer.Buffer`
object, and accessed as the `document` property of that class.
:param text: string
:param cursor_position: int
:param selection: :class:`.SelectionState`
"""
__slots__ = ('_text', '_cursor_position', '_selection', '_cache')
def __init__(self, text='', cursor_position=None, selection=None):
assert isinstance(text, six.text_type), 'Got %r' % text
assert selection is None or isinstance(selection, SelectionState)
# Check cursor position. It can also be right after the end. (Where we
# insert text.)
assert cursor_position is None or cursor_position <= len(text), AssertionError(
'cursor_position=%r, len_text=%r' % (cursor_position, len(text)))
# By default, if no cursor position was given, make sure to put the
# cursor position is at the end of the document. This is what makes
# sense in most places.
if cursor_position is None:
cursor_position = len(text)
# Keep these attributes private. A `Document` really has to be
# considered to be immutable, because otherwise the caching will break
# things. Because of that, we wrap these into read-only properties.
self._text = text
self._cursor_position = cursor_position
self._selection = selection
# Cache for lines/indexes. (Shared with other Document instances that
# contain the same text.
try:
self._cache = _text_to_document_cache[self.text]
except KeyError:
self._cache = _DocumentCache()
_text_to_document_cache[self.text] = self._cache
# XX: For some reason, above, we can't use 'WeakValueDictionary.setdefault'.
# This fails in Pypy3. `self._cache` becomes None, because that's what
# 'setdefault' returns.
# self._cache = _text_to_document_cache.setdefault(self.text, _DocumentCache())
# assert self._cache
def __repr__(self):
return '%s(%r, %r)' % (self.__class__.__name__, self.text, self.cursor_position)
def __eq__(self, other):
assert isinstance(other, Document)
return (self.text == other.text and
self.cursor_position == other.cursor_position and
self.selection == other.selection)
@property
def text(self):
" The document text. "
return self._text
@property
def cursor_position(self):
" The document cursor position. "
return self._cursor_position
@property
def selection(self):
" :class:`.SelectionState` object. "
return self._selection
@property
def current_char(self):
""" Return character under cursor or an empty string. """
return self._get_char_relative_to_cursor(0) or ''
@property
def char_before_cursor(self):
""" Return character before the cursor or an empty string. """
return self._get_char_relative_to_cursor(-1) or ''
@property
def text_before_cursor(self):
return self.text[:self.cursor_position:]
@property
def text_after_cursor(self):
return self.text[self.cursor_position:]
@property
def current_line_before_cursor(self):
""" Text from the start of the line until the cursor. """
_, _, text = self.text_before_cursor.rpartition('\n')
return text
@property
def current_line_after_cursor(self):
""" Text from the cursor until the end of the line. """
text, _, _ = self.text_after_cursor.partition('\n')
return text
@property
def lines(self):
"""
Array of all the lines.
"""
# Cache, because this one is reused very often.
if self._cache.lines is None:
self._cache.lines = _ImmutableLineList(self.text.split('\n'))
return self._cache.lines
@property
def _line_start_indexes(self):
"""
Array pointing to the start indexes of all the lines.
"""
# Cache, because this is often reused. (If it is used, it's often used
# many times. And this has to be fast for editing big documents!)
if self._cache.line_indexes is None:
# Create list of line lengths.
line_lengths = map(len, self.lines)
# Calculate cumulative sums.
indexes = [0]
append = indexes.append
pos = 0
for line_length in line_lengths:
pos += line_length + 1
append(pos)
# Remove the last item. (This is not a new line.)
if len(indexes) > 1:
indexes.pop()
self._cache.line_indexes = indexes
return self._cache.line_indexes
@property
def lines_from_current(self):
"""
Array of the lines starting from the current line, until the last line.
"""
return self.lines[self.cursor_position_row:]
@property
def line_count(self):
r""" Return the number of lines in this document. If the document ends
with a trailing \n, that counts as the beginning of a new line. """
return len(self.lines)
@property
def current_line(self):
""" Return the text on the line where the cursor is. (when the input
consists of just one line, it equals `text`. """
return self.current_line_before_cursor + self.current_line_after_cursor
@property
def leading_whitespace_in_current_line(self):
""" The leading whitespace in the left margin of the current line. """
current_line = self.current_line
length = len(current_line) - len(current_line.lstrip())
return current_line[:length]
def _get_char_relative_to_cursor(self, offset=0):
"""
Return character relative to cursor position, or empty string
"""
try:
return self.text[self.cursor_position + offset]
except IndexError:
return ''
@property
def on_first_line(self):
"""
True when we are at the first line.
"""
return self.cursor_position_row == 0
@property
def on_last_line(self):
"""
True when we are at the last line.
"""
return self.cursor_position_row == self.line_count - 1
@property
def cursor_position_row(self):
"""
Current row. (0-based.)
"""
row, _ = self._find_line_start_index(self.cursor_position)
return row
@property
def cursor_position_col(self):
"""
Current column. (0-based.)
"""
# (Don't use self.text_before_cursor to calculate this. Creating
# substrings and doing rsplit is too expensive for getting the cursor
# position.)
_, line_start_index = self._find_line_start_index(self.cursor_position)
return self.cursor_position - line_start_index
def _find_line_start_index(self, index):
"""
For the index of a character at a certain line, calculate the index of
the first character on that line.
Return (row, index) tuple.
"""
indexes = self._line_start_indexes
pos = bisect.bisect_right(indexes, index) - 1
return pos, indexes[pos]
def translate_index_to_position(self, index):
"""
Given an index for the text, return the corresponding (row, col) tuple.
(0-based. Returns (0, 0) for index=0.)
"""
# Find start of this line.
row, row_index = self._find_line_start_index(index)
col = index - row_index
return row, col
def translate_row_col_to_index(self, row, col):
"""
Given a (row, col) tuple, return the corresponding index.
(Row and col params are 0-based.)
Negative row/col values are turned into zero.
"""
try:
result = self._line_start_indexes[row]
line = self.lines[row]
except IndexError:
if row < 0:
result = self._line_start_indexes[0]
line = self.lines[0]
else:
result = self._line_start_indexes[-1]
line = self.lines[-1]
result += max(0, min(col, len(line)))
# Keep in range. (len(self.text) is included, because the cursor can be
# right after the end of the text as well.)
result = max(0, min(result, len(self.text)))
return result
@property
def is_cursor_at_the_end(self):
""" True when the cursor is at the end of the text. """
return self.cursor_position == len(self.text)
@property
def is_cursor_at_the_end_of_line(self):
""" True when the cursor is at the end of this line. """
return self.current_char in ('\n', '')
def has_match_at_current_position(self, sub):
"""
`True` when this substring is found at the cursor position.
"""
return self.text.find(sub, self.cursor_position) == self.cursor_position
def find(self, sub, in_current_line=False, include_current_position=False,
ignore_case=False, count=1):
"""
Find `text` after the cursor, return position relative to the cursor
position. Return `None` if nothing was found.
:param count: Find the n-th occurance.
"""
assert isinstance(ignore_case, bool)
if in_current_line:
text = self.current_line_after_cursor
else:
text = self.text_after_cursor
if not include_current_position:
if len(text) == 0:
return # (Otherwise, we always get a match for the empty string.)
else:
text = text[1:]
flags = re.IGNORECASE if ignore_case else 0
iterator = re.finditer(re.escape(sub), text, flags)
try:
for i, match in enumerate(iterator):
if i + 1 == count:
if include_current_position:
return match.start(0)
else:
return match.start(0) + 1
except StopIteration:
pass
def find_all(self, sub, ignore_case=False):
"""
Find all occurances of the substring. Return a list of absolute
positions in the document.
"""
flags = re.IGNORECASE if ignore_case else 0
return [a.start() for a in re.finditer(re.escape(sub), self.text, flags)]
def find_backwards(self, sub, in_current_line=False, ignore_case=False, count=1):
"""
Find `text` before the cursor, return position relative to the cursor
position. Return `None` if nothing was found.
:param count: Find the n-th occurance.
"""
if in_current_line:
before_cursor = self.current_line_before_cursor[::-1]
else:
before_cursor = self.text_before_cursor[::-1]
flags = re.IGNORECASE if ignore_case else 0
iterator = re.finditer(re.escape(sub[::-1]), before_cursor, flags)
try:
for i, match in enumerate(iterator):
if i + 1 == count:
return - match.start(0) - len(sub)
except StopIteration:
pass
def get_word_before_cursor(self, WORD=False):
"""
Give the word before the cursor.
If we have whitespace before the cursor this returns an empty string.
"""
if self.text_before_cursor[-1:].isspace():
return ''
else:
return self.text_before_cursor[self.find_start_of_previous_word(WORD=WORD):]
def find_start_of_previous_word(self, count=1, WORD=False):
"""
Return an index relative to the cursor position pointing to the start
of the previous word. Return `None` if nothing was found.
"""
# Reverse the text before the cursor, in order to do an efficient
# backwards search.
text_before_cursor = self.text_before_cursor[::-1]
regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE
iterator = regex.finditer(text_before_cursor)
try:
for i, match in enumerate(iterator):
if i + 1 == count:
return - match.end(1)
except StopIteration:
pass
def find_boundaries_of_current_word(self, WORD=False, include_leading_whitespace=False,
include_trailing_whitespace=False):
"""
Return the relative boundaries (startpos, endpos) of the current word under the
cursor. (This is at the current line, because line boundaries obviously
don't belong to any word.)
If not on a word, this returns (0,0)
"""
text_before_cursor = self.current_line_before_cursor[::-1]
text_after_cursor = self.current_line_after_cursor
def get_regex(include_whitespace):
return {
(False, False): _FIND_CURRENT_WORD_RE,
(False, True): _FIND_CURRENT_WORD_INCLUDE_TRAILING_WHITESPACE_RE,
(True, False): _FIND_CURRENT_BIG_WORD_RE,
(True, True): _FIND_CURRENT_BIG_WORD_INCLUDE_TRAILING_WHITESPACE_RE,
}[(WORD, include_whitespace)]
match_before = get_regex(include_leading_whitespace).search(text_before_cursor)
match_after = get_regex(include_trailing_whitespace).search(text_after_cursor)
# When there is a match before and after, and we're not looking for
# WORDs, make sure that both the part before and after the cursor are
# either in the [a-zA-Z_] alphabet or not. Otherwise, drop the part
# before the cursor.
if not WORD and match_before and match_after:
c1 = self.text[self.cursor_position - 1]
c2 = self.text[self.cursor_position]
alphabet = string.ascii_letters + '0123456789_'
if (c1 in alphabet) != (c2 in alphabet):
match_before = None
return (
- match_before.end(1) if match_before else 0,
match_after.end(1) if match_after else 0
)
def get_word_under_cursor(self, WORD=False):
"""
Return the word, currently below the cursor.
This returns an empty string when the cursor is on a whitespace region.
"""
start, end = self.find_boundaries_of_current_word(WORD=WORD)
return self.text[self.cursor_position + start: self.cursor_position + end]
def find_next_word_beginning(self, count=1, WORD=False):
"""
Return an index relative to the cursor position pointing to the start
of the next word. Return `None` if nothing was found.
"""
if count < 0:
return self.find_previous_word_beginning(count=-count, WORD=WORD)
regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE
iterator = regex.finditer(self.text_after_cursor)
try:
for i, match in enumerate(iterator):
# Take first match, unless it's the word on which we're right now.
if i == 0 and match.start(1) == 0:
count += 1
if i + 1 == count:
return match.start(1)
except StopIteration:
pass
def find_next_word_ending(self, include_current_position=False, count=1, WORD=False):
"""
Return an index relative to the cursor position pointing to the end
of the next word. Return `None` if nothing was found.
"""
if count < 0:
return self.find_previous_word_ending(count=-count, WORD=WORD)
if include_current_position:
text = self.text_after_cursor
else:
text = self.text_after_cursor[1:]
regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE
iterable = regex.finditer(text)
try:
for i, match in enumerate(iterable):
if i + 1 == count:
value = match.end(1)
if include_current_position:
return value
else:
return value + 1
except StopIteration:
pass
def find_previous_word_beginning(self, count=1, WORD=False):
"""
Return an index relative to the cursor position pointing to the start
of the previous word. Return `None` if nothing was found.
"""
if count < 0:
return self.find_next_word_beginning(count=-count, WORD=WORD)
regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE
iterator = regex.finditer(self.text_before_cursor[::-1])
try:
for i, match in enumerate(iterator):
if i + 1 == count:
return - match.end(1)
except StopIteration:
pass
def find_previous_word_ending(self, count=1, WORD=False):
"""
Return an index relative to the cursor position pointing to the end
of the previous word. Return `None` if nothing was found.
"""
if count < 0:
return self.find_next_word_ending(count=-count, WORD=WORD)
text_before_cursor = self.text_after_cursor[:1] + self.text_before_cursor[::-1]
regex = _FIND_BIG_WORD_RE if WORD else _FIND_WORD_RE
iterator = regex.finditer(text_before_cursor)
try:
for i, match in enumerate(iterator):
# Take first match, unless it's the word on which we're right now.
if i == 0 and match.start(1) == 0:
count += 1
if i + 1 == count:
return -match.start(1) + 1
except StopIteration:
pass
def find_next_matching_line(self, match_func, count=1):
"""
Look downwards for empty lines.
Return the line index, relative to the current line.
"""
result = None
for index, line in enumerate(self.lines[self.cursor_position_row + 1:]):
if match_func(line):
result = 1 + index
count -= 1
if count == 0:
break
return result
def find_previous_matching_line(self, match_func, count=1):
"""
Look upwards for empty lines.
Return the line index, relative to the current line.
"""
result = None
for index, line in enumerate(self.lines[:self.cursor_position_row][::-1]):
if match_func(line):
result = -1 - index
count -= 1
if count == 0:
break
return result
def get_cursor_left_position(self, count=1):
"""
Relative position for cursor left.
"""
if count < 0:
return self.get_cursor_right_position(-count)
return - min(self.cursor_position_col, count)
def get_cursor_right_position(self, count=1):
"""
Relative position for cursor_right.
"""
if count < 0:
return self.get_cursor_left_position(-count)
return min(count, len(self.current_line_after_cursor))
def get_cursor_up_position(self, count=1, preferred_column=None):
"""
Return the relative cursor position (character index) where we would be if the
user pressed the arrow-up button.
:param preferred_column: When given, go to this column instead of
staying at the current column.
"""
assert count >= 1
column = self.cursor_position_col if preferred_column is None else preferred_column
return self.translate_row_col_to_index(
max(0, self.cursor_position_row - count), column) - self.cursor_position
def get_cursor_down_position(self, count=1, preferred_column=None):
"""
Return the relative cursor position (character index) where we would be if the
user pressed the arrow-down button.
:param preferred_column: When given, go to this column instead of
staying at the current column.
"""
assert count >= 1
column = self.cursor_position_col if preferred_column is None else preferred_column
return self.translate_row_col_to_index(
self.cursor_position_row + count, column) - self.cursor_position
def find_enclosing_bracket_right(self, left_ch, right_ch, end_pos=None):
"""
Find the right bracket enclosing current position. Return the relative
position to the cursor position.
When `end_pos` is given, don't look past the position.
"""
if self.current_char == right_ch:
return 0
if end_pos is None:
end_pos = len(self.text)
else:
end_pos = min(len(self.text), end_pos)
stack = 1
# Look forward.
for i in range(self.cursor_position + 1, end_pos):
c = self.text[i]
if c == left_ch:
stack += 1
elif c == right_ch:
stack -= 1
if stack == 0:
return i - self.cursor_position
def find_enclosing_bracket_left(self, left_ch, right_ch, start_pos=None):
"""
Find the left bracket enclosing current position. Return the relative
position to the cursor position.
When `start_pos` is given, don't look past the position.
"""
if self.current_char == left_ch:
return 0
if start_pos is None:
start_pos = 0
else:
start_pos = max(0, start_pos)
stack = 1
# Look backward.
for i in range(self.cursor_position - 1, start_pos - 1, -1):
c = self.text[i]
if c == right_ch:
stack += 1
elif c == left_ch:
stack -= 1
if stack == 0:
return i - self.cursor_position
def find_matching_bracket_position(self, start_pos=None, end_pos=None):
"""
Return relative cursor position of matching [, (, { or < bracket.
When `start_pos` or `end_pos` are given. Don't look past the positions.
"""
# Look for a match.
for A, B in '()', '[]', '{}', '<>':
if self.current_char == A:
return self.find_enclosing_bracket_right(A, B, end_pos=end_pos) or 0
elif self.current_char == B:
return self.find_enclosing_bracket_left(A, B, start_pos=start_pos) or 0
return 0
def get_start_of_document_position(self):
""" Relative position for the start of the document. """
return - self.cursor_position
def get_end_of_document_position(self):
""" Relative position for the end of the document. """
return len(self.text) - self.cursor_position
def get_start_of_line_position(self, after_whitespace=False):
""" Relative position for the start of this line. """
if after_whitespace:
current_line = self.current_line
return len(current_line) - len(current_line.lstrip()) - self.cursor_position_col
else:
return - len(self.current_line_before_cursor)
def get_end_of_line_position(self):
""" Relative position for the end of this line. """
return len(self.current_line_after_cursor)
def last_non_blank_of_current_line_position(self):
"""
Relative position for the last non blank character of this line.
"""
return len(self.current_line.rstrip()) - self.cursor_position_col - 1
def get_column_cursor_position(self, column):
"""
Return the relative cursor position for this column at the current
line. (It will stay between the boundaries of the line in case of a
larger number.)
"""
line_length = len(self.current_line)
current_column = self.cursor_position_col
column = max(0, min(line_length, column))
return column - current_column
def selection_range(self): # XXX: shouldn't this return `None` if there is no selection???
"""
Return (from, to) tuple of the selection.
start and end position are included.
This doesn't take the selection type into account. Use
`selection_ranges` instead.
"""
if self.selection:
from_, to = sorted([self.cursor_position, self.selection.original_cursor_position])
else:
from_, to = self.cursor_position, self.cursor_position
return from_, to
def selection_ranges(self):
"""
Return a list of (from, to) tuples for the selection or none if nothing
was selected. start and end position are always included in the
selection.
This will yield several (from, to) tuples in case of a BLOCK selection.
"""
if self.selection:
from_, to = sorted([self.cursor_position, self.selection.original_cursor_position])
if self.selection.type == SelectionType.BLOCK:
from_line, from_column = self.translate_index_to_position(from_)
to_line, to_column = self.translate_index_to_position(to)
from_column, to_column = sorted([from_column, to_column])
lines = self.lines
for l in range(from_line, to_line + 1):
line_length = len(lines[l])
if from_column < line_length:
yield (self.translate_row_col_to_index(l, from_column),
self.translate_row_col_to_index(l, min(line_length - 1, to_column)))
else:
# In case of a LINES selection, go to the start/end of the lines.
if self.selection.type == SelectionType.LINES:
from_ = max(0, self.text.rfind('\n', 0, from_) + 1)
if self.text.find('\n', to) >= 0:
to = self.text.find('\n', to)
else:
to = len(self.text) - 1
yield from_, to
def selection_range_at_line(self, row):
"""
If the selection spans a portion of the given line, return a (from, to) tuple.
Otherwise, return None.
"""
if self.selection:
row_start = self.translate_row_col_to_index(row, 0)
row_end = self.translate_row_col_to_index(row, max(0, len(self.lines[row]) - 1))
from_, to = sorted([self.cursor_position, self.selection.original_cursor_position])
# Take the intersection of the current line and the selection.
intersection_start = max(row_start, from_)
intersection_end = min(row_end, to)
if intersection_start <= intersection_end:
if self.selection.type == SelectionType.LINES:
intersection_start = row_start
intersection_end = row_end
elif self.selection.type == SelectionType.BLOCK:
_, col1 = self.translate_index_to_position(from_)
_, col2 = self.translate_index_to_position(to)
col1, col2 = sorted([col1, col2])
intersection_start = self.translate_row_col_to_index(row, col1)
intersection_end = self.translate_row_col_to_index(row, col2)
_, from_column = self.translate_index_to_position(intersection_start)
_, to_column = self.translate_index_to_position(intersection_end)
return from_column, to_column
def cut_selection(self):
"""
Return a (:class:`.Document`, :class:`.ClipboardData`) tuple, where the
document represents the new document when the selection is cut, and the
clipboard data, represents whatever has to be put on the clipboard.
"""
if self.selection:
cut_parts = []
remaining_parts = []
new_cursor_position = self.cursor_position
last_to = 0
for from_, to in self.selection_ranges():
if last_to == 0:
new_cursor_position = from_
remaining_parts.append(self.text[last_to:from_])
cut_parts.append(self.text[from_:to + 1])
last_to = to + 1
remaining_parts.append(self.text[last_to:])
cut_text = '\n'.join(cut_parts)
remaining_text = ''.join(remaining_parts)
# In case of a LINES selection, don't include the trailing newline.
if self.selection.type == SelectionType.LINES and cut_text.endswith('\n'):
cut_text = cut_text[:-1]
return (Document(text=remaining_text, cursor_position=new_cursor_position),
ClipboardData(cut_text, self.selection.type))
else:
return self, ClipboardData('')
def paste_clipboard_data(self, data, paste_mode=PasteMode.EMACS, count=1):
"""
Return a new :class:`.Document` instance which contains the result if
we would paste this data at the current cursor position.
:param paste_mode: Where to paste. (Before/after/emacs.)
:param count: When >1, Paste multiple times.
"""
assert isinstance(data, ClipboardData)
assert paste_mode in (PasteMode.VI_BEFORE, PasteMode.VI_AFTER, PasteMode.EMACS)
before = (paste_mode == PasteMode.VI_BEFORE)
after = (paste_mode == PasteMode.VI_AFTER)
if data.type == SelectionType.CHARACTERS:
if after:
new_text = (self.text[:self.cursor_position + 1] + data.text * count +
self.text[self.cursor_position + 1:])
else:
new_text = self.text_before_cursor + data.text * count + self.text_after_cursor
new_cursor_position = self.cursor_position + len(data.text) * count
if before:
new_cursor_position -= 1
elif data.type == SelectionType.LINES:
l = self.cursor_position_row
if before:
lines = self.lines[:l] + [data.text] * count + self.lines[l:]
new_text = '\n'.join(lines)
new_cursor_position = len(''.join(self.lines[:l])) + l
else:
lines = self.lines[:l + 1] + [data.text] * count + self.lines[l + 1:]
new_cursor_position = len(''.join(self.lines[:l + 1])) + l + 1
new_text = '\n'.join(lines)
elif data.type == SelectionType.BLOCK:
lines = self.lines[:]
start_line = self.cursor_position_row
start_column = self.cursor_position_col + (0 if before else 1)
for i, line in enumerate(data.text.split('\n')):
index = i + start_line
if index >= len(lines):
lines.append('')
lines[index] = lines[index].ljust(start_column)
lines[index] = lines[index][:start_column] + line * count + lines[index][start_column:]
new_text = '\n'.join(lines)
new_cursor_position = self.cursor_position + (0 if before else 1)
return Document(text=new_text, cursor_position=new_cursor_position)
def empty_line_count_at_the_end(self):
"""
Return number of empty lines at the end of the document.
"""
count = 0
for line in self.lines[::-1]:
if not line or line.isspace():
count += 1
else:
break
return count
def start_of_paragraph(self, count=1, before=False):
"""
Return the start of the current paragraph. (Relative cursor position.)
"""
def match_func(text):
return not text or text.isspace()
line_index = self.find_previous_matching_line(match_func=match_func, count=count)
if line_index:
add = 0 if before else 1
return min(0, self.get_cursor_up_position(count=-line_index) + add)
else:
return -self.cursor_position
def end_of_paragraph(self, count=1, after=False):
"""
Return the end of the current paragraph. (Relative cursor position.)
"""
def match_func(text):
return not text or text.isspace()
line_index = self.find_next_matching_line(match_func=match_func, count=count)
if line_index:
add = 0 if after else 1
return max(0, self.get_cursor_down_position(count=line_index) - add)
else:
return len(self.text_after_cursor)
# Modifiers.
def insert_after(self, text):
"""
Create a new document, with this text inserted after the buffer.
It keeps selection ranges and cursor position in sync.
"""
return Document(
text=self.text + text,
cursor_position=self.cursor_position,
selection=self.selection)
def insert_before(self, text):
"""
Create a new document, with this text inserted before the buffer.
It keeps selection ranges and cursor position in sync.
"""
selection_state = self.selection
if selection_state:
selection_state = SelectionState(
original_cursor_position=selection_state.original_cursor_position + len(text),
type=selection_state.type)
return Document(
text=text + self.text,
cursor_position=self.cursor_position + len(text),
selection=selection_state)
| [
"[email protected]"
] | |
9b6e87777212e93821e9296860eef76c187aa685 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/303/usersdata/298/82997/submittedfiles/testes.py | 526e6017d8abd2de623bff22ac68e85aeb35505c | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,205 | py | n = int(input('Digite um numero inteiro positivo entre 1 e 100: '))
while (n<1) and (n>100):
print('Entrada inválida.')
n = int(input('Digite um numero inteiro positivo entre 1 e 100: '))
if n in range (1,100):
kn = float(((n + 2)/10)*2)
print('%.4f' % kn)
#-----------------------------------------------------------------------------------------------------------------------
n1 = int(input('Digite um número inteiro: '))
n2 = int(input('Digite um número inteiro: '))
n3 = int(input('Digite um número inteiro: '))
listan1 = []
kn1 = 1
while (kn1<=n1*n2*n3):
multiplo1 = n1*kn1
listan1 = listan1 + [multiplo1]
kn1 = kn1 + 1
listan2 = []
kn2 = 1
while (kn2<=n1*n2*n3):
multiplo2 = n2*kn2
listan2 = listan2 + [multiplo2]
kn2 = kn2 + 1
listan3 = []
kn3 = 1
while (kn3<=n1*n2*n3):
multiplo3 = n3*kn3
listan3 = listan3 + [multiplo3]
kn3 = kn3 + 1
listapreliminar = [i for i in listan1 if i in listan2]
listafinal = [i for i in listapreliminar if i in listan3]
mmc = listafinal[0]
print('\nO mmc é:')
print(mmc)
print('\n')
#---------------------------------------------------------------------------------------------------------------------------
b = int(input('Digite um número inteiro: '))
c = int(input('Digite um número inteiro: '))
d = int(input('Digite um número inteiro: '))
lista1=[]
k1=1
while k1<=b:
if (b%k1)==0:
lista1=lista1+ [k1]
k1=k1+1
lista2=[]
k2=1
while k2<=c:
if (c%k2)==0:
lista2=lista2+ [k2]
k2=k2+1
lista3=[]
k3=1
while k3<=d:
if (d%k3)==0:
lista3=lista3+ [k3]
k3=k3+1
listapreliminar = [i for i in lista1 if i in lista2]
listafinal = [i for i in listapreliminar if i in lista3]
mdc = listafinal[(len(listafinal) - 1)]
print('\nMáximo divisor comum:')
print(mdc)
print('\n')
#---------------------------------------------------------------------------------------------------------------------
a = int(input('Digite um número inteiro: '))
lista=[]
k=1
while k<=a:
if (a%k)==0:
lista = lista + [k]
k=k+1
divisores=int(len(lista))
print('\nLista de divisores:')
print(lista)
print('\nQuantidade de divisores: %i' % divisores) | [
"[email protected]"
] | |
7580db354e832980cb68e6afb7c9c89485dede71 | b0cdbad299f6174bfdb0fba173dbcf3889b82209 | /Modules/datetime/d1.py | 29a423c96933b4d0b2a03754743aa30a42bb5be7 | [] | no_license | deesaw/PythonD-06 | a33e676f1e0cfc13b4ea645c8b60547b198239ac | 3c6f065d7be2e3e10cafb6cef79d6cae9d55a7fa | refs/heads/master | 2023-03-18T08:24:42.030935 | 2021-03-02T14:15:09 | 2021-03-02T14:15:09 | 343,797,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | import datetime
bday=(datetime.date(2000,7,26))
print(bday)
print('Year : ',bday.year)
print('Month : ',bday.month)
print('Date : ',bday.day)
t = datetime.time(9, 25, 39,10)
print( t )
print( 'hour :', t.hour )
print( 'minute:', t.minute )
print( 'second:', t.second )
print( 'microsecond:', t.microsecond )
| [
"[email protected]"
] | |
9e7c2bcddff622777890630a880abba20a2ceb93 | 9152c6f5b692694c4cb95725319fc8dd21d30455 | /office365/runtime/client_value_object.py | 6d76794e0d56308f5fb685632d48f2ac654b41b2 | [
"MIT"
] | permissive | VISIN9/Office365-REST-Python-Client | cf3de86a6bdd2461ff5814dbfa02d4d4185917d5 | 91c07d427a76197f6eb143c6253bdc832cbb889d | refs/heads/master | 2021-05-25T08:43:35.530546 | 2020-04-06T20:24:53 | 2020-04-06T20:24:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 530 | py | from office365.runtime.odata.json_light_format import JsonLightFormat
from office365.runtime.odata.odata_metadata_level import ODataMetadataLevel
class ClientValueObject(object):
"""Base client value object"""
def map_json(self, json):
for key, val in json.items():
# if hasattr(type(self), key):
self.__dict__[key] = val
def to_json(self):
return dict((k, v) for k, v in vars(self).items() if v is not None)
@property
def entityTypeName(self):
return None
| [
"[email protected]"
] | |
386494842d287ea6d6dfa1a2affa37e918c30a55 | 1a937b899af949d23e667782a7360b9de1634456 | /SoftUni/Advanced Tree Structures - II/homework/sweep_and_prune.py | 3f531c9cb5c36afd49d3a4e1d23949822687a1c9 | [] | no_license | stanislavkozlovski/data_structures_feb_2016 | c498df6ea7cb65d135057a300e0d7e6106713722 | adedac3349df249fe056bc10c11b0b51c49e24bb | refs/heads/master | 2021-07-06T17:37:18.117104 | 2017-09-30T19:01:51 | 2017-09-30T19:01:51 | 75,526,414 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,930 | py | OBJECT_WIDTH, OBJECT_HEIGHT = 10, 10
class BoundableObject:
def __init__(self, name, x1, y1):
self.name = name
self.x1 = x1
self.x2 = x1 + OBJECT_WIDTH
self.y1 = y1
self.y2 = y1 + OBJECT_HEIGHT
def __repr__(self):
return '{x1} {x2}'.format(x1=self.x1, x2=self.x2,)
def __str__(self):
return self.name
def __gt__(self, other):
return self.x1 > other.x1
def __lt__(self, other):
return self.x1 < other.x1
def intersects(self, other):
return (
self.x1 <= other.x2 and other.x1 <= self.x2
and self.y1 <= other.y2 and other.y1 <= self.y2)
def change_coords(self, new_x, new_y):
self.x1 = new_x
self.x2 = self.x1 + OBJECT_WIDTH
self.y1 = new_y
self.y2 = self.y1 + OBJECT_HEIGHT
def insertion_sort(arr):
for idx in range(1, len(arr)):
pos = idx
curr_value = arr[idx]
while pos > 0 and curr_value < arr[pos-1]:
arr[pos] = arr[pos-1]
pos -= 1
arr[pos] = curr_value
return arr
class Game:
def __init__(self):
self.has_started = False
self.objects = []
self.tick_count = 1
def game_tick(self):
self.objects = insertion_sort(self.objects)
self.check_for_collisions()
self.tick_count += 1
def check_for_collisions(self):
for idx, obj in enumerate(self.objects):
for sec_idx in range(idx + 1, len(self.objects)):
if obj.intersects(self.objects[sec_idx]):
print('({tick}) - {obj1} collides with {obj2}'.format(tick=self.tick_count, obj1=obj,
obj2=self.objects[sec_idx]))
else: # no need to continue since this is a sorted array
break
def handle_commands(self):
command = input()
if not self.has_started:
if command == 'start':
self.has_started = True
return
if command.startswith('add'):
name, x1, y1 = command.split()[1:]
x1, y1 = int(x1), int(y1)
self.objects.append(BoundableObject(name, x1, y1))
else: # game has started
if command.startswith('move'):
name, x1, y1 = command.split()[1:]
x1, y1 = int(x1), int(y1)
obj = self.find_object_with_name(name)
if obj is None:
raise Exception('No such object in the array!')
obj.change_coords(x1, y1)
self.game_tick()
def find_object_with_name(self, name):
for obj in self.objects:
if obj.name == name:
return obj
def main():
game = Game()
while True:
game.handle_commands()
if __name__ == '__main__':
main() | [
"[email protected]"
] | |
1c345f9f054da786bb4b108d6e9fe03934792328 | 0f47b8b3775e1730f92141128491b0bbfe3d89e0 | /data_structure/graph/shortest_path/floydwarshall.py | e74f989ab56a38084b43fe4e47c8b53dce6094b5 | [] | no_license | hongmin0907/CS | 1d75c38da98c6174ea19de163c850d0f3bac22e3 | 697e8e1a5bde56a7588381a12f74bbb0e3aee3e8 | refs/heads/master | 2020-06-23T20:10:22.051477 | 2019-07-15T00:20:09 | 2019-07-15T00:20:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,194 | py | from copy import deepcopy
class ShortestPath:
def __init__(self, A, path):
#2차원 배열 A
self.A=A
#2차원 배열 path
self.path=path
def print_shortest_path(self, source, dest):
print(source, end=" ")
self.__print_sp(source, dest)
print(dest, end=" ")
def __print_sp(self, i, j):
if self.path[i][j]==None:
return
k=self.path[i][j]
# i~k까지 출력
self.__print_sp(i, k)
# k 출력
print(k, end=" ")
# k~j까지 출력
self.__print_sp(k, j)
class Graph:
#모든 가중치보다 충분히 큰 수(inf 대신 사용)
BIG_NUMBER=2000
def __init__(self, vnum):
#A^-1 mat을 만들 때 if <u, v> not in E(G) then inf
#inf 대신에 모든 가중치보다 충분히 큰 수를 사용
self.adjacency_matrix=[[self.BIG_NUMBER for _ in range(vnum)] for _ in range(vnum)]
for i in range(vnum):
self.adjacency_matrix[i][i]=0
self.vertex_num=vnum
def insert_edge(self, u, v, w):
self.adjacency_matrix[u][v]=w
def floyd_warshall(self):
#A^-1 mat
A=deepcopy(self.adjacency_matrix)
#경로 기록을 위한 2차원 배열
path=[[None for _ in range(self.vertex_num)] for _ in range(self.vertex_num)]
for k in range(self.vertex_num):
for i in range(self.vertex_num):
for j in range(self.vertex_num):
#A^k[i][j]=min{A^(k-1)[i][j], A^(k-1)[i][k]+A^(k-1)[k][j]}
if A[i][j] > A[i][k] + A[k][j]:
A[i][j]=A[i][k]+A[k][j]
path[i][j]=k
sp=ShortestPath(A, path)
return sp
if __name__=="__main__":
# simple example
# g=Graph(4)
# g.insert_edge(0, 1, 12)
# g.insert_edge(0, 2, 3)
# g.insert_edge(1, 3, 15)
# g.insert_edge(1, 2, 5)
# g.insert_edge(2, 0, 7)
# g.insert_edge(2, 1, 6)
# g.insert_edge(2, 3, 2)
# g.insert_edge(3, 1, 13)
# g.insert_edge(3, 2, 6)
# source=0
# dest=3
# complicated example
g=Graph(6)
g.insert_edge(0, 1, 5)
g.insert_edge(0, 2, 7)
g.insert_edge(0, 5, 9)
g.insert_edge(1, 3, 4)
g.insert_edge(1, 5, 2)
g.insert_edge(2, 0, 8)
g.insert_edge(2, 4, 6)
g.insert_edge(3, 0, 6)
g.insert_edge(3, 4, 2)
g.insert_edge(3, 5, 3)
g.insert_edge(4, 2, 3)
g.insert_edge(4, 5, 10)
g.insert_edge(5, 1, 7)
g.insert_edge(5, 2, 4)
source=2
dest=3
sp=g.floyd_warshall()
print("A mat")
for i in range(g.vertex_num):
for j in range(g.vertex_num):
print("{}".format(sp.A[i][j]).rjust(4), end="")
print()
print()
print("path mat")
for i in range(g.vertex_num):
for j in range(g.vertex_num):
if sp.path[i][j]==None:
print("{} ".format("N").rjust(4), end="")
else:
print("{} ".format(sp.path[i][j]).rjust(4), end="")
print()
print()
print("path from {} to {}".format(source, dest))
sp.print_shortest_path(source, dest)
print()
| [
"[email protected]"
] | |
41fab65078d3fb5f668f2cb47c7cc24fb333394f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03371/s845988695.py | 4818cf4f4ba7277bd6347d6792e793a348563d0c | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py | A,B,C,X,Y=map(int,input().split())
ans=0
if C*2<=A+B:
mi=min(X,Y)
ans=mi*C*2
if Y<=X:
ans+=min(A*(X-mi),2*C*(X-mi))
else:
ans+=min(B*(Y-mi),2*C*(Y-mi))
else:
ans=A*X+B*Y
print(ans) | [
"[email protected]"
] | |
e3d72dcb67b7c3981d26691b7181d72ccf66814e | 7807d8d9d109a3e272fffed91bf841201da39256 | /trans_ALDS1_1_B/HARU55_ALDS1_1_B_kotonoha.py | 2d3f4f61cfadb439b240ad350d2e8f32c35c3b9d | [] | no_license | y-akinobu/AOJ_to_Kotonoha | 0e8df43393964fcdd5df06c75545091bd6c0c2e2 | 5a694a55a3d85e3fbc4a07b57edc4374556db9a1 | refs/heads/main | 2023-02-05T15:33:16.581177 | 2020-12-30T16:14:44 | 2020-12-30T16:14:44 | 325,524,216 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 552 | py | # map(整数,入力された文字列を空白で分割した列)を展開し順にNとMとする
N, M = map(int, input().split())
# 真の間、繰り返す
while True :
# NがMより小さいとき、
if N < M :
# NとMを入れ替える
N, M = M, N
# NをMで割った余りをaとする
a = N % M
# aが0のとき、
if a == 0 :
# 繰り返すのを中断する
break
# ()
else :[#Else [#Block [#MultiAssignment left: [# [#Name 'N'][#Name 'M']]right: [#Tuple [#Name 'M'][#Name 'a']]]]]
# Mを出力する
print(M) | [
"[email protected]"
] | |
4b9bf327874fb716a5ef0c14b6c733148ed3e614 | d3efc82dfa61fb82e47c82d52c838b38b076084c | /Autocase_Result/FXJSMM/YW_FXJSMM_SZSJ_307.py | 94a0758207761f5b78d6a48514fdeaef3d006e5d | [] | no_license | nantongzyg/xtp_test | 58ce9f328f62a3ea5904e6ed907a169ef2df9258 | ca9ab5cee03d7a2f457a95fb0f4762013caa5f9f | refs/heads/master | 2022-11-30T08:57:45.345460 | 2020-07-30T01:43:30 | 2020-07-30T01:43:30 | 280,388,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,002 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import sys
sys.path.append("/home/yhl2/workspace/xtp_test/xtp/api")
from xtp_test_case import *
sys.path.append("/home/yhl2/workspace/xtp_test/service")
from ServiceConfig import *
from mainService import *
from QueryStkPriceQty import *
from log import *
sys.path.append("/home/yhl2/workspace/xtp_test/mysql")
from CaseParmInsertMysql import *
sys.path.append("/home/yhl2/workspace/xtp_test/utils")
from QueryOrderErrorMsg import queryOrderErrorMsg
class YW_FXJSMM_SZSJ_307(xtp_test_case):
# YW_FXJSMM_SZSJ_307
def test_YW_FXJSMM_SZSJ_307(self):
title = '交易日本方最优-T+0卖→T+0买'
# 定义当前测试用例的期待值
# 期望状态:初始、未成交、部成、全成、部撤已报、部撤、已报待撤、已撤、废单、撤废、内部撤单
# xtp_ID和cancel_xtpID默认为0,不需要变动
case_goal = {
'期望状态': '全成',
'errorID': 0,
'errorMSG': '',
'是否生成报单': '是',
'是否是撤废': '否',
'xtp_ID': 0,
'cancel_xtpID': 0,
}
logger.warning(title)
# 定义委托参数信息------------------------------------------
# 参数:证券代码、市场、证券类型、证券状态、交易状态、买卖方向(B买S卖)、期望状态、Api
stkparm = QueryStkPriceQty('001066', '2', '0', '0', '0', 'S', case_goal['期望状态'], Api)
# 如果下单参数获取失败,则用例失败
if stkparm['返回结果'] is False:
rs = {
'用例测试结果': stkparm['返回结果'],
'测试错误原因': '获取下单参数失败,' + stkparm['错误原因'],
}
self.assertEqual(rs['用例测试结果'], True)
else:
wt_reqs = {
'business_type': Api.const.XTP_BUSINESS_TYPE['XTP_BUSINESS_TYPE_CASH'],
'order_client_id':2,
'market': Api.const.XTP_MARKET_TYPE['XTP_MKT_SZ_A'],
'ticker': stkparm['证券代码'],
'side': Api.const.XTP_SIDE_TYPE['XTP_SIDE_SELL'],
'price_type': Api.const.XTP_PRICE_TYPE['XTP_PRICE_FORWARD_BEST'],
'price': stkparm['涨停价'],
'quantity': 10000,
'position_effect': Api.const.XTP_POSITION_EFFECT_TYPE['XTP_POSITION_EFFECT_INIT']
}
ParmIni(Api, case_goal['期望状态'], wt_reqs['price_type'])
CaseParmInsertMysql(case_goal, wt_reqs)
rs = serviceTest(Api, case_goal, wt_reqs)
logger.warning('执行结果为' + str(rs['用例测试结果']) + ','
+ str(rs['用例错误源']) + ',' + str(rs['用例错误原因']))
self.assertEqual(rs['用例测试结果'], True) # 0
if __name__ == '__main__':
unittest.main()
| [
"[email protected]"
] | |
04ae437e0973bf482e71ebf5563db2e45951c6c9 | 9c32890a188dfcd949883c10c8db112aed5321d6 | /learner/wsgi.py | 1f2d5f930764af173595a367e93da2297a089d37 | [] | no_license | gitanjali1077/learner | dcb11d92b84bac0a9254a2409570261a03503945 | fef0c5554b100216210ba8f3777bad69a9219d4f | refs/heads/master | 2022-12-12T08:24:55.268350 | 2018-03-02T04:34:43 | 2018-03-02T04:34:43 | 122,777,081 | 1 | 0 | null | 2022-11-22T02:15:06 | 2018-02-24T20:28:20 | CSS | UTF-8 | Python | false | false | 484 | py | """
WSGI config for learner 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/1.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "learner.settings")
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
| [
"[email protected]"
] | |
cb03689df98cce2aeec0d424a2ee39025ac09c42 | cc3d7bd252c225bf588a8e663b2214b8ccc3b399 | /report/make_report.py | cd623d6d4f3915b774a17d563e74329b25cd9405 | [] | no_license | stestagg/dict_index | c1ca8cac3389b5f2d22882a159ab8ea68439e4a5 | 41d06d705e28e8c52c3a9c76349c2aadfd984dff | refs/heads/master | 2022-11-27T12:14:58.791348 | 2020-08-01T18:11:52 | 2020-08-01T18:11:52 | 278,656,935 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,737 | py | import textwrap
from pathlib import Path
from datetime import datetime
import json
import click
import dateformat
from jinja2 import Environment, FileSystemLoader, select_autoescape, Markup
from pygments import highlight
from pygments.lexers import PythonLexer
from pygments.formatters import HtmlFormatter
JINJA_ENV = Environment(
loader=FileSystemLoader([Path(__file__).parent]),
autoescape=select_autoescape(['html', 'xml'])
)
HTML_FORMATTER = HtmlFormatter(style="monokai")
PROPOSAL_COLOR = '#2ca02c'
COLORS = ('#1f77b4', '#ff7f0e', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf')
PROPOSAL_NAMES = {'proposed', 'keys_index', 'items_index'}
def format_date(value, format='YYYY-MM-DD'):
date = datetime.utcfromtimestamp(value)
return dateformat.DateFormat(format).format(date)
def format_code(code):
return Markup(highlight(code.rstrip(), PythonLexer(), HTML_FORMATTER))
JINJA_ENV.filters['date'] = format_date
JINJA_ENV.filters['code'] = format_code
JINJA_ENV.filters['num'] = lambda v: "{:,}".format(v)
JINJA_ENV.filters['dedent'] = textwrap.dedent
def load_results(path):
all_results = []
for child in path.iterdir():
if child.suffix.lower() == ".json":
result = json.loads(child.read_text())
result['name'] = child.stem
all_results.append(result)
return all_results
def make_index(results, dest):
content = JINJA_ENV.get_template('index.html').render(results=results)
dest.write_text(content)
def reshape_results_for_chart(results):
reshaped = []
for cls_name, meth_results in results.items():
cls_data = {
'cls': cls_name,
'series': []
}
reshaped.append(cls_data)
for i, (meth_name, variants) in enumerate(meth_results.items()):
color = COLORS[i]
if meth_name in PROPOSAL_NAMES:
meth_name = f'{meth_name}(*)'
color = PROPOSAL_COLOR
points = []
point_data = {
'name': f'{ meth_name }.runs',
'color': color,
'type': 'scatter',
'showInLegend': False,
'dataPoints': points
}
cls_data['series'].append(point_data)
mins = []
min_data = {
'name': meth_name,
'color': color,
'type': 'spline',
'showInLegend': True,
'dataPoints': mins
}
cls_data['series'].append(min_data)
for variant, times in variants.items():
dict_size = int(variant)
for time in times:
points.append({'x': dict_size, 'y': time})
mins.append({'x': dict_size, 'y': min(times)})
mins.sort(key=lambda x: x['x'])
return reshaped
def reshape_results_for_table(results):
reshaped = {}
for cls_name, meth_raw in results.items():
cls_results = {}
cls_variants = set()
reshaped[cls_name] = cls_results
for meth_name, variants in meth_raw.items():
cls_variants.update(variants.keys())
cls_variants = sorted(int(v) for v in cls_variants)
cls_results['variants'] = cls_variants
meth_results = {}
cls_results['meth'] = meth_results
for meth_name, variants in meth_raw.items():
meth_results[meth_name] = [None] * len(cls_variants)
for i, variant in enumerate(cls_variants):
times = variants.get(str(variant))
if times is not None:
meth_results[meth_name][i] = min(times)
return reshaped
def make_results_page(results, dest):
style = HTML_FORMATTER.get_style_defs()
chart_data = reshape_results_for_chart(results['results'])
table_data = reshape_results_for_table(results['results'])
content = JINJA_ENV.get_template('results.html').render(
results=results,
style=style,
chart_data=chart_data,
table_data=table_data,
PROPOSAL_NAMES=PROPOSAL_NAMES,
)
dest.write_text(content)
@click.command()
@click.argument('result_dir')
@click.argument('output_dir')
def main(result_dir, output_dir):
results_path = Path(result_dir)
assert results_path.is_dir()
output_dir = Path(output_dir)
if not output_dir.exists():
output_dir.mkdir()
results = load_results(results_path)
make_index(results, output_dir / 'index.html')
for result in results:
result_path = output_dir / f'{result["name"]}.html'
make_results_page(result, result_path)
if __name__ == '__main__':
main() | [
"[email protected]"
] | |
13d318734094eb4b13970206c2b9e1d8fba78867 | 3a4de2139c50f4e8bbe866b33bca213b4591ce48 | /solution/ls_loss_test.py | 2fdb8df427fb56dea228e9349daa4be1e63f6028 | [] | no_license | ak110/kaggle_salt | 476f9206ff89e3b072b9dcf955c50c53b7e6abb5 | dd5d66b83454aef1f8196c6c93c45cca79f262d2 | refs/heads/master | 2021-10-24T05:11:59.129766 | 2019-03-22T07:21:22 | 2019-03-22T07:21:22 | 164,656,040 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,075 | py | #!/usr/bin/env python3
"""late submit用ベースライン。"""
import argparse
import pathlib
import numpy as np
import sklearn.externals.joblib as joblib
import _data
import _evaluation
import pytoolkit as tk
MODEL_NAME = pathlib.Path(__file__).stem
MODELS_DIR = pathlib.Path(f'models/{MODEL_NAME}')
CACHE_DIR = pathlib.Path('cache')
CV_COUNT = 5
INPUT_SIZE = (101, 101)
BATCH_SIZE = 16
EPOCHS = 300
def _main():
tk.better_exceptions()
parser = argparse.ArgumentParser()
parser.add_argument('mode', choices=('check', 'train', 'fine', 'validate', 'predict'))
parser.add_argument('--cv-index', default=0, choices=[0], type=int)
args = parser.parse_args()
with tk.dl.session(use_horovod=args.mode in ('train', 'fine')):
if args.mode == 'check':
_create_network()[0].summary()
elif args.mode == 'train':
tk.log.init(MODELS_DIR / f'train.fold{args.cv_index}.log')
_train(args)
elif args.mode == 'fine':
tk.log.init(MODELS_DIR / f'fine.fold{args.cv_index}.log')
_train(args, fine=True)
elif args.mode == 'validate':
tk.log.init(MODELS_DIR / 'validate.log')
_validate()
elif args.mode == 'predict':
tk.log.init(MODELS_DIR / 'predict.log')
_predict()
@tk.log.trace()
def _train(args, fine=False):
logger = tk.log.get(__name__)
logger.info(f'args: {args}')
split_seed = int(MODEL_NAME.encode('utf-8').hex(), 16) % 10000000
MODELS_DIR.mkdir(parents=True, exist_ok=True)
(MODELS_DIR / 'split_seed.txt').write_text(str(split_seed))
X, y = _data.load_train_data()
ti, vi = tk.ml.cv_indices(X, y, cv_count=CV_COUNT, cv_index=args.cv_index, split_seed=split_seed, stratify=False)
(X_train, y_train), (X_val, y_val) = (X[ti], y[ti]), (X[vi], y[vi])
logger.info(f'cv_index={args.cv_index}: train={len(y_train)} val={len(y_val)}')
network, lr_multipliers = _create_network()
gen = tk.generator.Generator()
if fine:
pseudo_size = len(y_train) // 2
X_train = np.array(list(X_train) + [None] * pseudo_size)
y_train = np.array(list(y_train) + [None] * pseudo_size)
X_test = _data.load_test_data()
_, pi = tk.ml.cv_indices(X_test, np.zeros((len(X_test),)), cv_count=CV_COUNT, cv_index=args.cv_index, split_seed=split_seed, stratify=False)
#pred_test = predict_all('test', None, use_cache=True)[(args.cv_index + 1) % CV_COUNT] # cross-pseudo-labeling
import stack_res
pred_test = stack_res.predict_all('test', None, use_cache=True)[(args.cv_index + 1) % CV_COUNT] # cross-pseudo-labeling
gen.add(tk.generator.RandomPickData(X_test[pi], pred_test[pi]))
gen.add(tk.image.RandomFlipLR(probability=0.5, with_output=True))
gen.add(tk.image.Padding(probability=1, with_output=True))
gen.add(tk.image.RandomRotate(probability=0.25, with_output=True))
gen.add(tk.image.RandomCrop(probability=1, with_output=True))
gen.add(tk.image.RandomAugmentors([
tk.image.RandomBlur(probability=0.125),
tk.image.RandomUnsharpMask(probability=0.125),
tk.image.RandomBrightness(probability=0.25),
tk.image.RandomContrast(probability=0.25),
], probability=0.125))
gen.add(tk.image.Resize((101, 101), with_output=True))
model = tk.dl.models.Model(network, gen, batch_size=BATCH_SIZE)
if fine:
model.load_weights(MODELS_DIR / f'model.fold{args.cv_index}.h5')
model.compile(optimizer='adadelta', loss=lovasz_hinge,
metrics=[tk.dl.metrics.binary_accuracy]) # , lr_multipliers=lr_multipliers
model.fit(
X_train, y_train, validation_data=(X_val, y_val),
epochs=EPOCHS // 3 if fine else EPOCHS,
cosine_annealing=False, mixup=False)
model.save(MODELS_DIR / f'model.fold{args.cv_index}.h5', include_optimizer=False)
if tk.dl.hvd.is_master():
_evaluation.log_evaluation(y_val, model.predict(X_val))
def _create_network():
"""ネットワークを作って返す。"""
import keras
builder = tk.dl.networks.Builder()
inputs = [
builder.input_tensor(INPUT_SIZE + (1,)),
]
x = inputs[0]
x = builder.preprocess(mode='div255')(x)
x = tk.dl.layers.pad2d()(((5, 6), (5, 6)), mode='reflect')(x) # 112
x = keras.layers.concatenate([x, x, x])
base_network = tk.applications.darknet53.darknet53(include_top=False, input_tensor=x, for_small=True)
lr_multipliers = {l: 0.1 for l in base_network.layers}
down_list = []
down_list.append(base_network.get_layer(name='add_1').output) # stage 1: 112
down_list.append(base_network.get_layer(name='add_3').output) # stage 2: 56
down_list.append(base_network.get_layer(name='add_11').output) # stage 3: 28
down_list.append(base_network.get_layer(name='add_19').output) # stage 4: 14
down_list.append(base_network.get_layer(name='add_23').output) # stage 5: 7
x = base_network.outputs[0]
x = keras.layers.GlobalAveragePooling2D()(x)
x = builder.dense(256)(x)
x = builder.act()(x)
x = builder.dense(7 * 7 * 32)(x)
x = builder.act()(x)
x = keras.layers.Reshape((1, 1, -1))(x)
up_list = []
for stage, (d, filters) in list(enumerate(zip(down_list, [32, 64, 128, 256, 512])))[::-1]:
x = tk.dl.layers.subpixel_conv2d()(scale=2 if stage != 4 else 7)(x)
x = builder.conv2d(filters, 1, use_act=False)(x)
d = tk.dl.layers.coord_channel_2d()(x_channel=False)(d)
d = builder.conv2d(filters, 1, use_act=False)(d)
x = keras.layers.add([x, d])
x = builder.res_block(filters)(x)
x = builder.res_block(filters)(x)
x = builder.bn_act()(x)
x = builder.scse_block(filters)(x)
up_list.append(builder.conv2d(32, 1)(x))
x = keras.layers.concatenate([
tk.dl.layers.resize2d()((112, 112))(up_list[0]),
tk.dl.layers.resize2d()((112, 112))(up_list[1]),
tk.dl.layers.resize2d()((112, 112))(up_list[2]),
tk.dl.layers.resize2d()((112, 112))(up_list[3]),
up_list[4],
]) # 112
x = tk.dl.layers.coord_channel_2d()(x_channel=False)(x)
x = builder.conv2d(64, use_act=False)(x)
x = builder.res_block(64)(x)
x = builder.res_block(64)(x)
x = builder.res_block(64)(x)
x = builder.bn_act()(x)
x = keras.layers.Cropping2D(((5, 6), (5, 6)))(x) # 101
x = builder.conv2d(1, use_bias=True, use_bn=False, activation='sigmoid')(x)
network = keras.models.Model(inputs, x)
return network, lr_multipliers
@tk.log.trace()
def _validate():
"""検証&閾値決定。"""
logger = tk.log.get(__name__)
X, y = _data.load_train_data()
split_seed = int((MODELS_DIR / 'split_seed.txt').read_text())
ti, vi = tk.ml.cv_indices(X, y, cv_count=CV_COUNT, cv_index=0, split_seed=split_seed, stratify=False)
X_val, y_val = X[vi], y[vi]
pred_val = predict_all('val', X_val)
threshold = _evaluation.log_evaluation(y_val, pred_val, print_fn=logger.info, search_th=True)
(MODELS_DIR / 'threshold.txt').write_text(str(threshold))
@tk.log.trace()
def _predict():
"""予測。"""
logger = tk.log.get(__name__)
X_test = _data.load_test_data()
threshold = float((MODELS_DIR / 'threshold.txt').read_text())
logger.info(f'threshold = {threshold:.3f}')
pred = predict_all('test', X_test) > threshold
_data.save_submission(MODELS_DIR / 'submission.csv', pred)
def predict_all(data_name, X, use_cache=False):
"""予測。"""
gen = tk.generator.SimpleGenerator()
model = tk.dl.models.Model.load(MODELS_DIR / f'model.fold0.h5', gen, batch_size=BATCH_SIZE, multi_gpu=True)
pred = _evaluation.predict_tta(model, X)
return pred
import tensorflow
def lovasz_hinge(y_true, y_pred):
"""Lovasz hinge loss"""
K = tensorflow.keras.backend
y_pred = K.clip(y_pred, K.epsilon(), 1 - K.epsilon())
logits = K.log(y_pred / (1 - y_pred))
def loss_per_image(t):
log, lab = t
log = K.reshape(log, (-1,))
lab = K.reshape(lab, (-1,))
lab = K.cast(lab, log.dtype) # logits.dtypeにしてたかも (どちらでも同じ)
signs = 2. * lab - 1.
errors = 1. - log * tensorflow.stop_gradient(signs)
errors_sorted, perm = tensorflow.nn.top_k(errors, k=K.shape(errors)[0], name="sort")
gt_sorted = tensorflow.gather(lab, perm)
gts = K.sum(gt_sorted) # tensorflow.reduce_sumにしてたかも (どちらでも同じ)
intersection = gts - tensorflow.cumsum(gt_sorted)
union = gts + tensorflow.cumsum(1. - gt_sorted)
jaccard = 1. - intersection / union
grad = tensorflow.concat((jaccard[0:1], jaccard[1:] - jaccard[:-1]), 0)
a = tensorflow.nn.elu(errors_sorted) + 1
loss = tensorflow.tensordot(a, tensorflow.stop_gradient(grad), 1, name="loss_per_image")
return loss
losses = tensorflow.map_fn(loss_per_image, (logits, y_true), dtype=tensorflow.float32)
return K.mean(losses)
if __name__ == '__main__':
_main()
| [
"[email protected]"
] | |
defbc1e8c5b80358d1052f28b63039bfe19736cb | 353def93fa77384ee3a5e3de98cfed318c480634 | /.history/week02/2/singupshimo_20200705174400.py | f313fce698976cdecb0c1b05b71f97b906756419 | [] | no_license | ydbB/Python001-class01 | d680abc3ea1ccaeb610751e3488421417d381156 | ad80037ccfc68d39125fa94d2747ab7394ac1be8 | refs/heads/master | 2022-11-25T11:27:45.077139 | 2020-07-19T12:35:12 | 2020-07-19T12:35:12 | 272,783,233 | 0 | 0 | null | 2020-06-16T18:28:15 | 2020-06-16T18:28:15 | null | UTF-8 | Python | false | false | 56 | py | from selenium import webdriver
import time
try:
bro | [
"[email protected]"
] | |
c2e7a3635a169a4ef23dc7d1f19b2115f10e4343 | 98d832289b7437247ce03ea54ad3cb7b95451159 | /rapid7vmconsole/models/page_of_malware_kit.py | de3e4edf91c9ca04d24174f07f8ada5772a2f904 | [
"MIT"
] | permissive | rmehilli-r7/vm-console-client-python | 7f02f13345dce4f4d4d85e18da7146daeefbceb9 | 069041c1c7b53c6b3d8bfdd81b974141bfca3c0c | refs/heads/master | 2020-03-23T11:20:33.364442 | 2018-08-10T20:06:37 | 2018-08-10T20:06:37 | 141,498,444 | 0 | 0 | MIT | 2018-08-08T19:58:45 | 2018-07-18T23:00:41 | Python | UTF-8 | Python | false | false | 52,997 | py | # coding: utf-8
"""
InsightVM API
# Overview This guide documents the InsightVM Application Programming Interface (API) Version 3. This API supports the Representation State Transfer (REST) design pattern. Unless noted otherwise this API accepts and produces the `application/json` media type. This API uses Hypermedia as the Engine of Application State (HATEOAS) and is hypermedia friendly. All API connections must be made to the security console using HTTPS. ## Versioning Versioning is specified in the URL and the base path of this API is: `https://<host>:<port>/api/3/`. ## Specification An <a target=\"_blank\" href=\"https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md\">OpenAPI v2</a> specification (also known as Swagger 2) of this API is available. Tools such as <a target=\"_blank\" href=\"https://github.com/swagger-api/swagger-codegen\">swagger-codegen</a> can be used to generate an API client in the language of your choosing using this specification document. <p class=\"openapi\">Download the specification: <a class=\"openapi-button\" target=\"_blank\" download=\"\" href=\"/api/3/json\"> Download </a></p> ## Authentication Authorization to the API uses HTTP Basic Authorization (see <a target=\"_blank\" href=\"https://www.ietf.org/rfc/rfc2617.txt\">RFC 2617</a> for more information). Requests must supply authorization credentials in the `Authorization` header using a Base64 encoded hash of `\"username:password\"`. <!-- ReDoc-Inject: <security-definitions> --> ### 2FA This API supports two-factor authentication (2FA) by supplying an authentication token in addition to the Basic Authorization. The token is specified using the `Token` request header. To leverage two-factor authentication, this must be enabled on the console and be configured for the account accessing the API. ## Resources ### Naming Resource names represent nouns and identify the entity being manipulated or accessed. All collection resources are pluralized to indicate to the client they are interacting with a collection of multiple resources of the same type. Singular resource names are used when there exists only one resource available to interact with. The following naming conventions are used by this API: | Type | Case | | --------------------------------------------- | ------------------------ | | Resource names | `lower_snake_case` | | Header, body, and query parameters parameters | `camelCase` | | JSON fields and property names | `camelCase` | #### Collections A collection resource is a parent resource for instance resources, but can itself be retrieved and operated on independently. Collection resources use a pluralized resource name. The resource path for collection resources follow the convention: ``` /api/3/{resource_name} ``` #### Instances An instance resource is a \"leaf\" level resource that may be retrieved, optionally nested within a collection resource. Instance resources are usually retrievable with opaque identifiers. The resource path for instance resources follows the convention: ``` /api/3/{resource_name}/{instance_id}... ``` ## Verbs The following HTTP operations are supported throughout this API. The general usage of the operation and both its failure and success status codes are outlined below. | Verb | Usage | Success | Failure | | --------- | ------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------- | | `GET` | Used to retrieve a resource by identifier, or a collection of resources by type. | `200` | `400`, `401`, `402`, `404`, `405`, `408`, `410`, `415`, `500` | | `POST` | Creates a resource with an application-specified identifier. | `201` | `400`, `401`, `404`, `405`, `408`, `413`, `415`, `500` | | `POST` | Performs a request to queue an asynchronous job. | `202` | `400`, `401`, `405`, `408`, `410`, `413`, `415`, `500` | | `PUT` | Creates a resource with a client-specified identifier. | `200` | `400`, `401`, `403`, `405`, `408`, `410`, `413`, `415`, `500` | | `PUT` | Performs a full update of a resource with a specified identifier. | `201` | `400`, `401`, `403`, `405`, `408`, `410`, `413`, `415`, `500` | | `DELETE` | Deletes a resource by identifier or an entire collection of resources. | `204` | `400`, `401`, `405`, `408`, `410`, `413`, `415`, `500` | | `OPTIONS` | Requests what operations are available on a resource. | `200` | `401`, `404`, `405`, `408`, `500` | ### Common Operations #### OPTIONS All resources respond to the `OPTIONS` request, which allows discoverability of available operations that are supported. The `OPTIONS` response returns the acceptable HTTP operations on that resource within the `Allow` header. The response is always a `200 OK` status. ### Collection Resources Collection resources can support the `GET`, `POST`, `PUT`, and `DELETE` operations. #### GET The `GET` operation invoked on a collection resource indicates a request to retrieve all, or some, of the entities contained within the collection. This also includes the optional capability to filter or search resources during the request. The response from a collection listing is a paginated document. See [hypermedia links](#section/Overview/Paging) for more information. #### POST The `POST` is a non-idempotent operation that allows for the creation of a new resource when the resource identifier is not provided by the system during the creation operation (i.e. the Security Console generates the identifier). The content of the `POST` request is sent in the request body. The response to a successful `POST` request should be a `201 CREATED` with a valid `Location` header field set to the URI that can be used to access to the newly created resource. The `POST` to a collection resource can also be used to interact with asynchronous resources. In this situation, instead of a `201 CREATED` response, the `202 ACCEPTED` response indicates that processing of the request is not fully complete but has been accepted for future processing. This request will respond similarly with a `Location` header with link to the job-oriented asynchronous resource that was created and/or queued. #### PUT The `PUT` is an idempotent operation that either performs a create with user-supplied identity, or a full replace or update of a resource by a known identifier. The response to a `PUT` operation to create an entity is a `201 Created` with a valid `Location` header field set to the URI that can be used to access to the newly created resource. `PUT` on a collection resource replaces all values in the collection. The typical response to a `PUT` operation that updates an entity is hypermedia links, which may link to related resources caused by the side-effects of the changes performed. #### DELETE The `DELETE` is an idempotent operation that physically deletes a resource, or removes an association between resources. The typical response to a `DELETE` operation is hypermedia links, which may link to related resources caused by the side-effects of the changes performed. ### Instance Resources Instance resources can support the `GET`, `PUT`, `POST`, `PATCH` and `DELETE` operations. #### GET Retrieves the details of a specific resource by its identifier. The details retrieved can be controlled through property selection and property views. The content of the resource is returned within the body of the response in the acceptable media type. #### PUT Allows for and idempotent \"full update\" (complete replacement) on a specific resource. If the resource does not exist, it will be created; if it does exist, it is completely overwritten. Any omitted properties in the request are assumed to be undefined/null. For \"partial updates\" use `POST` or `PATCH` instead. The content of the `PUT` request is sent in the request body. The identifier of the resource is specified within the URL (not the request body). The response to a successful `PUT` request is a `201 CREATED` to represent the created status, with a valid `Location` header field set to the URI that can be used to access to the newly created (or fully replaced) resource. #### POST Performs a non-idempotent creation of a new resource. The `POST` of an instance resource most commonly occurs with the use of nested resources (e.g. searching on a parent collection resource). The response to a `POST` of an instance resource is typically a `200 OK` if the resource is non-persistent, and a `201 CREATED` if there is a resource created/persisted as a result of the operation. This varies by endpoint. #### PATCH The `PATCH` operation is used to perform a partial update of a resource. `PATCH` is a non-idempotent operation that enforces an atomic mutation of a resource. Only the properties specified in the request are to be overwritten on the resource it is applied to. If a property is missing, it is assumed to not have changed. #### DELETE Permanently removes the individual resource from the system. If the resource is an association between resources, only the association is removed, not the resources themselves. A successful deletion of the resource should return `204 NO CONTENT` with no response body. This operation is not fully idempotent, as follow-up requests to delete a non-existent resource should return a `404 NOT FOUND`. ## Requests Unless otherwise indicated, the default request body media type is `application/json`. ### Headers Commonly used request headers include: | Header | Example | Purpose | | ------------------ | --------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `Accept` | `application/json` | Defines what acceptable content types are allowed by the client. For all types, use `*/*`. | | `Accept-Encoding` | `deflate, gzip` | Allows for the encoding to be specified (such as gzip). | | `Accept-Language` | `en-US` | Indicates to the server the client's locale (defaults `en-US`). | | `Authorization ` | `Basic Base64(\"username:password\")` | Basic authentication | | `Token ` | `123456` | Two-factor authentication token (if enabled) | ### Dates & Times Dates and/or times are specified as strings in the ISO 8601 format(s). The following formats are supported as input: | Value | Format | Notes | | --------------------------- | ------------------------------------------------------ | ----------------------------------------------------- | | Date | YYYY-MM-DD | Defaults to 12 am UTC (if used for a date & time | | Date & time only | YYYY-MM-DD'T'hh:mm:ss[.nnn] | Defaults to UTC | | Date & time in UTC | YYYY-MM-DD'T'hh:mm:ss[.nnn]Z | | | Date & time w/ offset | YYYY-MM-DD'T'hh:mm:ss[.nnn][+|-]hh:mm | | | Date & time w/ zone-offset | YYYY-MM-DD'T'hh:mm:ss[.nnn][+|-]hh:mm[<zone-id>] | | ### Timezones Timezones are specified in the regional zone format, such as `\"America/Los_Angeles\"`, `\"Asia/Tokyo\"`, or `\"GMT\"`. ### Paging Pagination is supported on certain collection resources using a combination of two query parameters, `page` and `size`. As these are control parameters, they are prefixed with the underscore character. The page parameter dictates the zero-based index of the page to retrieve, and the `size` indicates the size of the page. For example, `/resources?page=2&size=10` will return page 3, with 10 records per page, giving results 21-30. The maximum page size for a request is 500. ### Sorting Sorting is supported on paginated resources with the `sort` query parameter(s). The sort query parameter(s) supports identifying a single or multi-property sort with a single or multi-direction output. The format of the parameter is: ``` sort=property[,ASC|DESC]... ``` Therefore, the request `/resources?sort=name,title,DESC` would return the results sorted by the name and title descending, in that order. The sort directions are either ascending `ASC` or descending `DESC`. With single-order sorting, all properties are sorted in the same direction. To sort the results with varying orders by property, multiple sort parameters are passed. For example, the request `/resources?sort=name,ASC&sort=title,DESC` would sort by name ascending and title descending, in that order. ## Responses The following response statuses may be returned by this API. | Status | Meaning | Usage | | ------ | ------------------------ |------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `200` | OK | The operation performed without error according to the specification of the request, and no more specific 2xx code is suitable. | | `201` | Created | A create request has been fulfilled and a resource has been created. The resource is available as the URI specified in the response, including the `Location` header. | | `202` | Accepted | An asynchronous task has been accepted, but not guaranteed, to be processed in the future. | | `400` | Bad Request | The request was invalid or cannot be otherwise served. The request is not likely to succeed in the future without modifications. | | `401` | Unauthorized | The user is unauthorized to perform the operation requested, or does not maintain permissions to perform the operation on the resource specified. | | `403` | Forbidden | The resource exists to which the user has access, but the operating requested is not permitted. | | `404` | Not Found | The resource specified could not be located, does not exist, or an unauthenticated client does not have permissions to a resource. | | `405` | Method Not Allowed | The operations may not be performed on the specific resource. Allowed operations are returned and may be performed on the resource. | | `408` | Request Timeout | The client has failed to complete a request in a timely manner and the request has been discarded. | | `413` | Request Entity Too Large | The request being provided is too large for the server to accept processing. | | `415` | Unsupported Media Type | The media type is not supported for the requested resource. | | `500` | Internal Server Error | An internal and unexpected error has occurred on the server at no fault of the client. | ### Security The response statuses 401, 403 and 404 need special consideration for security purposes. As necessary, error statuses and messages may be obscured to strengthen security and prevent information exposure. The following is a guideline for privileged resource response statuses: | Use Case | Access | Resource | Permission | Status | | ------------------------------------------------------------------ | ------------------ |------------------- | ------------ | ------------ | | Unauthenticated access to an unauthenticated resource. | Unauthenticated | Unauthenticated | Yes | `20x` | | Unauthenticated access to an authenticated resource. | Unauthenticated | Authenticated | No | `401` | | Unauthenticated access to an authenticated resource. | Unauthenticated | Non-existent | No | `401` | | Authenticated access to a unauthenticated resource. | Authenticated | Unauthenticated | Yes | `20x` | | Authenticated access to an authenticated, unprivileged resource. | Authenticated | Authenticated | No | `404` | | Authenticated access to an authenticated, privileged resource. | Authenticated | Authenticated | Yes | `20x` | | Authenticated access to an authenticated, non-existent resource | Authenticated | Non-existent | Yes | `404` | ### Headers Commonly used response headers include: | Header | Example | Purpose | | -------------------------- | --------------------------------- | --------------------------------------------------------------- | | `Allow` | `OPTIONS, GET` | Defines the allowable HTTP operations on a resource. | | `Cache-Control` | `no-store, must-revalidate` | Disables caching of resources (as they are all dynamic). | | `Content-Encoding` | `gzip` | The encoding of the response body (if any). | | `Location` | | Refers to the URI of the resource created by a request. | | `Transfer-Encoding` | `chunked` | Specified the encoding used to transform response. | | `Retry-After` | 5000 | Indicates the time to wait before retrying a request. | | `X-Content-Type-Options` | `nosniff` | Disables MIME type sniffing. | | `X-XSS-Protection` | `1; mode=block` | Enables XSS filter protection. | | `X-Frame-Options` | `SAMEORIGIN` | Prevents rendering in a frame from a different origin. | | `X-UA-Compatible` | `IE=edge,chrome=1` | Specifies the browser mode to render in. | ### Format When `application/json` is returned in the response body it is always pretty-printed (indented, human readable output). Additionally, gzip compression/encoding is supported on all responses. #### Dates & Times Dates or times are returned as strings in the ISO 8601 'extended' format. When a date and time is returned (instant) the value is converted to UTC. For example: | Value | Format | Example | | --------------- | ------------------------------ | --------------------- | | Date | `YYYY-MM-DD` | 2017-12-03 | | Date & Time | `YYYY-MM-DD'T'hh:mm:ss[.nnn]Z` | 2017-12-03T10:15:30Z | #### Content In some resources a Content data type is used. This allows for multiple formats of representation to be returned within resource, specifically `\"html\"` and `\"text\"`. The `\"text\"` property returns a flattened representation suitable for output in textual displays. The `\"html\"` property returns an HTML fragment suitable for display within an HTML element. Note, the HTML returned is not a valid stand-alone HTML document. #### Paging The response to a paginated request follows the format: ```json { resources\": [ ... ], \"page\": { \"number\" : ..., \"size\" : ..., \"totalResources\" : ..., \"totalPages\" : ... }, \"links\": [ \"first\" : { \"href\" : \"...\" }, \"prev\" : { \"href\" : \"...\" }, \"self\" : { \"href\" : \"...\" }, \"next\" : { \"href\" : \"...\" }, \"last\" : { \"href\" : \"...\" } ] } ``` The `resources` property is an array of the resources being retrieved from the endpoint, each which should contain at minimum a \"self\" relation hypermedia link. The `page` property outlines the details of the current page and total possible pages. The object for the page includes the following properties: - number - The page number (zero-based) of the page returned. - size - The size of the pages, which is less than or equal to the maximum page size. - totalResources - The total amount of resources available across all pages. - totalPages - The total amount of pages. The last property of the paged response is the `links` array, which contains all available hypermedia links. For paginated responses, the \"self\", \"next\", \"previous\", \"first\", and \"last\" links are returned. The \"self\" link must always be returned and should contain a link to allow the client to replicate the original request against the collection resource in an identical manner to that in which it was invoked. The \"next\" and \"previous\" links are present if either or both there exists a previous or next page, respectively. The \"next\" and \"previous\" links have hrefs that allow \"natural movement\" to the next page, that is all parameters required to move the next page are provided in the link. The \"first\" and \"last\" links provide references to the first and last pages respectively. Requests outside the boundaries of the pageable will result in a `404 NOT FOUND`. Paginated requests do not provide a \"stateful cursor\" to the client, nor does it need to provide a read consistent view. Records in adjacent pages may change while pagination is being traversed, and the total number of pages and resources may change between requests within the same filtered/queries resource collection. #### Property Views The \"depth\" of the response of a resource can be configured using a \"view\". All endpoints supports two views that can tune the extent of the information returned in the resource. The supported views are `summary` and `details` (the default). View are specified using a query parameter, in this format: ```bash /<resource>?view={viewName} ``` #### Error Any error responses can provide a response body with a message to the client indicating more information (if applicable) to aid debugging of the error. All 40x and 50x responses will return an error response in the body. The format of the response is as follows: ```json { \"status\": <statusCode>, \"message\": <message>, \"links\" : [ { \"rel\" : \"...\", \"href\" : \"...\" } ] } ``` The `status` property is the same as the HTTP status returned in the response, to ease client parsing. The message property is a localized message in the request client's locale (if applicable) that articulates the nature of the error. The last property is the `links` property. This may contain additional [hypermedia links](#section/Overview/Authentication) to troubleshoot. #### Search Criteria <a section=\"section/Responses/SearchCriteria\"></a> Multiple resources make use of search criteria to match assets. Search criteria is an array of search filters. Each search filter has a generic format of: ```json { \"field\": \"<field-name>\", \"operator\": \"<operator>\", [\"value\": \"<value>\",] [\"lower\": \"<value>\",] [\"upper\": \"<value>\"] } ``` Every filter defines two required properties `field` and `operator`. The field is the name of an asset property that is being filtered on. The operator is a type and property-specific operating performed on the filtered property. The valid values for fields and operators are outlined in the table below. Every filter also defines one or more values that are supplied to the operator. The valid values vary by operator and are outlined below. ##### Fields The following table outlines the search criteria fields and the available operators: | Field | Operators | | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | `alternate-address-type` | `in` | | `container-image` | `is` ` is not` ` starts with` ` ends with` ` contains` ` does not contain` ` is like` ` not like` | | `container-status` | `is` ` is not` | | `containers` | `are` | | `criticality-tag` | `is` ` is not` ` is greater than` ` is less than` ` is applied` ` is not applied` | | `custom-tag` | `is` ` is not` ` starts with` ` ends with` ` contains` ` does not contain` ` is applied` ` is not applied` | | `cve` | `is` ` is not` ` contains` ` does not contain` | | `cvss-access-complexity` | `is` ` is not` | | `cvss-authentication-required` | `is` ` is not` | | `cvss-access-vector` | `is` ` is not` | | `cvss-availability-impact` | `is` ` is not` | | `cvss-confidentiality-impact` | `is` ` is not` | | `cvss-integrity-impact` | `is` ` is not` | | `cvss-v3-confidentiality-impact` | `is` ` is not` | | `cvss-v3-integrity-impact` | `is` ` is not` | | `cvss-v3-availability-impact` | `is` ` is not` | | `cvss-v3-attack-vector` | `is` ` is not` | | `cvss-v3-attack-complexity` | `is` ` is not` | | `cvss-v3-user-interaction` | `is` ` is not` | | `cvss-v3-privileges-required` | `is` ` is not` | | `host-name` | `is` ` is not` ` starts with` ` ends with` ` contains` ` does not contain` ` is empty` ` is not empty` ` is like` ` not like` | | `host-type` | `in` ` not in` | | `ip-address` | `is` ` is not` ` in range` ` not in range` ` is like` ` not like` | | `ip-address-type` | `in` ` not in` | | `last-scan-date` | `is-on-or-before` ` is on or after` ` is between` ` is earlier than` ` is within the last` | | `location-tag` | `is` ` is not` ` starts with` ` ends with` ` contains` ` does not contain` ` is applied` ` is not applied` | | `mobile-device-last-sync-time` | `is-within-the-last` ` is earlier than` | | `open-ports` | `is` ` is not` ` in range` | | `operating-system` | `contains` ` does not contain` ` is empty` ` is not empty` | | `owner-tag` | `is` ` is not` ` starts with` ` ends with` ` contains` ` does not contain` ` is applied` ` is not applied` | | `pci-compliance` | `is` | | `risk-score` | `is` ` is not` ` in range` ` greater than` ` less than` | | `service-name` | `contains` ` does not contain` | | `site-id` | `in` ` not in` | | `software` | `contains` ` does not contain` | | `vAsset-cluster` | `is` ` is not` ` contains` ` does not contain` ` starts with` | | `vAsset-datacenter` | `is` ` is not` | | `vAsset-host-name` | `is` ` is not` ` contains` ` does not contain` ` starts with` | | `vAsset-power-state` | `in` ` not in` | | `vAsset-resource-pool-path` | `contains` ` does not contain` | | `vulnerability-assessed` | `is-on-or-before` ` is on or after` ` is between` ` is earlier than` ` is within the last` | | `vulnerability-category` | `is` ` is not` ` starts with` ` ends with` ` contains` ` does not contain` | | `vulnerability-cvss-v3-score` | `is` ` is not` | | `vulnerability-cvss-score` | `is` ` is not` ` in range` ` is greater than` ` is less than` | | `vulnerability-exposures` | `includes` ` does not include` | | `vulnerability-title` | `contains` ` does not contain` ` is` ` is not` ` starts with` ` ends with` | | `vulnerability-validated-status` | `are` | ##### Enumerated Properties The following fields have enumerated values: | Field | Acceptable Values | | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------- | | `alternate-address-type` | 0=IPv4, 1=IPv6 | | `containers` | 0=present, 1=not present | | `container-status` | `created` `running` `paused` `restarting` `exited` `dead` `unknown` | | `cvss-access-complexity` | <ul><li><code>L</code> = Low</li><li><code>M</code> = Medium</li><li><code>H</code> = High</li></ul> | | `cvss-integrity-impact` | <ul><li><code>N</code> = None</li><li><code>P</code> = Partial</li><li><code>C</code> = Complete</li></ul> | | `cvss-confidentiality-impact` | <ul><li><code>N</code> = None</li><li><code>P</code> = Partial</li><li><code>C</code> = Complete</li></ul> | | `cvss-availability-impact` | <ul><li><code>N</code> = None</li><li><code>P</code> = Partial</li><li><code>C</code> = Complete</li></ul> | | `cvss-access-vector` | <ul><li><code>L</code> = Local</li><li><code>A</code> = Adjacent</li><li><code>N</code> = Network</li></ul> | | `cvss-authentication-required` | <ul><li><code>N</code> = None</li><li><code>S</code> = Single</li><li><code>M</code> = Multiple</li></ul> | | `cvss-v3-confidentiality-impact` | <ul><li><code>L</code> = Local</li><li><code>L</code> = Low</li><li><code>N</code> = None</li><li><code>H</code> = High</li></ul> | | `cvss-v3-integrity-impact` | <ul><li><code>L</code> = Local</li><li><code>L</code> = Low</li><li><code>N</code> = None</li><li><code>H</code> = High</li></ul> | | `cvss-v3-availability-impact` | <ul><li><code>N</code> = None</li><li><code>L</code> = Low</li><li><code>H</code> = High</li></ul> | | `cvss-v3-attack-vector` | <ul><li><code>N</code> = Network</li><li><code>A</code> = Adjacent</li><li><code>L</code> = Local</li><li><code>P</code> = Physical</li></ul> | | `cvss-v3-attack-complexity` | <ul><li><code>L</code> = Low</li><li><code>H</code> = High</li></ul> | | `cvss-v3-user-interaction` | <ul><li><code>N</code> = None</li><li><code>R</code> = Required</li></ul> | | `cvss-v3-privileges-required` | <ul><li><code>N</code> = None</li><li><code>L</code> = Low</li><li><code>H</code> = High</li></ul> | | `host-type` | 0=Unknown, 1=Guest, 2=Hypervisor, 3=Physical, 4=Mobile | | `ip-address-type` | 0=IPv4, 1=IPv6 | | `pci-compliance` | 0=fail, 1=pass | | `vulnerability-validated-status` | 0=present, 1=not present | ##### Operator Properties <a section=\"section/Responses/SearchCriteria/OperatorProperties\"></a> The following table outlines which properties are required for each operator and the appropriate data type(s): | Operator | `value` | `lower` | `upper` | | ----------------------|-----------------------|-----------------------|-----------------------| | `are` | `string` | | | | `contains` | `string` | | | | `does-not-contain` | `string` | | | | `ends with` | `string` | | | | `in` | `Array[ string ]` | | | | `in-range` | | `numeric` | `numeric` | | `includes` | `Array[ string ]` | | | | `is` | `string` | | | | `is-applied` | | | | | `is-between` | | `numeric` | `numeric` | | `is-earlier-than` | `numeric` | | | | `is-empty` | | | | | `is-greater-than` | `numeric` | | | | `is-on-or-after` | `string` (yyyy-MM-dd) | | | | `is-on-or-before` | `string` (yyyy-MM-dd) | | | | `is-not` | `string` | | | | `is-not-applied` | | | | | `is-not-empty` | | | | | `is-within-the-last` | `numeric` | | | | `less-than` | `string` | | | | `like` | `string` | | | | `not-contains` | `string` | | | | `not-in` | `Array[ string ]` | | | | `not-in-range` | | `numeric` | `numeric` | | `not-like` | `string` | | | | `starts-with` | `string` | | | #### Discovery Connection Search Criteria <a section=\"section/Responses/DiscoverySearchCriteria\"></a> Dynamic sites make use of search criteria to match assets from a discovery connection. Search criteria is an array of search filters. Each search filter has a generic format of: ```json { \"field\": \"<field-name>\", \"operator\": \"<operator>\", [\"value\": \"<value>\",] [\"lower\": \"<value>\",] [\"upper\": \"<value>\"] } ``` Every filter defines two required properties `field` and `operator`. The field is the name of an asset property that is being filtered on. The list of supported fields vary depending on the type of discovery connection configured for the dynamic site (e.g vSphere, ActiveSync, etc.). The operator is a type and property-specific operating performed on the filtered property. The valid values for fields outlined in the tables below and are grouped by the type of connection. Every filter also defines one or more values that are supplied to the operator. See <a href=\"#section/Responses/SearchCriteria/OperatorProperties\">Search Criteria Operator Properties</a> for more information on the valid values for each operator. ##### Fields (ActiveSync) This section documents search criteria information for ActiveSync discovery connections. The discovery connections must be one of the following types: `\"activesync-ldap\"`, `\"activesync-office365\"`, or `\"activesync-powershell\"`. The following table outlines the search criteria fields and the available operators for ActiveSync connections: | Field | Operators | | --------------------------------- | ------------------------------------------------------------- | | `last-sync-time` | `is-within-the-last` ` is-earlier-than` | | `operating-system` | `contains` ` does-not-contain` | | `user` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | ##### Fields (AWS) This section documents search criteria information for AWS discovery connections. The discovery connections must be the type `\"aws\"`. The following table outlines the search criteria fields and the available operators for AWS connections: | Field | Operators | | ----------------------- | ------------------------------------------------------------- | | `availability-zone` | `contains` ` does-not-contain` | | `guest-os-family` | `contains` ` does-not-contain` | | `instance-id` | `contains` ` does-not-contain` | | `instance-name` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | | `instance-state` | `in` ` not-in` | | `instance-type` | `in` ` not-in` | | `ip-address` | `in-range` ` not-in-range` ` is` ` is-not` | | `region` | `in` ` not-in` | | `vpc-id` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | ##### Fields (DHCP) This section documents search criteria information for DHCP discovery connections. The discovery connections must be the type `\"dhcp\"`. The following table outlines the search criteria fields and the available operators for DHCP connections: | Field | Operators | | --------------- | ------------------------------------------------------------- | | `host-name` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | | `ip-address` | `in-range` ` not-in-range` ` is` ` is-not` | | `mac-address` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | ##### Fields (Sonar) This section documents search criteria information for Sonar discovery connections. The discovery connections must be the type `\"sonar\"`. The following table outlines the search criteria fields and the available operators for Sonar connections: | Field | Operators | | ------------------- | -------------------- | | `search-domain` | `contains` ` is` | | `ip-address` | `in-range` ` is` | | `sonar-scan-date` | `is-within-the-last` | ##### Fields (vSphere) This section documents search criteria information for vSphere discovery connections. The discovery connections must be the type `\"vsphere\"`. The following table outlines the search criteria fields and the available operators for vSphere connections: | Field | Operators | | -------------------- | ------------------------------------------------------------------------------------------ | | `cluster` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | | `data-center` | `is` ` is-not` | | `discovered-time` | `is-on-or-before` ` is-on-or-after` ` is-between` ` is-earlier-than` ` is-within-the-last` | | `guest-os-family` | `contains` ` does-not-contain` | | `host-name` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | | `ip-address` | `in-range` ` not-in-range` ` is` ` is-not` | | `power-state` | `in` ` not-in` | | `resource-pool-path` | `contains` ` does-not-contain` | | `last-time-seen` | `is-on-or-before` ` is-on-or-after` ` is-between` ` is-earlier-than` ` is-within-the-last` | | `vm` | `is` ` is-not` ` contains` ` does-not-contain` ` starts-with` | ##### Enumerated Properties (vSphere) The following fields have enumerated values: | Field | Acceptable Values | | ------------- | ------------------------------------ | | `power-state` | `poweredOn` `poweredOff` `suspended` | ## HATEOAS This API follows Hypermedia as the Engine of Application State (HATEOAS) principals and is therefore hypermedia friendly. Hyperlinks are returned in the `links` property of any given resource and contain a fully-qualified hyperlink to the corresponding resource. The format of the hypermedia link adheres to both the <a target=\"_blank\" href=\"http://jsonapi.org\">{json:api} v1</a> <a target=\"_blank\" href=\"http://jsonapi.org/format/#document-links\">\"Link Object\"</a> and <a target=\"_blank\" href=\"http://json-schema.org/latest/json-schema-hypermedia.html\">JSON Hyper-Schema</a> <a target=\"_blank\" href=\"http://json-schema.org/latest/json-schema-hypermedia.html#rfc.section.5.2\">\"Link Description Object\"</a> formats. For example: ```json \"links\": [{ \"rel\": \"<relation>\", \"href\": \"<href>\" ... }] ``` Where appropriate link objects may also contain additional properties than the `rel` and `href` properties, such as `id`, `type`, etc. See the [Root](#tag/Root) resources for the entry points into API discovery. # noqa: E501
OpenAPI spec version: 3
Contact: [email protected]
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from rapid7vmconsole.models.link import Link # noqa: F401,E501
from rapid7vmconsole.models.malware_kit import MalwareKit # noqa: F401,E501
from rapid7vmconsole.models.page_info import PageInfo # noqa: F401,E501
class PageOfMalwareKit(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'links': 'list[Link]',
'page': 'PageInfo',
'resources': 'list[MalwareKit]'
}
attribute_map = {
'links': 'links',
'page': 'page',
'resources': 'resources'
}
def __init__(self, links=None, page=None, resources=None): # noqa: E501
"""PageOfMalwareKit - a model defined in Swagger""" # noqa: E501
self._links = None
self._page = None
self._resources = None
self.discriminator = None
if links is not None:
self.links = links
if page is not None:
self.page = page
if resources is not None:
self.resources = resources
@property
def links(self):
"""Gets the links of this PageOfMalwareKit. # noqa: E501
Hypermedia links to corresponding or related resources. # noqa: E501
:return: The links of this PageOfMalwareKit. # noqa: E501
:rtype: list[Link]
"""
return self._links
@links.setter
def links(self, links):
"""Sets the links of this PageOfMalwareKit.
Hypermedia links to corresponding or related resources. # noqa: E501
:param links: The links of this PageOfMalwareKit. # noqa: E501
:type: list[Link]
"""
self._links = links
@property
def page(self):
"""Gets the page of this PageOfMalwareKit. # noqa: E501
The details of pagination indicating which page was returned, and how the remaining pages can be retrieved. # noqa: E501
:return: The page of this PageOfMalwareKit. # noqa: E501
:rtype: PageInfo
"""
return self._page
@page.setter
def page(self, page):
"""Sets the page of this PageOfMalwareKit.
The details of pagination indicating which page was returned, and how the remaining pages can be retrieved. # noqa: E501
:param page: The page of this PageOfMalwareKit. # noqa: E501
:type: PageInfo
"""
self._page = page
@property
def resources(self):
"""Gets the resources of this PageOfMalwareKit. # noqa: E501
The page of resources returned. # noqa: E501
:return: The resources of this PageOfMalwareKit. # noqa: E501
:rtype: list[MalwareKit]
"""
return self._resources
@resources.setter
def resources(self, resources):
"""Sets the resources of this PageOfMalwareKit.
The page of resources returned. # noqa: E501
:param resources: The resources of this PageOfMalwareKit. # noqa: E501
:type: list[MalwareKit]
"""
self._resources = resources
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, PageOfMalwareKit):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
| [
"[email protected]"
] | |
7e23ddf115d5ed2d24c73fb7144f196d75b02cdf | 92237641f61e9b35ff6af6294153a75074757bec | /Machine Learning/수업 자료/2주차_데이터 과학을 통한 자연어 처리와 통계학습/제06~09일차_정형.비정형 데이터 처리 및 결합 분석/xmlEx02.py | 3fecb052979d01243b6104879395476414339d15 | [] | no_license | taepd/study | 8ded115765c4f804813e255d9272b727bf41ec80 | 846d3f2a5a4100225b750f00f992a640e9287d9c | refs/heads/master | 2023-03-08T13:56:57.366577 | 2022-05-08T15:24:35 | 2022-05-08T15:24:35 | 245,838,600 | 0 | 1 | null | 2023-03-05T23:54:41 | 2020-03-08T15:25:15 | JavaScript | UTF-8 | Python | false | false | 1,323 | py | # xmlEx02.py
from xml.etree.ElementTree import Element
from xml.etree.ElementTree import SubElement
from xml.etree.ElementTree import ElementTree
mydict = {'kim': ('김철수', 30, '남자', '강남구 역삼동'), 'park': ('박영희', 40, '여자', '서초구 방배동')}
print(mydict)
members = Element('members')
for key, mytuple in mydict.items():
myattrib = {'a': 'b', 'c': 'd'}
mem = SubElement(members, 'member', attrib=myattrib)
mem.attrib['id'] = key
SubElement(mem, 'name').text = mytuple[0]
SubElement(mem, 'age').text = str(mytuple[1])
SubElement(mem, 'gender').text = mytuple[2]
SubElement(mem, 'address').text = mytuple[3]
def indent(elem, level=0):
mytab = '\t'
i = '\n' + level * mytab
if len(elem):
if not elem.text or not elem.text.strip():
elem.text = i + mytab
if not elem.tail or not elem.tail.strip():
elem.tail = i
for elem in elem:
indent(elem, level + 1)
if not elem.tail or not elem.tail.strip():
elem.tail = i
else:
if level and (not elem.tail or not elem.tail.strip()):
elem.tail = i
indent(members)
xmlFile = 'xmlEx_02.xml'
ElementTree(members).write(xmlFile, encoding='utf-8')
print(xmlFile + ' 파일 생성됨')
print('finished')
| [
"[email protected]"
] | |
d99fab115ba894e29fbbfe9247645be7ba283353 | 80a3d98eae1d755d6914b5cbde63fd10f5cc2046 | /autox/autox_ts/feature_selection/__init__.py | dc8ea061d68ac26f5ad528338ccff08adf67947f | [
"Apache-2.0"
] | permissive | 4paradigm/AutoX | efda57b51b586209e1d58e1dab7d0797083aadc5 | 7eab9f4744329a225ff01bb5ec360c4662e1e52e | refs/heads/master | 2023-05-24T00:53:37.109036 | 2023-02-14T14:21:50 | 2023-02-14T14:21:50 | 388,068,949 | 752 | 162 | Apache-2.0 | 2022-07-12T08:28:09 | 2021-07-21T09:45:41 | Jupyter Notebook | UTF-8 | Python | false | false | 42 | py | from .feature_filter import feature_filter | [
"[email protected]"
] | |
802eca46c3e683e50f6e47f7a5d22d1b059841c1 | b80c84125f8176d5e40ffd51af36a0aed2df9d7c | /roboPortal/views.py | df87e4b4fe81d4d9cd6354a524d49fb76790be56 | [] | no_license | bhatiaisb5300/RobotixDevelopmentv1 | cbee6f90f06c85c8bfec308e8d35ef3a2587e263 | 6d541bdc8a9b89565c103fdff53a28373b0afb8b | refs/heads/master | 2022-12-13T10:12:30.841794 | 2020-02-15T15:33:00 | 2020-02-15T15:33:00 | 223,969,445 | 0 | 1 | null | 2022-12-08T05:24:26 | 2019-11-25T14:35:35 | JavaScript | UTF-8 | Python | false | false | 7,171 | py | from django.shortcuts import render, redirect
from django.http import HttpResponse, Http404
from django.contrib.auth.models import User, auth
from django.contrib.auth.decorators import login_required
from django.core.mail import send_mail
from django.conf import settings
from .models import portalUser, UserLink, Token, Team
subject_roboPortalVerification = 'Verify your Robo Portal Email Address. '
message_verification = ' it means a world to us '
subject_robathon = 'Robo Portal Selection'
message_robathon = ' Congrats.You have been selected for the hackathon.'
email_from = settings.EMAIL_HOST_USER
import random
import string
def randomString(stringLength=10):
"""Generate a random string of fixed length """
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(stringLength))
def home(request):
if request.user.portal.joined_team == False:
if 'create' in request.POST:
name = request.POST['teamName']
team = Team(admin = request.user,name = name)
team.save()
team.member.add(request.user)
token = randomString(15)
token += str(team.id)
temp_id = team.id
team.token = token
team.save()
portal_user = portalUser.objects.get(user = request.user)
portal_user.joined_team = True
portal_user.user_team_id = int(temp_id)
portal_user.is_admin = True
portal_user.save()
message = "Team has been created"
return render(request,'team.html',{'team':team,'message':message})
if 'join' in request.POST:
token = request.POST['token']
try:
team = Team.objects.get(token = token)
team.member.add(request.user)
portal = portalUser.objects.get(user = request.user)
portal.joined_team = True
portal.user_team_id = team.id
portal.save()
message = "Sucessfully added to team " + team.name
return render(request,'team.html',{'team':team,'message':message})
except Team.DoesNotExist:
message = "Invalid Team Token"
return render(request,'joinCreate.html',{'message':message})
return render(request,'joinCreate.html')
else:
team = Team.objects.get(id = request.user.portal.user_team_id)
return render(request,'team.html',{'team':team})
def register(request):
global subject_roboPortalVerification, message_verification, email_from
if 'register' in request.POST:
first_name = request.POST['first_name']
last_name = request.POST['last_name']
username = request.POST['username']
email = request.POST['email']
password1 = request.POST['password1']
password2 = request.POST['password2']
"""
elif User.objects.filter(email = email).exists():
return render(request,'register.html',{'error_message':"Email already taken"})
"""
if password1 == password2:
if User.objects.filter(username = username).exists():
return render(request,'register.html',{'error_message':"Username already taken"})
else:
user= User.objects.create_user(username = username, password = password1, email = email, first_name= first_name, last_name = last_name)
user.save()
a= portalUser(user = user)
a.save()
recipient_list = [user.email,]
random_string = randomString(25)
random_string += str(user.id)
token = Token(token = random_string)
token.save()
email_verify_html = "<a href = 'http://127.0.0.1:8000/roboPortal/verify/" +random_string + "/"+ str(user.id) + "'> Verify</a>"
send_mail( subject_roboPortalVerification, message_verification, email_from,recipient_list,fail_silently=False,html_message= email_verify_html )
return redirect('/roboPortal/login/')
else:
return render(request,'register.html',{'error_message':"Password does not match"})
return render(request,'register.html')
def login(request):
if 'login' in request.POST:
username = request.POST['username']
password = request.POST['password']
user = auth.authenticate(username = username, password = password)
if user != None:
if user.portal.verified == True:
auth.login(request,user)
return redirect('/')
else:
raise Http404("You are not verified yet.")
else:
return render(request, 'login.html', {'error_message': "Invalid Credentials"})
return render(request, 'login.html')
def email(request):
subject = 'Thank you for registering to our site'
message = ' it means a world to us '
email_from = settings.EMAIL_HOST_USER
recipient_list = ['[email protected]',]
send_mail( subject, message, email_from, recipient_list,html_message= email_verify_html ,fail_silently=True )
return HttpResponse("views used and email sent attempted")
def verify(request,token,id):
if Token.objects.filter(token = token).exists() == False:
raise Http404("Invalid Token.")
else:
user = User.objects.get(id = id)
if user.portal.verified == True:
raise Http404("Already verified")
else:
a = portalUser.objects.get(user = user)
a.verified = True
a.save()
print(user.portal.verified)
return HttpResponse("You have now been verified.")
def createProfile(request):
if 'create' in request.POST:
portal = portalUser.objects.get(user = request.user)
resume = None
if 'resume' in request.FILES:
resume = request.FILES['resume']
description = request.POST['description']
portal.description = description
portal.resume = resume
portal.save()
return HttpResponse("Updated")
return render(request,'createProfile.html')
def adminView(request):
if request.user.portal.is_member == True:
all_team = Team.objects.all()
return render(request,'adminView.html',{'all_team':all_team})
else:
raise Http404("You are not authorized as you are not robotix club member")
def profileView(request,user_id):
user = User.objects.get(id = user_id)
return render(request,'profile.html',{'profile_user':user})
def select(request,team_id):
global subject_robathon,message_robathon
team = Team.objects.get(id = team_id)
team.selected = True
team.save()
email_from = settings.EMAIL_HOST_USER
recipient_list = []
for user in team.member.all():
recipient_list.append(user.email)
send_mail( subject_robathon, message_robathon, email_from, recipient_list ,fail_silently=False )
return HttpResponse("ok")
"""
def create(request):
team = Team(admin = request.user)
team.save()
return HttpResponse("hiiii")
"""
| [
"[email protected]"
] | |
53564b0dbb1fb2ca036162b4a6dc25d45b8bdaf8 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03846/s787181482.py | 9e79a1ae234c00a297c69bb69d20566532f2d43a | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 465 | py | def main():
N=int(input())
A=list(map(int,input().split()))
mod=10**9+7
ans=1
A.sort()
if N%2==0:
for i in range(0,N,2):
if A[i]!=A[i+1] or A[i]!=i+1:
print(0)
exit()
ans=ans*2%mod
print(ans)
else:
if A[0]!=0:
print(0)
exit()
ans=1
for i in range(1,N,2):
if A[i]!=A[i+1] or A[i]!=i+1:
print(0)
exit()
ans=ans*2%mod
print(ans)
if __name__=='__main__':
main() | [
"[email protected]"
] | |
4a2a310ab7b1ec606a8d5eadb81465b0187370a1 | 6d58d19be7d50043bda4bd1dd96fb5bd8c09a5c4 | /start_up.py | af4220ac79a861fc21ca76437af16758e5541656 | [] | no_license | wrishel/HETP_Scan_control | 2b38a464fe65f84fbe0b602a567a4d804d576aba | 09db13cba3d9de172d08eadc72200169df9f7cbc | refs/heads/master | 2021-02-17T10:24:41.127392 | 2020-03-05T06:52:24 | 2020-03-05T06:52:24 | 245,085,678 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,437 | py |
'''Start up panel
Mainpanals page for the scanning user. Normally run once a day.
Maintains the scanning.ini file among other things.
'''
from etpconfig import Scanconfig
from ETP_util import msgBox
import GLB_globals
import os
from PyQt5 import uic
from PyQt5.QtCore import QCoreApplication
from PyQt5.QtCore import QTimer, QDateTime
from PyQt5.QtWidgets import QWidget
from PyQt5.QtWidgets import QMessageBox, QApplication
import sys
GLB = GLB_globals.get()
class DateTimeEditUpdater():
"""This is an attempt to update a QDateTimeEdit to show the current time without
stepping on changes that the user is entering from the keyboard.
Uses a timer to update approximately once a minute unless the value was changed
somewhere else. If the value was changed somewhere else than increment it"""
def __init__(self, qdte):
"""qdte is a QDateTimeEdit widget. initial_value is the contents when this is called."""
# todo: calendar popup, diable updating while it's open
self.qdte = qdte
self.qdte.setDateTime(QDateTime.currentDateTime())
self.period = 1000
self.ticking = False
def enable(self):
self.ticking = True
self.tick()
def disable(self):
self.ticking = False
def tick(self):
"""Increment the widget time"""
if not self.ticking: return
new_time = self.qdte.dateTime().addMSecs(self.period)
self.qdte.setDateTime(new_time)
QTimer.singleShot(self.period, self.tick) # check back in period msecs
class StartUp(QWidget):
check_boxes = { # translate the object name of a widget to the heading in the .ini file
'datetimeCB': 'dateTimek',
'ballot_paramsCB': 'ballotScanningParams',
'electionTitleCB': 'ballotTitleOk', #'backupCB': 'ballotBackupRequested',
'thicknessCB': 'thicknessOk',
'imprinterCB': 'imprinterOk'
}
check_box_error_names = { # translate the object names to language for error message
'datetimeCB': 'current date and time','ballot_paramsCB': 'ballot length and number of sides',
'electionTitleCB': 'election title',
'thicknessCB': 'ballot thickness', 'imprinterCB': 'imprinter position on scanner'
}
def __init__(self, config, exit_app, uicpath):
super().__init__()
self._ui(uicpath)
self.exit_app = exit_app
# populate the screen
s = 'DOUBLE SIDED.' if GLB.config['ballot']['doublesided'] else 'SINGLE SIDED.'
self.ballot_paramstLBL.setText(GLB.config['Election']['title'])
# Match check box object names with the config file keys and set the value on the screen.
for cb_name in self.check_boxes.keys():
config_file_key = self.check_boxes[cb_name]
if config_file_key in config['Setup']:
config_value = GLB.config['Setup'][config_file_key]
cb_object = getattr(self, cb_name)
cb_object.setChecked(config_value == 'True')
self.date_time_updater = DateTimeEditUpdater(self.date_timeEdit)
if GLB.XXXDBG:
self.datetimeCB.setChecked(True)
# set signal connections AFTER initial values loaded
for cb_name in self.check_boxes.keys():
cb = getattr(self, cb_name)
cb.toggled.connect(lambda: self.cb_toggled(cb))
self.quit_appPBn.clicked.connect(exit_app)
self.begin_scanningPB.clicked.connect(
lambda: GLB.transitioner.set_current_panel("scan_pre")
)
self.test_scanPB.pressed.connect(self.scan_test_ballot)
def _ui(self, uicpath):
uic.loadUi(uicpath, self)
# Signal handlers
def cb_toggled(self, cb):
"""Handle a checkbox being changed. cb is the checkbox itself"""
GLB.config['Setup'][self.check_boxes[cb.objectName()]] = str(cb.isChecked())
GLB.config.write() # TODO: When initially loading config, clear certain checkbox values in it
def scan_test_ballot(self):
GLB.scanner.scan_test_ballot()
def entry_check(self):
"""Called from transitioner before switching to this screen. Return is a bool indicating
whether it is OK to enter."""
# todo: move some of the __init__ logic here.
self.date_time_updater.enable()
return True
def exit_check(self, departureType='continue'):
"""Called by transitioner. Returns True if the operation should continue.
E.g., no error or user response was "ignore"."""
# todo: polishing highlight the boxes that are the subject of messages
# todo: someday move all message text to a separate module
self.date_time_updater.disable()
assert departureType == 'continue', 'unkown departure type'
# see if certain checkboxes are not checked.
squawks = []
squawk_list = {'datetimeCB': 'current date and time','ballot_paramsCB': 'ballot length and number of sides',
'electionTitleCB': 'election title', 'thicknessCB': 'ballot thickness',
'imprinterCB': 'imprinter position on scanner'}
for cb_name in squawk_list.keys():
cb_object = getattr(self, cb_name)
if not cb_object.isChecked():
squawks.append(self.check_box_error_names[cb_name])
if len(squawks):
if len(squawks) == 1: msg = "This box is not checked: '" + squawks[0] + "'."
else: msg = "These boxes are not checked: '" + "', '".join(squawks) + "'"
resp = msgBox(msg,
"Each of the listed checkboxes represent something that must be correct "
"for scanning to work.\n\nAfter the first day of scanning "
"it's usually OK to assume that these are OK unless the scanner "
"was used somewhere else. So if this is not the first run try "
"pressing Cancel, going back and checking these boxes, and "
"pressihg BEGIN SCANNING again.",
QMessageBox.Question, '', QMessageBox.Cancel,
QMessageBox.Cancel
)
if resp == QMessageBox.Cancel: return False
# else continue to other error checks
ext = GLB.config['Election']['pathtoextdrive']
# if self.backupCB.isChecked():
# if bool(ext):
# if not os.path.isdir(ext):
# msg = "Can't operate because the external drive is not available for backups."
# resp = msgBox(msg,
# # msgInformativeText
# "Check to see if the external drive is turned on and connected." \
# "\n\nIf not check with a system administrator."
# "\n\nIn a pinch press Cancel, uncheck the box and press "
# "BEGIN SCANNING again.",
# # msgicon
# QMessageBox.Question,
# # msg details
# '',
# # msgbuttons
# QMessageBox.Ignore | QMessageBox.Ignore,
# # msgbuttondefault
# QMessageBox.Ignore
# )
#
# else: # config does not have a path set up.
# msgtext = "Please uncheck the box for backups to the external drive."
# msginformativetext = "The system is currently not setup for backups."
# msgicon = QMessageBox.Warning
# msgmoreinfo = ''
# msgbuttons = QMessageBox.Cancel
# msgbuttondefault = QMessageBox.Cancel
#
# resp = msgBox(msgtext, msginformativetext, msgicon, msgmoreinfo,
# msgbuttons, msgbuttondefault)
#
# return False # not OK to proceed
#
# else: # box not checked
# if os.path.isdir(ext): # is backup spec in config and present?
# msgtext = "Do you want backups to the external drive?"
# msginformativetext = "The current setup calls for these backups but the box is not" \
# "checked. If you meant to skip backups this time, then press No. " \
# "If you want to backups to happen, press Yes to go back, then check the box, and " \
# "press BEGIN SCANNING again."
# msgicon = QMessageBox.Warning
# msgmoreinfo = ''
# msgbuttons = QMessageBox.Yes | QMessageBox.No
# msgbuttondefault = QMessageBox.Yes
#
# resp = msgBox(msgtext, msginformativetext, msgicon, msgmoreinfo,
# msgbuttons, msgbuttondefault)
#
# if resp == QMessageBox.Yes: return False # not OK to proceed
return True # OK to proceed.
if __name__== '__main__':
from transitioner import dummy_transitioner
t = dummy_transitioner.Transitioner()
app = QApplication(sys.argv)
config = Scanconfig('etp.ini')
window = StartUp(config, QCoreApplication.quit, "res/ui/startup.ui", t)
t.set_initial_panel(window)
window.show()
app.exec_()
| [
"[email protected]"
] | |
2efe060ea5aff877fd8ffa1bda0eae2d9b156ce0 | 115ef7a9ffc88148b7439bd25ef3c97720be87e6 | /OEMS_v2.0/chalicedir/vendor/sqlalchemy/testing/requirements.py | ec1eeb1dcb0fcf5ffa028a828fc6908a05c3511c | [] | no_license | octicalpha/billions | 387bc0db600dd97915be0cece710237ff626b86c | 5465c527d614ae64789906197c1effe7ba94d373 | refs/heads/master | 2020-04-01T21:35:50.582694 | 2018-10-14T05:36:50 | 2018-10-14T05:36:50 | 153,664,919 | 0 | 3 | null | 2018-10-18T17:53:35 | 2018-10-18T17:53:34 | null | UTF-8 | Python | false | false | 25,568 | py | # testing/requirements.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Global database feature support policy.
Provides decorators to mark tests requiring specific feature support from the
target database.
External dialect test suites should subclass SuiteRequirements
to provide specific inclusion/exclusions.
"""
import sys
from . import exclusions
from .. import util
class Requirements(object):
pass
class SuiteRequirements(Requirements):
@property
def create_table(self):
"""target platform can emit basic CreateTable DDL."""
return exclusions.open()
@property
def drop_table(self):
"""target platform can emit basic DropTable DDL."""
return exclusions.open()
@property
def foreign_keys(self):
"""Target database must support foreign keys."""
return exclusions.open()
@property
def on_update_cascade(self):
""""target database must support ON UPDATE..CASCADE behavior in
foreign keys."""
return exclusions.open()
@property
def non_updating_cascade(self):
"""target database must *not* support ON UPDATE..CASCADE behavior in
foreign keys."""
return exclusions.closed()
@property
def deferrable_fks(self):
return exclusions.closed()
@property
def on_update_or_deferrable_fks(self):
# TODO: exclusions should be composable,
# somehow only_if([x, y]) isn't working here, negation/conjunctions
# getting confused.
return exclusions.only_if(
lambda: self.on_update_cascade.enabled or
self.deferrable_fks.enabled
)
@property
def self_referential_foreign_keys(self):
"""Target database must support self-referential foreign keys."""
return exclusions.open()
@property
def foreign_key_ddl(self):
"""Target database must support the DDL phrases for FOREIGN KEY."""
return exclusions.open()
@property
def named_constraints(self):
"""target database must support names for constraints."""
return exclusions.open()
@property
def subqueries(self):
"""Target database must support subqueries."""
return exclusions.open()
@property
def offset(self):
"""target database can render OFFSET, or an equivalent, in a
SELECT.
"""
return exclusions.open()
@property
def bound_limit_offset(self):
"""target database can render LIMIT and/or OFFSET using a bound
parameter
"""
return exclusions.open()
@property
def parens_in_union_contained_select_w_limit_offset(self):
"""Target database must support parenthesized SELECT in UNION
when LIMIT/OFFSET is specifically present.
E.g. (SELECT ...) UNION (SELECT ..)
This is known to fail on SQLite.
"""
return exclusions.open()
@property
def parens_in_union_contained_select_wo_limit_offset(self):
"""Target database must support parenthesized SELECT in UNION
when OFFSET/LIMIT is specifically not present.
E.g. (SELECT ... LIMIT ..) UNION (SELECT .. OFFSET ..)
This is known to fail on SQLite. It also fails on Oracle
because without LIMIT/OFFSET, there is currently no step that
creates an additional subquery.
"""
return exclusions.open()
@property
def boolean_col_expressions(self):
"""Target database must support boolean expressions as columns"""
return exclusions.closed()
@property
def nullsordering(self):
"""Target backends that support nulls ordering."""
return exclusions.closed()
@property
def standalone_binds(self):
"""target database/driver supports bound parameters as column expressions
without being in the context of a typed column.
"""
return exclusions.closed()
@property
def intersect(self):
"""Target database must support INTERSECT or equivalent."""
return exclusions.closed()
@property
def except_(self):
"""Target database must support EXCEPT or equivalent (i.e. MINUS)."""
return exclusions.closed()
@property
def window_functions(self):
"""Target database must support window functions."""
return exclusions.closed()
@property
def ctes(self):
"""Target database supports CTEs"""
return exclusions.closed()
@property
def ctes_on_dml(self):
"""target database supports CTES which consist of INSERT, UPDATE
or DELETE"""
return exclusions.closed()
@property
def autoincrement_insert(self):
"""target platform generates new surrogate integer primary key values
when insert() is executed, excluding the pk column."""
return exclusions.open()
@property
def fetch_rows_post_commit(self):
"""target platform will allow cursor.fetchone() to proceed after a
COMMIT.
Typically this refers to an INSERT statement with RETURNING which
is invoked within "autocommit". If the row can be returned
after the autocommit, then this rule can be open.
"""
return exclusions.open()
@property
def group_by_complex_expression(self):
"""target platform supports SQL expressions in GROUP BY
e.g.
SELECT x + y AS somelabel FROM table GROUP BY x + y
"""
return exclusions.open()
@property
def sane_rowcount(self):
return exclusions.skip_if(
lambda config: not config.db.dialect.supports_sane_rowcount,
"driver doesn't support 'sane' rowcount"
)
@property
def sane_multi_rowcount(self):
return exclusions.fails_if(
lambda config: not config.db.dialect.supports_sane_multi_rowcount,
"driver %(driver)s %(doesnt_support)s 'sane' multi row count"
)
@property
def sane_rowcount_w_returning(self):
return exclusions.fails_if(
lambda config:
not config.db.dialect.supports_sane_rowcount_returning,
"driver doesn't support 'sane' rowcount when returning is on"
)
@property
def empty_inserts(self):
"""target platform supports INSERT with no values, i.e.
INSERT DEFAULT VALUES or equivalent."""
return exclusions.only_if(
lambda config: config.db.dialect.supports_empty_insert or
config.db.dialect.supports_default_values,
"empty inserts not supported"
)
@property
def insert_from_select(self):
"""target platform supports INSERT from a SELECT."""
return exclusions.open()
@property
def returning(self):
"""target platform supports RETURNING."""
return exclusions.only_if(
lambda config: config.db.dialect.implicit_returning,
"%(database)s %(does_support)s 'returning'"
)
@property
def tuple_in(self):
"""Target platform supports the syntax
"(x, y) IN ((x1, y1), (x2, y2), ...)"
"""
return exclusions.closed()
@property
def duplicate_names_in_cursor_description(self):
"""target platform supports a SELECT statement that has
the same name repeated more than once in the columns list."""
return exclusions.open()
@property
def denormalized_names(self):
"""Target database must have 'denormalized', i.e.
UPPERCASE as case insensitive names."""
return exclusions.skip_if(
lambda config: not config.db.dialect.requires_name_normalize,
"Backend does not require denormalized names."
)
@property
def multivalues_inserts(self):
"""target database must support multiple VALUES clauses in an
INSERT statement."""
return exclusions.skip_if(
lambda config: not config.db.dialect.supports_multivalues_insert,
"Backend does not support multirow inserts."
)
@property
def implements_get_lastrowid(self):
""""target dialect implements the executioncontext.get_lastrowid()
method without reliance on RETURNING.
"""
return exclusions.open()
@property
def emulated_lastrowid(self):
""""target dialect retrieves cursor.lastrowid, or fetches
from a database-side function after an insert() construct executes,
within the get_lastrowid() method.
Only dialects that "pre-execute", or need RETURNING to get last
inserted id, would return closed/fail/skip for this.
"""
return exclusions.closed()
@property
def dbapi_lastrowid(self):
""""target platform includes a 'lastrowid' accessor on the DBAPI
cursor object.
"""
return exclusions.closed()
@property
def views(self):
"""Target database must support VIEWs."""
return exclusions.closed()
@property
def schemas(self):
"""Target database must support external schemas, and have one
named 'test_schema'."""
return exclusions.closed()
@property
def server_side_cursors(self):
"""Target dialect must support server side cursors."""
return exclusions.only_if([
lambda config: config.db.dialect.supports_server_side_cursors
], "no server side cursors support")
@property
def sequences(self):
"""Target database must support SEQUENCEs."""
return exclusions.only_if([
lambda config: config.db.dialect.supports_sequences
], "no sequence support")
@property
def sequences_optional(self):
"""Target database supports sequences, but also optionally
as a means of generating new PK values."""
return exclusions.only_if([
lambda config: config.db.dialect.supports_sequences and
config.db.dialect.sequences_optional
], "no sequence support, or sequences not optional")
@property
def reflects_pk_names(self):
return exclusions.closed()
@property
def table_reflection(self):
return exclusions.open()
@property
def comment_reflection(self):
return exclusions.closed()
@property
def view_column_reflection(self):
"""target database must support retrieval of the columns in a view,
similarly to how a table is inspected.
This does not include the full CREATE VIEW definition.
"""
return self.views
@property
def view_reflection(self):
"""target database must support inspection of the full CREATE VIEW definition.
"""
return self.views
@property
def schema_reflection(self):
return self.schemas
@property
def primary_key_constraint_reflection(self):
return exclusions.open()
@property
def foreign_key_constraint_reflection(self):
return exclusions.open()
@property
def foreign_key_constraint_option_reflection(self):
return exclusions.closed()
@property
def temp_table_reflection(self):
return exclusions.open()
@property
def temp_table_names(self):
"""target dialect supports listing of temporary table names"""
return exclusions.closed()
@property
def temporary_tables(self):
"""target database supports temporary tables"""
return exclusions.open()
@property
def temporary_views(self):
"""target database supports temporary views"""
return exclusions.closed()
@property
def index_reflection(self):
return exclusions.open()
@property
def unique_constraint_reflection(self):
"""target dialect supports reflection of unique constraints"""
return exclusions.open()
@property
def check_constraint_reflection(self):
"""target dialect supports reflection of check constraints"""
return exclusions.closed()
@property
def duplicate_key_raises_integrity_error(self):
"""target dialect raises IntegrityError when reporting an INSERT
with a primary key violation. (hint: it should)
"""
return exclusions.open()
@property
def unbounded_varchar(self):
"""Target database must support VARCHAR with no length"""
return exclusions.open()
@property
def unicode_data(self):
"""Target database/dialect must support Python unicode objects with
non-ASCII characters represented, delivered as bound parameters
as well as in result rows.
"""
return exclusions.open()
@property
def unicode_ddl(self):
"""Target driver must support some degree of non-ascii symbol
names.
"""
return exclusions.closed()
@property
def datetime_literals(self):
"""target dialect supports rendering of a date, time, or datetime as a
literal string, e.g. via the TypeEngine.literal_processor() method.
"""
return exclusions.closed()
@property
def datetime(self):
"""target dialect supports representation of Python
datetime.datetime() objects."""
return exclusions.open()
@property
def datetime_microseconds(self):
"""target dialect supports representation of Python
datetime.datetime() with microsecond objects."""
return exclusions.open()
@property
def timestamp_microseconds(self):
"""target dialect supports representation of Python
datetime.datetime() with microsecond objects but only
if TIMESTAMP is used."""
return exclusions.closed()
@property
def datetime_historic(self):
"""target dialect supports representation of Python
datetime.datetime() objects with historic (pre 1970) values."""
return exclusions.closed()
@property
def date(self):
"""target dialect supports representation of Python
datetime.date() objects."""
return exclusions.open()
@property
def date_coerces_from_datetime(self):
"""target dialect accepts a datetime object as the target
of a date column."""
return exclusions.open()
@property
def date_historic(self):
"""target dialect supports representation of Python
datetime.datetime() objects with historic (pre 1970) values."""
return exclusions.closed()
@property
def time(self):
"""target dialect supports representation of Python
datetime.time() objects."""
return exclusions.open()
@property
def time_microseconds(self):
"""target dialect supports representation of Python
datetime.time() with microsecond objects."""
return exclusions.open()
@property
def binary_comparisons(self):
"""target database/driver can allow BLOB/BINARY fields to be compared
against a bound parameter value.
"""
return exclusions.open()
@property
def binary_literals(self):
"""target backend supports simple binary literals, e.g. an
expression like::
SELECT CAST('foo' AS BINARY)
Where ``BINARY`` is the type emitted from :class:`.LargeBinary`,
e.g. it could be ``BLOB`` or similar.
Basically fails on Oracle.
"""
return exclusions.open()
@property
def autocommit(self):
"""target dialect supports 'AUTOCOMMIT' as an isolation_level"""
return exclusions.closed()
@property
def json_type(self):
"""target platform implements a native JSON type."""
return exclusions.closed()
@property
def json_array_indexes(self):
""""target platform supports numeric array indexes
within a JSON structure"""
return self.json_type
@property
def precision_numerics_general(self):
"""target backend has general support for moderately high-precision
numerics."""
return exclusions.open()
@property
def precision_numerics_enotation_small(self):
"""target backend supports Decimal() objects using E notation
to represent very small values."""
return exclusions.closed()
@property
def precision_numerics_enotation_large(self):
"""target backend supports Decimal() objects using E notation
to represent very large values."""
return exclusions.closed()
@property
def precision_numerics_many_significant_digits(self):
"""target backend supports values with many digits on both sides,
such as 319438950232418390.273596, 87673.594069654243
"""
return exclusions.closed()
@property
def nested_aggregates(self):
"""target database can select an aggregate from a subquery that's
also using an aggregate
"""
return exclusions.open()
@property
def recursive_fk_cascade(self):
"""target database must support ON DELETE CASCADE on a self-referential
foreign key
"""
return exclusions.open()
@property
def precision_numerics_retains_significant_digits(self):
"""A precision numeric type will return empty significant digits,
i.e. a value such as 10.000 will come back in Decimal form with
the .000 maintained."""
return exclusions.closed()
@property
def precision_generic_float_type(self):
"""target backend will return native floating point numbers with at
least seven decimal places when using the generic Float type.
"""
return exclusions.open()
@property
def floats_to_four_decimals(self):
"""target backend can return a floating-point number with four
significant digits (such as 15.7563) accurately
(i.e. without FP inaccuracies, such as 15.75629997253418).
"""
return exclusions.open()
@property
def fetch_null_from_numeric(self):
"""target backend doesn't crash when you try to select a NUMERIC
value that has a value of NULL.
Added to support Pyodbc bug #351.
"""
return exclusions.open()
@property
def text_type(self):
"""Target database must support an unbounded Text() "
"type such as TEXT or CLOB"""
return exclusions.open()
@property
def empty_strings_varchar(self):
"""target database can persist/return an empty string with a
varchar.
"""
return exclusions.open()
@property
def empty_strings_text(self):
"""target database can persist/return an empty string with an
unbounded text."""
return exclusions.open()
@property
def selectone(self):
"""target driver must support the literal statement 'select 1'"""
return exclusions.open()
@property
def savepoints(self):
"""Target database must support savepoints."""
return exclusions.closed()
@property
def two_phase_transactions(self):
"""Target database must support two-phase transactions."""
return exclusions.closed()
@property
def update_from(self):
"""Target must support UPDATE..FROM syntax"""
return exclusions.closed()
@property
def delete_from(self):
"""Target must support DELETE FROM..FROM or DELETE..USING syntax"""
return exclusions.closed()
@property
def update_where_target_in_subquery(self):
"""Target must support UPDATE where the same table is present in a
subquery in the WHERE clause.
This is an ANSI-standard syntax that apparently MySQL can't handle,
such as:
UPDATE documents SET flag=1 WHERE documents.title IN
(SELECT max(documents.title) AS title
FROM documents GROUP BY documents.user_id
)
"""
return exclusions.open()
@property
def mod_operator_as_percent_sign(self):
"""target database must use a plain percent '%' as the 'modulus'
operator."""
return exclusions.closed()
@property
def percent_schema_names(self):
"""target backend supports weird identifiers with percent signs
in them, e.g. 'some % column'.
this is a very weird use case but often has problems because of
DBAPIs that use python formatting. It's not a critical use
case either.
"""
return exclusions.closed()
@property
def order_by_label_with_expression(self):
"""target backend supports ORDER BY a column label within an
expression.
Basically this::
select data as foo from test order by foo || 'bar'
Lots of databases including PostgreSQL don't support this,
so this is off by default.
"""
return exclusions.closed()
@property
def order_by_collation(self):
def check(config):
try:
self.get_order_by_collation(config)
return False
except NotImplementedError:
return True
return exclusions.skip_if(check)
def get_order_by_collation(self, config):
raise NotImplementedError()
@property
def unicode_connections(self):
"""Target driver must support non-ASCII characters being passed at
all.
"""
return exclusions.open()
@property
def graceful_disconnects(self):
"""Target driver must raise a DBAPI-level exception, such as
InterfaceError, when the underlying connection has been closed
and the execute() method is called.
"""
return exclusions.open()
@property
def skip_mysql_on_windows(self):
"""Catchall for a large variety of MySQL on Windows failures"""
return exclusions.open()
@property
def ad_hoc_engines(self):
"""Test environment must allow ad-hoc engine/connection creation.
DBs that scale poorly for many connections, even when closed, i.e.
Oracle, may use the "--low-connections" option which flags this
requirement as not present.
"""
return exclusions.skip_if(
lambda config: config.options.low_connections)
@property
def timing_intensive(self):
return exclusions.requires_tag("timing_intensive")
@property
def memory_intensive(self):
return exclusions.requires_tag("memory_intensive")
@property
def threading_with_mock(self):
"""Mark tests that use threading and mock at the same time - stability
issues have been observed with coverage + python 3.3
"""
return exclusions.skip_if(
lambda config: util.py3k and config.options.has_coverage,
"Stability issues with coverage + py3k"
)
@property
def python2(self):
return exclusions.skip_if(
lambda: sys.version_info >= (3,),
"Python version 2.xx is required."
)
@property
def python3(self):
return exclusions.skip_if(
lambda: sys.version_info < (3,),
"Python version 3.xx is required."
)
@property
def cpython(self):
return exclusions.only_if(
lambda: util.cpython,
"cPython interpreter needed"
)
@property
def non_broken_pickle(self):
from sqlalchemy.util import pickle
return exclusions.only_if(
lambda: not util.pypy and pickle.__name__ == 'cPickle'
or sys.version_info >= (3, 2),
"Needs cPickle+cPython or newer Python 3 pickle"
)
@property
def predictable_gc(self):
"""target platform must remove all cycles unconditionally when
gc.collect() is called, as well as clean out unreferenced subclasses.
"""
return self.cpython
@property
def no_coverage(self):
"""Test should be skipped if coverage is enabled.
This is to block tests that exercise libraries that seem to be
sensitive to coverage, such as PostgreSQL notice logging.
"""
return exclusions.skip_if(
lambda config: config.options.has_coverage,
"Issues observed when coverage is enabled"
)
def _has_mysql_on_windows(self, config):
return False
def _has_mysql_fully_case_sensitive(self, config):
return False
@property
def sqlite(self):
return exclusions.skip_if(lambda: not self._has_sqlite())
@property
def cextensions(self):
return exclusions.skip_if(
lambda: not self._has_cextensions(), "C extensions not installed"
)
def _has_sqlite(self):
from sqlalchemy import create_engine
try:
create_engine('sqlite://')
return True
except ImportError:
return False
def _has_cextensions(self):
try:
from sqlalchemy import cresultproxy, cprocessors
return True
except ImportError:
return False
| [
"[email protected]"
] | |
67afec9212a1433422a4bc56f2afbeca8ea194b9 | e66fa131cff76fa3fe70e7b6649fa1332159c781 | /ch06/Packages.py | 8ff16ca6520d9fb4e3c32d634368017d536a0500 | [] | no_license | chc1129/python_tutorial | c6d97c6671a7952d8a7b838ccb8aa3c352fa6881 | 2f8b389731bafbda73c766c095d1eaadb0f99a1c | refs/heads/main | 2023-08-24T07:00:43.424652 | 2021-10-28T16:07:57 | 2021-10-28T16:07:57 | 341,532,732 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 262 | py | import sound.effects.echo
sound.effects.echo.echofilter(input, output, delay=0.7, atten=4)
from sound.effects import echo
echo.echofilter(input, output, delay=0.7, atten=4)
from sound.effects.echo import echofilter
echofilter(input, output, delay=0.7, atten=4)
| [
"[email protected]"
] | |
60649a047ebbee6783e9aa2a8353da3376dbccc4 | 2a9a136296e3d2abebf3a3dbfbbb091076e9f15f | /env/Lib/site-packages/setuptools/command/easy_install.py | 2e057cdb672aaa58dae66b6d09db608cc3d99746 | [] | no_license | Lisukod/planet-tracker | a865e3920b858000f5d3de3b11f49c3d158e0e97 | 6714e6332b1dbccf7a3d44430620f308c9560eaa | refs/heads/master | 2023-02-18T19:26:16.705182 | 2021-01-23T01:51:58 | 2021-01-23T01:51:58 | 328,032,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 88,408 | py | #!/usr/bin/env python
"""
Easy Install
------------
A tool for doing automatic download/extract/build of distutils-based Python
packages. For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.
__ https://setuptools.readthedocs.io/en/latest/easy_install.html
"""
from glob import glob
from distutils.util import get_platform
from distutils.util import convert_path, subst_vars
from distutils.errors import (
DistutilsArgError,
DistutilsOptionError,
DistutilsError,
DistutilsPlatformError,
)
from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS
from distutils import log, dir_util
from distutils.command.build_scripts import first_line_re
from distutils.spawn import find_executable
import sys
import os
import zipimport
import shutil
import tempfile
import zipfile
import re
import stat
import random
import textwrap
import warnings
import site
import struct
import contextlib
import subprocess
import shlex
import io
from sysconfig import get_config_vars, get_path
from setuptools import SetuptoolsDeprecationWarning
from setuptools.extern import six
from setuptools.extern.six.moves import configparser, map
from setuptools import Command
from setuptools.sandbox import run_setup
from setuptools.py27compat import rmtree_safe
from setuptools.command import setopt
from setuptools.archive_util import unpack_archive
from setuptools.package_index import (
PackageIndex,
parse_requirement_arg,
URL_SCHEME,
)
from setuptools.command import bdist_egg, egg_info
from setuptools.wheel import Wheel
from pkg_resources import (
yield_lines,
normalize_path,
resource_string,
ensure_directory,
get_distribution,
find_distributions,
Environment,
Requirement,
Distribution,
PathMetadata,
EggMetadata,
WorkingSet,
DistributionNotFound,
VersionConflict,
DEVELOP_DIST,
)
import pkg_resources.py31compat
__metaclass__ = type
# Turn on PEP440Warnings
warnings.filterwarnings("default", category=pkg_resources.PEP440Warning)
__all__ = [
"samefile",
"easy_install",
"PthDistributions",
"extract_wininst_cfg",
"main",
"get_exe_prefixes",
]
def is_64bit():
return struct.calcsize("P") == 8
def samefile(p1, p2):
"""
Determine if two paths reference the same file.
Augments os.path.samefile to work on Windows and
suppresses errors if the path doesn't exist.
"""
both_exist = os.path.exists(p1) and os.path.exists(p2)
use_samefile = hasattr(os.path, "samefile") and both_exist
if use_samefile:
return os.path.samefile(p1, p2)
norm_p1 = os.path.normpath(os.path.normcase(p1))
norm_p2 = os.path.normpath(os.path.normcase(p2))
return norm_p1 == norm_p2
if six.PY2:
def _to_bytes(s):
return s
def isascii(s):
try:
six.text_type(s, "ascii")
return True
except UnicodeError:
return False
else:
def _to_bytes(s):
return s.encode("utf8")
def isascii(s):
try:
s.encode("ascii")
return True
except UnicodeError:
return False
_one_liner = lambda text: textwrap.dedent(text).strip().replace("\n", "; ")
class easy_install(Command):
"""Manage a download/build/install process"""
description = "Find/get/install Python packages"
command_consumes_arguments = True
user_options = [
("prefix=", None, "installation prefix"),
("zip-ok", "z", "install package as a zipfile"),
("multi-version", "m", "make apps have to require() a version"),
("upgrade", "U", "force upgrade (searches PyPI for latest versions)"),
("install-dir=", "d", "install package to DIR"),
("script-dir=", "s", "install scripts to DIR"),
("exclude-scripts", "x", "Don't install scripts"),
("always-copy", "a", "Copy all needed packages to install dir"),
("index-url=", "i", "base URL of Python Package Index"),
("find-links=", "f", "additional URL(s) to search for packages"),
(
"build-directory=",
"b",
"download/extract/build in DIR; keep the results",
),
(
"optimize=",
"O",
'also compile with optimization: -O1 for "python -O", '
'-O2 for "python -OO", and -O0 to disable [default: -O0]',
),
(
"record=",
None,
"filename in which to record list of installed files",
),
("always-unzip", "Z", "don't install as a zipfile, no matter what"),
("site-dirs=", "S", "list of directories where .pth files work"),
("editable", "e", "Install specified packages in editable form"),
("no-deps", "N", "don't install dependencies"),
("allow-hosts=", "H", "pattern(s) that hostnames must match"),
(
"local-snapshots-ok",
"l",
"allow building eggs from local checkouts",
),
("version", None, "print version information and exit"),
(
"no-find-links",
None,
"Don't load find-links defined in packages being installed",
),
]
boolean_options = [
"zip-ok",
"multi-version",
"exclude-scripts",
"upgrade",
"always-copy",
"editable",
"no-deps",
"local-snapshots-ok",
"version",
]
if site.ENABLE_USER_SITE:
help_msg = "install in user site-package '%s'" % site.USER_SITE
user_options.append(("user", None, help_msg))
boolean_options.append("user")
negative_opt = {"always-unzip": "zip-ok"}
create_index = PackageIndex
def initialize_options(self):
# the --user option seems to be an opt-in one,
# so the default should be False.
self.user = 0
self.zip_ok = self.local_snapshots_ok = None
self.install_dir = self.script_dir = self.exclude_scripts = None
self.index_url = None
self.find_links = None
self.build_directory = None
self.args = None
self.optimize = self.record = None
self.upgrade = self.always_copy = self.multi_version = None
self.editable = self.no_deps = self.allow_hosts = None
self.root = self.prefix = self.no_report = None
self.version = None
self.install_purelib = None # for pure module distributions
self.install_platlib = None # non-pure (dists w/ extensions)
self.install_headers = None # for C/C++ headers
self.install_lib = None # set to either purelib or platlib
self.install_scripts = None
self.install_data = None
self.install_base = None
self.install_platbase = None
if site.ENABLE_USER_SITE:
self.install_userbase = site.USER_BASE
self.install_usersite = site.USER_SITE
else:
self.install_userbase = None
self.install_usersite = None
self.no_find_links = None
# Options not specifiable via command line
self.package_index = None
self.pth_file = self.always_copy_from = None
self.site_dirs = None
self.installed_projects = {}
self.sitepy_installed = False
# Always read easy_install options, even if we are subclassed, or have
# an independent instance created. This ensures that defaults will
# always come from the standard configuration file(s)' "easy_install"
# section, even if this is a "develop" or "install" command, or some
# other embedding.
self._dry_run = None
self.verbose = self.distribution.verbose
self.distribution._set_command_options(
self, self.distribution.get_option_dict("easy_install")
)
def delete_blockers(self, blockers):
extant_blockers = (
filename
for filename in blockers
if os.path.exists(filename) or os.path.islink(filename)
)
list(map(self._delete_path, extant_blockers))
def _delete_path(self, path):
log.info("Deleting %s", path)
if self.dry_run:
return
is_tree = os.path.isdir(path) and not os.path.islink(path)
remover = rmtree if is_tree else os.unlink
remover(path)
@staticmethod
def _render_version():
"""
Render the Setuptools version and installation details, then exit.
"""
ver = sys.version[:3]
dist = get_distribution("setuptools")
tmpl = "setuptools {dist.version} from {dist.location} (Python {ver})"
print(tmpl.format(**locals()))
raise SystemExit()
def finalize_options(self):
self.version and self._render_version()
py_version = sys.version.split()[0]
prefix, exec_prefix = get_config_vars("prefix", "exec_prefix")
self.config_vars = {
"dist_name": self.distribution.get_name(),
"dist_version": self.distribution.get_version(),
"dist_fullname": self.distribution.get_fullname(),
"py_version": py_version,
"py_version_short": py_version[0:3],
"py_version_nodot": py_version[0] + py_version[2],
"sys_prefix": prefix,
"prefix": prefix,
"sys_exec_prefix": exec_prefix,
"exec_prefix": exec_prefix,
# Only python 3.2+ has abiflags
"abiflags": getattr(sys, "abiflags", ""),
}
if site.ENABLE_USER_SITE:
self.config_vars["userbase"] = self.install_userbase
self.config_vars["usersite"] = self.install_usersite
self._fix_install_dir_for_user_site()
self.expand_basedirs()
self.expand_dirs()
self._expand(
"install_dir",
"script_dir",
"build_directory",
"site_dirs",
)
# If a non-default installation directory was specified, default the
# script directory to match it.
if self.script_dir is None:
self.script_dir = self.install_dir
if self.no_find_links is None:
self.no_find_links = False
# Let install_dir get set by install_lib command, which in turn
# gets its info from the install command, and takes into account
# --prefix and --home and all that other crud.
self.set_undefined_options(
"install_lib", ("install_dir", "install_dir")
)
# Likewise, set default script_dir from 'install_scripts.install_dir'
self.set_undefined_options(
"install_scripts", ("install_dir", "script_dir")
)
if self.user and self.install_purelib:
self.install_dir = self.install_purelib
self.script_dir = self.install_scripts
# default --record from the install command
self.set_undefined_options("install", ("record", "record"))
# Should this be moved to the if statement below? It's not used
# elsewhere
normpath = map(normalize_path, sys.path)
self.all_site_dirs = get_site_dirs()
if self.site_dirs is not None:
site_dirs = [
os.path.expanduser(s.strip())
for s in self.site_dirs.split(",")
]
for d in site_dirs:
if not os.path.isdir(d):
log.warn("%s (in --site-dirs) does not exist", d)
elif normalize_path(d) not in normpath:
raise DistutilsOptionError(
d + " (in --site-dirs) is not on sys.path"
)
else:
self.all_site_dirs.append(normalize_path(d))
if not self.editable:
self.check_site_dir()
self.index_url = self.index_url or "https://pypi.org/simple/"
self.shadow_path = self.all_site_dirs[:]
for path_item in self.install_dir, normalize_path(self.script_dir):
if path_item not in self.shadow_path:
self.shadow_path.insert(0, path_item)
if self.allow_hosts is not None:
hosts = [s.strip() for s in self.allow_hosts.split(",")]
else:
hosts = ["*"]
if self.package_index is None:
self.package_index = self.create_index(
self.index_url,
search_path=self.shadow_path,
hosts=hosts,
)
self.local_index = Environment(self.shadow_path + sys.path)
if self.find_links is not None:
if isinstance(self.find_links, six.string_types):
self.find_links = self.find_links.split()
else:
self.find_links = []
if self.local_snapshots_ok:
self.package_index.scan_egg_links(self.shadow_path + sys.path)
if not self.no_find_links:
self.package_index.add_find_links(self.find_links)
self.set_undefined_options("install_lib", ("optimize", "optimize"))
if not isinstance(self.optimize, int):
try:
self.optimize = int(self.optimize)
if not (0 <= self.optimize <= 2):
raise ValueError
except ValueError:
raise DistutilsOptionError("--optimize must be 0, 1, or 2")
if self.editable and not self.build_directory:
raise DistutilsArgError(
"Must specify a build directory (-b) when using --editable"
)
if not self.args:
raise DistutilsArgError(
"No urls, filenames, or requirements specified (see --help)"
)
self.outputs = []
def _fix_install_dir_for_user_site(self):
"""
Fix the install_dir if "--user" was used.
"""
if not self.user or not site.ENABLE_USER_SITE:
return
self.create_home_path()
if self.install_userbase is None:
msg = "User base directory is not specified"
raise DistutilsPlatformError(msg)
self.install_base = self.install_platbase = self.install_userbase
scheme_name = os.name.replace("posix", "unix") + "_user"
self.select_scheme(scheme_name)
def _expand_attrs(self, attrs):
for attr in attrs:
val = getattr(self, attr)
if val is not None:
if os.name == "posix" or os.name == "nt":
val = os.path.expanduser(val)
val = subst_vars(val, self.config_vars)
setattr(self, attr, val)
def expand_basedirs(self):
"""Calls `os.path.expanduser` on install_base, install_platbase and
root."""
self._expand_attrs(["install_base", "install_platbase", "root"])
def expand_dirs(self):
"""Calls `os.path.expanduser` on install dirs."""
dirs = [
"install_purelib",
"install_platlib",
"install_lib",
"install_headers",
"install_scripts",
"install_data",
]
self._expand_attrs(dirs)
def run(self):
if self.verbose != self.distribution.verbose:
log.set_verbosity(self.verbose)
try:
for spec in self.args:
self.easy_install(spec, not self.no_deps)
if self.record:
outputs = self.outputs
if self.root: # strip any package prefix
root_len = len(self.root)
for counter in range(len(outputs)):
outputs[counter] = outputs[counter][root_len:]
from distutils import file_util
self.execute(
file_util.write_file,
(self.record, outputs),
"writing list of installed files to '%s'" % self.record,
)
self.warn_deprecated_options()
finally:
log.set_verbosity(self.distribution.verbose)
def pseudo_tempname(self):
"""Return a pseudo-tempname base in the install directory.
This code is intentionally naive; if a malicious party can write to
the target directory you're already in deep doodoo.
"""
try:
pid = os.getpid()
except Exception:
pid = random.randint(0, sys.maxsize)
return os.path.join(self.install_dir, "test-easy-install-%s" % pid)
def warn_deprecated_options(self):
pass
def check_site_dir(self):
"""Verify that self.install_dir is .pth-capable dir, if needed"""
instdir = normalize_path(self.install_dir)
pth_file = os.path.join(instdir, "easy-install.pth")
# Is it a configured, PYTHONPATH, implicit, or explicit site dir?
is_site_dir = instdir in self.all_site_dirs
if not is_site_dir and not self.multi_version:
# No? Then directly test whether it does .pth file processing
is_site_dir = self.check_pth_processing()
else:
# make sure we can write to target dir
testfile = self.pseudo_tempname() + ".write-test"
test_exists = os.path.exists(testfile)
try:
if test_exists:
os.unlink(testfile)
open(testfile, "w").close()
os.unlink(testfile)
except (OSError, IOError):
self.cant_write_to_target()
if not is_site_dir and not self.multi_version:
# Can't install non-multi to non-site dir
raise DistutilsError(self.no_default_version_msg())
if is_site_dir:
if self.pth_file is None:
self.pth_file = PthDistributions(pth_file, self.all_site_dirs)
else:
self.pth_file = None
if instdir not in map(normalize_path, _pythonpath()):
# only PYTHONPATH dirs need a site.py, so pretend it's there
self.sitepy_installed = True
elif self.multi_version and not os.path.exists(pth_file):
self.sitepy_installed = True # don't need site.py in this case
self.pth_file = None # and don't create a .pth file
self.install_dir = instdir
__cant_write_msg = textwrap.dedent(
"""
can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
%s
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
%s
"""
).lstrip()
__not_exists_id = textwrap.dedent(
"""
This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
"""
).lstrip()
__access_msg = textwrap.dedent(
"""
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://setuptools.readthedocs.io/en/latest/easy_install.html
Please make the appropriate changes for your system and try again.
"""
).lstrip()
def cant_write_to_target(self):
msg = self.__cant_write_msg % (
sys.exc_info()[1],
self.install_dir,
)
if not os.path.exists(self.install_dir):
msg += "\n" + self.__not_exists_id
else:
msg += "\n" + self.__access_msg
raise DistutilsError(msg)
def check_pth_processing(self):
"""Empirically verify whether .pth files are supported in inst. dir"""
instdir = self.install_dir
log.info("Checking .pth file support in %s", instdir)
pth_file = self.pseudo_tempname() + ".pth"
ok_file = pth_file + ".ok"
ok_exists = os.path.exists(ok_file)
tmpl = (
_one_liner(
"""
import os
f = open({ok_file!r}, 'w')
f.write('OK')
f.close()
"""
)
+ "\n"
)
try:
if ok_exists:
os.unlink(ok_file)
dirname = os.path.dirname(ok_file)
pkg_resources.py31compat.makedirs(dirname, exist_ok=True)
f = open(pth_file, "w")
except (OSError, IOError):
self.cant_write_to_target()
else:
try:
f.write(tmpl.format(**locals()))
f.close()
f = None
executable = sys.executable
if os.name == "nt":
dirname, basename = os.path.split(executable)
alt = os.path.join(dirname, "pythonw.exe")
use_alt = (
basename.lower() == "python.exe"
and os.path.exists(alt)
)
if use_alt:
# use pythonw.exe to avoid opening a console window
executable = alt
from distutils.spawn import spawn
spawn([executable, "-E", "-c", "pass"], 0)
if os.path.exists(ok_file):
log.info(
"TEST PASSED: %s appears to support .pth files",
instdir,
)
return True
finally:
if f:
f.close()
if os.path.exists(ok_file):
os.unlink(ok_file)
if os.path.exists(pth_file):
os.unlink(pth_file)
if not self.multi_version:
log.warn("TEST FAILED: %s does NOT support .pth files", instdir)
return False
def install_egg_scripts(self, dist):
"""Write all the scripts for `dist`, unless scripts are excluded"""
if not self.exclude_scripts and dist.metadata_isdir("scripts"):
for script_name in dist.metadata_listdir("scripts"):
if dist.metadata_isdir("scripts/" + script_name):
# The "script" is a directory, likely a Python 3
# __pycache__ directory, so skip it.
continue
self.install_script(
dist,
script_name,
dist.get_metadata("scripts/" + script_name),
)
self.install_wrapper_scripts(dist)
def add_output(self, path):
if os.path.isdir(path):
for base, dirs, files in os.walk(path):
for filename in files:
self.outputs.append(os.path.join(base, filename))
else:
self.outputs.append(path)
def not_editable(self, spec):
if self.editable:
raise DistutilsArgError(
"Invalid argument %r: you can't use filenames or URLs "
"with --editable (except via the --find-links option)."
% (spec,)
)
def check_editable(self, spec):
if not self.editable:
return
if os.path.exists(os.path.join(self.build_directory, spec.key)):
raise DistutilsArgError(
"%r already exists in %s; can't do a checkout there"
% (spec.key, self.build_directory)
)
@contextlib.contextmanager
def _tmpdir(self):
tmpdir = tempfile.mkdtemp(prefix=u"easy_install-")
try:
# cast to str as workaround for #709 and #710 and #712
yield str(tmpdir)
finally:
os.path.exists(tmpdir) and rmtree(rmtree_safe(tmpdir))
def easy_install(self, spec, deps=False):
if not self.editable:
self.install_site_py()
with self._tmpdir() as tmpdir:
if not isinstance(spec, Requirement):
if URL_SCHEME(spec):
# It's a url, download it to tmpdir and process
self.not_editable(spec)
dl = self.package_index.download(spec, tmpdir)
return self.install_item(None, dl, tmpdir, deps, True)
elif os.path.exists(spec):
# Existing file or directory, just process it directly
self.not_editable(spec)
return self.install_item(None, spec, tmpdir, deps, True)
else:
spec = parse_requirement_arg(spec)
self.check_editable(spec)
dist = self.package_index.fetch_distribution(
spec,
tmpdir,
self.upgrade,
self.editable,
not self.always_copy,
self.local_index,
)
if dist is None:
msg = "Could not find suitable distribution for %r" % spec
if self.always_copy:
msg += " (--always-copy skips system and development eggs)"
raise DistutilsError(msg)
elif dist.precedence == DEVELOP_DIST:
# .egg-info dists don't need installing, just process deps
self.process_distribution(spec, dist, deps, "Using")
return dist
else:
return self.install_item(spec, dist.location, tmpdir, deps)
def install_item(self, spec, download, tmpdir, deps, install_needed=False):
# Installation is also needed if file in tmpdir or is not an egg
install_needed = install_needed or self.always_copy
install_needed = install_needed or os.path.dirname(download) == tmpdir
install_needed = install_needed or not download.endswith(".egg")
install_needed = install_needed or (
self.always_copy_from is not None
and os.path.dirname(normalize_path(download))
== normalize_path(self.always_copy_from)
)
if spec and not install_needed:
# at this point, we know it's a local .egg, we just don't know if
# it's already installed.
for dist in self.local_index[spec.project_name]:
if dist.location == download:
break
else:
install_needed = True # it's not in the local index
log.info("Processing %s", os.path.basename(download))
if install_needed:
dists = self.install_eggs(spec, download, tmpdir)
for dist in dists:
self.process_distribution(spec, dist, deps)
else:
dists = [self.egg_distribution(download)]
self.process_distribution(spec, dists[0], deps, "Using")
if spec is not None:
for dist in dists:
if dist in spec:
return dist
def select_scheme(self, name):
"""Sets the install directories by applying the install schemes."""
# it's the caller's problem if they supply a bad name!
scheme = INSTALL_SCHEMES[name]
for key in SCHEME_KEYS:
attrname = "install_" + key
if getattr(self, attrname) is None:
setattr(self, attrname, scheme[key])
def process_distribution(self, requirement, dist, deps=True, *info):
self.update_pth(dist)
self.package_index.add(dist)
if dist in self.local_index[dist.key]:
self.local_index.remove(dist)
self.local_index.add(dist)
self.install_egg_scripts(dist)
self.installed_projects[dist.key] = dist
log.info(self.installation_report(requirement, dist, *info))
if (
dist.has_metadata("dependency_links.txt")
and not self.no_find_links
):
self.package_index.add_find_links(
dist.get_metadata_lines("dependency_links.txt")
)
if not deps and not self.always_copy:
return
elif requirement is not None and dist.key != requirement.key:
log.warn("Skipping dependencies for %s", dist)
return # XXX this is not the distribution we were looking for
elif requirement is None or dist not in requirement:
# if we wound up with a different version, resolve what we've got
distreq = dist.as_requirement()
requirement = Requirement(str(distreq))
log.info("Processing dependencies for %s", requirement)
try:
distros = WorkingSet([]).resolve(
[requirement], self.local_index, self.easy_install
)
except DistributionNotFound as e:
raise DistutilsError(str(e))
except VersionConflict as e:
raise DistutilsError(e.report())
if self.always_copy or self.always_copy_from:
# Force all the relevant distros to be copied or activated
for dist in distros:
if dist.key not in self.installed_projects:
self.easy_install(dist.as_requirement())
log.info("Finished processing dependencies for %s", requirement)
def should_unzip(self, dist):
if self.zip_ok is not None:
return not self.zip_ok
if dist.has_metadata("not-zip-safe"):
return True
if not dist.has_metadata("zip-safe"):
return True
return False
def maybe_move(self, spec, dist_filename, setup_base):
dst = os.path.join(self.build_directory, spec.key)
if os.path.exists(dst):
msg = (
"%r already exists in %s; build directory %s will not be kept"
)
log.warn(msg, spec.key, self.build_directory, setup_base)
return setup_base
if os.path.isdir(dist_filename):
setup_base = dist_filename
else:
if os.path.dirname(dist_filename) == setup_base:
os.unlink(dist_filename) # get it out of the tmp dir
contents = os.listdir(setup_base)
if len(contents) == 1:
dist_filename = os.path.join(setup_base, contents[0])
if os.path.isdir(dist_filename):
# if the only thing there is a directory, move it instead
setup_base = dist_filename
ensure_directory(dst)
shutil.move(setup_base, dst)
return dst
def install_wrapper_scripts(self, dist):
if self.exclude_scripts:
return
for args in ScriptWriter.best().get_args(dist):
self.write_script(*args)
def install_script(self, dist, script_name, script_text, dev_path=None):
"""Generate a legacy script wrapper and install it"""
spec = str(dist.as_requirement())
is_script = is_python_script(script_text, script_name)
if is_script:
body = self._load_template(dev_path) % locals()
script_text = ScriptWriter.get_header(script_text) + body
self.write_script(script_name, _to_bytes(script_text), "b")
@staticmethod
def _load_template(dev_path):
"""
There are a couple of template scripts in the package. This
function loads one of them and prepares it for use.
"""
# See https://github.com/pypa/setuptools/issues/134 for info
# on script file naming and downstream issues with SVR4
name = "script.tmpl"
if dev_path:
name = name.replace(".tmpl", " (dev).tmpl")
raw_bytes = resource_string("setuptools", name)
return raw_bytes.decode("utf-8")
def write_script(self, script_name, contents, mode="t", blockers=()):
"""Write an executable file to the scripts directory"""
self.delete_blockers( # clean up old .py/.pyw w/o a script
[os.path.join(self.script_dir, x) for x in blockers]
)
log.info("Installing %s script to %s", script_name, self.script_dir)
target = os.path.join(self.script_dir, script_name)
self.add_output(target)
if self.dry_run:
return
mask = current_umask()
ensure_directory(target)
if os.path.exists(target):
os.unlink(target)
with open(target, "w" + mode) as f:
f.write(contents)
chmod(target, 0o777 - mask)
def install_eggs(self, spec, dist_filename, tmpdir):
# .egg dirs or files are already built, so just return them
if dist_filename.lower().endswith(".egg"):
return [self.install_egg(dist_filename, tmpdir)]
elif dist_filename.lower().endswith(".exe"):
return [self.install_exe(dist_filename, tmpdir)]
elif dist_filename.lower().endswith(".whl"):
return [self.install_wheel(dist_filename, tmpdir)]
# Anything else, try to extract and build
setup_base = tmpdir
if os.path.isfile(dist_filename) and not dist_filename.endswith(".py"):
unpack_archive(dist_filename, tmpdir, self.unpack_progress)
elif os.path.isdir(dist_filename):
setup_base = os.path.abspath(dist_filename)
if (
setup_base.startswith(tmpdir) # something we downloaded
and self.build_directory
and spec is not None
):
setup_base = self.maybe_move(spec, dist_filename, setup_base)
# Find the setup.py file
setup_script = os.path.join(setup_base, "setup.py")
if not os.path.exists(setup_script):
setups = glob(os.path.join(setup_base, "*", "setup.py"))
if not setups:
raise DistutilsError(
"Couldn't find a setup script in %s"
% os.path.abspath(dist_filename)
)
if len(setups) > 1:
raise DistutilsError(
"Multiple setup scripts in %s"
% os.path.abspath(dist_filename)
)
setup_script = setups[0]
# Now run it, and return the result
if self.editable:
log.info(self.report_editable(spec, setup_script))
return []
else:
return self.build_and_install(setup_script, setup_base)
def egg_distribution(self, egg_path):
if os.path.isdir(egg_path):
metadata = PathMetadata(
egg_path, os.path.join(egg_path, "EGG-INFO")
)
else:
metadata = EggMetadata(zipimport.zipimporter(egg_path))
return Distribution.from_filename(egg_path, metadata=metadata)
def install_egg(self, egg_path, tmpdir):
destination = os.path.join(
self.install_dir,
os.path.basename(egg_path),
)
destination = os.path.abspath(destination)
if not self.dry_run:
ensure_directory(destination)
dist = self.egg_distribution(egg_path)
if not samefile(egg_path, destination):
if os.path.isdir(destination) and not os.path.islink(destination):
dir_util.remove_tree(destination, dry_run=self.dry_run)
elif os.path.exists(destination):
self.execute(
os.unlink,
(destination,),
"Removing " + destination,
)
try:
new_dist_is_zipped = False
if os.path.isdir(egg_path):
if egg_path.startswith(tmpdir):
f, m = shutil.move, "Moving"
else:
f, m = shutil.copytree, "Copying"
elif self.should_unzip(dist):
self.mkpath(destination)
f, m = self.unpack_and_compile, "Extracting"
else:
new_dist_is_zipped = True
if egg_path.startswith(tmpdir):
f, m = shutil.move, "Moving"
else:
f, m = shutil.copy2, "Copying"
self.execute(
f,
(egg_path, destination),
(m + " %s to %s")
% (
os.path.basename(egg_path),
os.path.dirname(destination),
),
)
update_dist_caches(
destination,
fix_zipimporter_caches=new_dist_is_zipped,
)
except Exception:
update_dist_caches(destination, fix_zipimporter_caches=False)
raise
self.add_output(destination)
return self.egg_distribution(destination)
def install_exe(self, dist_filename, tmpdir):
# See if it's valid, get data
cfg = extract_wininst_cfg(dist_filename)
if cfg is None:
raise DistutilsError(
"%s is not a valid distutils Windows .exe" % dist_filename
)
# Create a dummy distribution object until we build the real distro
dist = Distribution(
None,
project_name=cfg.get("metadata", "name"),
version=cfg.get("metadata", "version"),
platform=get_platform(),
)
# Convert the .exe to an unpacked egg
egg_path = os.path.join(tmpdir, dist.egg_name() + ".egg")
dist.location = egg_path
egg_tmp = egg_path + ".tmp"
_egg_info = os.path.join(egg_tmp, "EGG-INFO")
pkg_inf = os.path.join(_egg_info, "PKG-INFO")
ensure_directory(pkg_inf) # make sure EGG-INFO dir exists
dist._provider = PathMetadata(egg_tmp, _egg_info) # XXX
self.exe_to_egg(dist_filename, egg_tmp)
# Write EGG-INFO/PKG-INFO
if not os.path.exists(pkg_inf):
f = open(pkg_inf, "w")
f.write("Metadata-Version: 1.0\n")
for k, v in cfg.items("metadata"):
if k != "target_version":
f.write("%s: %s\n" % (k.replace("_", "-").title(), v))
f.close()
script_dir = os.path.join(_egg_info, "scripts")
# delete entry-point scripts to avoid duping
self.delete_blockers(
[
os.path.join(script_dir, args[0])
for args in ScriptWriter.get_args(dist)
]
)
# Build .egg file from tmpdir
bdist_egg.make_zipfile(
egg_path,
egg_tmp,
verbose=self.verbose,
dry_run=self.dry_run,
)
# install the .egg
return self.install_egg(egg_path, tmpdir)
def exe_to_egg(self, dist_filename, egg_tmp):
"""Extract a bdist_wininst to the directories an egg would use"""
# Check for .pth file and set up prefix translations
prefixes = get_exe_prefixes(dist_filename)
to_compile = []
native_libs = []
top_level = {}
def process(src, dst):
s = src.lower()
for old, new in prefixes:
if s.startswith(old):
src = new + src[len(old) :]
parts = src.split("/")
dst = os.path.join(egg_tmp, *parts)
dl = dst.lower()
if dl.endswith(".pyd") or dl.endswith(".dll"):
parts[-1] = bdist_egg.strip_module(parts[-1])
top_level[os.path.splitext(parts[0])[0]] = 1
native_libs.append(src)
elif dl.endswith(".py") and old != "SCRIPTS/":
top_level[os.path.splitext(parts[0])[0]] = 1
to_compile.append(dst)
return dst
if not src.endswith(".pth"):
log.warn("WARNING: can't process %s", src)
return None
# extract, tracking .pyd/.dll->native_libs and .py -> to_compile
unpack_archive(dist_filename, egg_tmp, process)
stubs = []
for res in native_libs:
if res.lower().endswith(".pyd"): # create stubs for .pyd's
parts = res.split("/")
resource = parts[-1]
parts[-1] = bdist_egg.strip_module(parts[-1]) + ".py"
pyfile = os.path.join(egg_tmp, *parts)
to_compile.append(pyfile)
stubs.append(pyfile)
bdist_egg.write_stub(resource, pyfile)
self.byte_compile(to_compile) # compile .py's
bdist_egg.write_safety_flag(
os.path.join(egg_tmp, "EGG-INFO"),
bdist_egg.analyze_egg(egg_tmp, stubs),
) # write zip-safety flag
for name in "top_level", "native_libs":
if locals()[name]:
txt = os.path.join(egg_tmp, "EGG-INFO", name + ".txt")
if not os.path.exists(txt):
f = open(txt, "w")
f.write("\n".join(locals()[name]) + "\n")
f.close()
def install_wheel(self, wheel_path, tmpdir):
wheel = Wheel(wheel_path)
assert wheel.is_compatible()
destination = os.path.join(self.install_dir, wheel.egg_name())
destination = os.path.abspath(destination)
if not self.dry_run:
ensure_directory(destination)
if os.path.isdir(destination) and not os.path.islink(destination):
dir_util.remove_tree(destination, dry_run=self.dry_run)
elif os.path.exists(destination):
self.execute(
os.unlink,
(destination,),
"Removing " + destination,
)
try:
self.execute(
wheel.install_as_egg,
(destination,),
("Installing %s to %s")
% (os.path.basename(wheel_path), os.path.dirname(destination)),
)
finally:
update_dist_caches(destination, fix_zipimporter_caches=False)
self.add_output(destination)
return self.egg_distribution(destination)
__mv_warning = textwrap.dedent(
"""
Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:
pkg_resources.require("%(name)s") # latest installed version
pkg_resources.require("%(name)s==%(version)s") # this exact version
pkg_resources.require("%(name)s>=%(version)s") # this version or higher
"""
).lstrip()
__id_warning = textwrap.dedent(
"""
Note also that the installation directory must be on sys.path at runtime for
this to work. (e.g. by being the application's script directory, by being on
PYTHONPATH, or by being added to sys.path by your code.)
"""
)
def installation_report(self, req, dist, what="Installed"):
"""Helpful installation message for display to package users"""
msg = "\n%(what)s %(eggloc)s%(extras)s"
if self.multi_version and not self.no_report:
msg += "\n" + self.__mv_warning
if self.install_dir not in map(normalize_path, sys.path):
msg += "\n" + self.__id_warning
eggloc = dist.location
name = dist.project_name
version = dist.version
extras = "" # TODO: self.report_extras(req, dist)
return msg % locals()
__editable_msg = textwrap.dedent(
"""
Extracted editable version of %(spec)s to %(dirname)s
If it uses setuptools in its setup script, you can activate it in
"development" mode by going to that directory and running::
%(python)s setup.py develop
See the setuptools documentation for the "develop" command for more info.
"""
).lstrip()
def report_editable(self, spec, setup_script):
dirname = os.path.dirname(setup_script)
python = sys.executable
return "\n" + self.__editable_msg % locals()
def run_setup(self, setup_script, setup_base, args):
sys.modules.setdefault("distutils.command.bdist_egg", bdist_egg)
sys.modules.setdefault("distutils.command.egg_info", egg_info)
args = list(args)
if self.verbose > 2:
v = "v" * (self.verbose - 1)
args.insert(0, "-" + v)
elif self.verbose < 2:
args.insert(0, "-q")
if self.dry_run:
args.insert(0, "-n")
log.info(
"Running %s %s",
setup_script[len(setup_base) + 1 :],
" ".join(args),
)
try:
run_setup(setup_script, args)
except SystemExit as v:
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
def build_and_install(self, setup_script, setup_base):
args = ["bdist_egg", "--dist-dir"]
dist_dir = tempfile.mkdtemp(
prefix="egg-dist-tmp-", dir=os.path.dirname(setup_script)
)
try:
self._set_fetcher_options(os.path.dirname(setup_script))
args.append(dist_dir)
self.run_setup(setup_script, setup_base, args)
all_eggs = Environment([dist_dir])
eggs = []
for key in all_eggs:
for dist in all_eggs[key]:
eggs.append(self.install_egg(dist.location, setup_base))
if not eggs and not self.dry_run:
log.warn(
"No eggs found in %s (setup script problem?)", dist_dir
)
return eggs
finally:
rmtree(dist_dir)
log.set_verbosity(self.verbose) # restore our log verbosity
def _set_fetcher_options(self, base):
"""
When easy_install is about to run bdist_egg on a source dist, that
source dist might have 'setup_requires' directives, requiring
additional fetching. Ensure the fetcher options given to easy_install
are available to that command as well.
"""
# find the fetch options from easy_install and write them out
# to the setup.cfg file.
ei_opts = self.distribution.get_option_dict("easy_install").copy()
fetch_directives = (
"find_links",
"site_dirs",
"index_url",
"optimize",
"site_dirs",
"allow_hosts",
)
fetch_options = {}
for key, val in ei_opts.items():
if key not in fetch_directives:
continue
fetch_options[key.replace("_", "-")] = val[1]
# create a settings dictionary suitable for `edit_config`
settings = dict(easy_install=fetch_options)
cfg_filename = os.path.join(base, "setup.cfg")
setopt.edit_config(cfg_filename, settings)
def update_pth(self, dist):
if self.pth_file is None:
return
for d in self.pth_file[dist.key]: # drop old entries
if self.multi_version or d.location != dist.location:
log.info("Removing %s from easy-install.pth file", d)
self.pth_file.remove(d)
if d.location in self.shadow_path:
self.shadow_path.remove(d.location)
if not self.multi_version:
if dist.location in self.pth_file.paths:
log.info(
"%s is already the active version in easy-install.pth",
dist,
)
else:
log.info("Adding %s to easy-install.pth file", dist)
self.pth_file.add(dist) # add new entry
if dist.location not in self.shadow_path:
self.shadow_path.append(dist.location)
if not self.dry_run:
self.pth_file.save()
if dist.key == "setuptools":
# Ensure that setuptools itself never becomes unavailable!
# XXX should this check for latest version?
filename = os.path.join(self.install_dir, "setuptools.pth")
if os.path.islink(filename):
os.unlink(filename)
f = open(filename, "wt")
f.write(self.pth_file.make_relative(dist.location) + "\n")
f.close()
def unpack_progress(self, src, dst):
# Progress filter for unpacking
log.debug("Unpacking %s to %s", src, dst)
return dst # only unpack-and-compile skips files for dry run
def unpack_and_compile(self, egg_path, destination):
to_compile = []
to_chmod = []
def pf(src, dst):
if dst.endswith(".py") and not src.startswith("EGG-INFO/"):
to_compile.append(dst)
elif dst.endswith(".dll") or dst.endswith(".so"):
to_chmod.append(dst)
self.unpack_progress(src, dst)
return not self.dry_run and dst or None
unpack_archive(egg_path, destination, pf)
self.byte_compile(to_compile)
if not self.dry_run:
for f in to_chmod:
mode = ((os.stat(f)[stat.ST_MODE]) | 0o555) & 0o7755
chmod(f, mode)
def byte_compile(self, to_compile):
if sys.dont_write_bytecode:
return
from distutils.util import byte_compile
try:
# try to make the byte compile messages quieter
log.set_verbosity(self.verbose - 1)
byte_compile(to_compile, optimize=0, force=1, dry_run=self.dry_run)
if self.optimize:
byte_compile(
to_compile,
optimize=self.optimize,
force=1,
dry_run=self.dry_run,
)
finally:
log.set_verbosity(self.verbose) # restore original verbosity
__no_default_msg = textwrap.dedent(
"""
bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
%s
and your PYTHONPATH environment variable currently contains:
%r
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again."""
).lstrip()
def no_default_version_msg(self):
template = self.__no_default_msg
return template % (self.install_dir, os.environ.get("PYTHONPATH", ""))
def install_site_py(self):
"""Make sure there's a site.py in the target dir, if needed"""
if self.sitepy_installed:
return # already did it, or don't need to
sitepy = os.path.join(self.install_dir, "site.py")
source = resource_string("setuptools", "site-patch.py")
source = source.decode("utf-8")
current = ""
if os.path.exists(sitepy):
log.debug("Checking existing site.py in %s", self.install_dir)
with io.open(sitepy) as strm:
current = strm.read()
if not current.startswith("def __boot():"):
raise DistutilsError(
"%s is not a setuptools-generated site.py; please"
" remove it." % sitepy
)
if current != source:
log.info("Creating %s", sitepy)
if not self.dry_run:
ensure_directory(sitepy)
with io.open(sitepy, "w", encoding="utf-8") as strm:
strm.write(source)
self.byte_compile([sitepy])
self.sitepy_installed = True
def create_home_path(self):
"""Create directories under ~."""
if not self.user:
return
home = convert_path(os.path.expanduser("~"))
for name, path in six.iteritems(self.config_vars):
if path.startswith(home) and not os.path.isdir(path):
self.debug_print("os.makedirs('%s', 0o700)" % path)
os.makedirs(path, 0o700)
INSTALL_SCHEMES = dict(
posix=dict(
install_dir="$base/lib/python$py_version_short/site-packages",
script_dir="$base/bin",
),
)
DEFAULT_SCHEME = dict(
install_dir="$base/Lib/site-packages",
script_dir="$base/Scripts",
)
def _expand(self, *attrs):
config_vars = self.get_finalized_command("install").config_vars
if self.prefix:
# Set default install_dir/scripts from --prefix
config_vars = config_vars.copy()
config_vars["base"] = self.prefix
scheme = self.INSTALL_SCHEMES.get(os.name, self.DEFAULT_SCHEME)
for attr, val in scheme.items():
if getattr(self, attr, None) is None:
setattr(self, attr, val)
from distutils.util import subst_vars
for attr in attrs:
val = getattr(self, attr)
if val is not None:
val = subst_vars(val, config_vars)
if os.name == "posix":
val = os.path.expanduser(val)
setattr(self, attr, val)
def _pythonpath():
items = os.environ.get("PYTHONPATH", "").split(os.pathsep)
return filter(None, items)
def get_site_dirs():
"""
Return a list of 'site' dirs
"""
sitedirs = []
# start with PYTHONPATH
sitedirs.extend(_pythonpath())
prefixes = [sys.prefix]
if sys.exec_prefix != sys.prefix:
prefixes.append(sys.exec_prefix)
for prefix in prefixes:
if prefix:
if sys.platform in ("os2emx", "riscos"):
sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
elif os.sep == "/":
sitedirs.extend(
[
os.path.join(
prefix,
"lib",
"python" + sys.version[:3],
"site-packages",
),
os.path.join(prefix, "lib", "site-python"),
]
)
else:
sitedirs.extend(
[
prefix,
os.path.join(prefix, "lib", "site-packages"),
]
)
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations. Currently only per-user, but /Library and
# /Network/Library could be added too
if "Python.framework" in prefix:
home = os.environ.get("HOME")
if home:
home_sp = os.path.join(
home,
"Library",
"Python",
sys.version[:3],
"site-packages",
)
sitedirs.append(home_sp)
lib_paths = get_path("purelib"), get_path("platlib")
for site_lib in lib_paths:
if site_lib not in sitedirs:
sitedirs.append(site_lib)
if site.ENABLE_USER_SITE:
sitedirs.append(site.USER_SITE)
try:
sitedirs.extend(site.getsitepackages())
except AttributeError:
pass
sitedirs = list(map(normalize_path, sitedirs))
return sitedirs
def expand_paths(inputs):
"""Yield sys.path directories that might contain "old-style" packages"""
seen = {}
for dirname in inputs:
dirname = normalize_path(dirname)
if dirname in seen:
continue
seen[dirname] = 1
if not os.path.isdir(dirname):
continue
files = os.listdir(dirname)
yield dirname, files
for name in files:
if not name.endswith(".pth"):
# We only care about the .pth files
continue
if name in ("easy-install.pth", "setuptools.pth"):
# Ignore .pth files that we control
continue
# Read the .pth file
f = open(os.path.join(dirname, name))
lines = list(yield_lines(f))
f.close()
# Yield existing non-dupe, non-import directory lines from it
for line in lines:
if not line.startswith("import"):
line = normalize_path(line.rstrip())
if line not in seen:
seen[line] = 1
if not os.path.isdir(line):
continue
yield line, os.listdir(line)
def extract_wininst_cfg(dist_filename):
"""Extract configuration data from a bdist_wininst .exe
Returns a configparser.RawConfigParser, or None
"""
f = open(dist_filename, "rb")
try:
endrec = zipfile._EndRecData(f)
if endrec is None:
return None
prepended = (endrec[9] - endrec[5]) - endrec[6]
if prepended < 12: # no wininst data here
return None
f.seek(prepended - 12)
tag, cfglen, bmlen = struct.unpack("<iii", f.read(12))
if tag not in (0x1234567A, 0x1234567B):
return None # not a valid tag
f.seek(prepended - (12 + cfglen))
init = {"version": "", "target_version": ""}
cfg = configparser.RawConfigParser(init)
try:
part = f.read(cfglen)
# Read up to the first null byte.
config = part.split(b"\0", 1)[0]
# Now the config is in bytes, but for RawConfigParser, it should
# be text, so decode it.
config = config.decode(sys.getfilesystemencoding())
cfg.readfp(six.StringIO(config))
except configparser.Error:
return None
if not cfg.has_section("metadata") or not cfg.has_section("Setup"):
return None
return cfg
finally:
f.close()
def get_exe_prefixes(exe_filename):
"""Get exe->egg path translations for a given .exe file"""
prefixes = [
("PURELIB/", ""),
("PLATLIB/pywin32_system32", ""),
("PLATLIB/", ""),
("SCRIPTS/", "EGG-INFO/scripts/"),
("DATA/lib/site-packages", ""),
]
z = zipfile.ZipFile(exe_filename)
try:
for info in z.infolist():
name = info.filename
parts = name.split("/")
if len(parts) == 3 and parts[2] == "PKG-INFO":
if parts[1].endswith(".egg-info"):
prefixes.insert(0, ("/".join(parts[:2]), "EGG-INFO/"))
break
if len(parts) != 2 or not name.endswith(".pth"):
continue
if name.endswith("-nspkg.pth"):
continue
if parts[0].upper() in ("PURELIB", "PLATLIB"):
contents = z.read(name)
if six.PY3:
contents = contents.decode()
for pth in yield_lines(contents):
pth = pth.strip().replace("\\", "/")
if not pth.startswith("import"):
prefixes.append((("%s/%s/" % (parts[0], pth)), ""))
finally:
z.close()
prefixes = [(x.lower(), y) for x, y in prefixes]
prefixes.sort()
prefixes.reverse()
return prefixes
class PthDistributions(Environment):
"""A .pth file with Distribution paths in it"""
dirty = False
def __init__(self, filename, sitedirs=()):
self.filename = filename
self.sitedirs = list(map(normalize_path, sitedirs))
self.basedir = normalize_path(os.path.dirname(self.filename))
self._load()
Environment.__init__(self, [], None, None)
for path in yield_lines(self.paths):
list(map(self.add, find_distributions(path, True)))
def _load(self):
self.paths = []
saw_import = False
seen = dict.fromkeys(self.sitedirs)
if os.path.isfile(self.filename):
f = open(self.filename, "rt")
for line in f:
if line.startswith("import"):
saw_import = True
continue
path = line.rstrip()
self.paths.append(path)
if not path.strip() or path.strip().startswith("#"):
continue
# skip non-existent paths, in case somebody deleted a package
# manually, and duplicate paths as well
path = self.paths[-1] = normalize_path(
os.path.join(self.basedir, path)
)
if not os.path.exists(path) or path in seen:
self.paths.pop() # skip it
self.dirty = True # we cleaned up, so we're dirty now :)
continue
seen[path] = 1
f.close()
if self.paths and not saw_import:
self.dirty = True # ensure anything we touch has import wrappers
while self.paths and not self.paths[-1].strip():
self.paths.pop()
def save(self):
"""Write changed .pth file back to disk"""
if not self.dirty:
return
rel_paths = list(map(self.make_relative, self.paths))
if rel_paths:
log.debug("Saving %s", self.filename)
lines = self._wrap_lines(rel_paths)
data = "\n".join(lines) + "\n"
if os.path.islink(self.filename):
os.unlink(self.filename)
with open(self.filename, "wt") as f:
f.write(data)
elif os.path.exists(self.filename):
log.debug("Deleting empty %s", self.filename)
os.unlink(self.filename)
self.dirty = False
@staticmethod
def _wrap_lines(lines):
return lines
def add(self, dist):
"""Add `dist` to the distribution map"""
new_path = dist.location not in self.paths and (
dist.location not in self.sitedirs
or
# account for '.' being in PYTHONPATH
dist.location == os.getcwd()
)
if new_path:
self.paths.append(dist.location)
self.dirty = True
Environment.add(self, dist)
def remove(self, dist):
"""Remove `dist` from the distribution map"""
while dist.location in self.paths:
self.paths.remove(dist.location)
self.dirty = True
Environment.remove(self, dist)
def make_relative(self, path):
npath, last = os.path.split(normalize_path(path))
baselen = len(self.basedir)
parts = [last]
sep = os.altsep == "/" and "/" or os.sep
while len(npath) >= baselen:
if npath == self.basedir:
parts.append(os.curdir)
parts.reverse()
return sep.join(parts)
npath, last = os.path.split(npath)
parts.append(last)
else:
return path
class RewritePthDistributions(PthDistributions):
@classmethod
def _wrap_lines(cls, lines):
yield cls.prelude
for line in lines:
yield line
yield cls.postlude
prelude = _one_liner(
"""
import sys
sys.__plen = len(sys.path)
"""
)
postlude = _one_liner(
"""
import sys
new = sys.path[sys.__plen:]
del sys.path[sys.__plen:]
p = getattr(sys, '__egginsert', 0)
sys.path[p:p] = new
sys.__egginsert = p + len(new)
"""
)
if os.environ.get("SETUPTOOLS_SYS_PATH_TECHNIQUE", "raw") == "rewrite":
PthDistributions = RewritePthDistributions
def _first_line_re():
"""
Return a regular expression based on first_line_re suitable for matching
strings.
"""
if isinstance(first_line_re.pattern, str):
return first_line_re
# first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern.
return re.compile(first_line_re.pattern.decode())
def auto_chmod(func, arg, exc):
if func in [os.unlink, os.remove] and os.name == "nt":
chmod(arg, stat.S_IWRITE)
return func(arg)
et, ev, _ = sys.exc_info()
six.reraise(et, (ev[0], ev[1] + (" %s %s" % (func, arg))))
def update_dist_caches(dist_path, fix_zipimporter_caches):
"""
Fix any globally cached `dist_path` related data
`dist_path` should be a path of a newly installed egg distribution (zipped
or unzipped).
sys.path_importer_cache contains finder objects that have been cached when
importing data from the original distribution. Any such finders need to be
cleared since the replacement distribution might be packaged differently,
e.g. a zipped egg distribution might get replaced with an unzipped egg
folder or vice versa. Having the old finders cached may then cause Python
to attempt loading modules from the replacement distribution using an
incorrect loader.
zipimport.zipimporter objects are Python loaders charged with importing
data packaged inside zip archives. If stale loaders referencing the
original distribution, are left behind, they can fail to load modules from
the replacement distribution. E.g. if an old zipimport.zipimporter instance
is used to load data from a new zipped egg archive, it may cause the
operation to attempt to locate the requested data in the wrong location -
one indicated by the original distribution's zip archive directory
information. Such an operation may then fail outright, e.g. report having
read a 'bad local file header', or even worse, it may fail silently &
return invalid data.
zipimport._zip_directory_cache contains cached zip archive directory
information for all existing zipimport.zipimporter instances and all such
instances connected to the same archive share the same cached directory
information.
If asked, and the underlying Python implementation allows it, we can fix
all existing zipimport.zipimporter instances instead of having to track
them down and remove them one by one, by updating their shared cached zip
archive directory information. This, of course, assumes that the
replacement distribution is packaged as a zipped egg.
If not asked to fix existing zipimport.zipimporter instances, we still do
our best to clear any remaining zipimport.zipimporter related cached data
that might somehow later get used when attempting to load data from the new
distribution and thus cause such load operations to fail. Note that when
tracking down such remaining stale data, we can not catch every conceivable
usage from here, and we clear only those that we know of and have found to
cause problems if left alive. Any remaining caches should be updated by
whomever is in charge of maintaining them, i.e. they should be ready to
handle us replacing their zip archives with new distributions at runtime.
"""
# There are several other known sources of stale zipimport.zipimporter
# instances that we do not clear here, but might if ever given a reason to
# do so:
# * Global setuptools pkg_resources.working_set (a.k.a. 'master working
# set') may contain distributions which may in turn contain their
# zipimport.zipimporter loaders.
# * Several zipimport.zipimporter loaders held by local variables further
# up the function call stack when running the setuptools installation.
# * Already loaded modules may have their __loader__ attribute set to the
# exact loader instance used when importing them. Python 3.4 docs state
# that this information is intended mostly for introspection and so is
# not expected to cause us problems.
normalized_path = normalize_path(dist_path)
_uncache(normalized_path, sys.path_importer_cache)
if fix_zipimporter_caches:
_replace_zip_directory_cache_data(normalized_path)
else:
# Here, even though we do not want to fix existing and now stale
# zipimporter cache information, we still want to remove it. Related to
# Python's zip archive directory information cache, we clear each of
# its stale entries in two phases:
# 1. Clear the entry so attempting to access zip archive information
# via any existing stale zipimport.zipimporter instances fails.
# 2. Remove the entry from the cache so any newly constructed
# zipimport.zipimporter instances do not end up using old stale
# zip archive directory information.
# This whole stale data removal step does not seem strictly necessary,
# but has been left in because it was done before we started replacing
# the zip archive directory information cache content if possible, and
# there are no relevant unit tests that we can depend on to tell us if
# this is really needed.
_remove_and_clear_zip_directory_cache_data(normalized_path)
def _collect_zipimporter_cache_entries(normalized_path, cache):
"""
Return zipimporter cache entry keys related to a given normalized path.
Alternative path spellings (e.g. those using different character case or
those using alternative path separators) related to the same path are
included. Any sub-path entries are included as well, i.e. those
corresponding to zip archives embedded in other zip archives.
"""
result = []
prefix_len = len(normalized_path)
for p in cache:
np = normalize_path(p)
if np.startswith(normalized_path) and np[
prefix_len : prefix_len + 1
] in (os.sep, ""):
result.append(p)
return result
def _update_zipimporter_cache(normalized_path, cache, updater=None):
"""
Update zipimporter cache data for a given normalized path.
Any sub-path entries are processed as well, i.e. those corresponding to zip
archives embedded in other zip archives.
Given updater is a callable taking a cache entry key and the original entry
(after already removing the entry from the cache), and expected to update
the entry and possibly return a new one to be inserted in its place.
Returning None indicates that the entry should not be replaced with a new
one. If no updater is given, the cache entries are simply removed without
any additional processing, the same as if the updater simply returned None.
"""
for p in _collect_zipimporter_cache_entries(normalized_path, cache):
# N.B. pypy's custom zipimport._zip_directory_cache implementation does
# not support the complete dict interface:
# * Does not support item assignment, thus not allowing this function
# to be used only for removing existing cache entries.
# * Does not support the dict.pop() method, forcing us to use the
# get/del patterns instead. For more detailed information see the
# following links:
# https://github.com/pypa/setuptools/issues/202#issuecomment-202913420
# http://bit.ly/2h9itJX
old_entry = cache[p]
del cache[p]
new_entry = updater and updater(p, old_entry)
if new_entry is not None:
cache[p] = new_entry
def _uncache(normalized_path, cache):
_update_zipimporter_cache(normalized_path, cache)
def _remove_and_clear_zip_directory_cache_data(normalized_path):
def clear_and_remove_cached_zip_archive_directory_data(path, old_entry):
old_entry.clear()
_update_zipimporter_cache(
normalized_path,
zipimport._zip_directory_cache,
updater=clear_and_remove_cached_zip_archive_directory_data,
)
# PyPy Python implementation does not allow directly writing to the
# zipimport._zip_directory_cache and so prevents us from attempting to correct
# its content. The best we can do there is clear the problematic cache content
# and have PyPy repopulate it as needed. The downside is that if there are any
# stale zipimport.zipimporter instances laying around, attempting to use them
# will fail due to not having its zip archive directory information available
# instead of being automatically corrected to use the new correct zip archive
# directory information.
if "__pypy__" in sys.builtin_module_names:
_replace_zip_directory_cache_data = (
_remove_and_clear_zip_directory_cache_data
)
else:
def _replace_zip_directory_cache_data(normalized_path):
def replace_cached_zip_archive_directory_data(path, old_entry):
# N.B. In theory, we could load the zip directory information just
# once for all updated path spellings, and then copy it locally and
# update its contained path strings to contain the correct
# spelling, but that seems like a way too invasive move (this cache
# structure is not officially documented anywhere and could in
# theory change with new Python releases) for no significant
# benefit.
old_entry.clear()
zipimport.zipimporter(path)
old_entry.update(zipimport._zip_directory_cache[path])
return old_entry
_update_zipimporter_cache(
normalized_path,
zipimport._zip_directory_cache,
updater=replace_cached_zip_archive_directory_data,
)
def is_python(text, filename="<string>"):
"Is this string a valid Python script?"
try:
compile(text, filename, "exec")
except (SyntaxError, TypeError):
return False
else:
return True
def is_sh(executable):
"""Determine if the specified executable is a .sh (contains a #! line)"""
try:
with io.open(executable, encoding="latin-1") as fp:
magic = fp.read(2)
except (OSError, IOError):
return executable
return magic == "#!"
def nt_quote_arg(arg):
"""Quote a command line argument according to Windows parsing rules"""
return subprocess.list2cmdline([arg])
def is_python_script(script_text, filename):
"""Is this text, as a whole, a Python script? (as opposed to shell/bat/etc."""
if filename.endswith(".py") or filename.endswith(".pyw"):
return True # extension says it's Python
if is_python(script_text, filename):
return True # it's syntactically valid Python
if script_text.startswith("#!"):
# It begins with a '#!' line, so check if 'python' is in it somewhere
return "python" in script_text.splitlines()[0].lower()
return False # Not any Python I can recognize
try:
from os import chmod as _chmod
except ImportError:
# Jython compatibility
def _chmod(*args):
pass
def chmod(path, mode):
log.debug("changing mode of %s to %o", path, mode)
try:
_chmod(path, mode)
except os.error as e:
log.debug("chmod failed: %s", e)
class CommandSpec(list):
"""
A command spec for a #! header, specified as a list of arguments akin to
those passed to Popen.
"""
options = []
split_args = dict()
@classmethod
def best(cls):
"""
Choose the best CommandSpec class based on environmental conditions.
"""
return cls
@classmethod
def _sys_executable(cls):
_default = os.path.normpath(sys.executable)
return os.environ.get("__PYVENV_LAUNCHER__", _default)
@classmethod
def from_param(cls, param):
"""
Construct a CommandSpec from a parameter to build_scripts, which may
be None.
"""
if isinstance(param, cls):
return param
if isinstance(param, list):
return cls(param)
if param is None:
return cls.from_environment()
# otherwise, assume it's a string.
return cls.from_string(param)
@classmethod
def from_environment(cls):
return cls([cls._sys_executable()])
@classmethod
def from_string(cls, string):
"""
Construct a command spec from a simple string representing a command
line parseable by shlex.split.
"""
items = shlex.split(string, **cls.split_args)
return cls(items)
def install_options(self, script_text):
self.options = shlex.split(self._extract_options(script_text))
cmdline = subprocess.list2cmdline(self)
if not isascii(cmdline):
self.options[:0] = ["-x"]
@staticmethod
def _extract_options(orig_script):
"""
Extract any options from the first line of the script.
"""
first = (orig_script + "\n").splitlines()[0]
match = _first_line_re().match(first)
options = match.group(1) or "" if match else ""
return options.strip()
def as_header(self):
return self._render(self + list(self.options))
@staticmethod
def _strip_quotes(item):
_QUOTES = "\"'"
for q in _QUOTES:
if item.startswith(q) and item.endswith(q):
return item[1:-1]
return item
@staticmethod
def _render(items):
cmdline = subprocess.list2cmdline(
CommandSpec._strip_quotes(item.strip()) for item in items
)
return "#!" + cmdline + "\n"
# For pbr compat; will be removed in a future version.
sys_executable = CommandSpec._sys_executable()
class WindowsCommandSpec(CommandSpec):
split_args = dict(posix=False)
class ScriptWriter:
"""
Encapsulates behavior around writing entry point scripts for console and
gui apps.
"""
template = textwrap.dedent(
r"""
# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
__requires__ = %(spec)r
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(%(spec)r, %(group)r, %(name)r)()
)
"""
).lstrip()
command_spec_class = CommandSpec
@classmethod
def get_script_args(cls, dist, executable=None, wininst=False):
# for backward compatibility
warnings.warn("Use get_args", EasyInstallDeprecationWarning)
writer = (WindowsScriptWriter if wininst else ScriptWriter).best()
header = cls.get_script_header("", executable, wininst)
return writer.get_args(dist, header)
@classmethod
def get_script_header(cls, script_text, executable=None, wininst=False):
# for backward compatibility
warnings.warn(
"Use get_header", EasyInstallDeprecationWarning, stacklevel=2
)
if wininst:
executable = "python.exe"
return cls.get_header(script_text, executable)
@classmethod
def get_args(cls, dist, header=None):
"""
Yield write_script() argument tuples for a distribution's
console_scripts and gui_scripts entry points.
"""
if header is None:
header = cls.get_header()
spec = str(dist.as_requirement())
for type_ in "console", "gui":
group = type_ + "_scripts"
for name, ep in dist.get_entry_map(group).items():
cls._ensure_safe_name(name)
script_text = cls.template % locals()
args = cls._get_script_args(type_, name, header, script_text)
for res in args:
yield res
@staticmethod
def _ensure_safe_name(name):
"""
Prevent paths in *_scripts entry point names.
"""
has_path_sep = re.search(r"[\\/]", name)
if has_path_sep:
raise ValueError("Path separators not allowed in script names")
@classmethod
def get_writer(cls, force_windows):
# for backward compatibility
warnings.warn("Use best", EasyInstallDeprecationWarning)
return WindowsScriptWriter.best() if force_windows else cls.best()
@classmethod
def best(cls):
"""
Select the best ScriptWriter for this environment.
"""
if sys.platform == "win32" or (os.name == "java" and os._name == "nt"):
return WindowsScriptWriter.best()
else:
return cls
@classmethod
def _get_script_args(cls, type_, name, header, script_text):
# Simply write the stub with no extension.
yield (name, header + script_text)
@classmethod
def get_header(cls, script_text="", executable=None):
"""Create a #! line, getting options (if any) from script_text"""
cmd = cls.command_spec_class.best().from_param(executable)
cmd.install_options(script_text)
return cmd.as_header()
class WindowsScriptWriter(ScriptWriter):
command_spec_class = WindowsCommandSpec
@classmethod
def get_writer(cls):
# for backward compatibility
warnings.warn("Use best", EasyInstallDeprecationWarning)
return cls.best()
@classmethod
def best(cls):
"""
Select the best ScriptWriter suitable for Windows
"""
writer_lookup = dict(
executable=WindowsExecutableLauncherWriter,
natural=cls,
)
# for compatibility, use the executable launcher by default
launcher = os.environ.get("SETUPTOOLS_LAUNCHER", "executable")
return writer_lookup[launcher]
@classmethod
def _get_script_args(cls, type_, name, header, script_text):
"For Windows, add a .py extension"
ext = dict(console=".pya", gui=".pyw")[type_]
if ext not in os.environ["PATHEXT"].lower().split(";"):
msg = (
"{ext} not listed in PATHEXT; scripts will not be "
"recognized as executables."
).format(**locals())
warnings.warn(msg, UserWarning)
old = [".pya", ".py", "-script.py", ".pyc", ".pyo", ".pyw", ".exe"]
old.remove(ext)
header = cls._adjust_header(type_, header)
blockers = [name + x for x in old]
yield name + ext, header + script_text, "t", blockers
@classmethod
def _adjust_header(cls, type_, orig_header):
"""
Make sure 'pythonw' is used for gui and and 'python' is used for
console (regardless of what sys.executable is).
"""
pattern = "pythonw.exe"
repl = "python.exe"
if type_ == "gui":
pattern, repl = repl, pattern
pattern_ob = re.compile(re.escape(pattern), re.IGNORECASE)
new_header = pattern_ob.sub(string=orig_header, repl=repl)
return new_header if cls._use_header(new_header) else orig_header
@staticmethod
def _use_header(new_header):
"""
Should _adjust_header use the replaced header?
On non-windows systems, always use. On
Windows systems, only use the replaced header if it resolves
to an executable on the system.
"""
clean_header = new_header[2:-1].strip('"')
return sys.platform != "win32" or find_executable(clean_header)
class WindowsExecutableLauncherWriter(WindowsScriptWriter):
@classmethod
def _get_script_args(cls, type_, name, header, script_text):
"""
For Windows, add a .py extension and an .exe launcher
"""
if type_ == "gui":
launcher_type = "gui"
ext = "-script.pyw"
old = [".pyw"]
else:
launcher_type = "cli"
ext = "-script.py"
old = [".py", ".pyc", ".pyo"]
hdr = cls._adjust_header(type_, header)
blockers = [name + x for x in old]
yield (name + ext, hdr + script_text, "t", blockers)
yield (
name + ".exe",
get_win_launcher(launcher_type),
"b", # write in binary mode
)
if not is_64bit():
# install a manifest for the launcher to prevent Windows
# from detecting it as an installer (which it will for
# launchers like easy_install.exe). Consider only
# adding a manifest for launchers detected as installers.
# See Distribute #143 for details.
m_name = name + ".exe.manifest"
yield (m_name, load_launcher_manifest(name), "t")
# for backward-compatibility
get_script_args = ScriptWriter.get_script_args
get_script_header = ScriptWriter.get_script_header
def get_win_launcher(type):
"""
Load the Windows launcher (executable) suitable for launching a script.
`type` should be either 'cli' or 'gui'
Returns the executable as a byte string.
"""
launcher_fn = "%s.exe" % type
if is_64bit():
launcher_fn = launcher_fn.replace(".", "-64.")
else:
launcher_fn = launcher_fn.replace(".", "-32.")
return resource_string("setuptools", launcher_fn)
def load_launcher_manifest(name):
manifest = pkg_resources.resource_string(__name__, "launcher manifest.xml")
if six.PY2:
return manifest % vars()
else:
return manifest.decode("utf-8") % vars()
def rmtree(path, ignore_errors=False, onerror=auto_chmod):
return shutil.rmtree(path, ignore_errors, onerror)
def current_umask():
tmp = os.umask(0o022)
os.umask(tmp)
return tmp
def bootstrap():
# This function is called when setuptools*.egg is run using /bin/sh
import setuptools
argv0 = os.path.dirname(setuptools.__path__[0])
sys.argv[0] = argv0
sys.argv.append(argv0)
main()
def main(argv=None, **kw):
from setuptools import setup
from setuptools.dist import Distribution
class DistributionWithoutHelpCommands(Distribution):
common_usage = ""
def _show_help(self, *args, **kw):
with _patch_usage():
Distribution._show_help(self, *args, **kw)
if argv is None:
argv = sys.argv[1:]
with _patch_usage():
setup(
script_args=["-q", "easy_install", "-v"] + argv,
script_name=sys.argv[0] or "easy_install",
distclass=DistributionWithoutHelpCommands,
**kw
)
@contextlib.contextmanager
def _patch_usage():
import distutils.core
USAGE = textwrap.dedent(
"""
usage: %(script)s [options] requirement_or_url ...
or: %(script)s --help
"""
).lstrip()
def gen_usage(script_name):
return USAGE % dict(
script=os.path.basename(script_name),
)
saved = distutils.core.gen_usage
distutils.core.gen_usage = gen_usage
try:
yield
finally:
distutils.core.gen_usage = saved
class EasyInstallDeprecationWarning(SetuptoolsDeprecationWarning):
"""Class for warning about deprecations in EasyInstall in SetupTools. Not ignored by default, unlike DeprecationWarning."""
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.