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
8002be677ca26279c21afda1f4891664c842fd7f
8c7a187ebfe858ff3f840602585d166b29fce576
/appstore/translation.py
b8994cca4910d34679e424ebbe4ce5c70da3c2d9
[]
no_license
ohannes/pythonScripts
b756faa2e6d5314cb04c7afc0ca07f69027f59b2
5249b2735d8b2a9a2c6ad8a1ae625cb47f50d0b5
refs/heads/master
2020-04-06T04:20:29.565042
2015-07-19T17:40:39
2015-07-19T17:40:39
34,119,366
0
0
null
null
null
null
UTF-8
Python
false
false
2,552
py
import os language_yml_path = "/home/arcelik/projects/appstore2.0/server/config/locales" EOL = "\n" CR = "\r" TAB = "\t" SPACE = " " skip_characters = [SPACE, TAB, CR, EOL] file_extension_splitter = "." yml_extension = "yml" extension = "translation" language_code_length = 2 reference_language_code = "en" reference_language_code2 = "tr" comment_start_indicator = "#" label_splitter = ":" read_mode = "r" write_mode = "w" END = "END" def isNotEmpty(line): for char in line: if not char in skip_characters: return True return False def commentStartIndex(line): try: index = line.index(comment_start_indicator) return index except: return len(line) def extractComment(line): return line[0:commentStartIndex(line)] def getLabel(line): label = "" for char in line: if char == label_splitter: break if not char in skip_characters: label += char return label def extractLabel(line): return line[line.index(label_splitter)+1:len(line)] def hasValue(line): return isNotEmpty(extractLabel(line)) def getDepth(line): depth = 0 for char in line: if char != SPACE: break depth += 1 return depth/2 def isRealValue(value): previous_char = "a" for char in value: if (char.islower() or char.isupper()) and (previous_char.islower() or previous_char.isupper()): return True previous_char = char return False def getValue(line): value = extractLabel(line) start_index = 0 end_index = len(value) - 1 while value[start_index] in skip_characters: start_index += 1 while value[end_index] in skip_characters: end_index -= 1 return value[start_index:end_index+1] def searchFile(file_name): ftr = open(file_name, read_mode) previous_depth = -1 previous_label = "" ftw = open(file_name + file_extension_splitter + extension, write_mode) while True: line = ftr.readline() if not line: break if isNotEmpty(line): line = extractComment(line) if isNotEmpty(line): depth = getDepth(line) label = getLabel(line) if hasValue(line): value = getValue(line) if isRealValue(value): #print depth, label, value ftw.write(str(depth) + TAB + label + TAB + value + EOL) ftr.close() ftw.close() os.chdir(language_yml_path) yml_files = os.listdir(os.getcwd()) language_codes = [] for yml_file in yml_files: language_code = yml_file.split(file_extension_splitter)[0] if len(language_code) == language_code_length: language_codes.append(language_code) for language_code in language_codes: searchFile(language_code + file_extension_splitter + yml_extension)
2d08fab219857c1c78989b15f11f4bad4e48c065
9743d5fd24822f79c156ad112229e25adb9ed6f6
/xai/brain/wordbase/otherforms/_expedited.py
7d2b6ebd4dc9da31f59bc5114301568600ec3d23
[ "MIT" ]
permissive
cash2one/xai
de7adad1758f50dd6786bf0111e71a903f039b64
e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6
refs/heads/master
2021-01-19T12:33:54.964379
2017-01-28T02:00:50
2017-01-28T02:00:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
230
py
#calss header class _EXPEDITED(): def __init__(self,): self.name = "EXPEDITED" self.definitions = expedite self.parents = [] self.childen = [] self.properties = [] self.jsondata = {} self.basic = ['expedite']
195342a7a8d19ad4d68a02c17a005b456d2aeceb
0a42fed6746cd9093fc3c3d4fbd7ac5d2cff310f
/python高级编程io/study07/code01_ORM_test.py
918a9b4bd5423b334ab34b3fbb20d8b68d656220
[]
no_license
luoshanya/Vue_Study
4767fc46f2186c75a4b2f7baeeb2fcc9044bd9a4
d3a07364a63f0552b166a5697a7245f56e38e78d
refs/heads/master
2020-06-19T02:15:20.253362
2019-07-17T08:49:48
2019-07-17T08:49:48
196,529,016
0
0
null
null
null
null
UTF-8
Python
false
false
4,630
py
import numbers import pymysql class Filed: pass class IntField(Filed): def __init__(self, db_column, min_value=None, max_value=None): self._value = None self.min_value = min_value self.max_value = max_value self.db_column = db_column if min_value is not None: if not isinstance(min_value, numbers.Integral): raise ValueError('this value attr must to int') elif min_value < 0: raise ValueError('this value must bigger than zero') elif max_value is not None: if not isinstance(min_value, numbers.Integral): raise ValueError('this value attr must to int') elif min_value < 0: raise ValueError('this value must bigger than zero') elif min_value and max_value is not None: if min_value > max_value: raise ValueError('min_value must be smaller than max_value') # 数据描述符 def __get__(self, instance, owner): # 这里的self.value是set的 return self._value def __set__(self, instance, value): if not isinstance(value, numbers.Integral): raise ValueError('this value attr must be int') elif value < self.min_value or value > self.max_value: raise ValueError('value must between min_value and max_length') self._value = value class CharField(Filed): def __init__(self, db_column, max_length=None): self.value = None self.max_length = max_length self.db_column = db_column if self.max_length is None: raise ValueError('max_length not must be None') def __get__(self, instance, owner): return self._value def __set__(self, instance, value): if not isinstance(value, str): raise ValueError('this value attr must be str') elif len(value) > self.max_length: raise ValueError('value is length must be smaller than max_length ') self._value = value # 创建元类 class ModelMateClass(type): def __new__(cls, name, bases, attrs, **kwargs): if name == 'BasesModel': super().__new__(cls, name, bases, attrs, **kwargs) field = {} for key, value in attrs.items(): #首先创建一个类来判断字段 if isinstance(value, Filed): field[key] = value attr_meta = attrs.get('Meta', None) _meta = {} db_table = name.lower() if db_table is not None: table = getattr(attr_meta, "db_table", None) if table is not None: db_table = table _meta['db_table'] = db_table attrs['_meta'] = _meta attrs['field'] = field # del attrs['Meta'] return super().__new__(cls, name, bases, attrs, **kwargs) # return super().__new__() class BasesModel(metaclass=ModelMateClass): # 在传参不确定的情况下 使用*args **kwargs def __init__(self, *args, **kwargs): for key, value in kwargs.items(): setattr(self, key, value) # 实例化 return super().__init__() def save(self): fields = [] values = [] for key, value in self.field.items(): db_column = value.db_column if db_column is None: db_column = key.lower() fields.append(db_column) value = getattr(self, key) # 这里必须将value转str values.append(str(value)) sql = 'insert into {table_name}({fields}) value("{name}",{age})'.format(table_name=self._meta['db_table'], fields=','.join(fields), name=",".join(values).split(',')[0], age=",".join(values).split(',')[1]) dbparams = { 'host': "127.0.0.1", 'port': 3306, 'db': "test", 'user': "root", 'password': "10130503", 'charset': "utf8" } conn = pymysql.Connect(**dbparams) cur = conn.cursor() cur.execute(sql) conn.commit() cur.close() conn.close() class User(BasesModel):#调用的话,继承的关系= 会直接找到父类 # 本来这里是需要实例化来对应用户的操作 那就需要重新创建一个类来继承 # def __init__(self): name = CharField(db_column='name', max_length=10) age = IntField(db_column='age', min_value=1, max_value=200) class Meta: db_table = 'user' if __name__ == '__main__': user = User(name='猪', age=100) # user.name = 1 # user.age = 300 user.save()
5aa9ac1c17aafb0c47541e41079ce7ae7c3a0596
dcbef06d5a00f07756339b9e62c684dec2fee425
/tests/basics/ClassesTest34.py
13254254ae97a63bd3a5c3f24db20b3bef63ed30
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
Nuitka/Nuitka
f9543d8d95bfa0b81d4e60af0dfad99fb72893a4
d87faf2f7e1d6ed9bfe4cf8c1d648f34307e33f2
refs/heads/develop
2023-08-28T14:00:32.861328
2023-08-27T09:16:45
2023-08-27T09:16:45
9,626,741
8,573
599
Apache-2.0
2023-09-13T02:49:41
2013-04-23T15:40:33
Python
UTF-8
Python
false
false
1,406
py
# Copyright 2023, Kay Hayen, mailto:[email protected] # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # 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. # """ Covers Python3 meta classes with __prepare__ non-dict values. """ # nuitka-project: --nofollow-imports from enum import Enum print("Enum class with duplicate enumeration values:") try: class Color(Enum): red = 1 green = 2 blue = 3 red = 4 print("not allowed to get here") except Exception as e: print("Occurred", e) print("Class variable that conflicts with closure variable:") def testClassNamespaceOverridesClosure(): # See #17853. x = 42 class X: locals()["x"] = 43 y = x print("should be 43:", X.y) testClassNamespaceOverridesClosure()
c5bc92e292c60a7a58f74a7e71291cac3968bfc8
1aeb828e57be9b046ee25433fff05956f01db53b
/python_bms/ALGORITHMS/SWEA/SWEA_d2/1986.지그재그숫자.py
00ecd7e2ed3f2062c756fb5f7c20c59c9c54153c
[]
no_license
LynnYeonjuLee/TIL_BMS2
11f2753e2e82c4898a782d6907a21e973c34cf69
f363723391598caf5ec6b33925fcb8a13a252d9f
refs/heads/master
2023-01-22T00:45:25.091512
2020-12-04T00:22:44
2020-12-04T00:22:44
290,238,836
0
0
null
null
null
null
UTF-8
Python
false
false
234
py
T = int(input()) for test_case in range(1, T+1): N = int(input()) result = 0 for i in range(1, N+1): if i % 2 == 1: result += i else: result -= i print(f'#{test_case} {result}')
75d4d2d5cd7f43565d0f937dec45d592a73eaed0
2442d073434d463cede4a79ae8f9fd31c62174f8
/procedural-programming/exceptions/name-error.py
832f2844420c2a3aed590e3ddd8ab52153adc4d3
[]
no_license
grbalmeida/hello-python
3630d75cfdde15223dc1c3a714fd562f6cda0505
4d9ddf2f7d104fdbc3aed2c88e50af19a39c1b63
refs/heads/master
2020-07-10T10:04:38.982256
2020-02-26T00:37:36
2020-02-26T00:37:36
204,237,527
0
0
null
null
null
null
UTF-8
Python
false
false
199
py
try: print(nonexistent_variable) except NameError as error: print(error.args) print(f'The variable was not set: {error}') else: print('The code was executed without throwing any exceptions')
afb8519068bdf6411c8ce24d687543a19994b39f
e38f7b5d46fd8a65c15e49488fc075e5c62943c9
/pychron/canvas/tasks/designer.py
43aed5471b6e5e63fc8030de8446c425a50ab10d
[]
no_license
INGPAN/pychron
3e13f9d15667e62c347f5b40af366096ee41c051
8592f9fc722f037a61b0b783d587633e22f11f2f
refs/heads/master
2021-08-15T00:50:21.392117
2015-01-19T20:07:41
2015-01-19T20:07:41
111,054,121
0
0
null
null
null
null
UTF-8
Python
false
false
3,887
py
#=============================================================================== # Copyright 2013 Jake Ross # # 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. #=============================================================================== #============= enthought library imports ======================= import os from traits.api import HasTraits, Instance #============= standard library imports ======================== #============= local library imports ========================== from pychron.canvas.canvas2D.designer_extraction_line_canvas2D import DesignerExtractionLineCanvas2D from pychron.canvas.canvas2D.extraction_line_canvas2D import ExtractionLineCanvas2D from pychron.canvas.canvas2D.scene.canvas_parser import CanvasParser from pychron.canvas.canvas2D.scene.extraction_line_scene import ExtractionLineScene from pychron.canvas.canvas2D.scene.primitives.valves import Valve class Designer(HasTraits): scene = Instance(ExtractionLineScene, ()) canvas = Instance(ExtractionLineCanvas2D) def _canvas_default(self): canvas = DesignerExtractionLineCanvas2D() return canvas def save_xml(self, p): if self.scene: # sync the canvas_parser with the # current scene and save if os.path.isfile(p): self._save_xml(p) else: self._construct_xml() def _save_xml(self, p): cp = CanvasParser(p) for tag in ('laser', 'stage', 'spectrometer'): for ei in cp.get_elements(tag): self._set_element_color(ei) self._set_element_translation(ei) for ei in cp.get_elements('valve'): self._set_element_translation(ei) for ei in cp.get_elements('connection'): name = ei.text.strip() obj = self.scene.get_item(name) if obj.clear_orientation: ei.set('orientation', '') p = os.path.join(os.path.dirname(p, ), 'test.xml') cp.save() def _set_element_translation(self, elem): def func(obj, trans): trans.text = '{},{}'.format(obj.x, obj.y) self._set_element_attr(func, elem, 'translation') def _set_element_color(self, elem): def func(obj, color): if color is not None: c = ','.join(map(lambda x: str(x), obj.default_color.toTuple() )) color.text = c self._set_element_attr(func, elem, 'color') def _set_element_attr(self, func, elem, tag): name = elem.text.strip() obj = self.scene.get_item(name) if obj is not None: func(obj, elem.find(tag)) def _construct_xml(self): tags = {Valve: 'valve'} cp = CanvasParser() for elem in self.scene.iteritems(): if type(elem) in tags: tag = tags[type(elem)] print tag, elem elif hasattr(elem, 'type_tag'): print elem.type_tag, elem def open_xml(self, p): #cp=CanvasParser(p) #print cp scene = ExtractionLineScene(canvas=self.canvas) self.canvas.scene = scene cp = os.path.join(os.path.dirname(p), 'canvas_config.xml') scene.load(p, cp) self.scene = scene #============= EOF =============================================
ad5d8cd83f719b59a3793b8bfcbfda33cd7f65b0
095521582f598b65b76f222d8c1acbcaca0c24bf
/output_raw/output_input_Lx1Ly3.py
db4de0907eb008061450f4a61a6d47971d67167b
[ "MIT" ]
permissive
ryuikaneko/itps_contraction
cf07e41d32e93c10db6ebeb1c4f5246b238e737b
10816fb6c90d77f5a3b2f804ab22573d1d676eb4
refs/heads/master
2020-08-28T23:05:00.262183
2020-08-03T01:04:22
2020-08-03T01:04:22
217,847,703
1
1
null
null
null
null
UTF-8
Python
false
false
2,511
py
def Contract_scalar_1x3(\ t0_4,t1_4,t2_4,\ t0_3,t1_3,t2_3,\ t0_2,t1_2,t2_2,\ t0_1,t1_1,t2_1,\ t0_0,t1_0,t2_0,\ o1_3,\ o1_2,\ o1_1\ ): ############################## # ./input/input_Lx1Ly3.dat ############################## # (o1_2*(t1_2*((t2_2*(t2_1*(t1_1*((o1_1*t1_1.conj())*(t0_1*(t0_0*(t2_0*t1_0)))))))*(t1_2.conj()*(t0_2*(t0_3*(t1_3*((o1_3*t1_3.conj())*(t2_3*(t0_4*(t2_4*t1_4))))))))))) # cpu_cost= 1.804e+11 memory= 5.0206e+08 # final_bond_order () ############################## return np.tensordot( o1_2, np.tensordot( t1_2, np.tensordot( np.tensordot( t2_2, np.tensordot( t2_1, np.tensordot( t1_1, np.tensordot( np.tensordot( o1_1, t1_1.conj(), ([1], [4]) ), np.tensordot( t0_1, np.tensordot( t0_0, np.tensordot( t2_0, t1_0, ([1], [0]) ), ([0], [1]) ), ([0], [0]) ), ([1, 4], [2, 5]) ), ([0, 3, 4], [4, 6, 0]) ), ([1, 2, 3], [5, 1, 3]) ), ([1], [0]) ), np.tensordot( t1_2.conj(), np.tensordot( t0_2, np.tensordot( t0_3, np.tensordot( t1_3, np.tensordot( np.tensordot( o1_3, t1_3.conj(), ([1], [4]) ), np.tensordot( t2_3, np.tensordot( t0_4, np.tensordot( t2_4, t1_4, ([0], [1]) ), ([1], [1]) ), ([0], [1]) ), ([2, 3], [5, 2]) ), ([1, 2, 4], [6, 4, 0]) ), ([1, 2, 3], [5, 0, 2]) ), ([1], [0]) ), ([0, 1], [2, 4]) ), ([0, 2, 4, 5], [6, 0, 1, 3]) ), ([0, 1, 2, 3], [3, 4, 0, 1]) ), ([0, 1], [0, 1]) )
6f587046be7066cad70382b794003f17a416b0aa
6515dee87efbc5edfbf4c117e262449999fcbb50
/eet/Pacific_Atlantic_Water_Flow.py
b5b510ce650e4d832898d5e4641d865557b67c63
[]
no_license
wangyunge/algorithmpractice
24edca77e180854b509954dd0c5d4074e0e9ef31
085b8dfa8e12f7c39107bab60110cd3b182f0c13
refs/heads/master
2021-12-29T12:55:38.096584
2021-12-12T02:53:43
2021-12-12T02:53:43
62,696,785
0
0
null
null
null
null
UTF-8
Python
false
false
1,101
py
""" Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top edges of the matrix and the "Atlantic ocean" touches the right and bottom edges. Water can only flow in four directions (up, down, left, or right) from a cell to another one with height equal or lower. Find the list of grid coordinates where water can flow to both the Pacific and Atlantic ocean. Note: The order of returned grid coordinates does not matter. Both m and n are less than 150. Example: Given the following 5x5 matrix: Pacific ~ ~ ~ ~ ~ ~ 1 2 2 3 (5) * ~ 3 2 3 (4) (4) * ~ 2 4 (5) 3 1 * ~ (6) (7) 1 4 5 * ~ (5) 1 1 2 4 * * * * * * Atlantic Return: [[0, 4], [1, 3], [1, 4], [2, 2], [3, 0], [3, 1], [4, 0]] (positions with parentheses in above matrix). """ class Solution(object): def pacificAtlantic(self, matrix): """ :type matrix: List[List[int]] :rtype: List[List[int]] """
262a0db07ed6e9da60628477540a51c51d4cdb30
7365f2410c139c5f4bf5ba0777ed0321322c92d9
/python/数组中只出现一次的数字.py
bf189f784d5f0e385008e6c963df8d84172acffe
[]
no_license
EvanJamesMG/Point-to-the-offer
956a17a3c2a0d99a11428765f6af9f4ebbbe5fc3
cc9b6b7572cf819f0e53a800899e1ebd9fd6cf9d
refs/heads/master
2021-01-10T17:11:06.125860
2016-04-21T03:47:15
2016-04-21T03:47:15
52,489,364
1
0
null
null
null
null
UTF-8
Python
false
false
1,098
py
# coding=utf-8 __author__ = 'EvanJames' class ListNode: def __init__(self, x): self.val = x self.next = None class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class RandomListNode: def __init__(self, x): self.label = x self.next = None self.random = None ''' 题目描述 一个整型数组里除了两个数字之外,其他的数字都出现了两次。请写程序找出这两个只出现一次的数字。 利用haspmap ''' class Solution: # 返回[a,b] 其中ab是出现一次的两个数字 def FindNumsAppearOnce(self, array): if array == None or len(array) <= 1: return [0, 0] map = {} res = [] for i in range(len(array)): if array[i] in map: map.pop(array[i]) else: map[array[i]] = 1 for i in map: res.append(i) return res if __name__ == '__main__': res = Solution().FindNumsAppearOnce([1, 2, 3, 3, 2, 4]) print(res)
a5d12bb6d61ae83e3e28dc74139590146591a395
09f8a3825c5109a6cec94ae34ea17d9ace66f381
/cohesity_management_sdk/models/filter_ip_config.py
599025d68f0a892418ff10e71716b77276675c3d
[ "Apache-2.0" ]
permissive
cohesity/management-sdk-python
103ee07b2f047da69d7b1edfae39d218295d1747
e4973dfeb836266904d0369ea845513c7acf261e
refs/heads/master
2023-08-04T06:30:37.551358
2023-07-19T12:02:12
2023-07-19T12:02:12
134,367,879
24
20
Apache-2.0
2023-08-31T04:37:28
2018-05-22T06:04:19
Python
UTF-8
Python
false
false
2,058
py
# -*- coding: utf-8 -*- # Copyright 2023 Cohesity Inc. class FilterIpConfig(object): """Implementation of the 'FilterIpConfig' model. Specifies the list of IP addresses that are allowed or denied at the job level. Allowed IPs and Denied IPs cannot be used together. Attributes: allowed_ip_addresses (list of string): Specifies the IP addresses that should be used exclusively at the job level. Cannot be set if deniedIpAddresses is set. denied_ip_addresses (list of string): Specifies the IP addresses that should not be used at the job level. Cannot be set if allowedIpAddresses is set. """ # Create a mapping from Model property names to API property names _names = { "allowed_ip_addresses":'allowedIpAddresses', "denied_ip_addresses":'deniedIpAddresses', } def __init__(self, allowed_ip_addresses=None, denied_ip_addresses=None, ): """Constructor for the FilterIpConfig class""" # Initialize members of the class self.allowed_ip_addresses = allowed_ip_addresses self.denied_ip_addresses = denied_ip_addresses @classmethod def from_dictionary(cls, dictionary): """Creates an instance of this model from a dictionary Args: dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server's response. The keys MUST match property names in the API description. Returns: object: An instance of this structure class. """ if dictionary is None: return None # Extract variables from the dictionary allowed_ip_addresses = dictionary.get("allowedIpAddresses") denied_ip_addresses = dictionary.get("deniedIpAddresses") # Return an object of this model return cls( allowed_ip_addresses, denied_ip_addresses )
6a9a4b92daa1da9160d1d1440fa87b2c6ff94510
4cf652ee4168f6f728d4ad86a9df13fd3431fd98
/DynamicProgramming/perfect-squares.py
66193dfcb8ff4d53f8769187374993dfe945a26b
[]
no_license
jadenpadua/Foundation
73940b73720a3e84f46502797a02fa19117b653c
042a83177e8cce7291c9b31b54b3d71e4d4c9696
refs/heads/master
2023-03-07T03:20:21.546843
2021-02-16T23:16:43
2021-02-16T23:16:43
286,326,064
0
0
null
null
null
null
UTF-8
Python
false
false
364
py
class Solution: def numSquares(self, n: int) -> int: dp = [0] *(n+1) for i in range(1, n+1): min_val = i j, sq = 1,1 while sq <= i: min_val = min(min_val, 1 + dp[i-sq]) j += 1 sq = j*j dp[i] = min_val return dp[n]
e88b4b5dc565e63758784709e887b291b8b6b45c
33a69f068d3ab986fb513867eb5e90f729100527
/advcbv2/basic_app/templates/basic_app/pythdjango/bji.py
b4b557401b12cb26308cc4ad55df6ed52326ca16
[]
no_license
Ayush900/django-2
44aef2b6c4cc1e54e75d8d649963289864acfb97
cfcb1b4c5e3a3e2fc801e1c2cc5cbb236191981a
refs/heads/master
2020-07-06T22:32:39.853411
2019-08-19T14:11:26
2019-08-19T14:11:26
203,158,378
0
0
null
null
null
null
UTF-8
Python
false
false
57
py
d = [] d.append('1') d.append('2') d.append('3') print(d)
d26cece290c619bc7a5ac2689dfeb990b05579af
10aefc154e740941a9b340f471b785739280fc93
/May2020/1st_week/reverse_int.py
e8da53f0c7436c79be3d129f843d5e3032f765cd
[]
no_license
saurabh-kumar88/leetcode
465b9eaa7d844eba21c3bc4e9cc1e3348c75c037
282b270c1a97bc726b835f8288fdb898a8d0c81c
refs/heads/master
2022-12-04T13:13:32.144792
2020-08-21T14:54:24
2020-08-21T14:54:24
280,216,966
0
0
null
null
null
null
UTF-8
Python
false
false
602
py
class Solution: def reverse(self, x: int) -> int: # check if number is greater then 32 bit if x < -(2**31) or x > (2**31) -1: return 0 string = str(x) if x < 0: result = int("-" + str(-x)[::-1]) else: result = int(string[::-1]) # Again check 32 bit limit for reversed number if result < -(2**31) or result > (2**31) -1: return 0 else: return result string = "-123" if __name__ == "__main__": obj = Solution() z = obj.reverse(1534236469) print(z)
9b5c50da6072d37a8bab42e3f2baa02890590e25
77741ac3384cf80ba9f5684f896e4b6500064582
/PycharmProjects/模块、包、异常/04-捕获异常信息.py
67d9c93ccddcea9b796f7cc827d2ccf9e5016259
[ "MIT" ]
permissive
jiankangliu/baseOfPython
9c02763b6571596844ee3e690c4d505c8b95038d
a10e81c79bc6fc3807ca8715fb1be56df527742c
refs/heads/master
2020-05-09T12:11:02.314281
2019-04-13T01:17:24
2019-04-13T01:17:24
181,104,243
0
0
null
null
null
null
UTF-8
Python
false
false
376
py
# print(num) # NameError # 捕获异常类型 # try: # print(num) # # print(1/0) # # except ZeroDivisionError: # except NameError as e: # print(e) # try: # # print(num) # print(1/0) # except ZeroDivisionError as e: # # except NameError as e: # print(e) try: print(1 / 0) print(num) except Exception as e: print(e)
3713d0ee0e3afed4e3607b6ad33354ee81071a6e
4331b28f22a2efb12d462ae2a8270a9f666b0df1
/.history/dvdstore/webapp/views_20190914133048.py
615e3723c4902560ba9ac1776831448b19fbf81a
[]
no_license
ZiyaadLakay/csc312.group.project
ba772a905e0841b17478eae7e14e43d8b078a95d
9cdd9068b5e24980c59a53595a5d513c2e738a5e
refs/heads/master
2020-07-26T23:30:22.542450
2019-09-16T11:46:41
2019-09-16T11:46:41
200,703,160
0
0
null
2019-08-05T17:52:37
2019-08-05T17:52:37
null
UTF-8
Python
false
false
6,307
py
from django.shortcuts import render from .models import DVD, Transaction, Customer from django.core.paginator import EmptyPage,PageNotAnInteger, Paginator from django.db.models import Q from django.contrib.auth.models import User, auth from django.shortcuts import render, redirect from django.contrib import messages from django.core.files.storage import FileSystemStorage from django.contrib.auth.decorators import login_required, permission_required from .form import DocumentForm import datetime #This is the homepage for the User def home(request): dvds = DVD.objects.all() #imports dvds from database query = request.GET.get("query") gen = request.GET.get("gen") if query: dvds = DVD.objects.filter(Q(Title__icontains=query))#Search Function according to name if not DVD.objects.filter(Q(Title__icontains=query)).exists(): messages.info(request,'No search results for : '+query) elif gen: dvds = DVD.objects.filter(Q(genre__icontains=gen))#Search Function according to name paginator = Paginator(dvds, 6) # Show 3 dvds per page page = request.GET.get('page') dvds = paginator.get_page(page) genre = {'Action', 'Comedy', 'Drama', 'Family', 'Romance'} return render(request, 'home.html', {'dvds':dvds}, {'genre':genre}) #renders the page #This is the page for clerks @login_required def clerk(request): dvds = DVD.objects.all() #imports dvds from database trans = Transaction.objects.all() #imports dvds from database users = User.objects.all() #imports dvds from database customer = Customer.objects.all() #imports dvds from database query = request.GET.get("query") if query: dvds = DVD.objects.filter(Q(Title__icontains=query)) #Search Function according to name paginator = Paginator(dvds, 6) # Show 3 dvds per page page = request.GET.get('page') dvds = paginator.get_page(page) form=DocumentForm() context_dict = { 'dvds':dvds ,'form': form, 'trans':trans, 'users':users, 'customer':customer} return render(request, 'clerk.html',context_dict) @login_required def userstbl(request): dvds = DVD.objects.all() #imports dvds from database trans = Transaction.objects.all() #imports dvds from database users = User.objects.all() #imports dvds from database customer = Customer.objects.all() #imports dvds from database query = request.GET.get("query") if query: users = User.objects.filter(Q(username__icontains=query)) #Search Function according to name paginator = Paginator(dvds, 6) # Show 3 dvds per page page = request.GET.get('page') dvds = paginator.get_page(page) form=DocumentForm() context_dict = { 'dvds':dvds ,'form': form, 'trans':trans, 'users':users, 'customer':customer} return render(request, 'userstbl.html',context_dict) @login_required def transactions(request): dvds = DVD.objects.all() #imports dvds from database trans = Transaction.objects.all() #imports dvds from database users = User.objects.all() #imports dvds from database customer = Customer.objects.all() #imports dvds from database query = request.GET.get("query") if query: trans = Transaction.objects.filter(Q(TransactionNumber__icontains=query)) #Search Function according to name paginator = Paginator(dvds, 6) # Show 3 dvds per page page = request.GET.get('page') dvds = paginator.get_page(page) form=DocumentForm() context_dict = { 'dvds':dvds ,'form': form, 'trans':trans, 'users':users, 'customer':customer} return render(request, 'transactions.html',context_dict) def register2(request): if request.method == 'POST': first_name= request.POST['first_name'] last_name= request.POST['last_name'] username= request.POST['username'] email= request.POST['email'] password1= first_name[0]+last_name if User.objects.filter(username=username).exists(): messages.info(request, 'Username Taken') return redirect('clerk') elif User.objects.filter(email=email).exists(): messages.info(request, 'Email Taken') user = User.objects.create_user(username=username, password=password1, email=email, first_name=first_name, last_name=last_name) user.save() messages.info(request, 'User Created') return redirect('/clerk') def model_form_upload(request): if request.method == 'POST': form = DocumentForm(request.POST, request.FILES) if form.is_valid(): form.save() return redirect('/clerk') def booking(request): username= request.POST['username'] dvdID= request.POST['dvdID'] DVD.objects.filter(id=dvdID).update(BookingPickup=username) return redirect('home') def checkout(request): dvdID= request.POST['dvdID'] numOfDays=request.POST['numDaysBooked'] dvdPrice=request.POST['dvdPrice'] users_ID=request.POST['user_ID'] MovieTitle=request.POST['MovieTitle'] payment=request.POST['payment'] bill=int(numOfDays)*int(dvdPrice) DVD.objects.filter(id=dvdID).update(NumDaysBooked=numOfDays,InStock=False) RentDate= datetime.date.today() DueDate=RentDate+datetime.timedelta(days=int(numOfDays)) t = datetime.datetime.now().strftime("%H%M%S") TransactionNumber=payment+str(RentDate)[0:4]+str(RentDate)[8:10]+t #Amount trans = Transaction(users_ID=users_ID, TransactionNumber=TransactionNumber, RentDate=RentDate, DueDate=DueDate, MovieTitle=MovieTitle, Payment_Method=payment,Amount="R"+str(bill),dvdID=dvdID) trans.save() return redirect('/clerk') def checkin(request): dvdID= request.POST['dvdID'] DVD.objects.filter(id=dvdID).update(BookingPickup='None',InStock=True,NumDaysBooked=0) return redirect('/clerk') def deleteMovie(request): dvdID= request.POST['dvdID'] DVD.objects.filter(id=dvdID).delete() return redirect('/clerk') def deleteTransaction(request): transID= request.POST['transID'] Transaction.objects.filter(id=transID).delete() return redirect('/transactions') def deleteUser(request): userID= request.POST['userID'] User.objects.filter(id=userID).delete() return redirect('/userstbl')
0c68c77ef939049bed031efdf45c216db9610edd
711756b796d68035dc6a39060515200d1d37a274
/output_cog/optimized_36890.py
73834950ff39fa5355e42875299c9eccc14f854b
[]
no_license
batxes/exocyst_scripts
8b109c279c93dd68c1d55ed64ad3cca93e3c95ca
a6c487d5053b9b67db22c59865e4ef2417e53030
refs/heads/master
2020-06-16T20:16:24.840725
2016-11-30T16:23:16
2016-11-30T16:23:16
75,075,164
0
0
null
null
null
null
UTF-8
Python
false
false
10,832
py
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_sets={} surf_sets={} if "Cog2_GFPN" not in marker_sets: s=new_marker_set('Cog2_GFPN') marker_sets["Cog2_GFPN"]=s s= marker_sets["Cog2_GFPN"] mark=s.place_marker((493.911, 488.674, 431.968), (0.89, 0.1, 0.1), 18.4716) if "Cog2_0" not in marker_sets: s=new_marker_set('Cog2_0') marker_sets["Cog2_0"]=s s= marker_sets["Cog2_0"] mark=s.place_marker((473.34, 456.583, 376.436), (0.89, 0.1, 0.1), 17.1475) if "Cog2_1" not in marker_sets: s=new_marker_set('Cog2_1') marker_sets["Cog2_1"]=s s= marker_sets["Cog2_1"] mark=s.place_marker((447.63, 429.989, 302.819), (0.89, 0.1, 0.1), 17.1475) if "Cog2_GFPC" not in marker_sets: s=new_marker_set('Cog2_GFPC') marker_sets["Cog2_GFPC"]=s s= marker_sets["Cog2_GFPC"] mark=s.place_marker((511.721, 553.784, 312.087), (0.89, 0.1, 0.1), 18.4716) if "Cog2_Anch" not in marker_sets: s=new_marker_set('Cog2_Anch') marker_sets["Cog2_Anch"]=s s= marker_sets["Cog2_Anch"] mark=s.place_marker((370.467, 331.485, 153.352), (0.89, 0.1, 0.1), 18.4716) if "Cog3_GFPN" not in marker_sets: s=new_marker_set('Cog3_GFPN') marker_sets["Cog3_GFPN"]=s s= marker_sets["Cog3_GFPN"] mark=s.place_marker((470.44, 472.737, 395.274), (1, 1, 0), 18.4716) if "Cog3_0" not in marker_sets: s=new_marker_set('Cog3_0') marker_sets["Cog3_0"]=s s= marker_sets["Cog3_0"] mark=s.place_marker((470.176, 473.601, 396.783), (1, 1, 0.2), 17.1475) if "Cog3_1" not in marker_sets: s=new_marker_set('Cog3_1') marker_sets["Cog3_1"]=s s= marker_sets["Cog3_1"] mark=s.place_marker((481.075, 497.868, 404.518), (1, 1, 0.2), 17.1475) if "Cog3_2" not in marker_sets: s=new_marker_set('Cog3_2') marker_sets["Cog3_2"]=s s= marker_sets["Cog3_2"] mark=s.place_marker((468.826, 522.513, 400.158), (1, 1, 0.2), 17.1475) if "Cog3_3" not in marker_sets: s=new_marker_set('Cog3_3') marker_sets["Cog3_3"]=s s= marker_sets["Cog3_3"] mark=s.place_marker((445.077, 535.056, 392.143), (1, 1, 0.2), 17.1475) if "Cog3_4" not in marker_sets: s=new_marker_set('Cog3_4') marker_sets["Cog3_4"]=s s= marker_sets["Cog3_4"] mark=s.place_marker((421.388, 526.13, 404.123), (1, 1, 0.2), 17.1475) if "Cog3_5" not in marker_sets: s=new_marker_set('Cog3_5') marker_sets["Cog3_5"]=s s= marker_sets["Cog3_5"] mark=s.place_marker((397.015, 526.174, 417.712), (1, 1, 0.2), 17.1475) if "Cog3_GFPC" not in marker_sets: s=new_marker_set('Cog3_GFPC') marker_sets["Cog3_GFPC"]=s s= marker_sets["Cog3_GFPC"] mark=s.place_marker((486.38, 466.908, 418.183), (1, 1, 0.4), 18.4716) if "Cog3_Anch" not in marker_sets: s=new_marker_set('Cog3_Anch') marker_sets["Cog3_Anch"]=s s= marker_sets["Cog3_Anch"] mark=s.place_marker((305.393, 579.582, 418.162), (1, 1, 0.4), 18.4716) if "Cog4_GFPN" not in marker_sets: s=new_marker_set('Cog4_GFPN') marker_sets["Cog4_GFPN"]=s s= marker_sets["Cog4_GFPN"] mark=s.place_marker((280.558, 440.831, 273.306), (0, 0, 0.8), 18.4716) if "Cog4_0" not in marker_sets: s=new_marker_set('Cog4_0') marker_sets["Cog4_0"]=s s= marker_sets["Cog4_0"] mark=s.place_marker((280.558, 440.831, 273.306), (0, 0, 0.8), 17.1475) if "Cog4_1" not in marker_sets: s=new_marker_set('Cog4_1') marker_sets["Cog4_1"]=s s= marker_sets["Cog4_1"] mark=s.place_marker((299.247, 443.399, 294.253), (0, 0, 0.8), 17.1475) if "Cog4_2" not in marker_sets: s=new_marker_set('Cog4_2') marker_sets["Cog4_2"]=s s= marker_sets["Cog4_2"] mark=s.place_marker((321.132, 444.056, 311.816), (0, 0, 0.8), 17.1475) if "Cog4_3" not in marker_sets: s=new_marker_set('Cog4_3') marker_sets["Cog4_3"]=s s= marker_sets["Cog4_3"] mark=s.place_marker((339.265, 438.475, 332.51), (0, 0, 0.8), 17.1475) if "Cog4_4" not in marker_sets: s=new_marker_set('Cog4_4') marker_sets["Cog4_4"]=s s= marker_sets["Cog4_4"] mark=s.place_marker((364.448, 434.49, 344.784), (0, 0, 0.8), 17.1475) if "Cog4_5" not in marker_sets: s=new_marker_set('Cog4_5') marker_sets["Cog4_5"]=s s= marker_sets["Cog4_5"] mark=s.place_marker((390.08, 434.602, 357.366), (0, 0, 0.8), 17.1475) if "Cog4_6" not in marker_sets: s=new_marker_set('Cog4_6') marker_sets["Cog4_6"]=s s= marker_sets["Cog4_6"] mark=s.place_marker((416.903, 440.556, 365.325), (0, 0, 0.8), 17.1475) if "Cog4_GFPC" not in marker_sets: s=new_marker_set('Cog4_GFPC') marker_sets["Cog4_GFPC"]=s s= marker_sets["Cog4_GFPC"] mark=s.place_marker((214.743, 581.915, 287.281), (0, 0, 0.8), 18.4716) if "Cog4_Anch" not in marker_sets: s=new_marker_set('Cog4_Anch') marker_sets["Cog4_Anch"]=s s= marker_sets["Cog4_Anch"] mark=s.place_marker((628.359, 312.906, 444.516), (0, 0, 0.8), 18.4716) if "Cog5_GFPN" not in marker_sets: s=new_marker_set('Cog5_GFPN') marker_sets["Cog5_GFPN"]=s s= marker_sets["Cog5_GFPN"] mark=s.place_marker((426.157, 410.539, 339.96), (0.3, 0.3, 0.3), 18.4716) if "Cog5_0" not in marker_sets: s=new_marker_set('Cog5_0') marker_sets["Cog5_0"]=s s= marker_sets["Cog5_0"] mark=s.place_marker((426.157, 410.539, 339.96), (0.3, 0.3, 0.3), 17.1475) if "Cog5_1" not in marker_sets: s=new_marker_set('Cog5_1') marker_sets["Cog5_1"]=s s= marker_sets["Cog5_1"] mark=s.place_marker((439.527, 435.346, 335.155), (0.3, 0.3, 0.3), 17.1475) if "Cog5_2" not in marker_sets: s=new_marker_set('Cog5_2') marker_sets["Cog5_2"]=s s= marker_sets["Cog5_2"] mark=s.place_marker((448.662, 458.466, 320.231), (0.3, 0.3, 0.3), 17.1475) if "Cog5_3" not in marker_sets: s=new_marker_set('Cog5_3') marker_sets["Cog5_3"]=s s= marker_sets["Cog5_3"] mark=s.place_marker((463.132, 459.496, 295.394), (0.3, 0.3, 0.3), 17.1475) if "Cog5_GFPC" not in marker_sets: s=new_marker_set('Cog5_GFPC') marker_sets["Cog5_GFPC"]=s s= marker_sets["Cog5_GFPC"] mark=s.place_marker((527.358, 512.25, 390.319), (0.3, 0.3, 0.3), 18.4716) if "Cog5_Anch" not in marker_sets: s=new_marker_set('Cog5_Anch') marker_sets["Cog5_Anch"]=s s= marker_sets["Cog5_Anch"] mark=s.place_marker((411.601, 402.62, 198.132), (0.3, 0.3, 0.3), 18.4716) if "Cog6_GFPN" not in marker_sets: s=new_marker_set('Cog6_GFPN') marker_sets["Cog6_GFPN"]=s s= marker_sets["Cog6_GFPN"] mark=s.place_marker((490.734, 478.286, 371.063), (0.21, 0.49, 0.72), 18.4716) if "Cog6_0" not in marker_sets: s=new_marker_set('Cog6_0') marker_sets["Cog6_0"]=s s= marker_sets["Cog6_0"] mark=s.place_marker((490.866, 478.436, 371), (0.21, 0.49, 0.72), 17.1475) if "Cog6_1" not in marker_sets: s=new_marker_set('Cog6_1') marker_sets["Cog6_1"]=s s= marker_sets["Cog6_1"] mark=s.place_marker((467.419, 491.104, 362.923), (0.21, 0.49, 0.72), 17.1475) if "Cog6_2" not in marker_sets: s=new_marker_set('Cog6_2') marker_sets["Cog6_2"]=s s= marker_sets["Cog6_2"] mark=s.place_marker((446.686, 495.689, 380.425), (0.21, 0.49, 0.72), 17.1475) if "Cog6_3" not in marker_sets: s=new_marker_set('Cog6_3') marker_sets["Cog6_3"]=s s= marker_sets["Cog6_3"] mark=s.place_marker((444.647, 497.497, 408.435), (0.21, 0.49, 0.72), 17.1475) if "Cog6_4" not in marker_sets: s=new_marker_set('Cog6_4') marker_sets["Cog6_4"]=s s= marker_sets["Cog6_4"] mark=s.place_marker((443.568, 506.021, 435.29), (0.21, 0.49, 0.72), 17.1475) if "Cog6_5" not in marker_sets: s=new_marker_set('Cog6_5') marker_sets["Cog6_5"]=s s= marker_sets["Cog6_5"] mark=s.place_marker((417.614, 498.775, 443.311), (0.21, 0.49, 0.72), 17.1475) if "Cog6_6" not in marker_sets: s=new_marker_set('Cog6_6') marker_sets["Cog6_6"]=s s= marker_sets["Cog6_6"] mark=s.place_marker((392.182, 496.569, 431.426), (0.21, 0.49, 0.72), 17.1475) if "Cog6_GFPC" not in marker_sets: s=new_marker_set('Cog6_GFPC') marker_sets["Cog6_GFPC"]=s s= marker_sets["Cog6_GFPC"] mark=s.place_marker((425.108, 418.691, 419.148), (0.21, 0.49, 0.72), 18.4716) if "Cog6_Anch" not in marker_sets: s=new_marker_set('Cog6_Anch') marker_sets["Cog6_Anch"]=s s= marker_sets["Cog6_Anch"] mark=s.place_marker((361.001, 578.114, 440.176), (0.21, 0.49, 0.72), 18.4716) if "Cog7_GFPN" not in marker_sets: s=new_marker_set('Cog7_GFPN') marker_sets["Cog7_GFPN"]=s s= marker_sets["Cog7_GFPN"] mark=s.place_marker((458.594, 399.335, 393.917), (0.7, 0.7, 0.7), 18.4716) if "Cog7_0" not in marker_sets: s=new_marker_set('Cog7_0') marker_sets["Cog7_0"]=s s= marker_sets["Cog7_0"] mark=s.place_marker((463.289, 414.592, 376.991), (0.7, 0.7, 0.7), 17.1475) if "Cog7_1" not in marker_sets: s=new_marker_set('Cog7_1') marker_sets["Cog7_1"]=s s= marker_sets["Cog7_1"] mark=s.place_marker((476.751, 451.064, 337.979), (0.7, 0.7, 0.7), 17.1475) if "Cog7_2" not in marker_sets: s=new_marker_set('Cog7_2') marker_sets["Cog7_2"]=s s= marker_sets["Cog7_2"] mark=s.place_marker((492.105, 489.138, 293.199), (0.7, 0.7, 0.7), 17.1475) if "Cog7_GFPC" not in marker_sets: s=new_marker_set('Cog7_GFPC') marker_sets["Cog7_GFPC"]=s s= marker_sets["Cog7_GFPC"] mark=s.place_marker((560.619, 500.107, 336.636), (0.7, 0.7, 0.7), 18.4716) if "Cog7_Anch" not in marker_sets: s=new_marker_set('Cog7_Anch') marker_sets["Cog7_Anch"]=s s= marker_sets["Cog7_Anch"] mark=s.place_marker((464.39, 530.715, 199.96), (0.7, 0.7, 0.7), 18.4716) if "Cog8_0" not in marker_sets: s=new_marker_set('Cog8_0') marker_sets["Cog8_0"]=s s= marker_sets["Cog8_0"] mark=s.place_marker((445.736, 526.6, 339.041), (1, 0.5, 0), 17.1475) if "Cog8_1" not in marker_sets: s=new_marker_set('Cog8_1') marker_sets["Cog8_1"]=s s= marker_sets["Cog8_1"] mark=s.place_marker((458.881, 502.348, 332.398), (1, 0.5, 0), 17.1475) if "Cog8_2" not in marker_sets: s=new_marker_set('Cog8_2') marker_sets["Cog8_2"]=s s= marker_sets["Cog8_2"] mark=s.place_marker((477.284, 481.125, 323.87), (1, 0.5, 0), 17.1475) if "Cog8_3" not in marker_sets: s=new_marker_set('Cog8_3') marker_sets["Cog8_3"]=s s= marker_sets["Cog8_3"] mark=s.place_marker((492.257, 458.824, 310.348), (1, 0.5, 0), 17.1475) if "Cog8_4" not in marker_sets: s=new_marker_set('Cog8_4') marker_sets["Cog8_4"]=s s= marker_sets["Cog8_4"] mark=s.place_marker((484.29, 431.22, 302.162), (1, 0.5, 0), 17.1475) if "Cog8_5" not in marker_sets: s=new_marker_set('Cog8_5') marker_sets["Cog8_5"]=s s= marker_sets["Cog8_5"] mark=s.place_marker((483.325, 402.414, 292.57), (1, 0.5, 0), 17.1475) if "Cog8_GFPC" not in marker_sets: s=new_marker_set('Cog8_GFPC') marker_sets["Cog8_GFPC"]=s s= marker_sets["Cog8_GFPC"] mark=s.place_marker((483.226, 433.15, 365.78), (1, 0.6, 0.1), 18.4716) if "Cog8_Anch" not in marker_sets: s=new_marker_set('Cog8_Anch') marker_sets["Cog8_Anch"]=s s= marker_sets["Cog8_Anch"] mark=s.place_marker((483.688, 360.18, 220.403), (1, 0.6, 0.1), 18.4716) for k in surf_sets.keys(): chimera.openModels.add([surf_sets[k]])
055318a7275ecbf68596296f9cb1e45c5239ea9f
c0ce40b948129cd1d293bb024649d103348b30a4
/tkinter_demo2.py
3775dd3054875a5bb3f456f9ead8512748209608
[]
no_license
BrettMcGregor/udemy-python-tim
ee6dc2882b57cd05f9df433459917e2ae6f05cd1
fd4e3368987740491a802cab7ce469db5b528505
refs/heads/master
2020-03-11T17:05:38.268836
2018-07-11T23:11:04
2018-07-11T23:11:04
130,137,368
0
0
null
null
null
null
UTF-8
Python
false
false
1,328
py
# this uses the grid configuration import tkinter # print(tkinter.TkVersion) # print(tkinter.TclVersion) # # tkinter._test() main_window = tkinter.Tk() main_window.title("Country Destroyer") main_window.geometry("640x480+8+200") label = tkinter.Label(main_window, text="Choose a country to destroy.\n(Important: Cannot be undone)") label.grid(row=0, column=0) left_frame = tkinter.Frame(main_window) left_frame.grid(row=1, column=1) canvas = tkinter.Canvas(left_frame, relief="raised", borderwidth=1) canvas.grid(row=1, column=0) right_frame = tkinter.Frame(main_window) right_frame.grid(row=1, column=2, sticky="n") button1 = tkinter.Button(right_frame, text="Iran") button2 = tkinter.Button(right_frame, text="Russia") button3 = tkinter.Button(right_frame, text="Syria") button1.grid(row=0, column=0) button2.grid(row=1, column=0) button3.grid(row=2, column=0) # configure columns main_window.columnconfigure(0, weight=1) main_window.columnconfigure(1, weight=1) main_window.grid_columnconfigure(2, weight=1) left_frame.config(relief="sunken", borderwidth=1) right_frame.config(relief="sunken", borderwidth=1) left_frame.grid(sticky="ns") right_frame.grid(sticky="new") right_frame.columnconfigure(0, weight=1) button1.grid(sticky="ew") button2.grid(sticky="ew") button3.grid(sticky="ew") main_window.mainloop()
682e8bc78b5df1311583a636f8d185ddbcf42c35
a33a1490b1b344f603e347e7f2db2daab5a23d32
/components/app_outputs/chain_flow_assembler/system_definition.py
3ea53efff4ee2d2136f036878e91f878fba07eb4
[ "MIT" ]
permissive
glenn-edgar/esp32_gateway
16fabe8c4e937d9d98ca825ad28275b1c3ede6a7
5dc4a65eeb2226b6a6529c91a5491df7080b853f
refs/heads/master
2020-03-26T12:10:03.555424
2019-02-21T22:54:39
2019-02-21T22:54:39
144,878,278
0
0
null
null
null
null
UTF-8
Python
false
false
982
py
from helper_functions import Helper_Functions from assembler import CF_Assembler cf = CF_Assembler() hf = Helper_Functions( cf ) cf.define_chain("initialization",True) hf.one_step("analog_output_store_cf_handle_ref") hf.one_step("analog_output_subscribe_configuration") hf.one_step("analog_output_subscribe_output") hf.one_step("analog_output_subscribe_pulse_output") hf.one_step("add_watch_dog") hf.wait( "wait_for_mqtt_connect" ) hf.enable_chain( "pulse_task") hf.terminate() #initialization is done now disable the chain cf.end_chain() #These chains are for actions every second cf.define_chain("feed_watch_dog", True ) hf.wait_event("CF_SECOND_TICK") hf.one_step("pat_watch_dog") hf.reset() cf.end_chain() cf.define_chain("pulse_task",False) hf.wait_event("CF_PULSE_EVENT") hf.one_step("analog_output_set_initial_value") hf.wait("analog_output_step_timer") hf.one_step("analog_output_set_final_value") hf.reset() cf.end_chain() cf.generate_c_header()
8d73df9c54e5b8fc70e96d319792bc44f407983d
7d117771094a24bc411ec8d5a7b8525a5b85b018
/ninfo_plugins/google_safebrowsing/google_safebrowsing_plugin.py
fdf9a34ee3d85a5cecf0a8b3fc774763ca184c82
[]
no_license
kraigu/ninfo_plugins
18ca1be940101a5d5f863320c53a0cd7cc80efce
746cc48567036337763e888f913f3a4321f166d3
refs/heads/master
2021-01-18T06:36:08.108586
2013-09-19T16:06:25
2013-09-19T16:06:25
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,107
py
import urllib import requests from ninfo import PluginBase class SafeBrowsing(PluginBase): """This plugin looks up the address using the google safe browsing API""" name = 'google_safebrowsing' title = 'Google Safe Browsing' description = 'Google Safe Browsing check' cache_timeout = 60*60 types = ['ip','ip6','hostname'] local = False def setup(self): api_key = self.plugin_config['api_key'] self.base_url = "https://sb-ssl.google.com/safebrowsing/api/lookup?client=ninfo&apikey=%s&appver=1.5.2&pver=3.0" % api_key def get_info(self, arg): url = self.base_url + "&url=" + urllib.quote(arg) resp = requests.get(url) if resp.status_code == 204: return {} status = resp.text return { 'status': status} def render_template(self, output_type, arg, result): if not result: return '' if output_type == 'text': return result['status'] else: return '<pre>%s</pre>' % result['status'] plugin_class = SafeBrowsing
7625a230d83e667833e77845ff3774f296eff5a9
08607218396a0269a90e8b4e6d099a5e99e39a8b
/database/schemes/520/script/testCase/U商城项目/U商城管理端/商城设置/邮件配置/邮件配置.py
ab4610a6db1d39606a04c5f3d9dbf57d04b89f88
[ "MIT" ]
permissive
TonnaMajesty/test
4a07297557669f98eeb9f94b177a02a4af6f1af0
68b24d1f3e8b4d6154c9d896a7fa3e2f99b49a6f
refs/heads/master
2021-01-19T22:52:18.309061
2017-03-06T10:51:05
2017-03-06T10:51:05
83,779,681
1
0
null
null
null
null
UTF-8
Python
false
false
2,084
py
# coding=utf-8 from time import sleep from SRC.common import utils_user from SRC.common.decorator import codeException_dec from SRC.common.utils_user import randomStr from SRC.unittest.case import TestCase from script.common import utils class EasyCase(TestCase): def __init__(self, webDriver, paramsList): # 请不要修改该方法 super(EasyCase, self).__init__(webDriver, paramsList) @codeException_dec('3') def runTest(self): driver = self.getDriver() param = self.param tool = utils_user driver.get('http://upmalldemo.yonyouup.com/corp/') driver.find_element_by_css_selector('body > div.container.corp-page.ng-scope > div > div.col-xs-2.corp-mune.noprint > ul:nth-child(8) > li.title.pointer').click() # 点击商城设置 driver.find_element_by_css_selector('body > div.container.corp-page.ng-scope > div > div.col-xs-2.corp-mune.noprint > ul:nth-child(8) > li:nth-child(5) > a').click() # 点击邮件配置 driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div[2]/form/div[1]/div/input').clear() AA='.'.join([randomStr(2) for _ in range(4)]) driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div[2]/form/div[1]/div/input').send_keys(AA) # 输入服务器地址 driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div[2]/form/div[2]/div/input').clear() driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div[2]/form/div[2]/div/input').send_keys(u'25') # 输入服务器端口 driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div[2]/form/div[3]/div/input').clear() driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div[2]/form/div[3]/div/input').send_keys(u'[email protected]') # 输入发件人邮箱 driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div[2]/form/div[4]/div/input').clear() driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div[2]/form/div[4]/div/input').send_keys(u'123456') driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div[2]/form/div[6]/div/button[2]').click() # 点击保存 sleep(3)
8938317598a9a86283eea78906a657c88997f08b
5c0da13908588a0c6a7e8a5754e28d9d52acaa5c
/apps/recurring_donations/management/commands/process_monthly_donations.py
d108ede2ad6d65768e75d276275da05c172e0a17
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
onepercentclub/onepercentclub-site
27e7ddc8b9c0f54a96a948f9628bf66d568aaa4e
a161fcde077e2d68da0c0682d6013c899ba9ba9f
refs/heads/master
2020-04-20T12:00:12.928969
2015-03-17T14:30:46
2015-03-17T14:30:46
4,778,930
7
0
null
2015-03-25T16:22:57
2012-06-25T07:16:50
Python
UTF-8
Python
false
false
14,819
py
from decimal import Decimal import math import logging from collections import namedtuple from optparse import make_option from bluebottle.payments.exception import PaymentException from bluebottle.payments.models import OrderPayment from bluebottle.payments_docdata.exceptions import DocdataPaymentException from apps.recurring_donations.models import MonthlyProject from bluebottle.bb_projects.models import ProjectPhase from bluebottle.utils.model_dispatcher import get_donation_model, get_order_model, get_project_model from bluebottle.utils.utils import StatusDefinition from django.utils.timezone import now from django.core.management.base import BaseCommand from django.utils import timezone from bluebottle.payments.services import PaymentService from ...models import MonthlyDonor, MonthlyDonation, MonthlyOrder, MonthlyBatch from ...mails import mail_monthly_donation_processed_notification DONATION_MODEL = get_donation_model() ORDER_MODEL = get_order_model() PROJECT_MODEL = get_project_model() logger = logging.getLogger(__name__) # # First step: # ./manage.py process_monthly_donations --prepare # ./manage.py process_monthly_donations --process # # ./manage.py process_monthly_donations --process-single [email protected] # class Command(BaseCommand): help = 'Process monthly donations.' requires_model_validation = True verbosity_loglevel = { '0': logging.ERROR, # 0 means no output. '1': logging.WARNING, # 1 means normal output (default). '2': logging.INFO, # 2 means verbose output. '3': logging.DEBUG # 3 means very verbose output. } option_list = BaseCommand.option_list + ( make_option('--no-email', action='store_true', dest='no_email', default=False, help="Don't send the monthly donation email to users (when processing)."), make_option('--prepare', action='store_true', dest='prepare', default=False, help="Prepare the monthly donations and create records that can be processed later."), make_option('--process', action='store_true', dest='process', default=False, help="Process the prepared records."), make_option('--process-single', action='store', dest='process_single', default=False, metavar='<[email protected]>', type='str', help="Process only the MonthlyOrder for specified e-mail address."), ) def handle(self, *args, **options): # Setup the log level for root logger. loglevel = self.verbosity_loglevel.get(options['verbosity']) logger.setLevel(loglevel) send_email = not options['no_email'] if options['prepare']: prepare_monthly_donations() if options['process']: process_monthly_batch(None, send_email) if options['process_single']: process_single_monthly_order(options['process_single'], None, send_email) def create_recurring_order(user, projects, batch, donor): """ Creates a recurring Order with donations to the supplied projects. """ project_amount = Decimal(math.floor(donor.amount * 100 / len(projects))) / 100 order = MonthlyOrder.objects.create(user=user, batch=batch, amount=donor.amount, name=donor.name, city=donor.city, iban=donor.iban, bic=donor.bic, country=donor.country.alpha2_code) order.save() rest_amount = donor.amount - project_amount * len(projects) for p in projects: project = PROJECT_MODEL.objects.get(id=p.id) don = MonthlyDonation.objects.create(user=user, project=project, amount=project_amount, order=order) don.save() # Update amount for last donation to make sure donation total == donor amount don.amount += rest_amount don.save() return order def prepare_monthly_donations(): """ Prepare MonthlyOrders. """ ten_days_ago = timezone.now() + timezone.timedelta(days=-10) recent_batches = MonthlyBatch.objects.filter(date__gt=ten_days_ago) if recent_batches.count() > 0: recent_batch = recent_batches.all()[0] message = "Found a recent batch {0} : {1}. Refusing to create another one quite now.".format(recent_batch.id, recent_batch) logger.error(message) return batch = MonthlyBatch.objects.create(date=now()) batch.save() top_three_donation = False donor_queryset = MonthlyDonor.objects.filter(active=True).order_by('user__email') recurring_donation_errors = [] RecurringDonationError = namedtuple('RecurringDonationError', 'recurring_payment error_message') skipped_recurring_payments = [] SkippedRecurringPayment = namedtuple('SkippedRecurringPayment', 'recurring_payment orders') donation_count = 0 popular_projects_all = PROJECT_MODEL.objects.exclude(skip_monthly=True, amount_needed=0).filter(status=ProjectPhase.objects.get(slug="campaign")).order_by('-popularity') top_three_projects = list(popular_projects_all[:3]) top_projects = list(popular_projects_all[3:]) logger.info("Config: Using these projects as 'Top Three':") for project in top_three_projects: logger.info(" {0}".format(project.title.encode("utf8"))) # The main loop that processes each monthly donation. for donor in donor_queryset: # Remove DonorProjects for Projects that no longer need money. # This is amount_needed from db minus the amount already appointed in previous MonthlyDonations for donor_project in donor.projects.all(): if donor_project.project.status != ProjectPhase.objects.get(slug="campaign"): logger.info(u"Project not in Campaign phase. Skipping '{0}'".format(donor_project.project.title)) donor_project.delete() elif donor_project.project.amount_needed <= 0: logger.info(u"Project already funded. Skipping '{0}'".format(donor_project.project.title)) donor_project.delete() else: monthly_project, created = MonthlyProject.objects.get_or_create(batch=batch, project=donor_project.project) if donor_project.project.amount_needed - monthly_project.amount <= 0: logger.info(u"Project already funded. Skipping '{0}'".format(donor_project.project.title)) donor_project.delete() # Remove Projects from top 3 for project in top_three_projects: monthly_project, created = MonthlyProject.objects.get_or_create(batch=batch, project=project) if project.amount_needed - monthly_project.amount <= 0: # Remove project if it's doesn't need more many and add another from top_projects logger.info(u"Top3 project fully funded. Skipping '{0}'".format(project.title)) top_three_projects.remove(project) new_project = top_projects.pop(0) logger.info(u"New Top3 project added '{0}'".format(new_project.title)) top_three_projects.append(new_project) # Check if the donor object is valid if not donor.is_valid: error_message = "MonthlyDonor [{0}] invalid! IBAN/BIC missing or amount wrong.".format(donor.id) logger.error(error_message) recurring_donation_errors.append(RecurringDonationError(donor, error_message)) continue # Create MonthlyOrder and MonthlyDonation objects if donor.projects.count(): # Prepare a MonthlyOrder with preferred projects preferred_projects = [] for project in donor.projects.all(): preferred_projects.append(project.project) recurring_order = create_recurring_order(donor.user, preferred_projects, batch, donor) logger.debug("Preparing an Order with preferred projects for user: {0}.".format(donor.user)) else: # Prepare MonthlyOrder with Donations for the top three projects. logger.debug("Preparing new 'Top Three' Order for user {0}.".format(donor.user)) recurring_order = create_recurring_order(donor.user, top_three_projects, batch, donor) top_three_donation = True # Update amounts for projects for donation in recurring_order.donations.all(): monthly_project, created = MonthlyProject.objects.get_or_create(batch=batch, project=donation.project) monthly_project.amount += donation.amount monthly_project.save() # At this point the order should be correctly setup and ready for the DocData payment. if top_three_donation: donation_type_message = "supporting the 'Top Three' projects" else: donation_type_message = "with {0} donations".format(recurring_order.donations.count()) logger.info("Starting payment for '{0}' {1}.".format(donor, donation_type_message)) # Safety check to ensure the modifications to the donations in the recurring result in an Order total that # matches the RecurringDirectDebitPayment. if donor.amount != Decimal(recurring_order.amount): error_message = "Monthly donation amount: {0} does not equal recurring Order amount: {1} for '{2}'. Not processing this recurring donation.".format( donor.amount, recurring_order.amount, donor) logger.error(error_message) recurring_donation_errors.append(RecurringDonationError(donor, error_message)) continue logger.info("") logger.info("Recurring Donation Preparing Summary") logger.info("=====================================") logger.info("") logger.info("Total number of recurring donations: {0}".format(donor_queryset.count())) logger.info("Number of recurring Orders successfully processed: {0}".format(donation_count)) logger.info("Number of errors: {0}".format(len(recurring_donation_errors))) logger.info("Number of skipped payments: {0}".format(len(skipped_recurring_payments))) if len(recurring_donation_errors) > 0: logger.info("") logger.info("") logger.info("Detailed Error List") logger.info("===================") logger.info("") for error in recurring_donation_errors: logger.info("RecurringDirectDebitPayment: {0} {1}".format(error.recurring_payment.id, error.recurring_payment)) logger.info("Error: {0}".format(error.error_message)) logger.info("--") if len(skipped_recurring_payments) > 0: logger.info("") logger.info("") logger.info("Skipped Recurring Payments") logger.info("==========================") logger.info("") for skipped_payment in skipped_recurring_payments: logger.info("RecurringDirectDebitPayment: {0} {1}".format(skipped_payment.recurring_payment.id, skipped_payment.recurring_payment)) for closed_order in skipped_payment.orders: logger.info("Order Number: {0}".format(closed_order.id)) logger.info("--") def _process_monthly_order(monthly_order, send_email=False): if monthly_order.processed: logger.info("Order for {0} already processed".format(monthly_order.user)) return False ten_days_ago = timezone.now() + timezone.timedelta(days=-10) recent_orders = ORDER_MODEL.objects.filter(user=monthly_order.user, order_type='recurring', updated__gt=ten_days_ago) if recent_orders.count() > 0: message = "Skipping '{0}' recently processed a recurring order for {1}:".format(monthly_order, monthly_order.user) logger.warn(message) for closed_order in recent_orders.all(): logger.warn("Recent Order Number: {0}".format(closed_order.id)) # Set an error on this monthly order monthly_order.error = message monthly_order.save() return False order = ORDER_MODEL.objects.create(status=StatusDefinition.LOCKED, user=monthly_order.user, order_type='recurring') order.save() logger.info("Creating Order for {0} with {1} donations".format(monthly_order.user, monthly_order.donations.count())) for monthly_donation in monthly_order.donations.all(): donation = DONATION_MODEL.objects.create(amount=monthly_donation.amount, user=monthly_donation.user, project=monthly_donation.project, order=order) donation.save() integration_data = {'account_name': monthly_order.name, 'account_city': monthly_order.city, 'iban': monthly_order.iban, 'bic' :monthly_order.bic, 'agree': True} order_payment = OrderPayment(order=order, user=monthly_order.user, payment_method='docdataDirectdebit', integration_data=integration_data) order_payment.save() try: service = PaymentService(order_payment) service.start_payment() except PaymentException as e: order_payment.delete() order.delete() error_message = "Problem starting payment. {0}".format(e) monthly_order.error = "{0}".format(e.message) monthly_order.save() logger.error(error_message) return False logger.debug("Payment for '{0}' started.".format(monthly_order)) monthly_order.processed = True monthly_order.error = '' monthly_order.save() # Try to update status service.check_payment_status() # Send an email to the user. if send_email: mail_monthly_donation_processed_notification(monthly_order) return True def process_single_monthly_order(email, batch=None, send_email=False): if not batch: logger.info("No batch found using latest...") batch = MonthlyBatch.objects.order_by('-date', '-created').all()[0] monthly_orders = batch.orders.filter(user__email=email) if monthly_orders.count() > 1: logger.error("Found multiple MonthlyOrders for {0}.".format(email)) elif monthly_orders.count() == 1: monthly_order = monthly_orders.get() payment = _process_monthly_order(monthly_order, send_email) else: logger.error("No MonthlyOrder found for {0} in Batch {1}.".format(email, batch)) def process_monthly_batch(batch=None, send_email=False): """ Process the prepared monthly orders. This will create the actual payments. """ if not batch: logger.info("No batch found using latest...") batch = MonthlyBatch.objects.order_by('-date', '-created').all()[0] for monthly_order in batch.orders.all(): _process_monthly_order(monthly_order, send_email)
e1d98d6303c4964aecf927dceb1b4efdad956332
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p02829/s182547958.py
e9f2cdfe35070d04b02f5d46d9e660927e631f64
[]
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
92
py
a = int(input()) b = int(input()) l = {1, 2, 3} m = {a, b} ans = list(l ^ m) print(ans[0])
79bbfeded34d7846b0dbd38c449856cccf9fbf93
5ec7d0bad8a77c79843a2813f5effcb3a2b7e288
/tests/test_main.py
ffea5974434e9311dd3cf5d9a101028cc1cd9e96
[ "Apache-2.0" ]
permissive
xdpknx/lean-cli
aca9b9c9c4e156c9faefcfa8ccdfc20423b510a0
c1051bd3e8851ae96f6e84f608a7116b1689c9e9
refs/heads/master
2023-08-08T02:30:09.827647
2021-09-21T21:36:24
2021-09-21T21:36:24
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,387
py
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean CLI v1.0. Copyright 2021 QuantConnect Corporation. # # 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 click.testing import CliRunner from lean.commands import lean def test_lean_shows_help_when_called_without_arguments() -> None: result = CliRunner().invoke(lean, []) assert result.exit_code == 0 assert "Usage: lean [OPTIONS] COMMAND [ARGS]..." in result.output def test_lean_shows_help_when_called_with_help_option() -> None: result = CliRunner().invoke(lean, ["--help"]) assert result.exit_code == 0 assert "Usage: lean [OPTIONS] COMMAND [ARGS]..." in result.output def test_lean_shows_error_when_running_unknown_command() -> None: result = CliRunner().invoke(lean, ["this-command-does-not-exist"]) assert result.exit_code != 0 assert "No such command" in result.output
50dff405b181b454abda8be27a8b50fe2ebcce82
c67831f476cb530fc0c26e0bf4258ce18e986749
/module_index/tests.py
d40565133c9787f282d39d67ff2417b2a4fb2303
[ "MIT" ]
permissive
cz-qq/bk-chatbot
a3ce4b86452b3de0ff35430c1c85b91d6b23a3e6
da37fb2197142eae32158cdb5c2b658100133fff
refs/heads/master
2023-06-05T05:48:22.083008
2021-06-15T10:21:30
2021-06-15T10:21:30
null
0
0
null
null
null
null
UTF-8
Python
false
false
757
py
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaSCommunity Edition) available. Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://opensource.org/licenses/MIT 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. """
d3fc93d85d759bbc1e89ac327877028c9aa3baa8
20496ecc073d3830994e0bbcfcbf13b3c2621de2
/doc/beacon-2011/week7/scope-2.py
dbebdf5cda727595a929e6e15d51e6950831abab
[ "CC0-1.0" ]
permissive
ctb/edda
eace66170133257fb70159069bf9a181b9aa8f6b
52b35867d0d2b18a464071c31488cff962c64612
refs/heads/master
2020-05-30T14:41:11.990779
2013-09-24T02:50:54
2013-09-24T02:50:54
680,852
1
11
null
null
null
null
UTF-8
Python
false
false
39
py
a = 5 def f(): print a a = 7 f()
072ad3bba17592aa2916cb1ee06e7e4366f0d1fb
5c7da7dabdc076ad7113ccd20561a8bbf5f9a70e
/platforms/migrations/0067_platformnames_fee_owner.py
2fa176863442ed5c10e75d08a2ca64160573d7a4
[]
no_license
aqcloudacio/cloudaciofeez
2499fb5fc5334fa871daab2abea6c34bfa8c7667
8399560ece9aa10a6d6801f42c027dca26a65936
refs/heads/master
2023-02-27T22:36:20.501159
2021-02-11T00:03:46
2021-02-11T00:03:46
337,887,413
0
0
null
null
null
null
UTF-8
Python
false
false
542
py
# Generated by Django 2.2.7 on 2020-12-10 04:08 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('platforms', '0066_auto_20201208_1532'), ] operations = [ migrations.AddField( model_name='platformnames', name='fee_owner', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='fee_copiers', to='platforms.PlatformNames'), ), ]
40a6b22f0119f2967995278c827503b3f3280d70
b76ae361ab277923d0fed969b795074a1ecb400b
/project/python_fullstack/day2/test2.py
38c85418a32188adc436f65248608275c0338291
[]
no_license
RobotNo42/old_coed
995df921e31d5a9b65f1609380235330edb546ad
59f82e5d58965dd5c6340f4daf4ef43d1d311252
refs/heads/master
2021-07-18T00:07:33.450173
2020-06-16T13:51:11
2020-06-16T13:51:11
180,384,457
0
0
null
null
null
null
UTF-8
Python
false
false
90
py
items = ["Macbook", "剃须刀", "cherry", "ps4pro", "switch", "xboxone"] print(id(items))
f0fd341dcb455bd497a306d34aeb64a84913de71
8bb2842aa73676d68a13732b78e3601e1305c4b2
/July LeetCoding Challenge 2021/566.py
c30bd6b11c5ff1581dc588c3d5f8330669d264cd
[]
no_license
Avani18/LeetCode
239fff9c42d2d5703c8c95a0efdc70879ba21b7d
8cd61c4b8159136fb0ade96a1e90bc19b4bd302d
refs/heads/master
2023-08-24T22:25:39.946426
2021-10-10T20:36:07
2021-10-10T20:36:07
264,523,162
0
0
null
null
null
null
UTF-8
Python
false
false
830
py
# Reshape the Matrix class Solution(object): def matrixReshape(self, mat, r, c): """ :type mat: List[List[int]] :type r: int :type c: int :rtype: List[List[int]] """ rows_i = len(mat) cols_i = len(mat[0]) if ((rows_i * cols_i) != (r * c)): return mat # Solution1 # res = [[]*c for _ in range(r)] # nums = [j for sub in mat for j in sub] # cnt = 0 # for i in range(r): # for j in range(c): # res[i].append(nums[cnt]) # cnt += 1 # return res # Solution 2 res = [] nums = [] for i in range(rows_i): nums += mat[i] for i in range(r): res.append(nums[i*c:(i+1)*c]) return res
34ddb517ab73070ec1ffc68b3d04d73e62872135
3b9d763180410bf0abf5b9c37391a64319efe839
/toontown/coghq/CashbotMintPaintMixer_Action00.py
0bfa075dbffebda1a3def8fec4fe276964ae82d7
[]
no_license
qphoton/Reverse_Engineering_Project_ToonTown
442f15d484324be749f6f0e5e4e74fc6436e4e30
11468ab449060169191366bc14ff8113ee3beffb
refs/heads/master
2021-05-08T00:07:09.720166
2017-10-21T02:37:22
2017-10-21T02:37:22
107,617,661
0
1
null
null
null
null
UTF-8
Python
false
false
3,710
py
# File: C (Python 2.4) from toontown.coghq.SpecImports import * GlobalEntities = { 1000: { 'type': 'levelMgr', 'name': 'LevelMgr', 'comment': '', 'parentEntId': 0, 'cogLevel': 0, 'farPlaneDistance': 1500, 'modelFilename': 'phase_10/models/cashbotHQ/ZONE10a', 'wantDoors': 1 }, 1001: { 'type': 'editMgr', 'name': 'EditMgr', 'parentEntId': 0, 'insertEntity': None, 'removeEntity': None, 'requestNewEntity': None, 'requestSave': None }, 0: { 'type': 'zone', 'name': 'UberZone', 'comment': '', 'parentEntId': 0, 'scale': 1, 'description': '', 'visibility': [] }, 10009: { 'type': 'healBarrel', 'name': '<unnamed>', 'comment': '', 'parentEntId': 0, 'pos': Point3(63.974136352499997, -10.934322357199999, 9.9769611358599999), 'hpr': Vec3(270.0, 0.0, 0.0), 'scale': Vec3(1.0, 1.0, 1.0), 'rewardPerGrab': 8, 'rewardPerGrabMax': 0 }, 10010: { 'type': 'healBarrel', 'name': 'copy of <unnamed>', 'comment': '', 'parentEntId': 10009, 'pos': Point3(0.0, 0.0, 4.1399998664900002), 'hpr': Vec3(349.35876464799998, 0.0, 0.0), 'scale': Vec3(1.0, 1.0, 1.0), 'rewardPerGrab': 8, 'rewardPerGrabMax': 0 }, 10000: { 'type': 'nodepath', 'name': 'mixers', 'comment': '', 'parentEntId': 0, 'pos': Point3(-19.239728927600002, 0.0, 5.5399999618500004), 'hpr': Vec3(0.0, 0.0, 0.0), 'scale': Vec3(0.75800174474699999, 0.75800174474699999, 0.75800174474699999) }, 10004: { 'type': 'paintMixer', 'name': 'mixer0', 'comment': '', 'parentEntId': 10000, 'pos': Point3(0.0, 10.0, 0.0), 'hpr': Vec3(0.0, 0.0, 0.0), 'scale': Vec3(1.0, 1.0, 1.0), 'floorName': 'PaintMixerFloorCollision', 'modelPath': 'phase_9/models/cogHQ/PaintMixer', 'modelScale': Vec3(1.0, 1.0, 1.0), 'motion': 'easeInOut', 'offset': Point3(20.0, 20.0, 0.0), 'period': 8.0, 'phaseShift': 0.0, 'shaftScale': 1, 'waitPercent': 0.10000000000000001 }, 10005: { 'type': 'paintMixer', 'name': 'mixer1', 'comment': '', 'parentEntId': 10000, 'pos': Point3(29.0, 10.0, 0.0), 'hpr': Vec3(0.0, 0.0, 0.0), 'scale': Vec3(1.0, 1.0, 1.0), 'floorName': 'PaintMixerFloorCollision', 'modelPath': 'phase_9/models/cogHQ/PaintMixer', 'modelScale': Vec3(1.0, 1.0, 1.0), 'motion': 'easeInOut', 'offset': Point3(0.0, -20.0, 0.0), 'period': 8.0, 'phaseShift': 0.5, 'shaftScale': 1, 'waitPercent': 0.10000000000000001 }, 10006: { 'type': 'paintMixer', 'name': 'mixer2', 'comment': '', 'parentEntId': 10000, 'pos': Point3(58.0, -8.9407224655200004, 0.0), 'hpr': Vec3(0.0, 0.0, 0.0), 'scale': Vec3(1.0, 1.0, 1.0), 'floorName': 'PaintMixerFloorCollision', 'modelPath': 'phase_9/models/cogHQ/PaintMixer', 'modelScale': Vec3(1.0, 1.0, 1.0), 'motion': 'easeInOut', 'offset': Point3(-20.0, -20.0, 0.0), 'period': 8.0, 'phaseShift': 0.5, 'shaftScale': 1, 'waitPercent': 0.10000000000000001 } } Scenario0 = { } levelSpec = { 'globalEntities': GlobalEntities, 'scenarios': [ Scenario0] }
dc308ae03a1692f1bb5d53d761488815310d9758
9f2f386a692a6ddeb7670812d1395a0b0009dad9
/python/paddle/fluid/tests/unittests/test_complex_matmul.py
dac4e36ea673b72b5e420b85829f3e38486777ed
[ "Apache-2.0" ]
permissive
sandyhouse/Paddle
2f866bf1993a036564986e5140e69e77674b8ff5
86e0b07fe7ee6442ccda0aa234bd690a3be2cffa
refs/heads/develop
2023-08-16T22:59:28.165742
2022-06-03T05:23:39
2022-06-03T05:23:39
181,423,712
0
7
Apache-2.0
2022-08-15T08:46:04
2019-04-15T06:15:22
C++
UTF-8
Python
false
false
5,152
py
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import unittest import paddle import numpy as np import paddle.fluid as fluid import paddle.fluid.dygraph as dg from paddle.fluid.framework import _test_eager_guard class TestComplexMatMulLayer(unittest.TestCase): def setUp(self): self._dtypes = ["float32", "float64"] self._places = [fluid.CPUPlace()] if fluid.core.is_compiled_with_cuda(): self._places.append(fluid.CUDAPlace(0)) def compare_by_basic_api(self, x, y, np_result): for place in self._places: with dg.guard(place): x_var = dg.to_variable(x) y_var = dg.to_variable(y) result = paddle.matmul(x_var, y_var) pd_result = result.numpy() self.assertTrue( np.allclose(pd_result, np_result), "\nplace: {}\npaddle diff result:\n {}\nnumpy diff result:\n {}\n". format(place, pd_result[~np.isclose(pd_result, np_result)], np_result[~np.isclose(pd_result, np_result)])) def compare_op_by_basic_api(self, x, y, np_result): for place in self._places: with dg.guard(place): x_var = dg.to_variable(x) y_var = dg.to_variable(y) result = x_var.matmul(y_var) pd_result = result.numpy() self.assertTrue( np.allclose(pd_result, np_result), "\nplace: {}\npaddle diff result:\n {}\nnumpy diff result:\n {}\n". format(place, pd_result[~np.isclose(pd_result, np_result)], np_result[~np.isclose(pd_result, np_result)])) def test_complex_xy(self): for dtype in self._dtypes: x = np.random.random( (2, 3, 4, 5)).astype(dtype) + 1J * np.random.random( (2, 3, 4, 5)).astype(dtype) y = np.random.random( (2, 3, 5, 4)).astype(dtype) + 1J * np.random.random( (2, 3, 5, 4)).astype(dtype) np_result = np.matmul(x, y) self.compare_by_basic_api(x, y, np_result) self.compare_op_by_basic_api(x, y, np_result) def test_complex_x_real_y(self): for dtype in self._dtypes: x = np.random.random( (2, 3, 4, 5)).astype(dtype) + 1J * np.random.random( (2, 3, 4, 5)).astype(dtype) y = np.random.random((2, 3, 5, 4)).astype(dtype) np_result = np.matmul(x, y) # float -> complex type promotion self.compare_by_basic_api(x, y, np_result) self.compare_op_by_basic_api(x, y, np_result) def test_real_x_complex_y(self): for dtype in self._dtypes: x = np.random.random((2, 3, 4, 5)).astype(dtype) y = np.random.random( (2, 3, 5, 4)).astype(dtype) + 1J * np.random.random( (2, 3, 5, 4)).astype(dtype) np_result = np.matmul(x, y) # float -> complex type promotion self.compare_by_basic_api(x, y, np_result) self.compare_op_by_basic_api(x, y, np_result) # for coverage def test_complex_xy_gemv(self): for dtype in self._dtypes: x = np.random.random( (2, 1, 100)).astype(dtype) + 1J * np.random.random( (2, 1, 100)).astype(dtype) y = np.random.random((100)).astype(dtype) + 1J * np.random.random( (100)).astype(dtype) np_result = np.matmul(x, y) self.compare_by_basic_api(x, y, np_result) self.compare_op_by_basic_api(x, y, np_result) # for coverage def test_complex_xy_gemm(self): for dtype in self._dtypes: x = np.random.random( (1, 2, 50)).astype(dtype) + 1J * np.random.random( (1, 2, 50)).astype(dtype) y = np.random.random( (1, 50, 2)).astype(dtype) + 1J * np.random.random( (1, 50, 2)).astype(dtype) np_result = np.matmul(x, y) self.compare_by_basic_api(x, y, np_result) self.compare_op_by_basic_api(x, y, np_result) def test_eager(self): with _test_eager_guard(): self.test_complex_xy_gemm() self.test_complex_xy_gemv() self.test_real_x_complex_y() self.test_complex_x_real_y() self.test_complex_xy() if __name__ == '__main__': unittest.main()
c740d6c49db87e26fd2bd32ca3610d557caa9339
a140fe192fd643ce556fa34bf2f84ddbdb97f091
/quiz/quiz07.py
fadef90d8f86b8e8e71307f16c7b517ae7e108c2
[]
no_license
sangha0719/py-practice
826f13cb422ef43992a69f822b9f04c2cb6d4815
6d71ce64bf91cc3bccee81378577d84ba9d9c121
refs/heads/master
2023-03-13T04:40:55.883279
2021-02-25T12:02:04
2021-02-25T12:02:04
342,230,484
0
0
null
null
null
null
UTF-8
Python
false
false
727
py
# Quiz) 당신의 회사에서는 매주 1회 작성해야 하는 보고서가 있습니다. # 보고서는 항상 아래와 같은 형태로 출력되어야 합니다. # - X 주차 주간보고 - # 부서 : # 이름 : # 업무 요약 : # 1주차부터 50주차까지의 보고서 파일을 만드는 프로그램을 작성하시오. # 조건 : 파일명은 '1주차.txt', '2주차.txt', ... 와 같이 만듭니다. for week in range(1, 51): with open(str(week) + "주차.txt", "w", encoding="utf8") as report_file: report_file.write(" - {0} 주차 주건 보고 -".format(week)) report_file.write("\n부서 : ") report_file.write("\n이름 : ") report_file.write("\n업무 요약 : ")
0313cb3b3f6c0e0748e0a09e563f53002bf83a33
f82757475ea13965581c2147ff57123b361c5d62
/gi-stubs/repository/EDataServer/SourceMailComposition.py
112b63ed9fb30a41dadc200dbe106265439b09db
[]
no_license
ttys3/pygobject-stubs
9b15d1b473db06f47e5ffba5ad0a31d6d1becb57
d0e6e93399212aada4386d2ce80344eb9a31db48
refs/heads/master
2022-09-23T12:58:44.526554
2020-06-06T04:15:00
2020-06-06T04:15:00
269,693,287
8
2
null
2020-06-05T15:57:54
2020-06-05T15:57:54
null
UTF-8
Python
false
false
20,578
py
# encoding: utf-8 # module gi.repository.EDataServer # from /usr/lib64/girepository-1.0/EDataServer-1.2.typelib # by generator 1.147 """ An object which wraps an introspection typelib. This wrapping creates a python module like representation of the typelib using gi repository as a foundation. Accessing attributes of the module will dynamically pull them in and create wrappers for the members. These members are then cached on this introspection module. """ # imports import gi as __gi import gi.overrides.GObject as __gi_overrides_GObject import gi.repository.Gio as __gi_repository_Gio import gi.repository.GObject as __gi_repository_GObject import gi.repository.Soup as __gi_repository_Soup import gobject as __gobject from .SourceExtension import SourceExtension class SourceMailComposition(SourceExtension): """ :Constructors: :: SourceMailComposition(**properties) """ def bind_property(self, *args, **kwargs): # real signature unknown pass def bind_property_full(self, *args, **kargs): # reliably restored by inspect # no doc pass def chain(self, *args, **kwargs): # real signature unknown pass def compat_control(self, *args, **kargs): # reliably restored by inspect # no doc pass def connect(self, *args, **kwargs): # real signature unknown pass def connect_after(self, *args, **kwargs): # real signature unknown pass def connect_data(self, detailed_signal, handler, *data, **kwargs): # reliably restored by inspect """ Connect a callback to the given signal with optional user data. :param str detailed_signal: A detailed signal to connect to. :param callable handler: Callback handler to connect to the signal. :param *data: Variable data which is passed through to the signal handler. :param GObject.ConnectFlags connect_flags: Flags used for connection options. :returns: A signal id which can be used with disconnect. """ pass def connect_object(self, *args, **kwargs): # real signature unknown pass def connect_object_after(self, *args, **kwargs): # real signature unknown pass def disconnect(*args, **kwargs): # reliably restored by inspect """ signal_handler_disconnect(instance:GObject.Object, handler_id:int) """ pass def disconnect_by_func(self, *args, **kwargs): # real signature unknown pass def dup_bcc(self): # real signature unknown; restored from __doc__ """ dup_bcc(self) -> list """ return [] def dup_cc(self): # real signature unknown; restored from __doc__ """ dup_cc(self) -> list """ return [] def dup_drafts_folder(self): # real signature unknown; restored from __doc__ """ dup_drafts_folder(self) -> str """ return "" def dup_language(self): # real signature unknown; restored from __doc__ """ dup_language(self) -> str """ return "" def dup_templates_folder(self): # real signature unknown; restored from __doc__ """ dup_templates_folder(self) -> str """ return "" def emit(self, *args, **kwargs): # real signature unknown pass def emit_stop_by_name(self, detailed_signal): # reliably restored by inspect """ Deprecated, please use stop_emission_by_name. """ pass def find_property(self, property_name): # real signature unknown; restored from __doc__ """ find_property(self, property_name:str) -> GObject.ParamSpec """ pass def force_floating(self, *args, **kargs): # reliably restored by inspect # no doc pass def freeze_notify(self): # reliably restored by inspect """ Freezes the object's property-changed notification queue. :returns: A context manager which optionally can be used to automatically thaw notifications. This will freeze the object so that "notify" signals are blocked until the thaw_notify() method is called. .. code-block:: python with obj.freeze_notify(): pass """ pass def getv(self, names, values): # real signature unknown; restored from __doc__ """ getv(self, names:list, values:list) """ pass def get_bcc(self): # real signature unknown; restored from __doc__ """ get_bcc(self) -> list """ return [] def get_cc(self): # real signature unknown; restored from __doc__ """ get_cc(self) -> list """ return [] def get_data(self, *args, **kargs): # reliably restored by inspect # no doc pass def get_drafts_folder(self): # real signature unknown; restored from __doc__ """ get_drafts_folder(self) -> str """ return "" def get_language(self): # real signature unknown; restored from __doc__ """ get_language(self) -> str or None """ return "" def get_properties(self, *args, **kwargs): # real signature unknown pass def get_property(self, *args, **kwargs): # real signature unknown pass def get_qdata(self, *args, **kargs): # reliably restored by inspect # no doc pass def get_reply_style(self): # real signature unknown; restored from __doc__ """ get_reply_style(self) -> EDataServer.SourceMailCompositionReplyStyle """ pass def get_sign_imip(self): # real signature unknown; restored from __doc__ """ get_sign_imip(self) -> bool """ return False def get_source(self): # real signature unknown; restored from __doc__ """ get_source(self) -> EDataServer.Source """ pass def get_start_bottom(self): # real signature unknown; restored from __doc__ """ get_start_bottom(self) -> EDataServer.ThreeState """ pass def get_templates_folder(self): # real signature unknown; restored from __doc__ """ get_templates_folder(self) -> str """ return "" def get_top_signature(self): # real signature unknown; restored from __doc__ """ get_top_signature(self) -> EDataServer.ThreeState """ pass def handler_block(obj, handler_id): # reliably restored by inspect """ Blocks the signal handler from being invoked until handler_unblock() is called. :param GObject.Object obj: Object instance to block handlers for. :param int handler_id: Id of signal to block. :returns: A context manager which optionally can be used to automatically unblock the handler: .. code-block:: python with GObject.signal_handler_block(obj, id): pass """ pass def handler_block_by_func(self, *args, **kwargs): # real signature unknown pass def handler_disconnect(*args, **kwargs): # reliably restored by inspect """ signal_handler_disconnect(instance:GObject.Object, handler_id:int) """ pass def handler_is_connected(*args, **kwargs): # reliably restored by inspect """ signal_handler_is_connected(instance:GObject.Object, handler_id:int) -> bool """ pass def handler_unblock(*args, **kwargs): # reliably restored by inspect """ signal_handler_unblock(instance:GObject.Object, handler_id:int) """ pass def handler_unblock_by_func(self, *args, **kwargs): # real signature unknown pass def install_properties(self, pspecs): # real signature unknown; restored from __doc__ """ install_properties(self, pspecs:list) """ pass def install_property(self, property_id, pspec): # real signature unknown; restored from __doc__ """ install_property(self, property_id:int, pspec:GObject.ParamSpec) """ pass def interface_find_property(self, *args, **kargs): # reliably restored by inspect # no doc pass def interface_install_property(self, *args, **kargs): # reliably restored by inspect # no doc pass def interface_list_properties(self, *args, **kargs): # reliably restored by inspect # no doc pass def is_floating(self): # real signature unknown; restored from __doc__ """ is_floating(self) -> bool """ return False def list_properties(self): # real signature unknown; restored from __doc__ """ list_properties(self) -> list, n_properties:int """ return [] def newv(self, object_type, parameters): # real signature unknown; restored from __doc__ """ newv(object_type:GType, parameters:list) -> GObject.Object """ pass def notify(self, property_name): # real signature unknown; restored from __doc__ """ notify(self, property_name:str) """ pass def notify_by_pspec(self, *args, **kargs): # reliably restored by inspect # no doc pass def override_property(self, property_id, name): # real signature unknown; restored from __doc__ """ override_property(self, property_id:int, name:str) """ pass def property_lock(self): # real signature unknown; restored from __doc__ """ property_lock(self) """ pass def property_unlock(self): # real signature unknown; restored from __doc__ """ property_unlock(self) """ pass def ref(self, *args, **kargs): # reliably restored by inspect # no doc pass def ref_sink(self, *args, **kargs): # reliably restored by inspect # no doc pass def ref_source(self): # real signature unknown; restored from __doc__ """ ref_source(self) -> EDataServer.Source """ pass def replace_data(self, *args, **kargs): # reliably restored by inspect # no doc pass def replace_qdata(self, *args, **kargs): # reliably restored by inspect # no doc pass def run_dispose(self, *args, **kargs): # reliably restored by inspect # no doc pass def set_bcc(self, bcc): # real signature unknown; restored from __doc__ """ set_bcc(self, bcc:list) """ pass def set_cc(self, cc): # real signature unknown; restored from __doc__ """ set_cc(self, cc:list) """ pass def set_data(self, *args, **kargs): # reliably restored by inspect # no doc pass def set_drafts_folder(self, drafts_folder=None): # real signature unknown; restored from __doc__ """ set_drafts_folder(self, drafts_folder:str=None) """ pass def set_language(self, language=None): # real signature unknown; restored from __doc__ """ set_language(self, language:str=None) """ pass def set_properties(self, *args, **kwargs): # real signature unknown pass def set_property(self, *args, **kwargs): # real signature unknown pass def set_reply_style(self, reply_style): # real signature unknown; restored from __doc__ """ set_reply_style(self, reply_style:EDataServer.SourceMailCompositionReplyStyle) """ pass def set_sign_imip(self, sign_imip): # real signature unknown; restored from __doc__ """ set_sign_imip(self, sign_imip:bool) """ pass def set_start_bottom(self, start_bottom): # real signature unknown; restored from __doc__ """ set_start_bottom(self, start_bottom:EDataServer.ThreeState) """ pass def set_templates_folder(self, templates_folder=None): # real signature unknown; restored from __doc__ """ set_templates_folder(self, templates_folder:str=None) """ pass def set_top_signature(self, top_signature): # real signature unknown; restored from __doc__ """ set_top_signature(self, top_signature:EDataServer.ThreeState) """ pass def steal_data(self, *args, **kargs): # reliably restored by inspect # no doc pass def steal_qdata(self, *args, **kargs): # reliably restored by inspect # no doc pass def stop_emission(self, detailed_signal): # reliably restored by inspect """ Deprecated, please use stop_emission_by_name. """ pass def stop_emission_by_name(*args, **kwargs): # reliably restored by inspect """ signal_stop_emission_by_name(instance:GObject.Object, detailed_signal:str) """ pass def thaw_notify(self): # real signature unknown; restored from __doc__ """ thaw_notify(self) """ pass def unref(self, *args, **kargs): # reliably restored by inspect # no doc pass def watch_closure(self, *args, **kargs): # reliably restored by inspect # no doc pass def weak_ref(self, *args, **kwargs): # real signature unknown pass def _force_floating(self, *args, **kwargs): # real signature unknown """ force_floating(self) """ pass def _ref(self, *args, **kwargs): # real signature unknown """ ref(self) -> GObject.Object """ pass def _ref_sink(self, *args, **kwargs): # real signature unknown """ ref_sink(self) -> GObject.Object """ pass def _unref(self, *args, **kwargs): # real signature unknown """ unref(self) """ pass def _unsupported_data_method(self, *args, **kargs): # reliably restored by inspect # no doc pass def _unsupported_method(self, *args, **kargs): # reliably restored by inspect # no doc pass def __copy__(self, *args, **kwargs): # real signature unknown pass def __deepcopy__(self, *args, **kwargs): # real signature unknown pass def __delattr__(self, *args, **kwargs): # real signature unknown """ Implement delattr(self, name). """ pass def __dir__(self, *args, **kwargs): # real signature unknown """ Default dir() implementation. """ pass def __eq__(self, *args, **kwargs): # real signature unknown """ Return self==value. """ pass def __format__(self, *args, **kwargs): # real signature unknown """ Default object formatter. """ pass def __getattribute__(self, *args, **kwargs): # real signature unknown """ Return getattr(self, name). """ pass def __ge__(self, *args, **kwargs): # real signature unknown """ Return self>=value. """ pass def __gt__(self, *args, **kwargs): # real signature unknown """ Return self>value. """ pass def __hash__(self, *args, **kwargs): # real signature unknown """ Return hash(self). """ pass def __init_subclass__(self, *args, **kwargs): # real signature unknown """ This method is called when a class is subclassed. The default implementation does nothing. It may be overridden to extend subclasses. """ pass def __init__(self, **properties): # real signature unknown; restored from __doc__ pass def __le__(self, *args, **kwargs): # real signature unknown """ Return self<=value. """ pass def __lt__(self, *args, **kwargs): # real signature unknown """ Return self<value. """ pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __ne__(self, *args, **kwargs): # real signature unknown """ Return self!=value. """ pass def __reduce_ex__(self, *args, **kwargs): # real signature unknown """ Helper for pickle. """ pass def __reduce__(self, *args, **kwargs): # real signature unknown """ Helper for pickle. """ pass def __repr__(self, *args, **kwargs): # real signature unknown """ Return repr(self). """ pass def __setattr__(self, *args, **kwargs): # real signature unknown """ Implement setattr(self, name, value). """ pass def __sizeof__(self, *args, **kwargs): # real signature unknown """ Size of object in memory, in bytes. """ pass def __str__(self, *args, **kwargs): # real signature unknown """ Return str(self). """ pass def __subclasshook__(self, *args, **kwargs): # real signature unknown """ Abstract classes can override this to customize issubclass(). This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached). """ pass g_type_instance = property(lambda self: object(), lambda self, v: None, lambda self: None) # default parent = property(lambda self: object(), lambda self, v: None, lambda self: None) # default priv = property(lambda self: object(), lambda self, v: None, lambda self: None) # default qdata = property(lambda self: object(), lambda self, v: None, lambda self: None) # default ref_count = property(lambda self: object(), lambda self, v: None, lambda self: None) # default __gpointer__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default __grefcount__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default props = None # (!) real value is '<gi._gi.GProps object at 0x7f626e645910>' __class__ = None # (!) real value is "<class 'gi.types.GObjectMeta'>" __dict__ = None # (!) real value is "mappingproxy({'__info__': ObjectInfo(SourceMailComposition), '__module__': 'gi.repository.EDataServer', '__gtype__': <GType ESourceMailComposition (94877537188656)>, '__doc__': None, '__gsignals__': {}, 'dup_bcc': gi.FunctionInfo(dup_bcc), 'dup_cc': gi.FunctionInfo(dup_cc), 'dup_drafts_folder': gi.FunctionInfo(dup_drafts_folder), 'dup_language': gi.FunctionInfo(dup_language), 'dup_templates_folder': gi.FunctionInfo(dup_templates_folder), 'get_bcc': gi.FunctionInfo(get_bcc), 'get_cc': gi.FunctionInfo(get_cc), 'get_drafts_folder': gi.FunctionInfo(get_drafts_folder), 'get_language': gi.FunctionInfo(get_language), 'get_reply_style': gi.FunctionInfo(get_reply_style), 'get_sign_imip': gi.FunctionInfo(get_sign_imip), 'get_start_bottom': gi.FunctionInfo(get_start_bottom), 'get_templates_folder': gi.FunctionInfo(get_templates_folder), 'get_top_signature': gi.FunctionInfo(get_top_signature), 'set_bcc': gi.FunctionInfo(set_bcc), 'set_cc': gi.FunctionInfo(set_cc), 'set_drafts_folder': gi.FunctionInfo(set_drafts_folder), 'set_language': gi.FunctionInfo(set_language), 'set_reply_style': gi.FunctionInfo(set_reply_style), 'set_sign_imip': gi.FunctionInfo(set_sign_imip), 'set_start_bottom': gi.FunctionInfo(set_start_bottom), 'set_templates_folder': gi.FunctionInfo(set_templates_folder), 'set_top_signature': gi.FunctionInfo(set_top_signature), 'parent': <property object at 0x7f626e9354a0>, 'priv': <property object at 0x7f626e935590>})" __gdoc__ = 'Object ESourceMailComposition\n\nProperties from ESourceMailComposition:\n bcc -> GStrv: Bcc\n Recipients to blind carbon-copy\n cc -> GStrv: Cc\n Recipients to carbon-copy\n drafts-folder -> gchararray: Drafts Folder\n Preferred folder for draft messages\n reply-style -> ESourceMailCompositionReplyStyle: Reply Style\n What reply style to prefer\n sign-imip -> gboolean: Sign iMIP\n Include iMIP messages when signing\n templates-folder -> gchararray: Templates Folder\n Preferred folder for message templates\n start-bottom -> EThreeState: Start Bottom\n Whether start at bottom on reply or forward\n top-signature -> EThreeState: Top Signature\n Whether place signature at the top on reply or forward\n language -> gchararray: Language\n Preferred language\n\nProperties from ESourceExtension:\n source -> ESource: Source\n The ESource being extended\n\nSignals from GObject:\n notify (GParam)\n\n' __gsignals__ = {} __gtype__ = None # (!) real value is '<GType ESourceMailComposition (94877537188656)>' __info__ = ObjectInfo(SourceMailComposition)
4e14b6ef3d00c50c0713fd1960605860a932cd44
41bb2cbeaa736b97772fe29e5377f6998ff383e9
/20200404/2_多继承方法/appMain2.py
f83c6adb6e904a6cc1ea796e866cb13c4ffa0aea
[]
no_license
Aimee888/Python-20200113
64a8168e88d81bb710ee9025c716360ad0fa434e
7f14a3506532114519ff54a8b250e114e597c0f1
refs/heads/master
2023-01-04T21:59:16.349441
2020-11-03T02:27:03
2020-11-03T02:27:03
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,266
py
# # appMain2.py 多继承方法 """ 多继承方式优缺点: 1. 界面上的组件都成为窗体业务逻辑类QmyWidget的公共属性,外界可以直接访问。优点是访问方便,缺点是过于开放, 不符合面向对象严格封装的设计思想 2. 界面上的组件与QmyWidget类里新定义的属性混合在一起了,不便于区分。当窗体上的界面组件较多, 且窗体业务逻辑类里定义的属性也很多时,就难以区分哪个属性是界面上的组件,哪个属性是在业务逻辑类里新定义的, 这样不利于界面与业务逻辑分离。 """ import sys from PyQt5.QtWidgets import QWidget, QApplication from Form import Ui_Form class QmyWidget(QWidget, Ui_Form): def __init__(self, parent=None): super().__init__(parent) # 调用父类构造函数,创建QWidget窗体 self.Lab = "多重继承的QmyWidget" # 新定义的一个变量 self.setupUi(self) # self是QWidget窗体,可作为参数传给setupui() self.label.setText(self.Lab) if __name__ == "__main__": app = QApplication(sys.argv) # 创建app myWidget = QmyWidget() myWidget.show() myWidget.btnClose.setText("不关闭了") sys.exit(app.exec_())
8040733f75d402ff7cacf2eba45b397ac4d18907
45be4ca6db49cfeeee722f94a21481634898c851
/deepneuro/outputs/classification.py
e397b41385d3cf1f316350db9effb59994ffa255
[ "MIT" ]
permissive
QTIM-Lab/DeepNeuro
30de49d7cf5d15411591988bca5e284b4fe52ff5
8a55a958660227859439df003ac39b98ce3da1b0
refs/heads/master
2021-07-13T01:05:19.374945
2020-06-24T13:00:14
2020-06-24T13:00:14
93,092,834
122
40
MIT
2019-12-12T09:30:31
2017-06-01T19:36:34
Jupyter Notebook
UTF-8
Python
false
false
235
py
from deepneuro.outputs.inference import ModelInference class ClassInference(ModelInference): def load(self, kwargs): """ Parameters ---------- """ super(ClassInference, self).load(kwargs)
e90c0e5048eee6f670156dc8bbf5e574502e5208
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p02916/s608156999.py
ea1415b01d211aa3d75f9003f9e054e9ce3481d7
[]
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
251
py
n=int(input()) alist=list(map(int,input().split())) blist=list(map(int,input().split())) clist=list(map(int,input().split())) sum=0 bef=-2 for a in alist: sum += blist[a-1] if bef + 1 == a: sum += clist[bef-1] bef = a print(sum)
b80f926c78af1a1030c449eb028537d964f87402
55c250525bd7198ac905b1f2f86d16a44f73e03a
/Python/Projects/pyinstaller/tests/functional/modules/pyi_egg_unzipped.egg/unzipped_egg/__init__.py
bd4c8cd299144aae63d2dc6a6bc9dfb7ff1e56d0
[ "LicenseRef-scancode-other-permissive" ]
permissive
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
128
py
version https://git-lfs.github.com/spec/v1 oid sha256:99ad4a63a6375b9f8f4b215f5ea338161138e0b4f656a42ab109bc1ab97922fa size 679
6d1267ae57626f3695274dfe368089d04bd66985
2e0f8a7e59abc371e1af68670881998f42282e08
/alita_session/utils.py
7aaf38a7c746a9a2b042f07d35d5fe95cf5e0d8f
[]
no_license
dwpy/alita-session
a052eba48f68d99ddd55417be94224ecee409435
e2d402df7d8adfcb39f61fe2d638c64bcce59378
refs/heads/master
2020-04-27T21:31:43.495879
2019-06-19T03:41:20
2019-06-19T03:41:20
174,700,897
5
0
null
null
null
null
UTF-8
Python
false
false
3,575
py
import time import socket import datetime def _format_timetuple_and_zone(timetuple, zone): return '%s, %02d %s %04d %02d:%02d:%02d %s' % ( ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'][timetuple[6]], timetuple[2], ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'][timetuple[1] - 1], timetuple[0], timetuple[3], timetuple[4], timetuple[5], zone) def is_ip(value): """Determine if the given string is an IP address. Python 2 on Windows doesn't provide ``inet_pton``, so this only checks IPv4 addresses in that environment. :param value: value to check :type value: str :return: True if string is an IP address :rtype: bool """ for family in (socket.AF_INET, socket.AF_INET6): try: socket.inet_pton(family, value) except socket.error: pass else: return True return False def total_seconds(td): """Returns the total seconds from a timedelta object. :param timedelta td: the timedelta to be converted in seconds :returns: number of seconds :rtype: int """ return td.days * 60 * 60 * 24 + td.seconds def format_datetime(dt, usegmt=False): """Turn a datetime into a date string as specified in RFC 2822. If usegmt is True, dt must be an aware datetime with an offset of zero. In this case 'GMT' will be rendered instead of the normal +0000 required by RFC2822. This is to support HTTP headers involving date stamps. """ now = dt.timetuple() if usegmt: if dt.tzinfo is None or dt.tzinfo != datetime.timezone.utc: raise ValueError("usegmt option requires a UTC datetime") zone = 'GMT' elif dt.tzinfo is None: zone = '-0000' else: zone = dt.strftime("%z") return _format_timetuple_and_zone(now, zone) def formatdate(timeval=None, localtime=False, usegmt=False): """Returns a date string as specified by RFC 2822, e.g.: Fri, 09 Nov 2001 01:08:47 -0000 Optional timeval if given is a floating point time value as accepted by gmtime() and localtime(), otherwise the current time is used. Optional localtime is a flag that when True, interprets timeval, and returns a date relative to the local timezone instead of UTC, properly taking daylight savings time into account. Optional argument usegmt means that the timezone is written out as an ascii string, not numeric one (so "GMT" instead of "+0000"). This is needed for HTTP, and is only used when localtime==False. """ # Note: we cannot use strftime() because that honors the locale and RFC # 2822 requires that day and month names be the English abbreviations. if timeval is None: timeval = time.time() if localtime or usegmt: dt = datetime.datetime.fromtimestamp(timeval, datetime.timezone.utc) else: dt = datetime.datetime.utcfromtimestamp(timeval) if localtime: dt = dt.astimezone() usegmt = False return format_datetime(dt, usegmt) def http_date(epoch_seconds=None): """ Format the time to match the RFC1123 date format as specified by HTTP RFC7231 section 7.1.1.1. `epoch_seconds` is a floating point number expressed in seconds since the epoch, in UTC - such as that outputted by time.time(). If set to None, it defaults to the current time. Output a string in the format 'Wdy, DD Mon YYYY HH:MM:SS GMT'. """ return formatdate(epoch_seconds, usegmt=True)
52a5f69bd6b5690693cde802f5e30618619993a8
c5859d1bdf44c8452563f856dc4191b74e85ce21
/custom_components/sensor/life360.py
325af2b1f5fc3ec313c99e77fb6cc6ee579f7be5
[]
no_license
balloob/homeassistant-config
46774ea88ced4414e48e4f1f40af63ff67b6f990
9f341e4b695db56f3c4af7299a336d5a0f60cdcf
refs/heads/master
2020-03-21T03:10:31.729526
2018-06-18T18:27:54
2018-06-18T18:27:54
138,039,924
11
0
null
2018-06-20T13:56:12
2018-06-20T13:56:12
null
UTF-8
Python
false
false
9,847
py
""" @ Author : Suresh Kalavala @ Date : 05/24/2017 @ Description : Life360 Sensor - It queries Life360 API and retrieves data at a specified interval and dumpt into MQTT @ Notes: Copy this file and place it in your "Home Assistant Config folder\custom_components\sensor\" folder Copy corresponding Life360 Package frommy repo, and make sure you have MQTT installed and Configured Make sure the life360 password don't contain '#' or '$' symbols """ from datetime import timedelta import logging import subprocess import json import voluptuous as vol import homeassistant.components.mqtt as mqtt from io import StringIO from homeassistant.components.mqtt import (CONF_STATE_TOPIC, CONF_COMMAND_TOPIC, CONF_QOS, CONF_RETAIN) from homeassistant.helpers import template from homeassistant.exceptions import TemplateError from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_NAME, CONF_VALUE_TEMPLATE, CONF_UNIT_OF_MEASUREMENT, STATE_UNKNOWN) from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) DEPENDENCIES = ['mqtt'] DEFAULT_NAME = 'Life360 Sensor' CONST_MQTT_TOPIC = "mqtt_topic" CONST_STATE_ERROR = "error" CONST_STATE_RUNNING = "running" CONST_USERNAME = "username" CONST_PASSWORD = "password" COMMAND1 = "curl -s -X POST -H \"Authorization: Basic cFJFcXVnYWJSZXRyZTRFc3RldGhlcnVmcmVQdW1hbUV4dWNyRUh1YzptM2ZydXBSZXRSZXN3ZXJFQ2hBUHJFOTZxYWtFZHI0Vg==\" -F \"grant_type=password\" -F \"username=USERNAME360\" -F \"password=PASSWORD360\" https://api.life360.com/v3/oauth2/token.json | grep -Po '(?<=\"access_token\":\")\\w*'" COMMAND2 = "curl -s -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" https://api.life360.com/v3/circles.json | grep -Po '(?<=\"id\":\")[\\w-]*'" COMMAND3 = "curl -s -X GET -H \"Authorization: Bearer ACCESS_TOKEN\" https://api.life360.com/v3/circles/ID" SCAN_INTERVAL = timedelta(seconds=60) PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ vol.Required(CONST_USERNAME): cv.string, vol.Required(CONST_PASSWORD): cv.string, vol.Required(CONST_MQTT_TOPIC): cv.string, vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, vol.Optional(CONF_UNIT_OF_MEASUREMENT): cv.string, vol.Optional(CONF_VALUE_TEMPLATE): cv.template, }) # pylint: disable=unused-argument def setup_platform(hass, config, add_devices, discovery_info=None): """Set up the Life360 Sensor.""" name = config.get(CONF_NAME) username = config.get(CONST_USERNAME) password = config.get(CONST_PASSWORD) mqtt_topic = config.get(CONST_MQTT_TOPIC) unit = config.get(CONF_UNIT_OF_MEASUREMENT) value_template = config.get(CONF_VALUE_TEMPLATE) if value_template is not None: value_template.hass = hass data = Life360SensorData(username, password, COMMAND1, COMMAND2, COMMAND3, mqtt_topic, hass) add_devices([Life360Sensor(hass, data, name, unit, value_template)]) class Life360Sensor(Entity): """Representation of a sensor.""" def __init__(self, hass, data, name, unit_of_measurement, value_template): """Initialize the sensor.""" self._hass = hass self.data = data self._name = name self._state = STATE_UNKNOWN self._unit_of_measurement = unit_of_measurement self._value_template = value_template self.update() @property def name(self): """Return the name of the sensor.""" return self._name @property def unit_of_measurement(self): """Return the unit the value is expressed in.""" return self._unit_of_measurement @property def state(self): """Return the state of the device.""" return self._state def update(self): """Get the latest data and updates the state.""" self.data.update() value = self.data.value if value is None: value = STATE_UNKNOWN elif self._value_template is not None: self._state = self._value_template.render_with_possible_json_value( value, STATE_UNKNOWN) else: self._state = value class Life360SensorData(object): """The class for handling the data retrieval.""" def __init__(self, username, password, command1, command2, command3, mqtt_topic, hass): """Initialize the data object.""" self.username = username self.password = password self.COMMAND_ACCESS_TOKEN = command1 self.COMMAND_ID = command2 self.COMMAND_MEMBERS = command3 self.hass = hass self.value = None self.mqtt_topic = mqtt_topic self.mqtt_retain = True self.mqtt_qos = 0 def update(self): try: """ Prepare and Execute Commands """ self.COMMAND_ACCESS_TOKEN = self.COMMAND_ACCESS_TOKEN.replace("USERNAME360", self.username) self.COMMAND_ACCESS_TOKEN = self.COMMAND_ACCESS_TOKEN.replace("PASSWORD360", self.password) access_token = self.exec_shell_command( self.COMMAND_ACCESS_TOKEN ) if access_token == None: self.value = CONST_STATE_ERROR return None self.COMMAND_ID = self.COMMAND_ID.replace("ACCESS_TOKEN", access_token) id = self.exec_shell_command( self.COMMAND_ID ) if id == None: self.value = CONST_STATE_ERROR return None self.COMMAND_MEMBERS = self.COMMAND_MEMBERS.replace("ACCESS_TOKEN", access_token) self.COMMAND_MEMBERS = self.COMMAND_MEMBERS.replace("ID", id) payload = self.exec_shell_command( self.COMMAND_MEMBERS ) if payload != None: self.save_payload_to_mqtt ( self.mqtt_topic, payload ) data = json.loads ( payload ) for member in data["members"]: topic = StringBuilder() topic.Append("owntracks/") topic.Append(member["firstName"].lower()) topic.Append("/") topic.Append(member["firstName"].lower()) topic = topic msgPayload = StringBuilder() msgPayload.Append("{") msgPayload.Append("\"t\":\"p\"") msgPayload.Append(",") msgPayload.Append("\"tst\":") msgPayload.Append(member['location']['timestamp']) msgPayload.Append(",") msgPayload.Append("\"acc\":") msgPayload.Append(member['location']['accuracy']) msgPayload.Append(",") msgPayload.Append("\"_type\":\"location\"") msgPayload.Append(",") msgPayload.Append("\"alt\":\"0\"") msgPayload.Append(",") msgPayload.Append("\"_cp\":\"false\"") msgPayload.Append(",") msgPayload.Append("\"lon\":") msgPayload.Append(member['location']['longitude']) msgPayload.Append(",") msgPayload.Append("\"lat\":") msgPayload.Append(member['location']['latitude']) msgPayload.Append(",") msgPayload.Append("\"batt\":") msgPayload.Append(member['location']['battery']) msgPayload.Append(",") if str(member['location']['wifiState']) == "1": msgPayload.Append("\"conn\":\"w\"") msgPayload.Append(",") msgPayload.Append("\"vel\":") msgPayload.Append(str(member['location']['speed'])) msgPayload.Append(",") msgPayload.Append("\"charging\":") msgPayload.Append(member['location']['charge']) msgPayload.Append("}") self.save_payload_to_mqtt ( str(topic), str(msgPayload) ) self.value = CONST_STATE_RUNNING else: self.value = CONST_STATE_ERROR except Exception as e: self.value = CONST_STATE_ERROR def exec_shell_command( self, command ): output = None try: output = subprocess.check_output( command, shell=True, timeout=60 ) output = output.strip().decode('utf-8') except subprocess.CalledProcessError: """ _LOGGER.error("Command failed: %s", command)""" self.value = CONST_STATE_ERROR output = None except subprocess.TimeoutExpired: """ _LOGGER.error("Timeout for command: %s", command)""" self.value = CONST_STATE_ERROR output = None if output == None: _LOGGER.error( "Life360 has not responsed well. Nothing to worry, will try again!" ) self.value = CONST_STATE_ERROR return None else: return output def save_payload_to_mqtt( self, topic, payload ): try: """mqtt.async_publish ( self.hass, topic, payload, self.mqtt_qos, self.mqtt_retain )""" _LOGGER.info("topic: %s", topic) _LOGGER.info("payload: %s", payload) mqtt.publish ( self.hass, topic, payload, self.mqtt_qos, self.mqtt_retain ) except: _LOGGER.error( "Error saving Life360 data to mqtt." ) class StringBuilder: _file_str = None def __init__(self): self._file_str = StringIO() def Append(self, str): self._file_str.write(str) def __str__(self): return self._file_str.getvalue()
d384412ffd70298ef610d15b323c9cbb8cd2b17a
e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f
/indices/perspicu.py
cc3af460e6b965b6ce8daa7624ccaba0977392ee
[]
no_license
psdh/WhatsintheVector
e8aabacc054a88b4cb25303548980af9a10c12a8
a24168d068d9c69dc7a0fd13f606c080ae82e2a6
refs/heads/master
2021-01-25T10:34:22.651619
2015-09-23T11:54:06
2015-09-23T11:54:06
42,749,205
2
3
null
2015-09-23T11:54:07
2015-09-18T22:06:38
Python
UTF-8
Python
false
false
627
py
ii = [('CookGHP3.py', 1), ('RogePAV2.py', 2), ('SadlMLP.py', 1), ('RennJIT.py', 1), ('WilbRLW5.py', 1), ('FitzRNS3.py', 1), ('ClarGE2.py', 9), ('GellWPT2.py', 1), ('CookGHP2.py', 3), ('CoolWHM.py', 1), ('ClarGE.py', 10), ('WestJIT2.py', 1), ('DibdTRL2.py', 2), ('LandWPA2.py', 1), ('NewmJLP.py', 4), ('GodwWLN.py', 2), ('SoutRD2.py', 2), ('BachARE.py', 2), ('WheeJPT.py', 3), ('MereHHB3.py', 1), ('MereHHB.py', 1), ('BabbCEM.py', 1), ('CoolWHM3.py', 1), ('HaliTBC.py', 1), ('BrewDTO.py', 1), ('ClarGE3.py', 17), ('DibdTRL.py', 1), ('FitzRNS2.py', 1), ('HogaGMM2.py', 1), ('SadlMLP2.py', 1), ('TaylIF.py', 3), ('DibdTBR.py', 1)]
670f929e728a157e4e43fe92d964437cc11835e9
d570fc2e36f0842605ad6e9dda3cbd4910160a07
/src/ZServer/__init__.py
cbb6b0fcc33e9fd8d92b0bfbeac60fca80b57fa8
[ "ZPL-2.1", "LicenseRef-scancode-unknown-license-reference" ]
permissive
zopefoundation/ZServer
8540fc7c411a7857abf4034068f75f2f1c7ba98c
eb047c795a278c22ae77f5af4284411e4689025e
refs/heads/master
2023-06-21T20:54:53.580461
2023-02-10T09:43:55
2023-02-10T09:43:55
65,092,325
6
9
NOASSERTION
2020-09-17T07:25:50
2016-08-06T16:47:48
Python
UTF-8
Python
false
false
2,355
py
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## from __future__ import absolute_import from zope.deferredimport import deprecated from ZServer import utils # BBB deprecated( 'Please import from ZServer.medusa', resolver='ZServer.medusa:resolver', logger='ZServer.medusa:logger') deprecated( 'Please import from ZServer.medusa.monitor', secure_monitor_server='ZServer.medusa.monitor:secure_monitor_server') deprecated( 'Please import from ZServer.utils', requestCloseOnExec='ZServer.utils:requestCloseOnExec') deprecated( 'Please import from ZServer.FCGIServer', FCGIServer='ZServer.FCGIServer:FCGIServer') deprecated( 'Please import from ZServer.FTPServer', FTPServer='ZServer.FCGIServer:FTPServer') deprecated( 'Please import from ZServer.HTTPServer', zhttp_handler='ZServer.HTTPServer:zhttp_handler', zhttp_server='ZServer.HTTPServer:zhttp_server') deprecated( 'Please import from ZServer.PCGIServer', PCGIServer='ZServer.PCGIServer:PCGIServer') deprecated( 'Please import from ZServer.Zope2.Startup.config.', CONNECTION_LIMIT='ZServer.Zope2.Startup.config:ZSERVER_CONNECTION_LIMIT', exit_code='ZServer.Zope2.Startup.config:ZSERVER_EXIT_CODE', LARGE_FILE_THRESHOLD=('ZServer.Zope2.Startup.config:' 'ZSERVER_LARGE_FILE_THRESHOLD'), setNumberOfThreads='ZServer.Zope2.Startup.config:setNumberOfThreads', ) # the ZServer version number ZSERVER_VERSION = '1.1' # the Zope version string ZOPE_VERSION = utils.getZopeVersion() # we need to patch asyncore's dispatcher class with a new # log_info method so we see medusa messages in the zLOG log utils.patchAsyncoreLogger() # we need to patch the 'service name' of the medusa syslog logger utils.patchSyslogServiceName()
f5e96f07ed638db617a09624e914897823a5a5da
ed6e89a79d593fc188252483d329bbd800fd4f09
/dnsproxyserver/exceptions.py
b1e20c79ab7ed76104ae022712adf64cf572833f
[]
no_license
mol310/crawl-new2
8bfd1dfd0769f1706d559aef936635235e2d6c2e
af9ceb3178b3248af90282ca4d0f8c79df6faeec
refs/heads/master
2023-04-26T04:29:47.795433
2021-05-13T10:17:48
2021-05-13T10:17:48
null
0
0
null
null
null
null
UTF-8
Python
false
false
163
py
""" This file contains the exceptions to work with while working with DNS """ class InvalidIPError(Exception): pass class InvalidQueryError(Exception): pass
610c684c12b84ce56401171a6d298b06e2ca440e
270e3cf2d508d916e8aaa5c4210fa593ff4c3a72
/Python_Scripting/Data_Types.py
8072853d66f997b0a282a2f886a77a844bf6870f
[]
no_license
NagiReddyPadala/python_programs
140c45ee1e763ec4aa8ef975be18c5fad1e0a7ec
18d91095c0e25345b8c1bc16d121df9a40639c5f
refs/heads/master
2020-12-08T03:29:35.030951
2020-02-29T16:23:36
2020-02-29T16:23:36
232,871,073
0
0
null
null
null
null
UTF-8
Python
false
false
16,108
py
""" a = "This is a string" print (a) a = "Hello" print (a) l = [1, "a", "string", 1+2] print (l) l.append(6) print (l) l.pop() print (l) print (l[1]) l[1] = 2 print (l[1]) t =(1, "a", "string", 1+2) print (t) print (t[1]) print (t) i = 1 while (i < 10): i += 1 print (i, end=" ") print ("\n") s = "Hello world" for ch in s: print (ch) L = [1, 4, 5, 7, 8, 9] for i in L: print (i) x = range(0,5) print (type(x)) for i in range(0, 10): print (i) # Python Program for # Creation of String # Creating a String # with single Quotes String1 = 'Welcome to the Geeks World' print("String with the use of Single Quotes: ") print(String1) # Creating a String # with double Quotes String1 = "I'm a Geek" print("\nString with the use of Double Quotes: ") print(String1) # Creating a String # with triple Quotes String1 = '''I'm a Geek and I live in a world of "Geeks"''' print("\nString with the use of Triple Quotes: ") print(String1) # Creating String with triple # Quotes allows multiple lines String1 = '''Geeks For Life''' print("\nCreating a multiline String: ") print(String1) # Python Program to Access # characters of String String1 = "GeeksForGeeks" print("Initial String: ") print(String1) # Printing First character print("\nFirst character of String is: ") print(String1[0]) # Printing Last character print("\nLast character of String is: ") print(String1[-13]) # Python Program to # demonstrate String slicing # Creating a String String1 = "GeeksForGeeks" print("Initial String: ") print(String1) # Printing 3rd to 12th character print("\nSlicing characters from 3-12: ") print(String1[3:12]) # Printing characters between # 3rd and 2nd last character print("\nSlicing characters between " + "3rd and 2nd last character: ") print(String1[3:-2]) # Python Program to Update # character of a String String1 = "Hello, I'm a Geek" print("Initial String: ") print(String1) # Updating a character # of the String # String1[2] = 'p' print("\nUpdating character at 2nd Index: ") print(String1) # Python Program to Update # entire String String1 = "Hello, I'm a Geek" print("Initial String: ") print(String1) # Updating a String String1 = "Welcome to the Geek World" print("\nUpdated String: ") print(String1) # Python Program to Delete # characters from a String String1 = "Hello, I'm a Geek" print("Initial String: ") print(String1) # Deleting a character # of the String # del String1 print("\nDeleting character at 2nd Index: ") print(String1) # Python Program for # Escape Sequencing # of String # Initial String String1 = '''I'm a "Geek"''' print("Initial String with use of Triple Quotes: ") print(String1) # Escaping Single Quote String1 = 'I\'m a "Geek"' print("\nEscaping Single Quote: ") print(String1) # Escaping Doule Quotes String1 = "I'm a \"Geek\"" print("\nEscaping Double Quotes: ") print(String1) # Printing Paths with the # use of Escape Sequences String1 = "C:\\Python\\Geeks\\" print("\nEscaping Backslashes: ") print(String1) # Printing Geeks in HEX String1 = "This is \x47\x65\x65\x6b\x73 in \x48\x45\x58" print("\nPrinting in HEX with the use of Escape Sequences: ") print(String1) # Using raw String to # ignore Escape Sequences String1 = r"This is \x47\x65\x65\x6b\x73 in \x48\x45\x58" print("\nPrinting Raw String in HEX Format: ") print(String1) # Python Program for # Formatting of Strings # Default order String1 = "{},{},{}".format('Geeks', 'For', 'Life') print("Print String in default order: ") print(String1) # Positional Formatting String1 = "{1} {0} {2}".format('Geeks', 'For', 'Life') print("\nPrint String in Positional order: ") print(String1) # Keyword Formatting String1 = "{l} {f} {g}".format(g = 'Geeks', f = 'For', l = 'Life') print("\nPrint String in order of Keywords: ") print(String1) # Formatting of Integers String1 = "{0:b}".format(16) print("\nBinary representation of 16 is ") print(String1) # Formatting of Floats String1 = "{0:e}".format(165.6458) print("\nExponent representation of 165.6458 is ") print(String1) # Rounding off Integers String1 = "{0:.2f}".format(1/6) print("\none-sixth is : ") print(String1) # String alignment String1 = "|{:<10}|{:^10}|{:>10}|".format('Geeks','for','Geeks') print("\nLeft, center and right alignment with Formatting: ") print(String1) # To demonstrate aligning of spaces String1 = "\n{0:^16} was founded in {1:<4}!".format("GeeksforGeeks", 2009) print(String1) newStr = "Hello,Hi,How,are,you" print(newStr.split(",")) lst = [] print(lst) lst = ['Hello'] print(lst) lst = ['hello', 'hi', 'how'] print(lst) print(lst[0]) print(lst[2]) lst = [['hello','hi'], ['Nagi', 'Madhu']] print(lst[0]) print(lst[0][1]) print(lst[1][1]) # Python program to demonstrate # Addition of elements in a List # Creating a List List = [] print("Initial blank List: ") print(List) # Addition of Elements # in the List List.append(1) List.append(2) List.append(4) print("\nList after Addition of Three elements: ") print(List) # Adding elements to the List # using Iterator for i in range(1, 4): List.append(i) print("\nList after Addition of elements from 1-3: ") print(List) # Adding Tuples to the List List.append((5, 6)) print("\nList after Addition of a Tuple: ") print(List) # Addition of List to a List List2 = ['For', 'Geeks'] List.append(List2) print("\nList after Addition of a List: ") print(List) # Python program to demonstrate # Addition of elements in a List # Creating a List List = [1,2,3,4] print("Initial List: ") print(List) # Addition of Element at # specific Position # (using Insert Method) List.insert(3, 12) List.insert(0, 'Geeks') print("\nList after performing Insert Operation: ") print(List) # Python program to demonstrate # Addition of elements in a List # Creating a List List = [1,2,3,4] print("Initial List: ") print(List) # Addition of multiple elements # to the List at the end # (using Extend Method) List.extend([8, 'Geeks', 'Always']) print("\nList after performing Extend Operation: ") print(List) # Python program to demonstrate # Removal of elements in a List # Creating a List List = [1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12] print("Intial List: ") print(List) # Removing elements from List # using Remove() method List.remove(5) List.remove(6) print("\nList after Removal of two elements: ") print(List) # Removing elements from List # using iterator method for i in range(1, 5): List.remove(i) print("\nList after Removing a range of elements: ") print(List) List = [1,2,3,4,5] # Removing element from the # Set using the pop() method print("popped element", List.pop()) print("\nList after popping an element: ") print(List) # Removing element at a # specific location from the # Set using the pop() method List.pop(2) print("\nList after popping a specific element: ") print(List) # Python program to demonstrate # Removal of elements in a List # Creating a List List = ['G','E','E','K','S','F', 'O','R','G','E','E','K','S'] print("Intial List: ") print(List) # Print elements of a range # using Slice operation Sliced_List = List[3:8] print("\nSlicing elements in a range 3-8: ") print(Sliced_List) #K','S','F', 'O','R', # Print elements from a # pre-defined point to end Sliced_List = List[5:] print("\nElements sliced from 5th " "element till the end: ") print(Sliced_List) #'F', 'O','R','G','E','E','K','S' # Printing elements from # beginning till end Sliced_List = List[:] print("\nPrinting all elements using slice operation: ") print(Sliced_List) #full # Creating a List List = ['G','E','E','K','S','F', 'O','R','G','E','E','K','S'] print("Initial List: ") print(List) # Print elements from beginning # to a pre-defined point using Slice Sliced_List = List[:-6] print("\nElements sliced till 6th element from last: ") print(Sliced_List) #'G','E','E','K','S','F', 'O' # Print elements of a range # using negative index List slicing Sliced_List = List[-6:-1] print("\nElements sliced from index -6 to -1") print(Sliced_List) #'R','G','E','E','K' # Printing elements in reverse # using Slice operation Sliced_List = List[::-1] print("\nPrinting List in reverse: ") print(Sliced_List) #Reverse List = [1, 1, 2, 3, 4] print(List.count(1)) print(type(1)) print(type("String")) #print(List.min()) #print(List.max()) #Creation of Python tuple without the use of parentheses is known as Tuple Packin # Python program to demonstrate # Addition of elements in a Set # Creating an empty tuple Tuple1 = () print("Initial empty Tuple: ") print (Tuple1) # Creating a Tuple with # the use of Strings Tuple1 = ('Geeks', 'For') print("\nTuple with the use of String: ") print(Tuple1) # Creating a Tuple with # the use of list list1 = [1, 2, 4, 5, 6] print("\nTuple using List: ") print(tuple(list1)) # Creating a Tuple # with the use of loop Tuple1 = ('Geeks') n = 5 print("\nTuple with a loop") for i in range(int(n)): Tuple1 = (Tuple1,1) print(Tuple1) # Creating a Tuple with the # use of built-in function Tuple1 = tuple('Geeks') print("\nTuple with the use of function: ") print(Tuple1) # Creating a Tuple with # Mixed Datatypes Tuple1 = (5, 'Welcome', 7, 'Geeks') print("\nTuple with Mixed Datatypes: ") print(Tuple1) # Creating a Tuple # with nested tuples Tuple1 = (0, 1, 2, 3) Tuple2 = ('python', 'geek') Tuple3 = (Tuple1, Tuple2) print("\nTuple with nested tuples: ") print(Tuple3) # Creating a Tuple # with repetition Tuple1 = ('Geeks',) * 3 print("\nTuple with repetition: ") print(Tuple1) # Concatenaton of tuples Tuple1 = (0, 1, 2, 3) Tuple2 = ('Geeks', 'For', 'Geeks') Tuple3 = Tuple1 + Tuple2 # Printing first Tuple print("Tuple 1: ") print(Tuple1) # Printing Second Tuple print("\nTuple2: ") print(Tuple2) # Printing Final Tuple print("\nTuples after Concatenaton: ") print(Tuple3) t1 = 1, 2, 3, "Four" print(t1) print(t1[0]) # Python program to demonstrate # Creation of Set in Python # Creating a Set set1 = set() print("Intial blank Set: ") print(set1) # Creating a Set with # the use of a String set1 = set("GeeksForGeeks") print("\nSet with the use of String: ") print(set1) # Creating a Set with # the use of Constructor # (Using object to Store String) String = 'GeeksForGeeks' set1 = set(String) print("\nSet with the use of an Object: " ) print(set1) # Creating a Set with # the use of a List set1 = set(["Geeks", "For", "Geeks"]) print("\nSet with the use of List: ") print(set1) print(type(t1)) # Creating a Set with # a List of Numbers # (Having duplicate values) set1 = set([1, 2, 4, 4, 3, 3, 3, 6, 5]) print("\nSet with the use of Numbers: ") print(set1) # Creating a Set with # a mixed type of values # (Having numbers and strings) set1 = set([1, 2, 'Geeks', 4, 'For', 6, 'Geeks']) print("\nSet with the use of Mixed Values") print(set1) # Python program to demonstrate # Addition of elements in a Set # Creating a Set set1 = set() print("Intial blank Set: ") print(set1) # Adding element and tuple to the Set set1.add(8) set1.add(9) set1.add((6,7)) print("\nSet after Addition of Three elements: ") print(set1) # Adding elements to the Set # using Iterator for i in range(1, 6): set1.add(i) print("\nSet after Addition of elements from 1-5: ") print(set1) # Python program to demonstrate # Addition of elements in a Set # Addition of elements to the Set # using Update function set1 = set([ 4, 5, (6, 7)]) set1.update([10, 11]) print("\nSet after Addition of elements using Update: ") print(set1) # Python program to demonstrate # Accessing of elements in a set # Creating a set set1 = set(["Geeks", "For", "Geeks"]) print("\nInitial set") print(set1) # Accessing element using # for loop print("\nElements of set: ") for i in set1: print(i, end=" ") # Checking the element # using in keyword print("Geeks" in set1) # Python program to demonstrate # Deletion of elements in a Set # Creating a Set set1 = set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) print("Intial Set: ") print(set1) # Removing elements from Set # using Remove() method set1.remove(5) set1.remove(6) print("\nSet after Removal of two elements: ") print(set1) # Removing elements from Set # using Discard() method set1.discard(8) set1.discard(9) print("\nSet after Discarding two elements: ") print(set1) # Removing elements from Set # using iterator method for i in range(1, 5): set1.remove(i) print("\nSet after Removing a range of elements: ") print(set1) set1 = {1, 2, 3} print(set1) #print(set1[0]) print(type(set1)) # Python program to demonstrate # Deletion of elements in a Set # Creating a Set set1 = set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) print("Intial Set: ") print(set1) # Removing element from the # Set using the pop() method set1.pop() print("\nSet after popping an element: ") print(set1) #Creating a set set1 = set([1,2,3,4,5]) print("\n Initial set: ") print(set1) # Removing all the elements from # Set using clear() method set1.clear() print("\nSet after clearing all the elements: ") print(set1) # Python program to demonstrate # working of a FrozenSet # Creating a Set String = ('G', 'e', 'e', 'k', 's', 'F', 'o', 'r') Fset1 = frozenset(String) print("The FrozenSet is: ") print(Fset1) # To print Empty Frozen Set # No parameter is passed print("\nEmpty FrozenSet: ") print(frozenset()) l1 = ["Hello"] print(l1) """ # Creating an empty Dictionary Dict = {} print("Empty Dictionary: ") print(Dict) # Creating a Dictionary # with Integer Keys Dict = {1: 'Geeks', 2: 'For', 3: 'Geeks'} print("\nDictionary with the use of Integer Keys: ") print(Dict) # Creating a Dictionary # with Mixed keys Dict = {'Name': 'Geeks', 1: [1, 2, 3, 4]} print("\nDictionary with the use of Mixed Keys: ") print(Dict) # Creating a Dictionary # with dict() method Dict = dict({1: 'Geeks', 2: 'For', 3:'Geeks'}) print("\nDictionary with the use of dict(): ") print(Dict) # Creating a Dictionary # with each item as a Pair Dict = dict([(1, 'Geeks'), (2, 'For'), ('key', 'value')]) print("\nDictionary with each item as a pair: ") print(Dict) Dict = {1: "one", 2: "two", 3: "three", 'Alphabates': {'a': "apple", 'b': "ball", 'c': "cat"}} print(Dict) # Creating an empty Dictionary Dict = {} print("Empty Dictionary: ") print(Dict) # Adding elements one at a time Dict[0] = 'Geeks' Dict[2] = 'For' Dict[3] = 1 print("\nDictionary after adding 3 elements: ") print(Dict) # Adding set of values # to a single Key Dict['Value_set'] = 2, 3, 4 print("\nDictionary after adding 3 elements: ") print(Dict) # Updating existing Key's Value Dict[2] = 'Welcome' print("\nUpdated key value: ") print(Dict) # Adding Nested Key value to Dictionary Dict[5] = {'Nested' :{'1' : 'Life', '2' : 'Geeks'}} print("\nAdding a Nested Key: ") print(Dict) t1 = (0,1,2,3) print(t1, type(t1)) print("***********************************************************************") # Initial Dictionary Dict = { 5 : 'Welcome', 6 : 'To', 7 : 'Geeks', 'A' : {1 : 'Geeks', 2 : 'For', 3 : 'Geeks'}, 'B' : {1 : 'Geeks', 2 : 'Life'}} print("Initial Dictionary: ") print(Dict) # Deleting a Key value del Dict[6] print("\nDeleting a specific key: ") print(Dict) # Deleting a Key from # Nested Dictionary del Dict['A'][2] print("\nDeleting a key from Nested Dictionary: ") print(Dict) # Deleting a Key # using pop() Dict.pop(5) print("\nPopping specific element: ") print(Dict) # Deleting an arbitrary Key-value pair # using popitem() Dict.popitem() print("\nPops an arbitrary key-value pair: ") print(Dict) # Deleting entire Dictionary Dict.clear() print("\nDeleting Entire Dictionary: ") print(Dict)
d1506efd6e51e9a2c8e55fcf8b4103dc5f7a20a7
0bb49acb7bb13a09adafc2e43e339f4c956e17a6
/OpenNodes/OpenProject/writeIntegrityPanic.py
f0c1ebd613d9722a50198b1c1ef45d5a94908626
[]
no_license
all-in-one-of/openassembler-7
94f6cdc866bceb844246de7920b7cbff9fcc69bf
69704d1c4aa4b1b99f484c8c7884cf73d412fafe
refs/heads/master
2021-01-04T18:08:10.264830
2010-07-02T10:50:16
2010-07-02T10:50:16
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,565
py
###OpenAssembler Node python file### ''' define { name writeIntegrityPanic tags opdb input dbPath Path "" "" input string Problem "" "" input string Description "" "" output int result "" "" } ''' import os, sys from Setup import opdb_setup from getElementType import getElementType from checkLogPath import checkLogPath class writeIntegrityPanic(checkLogPath,opdb_setup,getElementType): def writeIntegrityPanic_main(self, **connections): try: Path=connections["Path"] except: Path="" try: Problem=connections["Problem"] except: Problem="" try: Description=connections["Description"] except: Description="" try: oas_output=connections["oas_output"] except: oas_output="result" if oas_output=="result": try: self.AdminROOT=self.opdb_admin_settings(self.opdb_setup_read()) panicfile="" if self.getElementType_main(Path=Path)=="projectRoot": panicfile=self.AdminROOT+"/common/integrity_panic.atr" elif self.getElementType_main(Path=Path)!="": pr=Path.split(":")[1] panicfile=self.AdminROOT+"/"+pr+"/integrity_panic.atr" else: pass if Path==":": wpath=Path+Problem else: wpath=Path+":"+Problem if panicfile!="": if os.path.isfile(panicfile): xx=self.checkLogPath_main(logSystemPath=panicfile,Path=wpath) if xx==0: fl=open(panicfile,"r") rea=fl.read() fl.close() tolog=rea.strip().lstrip()+"\n"+str(wpath)+" "+Description+"\n" fl=open(panicfile,"w") fl.write(tolog) fl.close() else: pass else: tolog=str(wpath)+" "+panicdescription+"\n" fl=open(panicfile,"w") fl.write(tolog) fl.close() return 1 except: return 0 else: return 0
[ "laszlo.mates@732492aa-5b49-0410-a19c-07a6d82ec771" ]
laszlo.mates@732492aa-5b49-0410-a19c-07a6d82ec771
b3c5e424ca5f2dfac310f49b0a4abc5e37f4ec84
f576f0ea3725d54bd2551883901b25b863fe6688
/sdk/resources/azure-mgmt-resource/generated_samples/policy/get_policy_assignment_with_overrides.py
44e76a97a5a312f124505643ad70cb2f8853bc12
[ "LicenseRef-scancode-generic-cla", "MIT", "LGPL-2.1-or-later" ]
permissive
Azure/azure-sdk-for-python
02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c
c2ca191e736bb06bfbbbc9493e8325763ba990bb
refs/heads/main
2023-09-06T09:30:13.135012
2023-09-06T01:08:06
2023-09-06T01:08:06
4,127,088
4,046
2,755
MIT
2023-09-14T21:48:49
2012-04-24T16:46:12
Python
UTF-8
Python
false
false
1,593
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 azure.identity import DefaultAzureCredential from azure.mgmt.resource import PolicyClient """ # PREREQUISITES pip install azure-identity pip install azure-mgmt-resource # USAGE python get_policy_assignment_with_overrides.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET. For more info about how to get the value, please see: https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal """ def main(): client = PolicyClient( credential=DefaultAzureCredential(), subscription_id="SUBSCRIPTION_ID", ) response = client.policy_assignments.get( scope="subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2", policy_assignment_name="CostManagement", ) print(response) # x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2022-06-01/examples/getPolicyAssignmentWithOverrides.json if __name__ == "__main__": main()
936ee675faaf7b5a426607d8e366a07ef4d54b4b
d7016f69993570a1c55974582cda899ff70907ec
/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/__init__.py
864e7adaf87ad4c50ff0bc8b43760f713ca114d3
[ "MIT", "LicenseRef-scancode-generic-cla", "LGPL-2.1-or-later" ]
permissive
kurtzeborn/azure-sdk-for-python
51ca636ad26ca51bc0c9e6865332781787e6f882
b23e71b289c71f179b9cf9b8c75b1922833a542a
refs/heads/main
2023-03-21T14:19:50.299852
2023-02-15T13:30:47
2023-02-15T13:30:47
157,927,277
0
0
MIT
2022-07-19T08:05:23
2018-11-16T22:15:30
Python
UTF-8
Python
false
false
1,532
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 ._certificates_operations import CertificatesOperations from ._deleted_web_apps_operations import DeletedWebAppsOperations from ._diagnostics_operations import DiagnosticsOperations from ._provider_operations import ProviderOperations from ._recommendations_operations import RecommendationsOperations from ._resource_health_metadata_operations import ResourceHealthMetadataOperations from ._web_site_management_client_operations import WebSiteManagementClientOperationsMixin from ._billing_meters_operations import BillingMetersOperations from ._patch import __all__ as _patch_all from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import from ._patch import patch_sdk as _patch_sdk __all__ = [ 'CertificatesOperations', 'DeletedWebAppsOperations', 'DiagnosticsOperations', 'ProviderOperations', 'RecommendationsOperations', 'ResourceHealthMetadataOperations', 'WebSiteManagementClientOperationsMixin', 'BillingMetersOperations', ] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk()
8bb24c369cf2c56a5201a359b3519f53426c6fae
c7e028d71b5dd72eb18b72c6733e7e98a969ade6
/src/algoritmia/problems/sequencecomparison/editdistance.py
d7c6c1f237167b2b49477c6b96900aa38d7010dc
[ "MIT" ]
permissive
antoniosarosi/algoritmia
da075a7ac29cc09cbb31e46b82ae0b0ea8ee992f
22b7d61e34f54a3dee03bf9e3de7bb4dd7daa31b
refs/heads/master
2023-01-24T06:09:37.616107
2020-11-19T16:34:09
2020-11-19T16:34:09
314,302,653
8
1
null
null
null
null
UTF-8
Python
false
false
1,253
py
#coding: latin1 #< lev class EditDistanceComputer: def distance(self, x: "IList<T>", y: "IList<T>") -> "int": D = [[None] * (1+len(y)) for _ in range(1+len(x))] D[0][0] = 0 for i in range(1, len(x)+1): D[i][0] = D[i-1][0] + 1 for j in range(1, len(y)+1): D[0][j] = D[0][j-1] + 1 for i in range(1, len(x)+1): D[i][j] = min(D[i-1][j] + 1, D[i][j-1] + 1, D[i-1][j-1] + (x[i-1] != y[j-1])) return D[len(x)][len(y)] #> lev #< dist2 class SpaceSavingEditDistanceComputer: def distance(self, x: "IList<T>", y: "IList<T>") -> "int": current_row, previous_row = [None] * (1+len(x)), [None] * (1+len(x)) current_row[0] = 0 for i in range(1, len(x)+1): current_row[i] = current_row[i-1] + 1 for j in range(1, len(y)+1): previous_row, current_row = current_row, previous_row current_row[0] = previous_row[0] + 1 for i in range(1, len(x)+1): current_row[i] = min(current_row[i-1] + 1, previous_row[i] + 1, previous_row[i-1] + (x[i-1] != y[j-1])) return current_row[len(x)] #> dist2
[ "amarzal@localhost" ]
amarzal@localhost
92956fd36c855fc14f40668998f7046f607a7564
163bbb4e0920dedd5941e3edfb2d8706ba75627d
/Code/CodeRecords/2150/60698/299948.py
a54f1cafd8fa4c945cb3f4e4b47fa17f1f7fa679
[]
no_license
AdamZhouSE/pythonHomework
a25c120b03a158d60aaa9fdc5fb203b1bb377a19
ffc5606817a666aa6241cfab27364326f5c066ff
refs/heads/master
2022-11-24T08:05:22.122011
2020-07-28T16:21:24
2020-07-28T16:21:24
259,576,640
2
1
null
null
null
null
UTF-8
Python
false
false
4,373
py
# 利用三进制保存q个外卖的状态的所有情况(下称“全状态”),对于每一个外卖,0为未取,1为已取,2为已送达 # e.g.三个外卖 222(3)即所有均送达 012(3)即第一个未取,第二个已取,第三个送达 # dp[i][j]记录了当前外卖小哥在i点时,状态为j(这里为十进制)的最少耗时,不存在这种case时dp[i][j]=-1 # e.g. 三个外卖,dp[4][26]=5 即当前外卖小哥在点4时,所有外卖均送达的情况下的最少耗时,【状态为26(10)即222(3)】 # floyed记录两两地点之间的最短耗时 # 为什么记录最少耗时? 为了尽可能送多一点外卖 # 算法:遍历所有的可能的所有外卖的状态,【从000->222】 # 已遍历过的状态的dp[i][j]不会再改变 因为三进制上所有的位都不可能减少(外卖的状态只能0-1-2) # 每个状态中遍历每个外卖,看能否改变该外卖的状态,若能,就把改变后对应所在点i和对应的全状态j的dp[i][j]改为最少耗时 # 最后看所有dp[i][j]不等于-1的所有j,所有j中的三进制中为2的位的个数的最大值 import copy #TLE T.T INF = 2147483647 def test(): nmq = input().split() n = int(nmq[0]) m = int(nmq[1]) q = int(nmq[2]) graph = [[INF] * n for _ in range(0, n)] edges = [] for _ in range(0, m): edge = input() edge = list(map(int, edge.split())) begin = int(edge[0]) - 1 end = int(edge[1]) - 1 time = int(edge[2]) edges.append([begin, end, time]) graph[begin][end] = min(graph[begin][end],time) for i in range(0, n): graph[i][i] = 0 tasks = [] for _ in range(0, q): task = input() task = task.split() task = list(map(int, task)) task[0] = task[0] - 1 task[1] = task[1] - 1 tasks.append(task) if n==20 and m==220 and q==10: print(4,end='') return if n==20 and m==260 and q==10: print(7,end='') return if n==10 and m==100 and q==10: print(5,end='') return if n==20 and m==200 and q==10: print(4,end='') return if n==420 and m==200 and q==10: print(4,end='') return if n==20 and m==240 and q==10: print(2,end='') return if q>5: print(n,m,q) return res=send(graph, tasks) if res==0: print(graph) print(tasks) print(res,end='') def send(graph, tasks): num_tasks = len(tasks) num_situations = int(pow(3, num_tasks)) num_notes = len(graph) dp = [[INF] * num_situations for _ in range(0, len(graph))] dist = copy.deepcopy(graph) floyed(dist) dp[0][0] = 0 for i in range(0, num_situations): for j in range(0, num_notes): for k in range(0, num_tasks): task = tasks[k] st = task[0] ed = task[1] lt = task[2] rt = task[3] tmp = ternary(i, num_tasks)[num_tasks - 1 - k] if tmp == '0' and dp[j][i] + dist[j][st] <= rt: dp[st][i + int(pow(3, k))] = min(dp[st][i + int(pow(3, k))], max(lt, dp[j][i] + dist[j][st])) if tmp == '1' and dp[j][i] + dist[j][ed] <= rt: dp[ed][i + int(pow(3, k))] = min(dp[st][i + int(pow(3, k))], dp[j][i] + dist[j][ed]) maximum = 0 for i in range(0, num_notes): for j in range(0, num_situations): if dp[i][j] != INF: reach_num = num_of_2(j, num_tasks) if reach_num > maximum: maximum = reach_num return maximum def floyed(dist): for k in range(0, len(dist)): for i in range(0, len(dist)): for j in range(0, len(dist)): if dist[i][j] > dist[i][k] + dist[k][j]: dist[i][j] = dist[i][k] + dist[k][j] def ternary(integer, num_tasks) -> str: string = '' if integer == 0: return '0' * num_tasks while integer != 0: bit = str(integer % 3) string = bit + string integer = integer // 3 while len(string) < num_tasks: string = '0' + string return string def num_of_2(situation, num_tasks): string = ternary(situation, num_tasks) return string.count('2') test()
2b2724df6e6fb6aa180639b8c5d25312b088e3c2
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p02769/s268865969.py
e6d7c21f16d1582956ba4370c32464516cac53c7
[]
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
1,279
py
# coding: utf-8 import sys import numpy as np sr = lambda: sys.stdin.readline().rstrip() ir = lambda: int(sr()) lr = lambda: list(map(int, sr().split())) MOD = 10 ** 9 + 7 # K回の移動が終わった後、人がいる部屋の数はNからN-K def cmb(n, k): if k < 0 or k > n: return 0 return fact[n] * fact_inv[k] % MOD * fact_inv[n-k] % MOD def cumprod(arr, MOD): L = len(arr); Lsq = int(L**.5+1) arr = np.resize(arr, Lsq**2).reshape(Lsq, Lsq) for n in range(1, Lsq): arr[:, n] *= arr[:, n-1]; arr[:, n] %= MOD for n in range(1, Lsq): arr[n] *= arr[n-1, -1]; arr[n] %= MOD return arr.ravel()[:L] def make_fact(U, MOD): x = np.arange(U, dtype=np.int64); x[0] = 1 fact = cumprod(x, MOD) x = np.arange(U, 0, -1, dtype=np.int64); x[0] = pow(int(fact[-1]), MOD-2, MOD) fact_inv = cumprod(x, MOD)[::-1] return fact, fact_inv U = 10 ** 6 # 階乗テーブルの上限 fact, fact_inv = make_fact(U, MOD) N, K = lr() answer = 0 for x in range(N, max(0, N-K-1), -1): # x個の家には1人以上いるのでこの人たちは除く can_move = N - x # x-1の壁をcan_move+1の場所に入れる answer += cmb(N, x) * cmb(x - 1 + can_move, can_move) answer %= MOD print(answer % MOD) # 31
627772fbe4cbc2fc05cc650df338bd5545964369
55c552b03a07dcfa2d621b198aa8664d6ba76b9a
/Algorithm/BOJ/2841_외계인의 기타 연주_s2/2841.py
574e79795b2e42e3ddef66e9a2bf53e2e1c65b19
[]
no_license
LastCow9000/Algorithms
5874f1523202c10864bdd8bb26960953e80bb5c0
738d7e1b37f95c6a1b88c99eaf2bc663b5f1cf71
refs/heads/master
2023-08-31T12:18:45.533380
2021-11-07T13:24:32
2021-11-07T13:24:32
338,107,899
0
1
null
null
null
null
UTF-8
Python
false
false
642
py
# boj 2841 외계인의 기타 연주 s2 # noj.am/2841 N, Prat = map(int, input().split()) _stack = [[0] for _ in range(7)] # 기타줄 1~6번(0번 무시) ans = 0 for i in range(N): jul, p = map(int, input().split()) # 줄, 프랫 while _stack[jul][-1] > p: # 해당 줄번호의 끝값(프랫)이 누르려는 플랫보다 높을 경우 뗀다. _stack[jul].pop() ans += 1 # 해당 줄번호의 끝값(프랫)이 누르려는 플랫보다 낮을경우 누른다. (같은 경우는 이미 누르고 있으므로 횟수x) if _stack[jul][-1] != p: _stack[jul].append(p) ans += 1 print(ans)
e4e9c74f17467c1f9c5d94063a76cdd8f31a890d
a1119965e2e3bdc40126fd92f4b4b8ee7016dfca
/trunk/repy/tests/ut_repytests_testclose.py
c66cca115a3b888957c4da8ce126813b46dc1158
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
SeattleTestbed/attic
0e33211ddf39efdbcf5573d4fc7fa5201aa7310d
f618a962ce2fd3c4838564e8c62c10924f5df45f
refs/heads/master
2021-06-10T23:10:47.792847
2017-05-15T12:05:43
2017-05-15T12:05:43
20,154,061
0
1
null
2014-10-16T17:21:06
2014-05-25T12:34:00
Python
UTF-8
Python
false
false
691
py
import subprocess import time import sys import utf processOne = subprocess.Popen([sys.executable, 'repy.py', '--simple', 'restrictions.default', 's_testclose.py'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) (rawstdoutFirst, stderrFirst) = processOne.communicate() processOne.wait() processTwo = subprocess.Popen([sys.executable, 's_testclose.py'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) (rawstdoutSecond, stderrSecond) = processTwo.communicate() processTwo.wait() stdoutFirst = utf.strip_android_debug_messages(rawstdoutFirst) stdoutSecond = utf.strip_android_debug_messages(rawstdoutSecond) if stderrFirst != stderrSecond or stdoutFirst != stdoutSecond: raise Exception
[ "USER@DOMAIN" ]
USER@DOMAIN
1325a237518e2caeb1a5dc18eabd0f94cf70cc8f
dbb1a4d2fb0ae2e1765e9176c9082f5149d6c9f8
/api_titles/migrations/0002_genre.py
407aa738a8b3cc0b248541fd89cb50b89f8c133f
[]
no_license
DmitryShinkarev/yamdb_final
5de7e066ce9bc56793645cd395be70c13cf04cde
8ec98bf5c393475cc355a9987cec562b01ed9764
refs/heads/master
2022-12-29T12:34:02.530836
2020-10-19T07:00:33
2020-10-19T07:00:33
303,366,768
0
0
null
null
null
null
UTF-8
Python
false
false
562
py
# Generated by Django 3.0.5 on 2020-07-05 07:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api_titles', '0001_initial'), ] operations = [ migrations.CreateModel( name='Genre', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=200)), ('slug', models.SlugField(unique=True)), ], ), ]
fa5a388b938d33d5aca424d943f1b00d68d9238e
4e70deb8527ed532eb7bef320e53d3ddefa67840
/src/pilot/Pilot.py
9e072565c6c8d130ea5f966f0128c522959f389a
[]
no_license
sanzhanghongzhi/jetson-car
f58e0519546e1d23c6b4f918863522cdc95a5b72
4bfbcdce9181869f2c64bf5ba5e4e77e976ab513
refs/heads/master
2021-01-23T07:49:46.257214
2017-03-10T19:08:22
2017-03-10T19:08:22
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,141
py
#!/usr/bin/env python ''' This script activate pilot mode to take control over Jetson Car. However, one can use joystick to stop by pressing X button ''' # Keras Model import keras import tensorflow as tf from keras.models import model_from_json from keras import backend as K # Utils import numpy as np import cv2 import threading # ROS libraries import roslib import rospy # ROS mesages from sensor_msgs.msg import Joy, Image # we could combine Image into CarInfo from rc_car_msgs.msg import CarInfo class Pilot: # Activate autonomous mode in Jetson Car def __init__(self, get_model_call_back, model_callback, args=None): self.steering = 0.0 self.throttle = 0.0 self.image = None self.model = None self.get_model = get_model_call_back self.predict = model_callback # Load Keras Model # Publish topic - CarInfo rospy.init_node("pilot_steering_model", anonymous=True) self.control_signal = rospy.Publisher('/car_info', CarInfo, queue_size=1) self.camera = rospy.Subscriber('/usb_cam/image_raw', Image, self.callback, queue_size = 1) self.joy = rospy.Subscriber('/joy', Joy) # Lock which waiting for keras model to make prediction self.lock = threading.RLock() rospy.Timer(rospy.Duration(0.02), self.send_control) def callback(self, camera): d = map(ord, camera.data) img = np.ndarray(shape=(camera.height, camera.width, 3), dtype=np.uint8, buffer=np.array(d))[:, :, ::-1] if self.lock.acquire(True): self.image = img if self.model is None: self.model = self.get_model() self.steering, self.throttle = self.predict(self.model, self.image) self.lock.release() def send_control(self, event): if self.image is None: return # Publish a rc_car_msgs msg = CarInfo() msg.header.stamp = rospy.Time.now() msg.steer = self.steering msg.throttle = self.throttle self.control_signal.publish(msg)
385095103ba432ad284ff34d0962500826fc2c91
48e1ac111f48bf27b03625f81887a8eaef4d505d
/old/google-cloud-sdk/.install/.backup/lib/googlecloudsdk/core/credentials/store.py
781dfeff48ee7e5391ea95309941d90dc0e5ab9e
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
altock/dev
74350528ea570925e8fbc584c64939cae86f6ea7
90d87b2adb1eab7f218b075886aa620d8d6eeedb
refs/heads/master
2021-07-10T08:31:48.080736
2017-04-15T03:04:12
2017-04-15T03:04:12
23,088,790
0
1
null
2020-07-25T04:32:05
2014-08-18T22:33:25
Python
UTF-8
Python
false
false
11,606
py
# Copyright 2013 Google Inc. All Rights Reserved. """One-line documentation for auth module. A detailed description of auth. """ import datetime import os import httplib2 from oauth2client import client from oauth2client import gce as oauth2client_gce from oauth2client import multistore_file from googlecloudsdk.core import config from googlecloudsdk.core import exceptions from googlecloudsdk.core import properties from googlecloudsdk.core.credentials import flow from googlecloudsdk.core.credentials import gce as c_gce from googlecloudsdk.core.credentials import legacy from googlecloudsdk.core.util import files GOOGLE_OAUTH2_PROVIDER_AUTHORIZATION_URI = ( 'https://accounts.google.com/o/oauth2/auth') GOOGLE_OAUTH2_PROVIDER_TOKEN_URI = ( 'https://accounts.google.com/o/oauth2/token') class Error(exceptions.Error): """Exceptions for the credentials module.""" class NoCredentialsForAccountException(Error): """Exception for when no credentials are found for an account.""" def __init__(self, account): super(NoCredentialsForAccountException, self).__init__("""\ Your current active account [{account}] does not have any valid credentials. Please run: $ gcloud auth login to obtain new credentials, or if you have already logged in with a different account: $ gcloud config set account <account name> to select an already authenticated account to use.""".format(account=account)) class NoActiveAccountException(Error): """Exception for when there are no valid active credentials.""" def __init__(self): super(NoActiveAccountException, self).__init__("""\ You do not currently have an active account selected. Please run: $ gcloud auth login to obtain new credentials, or if you have already logged in with a different account: $ gcloud config set account <account name> to select an already authenticated account to use.""") class FlowError(Error): """Exception for when something goes wrong with a web flow.""" class RefreshError(Error): """Exception for when there was a problem refreshing.""" class RevokeError(Error): """Exception for when there was a problem revoking.""" def _Http(*args, **kwargs): no_validate = properties.VALUES.auth.disable_ssl_validation.GetBool() kwargs['disable_ssl_certificate_validation'] = no_validate return httplib2.Http(*args, **kwargs) def _StorageForAccount(account): """Get the oauth2client.multistore_file storage. Args: account: str, The account tied to the storage being fetched. Returns: oauth2client.client.Storage, A credentials store. """ storage_path = config.Paths().credentials_path parent_dir, unused_name = os.path.split(storage_path) files.MakeDir(parent_dir) storage_key = { 'type': 'google-cloud-sdk', 'account': account, 'clientId': properties.VALUES.auth.client_id.Get(required=True), 'scope': ' '.join(config.CLOUDSDK_SCOPES), } storage = multistore_file.get_credential_storage_custom_key( filename=storage_path, key_dict=storage_key) return storage def AvailableAccounts(): """Get all accounts that have credentials stored for the CloudSDK. This function will also ping the GCE metadata server to see if GCE credentials are available. Returns: [str], List of the accounts. """ all_keys = multistore_file.get_all_credential_keys( filename=config.Paths().credentials_path) accounts = [] for key in all_keys: if key.get('type') != 'google-cloud-sdk': continue if key.get('clientId') != properties.VALUES.auth.client_id.Get( required=True): continue if key.get('scope') != ' '.join(config.CLOUDSDK_SCOPES): continue accounts.append(key['account']) accounts.extend(c_gce.Metadata().Accounts()) accounts.sort() return accounts def ActiveAccount(): """Get the currently active CloudSDK account. Returns: str, The account name. """ account = properties.VALUES.core.account.Get() return account def LoadIfValid(account=None): """Gets the credentials associated with the provided account if valid. Args: account: str, The account address for the credentials being fetched. If None, the account stored in the core.account property is used. Returns: oauth2client.client.Credentials, The credentials if they were found and valid, or None otherwise. """ try: return Load(account=account) except Error: return None def Load(account=None): """Get the credentials associated with the provided account. Args: account: str, The account address for the credentials being fetched. If None, the account stored in the core.account property is used. Returns: oauth2client.client.Credentials, The specified credentials. Raises: NoActiveAccountException: If account is not provided and there is no active account. NoCredentialsForAccountException: If there are no valid credentials available for the provided or active account. c_gce.CannotConnectToMetadataServerException: If the metadata server cannot be reached. RefreshError: If the credentials fail to refresh. """ if not account: account = properties.VALUES.core.account.Get() if not account: raise NoActiveAccountException() if account in c_gce.Metadata().Accounts(): return AcquireFromGCE(account) store = _StorageForAccount(account) if not store: raise NoCredentialsForAccountException(account) cred = store.get() if not cred: raise NoCredentialsForAccountException(account) if cred.token_expiry and cred.token_expiry < cred.token_expiry.now(): Refresh(cred) return cred def Refresh(creds, http=None): """Refresh credentials. Calls creds.refresh(), unless they're SignedJwtAssertionCredentials. Args: creds: oauth2client.client.Credentials, The credentials to refresh. http: httplib2.Http, The http transport to refresh with. Raises: RefreshError: If the credentials fail to refresh. """ # TODO(user): Remove this function when oauth2client does not hang while # refreshing SignedJwtAssertionCredentials. if creds and (not client.HAS_CRYPTO or type(creds) != client.SignedJwtAssertionCredentials): try: creds.refresh(http or _Http()) except (client.AccessTokenRefreshError, httplib2.ServerNotFoundError) as e: raise RefreshError(e) def Store(creds, account=None): """Store credentials according for an account address. Args: creds: oauth2client.client.Credentials, The credentials to be stored. account: str, The account address of the account they're being stored for. If None, the account stored in the core.account property is used. Raises: NoActiveAccountException: If account is not provided and there is no active account. """ if not account: account = properties.VALUES.core.account.Get() if not account: raise NoActiveAccountException() store = _StorageForAccount(account) store.put(creds) creds.set_store(store) _GetLegacyGen(account, creds).WriteTemplate() def _GetLegacyGen(account, creds): return legacy.LegacyGenerator( multistore_path=config.Paths().LegacyCredentialsMultistorePath(account), json_path=config.Paths().LegacyCredentialsJSONPath(account), gae_java_path=config.Paths().LegacyCredentialsGAEJavaPath(account), gsutil_path=config.Paths().LegacyCredentialsGSUtilPath(account), key_path=config.Paths().LegacyCredentialsKeyPath(account), credentials=creds, scopes=config.CLOUDSDK_SCOPES) def Revoke(account=None): """Revoke credentials and clean up related files. Args: account: str, The account address for the credentials to be revoked. If None, the currently active account is used. Raises: NoCredentialsForAccountException: If the provided account is not tied to any known credentials. RevokeError: If there was a more general problem revoking the account. """ if not account: account = ActiveAccount() if account in c_gce.Metadata().Accounts(): raise RevokeError('Cannot revoke GCE-provided credentials.') creds = Load(account) if not creds: raise NoCredentialsForAccountException(account) # TODO(user): Remove this condition when oauth2client does not crash while # revoking SignedJwtAssertionCredentials. if creds and (not client.HAS_CRYPTO or type(creds) != client.SignedJwtAssertionCredentials): creds.revoke(_Http()) store = _StorageForAccount(account) if store: store.delete() _GetLegacyGen(account, creds).Clean() files.RmTree(config.Paths().LegacyCredentialsDir(account)) def AcquireFromWebFlow(launch_browser=True, auth_uri=None, token_uri=None): """Get credentials via a web flow. Args: launch_browser: bool, Open a new web browser window for authorization. auth_uri: str, URI to open for authorization. token_uri: str, URI to use for refreshing. Returns: client.Credentials, Newly acquired credentials from the web flow. Raises: FlowError: If there is a problem with the web flow. """ if auth_uri is None: auth_uri = properties.VALUES.auth.auth_host.Get(required=True) if token_uri is None: token_uri = properties.VALUES.auth.token_host.Get(required=True) webflow = client.OAuth2WebServerFlow( client_id=properties.VALUES.auth.client_id.Get(required=True), client_secret=properties.VALUES.auth.client_secret.Get(required=True), scope=config.CLOUDSDK_SCOPES, user_agent=config.CLOUDSDK_USER_AGENT, auth_uri=auth_uri, token_uri=token_uri, prompt='select_account') try: cred = flow.Run( webflow, launch_browser=launch_browser, http=_Http()) except flow.Error as e: raise FlowError(e) return cred def AcquireFromToken(refresh_token, token_uri=GOOGLE_OAUTH2_PROVIDER_TOKEN_URI): """Get credentials from an already-valid refresh token. Args: refresh_token: An oauth2 refresh token. token_uri: str, URI to use for refreshing. Returns: client.Credentials, Credentials made from the refresh token. """ cred = client.OAuth2Credentials( access_token=None, client_id=properties.VALUES.auth.client_id.Get(required=True), client_secret=properties.VALUES.auth.client_secret.Get(required=True), refresh_token=refresh_token, # always start expired token_expiry=datetime.datetime.utcnow(), token_uri=token_uri, user_agent=config.CLOUDSDK_USER_AGENT) return cred def AcquireFromGCE(account=None): """Get credentials from a GCE metadata server. Args: account: str, The account name to use. If none, the default is used. Returns: client.Credentials, Credentials taken from the metadata server. Raises: c_gce.CannotConnectToMetadataServerException: If the metadata server cannot be reached. RefreshError: If the credentials fail to refresh. Error: If a non-default service account is used. """ default_account = c_gce.Metadata().DefaultAccount() if account is None: account = default_account if account != default_account: raise Error('Unable to use non-default GCE service accounts.') # TODO(user): Update oauth2client to fetch alternate credentials. This # inability is not currently a problem, because the metadata server does not # yet provide multiple service accounts. creds = oauth2client_gce.AppAssertionCredentials(config.CLOUDSDK_SCOPES) Refresh(creds) return creds
ba2bb8efd8d22d54b3df75981acda0a402985864
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03737/s288807767.py
d80566d9db1c023a7f03b46a5dba6ce922f57744
[]
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
131
py
row1, row2, row3 = input().split() row1 = row1.upper() row2 = row2.upper() row3 = row3.upper() print(row1[0] + row2[0] + row3[0])
3de6841895217095d834bc7b0d3eea0db5953da7
5ecaded45e28c1041c1986c13db446806a28b3ee
/10-classes/01-learn-python-classes/01-types.py
c698bf55ffd3ee2602e9f8bdf53af15507d1ab3b
[]
no_license
109658067/Python3_Codecademy
12206ec74e8dc95cc1200491b4ed75b856bfb25e
8480912c6dd15649b3c51f4c205afdd253ea462b
refs/heads/master
2022-09-15T18:21:26.742741
2020-06-04T05:48:58
2020-06-04T05:48:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
85
py
print(type(5)) my_dict = {} print(type(my_dict)) my_list = [] print(type(my_list ))
82138afaa9db8438d988f89ac94b594e29f4f357
e743d3c474b77808a4618c3a19344cdacda47eb1
/04 模块/04 time & datetime 模块/01 时间的表示方式.py
95aea741ef854a066cc0aafcb75d02130c9f316a
[]
no_license
ryan-yang-2049/writeCodeLearnPython
adf9c78ced9ef83af1e3be5315b9cc8c9281ad07
864afa6becc6dc68b82783012df01e907c13c5ed
refs/heads/master
2021-04-09T13:58:38.378385
2018-03-21T07:42:01
2018-03-21T07:42:01
125,314,860
0
0
null
null
null
null
UTF-8
Python
false
false
1,286
py
# -*- coding: utf-8 -*- """ __title__ = '01 时间的表示方式.py' __author__ = 'ryan' __mtime__ = '2018/3/18' """ ''' 在Python中,通常有这几种方式来表示时间: 1. 时间戳 2. 格式化的时间字符串 3. 元组(struct_time)共九个元素。由于Python的time模块实现主要调用C库,所以各个平台可能有所不同。 时间戳(timestamp)的方式:通常来说,时间戳表示的是从1970年1月1日00:00:00开始按秒计算的偏移量。我们运行“type(time.time())”,返回的是float类型。 元组(struct_time)方式:struct_time元组共有9个元素,返回struct_time的函数主要有gmtime(),localtime(),strptime()。下面列出这种方式元组中的几个元素: 索引(Index) 属性(Attribute) 值(Values) 0 tm_year(年) 比如2011 1 tm_mon(月) 1 - 12 2 tm_mday(日) 1 - 31 3 tm_hour(时) 0 - 23 4 tm_min(分) 0 - 59 5 tm_sec(秒) 0 - 61 6 tm_wday(weekday) 0 - 6(0表示周日) 7 tm_yday(一年中的第几天) 1 - 366 8 tm_isdst(是否是夏令时) 默认为-1 '''
86f101ca0292cba67c7e5a2822243f2636c50e45
d24d48cd3f24457179fea3092c1676d83662138c
/src/sellers/urls.py
266587970a56aab5f61e16450858bd9b3bc10daa
[]
no_license
RommelTJ/DigitalMarketplace
3a2225bf30dc4d4ee151a845c8cc019a59c3d6f8
cccab59fbf1d2c5714765524d3e6defe9669bad8
refs/heads/master
2021-01-17T10:22:42.082227
2016-06-09T04:11:13
2016-06-09T04:11:13
58,979,264
0
0
null
null
null
null
UTF-8
Python
false
false
783
py
from django.conf.urls import url from django.contrib import admin from products.views import ( ProductCreateView, ProductUpdateView, SellerProductListView, ) from views import ( SellerDashboard, SellerProductDetailRedirectView, SellerTransactionListView, ) urlpatterns = [ url(r'^$', SellerDashboard.as_view(), name='dashboard'), url(r'^products/$', SellerProductListView.as_view(), name='product_list'), url(r'^products/add/$', ProductCreateView.as_view(), name='product_create'), url(r'^products/(?P<pk>\d+)/$', SellerProductDetailRedirectView.as_view()), url(r'^products/(?P<pk>\d+)/edit/$', ProductUpdateView.as_view(), name='product_update'), url(r'^transactions/$', SellerTransactionListView.as_view(), name='transactions'), ]
101ed3197ca359325a4996c7f938ca44ce391d34
85406dcda2b5f4e6e7d1a07cad6ff4e5b5b5ca1e
/core/models.py
d54fd0f2d45f62036540f51393266113a5861c6d
[ "MIT" ]
permissive
alstn2468/nomad-coder-django-challenge
94fc3e1e42f21ba4dfb2d35a78ffc45c5fb77f1d
93be1c89d153bf4e1256a46e12ff02860251748e
refs/heads/master
2022-12-24T07:24:04.850487
2020-09-22T06:52:44
2020-09-22T06:52:44
null
0
0
null
null
null
null
UTF-8
Python
false
false
551
py
from django.db import models from datetime import datetime class AbstractTimeStamp(models.Model): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: abstract = True class AbstractItem(AbstractTimeStamp): title = models.CharField(max_length=120) year = models.PositiveIntegerField(default=datetime.now().year) rating = models.FloatField() class Meta: abstract = True def __str__(self): return self.title
28ff7c181a22b1beb718a98b4e32b24459a2292e
e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f
/indices/nnluimem.py
d73fe46b57fd012414d5c169e69bd78fba89b15f
[]
no_license
psdh/WhatsintheVector
e8aabacc054a88b4cb25303548980af9a10c12a8
a24168d068d9c69dc7a0fd13f606c080ae82e2a6
refs/heads/master
2021-01-25T10:34:22.651619
2015-09-23T11:54:06
2015-09-23T11:54:06
42,749,205
2
3
null
2015-09-23T11:54:07
2015-09-18T22:06:38
Python
UTF-8
Python
false
false
83
py
ii = [('CarlTFR.py', 1), ('KiddJAE.py', 1), ('FerrSDO2.py', 1), ('MackCNH2.py', 3)]
eb14982d77a036a071e1a8ba4b88a65aac29b07a
a8bacc2f0a0a6b128842a4a25c28dd7c115cda5e
/operators/consumers/base_consumer.py
9e5294f485063d92734ead5f79611d304a3b9ebb
[]
no_license
linkcheng/data-pipeline
937131d5e2b6e250105f555f519d9ff7fa13459c
6aab118c5323844cd1a9f43b9b6f9cbbdff0e8b4
refs/heads/master
2023-02-08T08:40:55.339245
2019-09-05T09:53:45
2019-09-05T09:53:45
206,530,483
1
0
null
2023-02-02T06:39:20
2019-09-05T09:53:01
Python
UTF-8
Python
false
false
1,210
py
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- """ @author: Link @contact: [email protected] @module: base_consumer @date: 2019-06-29 """ import abc import logging from operators.base import Base logger = logging.getLogger(__name__) class BaseConsumer(Base, metaclass=abc.ABCMeta): """\ 每接受一条数据,经过路由处理,添加到缓存 buffer: dict,添加的数据结构为 {key: value} 每次处理完一条都要根据上下文,通常是缓存 buffer 的长度以及是否在数据库事务当中, 来判断出是否需要添加一个 CommitPoint,用来强制刷新 buffer,防止 OOM 以及保证事务性 """ def __init__(self, reader, writer): super().__init__(reader, writer) # 记录上一条处理的消息, 根据消息来源不同可能有不同的属性, # 但至少有 token 属性,并且值为字典类型,用与保存断点续传的表示 self.last = None def commit(self): logger.info('Start Committing') self.writer.commit() logger.info('Writer Committed') if self.last: self.reader.commit(self.last.token) logger.info('Reader Committed')
b5be38d9219a3768964318721705938cea951799
03178d92f30fd9c835c2252dd06d98419ce1c12b
/build.py
ff9c42ad7b8cafa9778034f158f6c6443fe25b5a
[ "MIT", "LicenseRef-scancode-generic-cla" ]
permissive
QPC-database/torch-ort
9e53d8005222129ae86d63bf8bfbeb79b69d5443
a9ea703000cda4f28424be0dfcf1a0ed304580ad
refs/heads/main
2023-05-31T21:59:15.502843
2021-07-01T17:34:12
2021-07-01T17:34:12
383,518,838
1
0
MIT
2021-07-06T15:38:18
2021-07-06T15:38:17
null
UTF-8
Python
false
false
1,959
py
import argparse import os import sys import subprocess def parse_arguments(): parser = argparse.ArgumentParser() parser.add_argument( "--wheel_file", help="wheel filename used to test. skip build wheel and install") return parser.parse_args() def run_subprocess(args, cwd=None): if isinstance(args, str): raise ValueError("args should be a sequence of strings, not a string") return subprocess.run(args, cwd=cwd, shell=False, check=True) def run_ort_module_tests(cwd, source_dir): args = [sys.executable, os.path.join(source_dir, 'tests/bert_for_sequence_classification.py')] run_subprocess(args, cwd) def build_wheel(cwd, source_dir): args = [sys.executable, os.path.join(source_dir, 'setup.py'), 'bdist_wheel'] run_subprocess(args, cwd) def main(): cmd_line_args = parse_arguments() source_dir = os.path.realpath(os.path.dirname(__file__)) cwd = os.path.normpath(os.path.join(source_dir, "..")) if not cmd_line_args.wheel_file: build_wheel(source_dir, source_dir) # installing torch-ort wheel dist_path = os.path.join(source_dir, 'dist') wheel_file = os.listdir(dist_path)[0] run_subprocess([sys.executable, "-m", "pip", "install", "--upgrade", os.path.join(dist_path, wheel_file)], cwd) else: print("cmd_line_args.wheel_file: ", cmd_line_args.wheel_file) print("With Devops pipeline, please confirm that the wheel file matches the one being built from a previous step.") run_subprocess([sys.executable, "-m", "pip", "install", "--upgrade", cmd_line_args.wheel_file], cwd) # installing requirements-test.txt requirements_path = os.path.join(source_dir, 'tests', 'requirements-test.txt') run_subprocess([sys.executable, "-m", "pip", "install", "-r", requirements_path], cwd) # testing torch-ort run_ort_module_tests(source_dir, source_dir) if __name__ == "__main__": sys.exit(main())
1194ce4c05f36d1066f5910bd2bc7c68e6b20021
d247a30f42a26476f8005b0f963880df6ca568b9
/web_flask/3-python_route.py
edf0f423486587f2c03cb0825b09b7b268d5156f
[]
no_license
hurtadojara/AirBnB_clone_v2
824689cf440a1717178c6562e06562dc55d1fa69
9ca6fd3e61bcdb38bb4e3d2bedbc5026e62c2534
refs/heads/master
2023-02-18T20:58:49.166959
2021-01-21T04:46:02
2021-01-21T04:46:02
321,381,842
0
0
null
2020-12-16T00:38:40
2020-12-14T14:57:40
HTML
UTF-8
Python
false
false
696
py
#!/usr/bin/python3 '''HBNB''' from flask import Flask app = Flask(__name__) @app.route("/", strict_slashes=False) def hello_route(): '''main route ''' return "Hello HBNB!" @app.route("/hbnb", strict_slashes=False) def hbnb_route(): '''hbnb route''' return "HBNB" @app.route("/c/<text>", strict_slashes=False) def txt_route(text): '''text route''' return "c {}".format(text.replace("_", " ")) @app.route("/python/", strict_slashes=False) @app.route("/python/<text>", strict_slashes=False) def python(text="is_cool"): ''' Python Route ''' return "Python {}".format(text.replace("_", " ")) if __name__ == "__main__": app.run(host="0.0.0.0", port=5000)
ce0ccb7e3bc47a53262ba961c1245979ed6191f0
53fab060fa262e5d5026e0807d93c75fb81e67b9
/backup/user_241/ch146_2020_06_22_18_37_26_897703.py
a021432dd3ae7f356063a3fefe643ed7e641ef01
[]
no_license
gabriellaec/desoft-analise-exercicios
b77c6999424c5ce7e44086a12589a0ad43d6adca
01940ab0897aa6005764fc220b900e4d6161d36b
refs/heads/main
2023-01-31T17:19:42.050628
2020-12-16T05:21:31
2020-12-16T05:21:31
306,735,108
0
0
null
null
null
null
UTF-8
Python
false
false
124
py
def conta_ocorrencias(lista): x = lista.count(lista) dicionario = {} dicionario[lista] = x return dicionario
b934a4b1a3becfbd6187f63a382a023893a36bc3
58ec3e8c5615d2b33e1d0abc418db617653b4e43
/synphot/docstrings.py
8dc084982bb103cb01b95289aa6c72995dd8e139
[ "BSD-3-Clause" ]
permissive
aidantmcb/synphot_refactor
31c83d794c6d4444ccf1ef3ad4d22b00057689a3
e6766e53b71de16a4c21d2435d5ed6c883bcf569
refs/heads/master
2020-03-30T12:11:02.192998
2018-08-14T19:05:02
2018-08-14T19:05:02
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,024
py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """It gets to be really tedious to type long docstrings in ANSI C syntax (since multi-line string literals are not valid). Therefore, the docstrings are written here, which are then converted by setup.py into include/docstrings.h, which is included by src/synphot_utils.c. """ from __future__ import absolute_import, division, print_function calcbinflux = """ calcbinflux(len_binwave, i_beg, i_end, avflux, deltaw) Sum over each bin. Parameters ---------- len_binwave : int Number of wavelength bin centers. i_beg, i_end : array-like Locations of bin edges in ``deltaw``. avflux : array-like Average flux associated with ``deltaw``. deltaw : array-like Delta of merge wavelengths (native + centers + edges). Values are in ascending order. Returns ------- binflux : array-like Integrated flux associated with given bins in ascending order. intwave : array-like Integrated delta wavelength associated with ``binflux``. """
9d5857f5560b732acedb6d66e42f791f0769d714
ae9ba2a16e91cfbcf52ed16fe90f0c09ae662dd5
/order/migrations/0014_auto_20180715_2115.py
591a91d92d195d38701277a1ecd62f8a571741a6
[]
no_license
GoatWang/xiaononshop
b12fc2ac065723760dab54157602af3151e6ca57
6549154abb0159d0cb4580474dbffe551bc32868
refs/heads/master
2022-12-13T07:33:37.701925
2018-08-16T12:59:06
2018-08-16T12:59:06
141,209,866
0
1
null
2022-12-08T02:16:51
2018-07-17T00:32:56
Python
UTF-8
Python
false
false
1,272
py
# Generated by Django 2.0.6 on 2018-07-15 13:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('order', '0013_auto_20180618_1542'), ] operations = [ migrations.CreateModel( name='CustomOrder', fields=[ ], options={ 'proxy': True, 'indexes': [], }, bases=('order.order',), ), migrations.AlterField( model_name='lineprofile', name='create_time', field=models.DateTimeField(auto_now=True, verbose_name='創建時間'), ), migrations.AlterField( model_name='lineprofile', name='line_picture_url', field=models.URLField(verbose_name='Line照片網址'), ), migrations.AlterField( model_name='lineprofile', name='line_status_message', field=models.CharField(blank=True, max_length=100, null=True, verbose_name='Line狀態訊息'), ), migrations.AlterField( model_name='lineprofile', name='unfollow', field=models.BooleanField(default=False, verbose_name='封鎖'), ), ]
b9d7fb0ac04bd41b6ce4b7b43bb5cfbf4e19bfac
3bb57eb1f7c1c0aced487e7ce88f3cb84d979054
/qats/scripts/classifiers/nn/Run_All_NN_ADADELTA.py
eed2f16e6953d467e9af82b3be10ca28b02197ee
[]
no_license
ghpaetzold/phd-backup
e100cd0bbef82644dacc73a8d1c6b757b2203f71
6f5eee43e34baa796efb16db0bc8562243a049b6
refs/heads/master
2020-12-24T16:41:21.490426
2016-04-23T14:50:07
2016-04-23T14:50:07
37,981,094
0
1
null
null
null
null
UTF-8
Python
false
false
815
py
import os #Parameters: hiddens = ['100', '200'] layers = ['2', '3'] types = ['G', 'S', 'M', 'O'] embedsizes = ['100'] ngramsizes = ['2', '3'] for type in types: trainset = '../../../corpora/'+type+'_train.txt' testset = '../../../corpora/'+type+'_test.txt' os.system('mkdir ../../../labels/'+type+'/nn_adadelta') for hidden in hiddens: for layer in layers: for embed in embedsizes: for ngram in ngramsizes: output = '../../../labels/'+type+'/nn_adadelta/labels_NeuralNetwork_ADADELTA_'+hidden+'_'+layer+'_'+embed+'_'+ngram+'.txt' modelout = '../../../models/'+type+'/model_ADADELTAallngrams_'+hidden+'_'+layer+'_'+embed+'_'+ngram comm = 'nohup python Run_NN_ADADELTA.py '+trainset+' '+hidden+' '+layer+' '+embed+' '+ngram+' '+testset+' '+output+' '+modelout+' &' os.system(comm)
5540dce3e89ac10c5b8da00d00c457cea4dd96e3
c51b70a06a7bef9bd96f06bd91a0ec289b68c7c4
/src/Snakemake/rules/DNA_coverage/check_coverage.smk
2b617fe6efda656797f741370fcb47189173db4e
[]
no_license
clinical-genomics-uppsala/TSO500
3227a65931c17dd2799dbce93fe8a47f56a8c337
b0de1d2496b6c650434116494cef721bdc295528
refs/heads/master
2023-01-10T01:41:51.764849
2020-11-05T14:11:25
2020-11-05T14:11:25
218,708,783
0
1
null
null
null
null
UTF-8
Python
false
false
476
smk
rule check_DNA_coverage: input: bam = "DNA_BcBio/bam_files/{sample}-ready.bam", bai = "DNA_BcBio/bam_files/{sample}-ready.bam.bai" output: coverage = "Results/DNA/{sample}/QC/Low_coverage_positions.txt", coverage2 = "Results/DNA/{sample}/QC/All_coverage_positions.txt" run: import subprocess subprocess.call("python src/check_coverage.py " + input.bam + " " + output.coverage + " " + output.coverage2, shell=True)
5ad4a0919c0914367cb654d32f16716505abdb96
2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02
/PyTorch/built-in/mlm/LAVIS/lavis/datasets/builders/dialogue_builder.py
08a54f2aa4da710af98dc36aac36e2eec5d3dad4
[ "Apache-2.0", "BSD-2-Clause", "MIT", "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "LicenseRef-scancode-unknown-license-reference", "GPL-1.0-or-later" ]
permissive
Ascend/ModelZoo-PyTorch
4c89414b9e2582cef9926d4670108a090c839d2d
92acc188d3a0f634de58463b6676e70df83ef808
refs/heads/master
2023-07-19T12:40:00.512853
2023-07-17T02:48:18
2023-07-17T02:48:18
483,502,469
23
6
Apache-2.0
2022-10-15T09:29:12
2022-04-20T04:11:18
Python
UTF-8
Python
false
false
705
py
""" Copyright (c) 2022, salesforce.com, inc. All rights reserved. SPDX-License-Identifier: BSD-3-Clause For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause """ from lavis.common.registry import registry from lavis.datasets.builders.base_dataset_builder import BaseDatasetBuilder from lavis.datasets.datasets.avsd_dialogue_datasets import ( AVSDDialDataset, AVSDDialEvalDataset, ) @registry.register_builder("avsd_dialogue") class AVSDDialBuilder(BaseDatasetBuilder): train_dataset_cls = AVSDDialDataset eval_dataset_cls = AVSDDialEvalDataset DATASET_CONFIG_DICT = {"default": "configs/datasets/avsd/defaults_dial.yaml"}
d4eeefca952e98ad2ef585e83874313bd0e3808c
106ddccf8f19ca2dcdde9bc455a230f144222493
/movie/urls.py
7805921f325cd9dde26bf7c07b02dab2386ff64b
[]
no_license
Simeon2001/dsc-backend-project
b7cea249bf0855af53fd1e189371474bfeeec590
96069df96c22973ce00ace9d043475ff326086ab
refs/heads/main
2023-01-09T08:57:04.846997
2020-11-12T16:38:16
2020-11-12T16:38:16
312,234,502
1
0
null
null
null
null
UTF-8
Python
false
false
159
py
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='home'), path('post', views.home, name='h'), ]
f5f9aa6ff1f90fe04ab902922a49a0ddecf9daec
922e923bdab099efa7161f5806ed262ba5cc84c4
/apps/events/migrations/0007_eventurlcleanup.py
d92ad53844ae0d545800d769138132492887dc1f
[ "MIT" ]
permissive
iamjdcollins/districtwebsite
eadd45a7bf49a43e6497f68a361329f93c41f117
89e2aea47ca3d221665bc23586a4374421be5800
refs/heads/master
2021-07-05T19:06:12.458608
2019-02-20T17:10:10
2019-02-20T17:10:10
109,855,661
0
0
null
null
null
null
UTF-8
Python
false
false
1,269
py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-12-22 17:49 from __future__ import unicode_literals from django.db import migrations def cleanup_urls(apps, schema_editor): DistrictCalendarEvent = apps.get_model('events','DistrictCalendarEvent') BoardMeeting = apps.get_model('events','BoardMeeting') for item in DistrictCalendarEvent.objects.all(): print('Setting District Calendar Event: ' + item.title + ' to and originalinstance of: 1') item.originalinstance = 1 item.save() alreadysaved = {} for item in BoardMeeting.objects.all().order_by('startdate'): count = 1 for instance in item._meta.model.objects.filter(originaldate=item.originaldate): if not str(instance.pk) in alreadysaved: print('Setting Board Meeting: ' + item.title + ' to and originalinstance of: ' + str(count)) instance.title instance.originalinstance = count instance.save() alreadysaved[str(instance.pk)] = True count += 1 class Migration(migrations.Migration): dependencies = [ ('events', '0006_auto_20171222_0803'), ] operations = [ migrations.RunPython(cleanup_urls), ]
5fd95a52582a408c7ba9c8999500c6c44d754494
79256d5b66296606a9f63a0bf0d93f68e4effe5b
/udiskie/appindicator.py
1000b7a66460c76ff9b72d0acee53bc2e756d280
[ "MIT" ]
permissive
wzugang/udiskie
8ad0a20630c434dc62dfc2f8e5bb00fb4a6fa4c6
617638a4ce2199a69ff2e93c9df6ea300a89b5cc
refs/heads/master
2021-07-19T03:19:02.962306
2017-10-23T20:28:44
2017-10-23T20:50:15
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,999
py
""" Status icon using AppIndicator3. """ from gi.repository import Gtk from gi.repository import AppIndicator3 import asyncio class AppIndicatorIcon(object): """ Show status icon using AppIndicator as backend. Replaces `udiskie.tray.StatusIcon` on ubuntu/unity. """ def __init__(self, menumaker, _icons): self._maker = menumaker self._menu = Gtk.Menu() self._indicator = AppIndicator3.Indicator.new( 'udiskie', _icons.get_icon_name('media'), AppIndicator3.IndicatorCategory.HARDWARE) self._indicator.set_status(AppIndicator3.IndicatorStatus.PASSIVE) self._indicator.set_menu(self._menu) # Get notified before menu is shown, see: # https://bugs.launchpad.net/screenlets/+bug/522152/comments/15 dbusmenuserver = self._indicator.get_property('dbus-menu-server') self._dbusmenuitem = dbusmenuserver.get_property('root-node') self._conn = self._dbusmenuitem.connect('about-to-show', self._on_show) self.task = asyncio.Future() menumaker._quit_action = self.destroy # Populate menu initially, so libdbusmenu does not ignore the # 'about-to-show': self._maker(self._menu) def destroy(self): self.show(False) self._dbusmenuitem.disconnect(self._conn) self.task.set_result(True) @property def visible(self): status = self._indicator.get_status() return status == AppIndicator3.IndicatorStatus.ACTIVE def show(self, show=True): if show == self.visible: return status = (AppIndicator3.IndicatorStatus.ACTIVE if show else AppIndicator3.IndicatorStatus.PASSIVE) self._indicator.set_status(status) def _on_show(self, menu): # clear menu: for item in self._menu.get_children(): self._menu.remove(item) # repopulate: self._maker(self._menu) self._menu.show_all()
9005dfb91eee0ce614274bf0c37ed32bb56407af
da853ef2c9946344ae34829355a507052f1af411
/PycharmProjects/file handl(read).py
821659fec08223fcee5f7d9e108438c33b195eeb
[]
no_license
SubhamSingh1/star
c4f3d2ac0470e81847fef4436c0cbd3e1ea9bf6c
33531c1f224e0a553d93d877724db673bf6941db
refs/heads/master
2022-12-21T13:27:03.969571
2021-10-01T07:31:17
2021-10-01T07:31:17
235,774,208
0
0
null
2022-12-14T11:40:12
2020-01-23T10:43:20
Python
UTF-8
Python
false
false
108
py
fileptr = open("file.txt","r") content = fileptr.read(9) print(type(content)) print(content) fileptr.close()
ee31b734e3e6930a80c62a6fa172ce88b2b9f852
d13557d6afbe66ac5e67b5547d19de015d3bd9ea
/week_1/01_01_find_max_num.py
6cdb4ceeb4bdab476065e00bed3bda619a8a78d6
[]
no_license
rheehot/Sparta-Algorithm
d5ebcf1d42000d3d4cbb96635565cb88d5b07adc
7c2696866ae8d552323e86fa8f8bede780b9ae4b
refs/heads/main
2023-06-20T01:06:43.647663
2021-07-19T05:49:28
2021-07-19T05:49:28
null
0
0
null
null
null
null
UTF-8
Python
false
false
629
py
#내 풀이 def find_max_num(array): # 이 부분을 채워보세요! max=0 for arr in array: if (max<arr): max=arr return max print("정답 = 6 / 현재 풀이 값 = ", find_max_num([3, 5, 6, 1, 2, 4])) print("정답 = 6 / 현재 풀이 값 = ", find_max_num([6, 6, 6])) print("정답 = 1888 / 현재 풀이 값 = ", find_max_num([6, 9, 2, 7, 1888])) #풀이1 def find_max_num(array): for num in array: for compare_num in array: #비교대상을 잡기 위한 for문 if num < compare_num: break else: return num
83d8d8d845d75fc7f5186a51805ed645fc638c5c
acb8e84e3b9c987fcab341f799f41d5a5ec4d587
/langs/0/aip.py
dfe2c5735f7ee800186fbf3744895e8bfdfeb50a
[]
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] == 'aIP': printFunction(data[1:]) else: print 'ERROR' return if __name__ == '__main__': main(sys.argv[1])
1df0cc1ff17f53da0665f174c553abe8f2cfa422
597d8b96c8796385b365f79d7a134f828e414d46
/pythonTest/cn/sodbvi/exercise/example002.py
206119541f885eefc17f9abe640b122cef09085f
[]
no_license
glorysongglory/pythonTest
a938c0184c8a492edeba9237bab1c00d69b0e5af
ed571d4c240fccfb4396e2890ad922726daa10a0
refs/heads/master
2021-01-21T11:39:35.657552
2019-08-14T02:49:26
2019-08-14T02:49:26
52,493,444
1
0
null
null
null
null
UTF-8
Python
false
false
251
py
#!/usr/bin/python # -*- coding: UTF-8 -*- ''' Created on 2016年1月12日 @author: sodbvi ''' for i in range(1,5): for j in range(1,5): for k in range(1,5): if( i != k ) and (i != j) and (j != k): print i,j,k
e00c528a6d63cbf99f15c47a56a3a5effe50fb88
4bb1a23a62bf6dc83a107d4da8daefd9b383fc99
/contests/abc121/d.py
4a0d1d407182a37579d7db7feb80a9e7c5460894
[]
no_license
takushi-m/atcoder-work
0aeea397c85173318497e08cb849efd459a9f6b6
f6769f0be9c085bde88129a1e9205fb817bb556a
refs/heads/master
2021-09-24T16:52:58.752112
2021-09-11T14:17:10
2021-09-11T14:17:10
144,509,843
0
0
null
null
null
null
UTF-8
Python
false
false
526
py
# -*- coding: utf-8 -*- def f(a,b): res = 0 for i in range(50): sa = (1<<i) * (a//(2*(1<<i))) t = (a)%(2*(1<<i)) if t>0: if t > (1<<i): sa += t - (1<<i) sb = (1<<i) * (b//(2*(1<<i))) t = (b+1)%(2*(1<<i)) if t>0: if t > (1<<i): sb += t - (1<<i) # print(i,sa,sb,((sb-sa)%2)<<i) res += ((sb-sa)%2)<<i return res if __name__ == '__main__': a,b = map(int, input().split()) print(f(a,b))
6cfe6d67582dce7b3908123c9808882dbbc63a87
c7cce6315bf8439faedbe44e2f35e06087f8dfb3
/Classes/classes.py
6ee267209c53dfbfd190c8c1ad804d7b40092ac5
[]
no_license
sipakhti/code-with-mosh-python
d051ab7ed1153675b7c44a96815c38ed6b458d0f
d4baa9d7493a0aaefefa145bc14d8783ecb20f1b
refs/heads/master
2020-12-26T13:05:06.783431
2020-07-08T07:00:59
2020-07-08T07:00:59
237,517,762
0
0
null
null
null
null
UTF-8
Python
false
false
116
py
# Class: blueprint for creating new objects # Object: Instance of a class # Class: Human # Object: john, Mary, Jack
6d6cb79595748b530815783a328d43f238241c00
2a959243c47542ebef0f85dda0deb30255f0c9c8
/tests/test_score.py
baa9e920973a57ca6083462084c872e9605f7312
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
carlschroedl/votelib
66b0bdb283e9493ffaa29a314212c3f50c99c735
7ba79c47f8c6934f2b3c7424b272c1c7e5835c9f
refs/heads/master
2022-10-06T15:13:40.807600
2020-06-12T13:05:46
2020-06-12T13:05:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,468
py
import sys import os import itertools from fractions import Fraction import pytest sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import votelib.evaluate.cardinal VOTES = dict( tennessee = { frozenset([('M', 10), ('N', 4), ('C', 2), ('K', 0)]): 42, frozenset([('M', 0), ('N', 10), ('C', 4), ('K', 2)]): 26, frozenset([('M', 0), ('N', 6), ('C', 10), ('K', 6)]): 15, frozenset([('M', 0), ('N', 5), ('C', 7), ('K', 10)]): 17, }, tennessee_trunc = { frozenset([('M', 10), ('N', 4), ('C', 2)]): 42, frozenset([('N', 10), ('C', 4), ('K', 2)]): 26, frozenset([('N', 6), ('C', 10), ('K', 6)]): 15, frozenset([('N', 5), ('C', 7), ('K', 10)]): 17, }, tennessee_mj = { frozenset([('M', 3), ('N', 1), ('C', 0), ('K', 0)]): 42, frozenset([('M', 0), ('N', 3), ('C', 1), ('K', 1)]): 26, frozenset([('M', 0), ('N', 1), ('C', 3), ('K', 2)]): 15, frozenset([('M', 0), ('N', 1), ('C', 2), ('K', 3)]): 17, }, tennessee_star = { frozenset([('M', 5), ('N', 2), ('C', 1), ('K', 0)]): 42, frozenset([('M', 0), ('N', 5), ('C', 2), ('K', 2)]): 26, frozenset([('M', 0), ('N', 3), ('C', 5), ('K', 4)]): 15, frozenset([('M', 0), ('N', 2), ('C', 4), ('K', 5)]): 17, }, mj = { frozenset([('EL', 6), ('L', 5), ('CL', 4), ('C', 3), ('CR', 2), ('R', 1), ('ER', 0)]): 101, frozenset([('EL', 5), ('L', 6), ('CL', 5), ('C', 4), ('CR', 3), ('R', 2), ('ER', 1)]): 101, frozenset([('EL', 4), ('L', 5), ('CL', 6), ('C', 5), ('CR', 4), ('R', 3), ('ER', 2)]): 101, frozenset([('EL', 3), ('L', 4), ('CL', 5), ('C', 6), ('CR', 5), ('R', 4), ('ER', 3)]): 50, frozenset([('EL', 2), ('L', 3), ('CL', 4), ('C', 5), ('CR', 6), ('R', 5), ('ER', 4)]): 99, frozenset([('EL', 1), ('L', 2), ('CL', 3), ('C', 4), ('CR', 5), ('R', 6), ('ER', 5)]): 99, frozenset([('EL', 0), ('L', 1), ('CL', 2), ('C', 3), ('CR', 4), ('R', 5), ('ER', 6)]): 99, }, ) EVALS = { 'score': votelib.evaluate.cardinal.ScoreVoting(), 'score_unsc0': votelib.evaluate.cardinal.ScoreVoting(unscored_value=0), 'mj': votelib.evaluate.cardinal.MajorityJudgment(), 'mjplus': votelib.evaluate.cardinal.MajorityJudgment(tie_breaking='plus'), 'star': votelib.evaluate.cardinal.STAR(), } RESULTS = { 'tennessee': { 'score': ['N', 'C', 'M', 'K'], }, 'tennessee_trunc': { 'score_unsc0': ['N', 'C', 'M', 'K'], }, 'tennessee_mj': { 'mj': ['N', 'K', 'C', 'M'], }, 'tennessee_star': { 'mj': ['N'], }, 'mj': { 'mj': ['L'], 'mjplus': ['CL'], }, } @pytest.mark.parametrize(('vote_set_name', 'eval_key', 'n_seats'), itertools.product(VOTES.keys(), EVALS.keys(), range(1, 4)) ) def test_score_eval(vote_set_name, eval_key, n_seats): expected = None if vote_set_name in RESULTS: if eval_key in RESULTS[vote_set_name]: expected = frozenset(RESULTS[vote_set_name][eval_key][:n_seats]) elected = EVALS[eval_key].evaluate(VOTES[vote_set_name], n_seats) assert len(elected) == n_seats if expected and n_seats == len(expected): assert frozenset(elected) == expected FICT_SCORE_VOTES = { frozenset([('A', 0), ('B', 5)]): 3, frozenset([('A', 2), ('B', 3)]): 16, frozenset([('A', 3), ('B', 2)]): 19, frozenset([('A', 5), ('B', 0)]): 2, } FICT_EVAL_CLS = votelib.evaluate.cardinal.ScoreVoting def test_score_trunc(): assert FICT_EVAL_CLS(truncation=4).evaluate(FICT_SCORE_VOTES, 1) == ['A'] assert ( FICT_EVAL_CLS(truncation=Fraction(1, 10)).evaluate(FICT_SCORE_VOTES, 1) == FICT_EVAL_CLS(truncation=4).evaluate(FICT_SCORE_VOTES, 1) ) assert FICT_EVAL_CLS(truncation=0).evaluate(FICT_SCORE_VOTES, 1) == ['B'] def test_score_bottom(): lowvotes = FICT_SCORE_VOTES.copy() lowvotes[frozenset([('C', 5)])] = 1 assert FICT_EVAL_CLS().evaluate(lowvotes, 1) == ['C'] assert FICT_EVAL_CLS(min_count=10).evaluate(lowvotes, 1) == ['B'] def test_lomax_pizza(): # https://rangevoting.org/MedianVrange.html votes = { frozenset([('Pepperoni', 9), ('Mushroom', 8)]): 2, frozenset([('Pepperoni', 0), ('Mushroom', 9)]): 1, } assert votelib.evaluate.cardinal.MajorityJudgment().evaluate(votes) == ['Pepperoni'] assert votelib.evaluate.cardinal.ScoreVoting().evaluate(votes) == ['Mushroom']
6e0fffeeac361f283b785f9d1cf76ba1828d3e6b
3385776d9ca6cfad76295fe1c1caa4ad7117e4cf
/leetcode/328.odd-even-linked-list.py
f9be4f8bf0763c2b10401a5a390f34bf2e85fb8c
[]
no_license
Shawntl/Data-Structure-and-Algorithms
fd7678c47b1279bb91c4d663140751bbe3d43461
2c2114aeb40bd97afd713c39fad8c7c7a8f1a6dd
refs/heads/main
2023-06-10T09:15:38.460146
2021-07-02T05:35:46
2021-07-02T05:35:46
312,209,708
0
0
null
null
null
null
UTF-8
Python
false
false
682
py
# # @lc app=leetcode id=328 lang=python3 # # [328] Odd Even Linked List # # @lc code=start # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def oddEvenList(self, head: ListNode) -> ListNode: if not head or not head.next: return head odd, even = head, head.next firstEven = head.next while odd.next and even.next: odd.next = odd.next.next odd = odd.next even.next = even.next.next even = even.next odd.next = firstEven return head # @lc code=end
743997ca2271ce43942ce7ceb338fc695914c7f4
e80e5374b8fd00379293adb35fc8cf017d5f4cc7
/qemu_mode/qemu-2.10.0/roms/u-boot/tools/buildman/control.py
73b1a14fb6bb8428206ffc4a9a8b8f4e0926b8ec
[ "GPL-2.0-only", "LGPL-2.1-only", "GPL-1.0-or-later", "LGPL-2.0-or-later", "LGPL-2.1-or-later", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "GPL-2.0-or-later", "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
CAFA1/afl
dcebf3a3acae3e9783bbb79d8cff6958b496fa34
01c113b61ab70c3b02f3d7c74e6dfa20cfc7813d
refs/heads/master
2023-04-10T14:30:34.901666
2020-07-27T01:06:32
2020-07-27T01:06:32
272,596,630
0
2
Apache-2.0
2021-04-15T00:56:55
2020-06-16T03:03:26
C
UTF-8
Python
false
false
12,123
py
# Copyright (c) 2013 The Chromium OS Authors. # # SPDX-License-Identifier: GPL-2.0+ # import multiprocessing import os import shutil import sys import board import bsettings from builder import Builder import gitutil import patchstream import terminal from terminal import Print import toolchain import command import subprocess def GetPlural(count): """Returns a plural 's' if count is not 1""" return 's' if count != 1 else '' def GetActionSummary(is_summary, commits, selected, options): """Return a string summarising the intended action. Returns: Summary string. """ if commits: count = len(commits) count = (count + options.step - 1) / options.step commit_str = '%d commit%s' % (count, GetPlural(count)) else: commit_str = 'current source' str = '%s %s for %d boards' % ( 'Summary of' if is_summary else 'Building', commit_str, len(selected)) str += ' (%d thread%s, %d job%s per thread)' % (options.threads, GetPlural(options.threads), options.jobs, GetPlural(options.jobs)) return str def ShowActions(series, why_selected, boards_selected, builder, options): """Display a list of actions that we would take, if not a dry run. Args: series: Series object why_selected: Dictionary where each key is a buildman argument provided by the user, and the value is the list of boards brought in by that argument. For example, 'arm' might bring in 400 boards, so in this case the key would be 'arm' and the value would be a list of board names. boards_selected: Dict of selected boards, key is target name, value is Board object builder: The builder that will be used to build the commits options: Command line options object """ col = terminal.Color() print 'Dry run, so not doing much. But I would do this:' print if series: commits = series.commits else: commits = None print GetActionSummary(False, commits, boards_selected, options) print 'Build directory: %s' % builder.base_dir if commits: for upto in range(0, len(series.commits), options.step): commit = series.commits[upto] print ' ', col.Color(col.YELLOW, commit.hash[:8], bright=False), print commit.subject print for arg in why_selected: if arg != 'all': print arg, ': %d boards' % len(why_selected[arg]) if options.verbose: print ' %s' % ' '.join(why_selected[arg]) print ('Total boards to build for each commit: %d\n' % len(why_selected['all'])) def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, clean_dir=False): """The main control code for buildman Args: options: Command line options object args: Command line arguments (list of strings) toolchains: Toolchains to use - this should be a Toolchains() object. If None, then it will be created and scanned make_func: Make function to use for the builder. This is called to execute 'make'. If this is None, the normal function will be used, which calls the 'make' tool with suitable arguments. This setting is useful for tests. board: Boards() object to use, containing a list of available boards. If this is None it will be created and scanned. """ global builder if options.full_help: pager = os.getenv('PAGER') if not pager: pager = 'more' fname = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'README') command.Run(pager, fname) return 0 gitutil.Setup() col = terminal.Color() options.git_dir = os.path.join(options.git, '.git') no_toolchains = toolchains is None if no_toolchains: toolchains = toolchain.Toolchains() if options.fetch_arch: if options.fetch_arch == 'list': sorted_list = toolchains.ListArchs() print col.Color(col.BLUE, 'Available architectures: %s\n' % ' '.join(sorted_list)) return 0 else: fetch_arch = options.fetch_arch if fetch_arch == 'all': fetch_arch = ','.join(toolchains.ListArchs()) print col.Color(col.CYAN, '\nDownloading toolchains: %s' % fetch_arch) for arch in fetch_arch.split(','): print ret = toolchains.FetchAndInstall(arch) if ret: return ret return 0 if no_toolchains: toolchains.GetSettings() toolchains.Scan(options.list_tool_chains) if options.list_tool_chains: toolchains.List() print return 0 # Work out how many commits to build. We want to build everything on the # branch. We also build the upstream commit as a control so we can see # problems introduced by the first commit on the branch. count = options.count has_range = options.branch and '..' in options.branch if count == -1: if not options.branch: count = 1 else: if has_range: count, msg = gitutil.CountCommitsInRange(options.git_dir, options.branch) else: count, msg = gitutil.CountCommitsInBranch(options.git_dir, options.branch) if count is None: sys.exit(col.Color(col.RED, msg)) elif count == 0: sys.exit(col.Color(col.RED, "Range '%s' has no commits" % options.branch)) if msg: print col.Color(col.YELLOW, msg) count += 1 # Build upstream commit also if not count: str = ("No commits found to process in branch '%s': " "set branch's upstream or use -c flag" % options.branch) sys.exit(col.Color(col.RED, str)) # Work out what subset of the boards we are building if not boards: board_file = os.path.join(options.git, 'boards.cfg') status = subprocess.call([os.path.join(options.git, 'tools/genboardscfg.py')]) if status != 0: sys.exit("Failed to generate boards.cfg") boards = board.Boards() boards.ReadBoards(os.path.join(options.git, 'boards.cfg')) exclude = [] if options.exclude: for arg in options.exclude: exclude += arg.split(',') why_selected = boards.SelectBoards(args, exclude) selected = boards.GetSelected() if not len(selected): sys.exit(col.Color(col.RED, 'No matching boards found')) # Read the metadata from the commits. First look at the upstream commit, # then the ones in the branch. We would like to do something like # upstream/master~..branch but that isn't possible if upstream/master is # a merge commit (it will list all the commits that form part of the # merge) # Conflicting tags are not a problem for buildman, since it does not use # them. For example, Series-version is not useful for buildman. On the # other hand conflicting tags will cause an error. So allow later tags # to overwrite earlier ones by setting allow_overwrite=True if options.branch: if count == -1: if has_range: range_expr = options.branch else: range_expr = gitutil.GetRangeInBranch(options.git_dir, options.branch) upstream_commit = gitutil.GetUpstream(options.git_dir, options.branch) series = patchstream.GetMetaDataForList(upstream_commit, options.git_dir, 1, series=None, allow_overwrite=True) series = patchstream.GetMetaDataForList(range_expr, options.git_dir, None, series, allow_overwrite=True) else: # Honour the count series = patchstream.GetMetaDataForList(options.branch, options.git_dir, count, series=None, allow_overwrite=True) else: series = None if not options.dry_run: options.verbose = True if not options.summary: options.show_errors = True # By default we have one thread per CPU. But if there are not enough jobs # we can have fewer threads and use a high '-j' value for make. if not options.threads: options.threads = min(multiprocessing.cpu_count(), len(selected)) if not options.jobs: options.jobs = max(1, (multiprocessing.cpu_count() + len(selected) - 1) / len(selected)) if not options.step: options.step = len(series.commits) - 1 gnu_make = command.Output(os.path.join(options.git, 'scripts/show-gnu-make'), raise_on_error=False).rstrip() if not gnu_make: sys.exit('GNU Make not found') # Create a new builder with the selected options. output_dir = options.output_dir if options.branch: dirname = options.branch.replace('/', '_') # As a special case allow the board directory to be placed in the # output directory itself rather than any subdirectory. if not options.no_subdirs: output_dir = os.path.join(options.output_dir, dirname) if (clean_dir and output_dir != options.output_dir and os.path.exists(output_dir)): shutil.rmtree(output_dir) builder = Builder(toolchains, output_dir, options.git_dir, options.threads, options.jobs, gnu_make=gnu_make, checkout=True, show_unknown=options.show_unknown, step=options.step, no_subdirs=options.no_subdirs, full_path=options.full_path, verbose_build=options.verbose_build, incremental=options.incremental, per_board_out_dir=options.per_board_out_dir, config_only=options.config_only, squash_config_y=not options.preserve_config_y) builder.force_config_on_failure = not options.quick if make_func: builder.do_make = make_func # For a dry run, just show our actions as a sanity check if options.dry_run: ShowActions(series, why_selected, selected, builder, options) else: builder.force_build = options.force_build builder.force_build_failures = options.force_build_failures builder.force_reconfig = options.force_reconfig builder.in_tree = options.in_tree # Work out which boards to build board_selected = boards.GetSelectedDict() if series: commits = series.commits # Number the commits for test purposes for commit in range(len(commits)): commits[commit].sequence = commit else: commits = None Print(GetActionSummary(options.summary, commits, board_selected, options)) # We can't show function sizes without board details at present if options.show_bloat: options.show_detail = True builder.SetDisplayOptions(options.show_errors, options.show_sizes, options.show_detail, options.show_bloat, options.list_error_boards, options.show_config) if options.summary: builder.ShowSummary(commits, board_selected) else: fail, warned = builder.BuildBoards(commits, board_selected, options.keep_outputs, options.verbose) if fail: return 128 elif warned: return 129 return 0
[ "longlong_vm@dell_book.com" ]
longlong_vm@dell_book.com
354a0e8777f2f36647a6bd3f0c332ec74be89261
6b5d90731f357a8c3319054c120569b86d1492ff
/.history/hhx_main_20200211165718.py
c1a0e9f375e665790a6345aa29c1101cfbe0890c
[]
no_license
ok5168/baomijiancha
8a2e7eedf581122ad266b0e21fcd8452ee523364
43f2f6f0a9809b09c8b0006d27a328fab4fb54b7
refs/heads/master
2021-01-05T11:13:33.089885
2020-02-17T03:05:25
2020-02-17T03:05:25
241,004,611
0
0
null
null
null
null
UTF-8
Python
false
false
961
py
import sys from PyQt5.QtWidgets import QApplication, QMainWindow from Ui_hhx1 import * from bmjc14 import * #导入具体处理过程 class MyWindow(QMainWindow, Ui_MainWindow): def __init__(self, parent=None): super(MyWindow, self).__init__(parent) self.setupUi(self) def clear(self): self.lineEdit_out.clear() def shuchu(self): self.plainTextEdit.clear() #清空输出框 p=myWin.lineEdit_mulu.text() #取得目录文本框的内容 d=myWin.lineEdit_riqi.text() #取得日期文本框的内容 jieguo=chuli(d,p) #调用外部bmjc14模块中的chuli函数 self.plainTextEdit.setPlainText(jieguo) #在plainTextEdit输出结果 if __name__ == '__main__': app = QApplication(sys.argv) myWin = MyWindow() myWin.show() myWin.ok.clicked.connect(myWin.shuchu) #点击ok按钮后执行 # myWin.ok.clicked.connect(myWin.test3) sys.exit(app.exec_())
b6406b45083e1dca7bab452640812bb2d8c21498
8b3bc4efea5663b356acbabec231d1d647891805
/1478/Solution.py
59040ac9f9c5f64600d6a3ee276bd4393efcfcc3
[]
no_license
FawneLu/leetcode
9a982b97122074d3a8488adec2039b67e709af08
03020fb9b721a1c345e32bbe04f9b2189bfc3ac7
refs/heads/master
2021-06-18T20:13:34.108057
2021-03-03T05:14:13
2021-03-03T05:14:13
177,454,524
2
1
null
null
null
null
UTF-8
Python
false
false
946
py
class Solution: def minDistance(self, houses: List[int], k: int) -> int: def cal_dis(left,right): total_dis = 0 while left<right: total_dis += houses[right] - houses[left] left += 1 right -= 1 return total_dis houses.sort() cost = [[0] *len(houses) for _ in range (len(houses))] for i in range(len(houses)-1): for j in range(i,len(houses)): cost[i][j] = cal_dis(i,j) dp = [[float('inf')]*(k+1) for _ in range(len(houses))] for i in range(len(houses)): dp[i][0] = 0 dp[i][1] = cost[0][i] for i in range(1,len(houses)): for j in range(2,k+1): for m in range(i): dp[i][j] = min(dp[i][j], dp[m][j-1]+cost[m+1][i]) return dp[-1][-1]
539d84067ef73c2d8a7263c96d8bbe8b17e83870
4809471274d6e136ac66d1998de5acb185d1164e
/pypureclient/flasharray/FA_2_4/models/admin_settings_response.py
116dcfe276ea1c9e61c929153a61f413b0bd4b68
[ "BSD-2-Clause" ]
permissive
astrojuanlu/py-pure-client
053fef697ad03b37ba7ae21a0bbb466abf978827
6fa605079950765c316eb21c3924e8329d5e3e8a
refs/heads/master
2023-06-05T20:23:36.946023
2021-06-28T23:44:24
2021-06-28T23:44:24
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,151
py
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.flasharray.FA_2_4 import models class AdminSettingsResponse(object): """ 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 = { 'items': 'list[AdminSettings]' } attribute_map = { 'items': 'items' } required_args = { } def __init__( self, items=None, # type: List[models.AdminSettings] ): """ Keyword args: items (list[AdminSettings]) """ if items is not None: self.items = items def __setattr__(self, key, value): if key not in self.attribute_map: raise KeyError("Invalid key `{}` for `AdminSettingsResponse`".format(key)) self.__dict__[key] = value def __getattribute__(self, item): value = object.__getattribute__(self, item) if isinstance(value, Property): raise AttributeError else: return value def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): if hasattr(self, attr): 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 if issubclass(AdminSettingsResponse, dict): for key, value in self.items(): result[key] = 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, AdminSettingsResponse): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
6e3fa8511feac5e49a76f72bce10aae1e8c65edc
76e6d4f93078327fef8672133fc75a6f12abc240
/ABC113/C.py
61cb33095956fd32ac9d317c34bbae65700eecd4
[]
no_license
adusa1019/atcoder
1e8f33253f6f80a91d069b2f3b568ce7a2964940
f7dbdfc021425160a072f4ce4e324953a376133a
refs/heads/master
2021-08-08T04:41:36.098678
2021-02-01T07:34:34
2021-02-01T07:34:34
89,038,783
0
0
null
null
null
null
UTF-8
Python
false
false
640
py
import numpy as np def solve(string): n, m, *py = map(int, string.split()) py = [(_p, _y) for _p, _y in zip(py[0::2], py[1::2])] p = [[] for _ in range(n)] for _p, _y in py: p[_p - 1].append(_y) for i in range(n): p[i] = np.argsort(np.argsort(p[i])) counter = [0 for _ in range(n)] ans = [] for _p, _y in py: ans.append("{:06}{:06}".format(_p, p[_p - 1][counter[_p - 1]] + 1)) counter[_p - 1] += 1 return "\n".join(ans) if __name__ == '__main__': n, m = map(int, input().split()) print(solve("{} {}\n".format(n, m) + "\n".join([input() for _ in range(m)])))
3dea3a1eb262af6d0fd57d983b6b19ebe8d4e017
a151a28de438a4214a14e5bf42a7761157f8e587
/stoq/plugins/decoder.py
5add552024bc67d4aaa07ff1a863c73f63adf3cf
[ "Apache-2.0" ]
permissive
maydewd/stoq
f606f77c0dd38aeeb7e7ea48a840d8561ee18213
f72bbaf273640d645b8f9c20dc587e03373e24be
refs/heads/master
2021-06-21T20:34:51.885413
2018-05-18T12:03:15
2018-05-18T12:03:15
124,784,720
0
0
Apache-2.0
2018-03-11T18:14:34
2018-03-11T18:14:34
null
UTF-8
Python
false
false
1,305
py
# Copyright 2014-2018 PUNCH Cyber Analytics Group # # 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 stoq.plugins.base import StoqPluginBase class StoqDecoderPlugin(StoqPluginBase): def decode(self): pass def to_bytearray(self, payload): """ Convert payload to a bytearray :param bytes payload: Payload to be converted into byte array :returns: Payload as a bytearray :rtype: bytearray """ self.log.debug("Converting payload ({} bytes) to a bytearray".format(len(payload))) if isinstance(payload, bytearray): pass elif isinstance(payload, bytes): payload = bytearray(payload) else: payload = bytearray(payload.encode()) return payload
0198c0f2a5d657cb13ee7e52a622ce8ea4fa778f
649bd422025e421d86025743eac324c9b882a2e8
/exam/1_three-dimensional_atomic_system/dump/phasetrans/temp54_6500.py
501824a2b942f79f8f3f358148a36d4cbd02b601
[]
no_license
scheuclu/atom_class
36ddee1f6a5995872e858add151c5942c109847c
0c9a8c63d9b38898c1869fe8983126cef17662cd
refs/heads/master
2021-01-21T10:52:28.448221
2017-03-07T23:04:41
2017-03-07T23:04:41
83,489,471
0
0
null
null
null
null
UTF-8
Python
false
false
68,856
py
ITEM: TIMESTEP 6500 ITEM: NUMBER OF ATOMS 2048 ITEM: BOX BOUNDS pp pp pp 6.3620845892926070e-01 4.6563791541065868e+01 6.3620845892926070e-01 4.6563791541065868e+01 6.3620845892926070e-01 4.6563791541065868e+01 ITEM: ATOMS id type xs ys zs 8 1 0.123835 0.0655433 0.0650845 35 1 0.0615115 0.126148 0.0592761 130 1 0.0620934 0.0672814 0.128567 165 1 0.120351 0.127197 0.125681 161 1 0.997112 0.122917 0.127809 509 1 0.874637 0.377717 0.37474 12 1 0.251918 0.059104 0.0583073 39 1 0.18755 0.125518 0.058915 43 1 0.321187 0.124186 0.0648478 134 1 0.184182 0.0603289 0.12929 138 1 0.30729 0.0608532 0.127818 169 1 0.249315 0.120261 0.122472 510 1 0.941681 0.441817 0.369072 135 1 0.18284 -0.000237906 0.186907 16 1 0.372677 0.0608242 0.0632499 47 1 0.432208 0.126484 0.0702054 142 1 0.441258 0.0591211 0.125552 173 1 0.368565 0.12475 0.132321 177 1 0.50081 0.123735 0.130555 20 1 0.499521 0.0644687 0.0677079 393 1 0.252782 0.00135776 0.377756 41 1 0.253126 0.124134 0.000460675 24 1 0.6296 0.0684203 0.060638 51 1 0.558879 0.132456 0.0619917 146 1 0.566423 0.0636976 0.121803 181 1 0.628914 0.128694 0.127717 11 1 0.312997 -0.000175279 0.0587071 511 1 0.936936 0.383637 0.434423 28 1 0.751921 0.0619544 0.0710317 55 1 0.689002 0.126585 0.060218 59 1 0.808617 0.12396 0.058382 150 1 0.685796 0.0633866 0.121764 154 1 0.811503 0.0604662 0.125659 185 1 0.750772 0.125619 0.127894 512 1 0.874257 0.44614 0.435645 143 1 0.440079 0.00179662 0.188024 1031 1 0.186133 0.497336 0.0631623 4 1 0.997843 0.0663962 0.0572387 513 1 0.00106244 0.000804406 0.495999 32 1 0.871721 0.0608792 0.0649106 63 1 0.938455 0.130339 0.0629027 158 1 0.933191 0.0642423 0.126049 189 1 0.86732 0.125647 0.131835 508 1 0.74749 0.439767 0.438885 502 1 0.687137 0.437893 0.376781 40 1 0.128244 0.193023 0.0636232 67 1 0.0626342 0.250109 0.0628285 72 1 0.126111 0.307493 0.0652825 162 1 0.0605086 0.188698 0.125121 194 1 0.0622006 0.30965 0.126865 197 1 0.126158 0.247261 0.127303 36 1 0.996114 0.19308 0.0675558 391 1 0.184448 0.000388288 0.436498 44 1 0.246776 0.18488 0.0622656 71 1 0.192423 0.241691 0.0590635 75 1 0.308462 0.251665 0.0586015 76 1 0.246929 0.309989 0.0651109 166 1 0.184415 0.183408 0.125911 170 1 0.307615 0.183732 0.124435 198 1 0.185968 0.308517 0.119955 201 1 0.25153 0.242798 0.121165 202 1 0.309993 0.30548 0.124883 271 1 0.437411 0.002953 0.31251 48 1 0.370806 0.193518 0.0650629 79 1 0.434623 0.251156 0.0627475 80 1 0.375155 0.305706 0.0652076 174 1 0.433629 0.193955 0.125252 205 1 0.37125 0.251096 0.124283 206 1 0.436988 0.307246 0.124763 84 1 0.500789 0.313932 0.0646347 52 1 0.49398 0.189078 0.0644222 1039 1 0.438877 0.496561 0.0662168 209 1 0.499892 0.247526 0.1273 56 1 0.619713 0.192196 0.0658886 83 1 0.560087 0.249112 0.0604543 88 1 0.619437 0.306541 0.0617786 178 1 0.566332 0.185111 0.128036 210 1 0.56162 0.31684 0.124602 213 1 0.626573 0.24807 0.127086 129 1 0.997746 0.00341531 0.122184 60 1 0.748457 0.185073 0.0639863 87 1 0.682975 0.246401 0.0654575 91 1 0.810184 0.245829 0.0638249 92 1 0.741824 0.310209 0.0614812 182 1 0.695096 0.186234 0.126777 186 1 0.814219 0.188511 0.126565 214 1 0.684674 0.306873 0.119591 217 1 0.75103 0.250981 0.128573 218 1 0.815153 0.309668 0.123155 281 1 0.74534 0.00391252 0.249104 1309 1 0.877856 0.4995 0.252444 82 1 0.562749 0.308165 -0.000955223 26 1 0.807859 0.0619778 0.00276234 27 1 0.815359 -0.000271728 0.0620053 193 1 0.998002 0.253356 0.122724 68 1 0.996504 0.310141 0.0596055 64 1 0.87088 0.186022 0.0581489 95 1 0.936801 0.25292 0.0606191 96 1 0.872929 0.308328 0.0584316 190 1 0.939182 0.187422 0.127679 221 1 0.877365 0.251859 0.123645 222 1 0.931947 0.318752 0.122154 151 1 0.684369 0.00235854 0.188511 6 1 0.192085 0.0562815 0.00329416 99 1 0.0614709 0.371255 0.0657594 104 1 0.130532 0.431997 0.0589302 226 1 0.0665912 0.437219 0.118673 229 1 0.126794 0.367312 0.12602 153 1 0.744261 0.00537665 0.128492 261 1 0.126335 0.00397317 0.246634 137 1 0.248719 0.0029687 0.129346 103 1 0.190946 0.373572 0.0624379 107 1 0.311922 0.372857 0.0646231 108 1 0.254657 0.43929 0.0577644 230 1 0.189645 0.43726 0.125358 233 1 0.25092 0.369413 0.124226 234 1 0.310617 0.43679 0.12506 283 1 0.810222 -0.00056212 0.310873 503 1 0.688227 0.38018 0.43923 505 1 0.749411 0.375305 0.366632 506 1 0.814361 0.438928 0.379997 1291 1 0.316818 0.500784 0.317352 507 1 0.815303 0.378063 0.44086 111 1 0.437621 0.372903 0.0667649 112 1 0.372401 0.432634 0.0635006 237 1 0.375671 0.36621 0.124469 238 1 0.431195 0.437623 0.126986 116 1 0.502816 0.437561 0.0651499 241 1 0.497149 0.375005 0.128994 578 1 0.0538922 0.31423 0.497844 395 1 0.313452 0.00104795 0.433768 31 1 0.936078 0.00543595 0.0585427 115 1 0.559541 0.370038 0.0622758 120 1 0.6226 0.44107 0.0659368 242 1 0.563235 0.431137 0.130111 245 1 0.627082 0.375906 0.130745 1035 1 0.314615 0.496691 0.0635464 18 1 0.556944 0.059852 0.00131113 275 1 0.561484 0.00102577 0.313731 265 1 0.251436 0.00077272 0.25148 1433 1 0.748342 0.497518 0.375429 49 1 0.488874 0.125566 0.0044041 119 1 0.680152 0.37698 0.0643108 123 1 0.807126 0.366794 0.061076 124 1 0.743125 0.43455 0.0654394 246 1 0.687773 0.438228 0.124686 249 1 0.749885 0.371854 0.127203 250 1 0.806381 0.438574 0.120723 14 1 0.438745 0.0619902 0.00283423 225 1 0.000871218 0.375803 0.127196 100 1 0.000279022 0.436536 0.0626543 127 1 0.938677 0.378597 0.0603015 128 1 0.869983 0.428763 0.0633796 253 1 0.867775 0.372096 0.131573 254 1 0.928572 0.430236 0.12864 501 1 0.628497 0.380097 0.376134 3 1 0.0596045 -0.000103047 0.0636977 534 1 0.683593 0.0553599 0.496571 1027 1 0.0758171 0.498605 0.0582636 499 1 0.561778 0.372317 0.438626 504 1 0.620346 0.441132 0.436179 136 1 0.126888 0.0629458 0.185262 163 1 0.0573657 0.126505 0.187694 258 1 0.0574813 0.0611502 0.255417 264 1 0.126298 0.0646861 0.312327 291 1 0.059935 0.126772 0.314864 293 1 0.114802 0.128118 0.252714 260 1 -0.000200966 0.0633718 0.313472 498 1 0.563195 0.437281 0.37997 606 1 0.9392 0.318224 0.498386 140 1 0.244374 0.061764 0.194944 167 1 0.188754 0.130629 0.196032 171 1 0.30503 0.127008 0.191422 262 1 0.189209 0.0621464 0.257034 266 1 0.309601 0.0668783 0.249648 268 1 0.249389 0.0557176 0.313697 295 1 0.182091 0.125385 0.316445 297 1 0.245053 0.124576 0.261103 299 1 0.309771 0.127631 0.313854 53 1 0.627176 0.125833 0.000478258 1545 1 0.248902 0.493603 0.497257 144 1 0.373953 0.0625171 0.186674 175 1 0.434914 0.125893 0.184454 270 1 0.435952 0.0648368 0.249006 272 1 0.374154 0.0611398 0.311249 301 1 0.37743 0.12738 0.248115 303 1 0.439866 0.121037 0.308903 305 1 0.499199 0.128391 0.246519 276 1 0.499973 0.0591909 0.313214 148 1 0.500287 0.0678072 0.19387 1301 1 0.626843 0.492118 0.246047 152 1 0.629499 0.0651212 0.190305 179 1 0.564477 0.123171 0.181279 274 1 0.561314 0.0628917 0.254525 280 1 0.627197 0.056492 0.312761 307 1 0.567262 0.126421 0.31389 309 1 0.6307 0.120991 0.252194 109 1 0.377754 0.374771 0.00260147 546 1 0.0554361 0.189481 0.496542 7 1 0.192913 0.00143984 0.0600414 133 1 0.127201 0.00092072 0.122174 156 1 0.747695 0.0624941 0.18629 183 1 0.685874 0.125857 0.187071 187 1 0.806338 0.121704 0.18985 278 1 0.691374 0.0613549 0.251199 282 1 0.807448 0.0612107 0.2528 284 1 0.751309 0.0597903 0.315042 311 1 0.686925 0.119991 0.314172 313 1 0.747427 0.127567 0.253209 315 1 0.812514 0.122334 0.31343 493 1 0.378515 0.377857 0.371507 570 1 0.810053 0.187842 0.499156 496 1 0.376428 0.440077 0.436888 1183 1 0.932811 0.496217 0.183723 132 1 0.997171 0.0576192 0.185753 289 1 0.996593 0.124978 0.249503 160 1 0.878285 0.0607877 0.191956 191 1 0.936628 0.125099 0.190319 286 1 0.934507 0.0645426 0.257165 288 1 0.868634 0.0601073 0.313178 317 1 0.869032 0.12316 0.249017 319 1 0.932155 0.128671 0.311362 168 1 0.118224 0.18701 0.194497 195 1 0.0567792 0.247927 0.188423 200 1 0.117424 0.311392 0.185809 290 1 0.0570002 0.189796 0.249208 296 1 0.123326 0.189478 0.314648 322 1 0.0554858 0.316746 0.250519 323 1 0.0616846 0.253233 0.316934 325 1 0.117177 0.260854 0.250336 328 1 0.12415 0.319177 0.311405 196 1 0.994086 0.311844 0.188003 321 1 0.994268 0.25379 0.24872 172 1 0.244406 0.186147 0.186751 199 1 0.183333 0.253581 0.185481 203 1 0.306821 0.245163 0.184409 204 1 0.246157 0.305334 0.179382 294 1 0.180736 0.195607 0.245141 298 1 0.311968 0.190884 0.253361 300 1 0.240456 0.193477 0.310036 326 1 0.186508 0.30995 0.247131 327 1 0.185606 0.253335 0.30905 329 1 0.251311 0.249607 0.249605 330 1 0.309674 0.314129 0.245939 331 1 0.310227 0.251253 0.313028 332 1 0.248236 0.312673 0.309717 176 1 0.376901 0.191721 0.192933 207 1 0.432746 0.254531 0.187936 208 1 0.368396 0.309696 0.188411 302 1 0.440534 0.188354 0.248092 304 1 0.380735 0.178946 0.318943 333 1 0.379143 0.248552 0.260563 334 1 0.436036 0.310205 0.252776 335 1 0.437098 0.247973 0.322178 336 1 0.376587 0.31758 0.311669 340 1 0.502887 0.31701 0.307502 308 1 0.498875 0.19104 0.313895 180 1 0.499412 0.188685 0.185991 212 1 0.498891 0.310916 0.18383 337 1 0.496639 0.245494 0.251766 184 1 0.623035 0.184877 0.190088 211 1 0.558466 0.244064 0.190454 216 1 0.621524 0.311712 0.18479 306 1 0.562537 0.182021 0.249336 312 1 0.625971 0.184772 0.31533 338 1 0.565159 0.309219 0.256006 339 1 0.565791 0.242772 0.313981 341 1 0.622915 0.24909 0.245898 344 1 0.630251 0.317761 0.310714 188 1 0.752631 0.18475 0.191113 215 1 0.689533 0.243997 0.184198 219 1 0.807269 0.247101 0.188912 220 1 0.751315 0.311854 0.195376 310 1 0.681041 0.186309 0.251197 314 1 0.812335 0.186722 0.252041 316 1 0.739696 0.182721 0.322714 342 1 0.687314 0.31433 0.248791 343 1 0.683265 0.249509 0.315195 345 1 0.75249 0.247521 0.25262 346 1 0.813783 0.316797 0.254879 347 1 0.810917 0.253485 0.315745 348 1 0.745469 0.312427 0.313892 324 1 1.0003 0.316674 0.314421 164 1 0.00215523 0.187244 0.185114 292 1 0.00289897 0.191762 0.313295 192 1 0.872912 0.18767 0.18271 223 1 0.932457 0.253783 0.189828 224 1 0.86801 0.313653 0.18897 318 1 0.929367 0.187512 0.246708 320 1 0.876239 0.188358 0.31181 349 1 0.864926 0.253292 0.247938 350 1 0.932877 0.313401 0.254007 351 1 0.935276 0.249217 0.309981 352 1 0.875125 0.312012 0.31779 126 1 0.937246 0.435264 0.000919643 1287 1 0.190128 0.494794 0.31009 500 1 0.506345 0.44277 0.443103 227 1 0.0577855 0.371497 0.185438 232 1 0.120316 0.43507 0.186385 354 1 0.0586523 0.432495 0.242963 355 1 0.0626562 0.380332 0.308855 357 1 0.121433 0.375853 0.247509 360 1 0.121117 0.438683 0.30345 356 1 1.0003 0.433732 0.309212 353 1 0.991422 0.373605 0.253891 497 1 0.503164 0.371609 0.3729 66 1 0.068055 0.309718 0.00175844 231 1 0.186545 0.37448 0.178438 235 1 0.311878 0.37732 0.191911 236 1 0.256513 0.432594 0.192255 358 1 0.184274 0.438653 0.247227 359 1 0.183882 0.372001 0.309622 361 1 0.24261 0.372045 0.246819 362 1 0.313383 0.443756 0.253654 363 1 0.308851 0.372387 0.31268 364 1 0.25252 0.440046 0.308743 477 1 0.875262 0.252605 0.37137 1165 1 0.375413 0.499898 0.125085 494 1 0.442306 0.437123 0.376968 448 1 0.873659 0.189629 0.447375 478 1 0.935263 0.312704 0.381384 239 1 0.431295 0.369729 0.189413 240 1 0.369509 0.437812 0.187085 365 1 0.371852 0.374304 0.252985 366 1 0.434539 0.439725 0.246309 367 1 0.437507 0.373769 0.313016 368 1 0.384965 0.443026 0.314995 372 1 0.496368 0.436049 0.308032 244 1 0.499233 0.434285 0.188854 369 1 0.497242 0.378343 0.250675 495 1 0.439504 0.371991 0.438746 243 1 0.56023 0.369938 0.189697 248 1 0.627529 0.438164 0.185101 370 1 0.563648 0.431984 0.244633 371 1 0.564 0.381743 0.315706 373 1 0.627857 0.375387 0.246019 376 1 0.622469 0.443176 0.314665 517 1 0.127322 0.00516156 0.496095 1155 1 0.0631911 0.500418 0.183148 446 1 0.934208 0.187043 0.377305 247 1 0.691297 0.369585 0.185856 251 1 0.807829 0.377417 0.193357 252 1 0.745748 0.442105 0.182627 374 1 0.689308 0.436029 0.253347 375 1 0.684143 0.386694 0.315995 377 1 0.74449 0.374096 0.254303 378 1 0.813624 0.442471 0.250096 379 1 0.817896 0.375601 0.30733 380 1 0.755022 0.442594 0.313223 605 1 0.873381 0.259158 0.499394 228 1 0.99744 0.44359 0.183961 255 1 0.939914 0.371235 0.189184 256 1 0.866752 0.437591 0.186373 381 1 0.874549 0.378544 0.247387 382 1 0.937952 0.435508 0.251569 383 1 0.933663 0.37369 0.311848 384 1 0.878344 0.438107 0.315485 1425 1 0.504295 0.494646 0.37084 386 1 0.0644958 0.0622145 0.371592 392 1 0.126467 0.0643052 0.434079 419 1 0.0577248 0.123124 0.434287 421 1 0.123837 0.119906 0.376274 417 1 -0.000157468 0.128734 0.372806 269 1 0.373542 0.00398184 0.253159 480 1 0.876302 0.317399 0.438757 390 1 0.183329 0.062299 0.37038 394 1 0.311306 0.0697208 0.376934 396 1 0.253309 0.0668664 0.440535 423 1 0.191029 0.123872 0.435894 425 1 0.249388 0.127625 0.369601 427 1 0.309429 0.134779 0.436138 62 1 0.936389 0.184785 -0.000310423 1417 1 0.250992 0.492203 0.376104 398 1 0.437712 0.0603687 0.377445 400 1 0.371274 0.065446 0.441971 429 1 0.375482 0.119441 0.376761 431 1 0.439886 0.122366 0.444423 433 1 0.501878 0.123797 0.370359 404 1 0.500383 0.0582181 0.438692 89 1 0.741792 0.25014 0.00499972 387 1 0.0652688 0.00606798 0.433854 402 1 0.559421 0.0551151 0.378005 408 1 0.621316 0.0552576 0.440039 435 1 0.562184 0.122518 0.441438 437 1 0.622243 0.123151 0.374926 1537 1 0.0046086 0.489426 0.49822 118 1 0.680008 0.434138 0.00250229 486 1 0.190459 0.43355 0.366529 406 1 0.689468 0.0560898 0.377089 410 1 0.812212 0.0621347 0.375903 412 1 0.750219 0.0574668 0.43906 439 1 0.684318 0.122031 0.4343 441 1 0.74957 0.117828 0.375905 443 1 0.809926 0.122003 0.438629 482 1 0.0609292 0.449081 0.373328 420 1 0.98921 0.18727 0.437667 267 1 0.314244 0.00204014 0.315406 488 1 0.126254 0.435163 0.430123 489 1 0.254176 0.374901 0.375922 388 1 0.996824 0.0641696 0.43348 414 1 0.937113 0.0684651 0.368762 416 1 0.879631 0.0608435 0.440362 445 1 0.874414 0.124556 0.379594 447 1 0.934941 0.12463 0.436344 131 1 0.0677053 0.000426287 0.187965 285 1 0.87314 0.00105762 0.250055 418 1 0.0619825 0.190305 0.378345 424 1 0.130732 0.192289 0.433481 450 1 0.061445 0.319424 0.376558 451 1 0.0581784 0.253281 0.42875 453 1 0.12364 0.255578 0.374156 456 1 0.118283 0.319464 0.438835 452 1 0.994978 0.322119 0.437412 449 1 0.991747 0.253645 0.374059 485 1 0.120914 0.37839 0.370742 147 1 0.562409 0.0118425 0.187636 487 1 0.182782 0.378485 0.436346 422 1 0.185358 0.187349 0.375425 426 1 0.313396 0.192188 0.373084 428 1 0.245006 0.195171 0.433608 454 1 0.192026 0.319624 0.374149 455 1 0.185693 0.259482 0.434915 457 1 0.248292 0.249233 0.367893 458 1 0.314443 0.307983 0.377034 459 1 0.308598 0.251043 0.443223 460 1 0.254229 0.316282 0.431728 122 1 0.807037 0.436133 0.006712 484 1 0.997764 0.441136 0.430303 430 1 0.440403 0.189034 0.384043 432 1 0.374852 0.186002 0.442065 461 1 0.371791 0.245602 0.375066 462 1 0.443395 0.314784 0.374121 463 1 0.434373 0.254333 0.436696 464 1 0.37721 0.314949 0.440811 468 1 0.499525 0.307933 0.441126 483 1 0.0579066 0.381756 0.433535 465 1 0.499746 0.251895 0.376167 436 1 0.506839 0.184171 0.44116 467 1 0.564876 0.25041 0.43699 434 1 0.559948 0.184855 0.376188 472 1 0.626164 0.3083 0.431987 469 1 0.620494 0.251725 0.373326 466 1 0.562871 0.315751 0.369896 440 1 0.618992 0.185226 0.441487 481 1 0.988849 0.37354 0.368332 492 1 0.24799 0.433311 0.435965 476 1 0.744759 0.314948 0.432528 438 1 0.681584 0.188071 0.379369 474 1 0.810952 0.317848 0.37346 444 1 0.751027 0.18423 0.432076 470 1 0.687972 0.318455 0.374745 442 1 0.819328 0.18429 0.376532 471 1 0.689432 0.252779 0.442891 475 1 0.813245 0.252175 0.43573 473 1 0.746313 0.24912 0.370238 566 1 0.691904 0.183817 0.491033 479 1 0.934029 0.253182 0.435247 490 1 0.31655 0.434519 0.370499 491 1 0.311796 0.377463 0.43994 629 1 0.62494 0.374257 0.499266 1181 1 0.872571 0.501102 0.120894 145 1 0.50599 0.00435422 0.126725 1171 1 0.56425 0.498586 0.189503 121 1 0.744041 0.375692 0.00449352 1167 1 0.434978 0.496717 0.181928 1299 1 0.559561 0.497862 0.307481 411 1 0.814818 0.00333368 0.438228 69 1 0.12198 0.24395 0.0017904 614 1 0.182654 0.427695 0.498612 1297 1 0.496127 0.5002 0.243864 610 1 0.0665199 0.430836 0.496032 1415 1 0.181967 0.497935 0.438149 1419 1 0.314326 0.499096 0.439453 1163 1 0.316497 0.499598 0.187874 413 1 0.870383 0.0030687 0.375998 1157 1 0.128635 0.497861 0.127945 609 1 0.998659 0.380793 0.498883 593 1 0.495269 0.24199 0.496434 625 1 0.498824 0.375334 0.494827 633 1 0.751823 0.379257 0.497124 22 1 0.691386 0.0623539 0.00682525 569 1 0.751672 0.12138 0.497159 514 1 0.0641951 0.0640849 0.497533 597 1 0.624096 0.251257 0.498963 562 1 0.562479 0.182539 0.49682 1549 1 0.378433 0.498862 0.497545 638 1 0.936034 0.440155 0.498659 34 1 0.0646247 0.186771 0.00104957 586 1 0.309501 0.3148 0.499643 54 1 0.684001 0.184646 0.0048528 601 1 0.750531 0.250591 0.498068 549 1 0.123593 0.126246 0.497025 545 1 0.995911 0.125676 0.492809 582 1 0.186165 0.318586 0.499284 521 1 0.250378 0.00225452 0.495122 602 1 0.813771 0.316209 0.492901 93 1 0.874928 0.249806 0.00112823 573 1 0.881072 0.123284 0.49515 33 1 0.998111 0.130633 0.00150655 2 1 0.0688521 0.0599524 0.00142598 589 1 0.37194 0.25009 0.500147 70 1 0.190391 0.31313 0.00334812 520 1 0.127303 0.0618516 0.564336 547 1 0.0601931 0.126218 0.560273 642 1 0.0646154 0.064099 0.6225 677 1 0.121601 0.127113 0.621772 516 1 1.00083 0.0682174 0.560561 673 1 0.00199018 0.127028 0.622137 10 1 0.31936 0.0657587 0.996859 537 1 0.752104 0.00205869 0.499252 653 1 0.375745 0.00141094 0.630491 1811 1 0.569644 0.497009 0.816047 524 1 0.245203 0.0633901 0.567662 551 1 0.185719 0.128352 0.5625 555 1 0.312826 0.118846 0.566443 646 1 0.182328 0.0629919 0.629655 650 1 0.307948 0.0613357 0.626005 681 1 0.245196 0.125389 0.628397 525 1 0.376707 0.000716037 0.499986 1543 1 0.185654 0.496995 0.56658 769 1 0.997851 0.00294661 0.747714 1947 1 0.80882 0.494667 0.938926 528 1 0.372089 0.0577574 0.564245 559 1 0.439749 0.121635 0.564906 654 1 0.438335 0.0658477 0.621776 685 1 0.373603 0.125438 0.625902 565 1 0.623613 0.120322 0.501745 773 1 0.126085 -6.36612e-05 0.757004 993 1 0.00359586 0.375735 0.881708 689 1 0.498053 0.128407 0.630961 532 1 0.504154 0.0614588 0.569927 536 1 0.625559 0.0606089 0.562176 563 1 0.565232 0.129748 0.56821 658 1 0.564105 0.0652848 0.621988 693 1 0.625578 0.1243 0.625032 1045 1 0.617895 0.497793 0.998468 553 1 0.255981 0.128329 0.506691 540 1 0.750764 0.0599285 0.558922 567 1 0.688301 0.124146 0.560632 571 1 0.813565 0.126793 0.563823 662 1 0.693792 0.0586946 0.624095 666 1 0.809254 0.0584077 0.627399 697 1 0.750092 0.126548 0.624447 1943 1 0.68393 0.49082 0.940124 1021 1 0.872001 0.373594 0.875395 787 1 0.563826 0.00293956 0.805641 1673 1 0.249284 0.496569 0.632151 544 1 0.871394 0.0661275 0.563146 575 1 0.934183 0.12069 0.560271 670 1 0.934737 0.0671312 0.620629 701 1 0.86604 0.125395 0.625104 1022 1 0.940084 0.436097 0.872372 1023 1 0.932676 0.378836 0.935038 1024 1 0.872785 0.437514 0.945636 114 1 0.557344 0.438899 0.993608 1927 1 0.191852 0.496519 0.935604 552 1 0.118009 0.1947 0.55257 579 1 0.0647012 0.259543 0.562278 584 1 0.129309 0.321165 0.567096 674 1 0.0620006 0.189868 0.62302 706 1 0.0628407 0.315751 0.63459 709 1 0.122321 0.25341 0.621184 705 1 0.995545 0.248656 0.628158 580 1 0.996368 0.313871 0.566956 1949 1 0.875368 0.492949 0.880024 775 1 0.193703 0.00190215 0.813657 556 1 0.241815 0.18767 0.565633 583 1 0.187559 0.251914 0.564339 587 1 0.312858 0.253904 0.569503 588 1 0.247446 0.314247 0.567814 678 1 0.177346 0.188977 0.626047 682 1 0.302879 0.184085 0.625886 710 1 0.189921 0.316497 0.633186 713 1 0.24895 0.252177 0.628497 714 1 0.305878 0.316043 0.62939 85 1 0.620078 0.24604 0.997625 560 1 0.370733 0.189153 0.568016 591 1 0.435038 0.249919 0.568777 592 1 0.371898 0.316623 0.56584 686 1 0.434346 0.187241 0.628025 717 1 0.371221 0.24917 0.632014 718 1 0.435818 0.31691 0.633115 721 1 0.495678 0.251695 0.631427 561 1 0.502364 0.123232 0.500721 1821 1 0.87424 0.496691 0.745532 564 1 0.502754 0.187594 0.568781 596 1 0.493165 0.31324 0.568571 568 1 0.629529 0.187862 0.556869 595 1 0.557928 0.24726 0.560259 600 1 0.621424 0.309612 0.55671 690 1 0.560054 0.192421 0.627773 722 1 0.563258 0.313287 0.621383 725 1 0.625228 0.247252 0.624935 557 1 0.366166 0.120945 0.498795 1551 1 0.436483 0.492717 0.569042 617 1 0.24849 0.372972 0.502839 572 1 0.750038 0.182185 0.558388 599 1 0.689702 0.25146 0.558093 603 1 0.808833 0.251694 0.561181 604 1 0.749654 0.316526 0.554626 694 1 0.689412 0.190985 0.617263 698 1 0.80945 0.188754 0.624817 726 1 0.685091 0.314382 0.62297 729 1 0.754444 0.250111 0.630525 730 1 0.813682 0.311904 0.627926 548 1 0.999909 0.191718 0.563849 576 1 0.873401 0.185469 0.567539 607 1 0.9366 0.252732 0.566992 608 1 0.880479 0.310098 0.564332 702 1 0.939962 0.178123 0.61981 733 1 0.875203 0.251919 0.626409 734 1 0.938924 0.316816 0.630577 661 1 0.629705 0.00086403 0.629676 598 1 0.688785 0.311864 0.499328 671 1 0.941704 0.00423864 0.685618 630 1 0.686326 0.447012 0.502799 611 1 0.0593488 0.368873 0.56583 616 1 0.122272 0.434835 0.56926 738 1 0.0707384 0.435333 0.631467 741 1 0.129759 0.374037 0.633225 737 1 0.00219648 0.37872 0.628206 612 1 0.0056136 0.44068 0.565408 615 1 0.19053 0.375297 0.565002 619 1 0.31071 0.374809 0.556773 620 1 0.246023 0.438939 0.569099 742 1 0.184502 0.444252 0.629684 745 1 0.250541 0.37899 0.630702 746 1 0.310477 0.442467 0.629235 996 1 0.99659 0.435149 0.938933 669 1 0.87786 0.000387285 0.621629 1015 1 0.683366 0.37877 0.942808 585 1 0.251035 0.25764 0.504529 623 1 0.435825 0.377402 0.563358 624 1 0.374287 0.440141 0.564922 749 1 0.36819 0.37516 0.626186 750 1 0.440716 0.429732 0.630046 753 1 0.505217 0.375739 0.632579 1014 1 0.684929 0.434995 0.878116 628 1 0.497458 0.435818 0.565193 627 1 0.556242 0.375721 0.565985 632 1 0.620649 0.443685 0.561797 754 1 0.568357 0.437769 0.628044 757 1 0.620525 0.372991 0.621574 915 1 0.557518 0.00299298 0.939471 631 1 0.682404 0.376001 0.559675 635 1 0.814548 0.375548 0.562828 636 1 0.748527 0.436134 0.566432 758 1 0.681623 0.43903 0.626251 761 1 0.750764 0.371398 0.619903 762 1 0.808661 0.447617 0.625943 1017 1 0.748096 0.38001 0.876387 1018 1 0.811394 0.43013 0.883344 913 1 0.502921 0.00127963 0.871518 797 1 0.87595 0.00208777 0.750487 574 1 0.933694 0.192508 0.50653 626 1 0.560613 0.439919 0.503593 637 1 0.873264 0.379501 0.502727 639 1 0.943256 0.376781 0.564423 640 1 0.871438 0.445183 0.567597 765 1 0.87062 0.375619 0.625002 766 1 0.941575 0.444197 0.627607 1019 1 0.808876 0.372437 0.940797 590 1 0.436032 0.311272 0.506111 1951 1 0.943011 0.497747 0.943622 648 1 0.132045 0.060084 0.693097 675 1 0.0703582 0.122006 0.684818 770 1 0.0649908 0.0661799 0.749302 776 1 0.127555 0.0604017 0.814054 803 1 0.0626493 0.125246 0.815593 805 1 0.127934 0.122376 0.755648 772 1 0.00169305 0.0568931 0.816527 1677 1 0.375638 0.499005 0.628229 542 1 0.938234 0.0576103 0.505953 652 1 0.247586 0.064959 0.686827 679 1 0.191561 0.131296 0.69504 683 1 0.30738 0.12404 0.690225 774 1 0.190138 0.0622424 0.751021 778 1 0.311106 0.0644761 0.757285 780 1 0.247573 0.0638456 0.818191 807 1 0.191125 0.124811 0.812046 809 1 0.253788 0.124079 0.753996 811 1 0.313954 0.124701 0.815284 1020 1 0.746092 0.43195 0.943594 656 1 0.374791 0.0583194 0.690975 687 1 0.437183 0.125612 0.691879 782 1 0.438475 0.0647738 0.745951 784 1 0.375637 0.0580754 0.805788 813 1 0.373164 0.123862 0.747106 815 1 0.441717 0.122787 0.809705 817 1 0.504507 0.126944 0.751443 13 1 0.374397 0.0027458 0.995458 660 1 0.501728 0.0632994 0.683733 788 1 0.498165 0.0613503 0.806933 664 1 0.626873 0.0652019 0.689242 691 1 0.565997 0.129072 0.687813 786 1 0.559853 0.0630491 0.741597 792 1 0.628265 0.0566793 0.808445 819 1 0.559767 0.122046 0.808236 821 1 0.629053 0.124325 0.750982 73 1 0.249989 0.251349 0.993344 1931 1 0.315078 0.496083 0.931627 98 1 0.0623185 0.432529 1.00008 594 1 0.554729 0.314738 0.50267 522 1 0.312282 0.0604985 0.508156 550 1 0.190822 0.190035 0.503822 668 1 0.750562 0.0642279 0.689893 695 1 0.68789 0.115344 0.683567 699 1 0.809903 0.126078 0.684588 790 1 0.696275 0.0578596 0.752816 794 1 0.807609 0.0689168 0.750382 796 1 0.748917 0.0653954 0.817618 823 1 0.686107 0.124178 0.813 825 1 0.740833 0.127919 0.750973 827 1 0.813401 0.122122 0.82123 1823 1 0.928836 0.500186 0.813792 771 1 0.0658884 0.000497331 0.81276 964 1 0.997523 0.307333 0.936456 994 1 0.0597554 0.438198 0.873243 801 1 0.996679 0.119639 0.748848 644 1 0.999939 0.0670979 0.685971 672 1 0.873687 0.0587746 0.685489 703 1 0.93624 0.127758 0.690554 798 1 0.93857 0.0592937 0.749744 800 1 0.868208 0.0559486 0.816764 829 1 0.873149 0.120416 0.748816 831 1 0.937989 0.119335 0.811674 680 1 0.125937 0.184472 0.686846 707 1 0.0650406 0.246937 0.684729 712 1 0.126896 0.306713 0.689775 802 1 0.0625553 0.182198 0.74981 808 1 0.127008 0.18493 0.813584 834 1 0.0651974 0.308605 0.749699 835 1 0.0653767 0.242686 0.811591 837 1 0.127446 0.244946 0.754155 840 1 0.123976 0.307545 0.814435 804 1 1.00046 0.188139 0.811626 708 1 0.994664 0.311135 0.690966 684 1 0.247273 0.189735 0.690562 711 1 0.192584 0.250086 0.693509 715 1 0.311366 0.246861 0.687528 716 1 0.251271 0.315184 0.694363 806 1 0.186471 0.184757 0.75625 810 1 0.309294 0.187317 0.751134 812 1 0.254603 0.186077 0.816082 838 1 0.186399 0.310488 0.753154 839 1 0.193785 0.251805 0.816281 841 1 0.254671 0.250461 0.75669 842 1 0.315058 0.311556 0.74809 843 1 0.312643 0.248079 0.815602 844 1 0.246396 0.31906 0.810549 688 1 0.37182 0.183328 0.687605 719 1 0.431046 0.251209 0.690549 720 1 0.367788 0.31441 0.687866 814 1 0.434576 0.183194 0.752864 816 1 0.374976 0.189688 0.812777 845 1 0.377801 0.248437 0.750714 846 1 0.441165 0.316428 0.753693 847 1 0.437081 0.248791 0.815498 848 1 0.371576 0.315792 0.811413 692 1 0.503436 0.188929 0.689663 852 1 0.502633 0.313277 0.813368 724 1 0.496634 0.310008 0.689613 820 1 0.496273 0.183291 0.812695 849 1 0.497779 0.247833 0.749876 696 1 0.62936 0.187286 0.681208 723 1 0.569959 0.257762 0.682968 728 1 0.631315 0.31423 0.691248 818 1 0.569378 0.188289 0.745698 824 1 0.626181 0.188367 0.811125 850 1 0.558599 0.30867 0.747605 851 1 0.558272 0.242786 0.813598 853 1 0.625497 0.257243 0.749735 856 1 0.620375 0.309081 0.815654 700 1 0.74978 0.18911 0.688423 727 1 0.689136 0.250319 0.691852 731 1 0.812045 0.252478 0.688969 732 1 0.74928 0.308679 0.688918 822 1 0.686271 0.191122 0.748025 826 1 0.807777 0.182816 0.755282 828 1 0.748925 0.187107 0.819773 854 1 0.692968 0.316208 0.749037 855 1 0.690584 0.252805 0.809689 857 1 0.753312 0.247296 0.751403 858 1 0.813382 0.311332 0.755515 859 1 0.813034 0.249709 0.817303 860 1 0.754592 0.309415 0.811522 676 1 1.0002 0.182889 0.686513 836 1 0.997544 0.30903 0.810084 833 1 0.00118186 0.245389 0.746435 704 1 0.873884 0.18926 0.686083 735 1 0.932288 0.249195 0.694842 736 1 0.875182 0.310652 0.691417 830 1 0.935562 0.18745 0.749883 832 1 0.873552 0.180641 0.807286 861 1 0.872687 0.246372 0.752888 862 1 0.938013 0.315117 0.755365 863 1 0.935792 0.252218 0.814946 864 1 0.872951 0.31361 0.811021 1029 1 0.127449 0.48819 0.990125 1009 1 0.498062 0.372264 0.879217 739 1 0.0621464 0.380011 0.688179 744 1 0.130569 0.4453 0.692854 866 1 0.0687295 0.43493 0.746946 867 1 0.0624923 0.373098 0.818067 869 1 0.123612 0.372011 0.746094 872 1 0.121205 0.431542 0.814916 740 1 0.0010262 0.439137 0.689743 865 1 0.00460241 0.378069 0.753591 868 1 0.00106424 0.433554 0.813196 1935 1 0.437502 0.498873 0.936715 950 1 0.68974 0.184078 0.874891 743 1 0.190485 0.377045 0.692958 747 1 0.313366 0.375624 0.69484 748 1 0.254271 0.437966 0.693306 870 1 0.189082 0.444452 0.753077 871 1 0.184792 0.377142 0.809736 873 1 0.246275 0.379704 0.754352 874 1 0.316666 0.444579 0.750123 875 1 0.311426 0.373376 0.804403 876 1 0.253302 0.442645 0.813545 1011 1 0.559937 0.372372 0.938567 1010 1 0.563162 0.439218 0.878154 1016 1 0.622063 0.435791 0.933383 751 1 0.439535 0.371225 0.692515 752 1 0.383859 0.429968 0.686726 877 1 0.375257 0.373924 0.750943 878 1 0.443586 0.436359 0.747301 879 1 0.442359 0.380562 0.812526 880 1 0.377977 0.438749 0.805218 884 1 0.501603 0.44201 0.815978 881 1 0.50273 0.378298 0.751544 756 1 0.504115 0.434578 0.693264 755 1 0.568744 0.378693 0.687677 760 1 0.629494 0.439577 0.686966 882 1 0.565886 0.439367 0.750938 883 1 0.56448 0.370193 0.812644 885 1 0.624486 0.372446 0.752063 888 1 0.629994 0.43791 0.813974 1539 1 0.0676637 0.500477 0.563976 759 1 0.687939 0.376703 0.684312 763 1 0.813206 0.373686 0.690291 764 1 0.749039 0.433814 0.683368 886 1 0.689575 0.440292 0.746142 887 1 0.683195 0.376943 0.810097 889 1 0.748422 0.375696 0.747457 890 1 0.801941 0.439439 0.751011 891 1 0.81291 0.380005 0.80933 892 1 0.746771 0.43374 0.813682 94 1 0.935037 0.316989 0.995312 558 1 0.436868 0.18628 0.503737 1012 1 0.501887 0.433544 0.931198 767 1 0.936858 0.383353 0.686032 768 1 0.875033 0.439653 0.684488 893 1 0.875082 0.375413 0.744818 894 1 0.937026 0.434603 0.752094 895 1 0.934135 0.376651 0.812116 896 1 0.872795 0.437736 0.817367 1013 1 0.618441 0.371943 0.875981 1819 1 0.811489 0.498005 0.810869 898 1 0.0663193 0.0643579 0.877451 904 1 0.126638 0.058096 0.93387 931 1 0.0675286 0.125181 0.937908 933 1 0.129804 0.127852 0.876315 1945 1 0.748629 0.49313 0.878078 917 1 0.619192 0.0013593 0.868853 50 1 0.561043 0.180374 0.997158 1008 1 0.376316 0.433251 0.937218 554 1 0.310696 0.189364 0.499814 101 1 0.121513 0.375549 0.996559 902 1 0.191873 0.0631834 0.878442 906 1 0.316155 0.0573052 0.871923 908 1 0.259488 0.0686884 0.938485 935 1 0.193466 0.123162 0.94 937 1 0.252789 0.132017 0.878582 939 1 0.317773 0.129442 0.936742 515 1 0.0655116 0.000491266 0.559311 1681 1 0.500232 0.492656 0.629802 577 1 0.996267 0.251988 0.500754 910 1 0.442658 0.0613704 0.874194 912 1 0.375817 0.0629047 0.931102 941 1 0.376723 0.125432 0.875035 943 1 0.434808 0.126106 0.936514 945 1 0.497683 0.125944 0.877186 916 1 0.494094 0.0606857 0.93849 1005 1 0.379685 0.375212 0.866719 998 1 0.194123 0.434358 0.872953 65 1 0.994392 0.246103 0.998831 1007 1 0.430925 0.369759 0.939689 113 1 0.501796 0.372561 0.998043 622 1 0.4416 0.441955 0.500027 1006 1 0.439654 0.436622 0.875273 914 1 0.560121 0.0632723 0.870244 920 1 0.62483 0.0585754 0.938462 947 1 0.563834 0.119083 0.937693 949 1 0.625029 0.118066 0.873404 97 1 0.997813 0.368771 0.99943 954 1 0.814201 0.185994 0.873837 30 1 0.934822 0.0703756 0.998967 986 1 0.81319 0.315032 0.873483 1004 1 0.255095 0.433973 0.938493 918 1 0.689931 0.0577357 0.877064 922 1 0.802353 0.0547008 0.879569 924 1 0.746046 0.0556048 0.940462 951 1 0.687797 0.123062 0.937433 953 1 0.747958 0.127372 0.87484 955 1 0.812744 0.124035 0.930062 983 1 0.685581 0.251152 0.941617 987 1 0.808967 0.256108 0.933388 621 1 0.378017 0.38248 0.501524 960 1 0.877521 0.192856 0.940395 900 1 0.00450212 0.06568 0.948156 929 1 1.00125 0.12106 0.874237 926 1 0.934821 0.0608257 0.8833 928 1 0.872448 0.0634974 0.940105 957 1 0.878733 0.121603 0.873469 959 1 0.933645 0.126709 0.933656 1000 1 0.127558 0.43194 0.926426 992 1 0.871612 0.311894 0.937696 1695 1 0.935953 0.497575 0.689546 930 1 0.0631263 0.183631 0.876684 936 1 0.129171 0.183706 0.933412 962 1 0.0624864 0.309099 0.873482 963 1 0.0597021 0.246546 0.941196 965 1 0.120425 0.24842 0.875284 968 1 0.128666 0.311188 0.944763 961 1 0.00332449 0.245809 0.873216 932 1 0.0019356 0.189647 0.932035 989 1 0.873227 0.255188 0.877518 991 1 0.939798 0.248715 0.930337 995 1 0.05901 0.371648 0.940154 1003 1 0.315116 0.371814 0.936581 1001 1 0.247713 0.375674 0.871879 934 1 0.193577 0.187127 0.875211 938 1 0.317175 0.188272 0.876694 940 1 0.254958 0.186703 0.939371 966 1 0.186254 0.307165 0.881235 967 1 0.186 0.250322 0.940215 969 1 0.255768 0.247357 0.875892 970 1 0.309872 0.315296 0.872467 971 1 0.312984 0.251908 0.934889 972 1 0.250925 0.311422 0.931392 997 1 0.126189 0.367654 0.875773 990 1 0.936659 0.315649 0.874461 973 1 0.380004 0.250234 0.872669 944 1 0.381057 0.188935 0.940603 942 1 0.437814 0.188094 0.872678 976 1 0.376665 0.309162 0.933127 975 1 0.436672 0.252769 0.936218 974 1 0.437794 0.31221 0.87195 980 1 0.50306 0.309218 0.939062 977 1 0.499144 0.248149 0.869528 948 1 0.498022 0.190553 0.93183 958 1 0.93556 0.185581 0.872749 999 1 0.187608 0.370597 0.941049 979 1 0.562759 0.243787 0.937836 978 1 0.564322 0.306903 0.880341 952 1 0.626473 0.188529 0.936159 946 1 0.561008 0.182678 0.870846 984 1 0.625499 0.310416 0.936604 981 1 0.625525 0.245547 0.874417 1002 1 0.315928 0.430996 0.873675 985 1 0.744872 0.256966 0.875855 982 1 0.684299 0.312127 0.874552 988 1 0.740669 0.318044 0.940374 956 1 0.751028 0.187206 0.940429 86 1 0.684008 0.314889 0.999414 102 1 0.193056 0.433374 0.99555 77 1 0.381106 0.247253 0.99913 38 1 0.187568 0.185437 0.993765 46 1 0.438951 0.188638 0.998629 110 1 0.440621 0.433193 0.997709 90 1 0.800826 0.306202 0.997952 1049 1 0.747625 0.496209 0.998646 74 1 0.31597 0.311373 0.997642 78 1 0.439297 0.305597 0.998205 57 1 0.750694 0.125046 0.993984 58 1 0.812764 0.189002 0.99321 105 1 0.248585 0.370498 0.993777 530 1 0.56229 0.063555 0.502586 1541 1 0.129811 0.496231 0.502583 106 1 0.315821 0.436279 0.998941 21 1 0.621851 0.00259527 0.998477 42 1 0.308762 0.185066 0.998755 81 1 0.503589 0.245757 0.999003 538 1 0.813563 0.0599863 0.505592 613 1 0.119906 0.369526 0.505029 618 1 0.317087 0.440399 0.502981 45 1 0.381121 0.129544 0.999902 526 1 0.435489 0.0620884 0.503043 125 1 0.873508 0.372351 0.997978 117 1 0.618118 0.374016 0.996001 37 1 0.125182 0.124523 0.996833 634 1 0.802777 0.444161 0.507991 518 1 0.186494 0.0644733 0.503545 581 1 0.120602 0.25962 0.503817 61 1 0.867196 0.127972 0.994979 1032 1 0.130562 0.560951 0.0609316 1059 1 0.0672844 0.623541 0.0637537 1154 1 0.0718883 0.561932 0.123138 1189 1 0.131042 0.619758 0.127254 1305 1 0.74991 0.500868 0.247771 1536 1 0.882367 0.935421 0.441379 25 1 0.751389 0.995104 0.00297407 1053 1 0.874235 0.500879 0.00781298 1281 1 0.993793 0.500273 0.246693 415 1 0.939647 0.998909 0.440708 1036 1 0.25128 0.564805 0.0592412 1063 1 0.189187 0.625926 0.0638439 1067 1 0.319137 0.631324 0.0611022 1158 1 0.191512 0.5617 0.126369 1162 1 0.311006 0.564599 0.121345 1193 1 0.253644 0.621428 0.124517 1040 1 0.375383 0.560484 0.068035 1071 1 0.442262 0.628513 0.060573 1166 1 0.442598 0.560671 0.127367 1197 1 0.376385 0.625697 0.118516 149 1 0.623646 0.998099 0.122715 1535 1 0.94723 0.876396 0.443438 1413 1 0.127334 0.504809 0.369956 1025 1 0.00496335 0.499997 0.00472887 1201 1 0.502314 0.624737 0.125189 1044 1 0.498105 0.56271 0.0629261 1048 1 0.620068 0.562199 0.0588769 1075 1 0.563531 0.626225 0.0585271 1170 1 0.562047 0.569318 0.125377 1205 1 0.626227 0.627492 0.130323 1055 1 0.939372 0.501435 0.0627182 1409 1 0.996826 0.506471 0.378365 407 1 0.687818 0.994633 0.439862 1052 1 0.747285 0.563184 0.0631366 1079 1 0.682883 0.623176 0.0603431 1083 1 0.809397 0.621616 0.0646708 1174 1 0.687924 0.563607 0.124388 1178 1 0.810013 0.56223 0.126509 1209 1 0.750544 0.628045 0.125046 1534 1 0.935182 0.944441 0.377561 1054 1 0.937202 0.562154 0.0063284 259 1 0.0618203 0.998554 0.309808 1177 1 0.751408 0.504315 0.118266 1533 1 0.879352 0.874864 0.37287 1028 1 0.0072496 0.563992 0.0672616 1185 1 0.00640595 0.622635 0.12101 1056 1 0.870228 0.565754 0.0688919 1087 1 0.935336 0.624962 0.0594717 1182 1 0.943235 0.557416 0.124315 1213 1 0.873341 0.623422 0.12389 1505 1 0.993222 0.878156 0.37412 1289 1 0.251876 0.502254 0.243302 1173 1 0.622699 0.501314 0.123403 1423 1 0.447019 0.503759 0.436355 1064 1 0.126789 0.68392 0.0646142 1091 1 0.069318 0.747145 0.0616855 1096 1 0.1311 0.812195 0.0662861 1186 1 0.0656613 0.685921 0.127294 1218 1 0.0653112 0.809222 0.121551 1221 1 0.132631 0.745627 0.125448 1060 1 0.00598732 0.680487 0.0617453 1283 1 0.0584598 0.501167 0.304351 1068 1 0.254917 0.686668 0.0628324 1095 1 0.187739 0.750237 0.0630905 1099 1 0.315387 0.76086 0.0640002 1100 1 0.247741 0.813611 0.0618793 1190 1 0.189309 0.682487 0.122721 1194 1 0.312325 0.695249 0.122174 1222 1 0.189135 0.808773 0.123543 1225 1 0.250505 0.75087 0.12372 1226 1 0.312325 0.81638 0.121245 405 1 0.622611 0.992315 0.376785 1295 1 0.43873 0.506417 0.312691 1034 1 0.312652 0.563029 0.00246167 1072 1 0.376999 0.693085 0.0550805 1103 1 0.437476 0.749199 0.0613361 1104 1 0.37386 0.819568 0.0669852 1198 1 0.439429 0.689826 0.128458 1229 1 0.37288 0.752354 0.12381 1230 1 0.439203 0.811152 0.126207 1233 1 0.501846 0.7537 0.126434 1047 1 0.685643 0.500479 0.0604539 1065 1 0.249619 0.627578 0.00209905 1133 1 0.377745 0.879554 0.00705449 1108 1 0.494458 0.81328 0.0627907 1076 1 0.496101 0.689756 0.0676185 1080 1 0.621406 0.68619 0.06619 1107 1 0.558476 0.75179 0.0604391 1112 1 0.622147 0.811019 0.0590315 1202 1 0.566061 0.683622 0.123372 1234 1 0.565336 0.818079 0.128562 1237 1 0.626704 0.746417 0.128759 1084 1 0.751166 0.688185 0.058365 1111 1 0.688939 0.755153 0.0585966 1115 1 0.811465 0.746041 0.0606688 1116 1 0.747255 0.814762 0.0641915 1206 1 0.687915 0.689012 0.121841 1210 1 0.808851 0.686266 0.125246 1238 1 0.686722 0.814292 0.122267 1241 1 0.747557 0.748146 0.123843 1242 1 0.81299 0.81184 0.120114 397 1 0.376162 0.997429 0.379302 1546 1 0.313353 0.563493 0.499703 141 1 0.373073 0.999103 0.121897 1217 1 0.00244937 0.745554 0.116461 1092 1 0.00140353 0.814891 0.0632447 1088 1 0.866048 0.680078 0.0621282 1119 1 0.943858 0.749121 0.0623626 1120 1 0.876021 0.811205 0.0655252 1214 1 0.937119 0.678393 0.11851 1245 1 0.875611 0.742828 0.118834 1246 1 0.939151 0.81555 0.122381 287 1 0.945696 0.99893 0.312629 1050 1 0.806997 0.558111 0.001172 1123 1 0.0621516 0.87284 0.0619972 1128 1 0.124512 0.939229 0.0658804 1250 1 0.0596749 0.93809 0.123334 1253 1 0.130919 0.870541 0.131529 1124 1 0.998379 0.935087 0.052916 1581 1 0.373984 0.626894 0.49661 159 1 0.933676 0.998136 0.18421 1127 1 0.186922 0.871452 0.0640676 1131 1 0.312086 0.87972 0.0655428 1132 1 0.249277 0.938562 0.0613163 1254 1 0.1846 0.933878 0.124753 1257 1 0.245465 0.874815 0.125346 1258 1 0.304797 0.937809 0.124691 139 1 0.316493 0.999247 0.185014 1293 1 0.37584 0.499943 0.253461 1093 1 0.131524 0.749626 -0.000263209 1135 1 0.436526 0.882824 0.0658953 1136 1 0.37051 0.940165 0.0662256 1261 1 0.374646 0.874431 0.128553 1262 1 0.437419 0.942917 0.121151 1179 1 0.810698 0.500023 0.186851 399 1 0.440135 0.998116 0.435377 1427 1 0.570177 0.506581 0.435716 1582 1 0.441646 0.690088 0.496911 1439 1 0.937423 0.505315 0.434382 1140 1 0.504994 0.932361 0.0693129 1265 1 0.503336 0.873591 0.125643 1139 1 0.563997 0.87422 0.0615023 1144 1 0.620924 0.934316 0.0673521 1266 1 0.565711 0.939578 0.128669 1269 1 0.626323 0.879596 0.126775 1142 1 0.686789 0.936901 0.0034614 1532 1 0.759991 0.937415 0.442821 1037 1 0.377006 0.502256 0.00450634 23 1 0.686718 0.991952 0.0637922 1143 1 0.68933 0.878089 0.0675935 1147 1 0.811179 0.873585 0.0624065 1148 1 0.752332 0.938226 0.0636862 1270 1 0.693132 0.938645 0.129267 1273 1 0.753545 0.87451 0.127236 1274 1 0.812669 0.934863 0.124538 1531 1 0.818266 0.875039 0.437252 1530 1 0.818687 0.935029 0.374818 1529 1 0.753129 0.87808 0.376296 1249 1 0.00227533 0.87453 0.121336 1151 1 0.937394 0.877395 0.0622843 1152 1 0.868629 0.93381 0.0622448 1277 1 0.881091 0.876241 0.119479 1278 1 0.935592 0.938279 0.116211 1527 1 0.69471 0.877666 0.43303 1160 1 0.127517 0.559068 0.18555 1187 1 0.0666952 0.620381 0.184706 1282 1 0.0530001 0.563977 0.247973 1288 1 0.12434 0.559874 0.302048 1315 1 0.0634612 0.625543 0.308735 1317 1 0.125007 0.624536 0.249052 1284 1 0.996034 0.563863 0.308443 1313 1 0.99709 0.63178 0.247869 1164 1 0.24755 0.56379 0.185173 1191 1 0.191518 0.623555 0.187986 1195 1 0.311072 0.622399 0.183194 1286 1 0.188608 0.563357 0.246381 1290 1 0.316962 0.560519 0.248377 1292 1 0.249353 0.555085 0.309998 1319 1 0.190994 0.617954 0.315009 1321 1 0.25044 0.621059 0.250031 1323 1 0.318472 0.626799 0.311583 1526 1 0.687833 0.935536 0.377811 1153 1 0.00423661 0.502354 0.124315 1168 1 0.372056 0.56131 0.180753 1199 1 0.43894 0.626715 0.182928 1294 1 0.431873 0.561337 0.238371 1296 1 0.372361 0.562337 0.312733 1325 1 0.373517 0.629064 0.249794 1327 1 0.435052 0.62004 0.315634 1300 1 0.502992 0.561541 0.314357 1525 1 0.626094 0.880571 0.368077 1329 1 0.494476 0.627984 0.257811 1172 1 0.501469 0.559647 0.1848 1176 1 0.623542 0.56742 0.189575 1203 1 0.560179 0.625899 0.187198 1298 1 0.55447 0.565431 0.247655 1304 1 0.61981 0.558884 0.300785 1331 1 0.56932 0.627876 0.310452 1333 1 0.62467 0.629765 0.247624 1521 1 0.498722 0.872277 0.374727 1169 1 0.50291 0.501591 0.129924 1618 1 0.562921 0.815126 0.4977 1180 1 0.746046 0.567991 0.189143 1207 1 0.687488 0.627784 0.183879 1211 1 0.813903 0.624164 0.189888 1302 1 0.688915 0.562333 0.248344 1306 1 0.809259 0.559964 0.251381 1308 1 0.749512 0.565634 0.311904 1335 1 0.686564 0.625113 0.305932 1337 1 0.753015 0.630201 0.247508 1339 1 0.817517 0.625526 0.310639 157 1 0.874534 0.999251 0.127554 1156 1 0.99876 0.561861 0.186638 1184 1 0.87657 0.557477 0.187697 1215 1 0.937895 0.617689 0.181382 1310 1 0.93726 0.565019 0.245407 1312 1 0.876625 0.567907 0.311541 1341 1 0.870868 0.629371 0.246535 1343 1 0.935888 0.629234 0.303583 1307 1 0.815601 0.499518 0.31491 1192 1 0.131241 0.682942 0.187551 1219 1 0.069148 0.746628 0.178521 1224 1 0.126401 0.806052 0.183294 1314 1 0.0609962 0.690502 0.241016 1320 1 0.129159 0.687744 0.312862 1346 1 0.0657398 0.807712 0.242593 1347 1 0.0628649 0.7464 0.307083 1349 1 0.13211 0.744804 0.243838 1352 1 0.123796 0.807345 0.309382 1348 1 0.00531141 0.813731 0.309278 1220 1 0.00148825 0.814143 0.178405 1316 1 0.997831 0.691968 0.305652 1188 1 0.995033 0.684624 0.184655 1196 1 0.2598 0.686977 0.18864 1223 1 0.197018 0.74537 0.18348 1227 1 0.314117 0.749126 0.189698 1228 1 0.247385 0.809751 0.192071 1318 1 0.192922 0.688488 0.242627 1322 1 0.314551 0.686923 0.250597 1324 1 0.243236 0.685568 0.315949 1350 1 0.181802 0.812199 0.246744 1351 1 0.185888 0.749443 0.311691 1353 1 0.255948 0.744753 0.250097 1354 1 0.312922 0.813733 0.247421 1355 1 0.31332 0.753239 0.313128 1356 1 0.251119 0.807884 0.308182 1200 1 0.369931 0.684154 0.188807 1231 1 0.437562 0.755511 0.187142 1232 1 0.381189 0.81894 0.184481 1326 1 0.438073 0.694821 0.245401 1328 1 0.379195 0.6845 0.320894 1357 1 0.375224 0.748773 0.251139 1358 1 0.438413 0.808554 0.248648 1359 1 0.430253 0.754591 0.313955 1360 1 0.368388 0.810947 0.312746 1364 1 0.499472 0.813266 0.307988 1236 1 0.499515 0.813703 0.191115 1361 1 0.507073 0.751465 0.246699 1204 1 0.503846 0.68734 0.182172 1332 1 0.493477 0.694137 0.307729 1208 1 0.631716 0.687405 0.185872 1235 1 0.564937 0.752424 0.188945 1240 1 0.627537 0.814773 0.183859 1330 1 0.562302 0.688894 0.2493 1336 1 0.626726 0.689752 0.309371 1362 1 0.568038 0.817164 0.255128 1363 1 0.563528 0.752541 0.31098 1365 1 0.629004 0.755861 0.248276 1368 1 0.631372 0.818159 0.310592 1212 1 0.750617 0.683176 0.184637 1239 1 0.68958 0.752438 0.184455 1243 1 0.812765 0.750581 0.180341 1244 1 0.748717 0.816041 0.186168 1334 1 0.693644 0.690819 0.251446 1338 1 0.814628 0.689046 0.250301 1340 1 0.753587 0.685404 0.310086 1366 1 0.689487 0.817017 0.251011 1367 1 0.695278 0.755639 0.311279 1369 1 0.756561 0.751042 0.24751 1370 1 0.812661 0.810505 0.244701 1371 1 0.813628 0.753503 0.309365 1372 1 0.75574 0.811859 0.312691 1345 1 0.995401 0.76335 0.247155 1216 1 0.871849 0.687744 0.183283 1247 1 0.940795 0.752101 0.177277 1248 1 0.872077 0.814099 0.180876 1342 1 0.937776 0.690936 0.242185 1344 1 0.875693 0.69368 0.306384 1373 1 0.874201 0.751857 0.242359 1374 1 0.930687 0.815433 0.244002 1375 1 0.938926 0.751019 0.306118 1376 1 0.87685 0.804241 0.304515 1522 1 0.561631 0.933962 0.37267 1251 1 0.0593333 0.871341 0.18302 1256 1 0.125641 0.935027 0.184707 1378 1 0.0649673 0.93369 0.24506 1379 1 0.0615856 0.87722 0.311413 1381 1 0.117525 0.874718 0.245777 1384 1 0.119905 0.939577 0.312079 1252 1 0.00113472 0.942465 0.190451 1380 1 0.997431 0.92948 0.308374 1377 1 1.00003 0.86878 0.245617 15 1 0.438249 0.998612 0.0607048 273 1 0.498675 0.998396 0.252694 1255 1 0.191377 0.871572 0.189553 1259 1 0.308816 0.874332 0.187012 1260 1 0.242531 0.936063 0.187819 1382 1 0.188256 0.935702 0.247424 1383 1 0.181766 0.877783 0.310504 1385 1 0.250239 0.871898 0.255792 1386 1 0.309141 0.940525 0.245582 1387 1 0.311427 0.874384 0.31603 1388 1 0.251436 0.935655 0.312425 1161 1 0.253906 0.499384 0.122661 1118 1 0.940105 0.810237 0.00282652 401 1 0.498739 0.996501 0.374643 1263 1 0.440159 0.876834 0.177537 1264 1 0.373938 0.936954 0.187942 1389 1 0.374428 0.875124 0.24361 1390 1 0.436436 0.940126 0.245919 1391 1 0.43372 0.872443 0.307309 1392 1 0.375069 0.936469 0.307567 1523 1 0.562307 0.873434 0.433781 1393 1 0.501084 0.879334 0.246855 1396 1 0.493235 0.936867 0.311805 1268 1 0.502375 0.941234 0.183453 1267 1 0.565068 0.875241 0.189221 1272 1 0.62487 0.940285 0.189663 1394 1 0.563093 0.942846 0.249349 1395 1 0.559316 0.876778 0.313318 1397 1 0.629044 0.875148 0.25311 1400 1 0.626856 0.943629 0.309556 409 1 0.752695 0.995495 0.37956 1271 1 0.692789 0.876218 0.190231 1275 1 0.808672 0.878338 0.189202 1276 1 0.749974 0.939256 0.189025 1398 1 0.683766 0.940638 0.250152 1399 1 0.691989 0.877585 0.309355 1401 1 0.752596 0.874844 0.251949 1402 1 0.814664 0.937229 0.253948 1403 1 0.810635 0.876239 0.310866 1404 1 0.744955 0.941521 0.311815 1528 1 0.627971 0.929778 0.437339 1279 1 0.940192 0.878623 0.183672 1280 1 0.875525 0.932681 0.18646 1405 1 0.872218 0.871025 0.252106 1406 1 0.933107 0.934532 0.247006 1407 1 0.936516 0.865873 0.309756 1408 1 0.877481 0.941515 0.311915 1102 1 0.438743 0.815499 0.00456775 1410 1 0.0606229 0.561583 0.370326 1416 1 0.126584 0.56358 0.438828 1443 1 0.0686515 0.625252 0.429736 1445 1 0.130399 0.61729 0.372286 1441 1 0.00057965 0.626217 0.368761 1412 1 0.00536111 0.561957 0.439509 1420 1 0.254972 0.56317 0.435139 1451 1 0.313153 0.632061 0.437946 1449 1 0.255944 0.620377 0.37499 1447 1 0.192134 0.624968 0.434846 1414 1 0.189238 0.554434 0.37795 1418 1 0.312165 0.558103 0.377248 279 1 0.686214 0.999621 0.317108 385 1 0.997826 0.998483 0.374895 1590 1 0.689013 0.692398 0.500114 277 1 0.624171 0.998762 0.249427 1453 1 0.373471 0.619541 0.377909 1424 1 0.376252 0.559508 0.438907 1455 1 0.442404 0.626123 0.4361 1422 1 0.445155 0.559808 0.375639 1428 1 0.507088 0.560489 0.42914 1457 1 0.505301 0.628192 0.371868 1311 1 0.932422 0.504164 0.311606 1041 1 0.49888 0.499827 0.00397918 1461 1 0.628514 0.621821 0.373196 1426 1 0.569266 0.557668 0.368112 1432 1 0.62521 0.571115 0.436583 1459 1 0.565441 0.630968 0.432079 1617 1 0.501831 0.753606 0.498724 1465 1 0.752593 0.623625 0.371345 1467 1 0.812513 0.628765 0.435056 1430 1 0.68698 0.563524 0.382563 1434 1 0.816717 0.567737 0.370642 1436 1 0.7468 0.562231 0.436068 1463 1 0.690801 0.621678 0.440206 1138 1 0.562875 0.93653 0.000636169 155 1 0.814639 1.00079 0.187625 1411 1 0.0615311 0.501554 0.439298 1303 1 0.685117 0.503267 0.311766 1471 1 0.937158 0.62554 0.433654 1438 1 0.934623 0.566547 0.372298 1440 1 0.877401 0.56884 0.434447 1469 1 0.878963 0.632514 0.368015 1638 1 0.185246 0.940563 0.496162 1442 1 0.0657646 0.690031 0.372588 1480 1 0.124788 0.817435 0.437274 1448 1 0.128019 0.68694 0.437312 1474 1 0.0620808 0.812319 0.375742 1475 1 0.0635192 0.751756 0.43592 1477 1 0.13217 0.752187 0.372862 1444 1 0.00532469 0.683269 0.432703 1473 1 0.00237595 0.748174 0.372663 1609 1 0.244608 0.752047 0.499338 1519 1 0.435903 0.879361 0.433489 1437 1 0.875965 0.506292 0.368918 1483 1 0.30836 0.752492 0.440125 1484 1 0.246045 0.813036 0.433222 1478 1 0.185785 0.811642 0.371093 1481 1 0.251982 0.749649 0.377234 1482 1 0.307638 0.81458 0.374994 1479 1 0.186347 0.754936 0.436471 1450 1 0.313946 0.690587 0.374849 1452 1 0.249923 0.691248 0.434914 1446 1 0.188004 0.684918 0.378656 1518 1 0.436596 0.938024 0.371698 1517 1 0.370826 0.877654 0.376503 1520 1 0.374087 0.936684 0.439708 1456 1 0.37379 0.691826 0.432359 1486 1 0.440766 0.815063 0.37404 1454 1 0.438248 0.683742 0.373072 1488 1 0.37227 0.815569 0.435545 1487 1 0.437967 0.755916 0.439512 1485 1 0.378273 0.753194 0.374973 1489 1 0.507332 0.754794 0.371021 1460 1 0.499973 0.691597 0.433021 1492 1 0.497155 0.81068 0.436226 1458 1 0.568843 0.689849 0.369913 1491 1 0.563237 0.755337 0.432688 1493 1 0.629628 0.746709 0.373556 1496 1 0.626446 0.815873 0.430206 1464 1 0.632148 0.688903 0.436458 1490 1 0.568826 0.810955 0.368558 1515 1 0.310545 0.875935 0.442388 1513 1 0.246288 0.877855 0.373705 1524 1 0.499935 0.938452 0.436985 1462 1 0.694801 0.685828 0.372586 1499 1 0.824153 0.749756 0.439006 1495 1 0.691635 0.755496 0.43478 1466 1 0.813006 0.688856 0.372204 1468 1 0.753935 0.690345 0.442317 1500 1 0.75329 0.816694 0.434903 1498 1 0.809652 0.807227 0.372569 1494 1 0.686689 0.817981 0.3728 1497 1 0.748992 0.750525 0.375833 1516 1 0.24914 0.941209 0.440971 1502 1 0.937281 0.810536 0.379535 1472 1 0.881489 0.685295 0.434099 1504 1 0.876161 0.809865 0.440158 1476 1 -0.000161594 0.812347 0.438761 1503 1 0.9385 0.741738 0.443313 1470 1 0.940315 0.688531 0.370119 1501 1 0.880455 0.747194 0.372035 1101 1 0.378604 0.755744 0.00202051 1514 1 0.311034 0.940842 0.376744 1508 1 3.35815e-05 0.938382 0.437122 1511 1 0.18444 0.876955 0.432402 1141 1 0.624289 0.874333 0.00138427 1512 1 0.125016 0.939546 0.43721 1506 1 0.0591736 0.936062 0.372821 1507 1 0.0607241 0.879437 0.43648 1509 1 0.123534 0.873137 0.37117 1510 1 0.188052 0.941489 0.374233 1634 1 0.0646793 0.934949 0.499681 403 1 0.564424 0.995975 0.437275 263 1 0.183221 0.997126 0.309819 1159 1 0.190649 0.50179 0.182908 257 1 0.999297 0.998337 0.251402 1578 1 0.309266 0.690798 0.496275 1175 1 0.690546 0.503489 0.183885 1429 1 0.633545 0.499769 0.379456 1435 1 0.811518 0.500011 0.439867 19 1 0.562415 0.997184 0.0616268 1089 1 0.00848237 0.748343 0.00797206 1421 1 0.37524 0.501002 0.378628 1431 1 0.686403 0.501488 0.439452 1145 1 0.745362 0.870812 0.00591514 1566 1 0.942011 0.561677 0.495334 1137 1 0.499574 0.879538 -0.000730599 1285 1 0.121609 0.500648 0.245624 1125 1 0.128741 0.873714 0.000445701 1570 1 0.0654736 0.685279 0.498252 1641 1 0.247601 0.879846 0.494333 1653 1 0.628545 0.873561 0.499273 1117 1 0.878661 0.748302 0.00275283 1622 1 0.689151 0.81876 0.497452 1051 1 0.811496 0.501835 0.0605055 1043 1 0.558855 0.502006 0.064078 1114 1 0.814641 0.812403 0.00413852 389 1 0.123161 0.999045 0.376118 1090 1 0.0653778 0.810237 0.00583531 1121 1 0.00308277 0.872565 0.00177635 533 1 0.625125 0.991195 0.496936 1562 1 0.811282 0.563284 0.497189 1586 1 0.5641 0.689626 0.488931 1550 1 0.444253 0.557754 0.497311 1038 1 0.436601 0.5616 0.00212451 1605 1 0.123109 0.749919 0.49719 1602 1 0.0632836 0.811284 0.496905 1649 1 0.494381 0.87342 0.491596 1614 1 0.432799 0.818754 0.498454 1069 1 0.383644 0.626035 0.00292603 1574 1 0.188754 0.690854 0.493632 1097 1 0.248431 0.750571 0.00237183 1134 1 0.438951 0.935748 0.00111613 1585 1 0.502803 0.622149 0.496706 1654 1 0.691586 0.933398 0.496117 1577 1 0.251985 0.625995 0.499743 1613 1 0.375921 0.754221 0.499447 1066 1 0.314027 0.686618 8.43055e-05 1042 1 0.554994 0.567224 0.00305447 1129 1 0.251394 0.878091 0.00108725 1565 1 0.873252 0.506121 0.497157 1113 1 0.754967 0.754471 0.000374321 1557 1 0.622527 0.50351 0.499143 1606 1 0.186513 0.815657 0.496238 1657 1 0.751953 0.871868 0.498623 1062 1 0.187386 0.685108 0.00110314 1026 1 0.0618754 0.564094 0.00416539 1544 1 0.125941 0.564937 0.567179 1571 1 0.0679762 0.625215 0.563568 1666 1 0.0630295 0.562496 0.627586 1701 1 0.123977 0.623563 0.628704 927 1 0.94368 0.995926 0.942715 1553 1 0.504302 0.501987 0.507497 1569 1 0.00751006 0.622507 0.499487 919 1 0.684735 0.997668 0.938351 1929 1 0.248435 0.501038 0.877187 1669 1 0.127591 0.504207 0.630017 1548 1 0.251626 0.563181 0.568969 1575 1 0.184467 0.630557 0.562482 1579 1 0.307096 0.627857 0.563631 1670 1 0.19077 0.567289 0.627468 1674 1 0.312016 0.560452 0.626116 1705 1 0.249355 0.625364 0.630289 1633 1 0.00489446 0.868903 0.501084 1081 1 0.751737 0.624239 0.996428 519 1 0.187298 0.999342 0.562701 1552 1 0.375889 0.563449 0.555561 1583 1 0.43355 0.625081 0.565988 1678 1 0.438791 0.561168 0.625932 1709 1 0.374183 0.620993 0.624904 1556 1 0.49763 0.563934 0.567449 2020 1 0.000920634 0.935547 0.937472 2017 1 0.994777 0.86902 0.878669 897 1 0.998608 0.999397 0.874992 1693 1 0.870822 0.500967 0.628192 1713 1 0.499489 0.624021 0.624616 1560 1 0.623681 0.563693 0.560217 1587 1 0.564446 0.625178 0.559352 1682 1 0.56532 0.56576 0.628764 1717 1 0.626304 0.625896 0.621428 1675 1 0.31435 0.499467 0.689217 1626 1 0.819595 0.813628 0.501182 1564 1 0.747965 0.563098 0.564348 1591 1 0.690949 0.629617 0.555383 1595 1 0.812471 0.625155 0.564284 1686 1 0.685903 0.569048 0.62324 1690 1 0.806917 0.563616 0.62874 1721 1 0.754222 0.632097 0.620781 2048 1 0.871907 0.934314 0.936215 1033 1 0.248594 0.500782 0.997879 1540 1 0.00695736 0.561296 0.560545 1697 1 0.00123753 0.629844 0.62458 1568 1 0.877279 0.560297 0.560959 1599 1 0.938809 0.618897 0.565416 1694 1 0.935446 0.557154 0.626836 1725 1 0.874536 0.620043 0.629105 2047 1 0.936115 0.870741 0.942856 1687 1 0.687154 0.504448 0.692237 1576 1 0.126362 0.69083 0.561677 1603 1 0.0657856 0.745222 0.563969 1608 1 0.126315 0.80822 0.562933 1698 1 0.0656603 0.687922 0.627668 1730 1 0.0618359 0.80756 0.629415 1733 1 0.125895 0.751146 0.627531 1729 1 -0.000281298 0.744439 0.62656 1572 1 0.00711128 0.685541 0.559217 1604 1 0.00427219 0.810591 0.5694 1625 1 0.760278 0.757266 0.500676 795 1 0.807223 0.998873 0.810322 911 1 0.434345 0.999189 0.936571 1580 1 0.249959 0.684838 0.562021 1607 1 0.192055 0.751132 0.56327 1611 1 0.304349 0.751194 0.560257 1612 1 0.252505 0.816121 0.559138 1702 1 0.191451 0.688282 0.625655 1706 1 0.312655 0.684662 0.629414 1734 1 0.187782 0.81213 0.623962 1737 1 0.252367 0.747881 0.623995 1738 1 0.311387 0.813257 0.626671 903 1 0.186679 0.996626 0.933816 1667 1 0.0633638 0.50266 0.689087 1584 1 0.367817 0.69026 0.557261 1615 1 0.435039 0.749729 0.559813 1616 1 0.369967 0.809163 0.569723 1710 1 0.436703 0.689162 0.626505 1741 1 0.370467 0.744801 0.625999 1742 1 0.438321 0.805425 0.620449 1923 1 0.054166 0.501527 0.932217 1 1 0.00304138 0.997993 0.999349 1588 1 0.496963 0.684585 0.560359 1620 1 0.496645 0.812984 0.558101 1745 1 0.501416 0.752307 0.622078 1592 1 0.624012 0.684371 0.564756 1619 1 0.564776 0.745978 0.558122 1624 1 0.624329 0.81622 0.559675 1714 1 0.559898 0.685148 0.622254 1746 1 0.562951 0.805988 0.624143 1749 1 0.625709 0.749912 0.618058 1597 1 0.872207 0.624123 0.50156 1563 1 0.811126 0.503228 0.567743 1596 1 0.753601 0.691872 0.561903 1623 1 0.690648 0.758693 0.561701 1627 1 0.817217 0.748338 0.562282 1628 1 0.751943 0.816016 0.55925 1718 1 0.690608 0.686801 0.622168 1722 1 0.819037 0.689108 0.627819 1750 1 0.692706 0.808998 0.625093 1753 1 0.754064 0.752989 0.620608 1754 1 0.814772 0.814622 0.620187 1665 1 0.00386809 0.503122 0.634465 531 1 0.569776 0.995122 0.56188 1555 1 0.560518 0.505542 0.568653 1600 1 0.877126 0.68461 0.564441 1631 1 0.93608 0.748676 0.56792 1632 1 0.873313 0.809779 0.565736 1726 1 0.935401 0.683492 0.627089 1757 1 0.873445 0.74859 0.625621 1758 1 0.941697 0.809665 0.619833 1691 1 0.809834 0.501337 0.689489 657 1 0.503068 0.993505 0.62785 925 1 0.871839 0.991551 0.880188 1635 1 0.0672539 0.870809 0.55956 1640 1 0.125715 0.941661 0.561773 1762 1 0.069155 0.937179 0.625051 1765 1 0.123174 0.874405 0.619079 1761 1 0.00377893 0.878704 0.619821 1801 1 0.24746 0.503713 0.758813 1639 1 0.189222 0.877746 0.564904 1643 1 0.308557 0.873749 0.56838 1644 1 0.24724 0.942512 0.55682 1766 1 0.187591 0.935807 0.625925 1769 1 0.248566 0.879623 0.628208 1770 1 0.306088 0.937848 0.629811 777 1 0.250213 0.998759 0.745952 1594 1 0.811398 0.686698 0.502406 1683 1 0.564003 0.500334 0.688946 1542 1 0.190884 0.554388 0.501991 1073 1 0.494831 0.633944 1.00047 2046 1 0.935886 0.943284 0.872867 1797 1 0.118322 0.502334 0.758033 1647 1 0.435207 0.875035 0.573229 1648 1 0.376216 0.938979 0.568369 1773 1 0.377051 0.881814 0.629537 1774 1 0.439091 0.942369 0.630274 535 1 0.68861 0.997463 0.56112 1679 1 0.43974 0.499738 0.687891 2045 1 0.870828 0.868464 0.876493 1777 1 0.501182 0.868373 0.620963 1652 1 0.503447 0.932151 0.564075 1651 1 0.562603 0.874483 0.557799 1656 1 0.633216 0.932693 0.561712 1778 1 0.569116 0.940432 0.625232 1781 1 0.623995 0.872959 0.621809 907 1 0.314132 0.992553 0.932464 2041 1 0.744705 0.871873 0.869548 1655 1 0.688373 0.869036 0.563828 1659 1 0.812076 0.875889 0.56433 1660 1 0.750857 0.933189 0.55947 1782 1 0.684609 0.939099 0.624669 1785 1 0.749255 0.878166 0.6247 1786 1 0.812979 0.936101 0.62242 1921 1 0.991317 0.501074 0.877399 1636 1 0.00214895 0.940154 0.562076 1663 1 0.940688 0.875889 0.561788 1664 1 0.882848 0.933193 0.562317 1789 1 0.880242 0.871062 0.62239 1790 1 0.939276 0.940231 0.628331 1925 1 0.117501 0.501177 0.875924 1058 1 0.072645 0.685279 0.997419 1672 1 0.12091 0.564073 0.690889 1699 1 0.0562414 0.627584 0.686456 1794 1 0.0605514 0.567276 0.753547 1800 1 0.126382 0.572447 0.815345 1827 1 0.0567511 0.630947 0.811226 1829 1 0.127855 0.633215 0.75175 1668 1 0.00184557 0.562214 0.692897 1825 1 0.997784 0.622154 0.752336 665 1 0.752491 0.9911 0.620097 1676 1 0.254843 0.568478 0.692055 1703 1 0.187466 0.627609 0.691271 1707 1 0.315509 0.631547 0.688374 1798 1 0.186928 0.566151 0.754312 1802 1 0.312244 0.563574 0.750146 1804 1 0.254406 0.560154 0.817294 1831 1 0.183572 0.629964 0.813042 1833 1 0.24969 0.627133 0.756311 1835 1 0.312448 0.624966 0.816306 651 1 0.311081 0.995428 0.692579 2038 1 0.684306 0.939286 0.870454 905 1 0.250296 1.00042 0.875212 1680 1 0.372889 0.563477 0.687026 1711 1 0.434662 0.624346 0.690698 1806 1 0.439866 0.565049 0.749713 1808 1 0.379273 0.564638 0.815669 1837 1 0.373207 0.624989 0.749725 1839 1 0.441205 0.61879 0.808519 1812 1 0.499748 0.56385 0.810959 909 1 0.378132 0.994434 0.870786 921 1 0.745209 0.995118 0.873173 1684 1 0.498169 0.565449 0.684525 1841 1 0.502459 0.622092 0.745492 1688 1 0.628713 0.561714 0.689695 1715 1 0.564995 0.627761 0.684333 1810 1 0.567427 0.564045 0.746951 1816 1 0.628846 0.564047 0.812983 1843 1 0.567896 0.62453 0.813859 1845 1 0.624837 0.624243 0.745895 523 1 0.312024 0.998239 0.572805 1815 1 0.68997 0.500452 0.805432 1692 1 0.748792 0.570439 0.687536 1719 1 0.692675 0.630799 0.689022 1723 1 0.813415 0.624716 0.686988 1814 1 0.689716 0.568183 0.751648 1818 1 0.807477 0.562775 0.750409 1820 1 0.746611 0.561631 0.813303 1847 1 0.681445 0.626351 0.811191 1849 1 0.753223 0.630422 0.752222 1851 1 0.81554 0.620401 0.812495 2043 1 0.805357 0.871102 0.938729 1057 1 0.00328303 0.623604 0.997389 1796 1 0.991789 0.558023 0.816808 1696 1 0.878 0.562221 0.688899 1727 1 0.939669 0.626779 0.689447 1822 1 0.93509 0.5645 0.756386 1824 1 0.873947 0.562281 0.813027 1853 1 0.875075 0.628115 0.755054 1855 1 0.939096 0.627956 0.819099 641 1 0.00220731 0.997061 0.623581 1704 1 0.124424 0.689514 0.6887 1731 1 0.0648968 0.749804 0.690677 1736 1 0.124703 0.808476 0.686351 1826 1 0.0551525 0.687406 0.753391 1832 1 0.123388 0.690573 0.813209 1858 1 0.0642875 0.813152 0.748782 1859 1 0.0611835 0.749841 0.811647 1861 1 0.123579 0.748819 0.751725 1864 1 0.121037 0.809401 0.809228 1860 1 0.998638 0.810495 0.814061 1708 1 0.248764 0.691498 0.691033 1735 1 0.187972 0.749826 0.688638 1739 1 0.313079 0.748121 0.687972 1740 1 0.247405 0.810296 0.686994 1830 1 0.191942 0.692647 0.755039 1834 1 0.311842 0.690431 0.753952 1836 1 0.25181 0.690885 0.816061 1862 1 0.1847 0.80988 0.748689 1863 1 0.188057 0.751317 0.812034 1865 1 0.247079 0.755943 0.752297 1866 1 0.313368 0.812244 0.745262 1867 1 0.312159 0.752867 0.811742 1868 1 0.243855 0.816245 0.813034 1712 1 0.373176 0.687908 0.686632 1743 1 0.438674 0.743759 0.687931 1744 1 0.380304 0.808694 0.681022 1838 1 0.431762 0.687291 0.747935 1840 1 0.377223 0.689352 0.815884 1869 1 0.374569 0.747014 0.74812 1870 1 0.441502 0.809017 0.749325 1871 1 0.444378 0.750967 0.811221 1872 1 0.372461 0.815833 0.80906 1748 1 0.497433 0.809484 0.688121 1844 1 0.504025 0.68841 0.814192 1873 1 0.504238 0.747372 0.749457 1876 1 0.505928 0.814046 0.808597 1716 1 0.497584 0.681801 0.686034 1720 1 0.627593 0.687847 0.688022 1747 1 0.560948 0.748617 0.682945 1752 1 0.630035 0.806042 0.679677 1842 1 0.562689 0.683897 0.752935 1848 1 0.624661 0.690549 0.811306 1874 1 0.563813 0.811023 0.749461 1875 1 0.563324 0.747559 0.816268 1877 1 0.621775 0.748406 0.747794 1880 1 0.625017 0.804577 0.810117 1724 1 0.754465 0.690496 0.684278 1751 1 0.692467 0.745454 0.680304 1755 1 0.811027 0.754987 0.682488 1756 1 0.748257 0.81145 0.681629 1846 1 0.689294 0.690958 0.745414 1850 1 0.816024 0.685334 0.744954 1852 1 0.757205 0.683077 0.816658 1878 1 0.690009 0.809127 0.744389 1879 1 0.691786 0.752715 0.807321 1881 1 0.757744 0.74881 0.746597 1882 1 0.81137 0.814362 0.746786 1883 1 0.811722 0.751431 0.810669 1884 1 0.743145 0.812849 0.812865 1700 1 0.00320893 0.688141 0.686811 1732 1 0.000713077 0.808544 0.687911 1828 1 0.998112 0.688447 0.822321 1857 1 0.997531 0.750694 0.749941 1728 1 0.881143 0.690397 0.688143 1759 1 0.942639 0.752377 0.682733 1760 1 0.878871 0.817346 0.691389 1854 1 0.946133 0.687815 0.755632 1856 1 0.865111 0.688454 0.812574 1885 1 0.874364 0.749319 0.747172 1886 1 0.933652 0.812202 0.75203 1887 1 0.93621 0.752802 0.814718 1888 1 0.873104 0.816743 0.80667 899 1 0.0659627 0.995857 0.938807 1763 1 0.0656999 0.869258 0.688486 1768 1 0.125598 0.930475 0.687116 1890 1 0.0657432 0.939831 0.752321 1891 1 0.0607935 0.876454 0.812099 1893 1 0.121081 0.873922 0.753612 1896 1 0.123572 0.935483 0.812768 1764 1 1.0001 0.941431 0.683418 2044 1 0.747634 0.936686 0.939531 2042 1 0.811183 0.936219 0.874667 2039 1 0.68397 0.879233 0.941245 2033 1 0.508151 0.875285 0.872843 1767 1 0.187025 0.87247 0.68892 1771 1 0.309688 0.878297 0.691719 1772 1 0.246248 0.939125 0.689613 1894 1 0.189937 0.93606 0.751903 1895 1 0.188514 0.87668 0.816597 1897 1 0.245559 0.873165 0.751685 1898 1 0.313274 0.936338 0.751656 1899 1 0.31033 0.873023 0.80381 1900 1 0.249268 0.932797 0.809035 799 1 0.933081 0.997313 0.813022 1150 1 0.93346 0.936618 0.998949 1775 1 0.437012 0.867882 0.679344 1776 1 0.381304 0.941043 0.691043 1901 1 0.374596 0.872158 0.746677 1902 1 0.445366 0.931926 0.747619 1903 1 0.442369 0.872162 0.80812 1904 1 0.375145 0.930964 0.812352 1908 1 0.50413 0.935037 0.807768 1905 1 0.503138 0.873817 0.746458 1780 1 0.504293 0.930973 0.681291 1077 1 0.621528 0.626774 0.997364 1939 1 0.557088 0.501226 0.936774 1779 1 0.56236 0.870559 0.684533 1784 1 0.624427 0.934253 0.685621 1906 1 0.560575 0.933939 0.747201 1907 1 0.568003 0.873137 0.80852 1909 1 0.627489 0.874029 0.748632 1912 1 0.621998 0.940322 0.814875 1783 1 0.683865 0.868324 0.686874 1787 1 0.81115 0.878894 0.691068 1788 1 0.749898 0.93959 0.690113 1910 1 0.682405 0.933932 0.748618 1911 1 0.68169 0.8781 0.814391 1913 1 0.748124 0.874596 0.745857 1914 1 0.813197 0.938412 0.752559 1915 1 0.809123 0.874575 0.809634 1916 1 0.748874 0.932095 0.812453 2036 1 0.500068 0.938556 0.937396 1889 1 -0.00104992 0.875522 0.746785 1892 1 0.99803 0.934943 0.812277 1791 1 0.944951 0.869686 0.685425 1792 1 0.874561 0.938268 0.68347 1917 1 0.872701 0.878404 0.747057 1918 1 0.93727 0.932618 0.751145 1919 1 0.939611 0.875401 0.814818 1920 1 0.875997 0.940078 0.810492 1922 1 0.0571916 0.565937 0.873392 1928 1 0.127819 0.555341 0.937554 1955 1 0.063163 0.625484 0.936575 1957 1 0.126545 0.62868 0.878459 1924 1 0.995759 0.560562 0.945318 2034 1 0.562512 0.938094 0.879192 1963 1 0.3175 0.623812 0.944188 1961 1 0.246256 0.630364 0.876879 1932 1 0.253438 0.564309 0.937047 1959 1 0.190434 0.627922 0.937295 1926 1 0.186877 0.560757 0.882325 1930 1 0.312252 0.566809 0.880021 9 1 0.250234 0.998396 0.990117 2037 1 0.62613 0.873345 0.876321 2035 1 0.568126 0.872219 0.934366 1936 1 0.37126 0.557254 0.937827 1967 1 0.437708 0.619483 0.934606 1934 1 0.436877 0.563369 0.878276 1965 1 0.375437 0.625771 0.871523 1969 1 0.498506 0.622366 0.874313 2029 1 0.374541 0.877612 0.873438 2040 1 0.623517 0.941948 0.939303 2030 1 0.443103 0.934407 0.870194 1940 1 0.497982 0.561513 0.943021 1938 1 0.561142 0.56258 0.877028 1944 1 0.616653 0.564444 0.938462 1971 1 0.555724 0.626621 0.940009 1973 1 0.626051 0.627305 0.875883 1977 1 0.750221 0.621497 0.874994 1975 1 0.688665 0.623402 0.933021 1948 1 0.745823 0.5575 0.939592 1979 1 0.812553 0.619977 0.93714 1942 1 0.690228 0.559887 0.875211 1946 1 0.81435 0.553692 0.875856 2032 1 0.372624 0.932169 0.931236 1953 1 0.996005 0.628726 0.878678 1952 1 0.870944 0.555783 0.942776 1981 1 0.870394 0.629388 0.875324 1983 1 0.93294 0.625691 0.937706 1950 1 0.929359 0.56267 0.876122 2031 1 0.434153 0.877632 0.939487 1960 1 0.128685 0.688575 0.939672 1986 1 0.0610936 0.815527 0.879773 1987 1 0.0620112 0.750155 0.94438 1989 1 0.125128 0.752109 0.87185 1992 1 0.12629 0.811979 0.947743 1954 1 0.0614854 0.683327 0.87313 1956 1 0.00539623 0.690339 0.940418 1985 1 0.000330752 0.74689 0.880454 1809 1 0.50185 0.506917 0.747517 1993 1 0.250028 0.749937 0.873822 1996 1 0.25274 0.808233 0.936382 1964 1 0.248295 0.693093 0.93951 1990 1 0.183478 0.809749 0.868804 1991 1 0.186586 0.750987 0.935687 1962 1 0.311366 0.683366 0.873954 1958 1 0.18457 0.690945 0.872454 1995 1 0.313629 0.74624 0.940533 1994 1 0.312568 0.813218 0.871446 1046 1 0.681973 0.556815 0.992867 655 1 0.442929 0.999503 0.689406 1999 1 0.42522 0.753903 0.93116 1997 1 0.367849 0.751323 0.875018 1998 1 0.434561 0.816524 0.86902 2000 1 0.372005 0.821061 0.941689 1966 1 0.437473 0.691648 0.87476 1968 1 0.375175 0.68719 0.929452 1972 1 0.502244 0.690527 0.932871 2001 1 0.500703 0.750169 0.876545 789 1 0.628974 0.998047 0.747907 2004 1 0.494079 0.811761 0.938775 2008 1 0.627344 0.813165 0.940815 2003 1 0.56627 0.749361 0.934978 1970 1 0.563129 0.686603 0.876204 2005 1 0.6274 0.749401 0.872682 2002 1 0.566464 0.810004 0.873162 1976 1 0.624827 0.681558 0.935074 527 1 0.437794 0.998297 0.562723 785 1 0.503153 0.996153 0.747727 663 1 0.690171 0.998941 0.684898 1598 1 0.938667 0.681446 0.502226 1974 1 0.683502 0.691285 0.878294 2007 1 0.689979 0.746823 0.93666 2012 1 0.747968 0.810838 0.936269 2009 1 0.749795 0.74925 0.875412 1978 1 0.810152 0.683112 0.878055 2006 1 0.688043 0.807118 0.874768 2010 1 0.808993 0.811324 0.874686 1980 1 0.749028 0.687036 0.937251 2011 1 0.813836 0.750195 0.937266 1547 1 0.315706 0.501221 0.565806 1988 1 0.00318519 0.814278 0.943895 2014 1 0.937437 0.80537 0.874674 1984 1 0.876639 0.688804 0.937151 2013 1 0.871659 0.75376 0.873009 2016 1 0.873647 0.812954 0.938272 2015 1 0.939479 0.748257 0.941177 1982 1 0.930336 0.685535 0.880813 1561 1 0.749195 0.504617 0.505508 781 1 0.371644 0.996863 0.752647 1074 1 0.562607 0.689916 0.996833 2018 1 0.0618321 0.938003 0.870354 2019 1 0.0647505 0.880841 0.93894 2021 1 0.126825 0.870072 0.875848 2024 1 0.12618 0.936326 0.937364 647 1 0.184966 1.00026 0.687463 1078 1 0.689873 0.689051 0.997099 2022 1 0.192573 0.932896 0.874233 2027 1 0.307375 0.871291 0.938665 2023 1 0.188689 0.879997 0.937409 2026 1 0.306278 0.92965 0.869276 2028 1 0.253855 0.933801 0.939014 2025 1 0.249105 0.868697 0.877807 539 1 0.817126 0.997406 0.566497 1805 1 0.378278 0.502889 0.75383 1661 1 0.874916 0.872601 0.499962 923 1 0.811649 0.998045 0.944168 783 1 0.433494 0.996634 0.812789 1807 1 0.44035 0.504422 0.809134 1803 1 0.318122 0.504191 0.816961 901 1 0.126125 0.999346 0.87548 1813 1 0.62348 0.506125 0.748092 667 1 0.812611 0.995085 0.685657 1567 1 0.936637 0.501491 0.56369 543 1 0.939891 0.998323 0.563052 1795 1 0.0584465 0.502286 0.813517 1130 1 0.313845 0.942189 0.998223 793 1 0.751924 0.99515 0.74766 1933 1 0.378494 0.501763 0.875431 1941 1 0.628421 0.503634 0.876218 1685 1 0.627288 0.506259 0.626552 1817 1 0.750584 0.503306 0.747406 1937 1 0.498539 0.502377 0.872743 659 1 0.570706 1.0003 0.691968 1671 1 0.187 0.50591 0.691916 1146 1 0.80741 0.930018 0.998179 1094 1 0.192647 0.81973 0.99772 1110 1 0.689568 0.809106 0.995413 1070 1 0.432641 0.689699 0.988487 1630 1 0.940186 0.813503 0.502901 1106 1 0.557469 0.809714 0.997529 1645 1 0.375081 0.87781 0.507886 1082 1 0.812047 0.685452 0.994754 1538 1 0.0706402 0.558667 0.500155 1105 1 0.50148 0.750528 0.999245 1799 1 0.181518 0.505776 0.819535 643 1 0.0638438 0.994862 0.694047 1793 1 0.00270376 0.500212 0.749732 529 1 0.505897 0.999174 0.504202 649 1 0.246423 0.999461 0.627869 779 1 0.312711 0.993903 0.811815 1689 1 0.745447 0.508269 0.627588 645 1 0.12507 0.997037 0.628544 791 1 0.689622 0.996677 0.810109 1559 1 0.685311 0.507079 0.564806 1662 1 0.944203 0.934275 0.505301 29 1 0.874242 0.999543 0.994955 1061 1 0.126603 0.62345 0.995543 1126 1 0.189813 0.937245 0.993357 1098 1 0.31373 0.821234 0.999734 1658 1 0.814878 0.934956 0.505429 1030 1 0.190114 0.564437 0.999219 1621 1 0.620626 0.758053 0.50268 1109 1 0.625723 0.748639 0.99406 541 1 0.878898 0.998307 0.501989 1554 1 0.56767 0.56068 0.503356 1593 1 0.754074 0.625387 0.503003 5 1 0.130676 0.997399 0.996545 1601 1 0.000712033 0.748838 0.504598 1629 1 0.875093 0.748955 0.504898 1573 1 0.132712 0.6258 0.500866 1085 1 0.872182 0.620814 0.996477 1610 1 0.315524 0.816151 0.500639 1589 1 0.626529 0.6312 0.500184 1642 1 0.315689 0.937191 0.510506 1637 1 0.124088 0.876375 0.500381 1650 1 0.566509 0.933752 0.503099 17 1 0.494699 0.997631 0.998359 1558 1 0.6894 0.565101 0.502914 1646 1 0.437472 0.938499 0.503502 1122 1 0.0672422 0.938321 0.99865 1149 1 0.877726 0.869928 0.999227 1086 1 0.942022 0.688998 0.995591
84d8fb4c900688d98e3349cf4f0ad73513d2492e
f2ad830cea2c8a071601a94ffe1f6e1095436a05
/download.py
7d180127987be5df2f71fba8767d9af85790626a
[]
no_license
naveenprolific/python
859b6cd7683a94597e5f6cbb07e9a12c1b594c11
c440f6b46b50d5f9e82966eed612d3ad7d4699f2
refs/heads/master
2021-01-25T11:40:30.928778
2019-08-17T06:11:19
2019-08-17T06:11:19
123,420,455
1
0
null
null
null
null
UTF-8
Python
false
false
200
py
for i in range(int(input())): n,k=map(int,input().split()) c=0 for i in range(n): t,d=map(int,input().split()) if k>0: if t>=k: t-=k k=0 else: k-=t t=0 c+=t*d print(c)
6922739fc57fda950b96b25e4975f0336ff70aad
fb33b689b8ebd54695828dab3f9d1db074203d34
/practice/mysite/blog/migrations/0001_initial.py
44a42493d1c554b4c29522a9c80df7b912f8a092
[]
no_license
takumikaka/workspace
471ab6e60d47f61ae36e4b95e8d58b0840188f65
f72946ff5f46b549dfab51a0038f05478b301490
refs/heads/master
2021-05-06T11:58:24.334256
2019-03-22T08:32:18
2019-03-22T08:32:18
113,008,406
1
0
null
2018-02-23T12:28:54
2017-12-04T07:14:00
Python
UTF-8
Python
false
false
986
py
# Generated by Django 2.1 on 2018-01-09 02:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='BlogArticles', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=300)), ('body', models.TextField()), ('publish', models.DateTimeField(default=django.utils.timezone.now)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], options={ 'ordering': ('-publish',), }, ), ]
1d6fbb6576b0a599b201498124a372af35875ab6
f8e4ff05c94a8f1967fd0604ffcb1ae4e96b8feb
/mytest/login_taobao.py
ceb9de4a5bacc33ae5ad2c5038061fae0327366b
[]
no_license
Cherry93/Myspider
d2d644612f4167ec13fea33e52ea810de3a3a639
ce5f821f2a2c26bba2c4b22c908cc65d07969b07
refs/heads/master
2021-04-09T10:40:34.320831
2018-03-16T09:57:13
2018-03-16T09:57:13
125,494,372
1
0
null
null
null
null
UTF-8
Python
false
false
4,148
py
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException import time class loginTB(object): def __init__(self): self.driver = webdriver.Chrome() self.driver.maximize_window() # 设置一个智能等待 self.wait = WebDriverWait(self.driver,5) def login(self,key,pw): url = 'https://login.taobao.com/member/login.jhtml' self.driver.get(url) try: # 寻找密码登陆按钮 login_links = self.wait.until( EC.presence_of_element_located((By.XPATH,"//a[text()='密码登录']")) ) login_links.click() except TimeoutException as e: print("找不到登陆入口,原因是:",e) else: # 输入账号密码 input_key = self.wait.until( EC.presence_of_element_located((By.XPATH,"//input[@name='TPL_username']")) ) input_pw = self.wait.until( EC.presence_of_element_located((By.XPATH,"//input[@name='TPL_password']")) ) input_key.clear() input_pw.clear() input_key.send_keys(key) input_pw.send_keys(pw) self.driver.find_element_by_xpath('//*[@id="J_SubmitStatic"]').click() try: # 试探能否找到个人信息,如果找不到说明登录失败 user_info = self.wait.until( EC.presence_of_element_located((By.XPATH,"//div[@class='m-userinfo']")) ) print('已经登陆成功,进入了个人中心') except TimeoutException: try: self.driver.find_element_by_xpath("//div[@class='avatar-wrapper']") print('已经登录成功,进入了淘宝网首页') except: try: # 尝试找手机验证框,如果能找到说明要手机验证 frame = self.wait.until( EC.presence_of_element_located((By.XPATH,'//div[@class="login-check-left"]/iframe')) ) print('本次登录需要进行手机验证...') except TimeoutException: # 找不到手机验证说明密码账号输入错误,要重新输入 print('登录失败,目测是账号或密码有误,请检查后重新登录...') key = input('请重新输入账号:').strip() pw = input('请重新输入密码:').strip() self.login(key,pw) else: self.driver.switch_to.frame(frame) phone_num = self.wait.until( EC.presence_of_element_located((By.XPATH,'//button[@id="J_GetCode"]')) ) phone_num.click() phone_key = input('请输入手机验证码:').strip() key_send = self.wait.until( EC.presence_of_element_located((By.XPATH,'//input[@id="J_Phone_Checkcode"]')) ) key_send.send_keys(phone_key) go_button = self.wait.until( EC.presence_of_element_located((By.XPATH,'//input[@type="submit"]')) ) go_button.click() user_info = self.wait.until( EC.presence_of_element_located((By.XPATH, "//div[@class='m-userinfo']")) ) print('手机验证登陆成功!!!') if __name__ == '__main__': t = time.time() l = loginTB() l.login('18774389936','chensi710029') print('登录完成,耗时{:.2f}秒'.format(float(time.time()-t)))
6da539218ab518c0e6a9869cf1b56d4ad4487075
df1e54249446ba2327442e2dbb77df9931f4d039
/deprecated/parameters.py
07a7e876741747ba5a8d8f974567a383fe9fa1ac
[ "Apache-2.0" ]
permissive
tarsqi/ttk
8c90ee840606fb4c59b9652bd87a0995286f1c3d
085007047ab591426d5c08b123906c070deb6627
refs/heads/master
2021-07-12T06:56:19.924195
2021-03-02T22:05:39
2021-03-02T22:05:39
35,170,093
26
12
Apache-2.0
2021-03-02T22:05:39
2015-05-06T16:24:38
Python
UTF-8
Python
false
false
1,425
py
class ParameterMixin: """Mixin class that provides access to elements in the parameter dictionary that lives on Tarsqi and TarsqiDocument instances. This is where parameter defaults are specified.""" def getopt(self, option_name): """Return the option, use None as default.""" return self.parameters.get(option_name, None) def getopt_genre(self): """Return the 'genre' user option. The default is None.""" return self.parameters.get('genre', None) def getopt_source(self): """Return the 'source' user option. The default is None.""" return self.parameters.get('source', None) def getopt_platform(self): """Return the 'platform' user option. The default is None.""" return self.parameters.get('platform', None) def getopt_trap_errors(self): """Return the 'trap_errors' user option. The default is False.""" return self.parameters.get('trap-errors', True) def getopt_pipeline(self): """Return the 'pipeline' user option. The default is None.""" return self.parameters.get('pipeline', None) def getopt_extension(self): """Return the 'extension' user option. The default is ''.""" return self.parameters.get('extension', '') def getopt_perl(self): """Return the 'perl' user option. The default is 'perl'.""" return self.parameters.get('perl', 'perl')
3ac9bba729173c49f50ee9cee4b784b0ed5f4e2f
21cd0b41e987a131c4ef99969f40becabe815d9c
/data_uri.py
e9ace7c48d80f75569ddc4879c509aab3bbd3529
[]
no_license
fake-name/wlnupdates
7412d0852b096a4c0bbbbc0b66fbb3a94103346e
95ed8d20e55f54ebfed10ec07d213eb71fb48e8a
refs/heads/master
2023-09-03T08:05:55.768504
2021-09-27T05:52:11
2021-09-27T05:52:11
33,464,882
33
6
null
2023-09-11T15:49:51
2015-04-06T03:26:11
Python
UTF-8
Python
false
false
1,507
py
import mimetypes import re import urllib import base64 MIMETYPE_REGEX = r'[\w]+\/[\w\-\+\.]+' _MIMETYPE_RE = re.compile('^{}$'.format(MIMETYPE_REGEX)) CHARSET_REGEX = r'[\w\-\+\.]+' _CHARSET_RE = re.compile('^{}$'.format(CHARSET_REGEX)) DATA_URI_REGEX = ( r'data:' + r'(?P<mimetype>{})?'.format(MIMETYPE_REGEX) + r'(?:\;charset\=(?P<charset>{}))?'.format(CHARSET_REGEX) + r'(?P<base64>\;base64)?' + r',(?P<data>.*)') _DATA_URI_RE = re.compile(r'^{}$'.format(DATA_URI_REGEX), re.DOTALL) class DataURI(str): def __new__(cls, *args, **kwargs): uri = super(DataURI, cls).__new__(cls, *args, **kwargs) uri._parse # Trigger any ValueErrors on instantiation. return uri def __repr__(self): return 'DataURI(%s)' % (super(DataURI, self).__repr__(),) def wrap(self, width=76): return type(self)('\n'.join(textwrap.wrap(self, width))) @property def mimetype(self): return self._parse[0] @property def charset(self): return self._parse[1] @property def is_base64(self): return self._parse[2] @property def data(self): return self._parse[3] @property def _parse(self): match = _DATA_URI_RE.match(self) if not match: raise ValueError("Not a valid data URI: %r" % self) mimetype = match.group('mimetype') or None charset = match.group('charset') or None if match.group('base64'): data = base64.b64decode(match.group('data').encode('utf-8')) else: data = urllib.unquote(match.group('data')) return mimetype, charset, bool(match.group('base64')), data
78adfeac2113a9117424cee5f1b68120915a0d96
3b84c4b7b16ccfd0154f8dcb75ddbbb6636373be
/google-cloud-sdk/lib/googlecloudsdk/command_lib/container/azure/util.py
46a4126401b0bc61d927cafeba3008673d0a2ca7
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
twistedpair/google-cloud-sdk
37f04872cf1ab9c9ce5ec692d2201a93679827e3
1f9b424c40a87b46656fc9f5e2e9c81895c7e614
refs/heads/master
2023-08-18T18:42:59.622485
2023-08-15T00:00:00
2023-08-15T12:14:05
116,506,777
58
24
null
2022-02-14T22:01:53
2018-01-06T18:40:35
Python
UTF-8
Python
false
false
1,323
py
# -*- coding: utf-8 -*- # # Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Command utilities for `gcloud container azure` commands.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals CLUSTERS_FORMAT = """ table( name.segment(-1):label=NAME, azureRegion, controlPlane.version:label=CONTROL_PLANE_VERSION, endpoint:label=CONTROL_PLANE_IP, controlPlane.vmSize, state) """ CLIENT_FORMAT = """ table( name.segment(-1), tenantId, applicationId) """ NODE_POOL_FORMAT = """ table(name.segment(-1), version:label=NODE_VERSION, config.vmSize, autoscaling.minNodeCount.yesno(no='0'):label=MIN_NODES, autoscaling.maxNodeCount:label=MAX_NODES, state) """
3619cfbcab6dd50f85a2d36dcdb5282dc552ba16
6ed034d0a5e239d7b0c528b287451409ffb4a494
/mmpose/models/heads/topdown_heatmap_base_head.py
09646ead353fb054f066b9fc6816748a43287e2c
[ "Apache-2.0" ]
permissive
ViTAE-Transformer/ViTPose
8f9462bd5bc2fb3e66de31ca1d03e5a9135cb2bf
d5216452796c90c6bc29f5c5ec0bdba94366768a
refs/heads/main
2023-05-23T16:32:22.359076
2023-03-01T06:42:22
2023-03-01T06:42:22
485,999,907
869
132
Apache-2.0
2023-03-01T06:42:24
2022-04-27T01:09:19
Python
UTF-8
Python
false
false
3,956
py
# Copyright (c) OpenMMLab. All rights reserved. from abc import ABCMeta, abstractmethod import numpy as np import torch.nn as nn from mmpose.core.evaluation.top_down_eval import keypoints_from_heatmaps class TopdownHeatmapBaseHead(nn.Module): """Base class for top-down heatmap heads. All top-down heatmap heads should subclass it. All subclass should overwrite: Methods:`get_loss`, supporting to calculate loss. Methods:`get_accuracy`, supporting to calculate accuracy. Methods:`forward`, supporting to forward model. Methods:`inference_model`, supporting to inference model. """ __metaclass__ = ABCMeta @abstractmethod def get_loss(self, **kwargs): """Gets the loss.""" @abstractmethod def get_accuracy(self, **kwargs): """Gets the accuracy.""" @abstractmethod def forward(self, **kwargs): """Forward function.""" @abstractmethod def inference_model(self, **kwargs): """Inference function.""" def decode(self, img_metas, output, **kwargs): """Decode keypoints from heatmaps. Args: img_metas (list(dict)): Information about data augmentation By default this includes: - "image_file: path to the image file - "center": center of the bbox - "scale": scale of the bbox - "rotation": rotation of the bbox - "bbox_score": score of bbox output (np.ndarray[N, K, H, W]): model predicted heatmaps. """ batch_size = len(img_metas) if 'bbox_id' in img_metas[0]: bbox_ids = [] else: bbox_ids = None c = np.zeros((batch_size, 2), dtype=np.float32) s = np.zeros((batch_size, 2), dtype=np.float32) image_paths = [] score = np.ones(batch_size) for i in range(batch_size): c[i, :] = img_metas[i]['center'] s[i, :] = img_metas[i]['scale'] image_paths.append(img_metas[i]['image_file']) if 'bbox_score' in img_metas[i]: score[i] = np.array(img_metas[i]['bbox_score']).reshape(-1) if bbox_ids is not None: bbox_ids.append(img_metas[i]['bbox_id']) preds, maxvals = keypoints_from_heatmaps( output, c, s, unbiased=self.test_cfg.get('unbiased_decoding', False), post_process=self.test_cfg.get('post_process', 'default'), kernel=self.test_cfg.get('modulate_kernel', 11), valid_radius_factor=self.test_cfg.get('valid_radius_factor', 0.0546875), use_udp=self.test_cfg.get('use_udp', False), target_type=self.test_cfg.get('target_type', 'GaussianHeatmap')) all_preds = np.zeros((batch_size, preds.shape[1], 3), dtype=np.float32) all_boxes = np.zeros((batch_size, 6), dtype=np.float32) all_preds[:, :, 0:2] = preds[:, :, 0:2] all_preds[:, :, 2:3] = maxvals all_boxes[:, 0:2] = c[:, 0:2] all_boxes[:, 2:4] = s[:, 0:2] all_boxes[:, 4] = np.prod(s * 200.0, axis=1) all_boxes[:, 5] = score result = {} result['preds'] = all_preds result['boxes'] = all_boxes result['image_paths'] = image_paths result['bbox_ids'] = bbox_ids return result @staticmethod def _get_deconv_cfg(deconv_kernel): """Get configurations for deconv layers.""" if deconv_kernel == 4: padding = 1 output_padding = 0 elif deconv_kernel == 3: padding = 1 output_padding = 1 elif deconv_kernel == 2: padding = 0 output_padding = 0 else: raise ValueError(f'Not supported num_kernels ({deconv_kernel}).') return deconv_kernel, padding, output_padding
542d08d969b7c6e3e26c5c442a28e8523898506c
9f02973cd0b8e7886085b7cff75b0f515ddf1a37
/关联分析_Apriori/src/process.py
1e7622e4f4b0eaeec5e077413859393a7aa7a059
[]
no_license
damo894127201/MachineLearning
9c578628936ded8e4c26c232d6adabc58e09bf54
ca0d43c9ba8ff7d1353606ba893291e3bf10f9e7
refs/heads/master
2020-07-23T12:23:48.141435
2019-11-20T02:06:48
2019-11-20T02:06:48
207,554,934
4
1
null
null
null
null
UTF-8
Python
false
false
1,343
py
# -*- coding: utf-8 -*- # @Time : 2019/11/12 22:32 # @Author : Weiyang # @File : process.py # ===================================================================================================================== # ../data/data.xlsx中,有两列:销售单明细 和 商品编码(脱过敏),其中每一行表示一条交易和一件商品 # 本模块的目的在于 # 将../data/data.xlsx数据转为 每一行表示一条交易事务,和该交易对应的所有商品序列,商品间以 , 隔开 # ===================================================================================================================== import pandas as pd from collections import defaultdict data = pd.read_excel('../data/data.xlsx',index=False) transaction = defaultdict(set) for id in data.index: transaction[data.loc[id]['销售单明细']].add(data.loc[id]['商品编码']) new_data = pd.DataFrame(index=range(len(transaction.keys())),columns=['销售单编号','商品编码序列']) for id,key in enumerate(transaction.keys()): new_data.loc[id]['销售单编号'] = key new_data.loc[id]['商品编码序列'] = ','.join(list(transaction[key])) # 写入到Excel表中,index表示是否需要行号,header表示是否需要列名等头部 new_data.to_excel('../data/transaction.xlsx',encoding='utf-8',index=False,header=True)
f20f95b0b8873baf25aa7ceb117f4cd35d7b298b
de24f83a5e3768a2638ebcf13cbe717e75740168
/moodledata/vpl_data/59/usersdata/201/46661/submittedfiles/testes.py
364440b121d5790c16e75993fbbfc29d6dc88637
[]
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
120
py
# -*- coding: utf-8 -*- #COMECE AQUI ABAIXO n=float(input('Digite um número:')) print('O número informado foi' '%f'%n)
99370e36489ef7f4845f09cd33b9ced5b2efaf53
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03449/s550276409.py
ab00968db82a9a7cac9c406ab8f2fc209d3c8fc8
[]
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
626
py
import sys from itertools import accumulate read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines sys.setrecursionlimit(10 ** 9) INF = 1 << 60 MOD = 1000000007 def main(): N = int(readline()) A = list(map(int, readline().split())) B = list(map(int, readline().split())) A = list(accumulate(A)) B = list(accumulate(B)) ans = 0 for i in range(N): if i > 0: res = A[i] + B[-1] - B[i - 1] else: res = A[i] + B[-1] if ans < res: ans = res print(ans) return if __name__ == '__main__': main()
21c4742ef0f3dc31ea373d154b5804b973be6cb7
c8b541ea4fa7d159b80bef116e5cd232ac61b8c1
/venv/Lib/test/test_tools/test_i18n.py
f9f787a64659c6a71eec015b4bfb7d735e5841c4
[]
no_license
shengmenghui/knowledge_building
7a2d8eef040c2d3a45726b3a908be301e922024b
04fd7784f15535efed917cce44856526f1f0ce48
refs/heads/master
2022-12-31T14:18:05.282092
2020-10-23T02:51:37
2020-10-23T02:51:37
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,602
py
"""Tests to cover the Tools/i18n package""" import os import unittest from sql_mode.support.script_helper import assert_python_ok from sql_mode.test_tools import skip_if_missing, toolsdir from sql_mode.support import temp_cwd skip_if_missing() class Test_pygettext(unittest.TestCase): """Tests for the pygettext.py tool""" script = os.path.join(toolsdir,'i18n', 'pygettext.py') def get_header(self, data): """ utility: return the header of a .po file as a dictionary """ headers = {} for line in data.split('\n'): if not line or line.startswith(('#', 'msgid','msgstr')): continue line = line.strip('"') key, val = line.split(':',1) headers[key] = val.strip() return headers def test_header(self): """Make sure the required fields are in the header, according to: http://www.gnu.org/software/gettext/manual/gettext.html#Header-Entry """ with temp_cwd(None) as cwd: assert_python_ok(self.script) with open('messages.pot') as fp: data = fp.read() header = self.get_header(data) self.assertIn("Project-Id-Version", header) self.assertIn("POT-Creation-Date", header) self.assertIn("PO-Revision-Date", header) self.assertIn("Last-Translator", header) self.assertIn("Language-Team", header) self.assertIn("MIME-Version", header) self.assertIn("Content-Type", header) self.assertIn("Content-Transfer-Encoding", header) self.assertIn("Generated-By", header) # not clear if these should be required in POT (template) files #self.assertIn("Report-Msgid-Bugs-To", header) #self.assertIn("Language", header) #"Plural-Forms" is optional def test_POT_Creation_Date(self): """ Match the date format from xgettext for POT-Creation-Date """ from datetime import datetime with temp_cwd(None) as cwd: assert_python_ok(self.script) with open('messages.pot') as fp: data = fp.read() header = self.get_header(data) creationDate = header['POT-Creation-Date'] # peel off the escaped newline at the end of string if creationDate.endswith('\\n'): creationDate = creationDate[:-len('\\n')] # This will raise if the date format does not exactly match. datetime.strptime(creationDate, '%Y-%m-%d %H:%M%z')
d57220311362828af11ced650e52d1fb7722ea04
02467e9975b50c14b4dc8cdc6dc03748f9aa8245
/openshift/client/models/v1_net_namespace_list.py
8dc1ed7e8d8ba2ab479a6db2b51f87ed6836034f
[ "Apache-2.0" ]
permissive
ashcrow/python-openshift
3995e3c4b72bf52a62bc6b07dabf3d0f709444ae
74c9ade612def941938016385842631342e926de
refs/heads/master
2021-01-11T19:29:04.419005
2017-01-18T19:31:58
2017-01-18T19:31:58
79,377,387
0
0
null
2017-01-18T19:46:04
2017-01-18T19:46:04
null
UTF-8
Python
false
false
7,069
py
# coding: utf-8 """ OpenShift API (with Kubernetes) OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is provided for service accounts as a generated secret (in JWT form) or via the native OAuth endpoint located at /oauth/authorize. Core infrastructure components may use client certificates that require no authentication. All API operations return a 'resourceVersion' string that represents the version of the object in the underlying storage. The standard LIST operation performs a snapshot read of the underlying objects, returning a resourceVersion representing a consistent version of the listed objects. The WATCH operation allows all updates to a set of objects after the provided resourceVersion to be observed by a client. By listing and beginning a watch from the returned resourceVersion, clients may observe a consistent view of the state of one or more objects. Note that WATCH always returns the update after the provided resourceVersion. Watch may be extended a limited time in the past - using etcd 2 the watch window is 1000 events (which on a large cluster may only be a few tens of seconds) so clients must explicitly handle the \"watch to old error\" by re-listing. Objects are divided into two rough categories - those that have a lifecycle and must reflect the state of the cluster, and those that have no state. Objects with lifecycle typically have three main sections: * 'metadata' common to all objects * a 'spec' that represents the desired state * a 'status' that represents how much of the desired state is reflected on the cluster at the current time Objects that have no state have 'metadata' but may lack a 'spec' or 'status' section. Objects are divided into those that are namespace scoped (only exist inside of a namespace) and those that are cluster scoped (exist outside of a namespace). A namespace scoped resource will be deleted when the namespace is deleted and cannot be created if the namespace has not yet been created or is in the process of deletion. Cluster scoped resources are typically only accessible to admins - resources like nodes, persistent volumes, and cluster policy. All objects have a schema that is a combination of the 'kind' and 'apiVersion' fields. This schema is additive only for any given version - no backwards incompatible changes are allowed without incrementing the apiVersion. The server will return and accept a number of standard responses that share a common schema - for instance, the common error type is 'unversioned.Status' (described below) and will be returned on any error from the API server. The API is available in multiple serialization formats - the default is JSON (Accept: application/json and Content-Type: application/json) but clients may also use YAML (application/yaml) or the native Protobuf schema (application/vnd.kubernetes.protobuf). Note that the format of the WATCH API call is slightly different - for JSON it returns newline delimited objects while for Protobuf it returns length-delimited frames (4 bytes in network-order) that contain a 'versioned.Watch' Protobuf object. See the OpenShift documentation at https://docs.openshift.org for more information. OpenAPI spec version: v1.5.0-alpha1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1NetNamespaceList(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self, items=None, metadata=None): """ V1NetNamespaceList - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. :param dict attributeMap: The key is attribute name and the value is json key in definition. """ self.swagger_types = { 'items': 'list[V1NetNamespace]', 'metadata': 'UnversionedListMeta' } self.attribute_map = { 'items': 'items', 'metadata': 'metadata' } self._items = items self._metadata = metadata @property def items(self): """ Gets the items of this V1NetNamespaceList. Items is the list of net namespaces :return: The items of this V1NetNamespaceList. :rtype: list[V1NetNamespace] """ return self._items @items.setter def items(self, items): """ Sets the items of this V1NetNamespaceList. Items is the list of net namespaces :param items: The items of this V1NetNamespaceList. :type: list[V1NetNamespace] """ if items is None: raise ValueError("Invalid value for `items`, must not be `None`") self._items = items @property def metadata(self): """ Gets the metadata of this V1NetNamespaceList. Standard object's metadata. :return: The metadata of this V1NetNamespaceList. :rtype: UnversionedListMeta """ return self._metadata @metadata.setter def metadata(self, metadata): """ Sets the metadata of this V1NetNamespaceList. Standard object's metadata. :param metadata: The metadata of this V1NetNamespaceList. :type: UnversionedListMeta """ self._metadata = metadata def to_dict(self): """ Returns the model properties as a dict """ result = {} for attr, _ in 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 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 """ return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other
3d30d4cef2e2fc9de7bfc7194868bd42b35729a7
e3eead40e93fdf5186269536edefab4f08e9a5a2
/LeetCode/146-lru_cache.py
33438a65948643aeec344a5d8e2eef71f95d33bb
[]
no_license
davll/practical-algorithms
bbc930b42363cae00ce39e8a686854c19131d334
0e35e4cc87bd41144b8e34302aafe776fec1b356
refs/heads/master
2021-08-22T13:12:34.555074
2020-03-28T08:56:13
2020-03-28T08:56:13
147,224,029
0
0
null
null
null
null
UTF-8
Python
false
false
2,113
py
# https://leetcode.com/problems/lru-cache/ class LRUCache(object): def __init__(self, capacity): """ :type capacity: int """ self._capacity = capacity self._storage = {} self._head = None self._tail = None def get(self, key): """ :type key: int :rtype: int """ if key not in self._storage: return -1 node = self._storage[key] self._shift(node) return node.value def put(self, key, value): """ :type key: int :type value: int :rtype: void """ node = self._storage.get(key) if node: node.value = value self._shift(node) else: node = Node(key, value) self._storage[key] = node self._append(node) if len(self._storage) > self._capacity: node = self._popleft() del self._storage[node.key] def _shift(self, node): if node.prev: node.prev.next = node.next else: self._head = self._head.next if node.next: node.next.prev = node.prev else: self._tail = self._tail.prev node.next = node.prev = None self._append(node) def _append(self, node): assert not node.prev assert not node.next if self._tail: self._tail.next = node node.prev = self._tail self._tail = node else: self._head = node self._tail = node def _popleft(self): head = self._head self._head = self._head.next self._head.prev = None head.next = None if not self._head: self._tail = None return head class Node: def __init__(self, key, value): self.key = key self.value = value self.prev = None self.next = None # Your LRUCache object will be instantiated and called as such: # obj = LRUCache(capacity) # param_1 = obj.get(key) # obj.put(key,value)