blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
616
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
69
| license_type
stringclasses 2
values | repo_name
stringlengths 5
118
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
63
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 2.91k
686M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 23
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 220
values | src_encoding
stringclasses 30
values | language
stringclasses 1
value | is_vendor
bool 2
classes | is_generated
bool 2
classes | length_bytes
int64 2
10.3M
| extension
stringclasses 257
values | content
stringlengths 2
10.3M
| authors
listlengths 1
1
| author_id
stringlengths 0
212
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c64909b719e0c584c9a4cdc20015e2e2f8fcf9f0
|
0f66f175320140daf15c8c4f85e6af717ebaeec7
|
/test_supporting_commands.py
|
ca4d2c14c7d759a46a541d09f8c01312c3cb330c
|
[] |
no_license
|
PVSemk/IADPythonLab_1
|
50541536fd21812d5e28e427baa8c20bf3417d4d
|
520edcefd07499b51afaa0960ce723b00a32e735
|
refs/heads/master
| 2020-07-20T06:16:10.717534
| 2019-09-05T14:51:22
| 2019-09-05T14:51:22
| 206,588,312
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 4,001
|
py
|
import supporting_commands as func
# This file contains only testing for functions which are in supporting_commands.py
# In the file commands.py there is a number of functions which contain required input checking
# Which is not in supporting_commands.py (functions delete_person_by_number or search)
# However, principle is the same
# So I decided not to rewrite these segments
def test_check_value():
# If no birthday was entered, the list contains only number
# Due to transformations made in the main module
# That is why test ['Correct number', ''] is False
assert func.check_value(['']) == 0
assert func.check_value(['sadass']) == 0
assert func.check_value(['', 'asdsaad']) == 0
assert func.check_value(['+78005553535']) == 1
assert func.check_value(['+78005553535', '']) == 0
assert func.check_value(['+78005553535', ' ']) == 0
assert func.check_value(['88005553535']) == 1
assert func.check_value(['98006665656']) == 0
assert func.check_value(['890055565656']) == 0
assert func.check_value(['88005553535', 'asd']) == 0
assert func.check_value(['', '12/12/1989']) == 0
assert func.check_value(['8+7910345435', '12/12/1989']) == 0
assert func.check_value(['89103943410', '30/12/2045']) == 0
assert func.check_value(['+78005553535', '30/11/2018']) == 1
def test_check_bd_date():
assert func.check_bd_date('22/11/1986') == 1
assert func.check_bd_date('100/11/1986') == 0
assert func.check_bd_date('0/11/1986') == 0
assert func.check_bd_date('22/0/1986') == 0
assert func.check_bd_date('28/1/-100') == 0
assert func.check_bd_date('31/12/1486') == 1
assert func.check_bd_date('sdfdsfsdfsd') == 0
assert func.check_bd_date('sdf/dsfs/dfsd') == 0
assert func.check_bd_date('') == 0
assert func.check_bd_date('1233452345') == 0
assert func.check_bd_date('12/123') == 0
assert func.check_bd_date('ываыва') == 0
assert func.check_bd_date('0/0/0') == 0
assert func.check_bd_date('31/12/2018') == 0
assert func.check_bd_date('29/11/2045') == 0
def test_check_name_surname():
assert func.check_name_surname('Pavel Semkin') == 1
assert func.check_name_surname('pavel semkin') == 1
assert func.check_name_surname('Petr') == 0
assert func.check_name_surname('Sasd.sdfsdf sdf.sdf.sdfsdf') == 0
assert func.check_name_surname('123324646463452 12341321234') == 0
assert func.check_name_surname('_____ asdfasdfsdf _____') == 0
assert func.check_name_surname('____ _____') == 0
assert func.check_name_surname('Sasha1 Petrov') == 1
assert func.check_name_surname('1asha1 2etrov') == 0
assert func.check_name_surname('1asha1 petrov') == 0
assert func.check_name_surname('\n') == 0
def test_check_number():
assert func.check_number('89101418456') == 1
assert func.check_number('8910141845') == 0
assert func.check_number(func.number_format('+79101418456')) == 1
assert func.check_number(func.number_format('+79101418456123123')) == 0
assert func.check_number('Wrong input') == 0
assert func.check_number('89101sdffsdf') == 0
assert func.check_number('8+7+7+7+7+7+7+7+7+7+7') == 0
assert func.check_number('8910 123123 123123') == 0
assert func.check_number('99101412356') == 0
assert func.check_number('8910141845+7') == 0
assert func.check_number('891014184+7') == 0
assert func.check_number('\n') == 0
def test_check_choice():
assert func.check_choice(1, 6, '123') == -1
assert func.check_choice(1, 6, '1') == 1
assert func.check_choice(1, 6, '3') == 1
assert func.check_choice(1, 6, '6') == 0
assert func.check_choice(1, 6, 'asdasd') == -1
assert func.check_choice(1, 6, '') == -1
assert func.check_choice(1, 6, '12.5') == -1
assert func.check_choice(1, 6, '12/5') == -1
assert func.check_choice(1, 6, ' ') == -1
assert func.check_choice(1, 6, '\n') == -1
|
[
"pvsemk@mail.ru"
] |
pvsemk@mail.ru
|
4c21860e5affb23d0bbac4e1610f8389b5a570a8
|
750edcf8562215b588c0960c6a0d65857026ad14
|
/synonyms_fuse_model/tfidf_vec_generate.py
|
e6867548e9c29cc7cec3b4a82623fb98d16e38e5
|
[] |
no_license
|
laura-zhang-cn/natural_language_preprocessing
|
7b1b99129a83bf870a01d9ba8d5009ca46caa23c
|
45b400ba705de5499a5b9a0ac333224e03f94043
|
refs/heads/master
| 2021-06-04T12:31:13.321272
| 2021-05-20T01:10:28
| 2021-05-20T01:10:28
| 122,903,175
| 2
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 8,274
|
py
|
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 12 15:21:04 2018
@author: zhangyaxu
商品描述/标题等数据源 -> 品类上的 合并
训练词的tfidf向量并计算离散向量相似度,返回topn个,并存储到hive中
"""
from pyspark import SparkConf
from pyspark import SparkContext
from pyspark.sql import HiveContext
import gc
import pandas as pds
import numpy as npy
from pyspark.sql import functions as F
from pyspark.sql import Window
from gensim.models import TfidfModel
from gensim.corpora import Dictionary
from corpus_richness_alg import term_doc_tf_r
from params import params
database_name=params['shared']['database_name']
def term_tfidf_weight(model,corpus,na_val=0.0,keep_type='appeared',out_type='split',term_keep_index=None,norm_type=None):
'''
model is a TfidfModel
corpus is a dictionary.doc2bow corpus which like [[(term_id,tf),..],..] [docs=>(terms=>tf)]
out_type : [split,aggr] return a datframe with vector as columns that split by doc_id or aggregate in one columns
norm_type :[None,'maxscale']
term_keep_index: list of term-id which should keep ,if None,keep all
return_val:['tfidf' ,'tf'], default 'tfidf'
'''
idf=pds.DataFrame(list(sorted(model.idfs.items())),columns=['term_id','idf'])
def per_doc_wd_tfidf_weight(x,keep_type='appeared'):
'''
x is a document's words-corpus which is list type like [(term_id,tf),...]
idf is term inverse-document-freq which is dataframe type like [(term_id,idf)]
keep_type: ['appeared','all'] . appeared :让文档仅保留出现在文档中的词,all:保留所有词,即使没在文档中出现,对应的值是0.0
return [(term_id,tf),..]
'''
tf_r=npy.array(list(dict(x).values()))*1.0/sum(dict(x).values()) #
tf=pds.DataFrame(list(zip(dict(x).keys(),tf_r.tolist())),columns=['term_id','tf'])
if keep_type=='all':
how_type='left'
else:
how_type='inner'
tf_idf=pds.merge(idf,tf,on='term_id',how=how_type).fillna(0.0)
tf_idf['tfidf']=tf_idf['tf']*tf_idf['idf'] # 包含大于1的值
tf_idf['tfidf']=tf_idf['tfidf']/tf_idf['tfidf'].max() # 去中心化 ,必须的,不然值都非常小
#print(tf_idf.dtypes)
return list(zip(tf_idf.term_id.values.tolist(),tf_idf.tfidf.values.tolist(),tf_idf.tf.values.tolist()))
# 文章下的词tfidf值
tfidf=list(map(lambda x : per_doc_wd_tfidf_weight(x=x,keep_type=keep_type),corpus)) # 文档层面的词向量表达 [[(term_id,tfidf),..],..] [docs=>(terms=>tfidf)]
ls_tfidf=[]
doc_id=0
# 展开文章,获得文章=>词=>tfidf值的dataframe
for doc_terms in tfidf:
ls_tfidf.extend([(doc_id,)+term_tfidf for term_tfidf in doc_terms])
doc_id=doc_id+1
del tfidf
df_tfidf=pds.DataFrame(ls_tfidf,columns=['doc_id','term_id','tfidf','tf'])
term_tfidf=df_tfidf.pivot(index='term_id',columns='doc_id',values='tfidf').fillna(na_val) # 词 => tfidf_vectory
if norm_type=='maxscale':
term_tfidf=term_tfidf.apply(lambda x : x/x.max(),axis=1) # 归一化
#del df_tfidf
#gc.collect()
if term_keep_index!=None:
term_tfidf=term_tfidf.loc[term_keep_index,:]
if out_type=='aggr':
#tfidf_vec=term_tfidf.apply(lambda x : x.tolist(),axis=1,result_type=None) # 仅 python3 # python2 不支持 result_type=None,默认是split,所以不可行
tfidf_vec=pds.DataFrame(list(zip(term_tfidf.index.values.tolist(),term_tfidf.values.tolist())),columns=['term_id','tfidf_vec']).set_index('term_id') # python2 & python3 都适用,也很快
return tfidf_vec
elif out_type=='split':
return term_tfidf
else:
return None
def tfidf_vec_generate_and_storage(cat_sts,na_val=0.0,norm_type='maxscale'):
'''
生成tfidf vec 并存储
提前去掉低频词,仅保留高频词,
对 稀疏向量 ,仅存储 非稀疏值 及对应位置,存储空间
'''
## 训练模型
dct = Dictionary(cat_sts)
corpus = [dct.doc2bow(line) for line in cat_sts]
model = TfidfModel(corpus)
tk2id = dct.token2id
# 去掉低频词,仅保留非低频词 term_id_keep 会去索引 tfidf-vec
tf_all=[]
for c in corpus:
tf_all.extend(c)
tf_all=pds.DataFrame(tf_all,columns=['term_id','tf']).groupby('term_id')['tf'].agg(['sum','count']).reset_index().rename(columns={'sum':'tf','count':'df'})
term_id_keep=tf_all.loc[tf_all.tf>3,:].term_id.values.tolist()
sqlContext.createDataFrame(tf_all).write.saveAsTable('{0}.term_id_tf_df'.format(database_name),mode='overwrite')
## transform: 词的tf-idf向量 ,需要获得词的向量表达,一般是 对想基于词对文档进行分类,或者计算词的相似度 ,比较快,3到5分钟
#term_tfidf=term_tfidf_weight(model=model,corpus=corpus,na_val=-1.0,keep_type='appeared',out_type='split') # 获得词的tfidf向量表达,pandas-dataframe方式传出,一行是一个词在各doc中的tfidf权重向量
tfidf_vec=term_tfidf_weight(model=model,corpus=corpus,na_val=na_val,keep_type='appeared',out_type='aggr',term_keep_index=term_id_keep,norm_type=norm_type)
#tfidf_vec=tfidf_vec
del model ,dct
gc.collect()
print(1)
def sparse_vec_disassemble(a,sparse_val=-1.0,return_part=1):
'''
获取疏向量 非稀疏部分的位置p,最终二者分别保留p位的值
a=npy.array([-1, -1, 0.2, 0.7, -1, -1])
则保留
a_u=[0.2,0.7]
return 保留向量
'''
pos_a=npy.array(range(len(a)))[a!=sparse_val].tolist()
a_u=a[pos_a]
if return_part==1:
return a_u.tolist()
elif return_part==2:
return pos_a
else:
return a_u.tolist(),pos_a
tfidf_vec2=tfidf_vec.apply(lambda x : sparse_vec_disassemble(a=npy.array(x[0]),sparse_val=na_val,return_part=1),axis=1).reset_index()
tfidf_vec2['pos']=tfidf_vec.apply(lambda x : sparse_vec_disassemble(a=npy.array(x[0]),sparse_val=na_val,return_part=2),axis=1).reset_index(drop=True)
tfidf_vec2.columns=['term_id','tfidf_vec','tfidf_vec_pos']
print(2)
#
tfidf_vec_df=sqlContext.createDataFrame(tfidf_vec2) # dataframe ,约10w条记录 ,rdd时计算
windowx=Window.orderBy('term_id')
tfidf_vec_df=tfidf_vec_df.withColumn('rankx',F.row_number().over(windowx))
#
#sqlContext.sql('drop table if exists {0}.term_id_tfidf_vec_in_cat '.format(database_name))
tfidf_vec_df.write.saveAsTable('{0}.term_id_tfidf_vec_in_cat'.format(database_name),mode='overwrite')
gc.collect()
tk_id0=pds.DataFrame(list(tk2id.items()),columns=['term_name','term_id']) # dataframe 方便操作join
tk_id=tk_id0.loc[(tk_id0.term_name.str.len()>1)&(tk_id0.term_name.str.contains(u'[\u4e00-\u9fa5a-zA-Z]')==True),:] # 剔除长度为1 和 仅数字或符号的 词
sqlContext.createDataFrame(tk_id).write.saveAsTable('{0}.term_id_name'.format(database_name),mode='overwrite')
return corpus
if __name__=='__main__':
confx=SparkConf().setAppName('3_word_semantic_similarity_on_prod_name')
sc=SparkContext(conf=confx)
sqlContext=HiveContext(sc)
sc.setLogLevel("WARN")
## 4 tfidf 相似度
topic_table=params['shared']['topic_cut_word_table']
df3=sqlContext.sql('select inputwds from {0}.{1}'.format(database_name,topic_table))
# 4.1 生成tfidf 向量,并存储
na_val=params['tfidf']['na_val']
norm_type=params['tfidf']['norm_type']
cat_sts=df3.select('inputwds').toPandas()['inputwds'].values.tolist() # 2G #cat_sts=[['ab','a','c'],['a','b','c','c']]
corpus=tfidf_vec_generate_and_storage(cat_sts,na_val=na_val,norm_type=norm_type) # NOT RETURN VALUE,BUT STORAGE TO TABLE : tfidf_vec_df ,tk_id
gc.collect()
# 4.2 计算相似度 建议这里重新开一个 py文件,这样可以释放内存 ,见 tfidf_vec_sim.py文件
# 4.2 term_id tf ration in each doc --> used in richness_coef
term_doc_tf_r(corpus=corpus,sqlContext=sqlContext)
|
[
"noreply@github.com"
] |
laura-zhang-cn.noreply@github.com
|
1be16efded94fc0540fb6e7f42f81c7f9d858eec
|
c2983d006139ea69044233af9ae5ff29fe3640ba
|
/test/postgres_tests.py
|
59fc5330709e9ef47e1505a9b89fd8ef01e83bfe
|
[
"Apache-2.0"
] |
permissive
|
nkabir/pyschema
|
b0b608c6397dfe844876c05d25b67ef41b3dbcdf
|
d8e6de80f00a59c747beaf6ed53b8316e29762de
|
refs/heads/master
| 2021-01-14T09:42:15.671139
| 2015-04-27T15:38:44
| 2015-04-27T15:38:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 860
|
py
|
from unittest import TestCase
from pyschema import Record, no_auto_store
from pyschema.types import Integer, Text, Float, Boolean, Date, DateTime
from pyschema_extensions import postgres
@no_auto_store()
class MyItem(Record):
name = Text()
value = Integer()
dec = Float()
flag = Boolean()
date = Date()
datehour = DateTime()
class TestPostgres(TestCase):
def test_create_statement(self):
statement = postgres.create_statement(MyItem, 'my_table')
self.assertEquals("CREATE TABLE my_table (name TEXT, value INT, dec FLOAT, flag BOOLEAN, date DATE, datehour TIMESTAMP WITHOUT TIME ZONE)", statement)
statement = postgres.create_statement(MyItem)
self.assertEquals("CREATE TABLE my_item (name TEXT, value INT, dec FLOAT, flag BOOLEAN, date DATE, datehour TIMESTAMP WITHOUT TIME ZONE)", statement)
|
[
"freider@spotify.com"
] |
freider@spotify.com
|
71cdd0ba41024dbd952e1d2a8ec2527c9e2fb9c6
|
77fe4a852711bf024b4b481fc4d7f9fa5a6c96c4
|
/Project 2/Problem 4/problem_4.py
|
9f3f332fb423378ddbfa6499318a76d03176eb3e
|
[] |
no_license
|
Abdelaty/Data-Structure-and-Algorithms-Nanodegree
|
88bbd5d62c89c65d96152eec64acf17a8d434a96
|
52cb103084f37655701be3c9acb42888161541f4
|
refs/heads/master
| 2021-05-17T18:50:17.732854
| 2020-05-02T18:11:34
| 2020-05-02T18:11:34
| 250,926,399
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,768
|
py
|
class Group(object):
def __init__(self, _name):
self.name = _name
self.groups = []
self.users = []
def add_group(self, group):
self.groups.append(group)
def add_user(self, user):
self.users.append(user)
def get_groups(self):
return self.groups
def get_users(self):
return self.users
def get_name(self):
return self.name
def is_user_in_group(user, group):
"""
Return True if user is in the group, False otherwise.
Args:
user(str): user name/id
group(class:Group): group to check user membership against
"""
output = False
for u in group.get_users():
if u == user:
return True
for g in group.get_groups():
output |= is_user_in_group(user, g)
return output
"""
Tests
Group Structure:
Parent
|--Child1
| `--+--SubChild11
| `--SubChild12
`--Child2
`--+--SubChild21
`--SubChild22
Description:
Each Group contains 2 children
"""
#Groups
parent = Group("parent")
child1 = Group("child1")
child2 = Group("child2")
sub_child11 = Group("subchild11")
sub_child12 = Group("subchild12")
sub_child21 = Group("subchild21")
sub_child22 = Group("subchild22")
#Users
parent_user_1 = "parent_user_1"
child1_user_1 = "child1_user_1"
child2_user_1 = "child2_user_1"
sub_child11_user_1 = "sub_child11_user_1"
sub_child12_user_1 = "sub_child12_user_1"
sub_child21_user_1 = "sub_child21_user_1"
sub_child22_user_1 = "sub_child22_user_1"
parent_user_2 = "parent_user_2"
child1_user_2 = "child1_user_2"
child2_user_2 = "child2_user_2"
sub_child11_user_2 = "sub_child11_user_2"
sub_child12_user_2 = "sub_child12_user_2"
sub_child21_user_2 = "sub_child21_user_2"
sub_child22_user_2 = "sub_child22_user_2"
parent.add_user(parent_user_1)
parent.add_user(parent_user_2)
parent.add_group(child1)
child1.add_user(child1_user_1)
child1.add_user(child1_user_2)
parent.add_group(child2)
child2.add_user(child2_user_1)
child2.add_user(child2_user_2)
child1.add_group(sub_child11)
sub_child11.add_user(sub_child11_user_1)
sub_child11.add_user(sub_child11_user_2)
child1.add_group(sub_child12)
sub_child12.add_user(sub_child12_user_1)
sub_child12.add_user(sub_child12_user_2)
child2.add_group(sub_child21)
sub_child21.add_user(sub_child21_user_1)
sub_child21.add_user(sub_child21_user_2)
child2.add_group(sub_child22)
sub_child22.add_user(sub_child22_user_1)
sub_child22.add_user(sub_child22_user_2)
# Parent1 in Parent
print ("Pass" if (is_user_in_group(parent_user_1, parent) == True) else "Fail")
# Parent2 in Parent
print ("Pass" if (is_user_in_group(parent_user_2, parent) == True) else "Fail")
# Child1_1 in Parent
print ("Pass" if (is_user_in_group(child1_user_1, parent) == True) else "Fail")
# Child1_2 in Parent
print ("Pass" if (is_user_in_group(child1_user_2, parent) == True) else "Fail")
# Child2_1 in Parent
print ("Pass" if (is_user_in_group(child2_user_1, parent) == True) else "Fail")
# Child2_2 in Parent
print ("Pass" if (is_user_in_group(child2_user_2, parent) == True) else "Fail")
# SubChild11_1 in Parent
print ("Pass" if (is_user_in_group(sub_child11_user_1, parent) == True) else "Fail")
# SubChild11_2 in Parent
print ("Pass" if (is_user_in_group(sub_child11_user_2, parent) == True) else "Fail")
# SubChild22_1 in Parent
print ("Pass" if (is_user_in_group(sub_child21_user_1, parent) == True) else "Fail")
# SubChild22_2 in Parent
print ("Pass" if (is_user_in_group(sub_child21_user_2, parent) == True) else "Fail")
# Subchild22_2 in Child1
print ("Pass" if (is_user_in_group(sub_child22_user_2, child1) == False) else "Fail")
# Subchild11_1 in Child2
print ("Pass" if (is_user_in_group(sub_child11_user_1, child2) == False) else "Fail")
|
[
"Abdelaty.mohammedmagdi@gmail.com"
] |
Abdelaty.mohammedmagdi@gmail.com
|
f77f5031d2828acf76391e5d475d5883c6790ee9
|
d7b4727e74d4a8a339c54dc5a15d8872319e7e7c
|
/playing_around/cv_test.py
|
011ceb3920e2b8e09354eb269026943c91a334d9
|
[] |
no_license
|
pussinboot/aal
|
fbd6a780cb18530f3f72d5b4c4cd9978f37ccfa4
|
53ea549d7f581bb3b8dd4c009925a89e6e9b924b
|
refs/heads/master
| 2022-01-02T19:35:04.817200
| 2015-10-28T19:40:46
| 2015-10-28T19:40:46
| 32,659,873
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,353
|
py
|
import numpy as np
import cv2
#image = cv2.imread("cv_test.jpg")
#gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
#gray = cv2.GaussianBlur(gray, (3, 3), 0)
##cv2.imshow("Gray", gray)
#cv2.waitKey(0)
#edged = cv2.Canny(gray, 10, 100)
##cv2.imshow("Edged", edged)
##cv2.waitKey(0)
##cv2.imwrite("edgy.jpg",edged)
## construct and apply a closing kernel to 'close' gaps between 'white'
## pixels
#kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (15, 15))
#closed = cv2.morphologyEx(edged, cv2.MORPH_CLOSE, kernel)
##cv2.imshow("Closed", closed)
##cv2.waitKey(0)
##cv2.imwrite("closed.jpg",closed)
## find contours (i.e. the 'outlines') in the image and initialize the
## total number of books found
#( _, cnts, _) = cv2.findContours(closed.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
#
#cv2.drawContours(image, cnts, -1, (0,255,0), 3)
#
##total = 0
##
###print(len(cnts))
### loop over the contours
##for c in cnts:
### approximate the contour
## peri = cv2.arcLength(c, True)
## approx = cv2.approxPolyDP(c, 0.02 * peri, True)
##
### if the approximated contour has four points, then assume that the
### contour is a book -- a book is a rectangle and thus has four vertices
## if len(approx) == 4:
## cv2.drawContours(image, [approx], -1, (0, 255, 0), 4)
## total += 1
##
### display the output
##print("I found {0} books in that image".format(total))
#cv2.imshow("Output", image)
#cv2.waitKey(0)##
def thresh_callback(thresh):
edges = cv2.Canny(blur,thresh,thresh*2)
drawing = np.zeros(img.shape,np.uint8) # Image to draw the contours
_, contours, _ = cv2.findContours(edges,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
for cnt in contours:
color = np.random.randint(0,255,(3)).tolist() # Select a random color
cv2.drawContours(drawing,[cnt],0,color,2)
#cv2.imshow('output',drawing)
fname = "./images/gif/gif2/" + str(thresh) + '.jpg'
cv2.imwrite(fname,drawing)
#cv2.imshow('input',img)
img = cv2.imread('cv_test_2.jpg')
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
blur = cv2.GaussianBlur(gray,(11,11),0)
#cv2.namedWindow('input',cv2.WINDOW_AUTOSIZE)
thresh = 100
max_thresh = 255
#cv2.createTrackbar('canny thresh:','input',thresh,max_thresh,thresh_callback)
#thresh_callback(thresh)
#if cv2.waitKey(0) == 27:
# cv2.destroyAllWindows()
for i in range(160):
thresh_callback(i)
|
[
""
] | |
1be3440a397de19a2731a7caaf67ed5265d6bc63
|
dfa79b5a899b253df02f2bd1695c3a09458de7a4
|
/netquants.py~
|
f3d1adfaa41fcfb6108d606b375c0866eefd0ca3
|
[] |
no_license
|
DanielKoohmarey/netQuants
|
806fd9f09a7e52a4d61e9b1588c39b3919229ff6
|
d91cfaf2ac4de6521b2782ad007f1d69e5e9bc87
|
refs/heads/master
| 2020-12-25T10:49:44.228465
| 2013-05-07T00:28:56
| 2013-05-07T00:28:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,555
|
#!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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 sys
sys.path.append("quant")
import quantPy as qp
import wIndicators as wI
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
from tornado.options import define, options
define("port", default=8888, help="run on the given port", type=int)
class MainHandler(tornado.web.RequestHandler):
def get(self):
result = qp.oneStock(wI.meanReversion, "ACE")
self.write(result.to_string())
class JsonServer(tornado.web.RequestHandler):
def get(self):
result = qp.oneStock(wI.meanReversion, "ACE")
self.write(result.to_string())
def main():
tornado.options.parse_command_line()
application = tornado.web.Application([
(r"/", MainHandler),
(r"/stock", JsonServer),
])
http_server = tornado.httpserver.HTTPServer(application)
http_server.listen(options.port)
tornado.ioloop.IOLoop.instance().start()
if __name__ == "__main__":
main()
|
[
"leeanna@berkeley.edu"
] |
leeanna@berkeley.edu
|
|
932e44b66fd1887560fc053e4a525c8d687dc93a
|
1b71a47534ec5262c6749e701e85320da523cec1
|
/Code/RealOffice/meeting/migrations/0007_auto_20170307_1854.py
|
4e84fa10a6abe68d2dd2cae8566409fb0f1d5f2a
|
[] |
no_license
|
kejriwalrahul/RealOffice
|
2a82fd07036e2452af923653e8a251730a67017e
|
077764f2d5ab62eba225557967a08b23a52567e9
|
refs/heads/master
| 2021-03-27T20:01:33.255446
| 2017-04-16T09:21:51
| 2017-04-16T09:21:51
| 80,219,099
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 488
|
py
|
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-07 18:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('meeting', '0006_auto_20170307_1854'),
]
operations = [
migrations.AlterField(
model_name='requirement',
name='orderDetails',
field=models.CharField(default=None, max_length=128, null=True),
),
]
|
[
"kejriwalrahul@outlook.com"
] |
kejriwalrahul@outlook.com
|
43a3171c18f24f3e5cf493bcf8576ddb6b9456b6
|
ebd2df05eae5875f3edd5c891442b9fe1f3d54ee
|
/empleados/views.py
|
3b8388bd33952007db18e34edaecbd69330d2a7c
|
[] |
no_license
|
gfcarbonell/app_navidad
|
06191ef3b084d40c7a5f387a60407406c2c89d54
|
fa290f8cf0b4b0d9237b555417fe38f879938adf
|
refs/heads/master
| 2020-12-24T11:54:10.514150
| 2016-11-16T15:37:09
| 2016-11-16T15:37:09
| 73,115,163
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 6,364
|
py
|
# -*- encoding: utf-8 -*-
from django.conf import settings
from django.views.generic import CreateView, UpdateView, ListView, DetailView
from .models import Empleado
from .forms import EmpleadoModelForm, EmpleadoUsuarioForm
from django.core.urlresolvers import reverse_lazy
from rest_framework import viewsets
from django.db.models import Q
import socket
from pure_pagination.mixins import PaginationMixin
from django.template.defaultfilters import slugify
from infos_sistemas.mixins import TipoPerfilUsuarioMixin
class EmpleadoCreateView(TipoPerfilUsuarioMixin, CreateView):
template_name = 'empleado_create.html'
form_class = EmpleadoUsuarioForm
model = Empleado
success_url = reverse_lazy('empleado:control')
def form_valid(self, form):
user = form['model_form_usuario'].save(commit=False)
user.usuario_creador = self.request.user
user.ultimo_usuario_editor = user.usuario_creador
try:
user.nombre_host = socket.gethostname()
user.ultimo_nombre_host = user.nombre_host
except:
user.nombre_host = 'localhost'
user.ultimo_nombre_host = user.nombre_host
user.direccion_ip = socket.gethostbyname(socket.gethostname())
user.ultimo_direccion_ip = socket.gethostbyname(socket.gethostname())
empleado = form['model_form_empleado'].save(commit=False)
empleado.tipo_persona = 'Natural'
if empleado.numero_hijo is None:
empleado.numero_hijo = 0
user.save()
empleado.usuario = user
empleado.usuario_creador = self.request.user
empleado.ultimo_usuario_editor = empleado.usuario_creador
try:
empleado.nombre_host = socket.gethostname()
empleado.ultimo_nombre_host = empleado.nombre_host
except:
empleado.nombre_host = 'localhost'
empleado.ultimo_nombre_host = empleado.nombre_host
empleado.direccion_ip = socket.gethostbyname(socket.gethostname())
empleado.ultimo_direccion_ip = socket.gethostbyname(socket.gethostname())
empleado.save()
return super(EmpleadoCreateView, self).form_valid(form)
class EmpleadoUpdate(TipoPerfilUsuarioMixin, UpdateView):
form_class = EmpleadoModelForm
success_url = reverse_lazy('empleado:control')
template_name = 'empleado_update.html'
queryset = Empleado.objects.all()
def form_valid(self, form):
self.object = form.save(commit=False)
if self.object.numero_hijo is None:
self.object.numero_hijo = 0
self.object.ultimo_usuario_editor = self.request.user
try:
self.object.ultimo_nombre_host = socket.gethostname()
except:
self.object.ultimo_nombre_host = 'localhost'
self.object.ultimo_direccion_ip = socket.gethostbyname(socket.gethostname())
self.object.save()
return super(EmpleadoUpdate, self).form_valid(form)
class EmpleadoUsuarioUpdateView(TipoPerfilUsuarioMixin, UpdateView):
form_class = EmpleadoUsuarioForm
success_url = reverse_lazy('empleado:control')
template_name = 'empleado_usuario_update.html'
queryset = Empleado.objects.all()
def get_context_data(self, **kwarg):
context = super(EmpleadoUpdateView, self).get_context_data(**kwarg)
empleado = self.queryset.get(slug__contains=self.kwargs['slug'])
data = {'empleado':empleado}
context.update(data)
return context
def get_form_kwargs(self):
kwargs = super(EmpleadoUpdateView, self).get_form_kwargs()
kwargs.update(instance={
'model_form_empleado': self.object,
'model_form_usuario': self.object.usuario,
})
return kwargs
def form_valid(self, form):
empleado = self.queryset.get(slug__contains=self.kwargs['slug'])
user = form['model_form_usuario'].save(commit=False)
user = empleado.usuario
user.ultimo_usuario_editor = self.request.user
try:
user.ultimo_nombre_host = user.nombre_host
except:
user.ultimo_nombre_host = user.nombre_host
user.ultimo_direccion_ip = socket.gethostbyname(socket.gethostname())
empleado = form['model_form_empleado'].save(commit=False)
empleado.tipo_persona = 'Natural'
if empleado.numero_hijo is None:
empleado.numero_hijo = 0
user.save()
empleado.usuario = user
empleado.ultimo_usuario_editor = self.request.user
try:
empleado.ultimo_nombre_host = empleado.nombre_host
except:
empleado.ultimo_nombre_host = empleado.nombre_host
empleado.ultimo_direccion_ip = socket.gethostbyname(socket.gethostname())
empleado.save()
return super(EmpleadoUpdateView, self).form_valid(form)
class EmpleadoDetailView(TipoPerfilUsuarioMixin, DetailView):
template_name = 'empleado_detail.html'
model = Empleado
queryset = Empleado.objects.all()
class EmpleadoControlListView(PaginationMixin, TipoPerfilUsuarioMixin, ListView):
model = Empleado
template_name = 'empleados.html'
paginate_by = 10
def get_context_data(self, **kwarg):
context = super(EmpleadoControlListView, self).get_context_data(**kwarg)
boton_menu = False
total_registro = self.model.objects.count()
data = {
'boton_menu' : boton_menu,
'total_registro': total_registro,
}
context.update(data)
return context
def get(self, request, *args, **kwargs):
if request.GET.get('search_registro', None):
self.object_list = self.get_queryset()
context = self.get_context_data()
return self.render_to_response(context)
else:
return super(EmpleadoControlListView, self).get(self, request, *args, **kwargs)
def get_queryset(self):
if self.request.GET.get('search_registro', None):
value = self.request.GET.get('search_registro', None)
queryset = self.model.objects.filter(Q(slug__icontains=slugify(value)))
else:
queryset = super(EmpleadoControlListView, self).get_queryset()
return queryset
|
[
"r.gian.f.carbonell.s@gmail.com"
] |
r.gian.f.carbonell.s@gmail.com
|
26dace9da5168c53db1423f65ab53c70e82b7187
|
d131ad1baf891a2918ae27b0dc57f3c0c1f99586
|
/blog/migrations/0001_initial.py
|
ec6923c8ffb8cbccaa6e420a5a387c7af1f5ae91
|
[] |
no_license
|
Alymbekov/TestProjectForDjangoForms
|
d3bf24844628136f9236d5222d32235e87f7aecd
|
ce3262e7565e293b691ea70b94b67155c15525bd
|
refs/heads/master
| 2020-04-10T05:35:19.516127
| 2018-12-07T14:24:05
| 2018-12-07T14:24:05
| 160,832,149
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 713
|
py
|
# Generated by Django 2.1 on 2018-11-18 08:19
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Post',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(db_index=True, max_length=150)),
('slug', models.SlugField(max_length=150, unique=True)),
('body', models.TextField(blank=True, db_index=True)),
('date_pub', models.DateTimeField(auto_now_add=True)),
],
),
]
|
[
"maxim.makarov.1997@mail.ru"
] |
maxim.makarov.1997@mail.ru
|
bb46853c01135dbca52d0c9a878620334dfa657b
|
80a881f0ebb159d1dfe9fa10e93a7f2fcd7f3677
|
/planb/feedback/models.py
|
b5ad0abadca32394f000f47dbbe1908ae48d029a
|
[] |
no_license
|
Grapheme/mayak
|
42d874080f8233a1d0e709afe48cd2135ddaab98
|
4f26c290a7df060c65624328087c39a73a8540e7
|
refs/heads/master
| 2020-06-06T04:00:10.204791
| 2015-09-15T17:34:48
| 2015-09-15T17:34:48
| 27,764,461
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,375
|
py
|
# -*- coding: utf-8 -*-
from django.db import models
class FeedbackManager(models.Model):
"""
Адреса людей, которые должны получать на email записи из "обратной связи".
"""
email = models.EmailField()
class Meta:
verbose_name = u'менеджер обратной связи'
verbose_name_plural = u'менеджеры обратной связи'
ordering = ['email']
def __unicode__(self):
return self.email
class FeedbackFormManager(models.Model):
slug = models.SlugField(u'уникальный идентификатор формы', unique=True)
caption = models.CharField(u'название формы', max_length=200)
email = models.ManyToManyField(FeedbackManager, verbose_name=u'адреса')
class Meta:
verbose_name = u'форма обратной связи'
verbose_name_plural = u'формы обратной связи'
ordering = ['caption']
def email_flat_list(self):
result = ''
for e in self.email.all():
result += '<li>%s</li>' % (e.email)
result = '<ol>%s</ol>' % result
return result
email_flat_list.allow_tags = True
email_flat_list.short_description = u'Адреса'
def __unicode__(self):
return self.caption
|
[
"etomarat@gmail.com"
] |
etomarat@gmail.com
|
471b28b164af5875eb9670ed6bdea81faaa98ba6
|
9d1c9a81520437122d9f2f012c2737e4dd22713c
|
/src/td_clean.py
|
0b0e3a8e8ad9f059d56a6f5f5dd04748362a15f8
|
[
"MIT"
] |
permissive
|
geophysics-ubonn/crtomo_tools
|
136aa39a8a0d92061a739ee3723b6ef7879c57b8
|
aa73a67479c4e96bc7734f88ac7b35a74b5d158c
|
refs/heads/master
| 2023-08-24T01:55:29.517285
| 2023-08-08T13:03:46
| 2023-08-08T13:03:46
| 142,049,690
| 2
| 9
|
MIT
| 2019-06-06T12:46:42
| 2018-07-23T17:54:24
|
Standard ML
|
UTF-8
|
Python
| false
| false
| 1,791
|
py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Clean a simulation directory of all modeling/inversion files
"""
import numpy as np
import os
import glob
def main():
rm_list = []
required_files_inversion = (
'exe/crtomo.cfg',
'grid/elem.dat',
'grid/elec.dat',
'mod/volt.dat')
clean_inv = np.all([os.path.isfile(x) for x in required_files_inversion])
if clean_inv:
rm_list += glob.glob('inv/*')
rm_list += [
'exe/error.dat',
'exe/crtomo.pid',
'exe/variogram.gnu',
'exe/inv.elecpositions',
'exe/inv.gstat',
'exe/inv.lastmod',
'exe/inv.lastmod_rho',
'exe/inv.mynoise_pha',
'exe/inv.mynoise_rho',
'exe/inv.mynoise_voltages',
'exe/tmp.kfak',
'overview.png',
]
required_files_modelling = (
'exe/crmod.cfg',
'grid/elem.dat',
'grid/elec.dat',
'config/config.dat',
'rho/rho.dat'
)
clean_mod = np.all([os.path.isfile(x) for x in required_files_modelling])
if clean_mod:
rm_list += glob.glob('mod/sens/*')
rm_list += glob.glob('mod/pot/*')
rm_list += ['mod/volt.dat', ]
rm_list += ['exe/crmod.pid', ]
for filename in rm_list:
if os.path.isfile(filename):
# print('Removing file {0}'.format(filename))
os.remove(filename)
plot_files = (
'rho.png',
'imag.png',
'real.png',
'phi.png',
'cov.png',
'fpi_imag.png',
'fpi_phi.png',
'fpi_real.png',
)
for filename in plot_files:
if os.path.isfile(filename):
os.remove(filename)
if __name__ == '__main__':
main()
|
[
"mweigand@geo.uni-bonn.de"
] |
mweigand@geo.uni-bonn.de
|
61525717db91dbf05797d7a00755affc2b82f2be
|
ff0d4899d63071d0517b6be0ffdd01579bc49fea
|
/quickgrab.py
|
a7c49d8903ca6f02f7e1a6cc56d9308bef60828c
|
[] |
no_license
|
kellyelton/octbot
|
0bd528e9fc68ddf83f67d228bdba079efba11606
|
3a50ce63b2dc7949fe4febe57b4ca5bb9668fda8
|
refs/heads/master
| 2021-01-15T16:15:06.890789
| 2013-05-07T01:54:42
| 2013-05-07T01:54:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,027
|
py
|
from PIL import ImageGrab
import os
import time
import win32gui
def screenGrab(box):
im = ImageGrab.grab(box)
im.save(os.getcwd() + '\\full_snap__' + str(int(time.time())) + '.png', 'PNG')
def winEnumHandler( hwnd, ctx ):
whereIsOctgn = ()
coords = ()
if win32gui.IsWindowVisible( hwnd ):
if win32gui.GetWindowText( hwnd ) == 'Octgn version : 3.1.16.99 : Android-Netrunner':
whereIsOctgn = hwnd
print (hex(whereIsOctgn))
coords = win32gui.GetWindowRect(whereIsOctgn)
print (coords)
win32gui.SetForegroundWindow(whereIsOctgn)
screenGrab(coords)
def winListHandler( hwnd, ctx ):
if win32gui.IsWindowVisible( hwnd ):
print (hex( hwnd ), win32gui.GetWindowText( hwnd ))
def listWindows():
win32gui.EnumWindows( winListHandler, None )
def screenGrabOctgn():
win32gui.EnumWindows( winEnumHandler, None )
def main():
screenGrabOctgn()
listWindows()
if __name__ == '__main__':
main()
|
[
"dan.h.johnson@gmail.com"
] |
dan.h.johnson@gmail.com
|
556a49713f3c38e2aafd9f87264d58fdb55b1646
|
444c5e47a883bff0c116f00f08ade7f6c75ca235
|
/install_mac_package_managers
|
8e3e4cda322bc4ee7d19d5aea3cb9f2e517e3c06
|
[] |
no_license
|
poulh/p3-setup
|
86939b4cf69f2ea929cb4789bf7313516daeaa05
|
c3199a031b30bde802365624e7cc6400df624d4e
|
refs/heads/master
| 2020-03-07T19:07:53.842552
| 2019-12-01T23:16:49
| 2019-12-01T23:16:49
| 127,662,891
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 4,468
|
#!/usr/bin/env python
import argparse
import os
import subprocess
import sys
MANAGERS = [
{
'name':'xcode-select',
'cmds' : [
'xcode-select --install'
],
'check': 'xcode-select -p > /dev/null'
},{
'name': 'homebrew',
'cmds': [
'xcode-select --install',
'/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"',
],
'check': 'which brew > /dev/null',
}, {
'name': 'pip',
'cmds': [
'sudo easy_install pip',
],
'check': 'which pip > /dev/null',
}, {
'name': 'npm',
'cmds': [
'brew install npm',
],
'check': 'which npm > /dev/null',
'update':'brue update npm'
}, {
'name': 'ansible',
'cmds': ['brew install ansible'],
'check': 'which ansible-playbook > /dev/null',
'update':'brew upgrade ansible'
}]
def parse_args():
parser = argparse.ArgumentParser(
description='Installs various programs required for Symbiont development. Most using various package managers'
)
parser.add_argument(
'--dry-run',
action='store_true',
help='do not actually run the commands')
parser.add_argument(
'--force',
action='store_true',
help='run install command regardless if already installed')
for manager in MANAGERS:
name = manager['name']
parser.add_argument(
'--{}'.format(name),
action='append_const',
const=name,
dest='include',
help='Install just {}'.format(name))
parser.add_argument(
'--no-{}'.format(name),
action='append_const',
const=name,
dest='exclude',
help='Skip installing {}'.format(name))
args = parser.parse_args()
return args
def run_cmd(cmd, dry_run, verbose=True):
if verbose or dry_run:
print(cmd)
if dry_run == True:
return 0
else:
ret = subprocess.call(cmd, shell=True)
return ret
return 1
def create_check_cmd(name, info):
pkg = info['pkg']
if pkg == 'brew':
return 'brew {} ls {} &> /dev/null'.format(info.get('tap', ''), name)
elif pkg == 'pip':
return 'pip show {} &> /dev/null'.format(name)
elif pkg == 'npm':
return 'npm list --global {} &> /dev/null'.format(name)
elif pkg == 'docker':
return 'docker image inspect {} &>/dev/null'.format(name)
elif pkg == 'sh':
return info['check']
else:
raise Exception('unknown pkg {} for {}'.format(pkg, name))
def create_install_cmd(name, info):
pkg = info['pkg']
if pkg == 'brew':
return 'brew {} install {}'.format(info.get('tap', ''), name)
elif pkg == 'pip':
return 'pip install {}'.format(name)
elif pkg == 'npm':
return 'npm install --global {}'.format(name)
elif pkg == 'docker':
return 'docker pull {}'.format(name)
elif pkg == 'sh':
return info['install']
else:
raise Exception('unknown pkg {} for {}'.format(pkg, name))
def main():
args = parse_args()
if os.geteuid() == 0:
sys.exit(
"sudo/root detected. do not run this script as root. it will prompt you for sudo when/if needed"
)
for manager in MANAGERS:
name = manager['name']
# if the include array is not null, but the manager name isn't in the list, skip
if args.include and (name not in args.include):
continue
# if the exclude array is not null, and the manager name is in the list, skip
if args.exclude and (name in args.exclude):
continue
return_val = 1
app_installed = (0 == run_cmd(manager['check'], dry_run=False,
verbose=True))
if app_installed and 'update' in manager:
cmd = manager['update']
run_cmd(cmd, args.dry_run)
elif not app_installed or args.force:
for cmd in manager['cmds']:
run_cmd(cmd, args.dry_run)
else:
print('{} already installed'.format(manager['name']))
try:
main()
except Exception as e:
print(e.args)
|
[
"poulh@umich.edu"
] |
poulh@umich.edu
|
|
e3c7ab6be6aaf8422341c9f6c2da618e37250a0c
|
8eecff47b3165d91b91a29b311a9f105aa6a25c8
|
/combinations.py
|
de0baa72e882e7f3e6b2cf0ebcae3411dfd25bea
|
[] |
no_license
|
Temp-Nerd/All-d-Porgrams-in-d-wurld
|
dbdb394d4afa9cd4028bd406f4e95efc665f518f
|
23320f42013f9f5fbd9f1107ac0eea3cdfefb24d
|
refs/heads/main
| 2023-02-18T19:00:43.359747
| 2021-01-22T15:20:50
| 2021-01-22T15:20:50
| 331,982,184
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 415
|
py
|
def factorial (a) :
factorial=1
for i in range (a,1,-1) :
factorial*=i
return factorial
def combination (n,r) :
n_fact=factorial(n)
r_fact=factorial(r)
n_r_fact=factorial(n-r)
return(n_fact//(r_fact*n_r_fact))
x=int(input('Enter n :'))
y=int(input('Enter r :'))
print(f'The total no. of combinations of n taken r at a time is :{combination(x,y)}')
|
[
"noreply@github.com"
] |
Temp-Nerd.noreply@github.com
|
60d9422069f85a93dcee9aecd46120c3a7253c69
|
f4b60f5e49baf60976987946c20a8ebca4880602
|
/lib/python2.7/site-packages/acimodel-1.3_2j-py2.7.egg/cobra/modelimpl/tag/insttask.py
|
e2820118edd9b39d43659c40ce0995dfd34ecc0b
|
[] |
no_license
|
cqbomb/qytang_aci
|
12e508d54d9f774b537c33563762e694783d6ba8
|
a7fab9d6cda7fadcc995672e55c0ef7e7187696e
|
refs/heads/master
| 2022-12-21T13:30:05.240231
| 2018-12-04T01:46:53
| 2018-12-04T01:46:53
| 159,911,666
| 0
| 0
| null | 2022-12-07T23:53:02
| 2018-12-01T05:17:50
|
Python
|
UTF-8
|
Python
| false
| false
| 16,985
|
py
|
# coding=UTF-8
# **********************************************************************
# Copyright (c) 2013-2016 Cisco Systems, Inc. All rights reserved
# written by zen warriors, do not modify!
# **********************************************************************
from cobra.mit.meta import ClassMeta
from cobra.mit.meta import StatsClassMeta
from cobra.mit.meta import CounterMeta
from cobra.mit.meta import PropMeta
from cobra.mit.meta import Category
from cobra.mit.meta import SourceRelationMeta
from cobra.mit.meta import NamedSourceRelationMeta
from cobra.mit.meta import TargetRelationMeta
from cobra.mit.meta import DeploymentPathMeta, DeploymentCategory
from cobra.model.category import MoCategory, PropCategory, CounterCategory
from cobra.mit.mo import Mo
# ##################################################
class InstTask(Mo):
"""
An instance task.
"""
meta = ClassMeta("cobra.model.tag.InstTask")
meta.moClassName = "tagInstTask"
meta.rnFormat = "tagInstTask-%(id)s"
meta.category = MoCategory.TASK
meta.label = "None"
meta.writeAccessMask = 0x1
meta.readAccessMask = 0x1
meta.isDomainable = False
meta.isReadOnly = True
meta.isConfigurable = False
meta.isDeletable = False
meta.isContextRoot = False
meta.parentClasses.add("cobra.model.action.TopomgrSubj")
meta.parentClasses.add("cobra.model.action.ObserverSubj")
meta.parentClasses.add("cobra.model.action.VmmmgrSubj")
meta.parentClasses.add("cobra.model.action.SnmpdSubj")
meta.parentClasses.add("cobra.model.action.ScripthandlerSubj")
meta.parentClasses.add("cobra.model.action.ConfelemSubj")
meta.parentClasses.add("cobra.model.action.EventmgrSubj")
meta.parentClasses.add("cobra.model.action.OspaelemSubj")
meta.parentClasses.add("cobra.model.action.VtapSubj")
meta.parentClasses.add("cobra.model.action.OshSubj")
meta.parentClasses.add("cobra.model.action.DhcpdSubj")
meta.parentClasses.add("cobra.model.action.ObserverelemSubj")
meta.parentClasses.add("cobra.model.action.DbgrelemSubj")
meta.parentClasses.add("cobra.model.action.VleafelemSubj")
meta.parentClasses.add("cobra.model.action.NxosmockSubj")
meta.parentClasses.add("cobra.model.action.DbgrSubj")
meta.parentClasses.add("cobra.model.action.AppliancedirectorSubj")
meta.parentClasses.add("cobra.model.action.OpflexpSubj")
meta.parentClasses.add("cobra.model.action.BootmgrSubj")
meta.parentClasses.add("cobra.model.action.AeSubj")
meta.parentClasses.add("cobra.model.action.PolicymgrSubj")
meta.parentClasses.add("cobra.model.action.ExtXMLApiSubj")
meta.parentClasses.add("cobra.model.action.OpflexelemSubj")
meta.parentClasses.add("cobra.model.action.PolicyelemSubj")
meta.parentClasses.add("cobra.model.action.IdmgrSubj")
meta.superClasses.add("cobra.model.action.RInst")
meta.superClasses.add("cobra.model.pol.ComplElem")
meta.superClasses.add("cobra.model.task.Inst")
meta.superClasses.add("cobra.model.action.Inst")
meta.rnPrefixes = [
('tagInstTask-', True),
]
prop = PropMeta("str", "childAction", "childAction", 4, PropCategory.CHILD_ACTION)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop._addConstant("deleteAll", "deleteall", 16384)
prop._addConstant("deleteNonPresent", "deletenonpresent", 8192)
prop._addConstant("ignore", "ignore", 4096)
meta.props.add("childAction", prop)
prop = PropMeta("str", "data", "data", 52, PropCategory.REGULAR)
prop.label = "Data"
prop.isImplicit = True
prop.isAdmin = True
prop.range = [(0, 512)]
meta.props.add("data", prop)
prop = PropMeta("str", "descr", "descr", 33, PropCategory.REGULAR)
prop.label = "Description"
prop.isImplicit = True
prop.isAdmin = True
prop.range = [(0, 128)]
prop.regex = ['[a-zA-Z0-9\\!#$%()*,-./:;@ _{|}~?&+]+']
meta.props.add("descr", prop)
prop = PropMeta("str", "dn", "dn", 1, PropCategory.DN)
prop.label = "None"
prop.isDn = True
prop.isImplicit = True
prop.isAdmin = True
prop.isCreateOnly = True
meta.props.add("dn", prop)
prop = PropMeta("str", "endTs", "endTs", 15575, PropCategory.REGULAR)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = 0
prop.defaultValueStr = "never"
prop._addConstant("never", "never", 0)
meta.props.add("endTs", prop)
prop = PropMeta("str", "fail", "fail", 46, PropCategory.REGULAR)
prop.label = "Fail"
prop.isImplicit = True
prop.isAdmin = True
meta.props.add("fail", prop)
prop = PropMeta("str", "id", "id", 5642, PropCategory.REGULAR)
prop.label = "ID"
prop.isConfig = True
prop.isAdmin = True
prop.isCreateOnly = True
prop.isNaming = True
prop.defaultValue = 0
prop.defaultValueStr = "none"
prop._addConstant("ConfDef", "confdef", 4)
prop._addConstant("none", "none", 0)
meta.props.add("id", prop)
prop = PropMeta("str", "invErrCode", "invErrCode", 49, PropCategory.REGULAR)
prop.label = "Remote Error Code"
prop.isImplicit = True
prop.isAdmin = True
prop._addConstant("ERR-FILTER-illegal-format", None, 1140)
prop._addConstant("ERR-FSM-no-such-state", None, 1160)
prop._addConstant("ERR-HTTP-set-error", None, 1551)
prop._addConstant("ERR-HTTPS-set-error", None, 1552)
prop._addConstant("ERR-MO-CONFIG-child-object-cant-be-configured", None, 1130)
prop._addConstant("ERR-MO-META-no-such-object-class", None, 1122)
prop._addConstant("ERR-MO-PROPERTY-no-such-property", None, 1121)
prop._addConstant("ERR-MO-PROPERTY-value-out-of-range", None, 1120)
prop._addConstant("ERR-MO-access-denied", None, 1170)
prop._addConstant("ERR-MO-deletion-rule-violation", None, 1107)
prop._addConstant("ERR-MO-duplicate-object", None, 1103)
prop._addConstant("ERR-MO-illegal-containment", None, 1106)
prop._addConstant("ERR-MO-illegal-creation", None, 1105)
prop._addConstant("ERR-MO-illegal-iterator-state", None, 1100)
prop._addConstant("ERR-MO-illegal-object-lifecycle-transition", None, 1101)
prop._addConstant("ERR-MO-naming-rule-violation", None, 1104)
prop._addConstant("ERR-MO-object-not-found", None, 1102)
prop._addConstant("ERR-MO-resource-allocation", None, 1150)
prop._addConstant("ERR-aaa-config-modify-error", None, 1520)
prop._addConstant("ERR-acct-realm-set-error", None, 1513)
prop._addConstant("ERR-add-ctrlr", None, 1574)
prop._addConstant("ERR-admin-passwd-set", None, 1522)
prop._addConstant("ERR-api", None, 1571)
prop._addConstant("ERR-auth-issue", None, 1548)
prop._addConstant("ERR-auth-realm-set-error", None, 1514)
prop._addConstant("ERR-authentication", None, 1534)
prop._addConstant("ERR-authorization-required", None, 1535)
prop._addConstant("ERR-connect", None, 1572)
prop._addConstant("ERR-create-domain", None, 1562)
prop._addConstant("ERR-create-keyring", None, 1560)
prop._addConstant("ERR-create-role", None, 1526)
prop._addConstant("ERR-create-user", None, 1524)
prop._addConstant("ERR-delete-domain", None, 1564)
prop._addConstant("ERR-delete-role", None, 1528)
prop._addConstant("ERR-delete-user", None, 1523)
prop._addConstant("ERR-domain-set-error", None, 1561)
prop._addConstant("ERR-http-initializing", None, 1549)
prop._addConstant("ERR-incompat-ctrlr-version", None, 1568)
prop._addConstant("ERR-internal-error", None, 1540)
prop._addConstant("ERR-invalid-args", None, 1569)
prop._addConstant("ERR-invalid-domain-name", None, 1582)
prop._addConstant("ERR-ldap-delete-error", None, 1510)
prop._addConstant("ERR-ldap-get-error", None, 1509)
prop._addConstant("ERR-ldap-group-modify-error", None, 1518)
prop._addConstant("ERR-ldap-group-set-error", None, 1502)
prop._addConstant("ERR-ldap-set-error", None, 1511)
prop._addConstant("ERR-missing-method", None, 1546)
prop._addConstant("ERR-modify-ctrlr-access", None, 1567)
prop._addConstant("ERR-modify-ctrlr-dvs-version", None, 1576)
prop._addConstant("ERR-modify-ctrlr-rootcont", None, 1575)
prop._addConstant("ERR-modify-ctrlr-scope", None, 1573)
prop._addConstant("ERR-modify-ctrlr-trig-inventory", None, 1577)
prop._addConstant("ERR-modify-domain", None, 1563)
prop._addConstant("ERR-modify-domain-encapmode", None, 1581)
prop._addConstant("ERR-modify-domain-enfpref", None, 1578)
prop._addConstant("ERR-modify-domain-mcastpool", None, 1579)
prop._addConstant("ERR-modify-domain-mode", None, 1580)
prop._addConstant("ERR-modify-role", None, 1527)
prop._addConstant("ERR-modify-user", None, 1525)
prop._addConstant("ERR-modify-user-domain", None, 1565)
prop._addConstant("ERR-modify-user-role", None, 1532)
prop._addConstant("ERR-no-buf", None, 1570)
prop._addConstant("ERR-passwd-set-failure", None, 1566)
prop._addConstant("ERR-provider-group-modify-error", None, 1519)
prop._addConstant("ERR-provider-group-set-error", None, 1512)
prop._addConstant("ERR-radius-global-set-error", None, 1505)
prop._addConstant("ERR-radius-group-set-error", None, 1501)
prop._addConstant("ERR-radius-set-error", None, 1504)
prop._addConstant("ERR-request-timeout", None, 1545)
prop._addConstant("ERR-role-set-error", None, 1515)
prop._addConstant("ERR-secondary-node", None, 1550)
prop._addConstant("ERR-service-not-ready", None, 1539)
prop._addConstant("ERR-set-password-strength-check", None, 1543)
prop._addConstant("ERR-store-pre-login-banner-msg", None, 1521)
prop._addConstant("ERR-tacacs-enable-error", None, 1508)
prop._addConstant("ERR-tacacs-global-set-error", None, 1507)
prop._addConstant("ERR-tacacs-group-set-error", None, 1503)
prop._addConstant("ERR-tacacs-set-error", None, 1506)
prop._addConstant("ERR-user-account-expired", None, 1536)
prop._addConstant("ERR-user-set-error", None, 1517)
prop._addConstant("ERR-xml-parse-error", None, 1547)
prop._addConstant("communication-error", "communication-error", 1)
prop._addConstant("none", "none", 0)
meta.props.add("invErrCode", prop)
prop = PropMeta("str", "invErrDescr", "invErrDescr", 50, PropCategory.REGULAR)
prop.label = "Remote Error Description"
prop.isImplicit = True
prop.isAdmin = True
prop.range = [(0, 128)]
prop.regex = ['[a-zA-Z0-9\\!#$%()*,-./:;@ _{|}~?&+]+']
meta.props.add("invErrDescr", prop)
prop = PropMeta("str", "invRslt", "invRslt", 48, PropCategory.REGULAR)
prop.label = "Remote Result"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = 0
prop.defaultValueStr = "not-applicable"
prop._addConstant("capability-not-implemented-failure", "capability-not-implemented-failure", 16384)
prop._addConstant("capability-not-implemented-ignore", "capability-not-implemented-ignore", 8192)
prop._addConstant("capability-not-supported", "capability-not-supported", 32768)
prop._addConstant("capability-unavailable", "capability-unavailable", 65536)
prop._addConstant("end-point-failed", "end-point-failed", 32)
prop._addConstant("end-point-protocol-error", "end-point-protocol-error", 64)
prop._addConstant("end-point-unavailable", "end-point-unavailable", 16)
prop._addConstant("extend-timeout", "extend-timeout", 134217728)
prop._addConstant("failure", "failure", 1)
prop._addConstant("fru-identity-indeterminate", "fru-identity-indeterminate", 4194304)
prop._addConstant("fru-info-malformed", "fru-info-malformed", 8388608)
prop._addConstant("fru-not-ready", "fru-not-ready", 67108864)
prop._addConstant("fru-not-supported", "fru-not-supported", 536870912)
prop._addConstant("fru-state-indeterminate", "fru-state-indeterminate", 33554432)
prop._addConstant("fw-defect", "fw-defect", 256)
prop._addConstant("hw-defect", "hw-defect", 512)
prop._addConstant("illegal-fru", "illegal-fru", 16777216)
prop._addConstant("intermittent-error", "intermittent-error", 1073741824)
prop._addConstant("internal-error", "internal-error", 4)
prop._addConstant("not-applicable", "not-applicable", 0)
prop._addConstant("resource-capacity-exceeded", "resource-capacity-exceeded", 2048)
prop._addConstant("resource-dependency", "resource-dependency", 4096)
prop._addConstant("resource-unavailable", "resource-unavailable", 1024)
prop._addConstant("service-not-implemented-fail", "service-not-implemented-fail", 262144)
prop._addConstant("service-not-implemented-ignore", "service-not-implemented-ignore", 131072)
prop._addConstant("service-not-supported", "service-not-supported", 524288)
prop._addConstant("service-protocol-error", "service-protocol-error", 2097152)
prop._addConstant("service-unavailable", "service-unavailable", 1048576)
prop._addConstant("sw-defect", "sw-defect", 128)
prop._addConstant("task-reset", "task-reset", 268435456)
prop._addConstant("timeout", "timeout", 8)
prop._addConstant("unidentified-fail", "unidentified-fail", 2)
meta.props.add("invRslt", prop)
prop = PropMeta("str", "lcOwn", "lcOwn", 9, PropCategory.REGULAR)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = 0
prop.defaultValueStr = "local"
prop._addConstant("implicit", "implicit", 4)
prop._addConstant("local", "local", 0)
prop._addConstant("policy", "policy", 1)
prop._addConstant("replica", "replica", 2)
prop._addConstant("resolveOnBehalf", "resolvedonbehalf", 3)
meta.props.add("lcOwn", prop)
prop = PropMeta("str", "modTs", "modTs", 7, PropCategory.REGULAR)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = 0
prop.defaultValueStr = "never"
prop._addConstant("never", "never", 0)
meta.props.add("modTs", prop)
prop = PropMeta("str", "oDn", "oDn", 51, PropCategory.REGULAR)
prop.label = "Subject DN"
prop.isImplicit = True
prop.isAdmin = True
meta.props.add("oDn", prop)
prop = PropMeta("str", "operSt", "operSt", 15674, PropCategory.REGULAR)
prop.label = "Completion"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = 0
prop.defaultValueStr = "scheduled"
prop._addConstant("cancelled", "cancelled", 3)
prop._addConstant("completed", "completed", 2)
prop._addConstant("crashsuspect", "crash-suspect", 7)
prop._addConstant("failed", "failed", 4)
prop._addConstant("indeterminate", "indeterminate", 5)
prop._addConstant("processing", "processing", 1)
prop._addConstant("ready", "ready", 8)
prop._addConstant("scheduled", "scheduled", 0)
prop._addConstant("suspended", "suspended", 6)
meta.props.add("operSt", prop)
prop = PropMeta("str", "originMinority", "originMinority", 54, PropCategory.REGULAR)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = False
prop.defaultValueStr = "no"
prop._addConstant("no", None, False)
prop._addConstant("yes", None, True)
meta.props.add("originMinority", prop)
prop = PropMeta("str", "rn", "rn", 2, PropCategory.RN)
prop.label = "None"
prop.isRn = True
prop.isImplicit = True
prop.isAdmin = True
prop.isCreateOnly = True
meta.props.add("rn", prop)
prop = PropMeta("str", "runId", "runId", 45, PropCategory.REGULAR)
prop.label = "ID"
prop.isImplicit = True
prop.isAdmin = True
meta.props.add("runId", prop)
prop = PropMeta("str", "startTs", "startTs", 36, PropCategory.REGULAR)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = 0
prop.defaultValueStr = "never"
prop._addConstant("never", "never", 0)
meta.props.add("startTs", prop)
prop = PropMeta("str", "status", "status", 3, PropCategory.STATUS)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop._addConstant("created", "created", 2)
prop._addConstant("deleted", "deleted", 8)
prop._addConstant("modified", "modified", 4)
meta.props.add("status", prop)
prop = PropMeta("str", "try", "try", 15574, PropCategory.REGULAR)
prop.label = "Try"
prop.isImplicit = True
prop.isAdmin = True
meta.props.add("try", prop)
prop = PropMeta("str", "ts", "ts", 47, PropCategory.REGULAR)
prop.label = "None"
prop.isImplicit = True
prop.isAdmin = True
prop.defaultValue = 0
prop.defaultValueStr = "never"
prop._addConstant("never", "never", 0)
meta.props.add("ts", prop)
meta.namingProps.append(getattr(meta.props, "id"))
def __init__(self, parentMoOrDn, id, markDirty=True, **creationProps):
namingVals = [id]
Mo.__init__(self, parentMoOrDn, markDirty, *namingVals, **creationProps)
# End of package file
# ##################################################
|
[
"collinsctk@qytang.com"
] |
collinsctk@qytang.com
|
f282c11daf075504bc04c5b5e1c3abc69fdfe691
|
ac52ef481402457c9c967d8ed4930fb3c0b8cbdf
|
/projects/models.py
|
3d6cc872327ba8e52a849e8ad74a268deee9e644
|
[] |
no_license
|
ShakeelAhmad3/My_Portfolio
|
7a2e0f5991b25edb3d9f805effca88c24030a399
|
346ac5599b458d06735fec1af76c7d023e50190a
|
refs/heads/master
| 2023-09-02T17:31:00.809363
| 2021-11-20T11:31:27
| 2021-11-20T11:31:27
| 428,708,268
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 344
|
py
|
from django.db import models
# Create your models here.
class projects(models.Model):
title = models.CharField(max_length= 250)
body = models.TextField()
image = models.ImageField(upload_to='media/')
summary = models.CharField(max_length=250)
bub_date = models.DateField()
def __str__(self):
return self.title
|
[
"buneeri020@gmail.com"
] |
buneeri020@gmail.com
|
4dacaa30f927134d67f697ebba2cba98678ea517
|
efbcdc04e5d2d5917328e23f62f0e2b3b585d393
|
/neuron/analog2digital/soma_mt.py
|
00beb221c13630b51bd31d82783f2be5ac20ea72
|
[] |
no_license
|
satya-arjunan/spatiocyte-models
|
7e43457a170348638998a1382410c00e2d091cd6
|
b5c29b6be758e971ba016d0334670c2afafd2c31
|
refs/heads/master
| 2021-01-17T00:39:29.965797
| 2018-09-06T07:46:17
| 2018-09-06T07:46:17
| 11,064,813
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 20,501
|
py
|
import numpy as np
import math
volumes = [5.8822e-18]
T = 540000
#nKinesin = 35*2.258e-17/volumes[0]
nKinesin = 100
pPlusEnd_Detach = 1
VoxelRadius = 0.8e-8
nNeurite = 5
nNeuriteMT = 5
EdgeSpace = VoxelRadius*5
neuriteRadius = 0.2e-6
MTRadius = 12.5e-9
KinesinRadius = 0.4e-8
Filaments = 13
neuriteSpace = neuriteRadius*2
somaLength = nNeurite*neuriteRadius*2+neuriteSpace*(nNeurite+1)
somaWidth = somaLength
somaHeight = neuriteRadius*4
inSomaLength = VoxelRadius*6
neuriteLengths = np.empty((nNeurite))
neuriteLengths.fill(5e-6+inSomaLength)
neuriteLengths[0] = 25e-6
neuriteLengths[1] = 20e-6
neuriteLengths[2] = 15e-6
neuriteLengths[3] = 10e-6
neuriteLengths[4] = 5e-6
rootSpace = VoxelRadius*20
rootLengths = np.empty((1,3))
rootLengths = (somaWidth+np.amax(neuriteLengths)-inSomaLength+rootSpace*2,
somaLength+rootSpace*2, somaHeight+rootSpace*2)
neuriteOrigins = np.zeros((nNeurite, 3))
halfRootLengths = np.divide(rootLengths, 2.0)
somaOrigin = np.zeros((nNeurite, 3))
somaOrigin = (rootSpace+somaWidth/2, rootSpace+somaLength/2,
rootSpace+somaHeight/2)
with np.errstate(divide='ignore', invalid='ignore'):
somaOrigin = np.divide(np.subtract(somaOrigin, halfRootLengths),
halfRootLengths)
somaOrigin[somaOrigin == np.inf] = 0
somaOrigin = np.nan_to_num(somaOrigin)
for i in range(nNeurite):
neuriteOrigins[i] = np.array([rootSpace+somaWidth+(neuriteLengths[i]-
inSomaLength)/2,
rootSpace+neuriteSpace+i*(neuriteRadius*2+neuriteSpace)+neuriteRadius,
rootSpace+somaHeight/2])
with np.errstate(divide='ignore', invalid='ignore'):
neuriteOrigins[i] = np.divide(np.subtract(neuriteOrigins[i],
halfRootLengths), halfRootLengths)
neuriteOrigins[i][neuriteOrigins[i] == np.inf] = 0
neuriteOrigins[i] = np.nan_to_num(neuriteOrigins[i])
def rotatePointAlongVector(P, C, N, angle):
x = P[0]
y = P[1]
z = P[2]
a = C[0]
b = C[1]
c = C[2]
u = N[0]
v = N[1]
w = N[2]
u2 = u*u
v2 = v*v
w2 = w*w
cosT = math.cos(angle)
oneMinusCosT = 1-cosT
sinT = math.sin(angle)
xx = (a*(v2+w2)-u*(b*v+c*w-u*x-v*y-w*z))*oneMinusCosT+x*cosT+(
-c*v+b*w-w*y+v*z)*sinT
yy = (b*(u2+w2)-v*(a*u+c*w-u*x-v*y-w*z))*oneMinusCosT+y*cosT+(
c*u-a*w+w*x-u*z)*sinT
zz = (c*(u2+v2)-w*(a*u+b*v-u*x-v*y-w*z))*oneMinusCosT+z*cosT+(
-b*u+a*v-v*x+u*y)*sinT
return [xx, yy, zz]
MTLengths = np.zeros(nNeurite)
for i in range(len(neuriteLengths)):
MTLengths[i] = neuriteLengths[i]-2*EdgeSpace
MTsOriginX = np.zeros((nNeurite, nNeuriteMT))
MTsOriginY = np.zeros((nNeurite, nNeuriteMT))
MTsOriginZ = np.zeros((nNeurite, nNeuriteMT))
for i in range(nNeurite):
if(nNeuriteMT == 1):
MTsOriginX[i][0] = 0.0
MTsOriginY[i][0] = 0.0
MTsOriginZ[i][0] = 0.0
elif(nNeuriteMT == 2):
space = (neuriteRadii[i]*2-MTRadius*2*2)/(2+2)
MTsOriginY[i][0] = -1+(space+MTRadius)/neuriteRadii[i]
MTsOriginY[i][1] = 1-(space+MTRadius)/neuriteRadii[i]
elif(nNeuriteMT == 3):
y = neuriteRadii[i]*math.cos(math.pi/3)
y2 = y*math.cos(math.pi/3)
z = y*math.sin(math.pi/3)
MTsOriginY[i][0] = y/neuriteRadii[i]
MTsOriginY[i][1] = -y2/neuriteRadii[i]
MTsOriginZ[i][1] = -z/neuriteRadii[i]
MTsOriginY[i][2] = -y2/neuriteRadii[i]
MTsOriginZ[i][2] = z/neuriteRadii[i]
elif(nNeuriteMT == 4):
space = (neuriteRadius*2-MTRadius*2*2)/(2+3)
MTsOriginY[i][0] = -1+(space+MTRadius)/neuriteRadii[i]
MTsOriginY[i][1] = 1-(space+MTRadius)/neuriteRadii[i]
space = (neuriteRadius*2-MTRadius*2*2)/(2+3)
MTsOriginZ[i][2] = -1+(space+MTRadius)/neuriteRadii[i]
MTsOriginZ[i][3] = 1-(space+MTRadius)/neuriteRadii[i]
else:
MTsOriginY[i][0] = 2*2.0/6;
P = [0.0, MTsOriginY[i][0], 0.0]
C = [0.0, 0.0, 0.0]
N = [1.0, 0.0, 0.0]
angle = 2*math.pi/(nNeuriteMT-1)
for j in range(nNeuriteMT-2):
P = rotatePointAlongVector(P, C, N, angle);
MTsOriginX[i][j+1] = P[0]
MTsOriginY[i][j+1] = P[1]
MTsOriginZ[i][j+1] = P[2]
sim = theSimulator
s = sim.createStepper('SpatiocyteStepper', 'SS')
s.VoxelRadius = VoxelRadius
s.SearchVacant = 1
s.RemoveSurfaceBias = 1
sim.rootSystem.StepperID = 'SS'
sim.createEntity('Variable', 'Variable:/:LENGTHX').Value = rootLengths[0]
sim.createEntity('Variable', 'Variable:/:LENGTHY').Value = rootLengths[1]
sim.createEntity('Variable', 'Variable:/:LENGTHZ').Value = rootLengths[2]
sim.createEntity('Variable', 'Variable:/:VACANT')
#sim.createEntity('System', 'System:/:Surface').StepperID = 'SS'
#sim.createEntity('Variable', 'Variable:/Surface:DIMENSION').Value = 2
#sim.createEntity('Variable', 'Variable:/Surface:VACANT')
sim.createEntity('System', 'System:/:Soma').StepperID = 'SS'
sim.createEntity('Variable', 'Variable:/Soma:GEOMETRY').Value = 0
sim.createEntity('Variable', 'Variable:/Soma:LENGTHX').Value = somaWidth
sim.createEntity('Variable', 'Variable:/Soma:LENGTHY').Value = somaLength
sim.createEntity('Variable', 'Variable:/Soma:LENGTHZ').Value = somaHeight
sim.createEntity('Variable', 'Variable:/Soma:ORIGINX').Value = somaOrigin[0]
sim.createEntity('Variable', 'Variable:/Soma:ORIGINY').Value = somaOrigin[1]
sim.createEntity('Variable', 'Variable:/Soma:ORIGINZ').Value = somaOrigin[2]
sim.createEntity('Variable', 'Variable:/Soma:VACANT').Value = -1
sim.createEntity('System', 'System:/Soma:Surface').StepperID = 'SS'
sim.createEntity('Variable', 'Variable:/Soma/Surface:DIMENSION').Value = 2
sim.createEntity('Variable', 'Variable:/Soma/Surface:VACANT')
for i in range(nNeurite):
sim.createEntity('System', 'System:/:Neurite%d' %i).StepperID = 'SS'
sim.createEntity('Variable', 'Variable:/Neurite%d:GEOMETRY' %i).Value = 2
x = sim.createEntity('Variable', 'Variable:/Neurite%d:LENGTHX' %i)
x.Value = neuriteLengths[i]
y = sim.createEntity('Variable', 'Variable:/Neurite%d:LENGTHY' %i)
y.Value = neuriteRadius*2
x = sim.createEntity('Variable', 'Variable:/Neurite%d:ORIGINX' %i)
x.Value = neuriteOrigins[i][0]
y = sim.createEntity('Variable', 'Variable:/Neurite%d:ORIGINY' %i)
y.Value = neuriteOrigins[i][1]
sim.createEntity('Variable', 'Variable:/Neurite%d:ORIGINZ' %i).Value = 0
sim.createEntity('Variable', 'Variable:/Neurite%d:VACANT' %i)
d = sim.createEntity('Variable', 'Variable:/Neurite%d:DIFFUSIVE' %i)
d.Name = '/:Soma'
# Create the neurite membrane:
sim.createEntity('System', 'System:/Neurite%d:Surface' %i).StepperID = 'SS'
sim.createEntity('Variable',
'Variable:/Neurite%d/Surface:DIMENSION' %i).Value = 2
sim.createEntity('Variable', 'Variable:/Neurite%d/Surface:VACANT' %i)
sim.createEntity('Variable',
'Variable:/Neurite%d/Surface:DIFFUSIVE' %i).Name = '/Soma:Surface'
for j in range(nNeuriteMT):
m = sim.createEntity('MicrotubuleProcess',
'Process:/Neurite%d:Microtubule%d' %(i, j))
m.OriginX = MTsOriginX[i][j]
m.OriginY = MTsOriginY[i][j]
m.OriginZ = MTsOriginZ[i][j]
m.RotateX = 0
m.RotateY = 0
m.RotateZ = 0
m.Radius = MTRadius
m.SubunitRadius = KinesinRadius
m.Length = MTLengths[i]
m.Filaments = Filaments
m.Periodic = 0
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF' ]]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP' ]]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP' ]]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF' ]]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF_ATP' ]]
m.VariableReferenceList = [['_', 'Variable:/Soma:aTUB']]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB', '-1']]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_M', '-2']]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P', '-3']]
nSomaMT = 16
mtSpaceY = somaLength/(nSomaMT)
for i in range(nSomaMT):
for j in range(3):
OriginZ = 0.0
if(j != 0):
if(j == 1):
OriginZ = 0.5
else:
OriginZ = -0.5
m = theSimulator.createEntity('MicrotubuleProcess',
'Process:/Soma:Microtubule%d%d' %(i,j))
m.OriginX = 0
m.OriginY = (mtSpaceY/2+i*mtSpaceY)/(somaLength/2)-1
m.OriginZ = OriginZ
m.RotateX = 0
m.RotateY = 0
m.RotateZ = 0
m.Radius = MTRadius
m.SubunitRadius = KinesinRadius
m.Length = somaWidth*0.8
m.Filaments = Filaments
m.Periodic = 0
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF' ]]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP' ]]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP' ]]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF' ]]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF_ATP' ]]
m.VariableReferenceList = [['_', 'Variable:/Soma:aTUB']]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB', '-1']]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_M', '-2']]
m.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P', '-3']]
sim.createEntity('Variable', 'Variable:/Soma:KIF').Value = nKinesin
sim.createEntity('Variable', 'Variable:/Soma:TUB_GTP' ).Value = 0
sim.createEntity('Variable', 'Variable:/Soma:TUB_KIF' ).Value = 0
sim.createEntity('Variable', 'Variable:/Soma:TUB_KIF_ATP' ).Value = 0
sim.createEntity('Variable', 'Variable:/Soma:TUB_GTP_KIF' ).Value = 0
sim.createEntity('Variable', 'Variable:/Soma:TUB_GTP_KIF_ATP' ).Value = 0
sim.createEntity('Variable', 'Variable:/Soma:aTUB' ).Value = 0
sim.createEntity('Variable', 'Variable:/Soma:TUB' ).Value = 0
sim.createEntity('Variable', 'Variable:/Soma:TUB_M' ).Value = 0
sim.createEntity('Variable', 'Variable:/Soma:TUB_P' ).Value = 0
v = sim.createEntity('VisualizationLogProcess', 'Process:/Soma:v')
#v.VariableReferenceList = [['_', 'Variable:/Soma:TUB']]
v.VariableReferenceList = [['_', 'Variable:/Soma:aTUB']]
v.VariableReferenceList = [['_', 'Variable:/Soma:TUB_M']]
v.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P']]
v.VariableReferenceList = [['_', 'Variable:/Soma:KIF']]
v.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF' ]]
v.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP' ]]
v.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF' ]]
v.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF_ATP' ]]
v.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP']]
#v.VariableReferenceList = [['_', 'Variable:/Soma/Surface:VACANT']]
#v.VariableReferenceList = [['_', 'Variable:/Soma/Membrane:PlusSensor']]
#v.VariableReferenceList = [['_', 'Variable:/Soma/Membrane:MinusSensor']]
v.LogInterval = 10
#Populate-----------------------------------------------------------------------
#p = sim.createEntity('MoleculePopulateProcess', 'Process:/Soma:pPlusSensor')
#p.VariableReferenceList = [['_', 'Variable:/Soma/Membrane:PlusSensor']]
#p.EdgeX = 1
#
#p = sim.createEntity('MoleculePopulateProcess', 'Process:/Soma:pMinusSensor')
#p.VariableReferenceList = [['_', 'Variable:/Soma/Membrane:MinusSensor']]
#p.EdgeX = -1
p = sim.createEntity('MoleculePopulateProcess', 'Process:/Soma:pTUB_KIF')
p.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF']]
#p = sim.createEntity('MoleculePopulateProcess', 'Process:/Soma:pTUB_GTP')
#p.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP']]
#p.LengthBinFractions = [1, 0.3, 0.8]
#p.Priority = 100 #set high priority for accurate fraction
p = sim.createEntity('MoleculePopulateProcess', 'Process:/Soma:pKIF')
p.VariableReferenceList = [['_', 'Variable:/Soma:KIF']]
#-------------------------------------------------------------------------------
#Cytosolic KIF recruitment to microtubule---------------------------------------
r = sim.createEntity('DiffusionInfluencedReactionProcess', 'Process:/Soma:b1')
r.VariableReferenceList = [['_', 'Variable:/Soma:KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF','1']]
r.p = 0.0001
r = sim.createEntity('DiffusionInfluencedReactionProcess', 'Process:/Soma:b2')
r.VariableReferenceList = [['_', 'Variable:/Soma:KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF','1']]
r.p = 0
r = sim.createEntity('DiffusionInfluencedReactionProcess', 'Process:/Soma:b3')
r.VariableReferenceList = [['_', 'Variable:/Soma:KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:aTUB','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF','1']]
r.p = 0.9
#-------------------------------------------------------------------------------
#MT KIF detachment to cytosol---------------------------------------------------
r = sim.createEntity('SpatiocyteNextReactionProcess', 'Process:/Soma:detach')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:aTUB','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:KIF','1']]
r.SearchVacant = 1
r.k = 15
r = sim.createEntity('SpatiocyteNextReactionProcess', 'Process:/Soma:detachGTP')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF_ATP','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:KIF','1']]
r.SearchVacant = 1
r.k = 15
#-------------------------------------------------------------------------------
#Active tubulin inactivation----------------------------------------------------
r = sim.createEntity('SpatiocyteNextReactionProcess', 'Process:/Soma:i1')
r.VariableReferenceList = [['_', 'Variable:/Soma:aTUB','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB','1']]
r.k = 0.055
#-------------------------------------------------------------------------------
#MT KIF detachment to cytosol at plus end---------------------------------------
r = sim.createEntity('DiffusionInfluencedReactionProcess', 'Process:/Soma:p1')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF_ATP','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:KIF','1']]
r.p = pPlusEnd_Detach
r = sim.createEntity('DiffusionInfluencedReactionProcess', 'Process:/Soma:p2')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:KIF','1']]
r.p = pPlusEnd_Detach
r = sim.createEntity('DiffusionInfluencedReactionProcess', 'Process:/Soma:p3')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:KIF','1']]
r.p = pPlusEnd_Detach
r = sim.createEntity('DiffusionInfluencedReactionProcess', 'Process:/Soma:p4')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_P','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:KIF','1']]
r.p = pPlusEnd_Detach
#-------------------------------------------------------------------------------
#KIF ATP hydrolysis-------------------------------------------------------------
r = sim.createEntity('SpatiocyteNextReactionProcess', 'Process:/Soma:h1')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF','1']]
r.SearchVacant = 1
r.k = 100
r = sim.createEntity('SpatiocyteNextReactionProcess', 'Process:/Soma:h2')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF_ATP','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF','1']]
r.SearchVacant = 1
r.k = 100
#-------------------------------------------------------------------------------
#KIF ADP phosphorylation--------------------------------------------------------
r = sim.createEntity('SpatiocyteNextReactionProcess', 'Process:/Soma:phos1')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP','1']]
r.SearchVacant = 1
r.k = 145
r = sim.createEntity('SpatiocyteNextReactionProcess', 'Process:/Soma:phos2')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF_ATP','1']]
r.SearchVacant = 1
r.k = 145
#-------------------------------------------------------------------------------
#KIF ratchet biased walk_-------------------------------------------------------
r = sim.createEntity('SpatiocyteNextReactionProcess', 'Process:/Soma:rat1')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:aTUB','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB','0']] #If BindingSite[1]==TUB
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP','1']] #option 1
r.VariableReferenceList = [['_', 'Variable:/Soma:aTUB','0']] #Elif BindingSite[1]==TUB_GTP
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP','1']] #option 2
r.BindingSite = 1
r.k = 55
#r = sim.createEntity('SpatiocyteNextReactionProcess', 'Process:/Soma:rat1')
#r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF','-1']]
#r.VariableReferenceList = [['_', 'Variable:/Soma:aTUB','1']]
#r.VariableReferenceList = [['_', 'Variable:/Soma:TUB','0']] #If BindingSite[1]==TUB
#r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP','1']] #option 1
#r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','0']] #Elif BindingSite[1]==TUB_GTP
#r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF_ATP','1']] #option 2
#r.BindingSite = 1
#r.k = 55
r = sim.createEntity('SpatiocyteNextReactionProcess', 'Process:/Soma:rat2')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF','-1']] #A
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','1']] #C
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB','0']] #E
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF_ATP','1']] #D
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','0']] #H
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF_ATP','1']] #F
r.BindingSite = 1
r.k = 55
#-------------------------------------------------------------------------------
#KIF random walk between GTP and GDP tubulins-----------------------------------
r = sim.createEntity('DiffusionInfluencedReactionProcess', 'Process:/Soma:w1')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF','1']]
r.ForcedSequence = 1
r.p = 1
r = sim.createEntity('DiffusionInfluencedReactionProcess', 'Process:/Soma:w2')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF','1']]
r.ForcedSequence = 1
r.p = 1
r = sim.createEntity('DiffusionInfluencedReactionProcess', 'Process:/Soma:w3')
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP','-1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB','1']]
r.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF','1']]
r.ForcedSequence = 1
r.p = 1
#-------------------------------------------------------------------------------
#KIF normal diffusion-----------------------------------------------------------
d = sim.createEntity('DiffusionProcess', 'Process:/Soma:dKIF')
d.VariableReferenceList = [['_', 'Variable:/Soma:KIF']]
d.D = 0.5e-12
d = sim.createEntity('DiffusionProcess', 'Process:/Soma:dTUB_KIF')
d.VariableReferenceList = [['_', 'Variable:/Soma:TUB_KIF']]
d.VariableReferenceList = [['_', 'Variable:/Soma:aTUB', '1']]
d.D = 0.04e-12
d = sim.createEntity('DiffusionProcess', 'Process:/Soma:dTUB_GTP_KIF')
d.VariableReferenceList = [['_', 'Variable:/Soma:TUB_GTP_KIF']]
d.WalkReact = 1
d.D = 0.04e-12
#-------------------------------------------------------------------------------
run(T)
|
[
"satya.arjunan@gmail.com"
] |
satya.arjunan@gmail.com
|
824d42429d0f17582b537a3d9045cc15c2c88584
|
78ec5fbacb0a22842e510eca0d8cf76fbb677af3
|
/api_example/languages/urls.py
|
7a8ac1f4e794e5ee0cd0d1868b639302e10ab3ba
|
[] |
no_license
|
FAVORK/Django-Rest
|
c7302843dff46fcdb339246fcc06c095dda8f1eb
|
8ec7411aa8972a7910dc06da424446cd4f08273f
|
refs/heads/master
| 2020-12-02T20:09:35.184824
| 2019-12-31T15:11:54
| 2019-12-31T15:11:54
| 231,105,640
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 230
|
py
|
from django.urls import path, include
from . import views
from rest_framework import routers
router = routers.DefaultRouter()
router.register('languages', views.LanguageView)
urlpatterns = [
path('', include(router.urls)),
]
|
[
"kamaukdan@gmail.com"
] |
kamaukdan@gmail.com
|
774b67059eddcf1cedf719cb61af7c2ced0de7fa
|
8ecf4930f9aa90c35e5199d117068b64a8d779dd
|
/TopQuarkAnalysis/SingleTop/test/crabs44/SingleTopMC_TTBarQ2upFall11_cfg.py
|
da0b2fabbd1a6100f2c5fce7261928493357cfcf
|
[] |
no_license
|
fabozzi/ST_44
|
178bd0829b1aff9d299528ba8e85dc7b7e8dd216
|
0becb8866a7c758d515e70ba0b90c99f6556fef3
|
refs/heads/master
| 2021-01-20T23:27:07.398661
| 2014-04-14T15:12:32
| 2014-04-14T15:12:32
| 18,765,529
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 13,424
|
py
|
import FWCore.ParameterSet.Config as cms
process = cms.Process("SingleTop")
ChannelName = "TTBarQ2up";
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.options = cms.untracked.PSet(
wantSummary = cms.untracked.bool(True),
FailPath = cms.untracked.vstring('ProductNotFound','Type Mismatch')
)
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
#from PhysicsTools.PatAlgos.tools.cmsswVersionTools import run36xOn35xInput
# conditions ------------------------------------------------------------------
print "test "
#process.load("Configuration.StandardSequences.MixingNoPileUp_cff")
process.load("Configuration.StandardSequences.Geometry_cff")
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
process.load("Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff") ### real data
#process.GlobalTag.globaltag = cms.string('START42_V17::All')
process.GlobalTag.globaltag = cms.string('START44_V13::All')
#from Configuration.PyReleaseValidation.autoCond import autoCond
#process.GlobalTag.globaltag = autoCond['startup']
process.load("TopQuarkAnalysis.SingleTop.SingleTopSequences_cff")
process.load("SelectionCuts_Skim_cff");################<----------
#From <<ysicsTools.PatAlgos.tools.cmsswVersionTools import *
#larlaun42xOn3yzMcInput(process)
#run36xOn35xInput(process)
# Get a list of good primary vertices, in 42x, these are DAF vertices
from PhysicsTools.SelectorUtils.pvSelector_cfi import pvSelector
process.goodOfflinePrimaryVertices = cms.EDFilter(
"PrimaryVertexObjectFilter",
filterParams = pvSelector.clone( minNdof = cms.double(4.0), maxZ = cms.double(24.0) ),
src=cms.InputTag('offlinePrimaryVertices')
)
# require physics declared
process.load('HLTrigger.special.hltPhysicsDeclared_cfi')
process.hltPhysicsDeclared.L1GtReadoutRecordTag = 'gtDigis'
#dummy output
process.out = cms.OutputModule("PoolOutputModule",
fileName = cms.untracked.string('dummy.root'),
outputCommands = cms.untracked.vstring(""),
)
#rocess.load("PhysicsTools.HepMCCandAlgos.flavorHistoryPaths_cfi")
#mytrigs=["HLT_Mu9"]
mytrigs=["*"]
from HLTrigger.HLTfilters.hltHighLevel_cfi import *
#if mytrigs is not None :
# process.hltSelection = hltHighLevel.clone(TriggerResultsTag = 'TriggerResults::HLT', HLTPaths = mytrigs)
# process.hltSelection.throw = False
#
# getattr(process,"pfNoElectron"+postfix)*process.kt6PFJets
# set the dB to the beamspot
process.patMuons.usePV = cms.bool(False)
process.patElectrons.usePV = cms.bool(False)
#inputJetCorrLabel = ('AK5PFchs', ['L1FastJet', 'L2Relative', 'L3Absolute'])
# Configure PAT to use PF2PAT instead of AOD sources
# this function will modify the PAT sequences. It is currently
# not possible to run PF2PAT+PAT and standart PAT at the same time
from PhysicsTools.PatAlgos.tools.pfTools import *
from PhysicsTools.PatAlgos.tools.trigTools import *
postfix = ""
#usePF2PAT(process,runPF2PAT=True, jetAlgo='AK5', runOnMC=True, postfix=postfix, jetCorrections = inputJetCorrLabel)
usePF2PAT(process,runPF2PAT=True, jetAlgo='AK5', runOnMC=True, postfix=postfix)
switchOnTriggerMatchEmbedding(process,triggerMatchers = ['PatJetTriggerMatchHLTIsoMuBTagIP','PatJetTriggerMatchHLTIsoEleBTagIP'])
process.pfPileUp.Enable = True
process.pfPileUp.checkClosestZVertex = cms.bool(False)
process.pfPileUp.Vertices = cms.InputTag('goodOfflinePrimaryVertices')
process.pfJets.doAreaFastjet = True
process.pfJets.doRhoFastjet = False
#process.pfJets.Rho_EtaMax = cms.double(4.4)
#Compute the mean pt per unit area (rho) from the
#PFchs inputs
from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
process.kt6PFJets = kt4PFJets.clone(
rParam = cms.double(0.6),
src = cms.InputTag('pfNoElectron'+postfix),
doAreaFastjet = cms.bool(True),
doRhoFastjet = cms.bool(True),
# voronoiRfact = cms.double(0.9),
# Rho_EtaMax = cms.double(4.4)
)
process.patJetCorrFactors.rho = cms.InputTag("kt6PFJets", "rho")
coneOpening = cms.double(0.4)
defaultIsolationCut = cms.double(0.2)
#coneOpening = process.coneOpening
#defaultIsolationCut = process.coneOpening
#Muons
#applyPostfix(process,"isoValMuonWithNeutral",postfix).deposits[0].deltaR = coneOpening
#applyPostfix(process,"isoValMuonWithCharged",postfix).deposits[0].deltaR = coneOpening
#applyPostfix(process,"isoValMuonWithPhotons",postfix).deposits[0].deltaR = coneOpening
#electrons
#applyPostfix(process,"isoValElectronWithNeutral",postfix).deposits[0].deltaR = coneOpening
#applyPostfix(process,"isoValElectronWithCharged",postfix).deposits[0].deltaR = coneOpening
#applyPostfix(process,"isoValElectronWithPhotons",postfix).deposits[0].deltaR = coneOpening
applyPostfix(process,"pfIsolatedMuons",postfix).combinedIsolationCut = defaultIsolationCut
applyPostfix(process,"pfIsolatedElectrons",postfix).combinedIsolationCut = defaultIsolationCut
#applyPostfix(process,"pfIsolatedMuons",postfix).combinedIsolationCut = cms.double(0.125)
#applyPostfix(process,"pfIsolatedElectrons",postfix).combinedIsolationCut = cms.double(0.125)
#postfixQCD = "ZeroIso"
# Add the PV selector and KT6 producer to the sequence
getattr(process,"patPF2PATSequence"+postfix).replace(
getattr(process,"pfNoElectron"+postfix),
getattr(process,"pfNoElectron"+postfix)*process.kt6PFJets )
#Residuals (Data)
#process.patPFJetMETtype1p2Corr.jetCorrLabel = 'L2L3Residual'
process.patseq = cms.Sequence(
# process.patElectronIDs +
process.goodOfflinePrimaryVertices *
process.patElectronIDs *
getattr(process,"patPF2PATSequence"+postfix) #*
# process.producePatPFMETCorrections
# getattr(process,"patPF2PATSequence"+postfixQCD)
)
process.pfIsolatedMuonsZeroIso = process.pfIsolatedMuons.clone(combinedIsolationCut = cms.double(float("inf")))
process.patMuonsZeroIso = process.patMuons.clone(pfMuonSource = cms.InputTag("pfIsolatedMuonsZeroIso"), genParticleMatch = cms.InputTag("muonMatchZeroIso"))
# use pf isolation, but do not change matching
tmp = process.muonMatch.src
adaptPFMuons(process, process.patMuonsZeroIso, "")
process.muonMatch.src = tmp
process.muonMatchZeroIso = process.muonMatch.clone(src = cms.InputTag("pfIsolatedMuonsZeroIso"))
process.pfIsolatedElectronsZeroIso = process.pfIsolatedElectrons.clone(combinedIsolationCut = cms.double(float("inf")))
process.patElectronsZeroIso = process.patElectrons.clone(pfElectronSource = cms.InputTag("pfIsolatedElectronsZeroIso"))
#####################
#Adaptpfelectrons (process, process.patElectronsZeroIso, "")
#Add the PF type 1 corrections to MET
#process.load("PhysicsTools.PatUtils.patPFMETCorrections_cff")
#process.selectedPatJetsForMETtype1p2Corr.src = cms.InputTag('selectedPatJets')
#process.selectedPatJetsForMETtype2Corr.src = cms.InputTag('selectedPatJets')
#process.patPFJetMETtype1p2Corr.type1JetPtThreshold = cms.double(10.0)
#process.patPFJetMETtype1p2Corr.skipEM = cms.bool(False)
#process.patPFJetMETtype1p2Corr.skipMuons = cms.bool(False)
#process.patPF2PATSequence.remove(process.patPF2PATSequence.FastjetJetProducer)
process.pathPreselection = cms.Path(
process.patseq #+ process.producePatPFMETCorrections
)
process.ZeroIsoLeptonSequence = cms.Path(
process.pfIsolatedMuonsZeroIso +
process.muonMatchZeroIso +
process.patMuonsZeroIso +
process.pfIsolatedElectronsZeroIso +
process.patElectronsZeroIso
)
#process.looseLeptonSequence.remove(process.muonMatchLoose)
#getattr(process,"pfNoPileUp"+postfix).enable = True
#getattr(process,"pfNoMuon"+postfix).enable = True
#getattr(process,"pfNoElectron"+postfix).enable = True
#getattr(process,"pfNoTau"+postfix).enable = False
#Getattr (process,"pfNoJet"+postfix).enable = True
process.pfNoTau.enable = False
#process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000) )
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.source = cms.Source ("PoolSource",
fileNames = cms.untracked.vstring (
#'file:/tmp/oiorio/F81B1889-AF4B-DF11-85D3-001A64789DF4.root'
#'file:/tmp/oiorio/EC0EE286-FA55-E011-B99B-003048F024F6.root'
#'file:/tmp/oiorio/D0B32FD9-6D87-E011-8572-003048678098.root'
#'file:/tmp/oiorio/149E3017-B799-E011-9FA9-003048F118C2.root'
#'file:/tmp/oiorio/FE4EF257-A3AB-E011-9698-00304867915A.root',
#'file:/tmp/oiorio/50A31B1A-8AAB-E011-835B-0026189438F5.root'
#'file:/tmp/oiorio/TTJetsLocalFall11.root',
#'file:/tmp/oiorio/',
#'file:/tmp/oiorio/00012F91-72E5-DF11-A763-00261834B5F1.root',
#'/store/mc/Fall11/T_TuneZ2_t-channel_7TeV-powheg-tauola/AODSIM/PU_S6_START44_V9B-v1/0000/CA7C6394-CE32-E111-9125-003048FFD796.root'
#'/store/mc/Fall11/Tbar_TuneZ2_t-channel_7TeV-powheg-tauola/AODSIM/PU_S6_START44_V9B-v1/0000/B81B1A7D-6E2A-E111-A1C1-0018F3D096EC.root'
#'/store/mc/Fall11/T_TuneZ2_t-channel_7TeV-powheg-tauola/AODSIM/PU_S6_START44_V9B-v1/0000/DE6B0050-3133-E111-B437-003048FFD736.root'
#'/store/mc/Fall11/T_TuneZ2_s-channel_7TeV-powheg-tauola/AODSIM/PU_S6_START44_V9B-v1/0000/440369A6-A23C-E111-9B5B-E0CB4E19F9AF.root'
#'file:/afs/cern.ch/work/m/mmerola/FC1035C0-2E32-E111-86D1-001A92971BD6_tchannelFall11_44X.root'
),
#eventsToProcess = cms.untracked.VEventRange('1:2807840-1:2807840'),
duplicateCheckMode = cms.untracked.string('noDuplicateCheck')
)
#process.TFileService = cms.Service("TFileService", fileName = cms.string("/tmp/oiorio/"+ChannelName+"_pt_bmode.root"))
process.TFileService = cms.Service("TFileService", fileName = cms.string("pileupdistr_"+ChannelName+".root"))
process.pileUpDumper = cms.EDAnalyzer("SingleTopPileUpDumper",
channel = cms.string(ChannelName),
)
#process.WLightFilter = process.flavorHistoryFilter.clone(pathToSelect = cms.int32(11))
#process.WccFlter = process.flavorHistoryFilter.clone(pathToSelect = cms.int32(6))
#process.WbbFilter = process.flavorHistoryFilter.clone(pathToSelect = cms.int32(5))
#process.hltFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","REDIGI38X")
#process.hltFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","REDIGI37X")
#process.hltFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","REDIGI")
#process.hltFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","REDIGI311X")
#process.hltFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","HLT")
process.hltFilter.TriggerResultsTag = cms.InputTag("TriggerResults","","HLT")
process.hltFilter.HLTPaths = mytrigs
process.countLeptons.doQCD = cms.untracked.bool(False)
process.baseLeptonSequence = cms.Path(
# process.pileUpDumper +
process.basePath
)
process.selection = cms.Path (
process.preselection +
process.nTuplesSkim
)
from TopQuarkAnalysis.SingleTop.SingleTopNtuplizers_cff import saveNTuplesSkimLoose
from TopQuarkAnalysis.SingleTop.SingleTopNtuplizers_cff import saveNTuplesSkimMu
savePatTupleSkimLoose = cms.untracked.vstring(
'drop *',
'keep patMuons_selectedPatMuons_*_*',
'keep patElectrons_selectedPatElectrons_*_*',
'keep patJets_selectedPatJets_*_*',
'keep patMETs_patMETs_*_*',
'keep *_patPFMet_*_*',
'keep *_patType1CorrectedPFMet_*_*',
'keep *_PVFilterProducer_*_*',
'keep patJets_selectedPatJetsTriggerMatch_*_*',
"keep *_TriggerResults_*_*",#Trigger results
"keep *_PatJetTriggerMatchHLTIsoMuBTagIP_*_*",#Trigger matches
"keep *_patTrigger_*_*",
"keep *_patTriggerEvent_*_*",
'keep *_pfJets_*_*',
'keep patJets_topJetsPF_*_*',
'keep patMuons_looseMuons_*_*',
'keep patElectrons_looseElectrons_*_*',
'keep patMuons_tightMuons_*_*',
'keep patElectrons_tightElectrons_*_*',
'keep *_PDFInfo_*_*',
'keep *_patElectronsZeroIso_*_*',
'keep *_patMuonsZeroIso_*_*',
'keep *_PVFilterProducer_*_*',
'keep *_cFlavorHistoryProducer_*_*',
'keep *_bFlavorHistoryProducer_*_*',
)
## Output module configuration
process.singleTopNTuple = cms.OutputModule("PoolOutputModule",
# fileName = cms.untracked.string('rfio:/CST/cern.ch/user/o/oiorio/SingleTop/SubSkims/WControlSamples1.root'),
# fileName = cms.untracked.Bstring('/tmp/oiorio/edmntuple_tchannel_big.root'),
# fileName = cms.untracked.string('/tmp/oiorio/edmntuple_'+ChannelName+'.root'),
fileName = cms.untracked.string('edmntuple_'+ChannelName+'.root'),
SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('selection')),
outputCommands = saveNTuplesSkimLoose,
)
process.singleTopPatTuple = cms.OutputModule("PoolOutputModule",
# fileName = cms.untracked.string('rfio:/CST/cern.ch/user/o/oiorio/SingleTop/SubSkims/WControlSamples1.root'),
fileName = cms.untracked.string('pattuple_'+ChannelName+'.root'),
SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('selection')),
outputCommands = savePatTupleSkimLoose
)
process.singleTopNTuple.dropMetaData = cms.untracked.string("ALL")
process.outpath = cms.EndPath(
process.singleTopNTuple #+
# process.singleTopPatTuple
)
|
[
"Francesco.Fabozzi@cern.ch"
] |
Francesco.Fabozzi@cern.ch
|
90bb35f751c04a00431dcc41c19d92be007cb65d
|
731a33f8bb92bad31ab233416d8ef6eb3a9f3fe0
|
/minlplib_instances/smallinvSNPr2b020-022.py
|
8348bb9863905664e9dffb15877a5b89b31156af
|
[] |
no_license
|
ChristophNeumann/IPCP
|
d34c7ec3730a5d0dcf3ec14f023d4b90536c1e31
|
6e3d14cc9ed43f3c4f6c070ebbce21da5a059cb7
|
refs/heads/main
| 2023-02-22T09:54:39.412086
| 2021-01-27T17:30:50
| 2021-01-27T17:30:50
| 319,694,028
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 167,363
|
py
|
# MINLP written by GAMS Convert at 02/15/18 11:44:29
#
# Equation counts
# Total E G L N X C B
# 4 0 2 2 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc si
# Total cont binary integer sos1 sos2 scont sint
# 101 1 0 100 0 0 0 0
# FX 0 0 0 0 0 0 0 0
#
# Nonzero counts
# Total const NL DLL
# 401 301 100 0
from pyomo.environ import *
model = m = ConcreteModel()
m.i1 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i2 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i3 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i4 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i5 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i6 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i7 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i8 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i9 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i10 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i11 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i12 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i13 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i14 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i15 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i16 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i17 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i18 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i19 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i20 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i21 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i22 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i23 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i24 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i25 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i26 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i27 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i28 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i29 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i30 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i31 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i32 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i33 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i34 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i35 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i36 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i37 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i38 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i39 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i40 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i41 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i42 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i43 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i44 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i45 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i46 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i47 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i48 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i49 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i50 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i51 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i52 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i53 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i54 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i55 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i56 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i57 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i58 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i59 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i60 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i61 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i62 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i63 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i64 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i65 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i66 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i67 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i68 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i69 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i70 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i71 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i72 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i73 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i74 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i75 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i76 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i77 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i78 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i79 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i80 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i81 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i82 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i83 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i84 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i85 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i86 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i87 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i88 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i89 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i90 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i91 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i92 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i93 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i94 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i95 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i96 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i97 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i98 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i99 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.i100 = Var(within=Integers,bounds=(0,1E20),initialize=0)
m.x101 = Var(within=Reals,bounds=(None,None),initialize=0)
m.obj = Objective(expr=m.x101, sense=minimize)
m.c1 = Constraint(expr=0.00841507*m.i1**2 + 0.0222536*m.i2**2 + 0.0056479*m.i3**2 + 0.00333322*m.i4**2 + 0.00490963*m.i5
**2 + 0.0221034*m.i6**2 + 0.00509899*m.i7**2 + 0.049464*m.i8**2 + 0.0171508*m.i9**2 + 0.0064643*
m.i10**2 + 0.0218437*m.i11**2 + 0.00346366*m.i12**2 + 0.0458502*m.i13**2 + 0.0747061*m.i14**2 +
0.0196511*m.i15**2 + 0.014222*m.i16**2 + 0.0147535*m.i17**2 + 0.00398615*m.i18**2 + 0.00644484*
m.i19**2 + 0.0322232*m.i20**2 + 0.00887889*m.i21**2 + 0.0434025*m.i22**2 + 0.00981376*m.i23**2 +
0.0133193*m.i24**2 + 0.00471036*m.i25**2 + 0.00359843*m.i26**2 + 0.0112312*m.i27**2 + 0.00476479*
m.i28**2 + 0.00356255*m.i29**2 + 0.0730121*m.i30**2 + 0.00785721*m.i31**2 + 0.0243787*m.i32**2 +
0.0171188*m.i33**2 + 0.00439547*m.i34**2 + 0.00502594*m.i35**2 + 0.0580619*m.i36**2 + 0.0135984*
m.i37**2 + 0.00254137*m.i38**2 + 0.0153341*m.i39**2 + 0.109758*m.i40**2 + 0.0346065*m.i41**2 +
0.0127589*m.i42**2 + 0.011147*m.i43**2 + 0.0156318*m.i44**2 + 0.00556588*m.i45**2 + 0.00302864*
m.i46**2 + 0.0214898*m.i47**2 + 0.00499587*m.i48**2 + 0.00864393*m.i49**2 + 0.0228248*m.i50**2 +
0.0077726*m.i51**2 + 0.00992767*m.i52**2 + 0.0184506*m.i53**2 + 0.0113481*m.i54**2 + 0.0067583*
m.i55**2 + 0.0150416*m.i56**2 + 0.00324193*m.i57**2 + 0.00478196*m.i58**2 + 0.0132471*m.i59**2 +
0.00273446*m.i60**2 + 0.0282459*m.i61**2 + 0.0230221*m.i62**2 + 0.0240972*m.i63**2 + 0.00829946*
m.i64**2 + 0.00688665*m.i65**2 + 0.00858803*m.i66**2 + 0.00778038*m.i67**2 + 0.0082583*m.i68**2
+ 0.022885*m.i69**2 + 0.00568332*m.i70**2 + 0.0234021*m.i71**2 + 0.00924249*m.i72**2 +
0.00669675*m.i73**2 + 0.0109501*m.i74**2 + 0.00663385*m.i75**2 + 0.00328058*m.i76**2 + 0.0112814*
m.i77**2 + 0.00341076*m.i78**2 + 0.0400653*m.i79**2 + 0.00876827*m.i80**2 + 0.0138276*m.i81**2 +
0.00246987*m.i82**2 + 0.0406516*m.i83**2 + 0.00947194*m.i84**2 + 0.00647449*m.i85**2 + 0.0107715*
m.i86**2 + 0.00803069*m.i87**2 + 0.106502*m.i88**2 + 0.00815263*m.i89**2 + 0.0171707*m.i90**2 +
0.0163522*m.i91**2 + 0.00911726*m.i92**2 + 0.00287317*m.i93**2 + 0.00360309*m.i94**2 + 0.00699161
*m.i95**2 + 0.0340959*m.i96**2 + 0.00958446*m.i97**2 + 0.0147951*m.i98**2 + 0.0177595*m.i99**2 +
0.0208523*m.i100**2 + 0.00692522*m.i1*m.i2 + 0.00066464*m.i1*m.i3 + 0.00388744*m.i1*m.i4 +
0.001108218*m.i1*m.i5 + 0.0046712*m.i1*m.i6 + 0.00771824*m.i1*m.i7 + 0.0020653*m.i1*m.i8 +
0.001524626*m.i1*m.i9 + 0.00484724*m.i1*m.i10 + 0.00733242*m.i1*m.i11 + 0.00556218*m.i1*m.i12 +
0.0052571*m.i1*m.i13 + 0.0218926*m.i1*m.i14 + 0.01352862*m.i1*m.i15 + 0.00549784*m.i1*m.i16 +
0.00235342*m.i1*m.i17 + 0.00448206*m.i1*m.i18 + 0.0072148*m.i1*m.i19 + 0.00958894*m.i1*m.i20 +
0.00376328*m.i1*m.i21 + 0.0117501*m.i1*m.i22 + 0.00575998*m.i1*m.i23 - 0.000109147*m.i1*m.i24 +
0.000604944*m.i1*m.i25 + 0.00473296*m.i1*m.i26 + 0.000356572*m.i1*m.i27 - 0.001552262*m.i1*m.i28
+ 0.00119092*m.i1*m.i29 + 0.01373684*m.i1*m.i30 + 0.0059113*m.i1*m.i31 + 0.00623524*m.i1*m.i32
+ 0.00801204*m.i1*m.i33 + 0.00108736*m.i1*m.i34 + 0.001491474*m.i1*m.i35 + 0.01080356*m.i1*m.i36
+ 0.00559202*m.i1*m.i37 + 7.8057e-6*m.i1*m.i38 + 0.00831004*m.i1*m.i39 + 0.001096208*m.i1*m.i40
+ 0.001136658*m.i1*m.i41 + 0.0073715*m.i1*m.i42 + 0.000726938*m.i1*m.i43 + 0.00621872*m.i1*m.i44
+ 0.00646596*m.i1*m.i45 + 0.00441466*m.i1*m.i46 + 0.001262528*m.i1*m.i47 + 0.00567366*m.i1*m.i48
+ 0.00690472*m.i1*m.i49 + 0.01140754*m.i1*m.i50 + 0.00275514*m.i1*m.i51 + 0.00633434*m.i1*m.i52
+ 0.00842252*m.i1*m.i53 + 0.00674544*m.i1*m.i54 + 0.00577156*m.i1*m.i55 + 0.000723972*m.i1*m.i56
+ 0.00617654*m.i1*m.i57 + 0.00426758*m.i1*m.i58 + 0.00581362*m.i1*m.i59 + 0.00305964*m.i1*m.i60
+ 0.00915838*m.i1*m.i61 + 0.00408204*m.i1*m.i62 + 0.00526036*m.i1*m.i63 + 0.00641708*m.i1*m.i64
+ 0.001311362*m.i1*m.i65 + 0.00589896*m.i1*m.i66 + 0.001450664*m.i1*m.i67 + 0.0054669*m.i1*m.i68
+ 0.00759698*m.i1*m.i69 + 0.0069591*m.i1*m.i70 + 0.0023689*m.i1*m.i71 + 0.0026146*m.i1*m.i72 +
0.00520422*m.i1*m.i73 + 0.00959956*m.i1*m.i74 + 0.00799166*m.i1*m.i75 + 0.00256248*m.i1*m.i76 +
0.01210352*m.i1*m.i77 + 0.00469514*m.i1*m.i78 + 0.00329676*m.i1*m.i79 + 0.0068214*m.i1*m.i80 +
0.00190637*m.i1*m.i81 + 0.00256972*m.i1*m.i82 - 0.00577696*m.i1*m.i83 + 0.00245394*m.i1*m.i84 +
0.00585966*m.i1*m.i85 + 0.00330078*m.i1*m.i86 + 0.00362852*m.i1*m.i87 + 0.0064137*m.i1*m.i88 +
0.00375038*m.i1*m.i89 + 0.00666048*m.i1*m.i90 + 0.00942176*m.i1*m.i91 + 0.00379828*m.i1*m.i92 +
0.00246526*m.i1*m.i93 + 0.0029997*m.i1*m.i94 + 0.00592606*m.i1*m.i95 + 0.0136565*m.i1*m.i96 +
0.00562112*m.i1*m.i97 + 0.0031101*m.i1*m.i98 + 0.00328418*m.i1*m.i99 + 0.00992138*m.i1*m.i100 +
0.01159836*m.i2*m.i3 + 0.00432612*m.i2*m.i4 + 0.01055774*m.i2*m.i5 + 0.0235592*m.i2*m.i6 +
0.0053913*m.i2*m.i7 + 0.01748966*m.i2*m.i8 + 0.01322526*m.i2*m.i9 + 0.01103896*m.i2*m.i10 +
0.001420928*m.i2*m.i11 + 0.00303766*m.i2*m.i12 + 0.0325414*m.i2*m.i13 + 0.0528886*m.i2*m.i14 +
0.0344486*m.i2*m.i15 + 0.01889664*m.i2*m.i16 + 0.01085498*m.i2*m.i17 + 0.01133696*m.i2*m.i18 +
0.0105108*m.i2*m.i19 + 0.041965*m.i2*m.i20 + 0.01908526*m.i2*m.i21 + 0.0438608*m.i2*m.i22 +
0.01760436*m.i2*m.i23 + 0.0177692*m.i2*m.i24 + 0.01401386*m.i2*m.i25 + 0.01130076*m.i2*m.i26 +
0.0201926*m.i2*m.i27 + 0.00893526*m.i2*m.i28 + 0.01013464*m.i2*m.i29 + 0.0522552*m.i2*m.i30 +
0.00674062*m.i2*m.i31 + 0.0386894*m.i2*m.i32 + 0.01840562*m.i2*m.i33 + 0.0079061*m.i2*m.i34 +
0.01050574*m.i2*m.i35 + 0.038882*m.i2*m.i36 + 0.0209782*m.i2*m.i37 + 0.00569346*m.i2*m.i38 +
0.0259324*m.i2*m.i39 + 0.0472088*m.i2*m.i40 + 0.0282636*m.i2*m.i41 + 0.0225892*m.i2*m.i42 +
0.01104052*m.i2*m.i43 + 0.0218496*m.i2*m.i44 + 0.00682534*m.i2*m.i45 + 0.01022898*m.i2*m.i46 +
0.0273094*m.i2*m.i47 + 0.01045064*m.i2*m.i48 + 0.01767338*m.i2*m.i49 + 0.0311902*m.i2*m.i50 +
0.0126455*m.i2*m.i51 + 0.0206168*m.i2*m.i52 + 0.0261894*m.i2*m.i53 + 0.024527*m.i2*m.i54 +
0.01734138*m.i2*m.i55 + 0.01224052*m.i2*m.i56 + 0.01152072*m.i2*m.i57 + 0.01028864*m.i2*m.i58 +
0.01883544*m.i2*m.i59 + 0.00908648*m.i2*m.i60 + 0.0449708*m.i2*m.i61 + 0.0363664*m.i2*m.i62 +
0.01577062*m.i2*m.i63 + 0.01266282*m.i2*m.i64 + 0.01385216*m.i2*m.i65 + 0.00440902*m.i2*m.i66 +
0.01711764*m.i2*m.i67 + 0.0110787*m.i2*m.i68 + 0.0341778*m.i2*m.i69 + 0.0156542*m.i2*m.i70 +
0.01891112*m.i2*m.i71 + 0.0216326*m.i2*m.i72 + 0.01534328*m.i2*m.i73 + 0.01661334*m.i2*m.i74 +
0.01534594*m.i2*m.i75 + 0.01116732*m.i2*m.i76 + 0.01402982*m.i2*m.i77 + 0.00963242*m.i2*m.i78 +
0.0200668*m.i2*m.i79 + 0.01379116*m.i2*m.i80 + 0.01910046*m.i2*m.i81 + 0.0077605*m.i2*m.i82 -
0.000954558*m.i2*m.i83 + 0.01255918*m.i2*m.i84 + 0.0126639*m.i2*m.i85 + 0.0201936*m.i2*m.i86 +
0.017931*m.i2*m.i87 + 0.0389418*m.i2*m.i88 + 0.00845916*m.i2*m.i89 + 0.0267914*m.i2*m.i90 +
0.0193905*m.i2*m.i91 + 0.01261014*m.i2*m.i92 + 0.0069012*m.i2*m.i93 + 0.00876014*m.i2*m.i94 +
0.01829908*m.i2*m.i95 + 0.0373396*m.i2*m.i96 + 0.0211262*m.i2*m.i97 + 0.01549032*m.i2*m.i98 +
0.0247114*m.i2*m.i99 + 0.0324248*m.i2*m.i100 - 0.000720538*m.i3*m.i4 + 0.00453322*m.i3*m.i5 +
0.00638226*m.i3*m.i6 + 0.000938158*m.i3*m.i7 + 0.0035154*m.i3*m.i8 + 0.00681962*m.i3*m.i9 +
0.006345*m.i3*m.i10 + 0.00232904*m.i3*m.i11 - 0.00054599*m.i3*m.i12 + 0.01850556*m.i3*m.i13 +
0.01892336*m.i3*m.i14 + 0.00820906*m.i3*m.i15 + 0.00848796*m.i3*m.i16 + 0.0100743*m.i3*m.i17 +
0.00327798*m.i3*m.i18 + 0.000498452*m.i3*m.i19 + 0.01775572*m.i3*m.i20 + 0.00919688*m.i3*m.i21 +
0.01282772*m.i3*m.i22 + 0.00853066*m.i3*m.i23 + 0.00506148*m.i3*m.i24 + 0.004557*m.i3*m.i25 +
0.001737768*m.i3*m.i26 + 0.00560326*m.i3*m.i27 + 0.00374962*m.i3*m.i28 + 0.000427408*m.i3*m.i29
+ 0.01831098*m.i3*m.i30 + 0.00791496*m.i3*m.i31 + 0.01306*m.i3*m.i32 + 0.0143109*m.i3*m.i33 +
0.00324578*m.i3*m.i34 + 0.00289704*m.i3*m.i35 + 0.01899172*m.i3*m.i36 + 0.00855898*m.i3*m.i37 +
0.000764782*m.i3*m.i38 + 0.01045622*m.i3*m.i39 + 0.0241684*m.i3*m.i40 + 0.01022702*m.i3*m.i41 +
0.0096569*m.i3*m.i42 + 0.00605256*m.i3*m.i43 + 0.0087656*m.i3*m.i44 + 0.00231868*m.i3*m.i45 +
0.003075*m.i3*m.i46 + 0.00904418*m.i3*m.i47 + 0.00346386*m.i3*m.i48 + 0.00970054*m.i3*m.i49 +
0.0107517*m.i3*m.i50 + 0.00833706*m.i3*m.i51 + 0.00601022*m.i3*m.i52 + 0.00885472*m.i3*m.i53 +
0.0087269*m.i3*m.i54 + 0.00799796*m.i3*m.i55 + 0.0077742*m.i3*m.i56 + 0.00233028*m.i3*m.i57 +
0.00392772*m.i3*m.i58 + 0.00960436*m.i3*m.i59 + 0.000506858*m.i3*m.i60 + 0.01485036*m.i3*m.i61 +
0.01172454*m.i3*m.i62 + 0.00763564*m.i3*m.i63 + 0.00510368*m.i3*m.i64 + 0.00739458*m.i3*m.i65 +
0.00321864*m.i3*m.i66 + 0.00506992*m.i3*m.i67 + 0.001582392*m.i3*m.i68 + 0.0133327*m.i3*m.i69 +
0.00346984*m.i3*m.i70 + 0.00591914*m.i3*m.i71 + 0.0050918*m.i3*m.i72 + 0.00762942*m.i3*m.i73 +
0.0072567*m.i3*m.i74 + 0.0028432*m.i3*m.i75 + 0.00258746*m.i3*m.i76 + 0.00665946*m.i3*m.i77 +
0.001559716*m.i3*m.i78 + 0.0114221*m.i3*m.i79 + 0.00359546*m.i3*m.i80 + 0.00675946*m.i3*m.i81 +
0.001328782*m.i3*m.i82 + 0.00450512*m.i3*m.i83 + 0.00859628*m.i3*m.i84 + 0.00541618*m.i3*m.i85 +
0.01126372*m.i3*m.i86 + 0.00604642*m.i3*m.i87 + 0.01802074*m.i3*m.i88 + 0.0056414*m.i3*m.i89 +
0.00952436*m.i3*m.i90 + 0.00568388*m.i3*m.i91 + 0.0086732*m.i3*m.i92 + 0.001482822*m.i3*m.i93 +
0.0026677*m.i3*m.i94 + 0.00675394*m.i3*m.i95 + 0.01169216*m.i3*m.i96 + 0.0076724*m.i3*m.i97 +
0.00761804*m.i3*m.i98 + 0.01192344*m.i3*m.i99 + 0.01326866*m.i3*m.i100 + 0.00169903*m.i4*m.i5 +
0.00300136*m.i4*m.i6 + 0.00385392*m.i4*m.i7 + 0.00382362*m.i4*m.i8 + 0.00575034*m.i4*m.i9 +
0.00125203*m.i4*m.i10 + 0.000828078*m.i4*m.i11 + 0.00404896*m.i4*m.i12 - 0.001180878*m.i4*m.i13
+ 0.00956206*m.i4*m.i14 + 0.00571904*m.i4*m.i15 + 0.0047927*m.i4*m.i16 + 0.001736122*m.i4*m.i17
+ 0.001900434*m.i4*m.i18 + 0.00498296*m.i4*m.i19 + 0.0055112*m.i4*m.i20 + 0.00199047*m.i4*m.i21
+ 0.00302926*m.i4*m.i22 + 0.001107052*m.i4*m.i23 + 0.0032099*m.i4*m.i24 + 0.00202704*m.i4*m.i25
+ 0.0049441*m.i4*m.i26 + 0.00296714*m.i4*m.i27 + 0.001430786*m.i4*m.i28 + 0.00335542*m.i4*m.i29
+ 0.0072271*m.i4*m.i30 + 0.001983328*m.i4*m.i31 + 0.00263338*m.i4*m.i32 + 0.0034098*m.i4*m.i33
+ 0.001978102*m.i4*m.i34 + 0.00248436*m.i4*m.i35 + 0.001037234*m.i4*m.i36 + 0.001931824*m.i4*
m.i37 + 0.00154955*m.i4*m.i38 + 0.00293776*m.i4*m.i39 - 0.01282698*m.i4*m.i40 + 0.001937926*m.i4*
m.i41 + 0.0052959*m.i4*m.i42 + 0.001856036*m.i4*m.i43 + 0.000740384*m.i4*m.i44 + 0.00372246*m.i4*
m.i45 + 0.00362974*m.i4*m.i46 + 0.001687258*m.i4*m.i47 + 0.00297792*m.i4*m.i48 + 0.0024381*m.i4*
m.i49 + 0.00581304*m.i4*m.i50 + 0.000775592*m.i4*m.i51 + 0.00512872*m.i4*m.i52 + 0.00302932*m.i4*
m.i53 + 0.00451004*m.i4*m.i54 + 0.00355054*m.i4*m.i55 + 0.000365898*m.i4*m.i56 + 0.00396452*m.i4*
m.i57 + 0.00218522*m.i4*m.i58 + 0.001602712*m.i4*m.i59 + 0.00378946*m.i4*m.i60 + 0.00528342*m.i4*
m.i61 + 0.00345546*m.i4*m.i62 + 0.0072364*m.i4*m.i63 + 0.00460504*m.i4*m.i64 + 0.00362066*m.i4*
m.i65 + 0.00176825*m.i4*m.i66 + 0.00326082*m.i4*m.i67 + 0.00494324*m.i4*m.i68 + 0.00478058*m.i4*
m.i69 + 0.0047424*m.i4*m.i70 + 0.00406804*m.i4*m.i71 + 0.00356438*m.i4*m.i72 + 0.0039191*m.i4*
m.i73 + 0.00506266*m.i4*m.i74 + 0.005213*m.i4*m.i75 + 0.00334114*m.i4*m.i76 + 0.00410168*m.i4*
m.i77 + 0.00325268*m.i4*m.i78 + 0.000621396*m.i4*m.i79 + 0.00679868*m.i4*m.i80 + 0.001665408*m.i4
*m.i81 + 0.00231708*m.i4*m.i82 - 0.0025243*m.i4*m.i83 + 0.00277762*m.i4*m.i84 + 0.0040202*m.i4*
m.i85 + 0.001500566*m.i4*m.i86 + 0.001680814*m.i4*m.i87 + 0.00640404*m.i4*m.i88 + 0.00397656*m.i4
*m.i89 + 0.000508164*m.i4*m.i90 + 0.00565534*m.i4*m.i91 + 0.0031999*m.i4*m.i92 + 0.0007233*m.i4*
m.i93 + 0.001347788*m.i4*m.i94 + 0.00386662*m.i4*m.i95 + 0.0056032*m.i4*m.i96 + 0.00392786*m.i4*
m.i97 + 0.0032706*m.i4*m.i98 + 0.000716722*m.i4*m.i99 + 0.00200998*m.i4*m.i100 + 0.00725878*m.i5*
m.i6 + 0.000634496*m.i5*m.i7 + 0.0112129*m.i5*m.i8 + 0.006535*m.i5*m.i9 + 0.0076756*m.i5*m.i10 -
0.00455426*m.i5*m.i11 + 0.001111236*m.i5*m.i12 + 0.01473142*m.i5*m.i13 + 0.01556352*m.i5*m.i14 +
0.00889148*m.i5*m.i15 + 0.00833956*m.i5*m.i16 + 0.01155304*m.i5*m.i17 + 0.0044319*m.i5*m.i18 +
0.0061696*m.i5*m.i19 + 0.01660846*m.i5*m.i20 + 0.00921042*m.i5*m.i21 + 0.01240074*m.i5*m.i22 +
0.00930536*m.i5*m.i23 + 0.00636938*m.i5*m.i24 + 0.00582298*m.i5*m.i25 + 0.00314834*m.i5*m.i26 +
0.00569034*m.i5*m.i27 + 0.00513186*m.i5*m.i28 + 0.00443806*m.i5*m.i29 + 0.01398194*m.i5*m.i30 +
0.00649478*m.i5*m.i31 + 0.01579432*m.i5*m.i32 + 0.00734872*m.i5*m.i33 + 0.0056108*m.i5*m.i34 +
0.00623672*m.i5*m.i35 + 0.01544598*m.i5*m.i36 + 0.01144796*m.i5*m.i37 + 0.0024117*m.i5*m.i38 +
0.00970728*m.i5*m.i39 + 0.0182302*m.i5*m.i40 + 0.00790876*m.i5*m.i41 + 0.00731488*m.i5*m.i42 +
0.00543454*m.i5*m.i43 + 0.00647722*m.i5*m.i44 + 0.0035064*m.i5*m.i45 + 0.00307696*m.i5*m.i46 +
0.00716814*m.i5*m.i47 + 0.001828662*m.i5*m.i48 + 0.00846664*m.i5*m.i49 + 0.01292148*m.i5*m.i50 +
0.0081737*m.i5*m.i51 + 0.00647086*m.i5*m.i52 + 0.00609644*m.i5*m.i53 + 0.00842446*m.i5*m.i54 +
0.00619594*m.i5*m.i55 + 0.01114364*m.i5*m.i56 + 0.00464056*m.i5*m.i57 + 0.00294786*m.i5*m.i58 +
0.01085566*m.i5*m.i59 + 0.00324938*m.i5*m.i60 + 0.01321296*m.i5*m.i61 + 0.00956118*m.i5*m.i62 +
0.00799502*m.i5*m.i63 + 0.00255928*m.i5*m.i64 + 0.00635808*m.i5*m.i65 + 0.00425494*m.i5*m.i66 +
0.00743456*m.i5*m.i67 + 0.003997*m.i5*m.i68 + 0.01327542*m.i5*m.i69 + 0.00624764*m.i5*m.i70 +
0.00544782*m.i5*m.i71 + 0.00583882*m.i5*m.i72 + 0.00712322*m.i5*m.i73 + 0.00675538*m.i5*m.i74 +
0.00471928*m.i5*m.i75 + 0.00331686*m.i5*m.i76 + 0.0064726*m.i5*m.i77 + 0.0043073*m.i5*m.i78 +
0.01376458*m.i5*m.i79 + 0.00590054*m.i5*m.i80 + 0.00544478*m.i5*m.i81 + 0.00433406*m.i5*m.i82 +
0.0018936*m.i5*m.i83 + 0.00732892*m.i5*m.i84 + 0.00654804*m.i5*m.i85 + 0.00769986*m.i5*m.i86 +
0.00924248*m.i5*m.i87 + 0.01858866*m.i5*m.i88 + 0.00588762*m.i5*m.i89 + 0.00671372*m.i5*m.i90 +
0.00513832*m.i5*m.i91 + 0.00597632*m.i5*m.i92 + 0.0033572*m.i5*m.i93 + 0.00718978*m.i5*m.i94 +
0.00692006*m.i5*m.i95 + 0.0082357*m.i5*m.i96 + 0.00798976*m.i5*m.i97 + 0.00578018*m.i5*m.i98 +
0.00997244*m.i5*m.i99 + 0.00861536*m.i5*m.i100 + 0.00682146*m.i6*m.i7 + 0.00318158*m.i6*m.i8 +
0.01402384*m.i6*m.i9 + 0.01146794*m.i6*m.i10 + 0.00514562*m.i6*m.i11 + 0.001749894*m.i6*m.i12 +
0.0349226*m.i6*m.i13 + 0.0204032*m.i6*m.i14 + 0.0257432*m.i6*m.i15 + 0.01758104*m.i6*m.i16 +
0.01908054*m.i6*m.i17 + 0.00928378*m.i6*m.i18 + 0.00320468*m.i6*m.i19 + 0.0315536*m.i6*m.i20 +
0.01792788*m.i6*m.i21 + 0.0231518*m.i6*m.i22 + 0.01485588*m.i6*m.i23 + 0.01959078*m.i6*m.i24 +
0.01015748*m.i6*m.i25 + 0.00771848*m.i6*m.i26 + 0.0203708*m.i6*m.i27 + 0.00861336*m.i6*m.i28 +
0.00733064*m.i6*m.i29 + 0.0211284*m.i6*m.i30 + 0.01136376*m.i6*m.i31 + 0.0298052*m.i6*m.i32 +
0.01763386*m.i6*m.i33 + 0.01196962*m.i6*m.i34 + 0.00970124*m.i6*m.i35 + 0.0426536*m.i6*m.i36 +
0.0162704*m.i6*m.i37 + 0.00511032*m.i6*m.i38 + 0.0211034*m.i6*m.i39 + 0.0536216*m.i6*m.i40 +
0.0314338*m.i6*m.i41 + 0.0212846*m.i6*m.i42 + 0.01544516*m.i6*m.i43 + 0.0203852*m.i6*m.i44 +
0.00711214*m.i6*m.i45 + 0.01012528*m.i6*m.i46 + 0.0378006*m.i6*m.i47 + 0.00769828*m.i6*m.i48 +
0.01043538*m.i6*m.i49 + 0.0235092*m.i6*m.i50 + 0.00574084*m.i6*m.i51 + 0.01540822*m.i6*m.i52 +
0.01066192*m.i6*m.i53 + 0.01947344*m.i6*m.i54 + 0.01212224*m.i6*m.i55 + 0.01841288*m.i6*m.i56 +
0.00863178*m.i6*m.i57 + 0.0123986*m.i6*m.i58 + 0.01033934*m.i6*m.i59 + 0.00473636*m.i6*m.i60 +
0.0271978*m.i6*m.i61 + 0.0244978*m.i6*m.i62 + 0.0206042*m.i6*m.i63 + 0.0123061*m.i6*m.i64 +
0.00969592*m.i6*m.i65 + 0.0105285*m.i6*m.i66 + 0.01296694*m.i6*m.i67 + 0.00467684*m.i6*m.i68 +
0.0206522*m.i6*m.i69 + 0.01181216*m.i6*m.i70 + 0.034569*m.i6*m.i71 + 0.01713412*m.i6*m.i72 +
0.00997084*m.i6*m.i73 + 0.00934556*m.i6*m.i74 + 0.00446476*m.i6*m.i75 + 0.00591468*m.i6*m.i76 +
0.00902732*m.i6*m.i77 + 0.00684842*m.i6*m.i78 + 0.000346556*m.i6*m.i79 + 0.01344964*m.i6*m.i80 +
0.028585*m.i6*m.i81 + 0.00365848*m.i6*m.i82 + 0.0233826*m.i6*m.i83 + 0.01097966*m.i6*m.i84 +
0.01159854*m.i6*m.i85 + 0.0132315*m.i6*m.i86 + 0.00973116*m.i6*m.i87 + 0.01749474*m.i6*m.i88 +
0.00153948*m.i6*m.i89 + 0.01386412*m.i6*m.i90 + 0.01199914*m.i6*m.i91 + 0.0141917*m.i6*m.i92 +
0.001321806*m.i6*m.i93 + 0.00438272*m.i6*m.i94 + 0.01131596*m.i6*m.i95 + 0.01535776*m.i6*m.i96 +
0.01709068*m.i6*m.i97 + 0.024088*m.i6*m.i98 + 0.0176488*m.i6*m.i99 + 0.0244376*m.i6*m.i100 +
0.00488516*m.i7*m.i8 + 0.00626372*m.i7*m.i9 + 0.001990118*m.i7*m.i10 + 0.00360408*m.i7*m.i11 +
0.0044488*m.i7*m.i12 + 0.00345036*m.i7*m.i13 + 0.01022598*m.i7*m.i14 + 0.00914736*m.i7*m.i15 +
0.00744612*m.i7*m.i16 + 0.0041386*m.i7*m.i17 + 0.00439536*m.i7*m.i18 + 0.00478826*m.i7*m.i19 +
0.00946126*m.i7*m.i20 + 0.00383118*m.i7*m.i21 + 0.00577738*m.i7*m.i22 + 0.0023517*m.i7*m.i23 +
0.0050588*m.i7*m.i24 + 0.0021953*m.i7*m.i25 + 0.00304582*m.i7*m.i26 + 0.0025687*m.i7*m.i27 +
0.001019412*m.i7*m.i28 + 0.001803492*m.i7*m.i29 + 0.00840076*m.i7*m.i30 + 0.00405006*m.i7*m.i31
+ 0.00330894*m.i7*m.i32 + 0.00379124*m.i7*m.i33 + 0.00297878*m.i7*m.i34 + 0.00257924*m.i7*m.i35
+ 0.00710268*m.i7*m.i36 + 0.00290856*m.i7*m.i37 + 0.00084645*m.i7*m.i38 + 0.00616224*m.i7*m.i39
+ 0.00012188*m.i7*m.i40 + 0.00931498*m.i7*m.i41 + 0.00783*m.i7*m.i42 + 0.00769852*m.i7*m.i43 +
0.00783756*m.i7*m.i44 + 0.0049081*m.i7*m.i45 + 0.00379762*m.i7*m.i46 + 0.00691856*m.i7*m.i47 +
0.00516014*m.i7*m.i48 + 0.00525658*m.i7*m.i49 + 0.00529626*m.i7*m.i50 + 0.00103022*m.i7*m.i51 +
0.00545452*m.i7*m.i52 + 0.00609146*m.i7*m.i53 + 0.0066465*m.i7*m.i54 + 0.0057959*m.i7*m.i55 +
0.00384568*m.i7*m.i56 + 0.00518642*m.i7*m.i57 + 0.0049888*m.i7*m.i58 + 0.00240984*m.i7*m.i59 +
0.001870666*m.i7*m.i60 + 0.00856542*m.i7*m.i61 + 0.00433228*m.i7*m.i62 + 0.00926318*m.i7*m.i63 +
0.00802564*m.i7*m.i64 + 0.002679*m.i7*m.i65 + 0.00656044*m.i7*m.i66 + 0.00189873*m.i7*m.i67 +
0.00559974*m.i7*m.i68 + 0.0059088*m.i7*m.i69 + 0.00502274*m.i7*m.i70 + 0.00714092*m.i7*m.i71 +
0.00451814*m.i7*m.i72 + 0.0055096*m.i7*m.i73 + 0.0054579*m.i7*m.i74 + 0.00428152*m.i7*m.i75 +
0.00201372*m.i7*m.i76 + 0.00763776*m.i7*m.i77 + 0.001767634*m.i7*m.i78 - 0.00404984*m.i7*m.i79 +
0.00693072*m.i7*m.i80 + 0.00453578*m.i7*m.i81 + 0.001431356*m.i7*m.i82 + 0.001000832*m.i7*m.i83
+ 0.00363592*m.i7*m.i84 + 0.00399748*m.i7*m.i85 + 0.00244412*m.i7*m.i86 - 0.00038172*m.i7*m.i87
+ 0.00670104*m.i7*m.i88 + 0.00351634*m.i7*m.i89 + 0.000192176*m.i7*m.i90 + 0.00766242*m.i7*m.i91
+ 0.00431432*m.i7*m.i92 + 0.00099522*m.i7*m.i93 + 0.00215394*m.i7*m.i94 + 0.00467712*m.i7*m.i95
+ 0.00551306*m.i7*m.i96 + 0.00524514*m.i7*m.i97 + 0.00715168*m.i7*m.i98 + 0.00269474*m.i7*m.i99
+ 0.006577*m.i7*m.i100 + 0.01497394*m.i8*m.i9 + 0.0108969*m.i8*m.i10 + 0.00659842*m.i8*m.i11 +
0.00635336*m.i8*m.i12 + 0.0313098*m.i8*m.i13 + 0.0387588*m.i8*m.i14 + 0.01963812*m.i8*m.i15 +
0.00587206*m.i8*m.i16 + 0.0158028*m.i8*m.i17 + 0.00433344*m.i8*m.i18 + 0.01027216*m.i8*m.i19 +
0.0310764*m.i8*m.i20 + 0.01480666*m.i8*m.i21 + 0.0292324*m.i8*m.i22 + 0.01097454*m.i8*m.i23 +
0.01637932*m.i8*m.i24 + 0.0081932*m.i8*m.i25 + 0.00625414*m.i8*m.i26 + 0.01206926*m.i8*m.i27 +
0.00960586*m.i8*m.i28 + 0.00767454*m.i8*m.i29 + 0.0389634*m.i8*m.i30 + 0.01047056*m.i8*m.i31 +
0.0243166*m.i8*m.i32 + 0.01490526*m.i8*m.i33 + 0.0048023*m.i8*m.i34 + 0.00582726*m.i8*m.i35 +
0.0310084*m.i8*m.i36 + 0.01520046*m.i8*m.i37 + 0.00435652*m.i8*m.i38 + 0.01820518*m.i8*m.i39 +
0.028962*m.i8*m.i40 + 0.0236162*m.i8*m.i41 + 0.0089807*m.i8*m.i42 + 0.01679084*m.i8*m.i43 +
0.01575264*m.i8*m.i44 - 0.00596962*m.i8*m.i45 + 0.0045504*m.i8*m.i46 + 0.0135935*m.i8*m.i47 +
0.00528224*m.i8*m.i48 + 0.01215584*m.i8*m.i49 + 0.01116408*m.i8*m.i50 + 0.00976906*m.i8*m.i51 +
0.01011206*m.i8*m.i52 + 0.0224104*m.i8*m.i53 + 0.01007602*m.i8*m.i54 + 0.01583128*m.i8*m.i55 +
0.00761084*m.i8*m.i56 + 0.00804396*m.i8*m.i57 + 0.01038608*m.i8*m.i58 + 0.01602498*m.i8*m.i59 +
0.00380248*m.i8*m.i60 + 0.0227414*m.i8*m.i61 + 0.0208778*m.i8*m.i62 + 0.01278874*m.i8*m.i63 +
0.00882622*m.i8*m.i64 + 0.01253422*m.i8*m.i65 + 0.00938202*m.i8*m.i66 + 0.0132364*m.i8*m.i67 +
0.00341364*m.i8*m.i68 + 0.0217686*m.i8*m.i69 + 0.01082106*m.i8*m.i70 + 0.0109575*m.i8*m.i71 +
0.01032418*m.i8*m.i72 + 0.01203924*m.i8*m.i73 + 0.01820078*m.i8*m.i74 + 0.00454846*m.i8*m.i75 +
0.00699592*m.i8*m.i76 + 0.017175*m.i8*m.i77 + 0.00418326*m.i8*m.i78 + 0.003044*m.i8*m.i79 +
0.00913958*m.i8*m.i80 + 0.01058642*m.i8*m.i81 + 0.00609436*m.i8*m.i82 + 0.00939194*m.i8*m.i83 +
0.01860882*m.i8*m.i84 + 0.00544766*m.i8*m.i85 + 0.00672898*m.i8*m.i86 + 0.00847128*m.i8*m.i87 +
0.0399532*m.i8*m.i88 + 0.00230258*m.i8*m.i89 + 0.00647968*m.i8*m.i90 + 0.00663734*m.i8*m.i91 +
0.00723392*m.i8*m.i92 + 0.0028363*m.i8*m.i93 + 0.01094692*m.i8*m.i94 + 0.01122622*m.i8*m.i95 +
0.01922686*m.i8*m.i96 + 0.0178042*m.i8*m.i97 + 0.00987488*m.i8*m.i98 + 0.0201768*m.i8*m.i99 +
0.00916962*m.i8*m.i100 + 0.00380196*m.i9*m.i10 + 0.000241806*m.i9*m.i11 + 0.00422182*m.i9*m.i12
+ 0.01745366*m.i9*m.i13 + 0.01560378*m.i9*m.i14 + 0.01797116*m.i9*m.i15 + 0.0104377*m.i9*m.i16
+ 0.01789532*m.i9*m.i17 + 0.0058031*m.i9*m.i18 + 0.00524852*m.i9*m.i19 + 0.0217664*m.i9*m.i20 +
0.0137801*m.i9*m.i21 + 0.00556924*m.i9*m.i22 + 0.00707894*m.i9*m.i23 + 0.00383446*m.i9*m.i24 +
0.00797136*m.i9*m.i25 + 0.00671112*m.i9*m.i26 + 0.00962638*m.i9*m.i27 + 0.00548282*m.i9*m.i28 +
0.00537842*m.i9*m.i29 + 0.01125578*m.i9*m.i30 + 0.01033708*m.i9*m.i31 + 0.01741482*m.i9*m.i32 +
0.01282666*m.i9*m.i33 + 0.00490948*m.i9*m.i34 + 0.00344028*m.i9*m.i35 + 0.01643714*m.i9*m.i36 +
0.00871578*m.i9*m.i37 + 0.002884*m.i9*m.i38 + 0.01596496*m.i9*m.i39 + 0.0171071*m.i9*m.i40 +
0.0282184*m.i9*m.i41 + 0.0157083*m.i9*m.i42 + 0.01908622*m.i9*m.i43 + 0.01887462*m.i9*m.i44 +
0.00621506*m.i9*m.i45 + 0.00706654*m.i9*m.i46 + 0.01685764*m.i9*m.i47 + 0.0046064*m.i9*m.i48 +
0.01393082*m.i9*m.i49 + 0.01366172*m.i9*m.i50 + 0.00974224*m.i9*m.i51 + 0.01117786*m.i9*m.i52 +
0.0105042*m.i9*m.i53 + 0.01603942*m.i9*m.i54 + 0.01154502*m.i9*m.i55 + 0.0187017*m.i9*m.i56 +
0.0063051*m.i9*m.i57 + 0.01180982*m.i9*m.i58 + 0.01148738*m.i9*m.i59 + 0.0045111*m.i9*m.i60 +
0.01782442*m.i9*m.i61 + 0.01261594*m.i9*m.i62 + 0.0275116*m.i9*m.i63 + 0.01370986*m.i9*m.i64 +
0.01301448*m.i9*m.i65 + 0.00909146*m.i9*m.i66 + 0.00880956*m.i9*m.i67 + 0.00542126*m.i9*m.i68 +
0.0173699*m.i9*m.i69 + 0.0063573*m.i9*m.i70 + 0.01464082*m.i9*m.i71 + 0.01030184*m.i9*m.i72 +
0.01342364*m.i9*m.i73 + 0.01050302*m.i9*m.i74 + 0.00580926*m.i9*m.i75 + 0.00669824*m.i9*m.i76 +
0.0154461*m.i9*m.i77 + 0.00331996*m.i9*m.i78 - 0.00117976*m.i9*m.i79 + 0.0134427*m.i9*m.i80 +
0.01200946*m.i9*m.i81 + 0.00261992*m.i9*m.i82 + 0.01802554*m.i9*m.i83 + 0.01281546*m.i9*m.i84 +
0.00817562*m.i9*m.i85 + 0.01353278*m.i9*m.i86 + 0.0065419*m.i9*m.i87 + 0.0287756*m.i9*m.i88 +
0.00438656*m.i9*m.i89 + 0.006514*m.i9*m.i90 + 0.00948704*m.i9*m.i91 + 0.01460712*m.i9*m.i92 +
0.00442406*m.i9*m.i93 + 0.00525338*m.i9*m.i94 + 0.01080594*m.i9*m.i95 + 0.007284*m.i9*m.i96 +
0.01145784*m.i9*m.i97 + 0.01167366*m.i9*m.i98 + 0.01306896*m.i9*m.i99 + 0.01230056*m.i9*m.i100 +
0.00390108*m.i10*m.i11 + 0.00306506*m.i10*m.i12 + 0.0266658*m.i10*m.i13 + 0.027667*m.i10*m.i14 +
0.01278752*m.i10*m.i15 + 0.01031474*m.i10*m.i16 + 0.01126594*m.i10*m.i17 + 0.00489102*m.i10*m.i18
+ 0.00513038*m.i10*m.i19 + 0.01899656*m.i10*m.i20 + 0.01116072*m.i10*m.i21 + 0.0218888*m.i10*
m.i22 + 0.01101148*m.i10*m.i23 + 0.00938786*m.i10*m.i24 + 0.00495956*m.i10*m.i25 + 0.00409492*
m.i10*m.i26 + 0.00774196*m.i10*m.i27 + 0.00563678*m.i10*m.i28 + 0.00452506*m.i10*m.i29 +
0.0234496*m.i10*m.i30 + 0.00879878*m.i10*m.i31 + 0.01816086*m.i10*m.i32 + 0.01204676*m.i10*m.i33
+ 0.00474448*m.i10*m.i34 + 0.00478426*m.i10*m.i35 + 0.0297012*m.i10*m.i36 + 0.0151832*m.i10*
m.i37 + 0.00256504*m.i10*m.i38 + 0.01482468*m.i10*m.i39 + 0.0351312*m.i10*m.i40 + 0.00722204*
m.i10*m.i41 + 0.00911442*m.i10*m.i42 + 0.00459148*m.i10*m.i43 + 0.00643892*m.i10*m.i44 +
0.00232242*m.i10*m.i45 + 0.00525016*m.i10*m.i46 + 0.00918898*m.i10*m.i47 + 0.00604914*m.i10*m.i48
+ 0.00855226*m.i10*m.i49 + 0.01758968*m.i10*m.i50 + 0.00905476*m.i10*m.i51 + 0.0076611*m.i10*
m.i52 + 0.01159398*m.i10*m.i53 + 0.00933998*m.i10*m.i54 + 0.00932956*m.i10*m.i55 + 0.0077777*
m.i10*m.i56 + 0.00585234*m.i10*m.i57 + 0.00494612*m.i10*m.i58 + 0.01267098*m.i10*m.i59 +
0.0025072*m.i10*m.i60 + 0.01652258*m.i10*m.i61 + 0.0113132*m.i10*m.i62 + 0.00647572*m.i10*m.i63
+ 0.00509638*m.i10*m.i64 + 0.00796924*m.i10*m.i65 + 0.00671784*m.i10*m.i66 + 0.00876736*m.i10*
m.i67 + 0.00330284*m.i10*m.i68 + 0.0143256*m.i10*m.i69 + 0.00658518*m.i10*m.i70 + 0.00751304*
m.i10*m.i71 + 0.00447272*m.i10*m.i72 + 0.00707326*m.i10*m.i73 + 0.01022514*m.i10*m.i74 +
0.00629098*m.i10*m.i75 + 0.00437386*m.i10*m.i76 + 0.0069722*m.i10*m.i77 + 0.00631338*m.i10*m.i78
+ 0.01475202*m.i10*m.i79 + 0.00722624*m.i10*m.i80 + 0.00973154*m.i10*m.i81 + 0.00371556*m.i10*
m.i82 + 0.00253096*m.i10*m.i83 + 0.008833*m.i10*m.i84 + 0.00871744*m.i10*m.i85 + 0.0101816*m.i10*
m.i86 + 0.01000738*m.i10*m.i87 + 0.01974334*m.i10*m.i88 + 0.00587674*m.i10*m.i89 + 0.0124516*
m.i10*m.i90 + 0.00915752*m.i10*m.i91 + 0.00913708*m.i10*m.i92 + 0.00200378*m.i10*m.i93 +
0.00536928*m.i10*m.i94 + 0.00823672*m.i10*m.i95 + 0.01736144*m.i10*m.i96 + 0.01105742*m.i10*m.i97
+ 0.01023842*m.i10*m.i98 + 0.01685104*m.i10*m.i99 + 0.01457986*m.i10*m.i100 + 0.000833086*m.i11*
m.i12 + 0.00999478*m.i11*m.i13 + 0.01344484*m.i11*m.i14 + 0.0031808*m.i11*m.i15 + 0.01117228*
m.i11*m.i16 + 0.000697152*m.i11*m.i17 + 0.000585828*m.i11*m.i18 + 0.00585952*m.i11*m.i19 +
0.00859976*m.i11*m.i20 + 0.00502902*m.i11*m.i21 + 0.00447154*m.i11*m.i22 + 0.001969568*m.i11*
m.i23 + 0.0049358*m.i11*m.i24 - 0.00029705*m.i11*m.i25 + 0.0008833*m.i11*m.i26 + 0.00788936*m.i11
*m.i27 + 0.00223564*m.i11*m.i28 - 0.001370818*m.i11*m.i29 + 0.0148367*m.i11*m.i30 + 0.01084338*
m.i11*m.i31 + 0.000606756*m.i11*m.i32 + 0.00591896*m.i11*m.i33 - 0.00408456*m.i11*m.i34 -
0.002724*m.i11*m.i35 + 0.01495302*m.i11*m.i36 + 0.0001528802*m.i11*m.i37 + 0.000200858*m.i11*
m.i38 + 0.00843216*m.i11*m.i39 + 0.01341476*m.i11*m.i40 + 0.01160686*m.i11*m.i41 + 0.00464728*
m.i11*m.i42 + 0.00803576*m.i11*m.i43 + 0.00270742*m.i11*m.i44 - 0.00352162*m.i11*m.i45 +
0.000947796*m.i11*m.i46 + 0.00388898*m.i11*m.i47 + 0.00557236*m.i11*m.i48 + 0.00208008*m.i11*
m.i49 + 0.000931698*m.i11*m.i50 + 0.000654446*m.i11*m.i51 + 0.00650504*m.i11*m.i52 + 0.000501194*
m.i11*m.i53 + 0.00681518*m.i11*m.i54 + 0.00601122*m.i11*m.i55 - 0.00507122*m.i11*m.i56 +
0.000483176*m.i11*m.i57 + 0.00482018*m.i11*m.i58 + 0.0064067*m.i11*m.i59 - 0.000166498*m.i11*
m.i60 + 0.00575774*m.i11*m.i61 + 0.00725456*m.i11*m.i62 + 0.00219412*m.i11*m.i63 + 0.0084673*
m.i11*m.i64 + 0.000333436*m.i11*m.i65 + 0.00655332*m.i11*m.i66 - 0.00257168*m.i11*m.i67 +
0.01199786*m.i11*m.i68 + 0.0059299*m.i11*m.i69 + 0.001843394*m.i11*m.i70 + 0.01060724*m.i11*m.i71
+ 0.00647206*m.i11*m.i72 + 0.00231676*m.i11*m.i73 + 0.00580344*m.i11*m.i74 + 0.00620538*m.i11*
m.i75 - 0.000334258*m.i11*m.i76 + 0.00656424*m.i11*m.i77 - 0.001286316*m.i11*m.i78 + 0.00546106*
m.i11*m.i79 - 0.000202642*m.i11*m.i80 + 0.00426114*m.i11*m.i81 - 0.00204892*m.i11*m.i82 +
0.01117602*m.i11*m.i83 + 0.01034244*m.i11*m.i84 + 0.00449542*m.i11*m.i85 + 0.00797378*m.i11*m.i86
- 0.000792844*m.i11*m.i87 + 0.01939124*m.i11*m.i88 + 0.00432784*m.i11*m.i89 + 0.00204578*m.i11*
m.i90 + 0.021152*m.i11*m.i91 + 0.00283286*m.i11*m.i92 - 0.00407532*m.i11*m.i93 - 0.001198622*
m.i11*m.i94 + 0.0056114*m.i11*m.i95 + 0.00560696*m.i11*m.i96 + 0.00867776*m.i11*m.i97 +
0.01208222*m.i11*m.i98 + 0.00209588*m.i11*m.i99 + 0.0061276*m.i11*m.i100 + 0.00580036*m.i12*m.i13
+ 0.01674486*m.i12*m.i14 + 0.00758412*m.i12*m.i15 + 0.0061097*m.i12*m.i16 + 0.00406024*m.i12*
m.i17 + 0.00246134*m.i12*m.i18 + 0.00422294*m.i12*m.i19 + 0.00359302*m.i12*m.i20 + 0.0027503*
m.i12*m.i21 + 0.01042736*m.i12*m.i22 + 0.001094158*m.i12*m.i23 + 0.00410122*m.i12*m.i24 +
0.0025257*m.i12*m.i25 + 0.00319626*m.i12*m.i26 + 0.00241386*m.i12*m.i27 + 0.001365712*m.i12*m.i28
+ 0.00285332*m.i12*m.i29 + 0.01617908*m.i12*m.i30 + 0.00231724*m.i12*m.i31 + 0.00343892*m.i12*
m.i32 + 0.00256516*m.i12*m.i33 + 0.001014308*m.i12*m.i34 + 0.001643396*m.i12*m.i35 + 0.00879946*
m.i12*m.i36 + 0.00422942*m.i12*m.i37 + 0.001108756*m.i12*m.i38 + 0.0068803*m.i12*m.i39 -
0.00375268*m.i12*m.i40 + 0.0029422*m.i12*m.i41 + 0.00429146*m.i12*m.i42 + 0.00277958*m.i12*m.i43
+ 0.00284814*m.i12*m.i44 + 0.001633544*m.i12*m.i45 + 0.00422296*m.i12*m.i46 + 0.000606884*m.i12*
m.i47 + 0.0041981*m.i12*m.i48 + 0.00378962*m.i12*m.i49 + 0.00842602*m.i12*m.i50 + 0.002132*m.i12*
m.i51 + 0.00482062*m.i12*m.i52 + 0.00806126*m.i12*m.i53 + 0.00387284*m.i12*m.i54 + 0.0039366*
m.i12*m.i55 + 0.000612768*m.i12*m.i56 + 0.0044852*m.i12*m.i57 + 0.00284844*m.i12*m.i58 +
0.00336708*m.i12*m.i59 + 0.0030099*m.i12*m.i60 + 0.00693418*m.i12*m.i61 + 0.0046908*m.i12*m.i62
+ 0.00538386*m.i12*m.i63 + 0.00560854*m.i12*m.i64 + 0.00360994*m.i12*m.i65 + 0.00317544*m.i12*
m.i66 + 0.00443286*m.i12*m.i67 + 0.00420074*m.i12*m.i68 + 0.00506986*m.i12*m.i69 + 0.00415464*
m.i12*m.i70 + 0.00220046*m.i12*m.i71 + 0.00230386*m.i12*m.i72 + 0.00311708*m.i12*m.i73 +
0.00731294*m.i12*m.i74 + 0.0048156*m.i12*m.i75 + 0.00332812*m.i12*m.i76 + 0.00439802*m.i12*m.i77
+ 0.00371872*m.i12*m.i78 + 0.00601328*m.i12*m.i79 + 0.00749754*m.i12*m.i80 + 0.00280082*m.i12*
m.i81 + 0.00202854*m.i12*m.i82 + 0.001389608*m.i12*m.i83 + 0.00387764*m.i12*m.i84 + 0.00354982*
m.i12*m.i85 + 0.00265444*m.i12*m.i86 + 0.0022211*m.i12*m.i87 + 0.00666916*m.i12*m.i88 +
0.00412408*m.i12*m.i89 + 0.00421336*m.i12*m.i90 + 0.00306034*m.i12*m.i91 + 0.00210254*m.i12*m.i92
+ 0.001819242*m.i12*m.i93 + 0.0007903*m.i12*m.i94 + 0.00409078*m.i12*m.i95 + 0.00988156*m.i12*
m.i96 + 0.00522182*m.i12*m.i97 + 0.00482098*m.i12*m.i98 + 0.0042136*m.i12*m.i99 + 0.00408986*
m.i12*m.i100 + 0.0674968*m.i13*m.i14 + 0.0344974*m.i13*m.i15 + 0.0330226*m.i13*m.i16 + 0.0319354*
m.i13*m.i17 + 0.01218366*m.i13*m.i18 + 0.00519196*m.i13*m.i19 + 0.044536*m.i13*m.i20 + 0.0277772*
m.i13*m.i21 + 0.0622606*m.i13*m.i22 + 0.0259408*m.i13*m.i23 + 0.0302608*m.i13*m.i24 + 0.0163455*
m.i13*m.i25 + 0.0077583*m.i13*m.i26 + 0.0227636*m.i13*m.i27 + 0.01173702*m.i13*m.i28 + 0.00769116
*m.i13*m.i29 + 0.0709126*m.i13*m.i30 + 0.01974624*m.i13*m.i31 + 0.0471936*m.i13*m.i32 + 0.0320402
*m.i13*m.i33 + 0.0107856*m.i13*m.i34 + 0.00663924*m.i13*m.i35 + 0.0963608*m.i13*m.i36 + 0.0383208
*m.i13*m.i37 + 0.00629602*m.i13*m.i38 + 0.0436584*m.i13*m.i39 + 0.113305*m.i13*m.i40 + 0.030603*
m.i13*m.i41 + 0.0334486*m.i13*m.i42 + 0.0221094*m.i13*m.i43 + 0.0261022*m.i13*m.i44 + 0.00384036*
m.i13*m.i45 + 0.01393368*m.i13*m.i46 + 0.0390862*m.i13*m.i47 + 0.01408516*m.i13*m.i48 + 0.0200136
*m.i13*m.i49 + 0.0473844*m.i13*m.i50 + 0.0233922*m.i13*m.i51 + 0.0267544*m.i13*m.i52 + 0.0382128*
m.i13*m.i53 + 0.026998*m.i13*m.i54 + 0.0232812*m.i13*m.i55 + 0.0210468*m.i13*m.i56 + 0.01155576*
m.i13*m.i57 + 0.01460704*m.i13*m.i58 + 0.0315638*m.i13*m.i59 + 0.00606798*m.i13*m.i60 + 0.048913*
m.i13*m.i61 + 0.0422528*m.i13*m.i62 + 0.0227364*m.i13*m.i63 + 0.0218176*m.i13*m.i64 + 0.020181*
m.i13*m.i65 + 0.0171918*m.i13*m.i66 + 0.0231896*m.i13*m.i67 + 0.00653966*m.i13*m.i68 + 0.0386908*
m.i13*m.i69 + 0.01310368*m.i13*m.i70 + 0.0233574*m.i13*m.i71 + 0.01370986*m.i13*m.i72 +
0.01644046*m.i13*m.i73 + 0.0239108*m.i13*m.i74 + 0.01209114*m.i13*m.i75 + 0.00733894*m.i13*m.i76
+ 0.01831752*m.i13*m.i77 + 0.01361596*m.i13*m.i78 + 0.0349392*m.i13*m.i79 + 0.01738086*m.i13*
m.i80 + 0.0327952*m.i13*m.i81 + 0.00370036*m.i13*m.i82 + 0.0275306*m.i13*m.i83 + 0.0237408*m.i13*
m.i84 + 0.023854*m.i13*m.i85 + 0.0298082*m.i13*m.i86 + 0.01954408*m.i13*m.i87 + 0.0427146*m.i13*
m.i88 + 0.00800344*m.i13*m.i89 + 0.0379614*m.i13*m.i90 + 0.0237386*m.i13*m.i91 + 0.0280402*m.i13*
m.i92 + 0.00539152*m.i13*m.i93 + 0.00878456*m.i13*m.i94 + 0.0258544*m.i13*m.i95 + 0.0525716*m.i13
*m.i96 + 0.0324866*m.i13*m.i97 + 0.03178*m.i13*m.i98 + 0.0440898*m.i13*m.i99 + 0.0425102*m.i13*
m.i100 + 0.0526828*m.i14*m.i15 + 0.037439*m.i14*m.i16 + 0.0256328*m.i14*m.i17 + 0.0100326*m.i14*
m.i18 + 0.02287*m.i14*m.i19 + 0.05764*m.i14*m.i20 + 0.0305304*m.i14*m.i21 + 0.0790588*m.i14*m.i22
+ 0.0273134*m.i14*m.i23 + 0.0226144*m.i14*m.i24 + 0.01919436*m.i14*m.i25 + 0.01634394*m.i14*
m.i26 + 0.0200216*m.i14*m.i27 + 0.01187024*m.i14*m.i28 + 0.0175096*m.i14*m.i29 + 0.1303416*m.i14*
m.i30 + 0.01783484*m.i14*m.i31 + 0.0483706*m.i14*m.i32 + 0.0389666*m.i14*m.i33 + 0.00488422*m.i14
*m.i34 + 0.01045608*m.i14*m.i35 + 0.0811654*m.i14*m.i36 + 0.0367626*m.i14*m.i37 + 0.00522434*
m.i14*m.i38 + 0.05055*m.i14*m.i39 + 0.0849278*m.i14*m.i40 + 0.0341058*m.i14*m.i41 + 0.029549*
m.i14*m.i42 + 0.0119177*m.i14*m.i43 + 0.034956*m.i14*m.i44 + 0.0084943*m.i14*m.i45 + 0.01853266*
m.i14*m.i46 + 0.01893124*m.i14*m.i47 + 0.0205662*m.i14*m.i48 + 0.0326974*m.i14*m.i49 + 0.0610942*
m.i14*m.i50 + 0.0265816*m.i14*m.i51 + 0.0345152*m.i14*m.i52 + 0.0602904*m.i14*m.i53 + 0.0299894*
m.i14*m.i54 + 0.029724*m.i14*m.i55 + 0.00991024*m.i14*m.i56 + 0.0212834*m.i14*m.i57 + 0.01611994*
m.i14*m.i58 + 0.0349608*m.i14*m.i59 + 0.01544524*m.i14*m.i60 + 0.0660828*m.i14*m.i61 + 0.0517844*
m.i14*m.i62 + 0.0288716*m.i14*m.i63 + 0.02065*m.i14*m.i64 + 0.0285834*m.i14*m.i65 + 0.01348302*
m.i14*m.i66 + 0.0306592*m.i14*m.i67 + 0.01828946*m.i14*m.i68 + 0.0537368*m.i14*m.i69 + 0.0271944*
m.i14*m.i70 + 0.01793364*m.i14*m.i71 + 0.0206146*m.i14*m.i72 + 0.0281438*m.i14*m.i73 + 0.038653*
m.i14*m.i74 + 0.0322466*m.i14*m.i75 + 0.0212534*m.i14*m.i76 + 0.0336072*m.i14*m.i77 + 0.01910646*
m.i14*m.i78 + 0.0653414*m.i14*m.i79 + 0.0269972*m.i14*m.i80 + 0.0273492*m.i14*m.i81 + 0.01038358*
m.i14*m.i82 + 0.00619204*m.i14*m.i83 + 0.0273406*m.i14*m.i84 + 0.0211516*m.i14*m.i85 + 0.0382364*
m.i14*m.i86 + 0.0345294*m.i14*m.i87 + 0.1230516*m.i14*m.i88 + 0.032645*m.i14*m.i89 + 0.0494242*
m.i14*m.i90 + 0.030464*m.i14*m.i91 + 0.0229316*m.i14*m.i92 + 0.01328606*m.i14*m.i93 + 0.01219994*
m.i14*m.i94 + 0.0308436*m.i14*m.i95 + 0.0853596*m.i14*m.i96 + 0.0354032*m.i14*m.i97 + 0.0262134*
m.i14*m.i98 + 0.0473304*m.i14*m.i99 + 0.037143*m.i14*m.i100 + 0.01723066*m.i15*m.i16 + 0.0144032*
m.i15*m.i17 + 0.01011568*m.i15*m.i18 + 0.01071386*m.i15*m.i19 + 0.0363128*m.i15*m.i20 + 0.0200062
*m.i15*m.i21 + 0.0429276*m.i15*m.i22 + 0.01550086*m.i15*m.i23 + 0.01336936*m.i15*m.i24 +
0.01153424*m.i15*m.i25 + 0.01291552*m.i15*m.i26 + 0.01571376*m.i15*m.i27 + 0.0057752*m.i15*m.i28
+ 0.01132328*m.i15*m.i29 + 0.04615*m.i15*m.i30 + 0.0095472*m.i15*m.i31 + 0.0348208*m.i15*m.i32
+ 0.01999334*m.i15*m.i33 + 0.00687142*m.i15*m.i34 + 0.00887602*m.i15*m.i35 + 0.0412134*m.i15*
m.i36 + 0.0222294*m.i15*m.i37 + 0.0044452*m.i15*m.i38 + 0.0275012*m.i15*m.i39 + 0.0449902*m.i15*
m.i40 + 0.0316194*m.i15*m.i41 + 0.021335*m.i15*m.i42 + 0.01203424*m.i15*m.i43 + 0.0250958*m.i15*
m.i44 + 0.00747774*m.i15*m.i45 + 0.01208838*m.i15*m.i46 + 0.0258298*m.i15*m.i47 + 0.01217868*
m.i15*m.i48 + 0.0181139*m.i15*m.i49 + 0.0324096*m.i15*m.i50 + 0.01156602*m.i15*m.i51 + 0.01869794
*m.i15*m.i52 + 0.0276488*m.i15*m.i53 + 0.0230496*m.i15*m.i54 + 0.0171536*m.i15*m.i55 + 0.01527606
*m.i15*m.i56 + 0.01288824*m.i15*m.i57 + 0.014014*m.i15*m.i58 + 0.01657292*m.i15*m.i59 + 0.0080112
*m.i15*m.i60 + 0.0380938*m.i15*m.i61 + 0.0298954*m.i15*m.i62 + 0.0218266*m.i15*m.i63 + 0.01580514
*m.i15*m.i64 + 0.01327226*m.i15*m.i65 + 0.01171988*m.i15*m.i66 + 0.01749552*m.i15*m.i67 +
0.00958228*m.i15*m.i68 + 0.02991*m.i15*m.i69 + 0.01687722*m.i15*m.i70 + 0.0214718*m.i15*m.i71 +
0.0177952*m.i15*m.i72 + 0.01429134*m.i15*m.i73 + 0.01835742*m.i15*m.i74 + 0.014413*m.i15*m.i75 +
0.01215492*m.i15*m.i76 + 0.01888264*m.i15*m.i77 + 0.01135654*m.i15*m.i78 + 0.01419354*m.i15*m.i79
+ 0.01589948*m.i15*m.i80 + 0.01996746*m.i15*m.i81 + 0.00616376*m.i15*m.i82 + 0.00905236*m.i15*
m.i83 + 0.01329424*m.i15*m.i84 + 0.01265054*m.i15*m.i85 + 0.01743812*m.i15*m.i86 + 0.01662354*
m.i15*m.i87 + 0.0326642*m.i15*m.i88 + 0.00648876*m.i15*m.i89 + 0.0255582*m.i15*m.i90 + 0.01710528
*m.i15*m.i91 + 0.01530604*m.i15*m.i92 + 0.00729364*m.i15*m.i93 + 0.00786908*m.i15*m.i94 +
0.0169034*m.i15*m.i95 + 0.034265*m.i15*m.i96 + 0.0206426*m.i15*m.i97 + 0.01574576*m.i15*m.i98 +
0.0251768*m.i15*m.i99 + 0.0302234*m.i15*m.i100 + 0.0180502*m.i16*m.i17 + 0.00797572*m.i16*m.i18
+ 0.00993386*m.i16*m.i19 + 0.0236072*m.i16*m.i20 + 0.01425014*m.i16*m.i21 + 0.0269392*m.i16*
m.i22 + 0.01322908*m.i16*m.i23 + 0.01719786*m.i16*m.i24 + 0.00995474*m.i16*m.i25 + 0.00544834*
m.i16*m.i26 + 0.01319632*m.i16*m.i27 + 0.00695148*m.i16*m.i28 + 0.00568042*m.i16*m.i29 + 0.045082
*m.i16*m.i30 + 0.01190474*m.i16*m.i31 + 0.01955462*m.i16*m.i32 + 0.0138212*m.i16*m.i33 +
0.00642106*m.i16*m.i34 + 0.00665524*m.i16*m.i35 + 0.0380492*m.i16*m.i36 + 0.01602708*m.i16*m.i37
+ 0.00369958*m.i16*m.i38 + 0.0220792*m.i16*m.i39 + 0.0304262*m.i16*m.i40 + 0.01843444*m.i16*
m.i41 + 0.021247*m.i16*m.i42 + 0.01518988*m.i16*m.i43 + 0.01406774*m.i16*m.i44 + 0.0051723*m.i16*
m.i45 + 0.0080675*m.i16*m.i46 + 0.0176419*m.i16*m.i47 + 0.0090298*m.i16*m.i48 + 0.0126196*m.i16*
m.i49 + 0.025967*m.i16*m.i50 + 0.01140228*m.i16*m.i51 + 0.01900414*m.i16*m.i52 + 0.01781402*m.i16
*m.i53 + 0.0194748*m.i16*m.i54 + 0.01211848*m.i16*m.i55 + 0.01166912*m.i16*m.i56 + 0.00870972*
m.i16*m.i57 + 0.00719416*m.i16*m.i58 + 0.01574372*m.i16*m.i59 + 0.00725944*m.i16*m.i60 +
0.0294988*m.i16*m.i61 + 0.0260914*m.i16*m.i62 + 0.01974094*m.i16*m.i63 + 0.01434116*m.i16*m.i64
+ 0.00954816*m.i16*m.i65 + 0.0087947*m.i16*m.i66 + 0.01216302*m.i16*m.i67 + 0.01307338*m.i16*
m.i68 + 0.023669*m.i16*m.i69 + 0.01061826*m.i16*m.i70 + 0.01531198*m.i16*m.i71 + 0.01282252*m.i16
*m.i72 + 0.01136194*m.i16*m.i73 + 0.01289612*m.i16*m.i74 + 0.0111961*m.i16*m.i75 + 0.00467394*
m.i16*m.i76 + 0.0120207*m.i16*m.i77 + 0.00634502*m.i16*m.i78 + 0.0272842*m.i16*m.i79 + 0.01354848
*m.i16*m.i80 + 0.01491878*m.i16*m.i81 + 0.00372788*m.i16*m.i82 + 0.01347184*m.i16*m.i83 +
0.01367452*m.i16*m.i84 + 0.01430584*m.i16*m.i85 + 0.01662228*m.i16*m.i86 + 0.01019354*m.i16*m.i87
+ 0.031864*m.i16*m.i88 + 0.01389622*m.i16*m.i89 + 0.01404588*m.i16*m.i90 + 0.01898344*m.i16*
m.i91 + 0.01310136*m.i16*m.i92 + 0.00293122*m.i16*m.i93 + 0.00548746*m.i16*m.i94 + 0.01674526*
m.i16*m.i95 + 0.0263504*m.i16*m.i96 + 0.0187966*m.i16*m.i97 + 0.0198675*m.i16*m.i98 + 0.0160833*
m.i16*m.i99 + 0.01885334*m.i16*m.i100 + 0.00599666*m.i17*m.i18 + 0.0047675*m.i17*m.i19 +
0.0265872*m.i17*m.i20 + 0.01628802*m.i17*m.i21 + 0.01871884*m.i17*m.i22 + 0.01233104*m.i17*m.i23
+ 0.01365522*m.i17*m.i24 + 0.00989432*m.i17*m.i25 + 0.00330258*m.i17*m.i26 + 0.0116841*m.i17*
m.i27 + 0.0079471*m.i17*m.i28 + 0.0045994*m.i17*m.i29 + 0.0254766*m.i17*m.i30 + 0.01659406*m.i17*
m.i31 + 0.0220846*m.i17*m.i32 + 0.01861566*m.i17*m.i33 + 0.00948066*m.i17*m.i34 + 0.0090429*m.i17
*m.i35 + 0.0337978*m.i17*m.i36 + 0.01595384*m.i17*m.i37 + 0.00235078*m.i17*m.i38 + 0.0201494*
m.i17*m.i39 + 0.0342284*m.i17*m.i40 + 0.0277738*m.i17*m.i41 + 0.01731318*m.i17*m.i42 + 0.01753214
*m.i17*m.i43 + 0.01978996*m.i17*m.i44 + 0.00369934*m.i17*m.i45 + 0.00718436*m.i17*m.i46 +
0.01949342*m.i17*m.i47 + 0.00499956*m.i17*m.i48 + 0.01707236*m.i17*m.i49 + 0.0203004*m.i17*m.i50
+ 0.01279548*m.i17*m.i51 + 0.011643*m.i17*m.i52 + 0.01115602*m.i17*m.i53 + 0.01587576*m.i17*
m.i54 + 0.010193*m.i17*m.i55 + 0.0217498*m.i17*m.i56 + 0.0064957*m.i17*m.i57 + 0.00989022*m.i17*
m.i58 + 0.01554654*m.i17*m.i59 + 0.00382894*m.i17*m.i60 + 0.01868378*m.i17*m.i61 + 0.01822302*
m.i17*m.i62 + 0.0270002*m.i17*m.i63 + 0.01054316*m.i17*m.i64 + 0.01114578*m.i17*m.i65 + 0.010706*
m.i17*m.i66 + 0.01057722*m.i17*m.i67 + 0.00541042*m.i17*m.i68 + 0.022045*m.i17*m.i69 + 0.00933892
*m.i17*m.i70 + 0.0217256*m.i17*m.i71 + 0.010527*m.i17*m.i72 + 0.01245986*m.i17*m.i73 + 0.01462496
*m.i17*m.i74 + 0.00471612*m.i17*m.i75 + 0.00385082*m.i17*m.i76 + 0.0150046*m.i17*m.i77 +
0.00469912*m.i17*m.i78 + 0.01570408*m.i17*m.i79 + 0.01238884*m.i17*m.i80 + 0.0167981*m.i17*m.i81
+ 0.00275656*m.i17*m.i82 + 0.0264668*m.i17*m.i83 + 0.01754616*m.i17*m.i84 + 0.0104241*m.i17*
m.i85 + 0.0155118*m.i17*m.i86 + 0.00992204*m.i17*m.i87 + 0.0334656*m.i17*m.i88 + 0.0100102*m.i17*
m.i89 + 0.00830234*m.i17*m.i90 + 0.00830522*m.i17*m.i91 + 0.01347376*m.i17*m.i92 + 0.00371114*
m.i17*m.i93 + 0.00721878*m.i17*m.i94 + 0.01197232*m.i17*m.i95 + 0.01097582*m.i17*m.i96 +
0.0153446*m.i17*m.i97 + 0.01911512*m.i17*m.i98 + 0.0158341*m.i17*m.i99 + 0.01647016*m.i17*m.i100
+ 0.0038501*m.i18*m.i19 + 0.01438424*m.i18*m.i20 + 0.00575166*m.i18*m.i21 + 0.01286738*m.i18*
m.i22 + 0.0072269*m.i18*m.i23 + 0.00577628*m.i18*m.i24 + 0.00353166*m.i18*m.i25 + 0.00406754*
m.i18*m.i26 + 0.00586712*m.i18*m.i27 + 0.00246394*m.i18*m.i28 + 0.00208424*m.i18*m.i29 +
0.00868042*m.i18*m.i30 + 0.00488392*m.i18*m.i31 + 0.01139774*m.i18*m.i32 + 0.00652178*m.i18*m.i33
+ 0.00514824*m.i18*m.i34 + 0.00420068*m.i18*m.i35 + 0.01314078*m.i18*m.i36 + 0.00738678*m.i18*
m.i37 + 0.00212172*m.i18*m.i38 + 0.00767338*m.i18*m.i39 + 0.01491396*m.i18*m.i40 + 0.00689198*
m.i18*m.i41 + 0.00941516*m.i18*m.i42 + 0.00703674*m.i18*m.i43 + 0.00623926*m.i18*m.i44 +
0.0042213*m.i18*m.i45 + 0.00377366*m.i18*m.i46 + 0.01005392*m.i18*m.i47 + 0.00385304*m.i18*m.i48
+ 0.0061538*m.i18*m.i49 + 0.00828744*m.i18*m.i50 + 0.00452496*m.i18*m.i51 + 0.00647618*m.i18*
m.i52 + 0.00595912*m.i18*m.i53 + 0.00909974*m.i18*m.i54 + 0.00683082*m.i18*m.i55 + 0.00696058*
m.i18*m.i56 + 0.00489492*m.i18*m.i57 + 0.00399036*m.i18*m.i58 + 0.0071619*m.i18*m.i59 +
0.00282566*m.i18*m.i60 + 0.01253118*m.i18*m.i61 + 0.01017836*m.i18*m.i62 + 0.0054806*m.i18*m.i63
+ 0.00679494*m.i18*m.i64 + 0.00492774*m.i18*m.i65 + 0.00294036*m.i18*m.i66 + 0.00302154*m.i18*
m.i67 + 0.00492864*m.i18*m.i68 + 0.01002278*m.i18*m.i69 + 0.00498708*m.i18*m.i70 + 0.00467346*
m.i18*m.i71 + 0.00622154*m.i18*m.i72 + 0.0060522*m.i18*m.i73 + 0.00606086*m.i18*m.i74 +
0.00435108*m.i18*m.i75 + 0.00246578*m.i18*m.i76 + 0.00518572*m.i18*m.i77 + 0.00318624*m.i18*m.i78
+ 0.00460288*m.i18*m.i79 + 0.007017*m.i18*m.i80 + 0.00647242*m.i18*m.i81 + 0.00407958*m.i18*
m.i82 - 0.000888864*m.i18*m.i83 + 0.00537106*m.i18*m.i84 + 0.00634694*m.i18*m.i85 + 0.00514234*
m.i18*m.i86 + 0.00350408*m.i18*m.i87 - 0.00202898*m.i18*m.i88 + 0.001751682*m.i18*m.i89 +
0.0065019*m.i18*m.i90 + 0.007451*m.i18*m.i91 + 0.0035437*m.i18*m.i92 + 0.001995674*m.i18*m.i93 +
0.00436006*m.i18*m.i94 + 0.00715274*m.i18*m.i95 + 0.00776482*m.i18*m.i96 + 0.00710082*m.i18*m.i97
+ 0.00609606*m.i18*m.i98 + 0.00652362*m.i18*m.i99 + 0.01247386*m.i18*m.i100 + 0.01204848*m.i19*
m.i20 + 0.00628788*m.i19*m.i21 + 0.00938206*m.i19*m.i22 + 0.00540152*m.i19*m.i23 + 0.00366816*
m.i19*m.i24 + 0.00424804*m.i19*m.i25 + 0.00443146*m.i19*m.i26 + 0.00550836*m.i19*m.i27 +
0.00441186*m.i19*m.i28 + 0.00464964*m.i19*m.i29 + 0.0215394*m.i19*m.i30 + 0.00534434*m.i19*m.i31
+ 0.01089826*m.i19*m.i32 + 0.00384858*m.i19*m.i33 + 0.00271286*m.i19*m.i34 + 0.00459438*m.i19*
m.i35 + 0.00753494*m.i19*m.i36 + 0.00675858*m.i19*m.i37 + 0.00330138*m.i19*m.i38 + 0.01012594*
m.i19*m.i39 + 0.00097236*m.i19*m.i40 + 0.00697634*m.i19*m.i41 + 0.0055734*m.i19*m.i42 +
0.00439042*m.i19*m.i43 + 0.00466626*m.i19*m.i44 + 0.0056599*m.i19*m.i45 + 0.00343664*m.i19*m.i46
+ 0.00191227*m.i19*m.i47 + 0.00409474*m.i19*m.i48 + 0.00728426*m.i19*m.i49 + 0.0118005*m.i19*
m.i50 + 0.00439032*m.i19*m.i51 + 0.00819602*m.i19*m.i52 + 0.00683532*m.i19*m.i53 + 0.00927236*
m.i19*m.i54 + 0.00638082*m.i19*m.i55 + 0.0049778*m.i19*m.i56 + 0.0064092*m.i19*m.i57 + 0.00332368
*m.i19*m.i58 + 0.00797006*m.i19*m.i59 + 0.00515114*m.i19*m.i60 + 0.0140857*m.i19*m.i61 +
0.00824548*m.i19*m.i62 + 0.00645382*m.i19*m.i63 + 0.00492056*m.i19*m.i64 + 0.0040063*m.i19*m.i65
+ 0.00621702*m.i19*m.i66 + 0.00486474*m.i19*m.i67 + 0.01089728*m.i19*m.i68 + 0.01064856*m.i19*
m.i69 + 0.00763898*m.i19*m.i70 + 0.00304924*m.i19*m.i71 + 0.00746516*m.i19*m.i72 + 0.0073895*
m.i19*m.i73 + 0.008372*m.i19*m.i74 + 0.0096269*m.i19*m.i75 + 0.00403824*m.i19*m.i76 + 0.00896868*
m.i19*m.i77 + 0.00369816*m.i19*m.i78 + 0.01338638*m.i19*m.i79 + 0.00702566*m.i19*m.i80 +
0.00204776*m.i19*m.i81 + 0.0040369*m.i19*m.i82 - 0.00617474*m.i19*m.i83 + 0.00664876*m.i19*m.i84
+ 0.00640014*m.i19*m.i85 + 0.00537574*m.i19*m.i86 + 0.00744762*m.i19*m.i87 + 0.0288232*m.i19*
m.i88 + 0.0089059*m.i19*m.i89 + 0.00438344*m.i19*m.i90 + 0.01192674*m.i19*m.i91 + 0.00326376*
m.i19*m.i92 + 0.00330764*m.i19*m.i93 + 0.00649262*m.i19*m.i94 + 0.0076392*m.i19*m.i95 +
0.01075072*m.i19*m.i96 + 0.00749846*m.i19*m.i97 + 0.00563188*m.i19*m.i98 + 0.00430788*m.i19*m.i99
+ 0.00505074*m.i19*m.i100 + 0.026993*m.i20*m.i21 + 0.0407142*m.i20*m.i22 + 0.0262048*m.i20*m.i23
+ 0.0233804*m.i20*m.i24 + 0.01566388*m.i20*m.i25 + 0.01254316*m.i20*m.i26 + 0.0230746*m.i20*
m.i27 + 0.01228074*m.i20*m.i28 + 0.01141404*m.i20*m.i29 + 0.046979*m.i20*m.i30 + 0.01956928*m.i20
*m.i31 + 0.0444886*m.i20*m.i32 + 0.0345924*m.i20*m.i33 + 0.01450852*m.i20*m.i34 + 0.01607032*
m.i20*m.i35 + 0.0534276*m.i20*m.i36 + 0.027915*m.i20*m.i37 + 0.00446976*m.i20*m.i38 + 0.0310128*
m.i20*m.i39 + 0.0617194*m.i20*m.i40 + 0.0418284*m.i20*m.i41 + 0.0284554*m.i20*m.i42 + 0.0202322*
m.i20*m.i43 + 0.0309222*m.i20*m.i44 + 0.00850138*m.i20*m.i45 + 0.01226594*m.i20*m.i46 + 0.0355744
*m.i20*m.i47 + 0.01044628*m.i20*m.i48 + 0.0261968*m.i20*m.i49 + 0.0353182*m.i20*m.i50 +
0.01768812*m.i20*m.i51 + 0.0227266*m.i20*m.i52 + 0.0229416*m.i20*m.i53 + 0.0285392*m.i20*m.i54 +
0.024215*m.i20*m.i55 + 0.0227*m.i20*m.i56 + 0.01349126*m.i20*m.i57 + 0.01576804*m.i20*m.i58 +
0.0251472*m.i20*m.i59 + 0.00678918*m.i20*m.i60 + 0.0460104*m.i20*m.i61 + 0.0362612*m.i20*m.i62 +
0.0246576*m.i20*m.i63 + 0.01897386*m.i20*m.i64 + 0.021042*m.i20*m.i65 + 0.01449872*m.i20*m.i66 +
0.01901978*m.i20*m.i67 + 0.01289314*m.i20*m.i68 + 0.04318*m.i20*m.i69 + 0.0192612*m.i20*m.i70 +
0.0319956*m.i20*m.i71 + 0.0241418*m.i20*m.i72 + 0.0231068*m.i20*m.i73 + 0.0232748*m.i20*m.i74 +
0.01394672*m.i20*m.i75 + 0.01233534*m.i20*m.i76 + 0.0250086*m.i20*m.i77 + 0.01003866*m.i20*m.i78
+ 0.01782134*m.i20*m.i79 + 0.0175231*m.i20*m.i80 + 0.0266842*m.i20*m.i81 + 0.00899148*m.i20*
m.i82 + 0.01916166*m.i20*m.i83 + 0.0237898*m.i20*m.i84 + 0.01674726*m.i20*m.i85 + 0.0243836*m.i20
*m.i86 + 0.0205712*m.i20*m.i87 + 0.0526016*m.i20*m.i88 + 0.01299922*m.i20*m.i89 + 0.0223216*m.i20
*m.i90 + 0.0221722*m.i20*m.i91 + 0.0200512*m.i20*m.i92 + 0.00605128*m.i20*m.i93 + 0.01422172*
m.i20*m.i94 + 0.0209666*m.i20*m.i95 + 0.0316224*m.i20*m.i96 + 0.0278754*m.i20*m.i97 + 0.0266692*
m.i20*m.i98 + 0.032317*m.i20*m.i99 + 0.0372718*m.i20*m.i100 + 0.0225584*m.i21*m.i22 + 0.01330824*
m.i21*m.i23 + 0.01120138*m.i21*m.i24 + 0.00988644*m.i21*m.i25 + 0.0053562*m.i21*m.i26 +
0.01171726*m.i21*m.i27 + 0.0075308*m.i21*m.i28 + 0.0062293*m.i21*m.i29 + 0.028151*m.i21*m.i30 +
0.01116532*m.i21*m.i31 + 0.024731*m.i21*m.i32 + 0.01403094*m.i21*m.i33 + 0.0053378*m.i21*m.i34 +
0.0062169*m.i21*m.i35 + 0.0322338*m.i21*m.i36 + 0.0173092*m.i21*m.i37 + 0.00310282*m.i21*m.i38 +
0.01943686*m.i21*m.i39 + 0.0397312*m.i21*m.i40 + 0.0227668*m.i21*m.i41 + 0.01402322*m.i21*m.i42
+ 0.01184862*m.i21*m.i43 + 0.01574106*m.i21*m.i44 + 0.00351088*m.i21*m.i45 + 0.00692094*m.i21*
m.i46 + 0.01710158*m.i21*m.i47 + 0.00581758*m.i21*m.i48 + 0.013985*m.i21*m.i49 + 0.0205976*m.i21*
m.i50 + 0.01286968*m.i21*m.i51 + 0.01222018*m.i21*m.i52 + 0.01492284*m.i21*m.i53 + 0.01502328*
m.i21*m.i54 + 0.01279528*m.i21*m.i55 + 0.01443928*m.i21*m.i56 + 0.00711002*m.i21*m.i57 +
0.00897148*m.i21*m.i58 + 0.0175601*m.i21*m.i59 + 0.00366562*m.i21*m.i60 + 0.0240206*m.i21*m.i61
+ 0.01871124*m.i21*m.i62 + 0.01471548*m.i21*m.i63 + 0.00910326*m.i21*m.i64 + 0.01121548*m.i21*
m.i65 + 0.0093615*m.i21*m.i66 + 0.0129081*m.i21*m.i67 + 0.0055548*m.i21*m.i68 + 0.0214638*m.i21*
m.i69 + 0.00932128*m.i21*m.i70 + 0.01654162*m.i21*m.i71 + 0.01150414*m.i21*m.i72 + 0.01130758*
m.i21*m.i73 + 0.01195864*m.i21*m.i74 + 0.00685764*m.i21*m.i75 + 0.00673976*m.i21*m.i76 +
0.01092518*m.i21*m.i77 + 0.00610126*m.i21*m.i78 + 0.0166491*m.i21*m.i79 + 0.00973956*m.i21*m.i80
+ 0.01360816*m.i21*m.i81 + 0.00413938*m.i21*m.i82 + 0.01295166*m.i21*m.i83 + 0.01359658*m.i21*
m.i84 + 0.0100056*m.i21*m.i85 + 0.01591198*m.i21*m.i86 + 0.01302584*m.i21*m.i87 + 0.0321888*m.i21
*m.i88 + 0.0069057*m.i21*m.i89 + 0.01467542*m.i21*m.i90 + 0.0104985*m.i21*m.i91 + 0.01203108*
m.i21*m.i92 + 0.00438602*m.i21*m.i93 + 0.0064228*m.i21*m.i94 + 0.0109577*m.i21*m.i95 + 0.01683074
*m.i21*m.i96 + 0.01510662*m.i21*m.i97 + 0.013665*m.i21*m.i98 + 0.01994166*m.i21*m.i99 + 0.0184821
*m.i21*m.i100 + 0.01713984*m.i22*m.i23 + 0.0290628*m.i22*m.i24 + 0.01659484*m.i22*m.i25 +
0.01330504*m.i22*m.i26 + 0.0220338*m.i22*m.i27 + 0.0096401*m.i22*m.i28 + 0.01336178*m.i22*m.i29
+ 0.0794522*m.i22*m.i30 + 0.00912184*m.i22*m.i31 + 0.0466568*m.i22*m.i32 + 0.0203942*m.i22*m.i33
+ 0.00695226*m.i22*m.i34 + 0.0125215*m.i22*m.i35 + 0.0728992*m.i22*m.i36 + 0.0354588*m.i22*m.i37
+ 0.00691112*m.i22*m.i38 + 0.037201*m.i22*m.i39 + 0.0756082*m.i22*m.i40 + 0.0292772*m.i22*m.i41
+ 0.0266054*m.i22*m.i42 + 0.01269282*m.i22*m.i43 + 0.0230306*m.i22*m.i44 + 0.000804368*m.i22*
m.i45 + 0.01545384*m.i22*m.i46 + 0.0296748*m.i22*m.i47 + 0.0193381*m.i22*m.i48 + 0.0200644*m.i22*
m.i49 + 0.0450946*m.i22*m.i50 + 0.01567104*m.i22*m.i51 + 0.0202574*m.i22*m.i52 + 0.0456018*m.i22*
m.i53 + 0.024727*m.i22*m.i54 + 0.01871804*m.i22*m.i55 + 0.01574656*m.i22*m.i56 + 0.01426746*m.i22
*m.i57 + 0.0112117*m.i22*m.i58 + 0.0237092*m.i22*m.i59 + 0.01100176*m.i22*m.i60 + 0.0484136*m.i22
*m.i61 + 0.0477626*m.i22*m.i62 + 0.01715072*m.i22*m.i63 + 0.01569402*m.i22*m.i64 + 0.0163363*
m.i22*m.i65 + 0.00819194*m.i22*m.i66 + 0.0250362*m.i22*m.i67 + 0.01191736*m.i22*m.i68 + 0.0445474
*m.i22*m.i69 + 0.0208408*m.i22*m.i70 + 0.0196514*m.i22*m.i71 + 0.01993902*m.i22*m.i72 +
0.01317816*m.i22*m.i73 + 0.0290184*m.i22*m.i74 + 0.022028*m.i22*m.i75 + 0.01241074*m.i22*m.i76 +
0.01467528*m.i22*m.i77 + 0.0179883*m.i22*m.i78 + 0.040464*m.i22*m.i79 + 0.01646476*m.i22*m.i80 +
0.0251454*m.i22*m.i81 + 0.00665554*m.i22*m.i82 - 0.00094782*m.i22*m.i83 + 0.01809638*m.i22*m.i84
+ 0.01658492*m.i22*m.i85 + 0.0242392*m.i22*m.i86 + 0.0215874*m.i22*m.i87 + 0.0229098*m.i22*m.i88
+ 0.01114584*m.i22*m.i89 + 0.046945*m.i22*m.i90 + 0.0230318*m.i22*m.i91 + 0.01381346*m.i22*m.i92
+ 0.0100301*m.i22*m.i93 + 0.00837496*m.i22*m.i94 + 0.0250054*m.i22*m.i95 + 0.0620424*m.i22*m.i96
+ 0.0302296*m.i22*m.i97 + 0.0248336*m.i22*m.i98 + 0.0372288*m.i22*m.i99 + 0.0441042*m.i22*m.i100
+ 0.00618108*m.i23*m.i24 + 0.00567144*m.i23*m.i25 + 0.0048866*m.i23*m.i26 + 0.00839514*m.i23*
m.i27 + 0.00487436*m.i23*m.i28 + 0.004356*m.i23*m.i29 + 0.024299*m.i23*m.i30 + 0.00996842*m.i23*
m.i31 + 0.0204928*m.i23*m.i32 + 0.01726232*m.i23*m.i33 + 0.00564344*m.i23*m.i34 + 0.00506272*
m.i23*m.i35 + 0.027322*m.i23*m.i36 + 0.01648718*m.i23*m.i37 + 0.001813512*m.i23*m.i38 + 0.0143408
*m.i23*m.i39 + 0.0410642*m.i23*m.i40 + 0.00822668*m.i23*m.i41 + 0.01397884*m.i23*m.i42 +
0.00751294*m.i23*m.i43 + 0.01081252*m.i23*m.i44 + 0.00375058*m.i23*m.i45 + 0.00488444*m.i23*m.i46
+ 0.01210078*m.i23*m.i47 + 0.0050334*m.i23*m.i48 + 0.01042672*m.i23*m.i49 + 0.01834872*m.i23*
m.i50 + 0.0122672*m.i23*m.i51 + 0.01291522*m.i23*m.i52 + 0.01243908*m.i23*m.i53 + 0.01372984*
m.i23*m.i54 + 0.0114482*m.i23*m.i55 + 0.0105593*m.i23*m.i56 + 0.00644542*m.i23*m.i57 + 0.00648944
*m.i23*m.i58 + 0.01543002*m.i23*m.i59 + 0.0037869*m.i23*m.i60 + 0.0214726*m.i23*m.i61 +
0.01495998*m.i23*m.i62 + 0.00692592*m.i23*m.i63 + 0.00648514*m.i23*m.i64 + 0.00794602*m.i23*m.i65
+ 0.00558232*m.i23*m.i66 + 0.0093087*m.i23*m.i67 + 0.000819996*m.i23*m.i68 + 0.01512186*m.i23*
m.i69 + 0.0070338*m.i23*m.i70 + 0.00840292*m.i23*m.i71 + 0.00668858*m.i23*m.i72 + 0.00956292*
m.i23*m.i73 + 0.00972254*m.i23*m.i74 + 0.00409738*m.i23*m.i75 + 0.00544566*m.i23*m.i76 +
0.01207296*m.i23*m.i77 + 0.00561846*m.i23*m.i78 + 0.01639358*m.i23*m.i79 + 0.00769632*m.i23*m.i80
+ 0.01062502*m.i23*m.i81 + 0.0060578*m.i23*m.i82 + 0.00866906*m.i23*m.i83 + 0.00707332*m.i23*
m.i84 + 0.01006612*m.i23*m.i85 + 0.01147664*m.i23*m.i86 + 0.0127172*m.i23*m.i87 + 0.01718458*
m.i23*m.i88 + 0.00499896*m.i23*m.i89 + 0.01300446*m.i23*m.i90 + 0.00824348*m.i23*m.i91 +
0.01100222*m.i23*m.i92 + 0.00359882*m.i23*m.i93 + 0.00760194*m.i23*m.i94 + 0.01026304*m.i23*m.i95
+ 0.01748628*m.i23*m.i96 + 0.01222018*m.i23*m.i97 + 0.00656104*m.i23*m.i98 + 0.01929844*m.i23*
m.i99 + 0.01526792*m.i23*m.i100 + 0.01061256*m.i24*m.i25 + 0.00390748*m.i24*m.i26 + 0.0176534*
m.i24*m.i27 + 0.00973526*m.i24*m.i28 + 0.00580416*m.i24*m.i29 + 0.0308904*m.i24*m.i30 +
0.00564094*m.i24*m.i31 + 0.0202996*m.i24*m.i32 + 0.00846578*m.i24*m.i33 + 0.00878324*m.i24*m.i34
+ 0.0092725*m.i24*m.i35 + 0.0386418*m.i24*m.i36 + 0.01405906*m.i24*m.i37 + 0.0050169*m.i24*m.i38
+ 0.01753958*m.i24*m.i39 + 0.0277342*m.i24*m.i40 + 0.0200538*m.i24*m.i41 + 0.0160148*m.i24*m.i42
+ 0.01157484*m.i24*m.i43 + 0.0097945*m.i24*m.i44 + 0.00047637*m.i24*m.i45 + 0.0074696*m.i24*
m.i46 + 0.0232922*m.i24*m.i47 + 0.0064693*m.i24*m.i48 + 0.0076863*m.i24*m.i49 + 0.01970906*m.i24*
m.i50 + 0.00539232*m.i24*m.i51 + 0.01285448*m.i24*m.i52 + 0.0120141*m.i24*m.i53 + 0.0124346*m.i24
*m.i54 + 0.00898946*m.i24*m.i55 + 0.00726448*m.i24*m.i56 + 0.0065436*m.i24*m.i57 + 0.00501008*
m.i24*m.i58 + 0.01101314*m.i24*m.i59 + 0.00470396*m.i24*m.i60 + 0.0237074*m.i24*m.i61 + 0.0228986
*m.i24*m.i62 + 0.01228188*m.i24*m.i63 + 0.01100376*m.i24*m.i64 + 0.00915078*m.i24*m.i65 +
0.0069269*m.i24*m.i66 + 0.01206108*m.i24*m.i67 + 0.00908652*m.i24*m.i68 + 0.0217466*m.i24*m.i69
+ 0.00887002*m.i24*m.i70 + 0.022452*m.i24*m.i71 + 0.0139555*m.i24*m.i72 + 0.00715706*m.i24*m.i73
+ 0.01096546*m.i24*m.i74 + 0.00744888*m.i24*m.i75 + 0.0028668*m.i24*m.i76 + 0.0036177*m.i24*
m.i77 + 0.00580328*m.i24*m.i78 + 0.0086669*m.i24*m.i79 + 0.00929752*m.i24*m.i80 + 0.01854944*
m.i24*m.i81 + 0.0023229*m.i24*m.i82 + 0.01207648*m.i24*m.i83 + 0.01205652*m.i24*m.i84 + 0.0096674
*m.i24*m.i85 + 0.0108503*m.i24*m.i86 + 0.00597266*m.i24*m.i87 + 0.0190243*m.i24*m.i88 +
0.00640978*m.i24*m.i89 + 0.01034642*m.i24*m.i90 + 0.01193214*m.i24*m.i91 + 0.00822214*m.i24*m.i92
+ 0.00070224*m.i24*m.i93 + 0.00307244*m.i24*m.i94 + 0.01092084*m.i24*m.i95 + 0.0203774*m.i24*
m.i96 + 0.01743418*m.i24*m.i97 + 0.0232524*m.i24*m.i98 + 0.01437366*m.i24*m.i99 + 0.01998814*
m.i24*m.i100 + 0.00270846*m.i25*m.i26 + 0.00878244*m.i25*m.i27 + 0.00564506*m.i25*m.i28 +
0.00404084*m.i25*m.i29 + 0.0227806*m.i25*m.i30 + 0.00477484*m.i25*m.i31 + 0.016725*m.i25*m.i32 +
0.00496432*m.i25*m.i33 + 0.00361518*m.i25*m.i34 + 0.00462338*m.i25*m.i35 + 0.0204146*m.i25*m.i36
+ 0.01087624*m.i25*m.i37 + 0.00256388*m.i25*m.i38 + 0.01236456*m.i25*m.i39 + 0.01769162*m.i25*
m.i40 + 0.01576792*m.i25*m.i41 + 0.00928236*m.i25*m.i42 + 0.00793946*m.i25*m.i43 + 0.00966756*
m.i25*m.i44 + 0.00248138*m.i25*m.i45 + 0.00485932*m.i25*m.i46 + 0.0122764*m.i25*m.i47 + 0.0023089
*m.i25*m.i48 + 0.00859364*m.i25*m.i49 + 0.01421118*m.i25*m.i50 + 0.00733214*m.i25*m.i51 +
0.00816206*m.i25*m.i52 + 0.00960248*m.i25*m.i53 + 0.00866518*m.i25*m.i54 + 0.00692386*m.i25*m.i55
+ 0.00882586*m.i25*m.i56 + 0.00434948*m.i25*m.i57 + 0.0041589*m.i25*m.i58 + 0.01055232*m.i25*
m.i59 + 0.00330494*m.i25*m.i60 + 0.01561392*m.i25*m.i61 + 0.0126551*m.i25*m.i62 + 0.00815092*
m.i25*m.i63 + 0.00612506*m.i25*m.i64 + 0.0070869*m.i25*m.i65 + 0.00424002*m.i25*m.i66 +
0.00879504*m.i25*m.i67 + 0.0058829*m.i25*m.i68 + 0.01439048*m.i25*m.i69 + 0.00610238*m.i25*m.i70
+ 0.01131906*m.i25*m.i71 + 0.00889538*m.i25*m.i72 + 0.00612414*m.i25*m.i73 + 0.00846104*m.i25*
m.i74 + 0.0057198*m.i25*m.i75 + 0.00393476*m.i25*m.i76 + 0.00432972*m.i25*m.i77 + 0.00446968*
m.i25*m.i78 + 0.0141591*m.i25*m.i79 + 0.00681524*m.i25*m.i80 + 0.00839778*m.i25*m.i81 +
0.00242412*m.i25*m.i82 + 0.0061299*m.i25*m.i83 + 0.00821362*m.i25*m.i84 + 0.0059951*m.i25*m.i85
+ 0.01036166*m.i25*m.i86 + 0.0075501*m.i25*m.i87 + 0.0208316*m.i25*m.i88 + 0.00461656*m.i25*
m.i89 + 0.01024232*m.i25*m.i90 + 0.00541446*m.i25*m.i91 + 0.0058998*m.i25*m.i92 + 0.00419408*
m.i25*m.i93 + 0.0034525*m.i25*m.i94 + 0.00742618*m.i25*m.i95 + 0.01117296*m.i25*m.i96 +
0.00976304*m.i25*m.i97 + 0.01005714*m.i25*m.i98 + 0.00997578*m.i25*m.i99 + 0.01119052*m.i25*
m.i100 + 0.0054348*m.i26*m.i27 + 0.00158545*m.i26*m.i28 + 0.00507804*m.i26*m.i29 + 0.01115184*
m.i26*m.i30 + 0.00280118*m.i26*m.i31 + 0.0103351*m.i26*m.i32 + 0.00796856*m.i26*m.i33 +
0.00322344*m.i26*m.i34 + 0.00410686*m.i26*m.i35 + 0.00922294*m.i26*m.i36 + 0.00708292*m.i26*m.i37
+ 0.00218796*m.i26*m.i38 + 0.00667316*m.i26*m.i39 + 0.00604564*m.i26*m.i40 + 0.00774532*m.i26*
m.i41 + 0.00814596*m.i26*m.i42 + 0.0026451*m.i26*m.i43 + 0.00582206*m.i26*m.i44 + 0.00332382*
m.i26*m.i45 + 0.00451686*m.i26*m.i46 + 0.00733916*m.i26*m.i47 + 0.00476946*m.i26*m.i48 +
0.00485772*m.i26*m.i49 + 0.0100103*m.i26*m.i50 + 0.00280844*m.i26*m.i51 + 0.00687248*m.i26*m.i52
+ 0.00732458*m.i26*m.i53 + 0.00815206*m.i26*m.i54 + 0.00612236*m.i26*m.i55 + 0.00307146*m.i26*
m.i56 + 0.0049056*m.i26*m.i57 + 0.00412472*m.i26*m.i58 + 0.0040935*m.i26*m.i59 + 0.0040596*m.i26*
m.i60 + 0.01138906*m.i26*m.i61 + 0.00976836*m.i26*m.i62 + 0.0087752*m.i26*m.i63 + 0.00574374*
m.i26*m.i64 + 0.00539202*m.i26*m.i65 + 0.0020772*m.i26*m.i66 + 0.00535872*m.i26*m.i67 + 0.0041987
*m.i26*m.i68 + 0.00941624*m.i26*m.i69 + 0.00708368*m.i26*m.i70 + 0.00623148*m.i26*m.i71 +
0.0059506*m.i26*m.i72 + 0.00509138*m.i26*m.i73 + 0.00640786*m.i26*m.i74 + 0.00599214*m.i26*m.i75
+ 0.00535234*m.i26*m.i76 + 0.0061449*m.i26*m.i77 + 0.0049639*m.i26*m.i78 + 0.00212662*m.i26*
m.i79 + 0.00709762*m.i26*m.i80 + 0.00556936*m.i26*m.i81 + 0.0033022*m.i26*m.i82 - 0.0001706112*
m.i26*m.i83 + 0.0042184*m.i26*m.i84 + 0.00533878*m.i26*m.i85 + 0.00407216*m.i26*m.i86 + 0.0050287
*m.i26*m.i87 + 0.00492458*m.i26*m.i88 + 0.00236614*m.i26*m.i89 + 0.0069424*m.i26*m.i90 +
0.00767098*m.i26*m.i91 + 0.00534286*m.i26*m.i92 + 0.001624812*m.i26*m.i93 + 0.00309366*m.i26*
m.i94 + 0.00617648*m.i26*m.i95 + 0.01108742*m.i26*m.i96 + 0.0068572*m.i26*m.i97 + 0.00411952*
m.i26*m.i98 + 0.00653102*m.i26*m.i99 + 0.00944332*m.i26*m.i100 + 0.01236278*m.i27*m.i28 +
0.00615174*m.i27*m.i29 + 0.0284656*m.i27*m.i30 + 0.00531366*m.i27*m.i31 + 0.0227234*m.i27*m.i32
+ 0.01239532*m.i27*m.i33 + 0.00873604*m.i27*m.i34 + 0.01006162*m.i27*m.i35 + 0.0244272*m.i27*
m.i36 + 0.01206064*m.i27*m.i37 + 0.00764146*m.i27*m.i38 + 0.01638042*m.i27*m.i39 + 0.0281728*
m.i27*m.i40 + 0.0236864*m.i27*m.i41 + 0.01394576*m.i27*m.i42 + 0.01151236*m.i27*m.i43 +
0.00967762*m.i27*m.i44 + 0.0001345884*m.i27*m.i45 + 0.00656542*m.i27*m.i46 + 0.0226088*m.i27*
m.i47 + 0.00665866*m.i27*m.i48 + 0.00867994*m.i27*m.i49 + 0.01519986*m.i27*m.i50 + 0.00516678*
m.i27*m.i51 + 0.01290734*m.i27*m.i52 + 0.00750112*m.i27*m.i53 + 0.015481*m.i27*m.i54 + 0.00918208
*m.i27*m.i55 + 0.01133662*m.i27*m.i56 + 0.00655584*m.i27*m.i57 + 0.00645326*m.i27*m.i58 +
0.01022706*m.i27*m.i59 + 0.00655942*m.i27*m.i60 + 0.0230718*m.i27*m.i61 + 0.0200196*m.i27*m.i62
+ 0.01214952*m.i27*m.i63 + 0.00996324*m.i27*m.i64 + 0.00982212*m.i27*m.i65 + 0.00606814*m.i27*
m.i66 + 0.00854006*m.i27*m.i67 + 0.00819936*m.i27*m.i68 + 0.01608286*m.i27*m.i69 + 0.00821942*
m.i27*m.i70 + 0.0230626*m.i27*m.i71 + 0.01648106*m.i27*m.i72 + 0.00833058*m.i27*m.i73 + 0.0119455
*m.i27*m.i74 + 0.0073591*m.i27*m.i75 + 0.00553444*m.i27*m.i76 + 0.00629646*m.i27*m.i77 +
0.00406434*m.i27*m.i78 + 0.00760068*m.i27*m.i79 + 0.00662478*m.i27*m.i80 + 0.0198678*m.i27*m.i81
+ 0.0044671*m.i27*m.i82 + 0.01205228*m.i27*m.i83 + 0.0106948*m.i27*m.i84 + 0.00763694*m.i27*
m.i85 + 0.01122432*m.i27*m.i86 + 0.00899094*m.i27*m.i87 + 0.0237458*m.i27*m.i88 + 0.00548044*
m.i27*m.i89 + 0.01135562*m.i27*m.i90 + 0.01131762*m.i27*m.i91 + 0.00767916*m.i27*m.i92 +
0.00281062*m.i27*m.i93 + 0.00450634*m.i27*m.i94 + 0.01029564*m.i27*m.i95 + 0.01573164*m.i27*m.i96
+ 0.01494338*m.i27*m.i97 + 0.01900252*m.i27*m.i98 + 0.01470772*m.i27*m.i99 + 0.01866828*m.i27*
m.i100 + 0.00362518*m.i28*m.i29 + 0.01640256*m.i28*m.i30 + 0.00349192*m.i28*m.i31 + 0.0129237*
m.i28*m.i32 + 0.00538584*m.i28*m.i33 + 0.00533474*m.i28*m.i34 + 0.00643216*m.i28*m.i35 +
0.01292206*m.i28*m.i36 + 0.00798078*m.i28*m.i37 + 0.0054977*m.i28*m.i38 + 0.00885966*m.i28*m.i39
+ 0.016828*m.i28*m.i40 + 0.01167374*m.i28*m.i41 + 0.00549216*m.i28*m.i42 + 0.00692364*m.i28*
m.i43 + 0.00370672*m.i28*m.i44 + 0.000284348*m.i28*m.i45 + 0.00277668*m.i28*m.i46 + 0.00936392*
m.i28*m.i47 + 0.00267238*m.i28*m.i48 + 0.00522892*m.i28*m.i49 + 0.00779258*m.i28*m.i50 +
0.0043462*m.i28*m.i51 + 0.00591302*m.i28*m.i52 + 0.00320368*m.i28*m.i53 + 0.00698682*m.i28*m.i54
+ 0.00560018*m.i28*m.i55 + 0.0075828*m.i28*m.i56 + 0.00361162*m.i28*m.i57 + 0.00229658*m.i28*
m.i58 + 0.00780328*m.i28*m.i59 + 0.0033416*m.i28*m.i60 + 0.01168298*m.i28*m.i61 + 0.0082366*m.i28
*m.i62 + 0.00465746*m.i28*m.i63 + 0.00328332*m.i28*m.i64 + 0.00685966*m.i28*m.i65 + 0.00386632*
m.i28*m.i66 + 0.0053142*m.i28*m.i67 + 0.00432904*m.i28*m.i68 + 0.00791276*m.i28*m.i69 + 0.0040137
*m.i28*m.i70 + 0.01081358*m.i28*m.i71 + 0.00841874*m.i28*m.i72 + 0.00534694*m.i28*m.i73 +
0.00677544*m.i28*m.i74 + 0.00391198*m.i28*m.i75 + 0.00308942*m.i28*m.i76 + 0.00250778*m.i28*m.i77
+ 0.00189916*m.i28*m.i78 + 0.00856184*m.i28*m.i79 + 0.00337182*m.i28*m.i80 + 0.00959416*m.i28*
m.i81 + 0.00329038*m.i28*m.i82 + 0.00388664*m.i28*m.i83 + 0.00685968*m.i28*m.i84 + 0.00406002*
m.i28*m.i85 + 0.00658126*m.i28*m.i86 + 0.00646838*m.i28*m.i87 + 0.0218548*m.i28*m.i88 +
0.00541992*m.i28*m.i89 + 0.00503116*m.i28*m.i90 + 0.00418236*m.i28*m.i91 + 0.0040874*m.i28*m.i92
+ 0.0022624*m.i28*m.i93 + 0.00392254*m.i28*m.i94 + 0.00482686*m.i28*m.i95 + 0.00726382*m.i28*
m.i96 + 0.00767472*m.i28*m.i97 + 0.01066418*m.i28*m.i98 + 0.00883358*m.i28*m.i99 + 0.0070211*
m.i28*m.i100 + 0.0147917*m.i29*m.i30 + 0.001068816*m.i29*m.i31 + 0.0105712*m.i29*m.i32 +
0.00407766*m.i29*m.i33 + 0.00300076*m.i29*m.i34 + 0.00524794*m.i29*m.i35 + 0.01016322*m.i29*m.i36
+ 0.00841674*m.i29*m.i37 + 0.00258632*m.i29*m.i38 + 0.00698836*m.i29*m.i39 + 0.01223674*m.i29*
m.i40 + 0.01128912*m.i29*m.i41 + 0.00481604*m.i29*m.i42 + 0.00316394*m.i29*m.i43 + 0.00690116*
m.i29*m.i44 + 0.00082418*m.i29*m.i45 + 0.00343988*m.i29*m.i46 + 0.00660586*m.i29*m.i47 +
0.00315994*m.i29*m.i48 + 0.004109*m.i29*m.i49 + 0.01072766*m.i29*m.i50 + 0.00295018*m.i29*m.i51
+ 0.00574084*m.i29*m.i52 + 0.00735384*m.i29*m.i53 + 0.00646518*m.i29*m.i54 + 0.00437712*m.i29*
m.i55 + 0.0050201*m.i29*m.i56 + 0.00428602*m.i29*m.i57 + 0.00339284*m.i29*m.i58 + 0.00395186*
m.i29*m.i59 + 0.00369852*m.i29*m.i60 + 0.01069104*m.i29*m.i61 + 0.00877524*m.i29*m.i62 +
0.00780122*m.i29*m.i63 + 0.00319846*m.i29*m.i64 + 0.00522668*m.i29*m.i65 + 0.00318906*m.i29*m.i66
+ 0.00765554*m.i29*m.i67 + 0.00353436*m.i29*m.i68 + 0.0090668*m.i29*m.i69 + 0.0062235*m.i29*
m.i70 + 0.00879038*m.i29*m.i71 + 0.00661754*m.i29*m.i72 + 0.00355728*m.i29*m.i73 + 0.0041974*
m.i29*m.i74 + 0.00530048*m.i29*m.i75 + 0.00543652*m.i29*m.i76 + 0.00436164*m.i29*m.i77 +
0.00450742*m.i29*m.i78 + 0.00725294*m.i29*m.i79 + 0.00491692*m.i29*m.i80 + 0.00689594*m.i29*m.i81
+ 0.00288614*m.i29*m.i82 + 0.005327*m.i29*m.i83 + 0.00356482*m.i29*m.i84 + 0.00320232*m.i29*
m.i85 + 0.00401206*m.i29*m.i86 + 0.00746968*m.i29*m.i87 + 0.01484586*m.i29*m.i88 + 0.00405332*
m.i29*m.i89 + 0.00646554*m.i29*m.i90 + 0.00398186*m.i29*m.i91 + 0.0045419*m.i29*m.i92 +
0.00249602*m.i29*m.i93 + 0.00344506*m.i29*m.i94 + 0.0046313*m.i29*m.i95 + 0.01012898*m.i29*m.i96
+ 0.00666118*m.i29*m.i97 + 0.00510452*m.i29*m.i98 + 0.00865974*m.i29*m.i99 + 0.00556162*m.i29*
m.i100 + 0.01432038*m.i30*m.i31 + 0.048762*m.i30*m.i32 + 0.03246*m.i30*m.i33 + 0.00510162*m.i30*
m.i34 + 0.00990812*m.i30*m.i35 + 0.0782504*m.i30*m.i36 + 0.0336068*m.i30*m.i37 + 0.00740496*m.i30
*m.i38 + 0.0520556*m.i30*m.i39 + 0.0689666*m.i30*m.i40 + 0.0338084*m.i30*m.i41 + 0.0303886*m.i30*
m.i42 + 0.01530392*m.i30*m.i43 + 0.0286584*m.i30*m.i44 + 0.001838718*m.i30*m.i45 + 0.01735792*
m.i30*m.i46 + 0.0257124*m.i30*m.i47 + 0.01952576*m.i30*m.i48 + 0.0285968*m.i30*m.i49 + 0.0597966*
m.i30*m.i50 + 0.0235442*m.i30*m.i51 + 0.0356002*m.i30*m.i52 + 0.056815*m.i30*m.i53 + 0.031993*
m.i30*m.i54 + 0.0256864*m.i30*m.i55 + 0.012682*m.i30*m.i56 + 0.01927838*m.i30*m.i57 + 0.0132181*
m.i30*m.i58 + 0.0308396*m.i30*m.i59 + 0.01646776*m.i30*m.i60 + 0.0691402*m.i30*m.i61 + 0.0539688*
m.i30*m.i62 + 0.0253122*m.i30*m.i63 + 0.0217306*m.i30*m.i64 + 0.0238236*m.i30*m.i65 + 0.01199066*
m.i30*m.i66 + 0.0301278*m.i30*m.i67 + 0.0209952*m.i30*m.i68 + 0.0484514*m.i30*m.i69 + 0.0226726*
m.i30*m.i70 + 0.02153*m.i30*m.i71 + 0.023498*m.i30*m.i72 + 0.0217474*m.i30*m.i73 + 0.0363548*
m.i30*m.i74 + 0.0290864*m.i30*m.i75 + 0.01738014*m.i30*m.i76 + 0.0248066*m.i30*m.i77 + 0.01560782
*m.i30*m.i78 + 0.0735134*m.i30*m.i79 + 0.0216582*m.i30*m.i80 + 0.030706*m.i30*m.i81 + 0.00888388*
m.i30*m.i82 + 0.00819988*m.i30*m.i83 + 0.02421*m.i30*m.i84 + 0.01903928*m.i30*m.i85 + 0.0384208*
m.i30*m.i86 + 0.0308632*m.i30*m.i87 + 0.112101*m.i30*m.i88 + 0.0313082*m.i30*m.i89 + 0.0480838*
m.i30*m.i90 + 0.0265036*m.i30*m.i91 + 0.0219052*m.i30*m.i92 + 0.01243318*m.i30*m.i93 + 0.00866336
*m.i30*m.i94 + 0.0318698*m.i30*m.i95 + 0.0809696*m.i30*m.i96 + 0.0362056*m.i30*m.i97 + 0.0307602*
m.i30*m.i98 + 0.0452826*m.i30*m.i99 + 0.0359652*m.i30*m.i100 + 0.01352968*m.i31*m.i32 +
0.01461656*m.i31*m.i33 + 0.00410226*m.i31*m.i34 + 0.00308616*m.i31*m.i35 + 0.0221942*m.i31*m.i36
+ 0.0095014*m.i31*m.i37 + 0.0001894118*m.i31*m.i38 + 0.01328104*m.i31*m.i39 + 0.0207254*m.i31*
m.i40 + 0.01363894*m.i31*m.i41 + 0.01129202*m.i31*m.i42 + 0.0108266*m.i31*m.i43 + 0.01097008*
m.i31*m.i44 + 0.00461712*m.i31*m.i45 + 0.00463752*m.i31*m.i46 + 0.00929264*m.i31*m.i47 +
0.00473752*m.i31*m.i48 + 0.0114599*m.i31*m.i49 + 0.0117742*m.i31*m.i50 + 0.0088573*m.i31*m.i51 +
0.0075837*m.i31*m.i52 + 0.00658756*m.i31*m.i53 + 0.0113218*m.i31*m.i54 + 0.00930362*m.i31*m.i55
+ 0.01063604*m.i31*m.i56 + 0.00432704*m.i31*m.i57 + 0.00804616*m.i31*m.i58 + 0.01180986*m.i31*
m.i59 + 0.0009047*m.i31*m.i60 + 0.01200762*m.i31*m.i61 + 0.00940268*m.i31*m.i62 + 0.01417994*
m.i31*m.i63 + 0.0076164*m.i31*m.i64 + 0.00575322*m.i31*m.i65 + 0.00834872*m.i31*m.i66 +
0.00454676*m.i31*m.i67 + 0.00544346*m.i31*m.i68 + 0.0132866*m.i31*m.i69 + 0.00553084*m.i31*m.i70
+ 0.01147094*m.i31*m.i71 + 0.00577578*m.i31*m.i72 + 0.00887008*m.i31*m.i73 + 0.01059428*m.i31*
m.i74 + 0.0040723*m.i31*m.i75 + 0.00207936*m.i31*m.i76 + 0.01175316*m.i31*m.i77 + 0.00278464*
m.i31*m.i78 + 0.00880162*m.i31*m.i79 + 0.0087823*m.i31*m.i80 + 0.00669872*m.i31*m.i81 +
0.001695732*m.i31*m.i82 + 0.01128974*m.i31*m.i83 + 0.0131319*m.i31*m.i84 + 0.00861518*m.i31*m.i85
+ 0.01080682*m.i31*m.i86 + 0.00523332*m.i31*m.i87 + 0.0207656*m.i31*m.i88 + 0.00591302*m.i31*
m.i89 + 0.00439716*m.i31*m.i90 + 0.0115743*m.i31*m.i91 + 0.00995262*m.i31*m.i92 + 0.000428388*
m.i31*m.i93 + 0.00464012*m.i31*m.i94 + 0.00813868*m.i31*m.i95 + 0.00570582*m.i31*m.i96 +
0.00954936*m.i31*m.i97 + 0.01038358*m.i31*m.i98 + 0.00920842*m.i31*m.i99 + 0.01146966*m.i31*
m.i100 + 0.0209668*m.i32*m.i33 + 0.0108011*m.i32*m.i34 + 0.01248282*m.i32*m.i35 + 0.0530038*m.i32
*m.i36 + 0.0301486*m.i32*m.i37 + 0.00760388*m.i32*m.i38 + 0.0317898*m.i32*m.i39 + 0.0642986*m.i32
*m.i40 + 0.0332684*m.i32*m.i41 + 0.0235182*m.i32*m.i42 + 0.0143552*m.i32*m.i43 + 0.0235288*m.i32*
m.i44 + 0.00682838*m.i32*m.i45 + 0.01137478*m.i32*m.i46 + 0.0318282*m.i32*m.i47 + 0.00984204*
m.i32*m.i48 + 0.0207836*m.i32*m.i49 + 0.0371082*m.i32*m.i50 + 0.01715818*m.i32*m.i51 + 0.0184894*
m.i32*m.i52 + 0.0241264*m.i32*m.i53 + 0.0254814*m.i32*m.i54 + 0.01913224*m.i32*m.i55 + 0.0212986*
m.i32*m.i56 + 0.01167336*m.i32*m.i57 + 0.01191892*m.i32*m.i58 + 0.0246844*m.i32*m.i59 +
0.00772776*m.i32*m.i60 + 0.0424102*m.i32*m.i61 + 0.0330624*m.i32*m.i62 + 0.0190237*m.i32*m.i63 +
0.01185726*m.i32*m.i64 + 0.01593976*m.i32*m.i65 + 0.00931156*m.i32*m.i66 + 0.01976096*m.i32*m.i67
+ 0.00940704*m.i32*m.i68 + 0.0353824*m.i32*m.i69 + 0.01637874*m.i32*m.i70 + 0.0234414*m.i32*
m.i71 + 0.01981882*m.i32*m.i72 + 0.01518934*m.i32*m.i73 + 0.0206944*m.i32*m.i74 + 0.01368518*
m.i32*m.i75 + 0.01085922*m.i32*m.i76 + 0.0142422*m.i32*m.i77 + 0.01225292*m.i32*m.i78 + 0.025216*
m.i32*m.i79 + 0.01581384*m.i32*m.i80 + 0.0226748*m.i32*m.i81 + 0.0078489*m.i32*m.i82 + 0.00488232
*m.i32*m.i83 + 0.01715432*m.i32*m.i84 + 0.01617784*m.i32*m.i85 + 0.0224728*m.i32*m.i86 +
0.0213528*m.i32*m.i87 + 0.0404024*m.i32*m.i88 + 0.00700416*m.i32*m.i89 + 0.0284686*m.i32*m.i90 +
0.01764584*m.i32*m.i91 + 0.01747106*m.i32*m.i92 + 0.00781272*m.i32*m.i93 + 0.01173676*m.i32*m.i94
+ 0.01901852*m.i32*m.i95 + 0.032411*m.i32*m.i96 + 0.0238232*m.i32*m.i97 + 0.021198*m.i32*m.i98
+ 0.0300116*m.i32*m.i99 + 0.0354006*m.i32*m.i100 + 0.0090127*m.i33*m.i34 + 0.00772724*m.i33*
m.i35 + 0.0313702*m.i33*m.i36 + 0.01413346*m.i33*m.i37 + 0.001835906*m.i33*m.i38 + 0.01789618*
m.i33*m.i39 + 0.0342932*m.i33*m.i40 + 0.0203234*m.i33*m.i41 + 0.01859662*m.i33*m.i42 + 0.00949822
*m.i33*m.i43 + 0.0173394*m.i33*m.i44 + 0.00462026*m.i33*m.i45 + 0.0076766*m.i33*m.i46 + 0.0195887
*m.i33*m.i47 + 0.00677792*m.i33*m.i48 + 0.01593666*m.i33*m.i49 + 0.0205366*m.i33*m.i50 +
0.01028686*m.i33*m.i51 + 0.01380638*m.i33*m.i52 + 0.0139701*m.i33*m.i53 + 0.016589*m.i33*m.i54 +
0.0139115*m.i33*m.i55 + 0.01339328*m.i33*m.i56 + 0.00706492*m.i33*m.i57 + 0.01010916*m.i33*m.i58
+ 0.0112109*m.i33*m.i59 + 0.0038394*m.i33*m.i60 + 0.0232104*m.i33*m.i61 + 0.01960694*m.i33*m.i62
+ 0.01805454*m.i33*m.i63 + 0.01327968*m.i33*m.i64 + 0.0135282*m.i33*m.i65 + 0.0101248*m.i33*
m.i66 + 0.00800254*m.i33*m.i67 + 0.0030849*m.i33*m.i68 + 0.0205056*m.i33*m.i69 + 0.00997944*m.i33
*m.i70 + 0.01867754*m.i33*m.i71 + 0.01023414*m.i33*m.i72 + 0.01414764*m.i33*m.i73 + 0.01623304*
m.i33*m.i74 + 0.00580254*m.i33*m.i75 + 0.00688906*m.i33*m.i76 + 0.01955742*m.i33*m.i77 +
0.0043617*m.i33*m.i78 + 0.0110714*m.i33*m.i79 + 0.00837212*m.i33*m.i80 + 0.0186224*m.i33*m.i81 +
0.0038599*m.i33*m.i82 + 0.01828456*m.i33*m.i83 + 0.01460176*m.i33*m.i84 + 0.00984126*m.i33*m.i85
+ 0.01375926*m.i33*m.i86 + 0.01081848*m.i33*m.i87 + 0.0294078*m.i33*m.i88 + 0.00904426*m.i33*
m.i89 + 0.01335384*m.i33*m.i90 + 0.00944562*m.i33*m.i91 + 0.01586856*m.i33*m.i92 + 0.00253356*
m.i33*m.i93 + 0.00579828*m.i33*m.i94 + 0.01264366*m.i33*m.i95 + 0.0212436*m.i33*m.i96 + 0.014968*
m.i33*m.i97 + 0.01459146*m.i33*m.i98 + 0.01990882*m.i33*m.i99 + 0.020898*m.i33*m.i100 + 0.0078456
*m.i34*m.i35 + 0.01102212*m.i34*m.i36 + 0.00676724*m.i34*m.i37 + 0.00365266*m.i34*m.i38 +
0.00595098*m.i34*m.i39 + 0.01153866*m.i34*m.i40 + 0.01058304*m.i34*m.i41 + 0.00838326*m.i34*m.i42
+ 0.00601354*m.i34*m.i43 + 0.00621002*m.i34*m.i44 + 0.00388646*m.i34*m.i45 + 0.00291464*m.i34*
m.i46 + 0.01279302*m.i34*m.i47 + 0.001590652*m.i34*m.i48 + 0.00546164*m.i34*m.i49 + 0.00756668*
m.i34*m.i50 + 0.00255946*m.i34*m.i51 + 0.00586752*m.i34*m.i52 - 0.0001086844*m.i34*m.i53 +
0.00756758*m.i34*m.i54 + 0.00472132*m.i34*m.i55 + 0.0090114*m.i34*m.i56 + 0.00404276*m.i34*m.i57
+ 0.00259172*m.i34*m.i58 + 0.0043188*m.i34*m.i59 + 0.00265148*m.i34*m.i60 + 0.00988174*m.i34*
m.i61 + 0.00773706*m.i34*m.i62 + 0.00871216*m.i34*m.i63 + 0.0051719*m.i34*m.i64 + 0.005674*m.i34*
m.i65 + 0.0042472*m.i34*m.i66 + 0.0029352*m.i34*m.i67 + 0.00380488*m.i34*m.i68 + 0.00782908*m.i34
*m.i69 + 0.00528678*m.i34*m.i70 + 0.01141144*m.i34*m.i71 + 0.00731358*m.i34*m.i72 + 0.00557996*
m.i34*m.i73 + 0.00428558*m.i34*m.i74 + 0.00214164*m.i34*m.i75 + 0.001888024*m.i34*m.i76 +
0.00450712*m.i34*m.i77 + 0.001974898*m.i34*m.i78 + 0.000555542*m.i34*m.i79 + 0.004826*m.i34*m.i80
+ 0.01009798*m.i34*m.i81 + 0.00342408*m.i34*m.i82 + 0.0066259*m.i34*m.i83 + 0.00557372*m.i34*
m.i84 + 0.00493326*m.i34*m.i85 + 0.0033431*m.i34*m.i86 + 0.00355798*m.i34*m.i87 + 0.0070914*m.i34
*m.i88 + 0.00319452*m.i34*m.i89 + 0.001165088*m.i34*m.i90 + 0.00330168*m.i34*m.i91 + 0.00487072*
m.i34*m.i92 + 0.001039364*m.i34*m.i93 + 0.00462638*m.i34*m.i94 + 0.00474964*m.i34*m.i95 +
0.00307738*m.i34*m.i96 + 0.00634158*m.i34*m.i97 + 0.0093911*m.i34*m.i98 + 0.00479968*m.i34*m.i99
+ 0.00945466*m.i34*m.i100 + 0.00886108*m.i35*m.i36 + 0.008324*m.i35*m.i37 + 0.0042517*m.i35*
m.i38 + 0.0063195*m.i35*m.i39 + 0.00897334*m.i35*m.i40 + 0.01438534*m.i35*m.i41 + 0.00707384*
m.i35*m.i42 + 0.00524994*m.i35*m.i43 + 0.00729354*m.i35*m.i44 + 0.00231104*m.i35*m.i45 +
0.00317018*m.i35*m.i46 + 0.01095322*m.i35*m.i47 + 0.00256082*m.i35*m.i48 + 0.0066693*m.i35*m.i49
+ 0.00896786*m.i35*m.i50 + 0.00243944*m.i35*m.i51 + 0.00542922*m.i35*m.i52 + 0.001853016*m.i35*
m.i53 + 0.0080304*m.i35*m.i54 + 0.004194*m.i35*m.i55 + 0.00944224*m.i35*m.i56 + 0.0044097*m.i35*
m.i57 + 0.00234874*m.i35*m.i58 + 0.0045055*m.i35*m.i59 + 0.00387194*m.i35*m.i60 + 0.01070194*
m.i35*m.i61 + 0.01020854*m.i35*m.i62 + 0.00869604*m.i35*m.i63 + 0.0038381*m.i35*m.i64 +
0.00566828*m.i35*m.i65 + 0.00392276*m.i35*m.i66 + 0.00493806*m.i35*m.i67 + 0.00543634*m.i35*m.i68
+ 0.01090284*m.i35*m.i69 + 0.00744802*m.i35*m.i70 + 0.01323476*m.i35*m.i71 + 0.00994186*m.i35*
m.i72 + 0.00554564*m.i35*m.i73 + 0.00631474*m.i35*m.i74 + 0.00456554*m.i35*m.i75 + 0.00357674*
m.i35*m.i76 + 0.00520436*m.i35*m.i77 + 0.0030095*m.i35*m.i78 + 0.0057729*m.i35*m.i79 + 0.00411204
*m.i35*m.i80 + 0.00953392*m.i35*m.i81 + 0.00378046*m.i35*m.i82 + 0.00572152*m.i35*m.i83 +
0.00613732*m.i35*m.i84 + 0.00382166*m.i35*m.i85 + 0.00356476*m.i35*m.i86 + 0.00634394*m.i35*m.i87
+ 0.0111758*m.i35*m.i88 + 0.00567884*m.i35*m.i89 + 0.00368822*m.i35*m.i90 + 0.00382434*m.i35*
m.i91 + 0.00295216*m.i35*m.i92 + 0.00261056*m.i35*m.i93 + 0.00538486*m.i35*m.i94 + 0.00508518*
m.i35*m.i95 + 0.00571674*m.i35*m.i96 + 0.00749186*m.i35*m.i97 + 0.00986618*m.i35*m.i98 +
0.00565378*m.i35*m.i99 + 0.0094721*m.i35*m.i100 + 0.0440606*m.i36*m.i37 + 0.0069763*m.i36*m.i38
+ 0.0493166*m.i36*m.i39 + 0.121634*m.i36*m.i40 + 0.0358136*m.i36*m.i41 + 0.0380066*m.i36*m.i42
+ 0.0240066*m.i36*m.i43 + 0.0315302*m.i36*m.i44 + 0.00778714*m.i36*m.i45 + 0.01711478*m.i36*
m.i46 + 0.0433014*m.i36*m.i47 + 0.01592312*m.i36*m.i48 + 0.0219624*m.i36*m.i49 + 0.0584382*m.i36*
m.i50 + 0.0237454*m.i36*m.i51 + 0.030079*m.i36*m.i52 + 0.0450814*m.i36*m.i53 + 0.0285826*m.i36*
m.i54 + 0.0266392*m.i36*m.i55 + 0.01830758*m.i36*m.i56 + 0.01364522*m.i36*m.i57 + 0.01568*m.i36*
m.i58 + 0.0359108*m.i36*m.i59 + 0.00643528*m.i36*m.i60 + 0.056249*m.i36*m.i61 + 0.0503568*m.i36*
m.i62 + 0.0221574*m.i36*m.i63 + 0.023432*m.i36*m.i64 + 0.0219264*m.i36*m.i65 + 0.01946022*m.i36*
m.i66 + 0.0301552*m.i36*m.i67 + 0.00986666*m.i36*m.i68 + 0.0496472*m.i36*m.i69 + 0.0177644*m.i36*
m.i70 + 0.0308856*m.i36*m.i71 + 0.01899074*m.i36*m.i72 + 0.01805938*m.i36*m.i73 + 0.0273694*m.i36
*m.i74 + 0.01662774*m.i36*m.i75 + 0.00832596*m.i36*m.i76 + 0.0203852*m.i36*m.i77 + 0.0174271*
m.i36*m.i78 + 0.039217*m.i36*m.i79 + 0.0232082*m.i36*m.i80 + 0.0357644*m.i36*m.i81 + 0.00331724*
m.i36*m.i82 + 0.0276304*m.i36*m.i83 + 0.0267904*m.i36*m.i84 + 0.02756*m.i36*m.i85 + 0.0320374*
m.i36*m.i86 + 0.0222598*m.i36*m.i87 + 0.0496644*m.i36*m.i88 + 0.01118028*m.i36*m.i89 + 0.0432572*
m.i36*m.i90 + 0.027434*m.i36*m.i91 + 0.0293774*m.i36*m.i92 + 0.0055352*m.i36*m.i93 + 0.00852418*
m.i36*m.i94 + 0.028037*m.i36*m.i95 + 0.0642512*m.i36*m.i96 + 0.0386458*m.i36*m.i97 + 0.040981*
m.i36*m.i98 + 0.04604*m.i36*m.i99 + 0.0478424*m.i36*m.i100 + 0.00525362*m.i37*m.i38 + 0.0212576*
m.i37*m.i39 + 0.0543916*m.i37*m.i40 + 0.018282*m.i37*m.i41 + 0.01700698*m.i37*m.i42 + 0.00953368*
m.i37*m.i43 + 0.0147155*m.i37*m.i44 + 0.00425042*m.i37*m.i45 + 0.00777022*m.i37*m.i46 +
0.01646346*m.i37*m.i47 + 0.00740598*m.i37*m.i48 + 0.01274586*m.i37*m.i49 + 0.0282742*m.i37*m.i50
+ 0.01506898*m.i37*m.i51 + 0.01409464*m.i37*m.i52 + 0.01916222*m.i37*m.i53 + 0.01572296*m.i37*
m.i54 + 0.01361714*m.i37*m.i55 + 0.01302042*m.i37*m.i56 + 0.00807862*m.i37*m.i57 + 0.00701644*
m.i37*m.i58 + 0.0201438*m.i37*m.i59 + 0.00497496*m.i37*m.i60 + 0.0259544*m.i37*m.i61 + 0.01982096
*m.i37*m.i62 + 0.01082904*m.i37*m.i63 + 0.00909066*m.i37*m.i64 + 0.0112364*m.i37*m.i65 +
0.0089483*m.i37*m.i66 + 0.01522148*m.i37*m.i67 + 0.00459152*m.i37*m.i68 + 0.0214858*m.i37*m.i69
+ 0.01075074*m.i37*m.i70 + 0.0132224*m.i37*m.i71 + 0.00980738*m.i37*m.i72 + 0.00885252*m.i37*
m.i73 + 0.01427422*m.i37*m.i74 + 0.00903996*m.i37*m.i75 + 0.00768272*m.i37*m.i76 + 0.0103221*
m.i37*m.i77 + 0.01082002*m.i37*m.i78 + 0.0248284*m.i37*m.i79 + 0.01098172*m.i37*m.i80 +
0.01335848*m.i37*m.i81 + 0.00545734*m.i37*m.i82 + 0.00921544*m.i37*m.i83 + 0.0110069*m.i37*m.i84
+ 0.01385998*m.i37*m.i85 + 0.01437348*m.i37*m.i86 + 0.01621552*m.i37*m.i87 + 0.01981332*m.i37*
m.i88 + 0.00549314*m.i37*m.i89 + 0.0210958*m.i37*m.i90 + 0.0116061*m.i37*m.i91 + 0.01444326*m.i37
*m.i92 + 0.00631646*m.i37*m.i93 + 0.00847398*m.i37*m.i94 + 0.0132838*m.i37*m.i95 + 0.0257442*
m.i37*m.i96 + 0.01746728*m.i37*m.i97 + 0.01331586*m.i37*m.i98 + 0.0246618*m.i37*m.i99 + 0.0231186
*m.i37*m.i100 + 0.00427726*m.i38*m.i39 + 0.00960742*m.i38*m.i40 + 0.00588794*m.i38*m.i41 +
0.0040899*m.i38*m.i42 + 0.00370486*m.i38*m.i43 + 0.001581616*m.i38*m.i44 + 0.00157779*m.i38*m.i45
+ 0.001517842*m.i38*m.i46 + 0.00577098*m.i38*m.i47 + 0.00184948*m.i38*m.i48 + 0.001412132*m.i38*
m.i49 + 0.00473326*m.i38*m.i50 + 0.001265572*m.i38*m.i51 + 0.00389392*m.i38*m.i52 + 0.00195541*
m.i38*m.i53 + 0.0045747*m.i38*m.i54 + 0.003024*m.i38*m.i55 + 0.00322834*m.i38*m.i56 + 0.00240162*
m.i38*m.i57 + 0.000494648*m.i38*m.i58 + 0.0035117*m.i38*m.i59 + 0.00302272*m.i38*m.i60 +
0.0067192*m.i38*m.i61 + 0.00576934*m.i38*m.i62 + 0.00236514*m.i38*m.i63 + 0.00208302*m.i38*m.i64
+ 0.00359594*m.i38*m.i65 + 0.001590092*m.i38*m.i66 + 0.00239398*m.i38*m.i67 + 0.00302224*m.i38*
m.i68 + 0.00326928*m.i38*m.i69 + 0.00302294*m.i38*m.i70 + 0.0049377*m.i38*m.i71 + 0.00553496*
m.i38*m.i72 + 0.00229972*m.i38*m.i73 + 0.00318332*m.i38*m.i74 + 0.00325074*m.i38*m.i75 +
0.001803886*m.i38*m.i76 + 0.000902562*m.i38*m.i77 + 0.001651326*m.i38*m.i78 + 0.0039935*m.i38*
m.i79 + 0.00233242*m.i38*m.i80 + 0.00546644*m.i38*m.i81 + 0.00223454*m.i38*m.i82 - 0.001681894*
m.i38*m.i83 + 0.0025273*m.i38*m.i84 + 0.0032781*m.i38*m.i85 + 0.001557044*m.i38*m.i86 +
0.00327138*m.i38*m.i87 + 0.00674346*m.i38*m.i88 + 0.0020784*m.i38*m.i89 + 0.00343958*m.i38*m.i90
+ 0.00324954*m.i38*m.i91 + 0.00206404*m.i38*m.i92 + 0.00161462*m.i38*m.i93 + 0.00247166*m.i38*
m.i94 + 0.00341238*m.i38*m.i95 + 0.00585902*m.i38*m.i96 + 0.00423638*m.i38*m.i97 + 0.00566634*
m.i38*m.i98 + 0.00315378*m.i38*m.i99 + 0.00449598*m.i38*m.i100 + 0.0491892*m.i39*m.i40 +
0.0262408*m.i39*m.i41 + 0.0205234*m.i39*m.i42 + 0.01409356*m.i39*m.i43 + 0.0195666*m.i39*m.i44 +
0.00525174*m.i39*m.i45 + 0.01076856*m.i39*m.i46 + 0.0216478*m.i39*m.i47 + 0.01097136*m.i39*m.i48
+ 0.0178672*m.i39*m.i49 + 0.0324104*m.i39*m.i50 + 0.0147971*m.i39*m.i51 + 0.01855664*m.i39*m.i52
+ 0.0250992*m.i39*m.i53 + 0.0213078*m.i39*m.i54 + 0.01575182*m.i39*m.i55 + 0.01438592*m.i39*
m.i56 + 0.0105253*m.i39*m.i57 + 0.01177712*m.i39*m.i58 + 0.0207946*m.i39*m.i59 + 0.00650454*m.i39
*m.i60 + 0.036126*m.i39*m.i61 + 0.0278076*m.i39*m.i62 + 0.0206546*m.i39*m.i63 + 0.01499036*m.i39*
m.i64 + 0.01276412*m.i39*m.i65 + 0.0125414*m.i39*m.i66 + 0.01617824*m.i39*m.i67 + 0.010394*m.i39*
m.i68 + 0.0290228*m.i39*m.i69 + 0.01190924*m.i39*m.i70 + 0.01824964*m.i39*m.i71 + 0.014012*m.i39*
m.i72 + 0.01408568*m.i39*m.i73 + 0.0192582*m.i39*m.i74 + 0.01283914*m.i39*m.i75 + 0.00757714*
m.i39*m.i76 + 0.0157748*m.i39*m.i77 + 0.00886562*m.i39*m.i78 + 0.0226622*m.i39*m.i79 + 0.01506442
*m.i39*m.i80 + 0.01868878*m.i39*m.i81 + 0.00371016*m.i39*m.i82 + 0.01245306*m.i39*m.i83 +
0.01693888*m.i39*m.i84 + 0.0145704*m.i39*m.i85 + 0.0207926*m.i39*m.i86 + 0.01487822*m.i39*m.i87
+ 0.0465058*m.i39*m.i88 + 0.01052428*m.i39*m.i89 + 0.0220072*m.i39*m.i90 + 0.01887928*m.i39*
m.i91 + 0.01597714*m.i39*m.i92 + 0.00531126*m.i39*m.i93 + 0.00658506*m.i39*m.i94 + 0.01713092*
m.i39*m.i95 + 0.0328166*m.i39*m.i96 + 0.0213542*m.i39*m.i97 + 0.0210286*m.i39*m.i98 + 0.0255336*
m.i39*m.i99 + 0.0274274*m.i39*m.i100 + 0.0504412*m.i40*m.i41 + 0.0336102*m.i40*m.i42 + 0.0294804*
m.i40*m.i43 + 0.0424704*m.i40*m.i44 + 0.0030095*m.i40*m.i45 + 0.01146224*m.i40*m.i46 + 0.0507426*
m.i40*m.i47 + 0.01585054*m.i40*m.i48 + 0.0217164*m.i40*m.i49 + 0.0491478*m.i40*m.i50 + 0.0317926*
m.i40*m.i51 + 0.0284682*m.i40*m.i52 + 0.0468934*m.i40*m.i53 + 0.0309254*m.i40*m.i54 + 0.028626*
m.i40*m.i55 + 0.0309698*m.i40*m.i56 + 0.01062184*m.i40*m.i57 + 0.01987174*m.i40*m.i58 + 0.0429952
*m.i40*m.i59 + 0.00300922*m.i40*m.i60 + 0.0574936*m.i40*m.i61 + 0.0496304*m.i40*m.i62 +
0.01678646*m.i40*m.i63 + 0.0153295*m.i40*m.i64 + 0.0230176*m.i40*m.i65 + 0.0200972*m.i40*m.i66 +
0.0274442*m.i40*m.i67 - 0.00465404*m.i40*m.i68 + 0.0404524*m.i40*m.i69 + 0.01243058*m.i40*m.i70
+ 0.0333654*m.i40*m.i71 + 0.01847532*m.i40*m.i72 + 0.01863464*m.i40*m.i73 + 0.01865328*m.i40*
m.i74 + 0.0086314*m.i40*m.i75 + 0.0107773*m.i40*m.i76 + 0.0203618*m.i40*m.i77 + 0.01445046*m.i40*
m.i78 + 0.0410886*m.i40*m.i79 + 0.01194082*m.i40*m.i80 + 0.044529*m.i40*m.i81 + 0.00528742*m.i40*
m.i82 + 0.0445722*m.i40*m.i83 + 0.0229102*m.i40*m.i84 + 0.0241064*m.i40*m.i85 + 0.0368384*m.i40*
m.i86 + 0.0327072*m.i40*m.i87 + 0.0612044*m.i40*m.i88 + 0.0029601*m.i40*m.i89 + 0.0534994*m.i40*
m.i90 + 0.0258428*m.i40*m.i91 + 0.0317582*m.i40*m.i92 + 0.00965728*m.i40*m.i93 + 0.01437522*m.i40
*m.i94 + 0.0249652*m.i40*m.i95 + 0.0605768*m.i40*m.i96 + 0.0345084*m.i40*m.i97 + 0.0313726*m.i40*
m.i98 + 0.064674*m.i40*m.i99 + 0.0504464*m.i40*m.i100 + 0.0211266*m.i41*m.i42 + 0.0280268*m.i41*
m.i43 + 0.0396958*m.i41*m.i44 + 0.00245084*m.i41*m.i45 + 0.00955952*m.i41*m.i46 + 0.0396834*m.i41
*m.i47 + 0.0061862*m.i41*m.i48 + 0.02227*m.i41*m.i49 + 0.0217142*m.i41*m.i50 + 0.00978418*m.i41*
m.i51 + 0.01479238*m.i41*m.i52 + 0.016171*m.i41*m.i53 + 0.0243916*m.i41*m.i54 + 0.01422356*m.i41*
m.i55 + 0.0283342*m.i41*m.i56 + 0.00801394*m.i41*m.i57 + 0.01783044*m.i41*m.i58 + 0.01283818*
m.i41*m.i59 + 0.00500652*m.i41*m.i60 + 0.0289002*m.i41*m.i61 + 0.0313062*m.i41*m.i62 + 0.0372108*
m.i41*m.i63 + 0.0192516*m.i41*m.i64 + 0.0152555*m.i41*m.i65 + 0.01848886*m.i41*m.i66 + 0.01396382
*m.i41*m.i67 + 0.01323774*m.i41*m.i68 + 0.0319484*m.i41*m.i69 + 0.01505338*m.i41*m.i70 +
0.0464724*m.i41*m.i71 + 0.0275962*m.i41*m.i72 + 0.01531976*m.i41*m.i73 + 0.0159052*m.i41*m.i74 +
0.00897454*m.i41*m.i75 + 0.00931212*m.i41*m.i76 + 0.01958562*m.i41*m.i77 + 0.00344582*m.i41*m.i78
+ 0.00874906*m.i41*m.i79 + 0.01063594*m.i41*m.i80 + 0.02994*m.i41*m.i81 + 0.000668906*m.i41*
m.i82 + 0.0436128*m.i41*m.i83 + 0.0233408*m.i41*m.i84 + 0.00754018*m.i41*m.i85 + 0.01805636*m.i41
*m.i86 + 0.01281402*m.i41*m.i87 + 0.0523726*m.i41*m.i88 + 0.00844562*m.i41*m.i89 + 0.01302218*
m.i41*m.i90 + 0.01396562*m.i41*m.i91 + 0.01458222*m.i41*m.i92 + 0.0072903*m.i41*m.i93 +
0.00709746*m.i41*m.i94 + 0.01473562*m.i41*m.i95 + 0.01085782*m.i41*m.i96 + 0.021406*m.i41*m.i97
+ 0.0295828*m.i41*m.i98 + 0.01994264*m.i41*m.i99 + 0.0263314*m.i41*m.i100 + 0.01525376*m.i42*
m.i43 + 0.01763084*m.i42*m.i44 + 0.00749008*m.i42*m.i45 + 0.00916454*m.i42*m.i46 + 0.0235102*
m.i42*m.i47 + 0.00921988*m.i42*m.i48 + 0.01347394*m.i42*m.i49 + 0.0247352*m.i42*m.i50 +
0.01120346*m.i42*m.i51 + 0.01858118*m.i42*m.i52 + 0.01723882*m.i42*m.i53 + 0.0208142*m.i42*m.i54
+ 0.01360838*m.i42*m.i55 + 0.0118194*m.i42*m.i56 + 0.00860676*m.i42*m.i57 + 0.00935934*m.i42*
m.i58 + 0.01516418*m.i42*m.i59 + 0.0068076*m.i42*m.i60 + 0.028779*m.i42*m.i61 + 0.0258494*m.i42*
m.i62 + 0.0233604*m.i42*m.i63 + 0.01573382*m.i42*m.i64 + 0.01049188*m.i42*m.i65 + 0.00740748*
m.i42*m.i66 + 0.01082116*m.i42*m.i67 + 0.00777482*m.i42*m.i68 + 0.0240088*m.i42*m.i69 +
0.01102072*m.i42*m.i70 + 0.01820862*m.i42*m.i71 + 0.01298112*m.i42*m.i72 + 0.01234456*m.i42*m.i73
+ 0.0141652*m.i42*m.i74 + 0.00934936*m.i42*m.i75 + 0.00505832*m.i42*m.i76 + 0.01458566*m.i42*
m.i77 + 0.00728638*m.i42*m.i78 + 0.0099359*m.i42*m.i79 + 0.01486474*m.i42*m.i80 + 0.01668502*
m.i42*m.i81 + 0.00373442*m.i42*m.i82 + 0.01190258*m.i42*m.i83 + 0.01201006*m.i42*m.i84 +
0.0151776*m.i42*m.i85 + 0.0145938*m.i42*m.i86 + 0.00824462*m.i42*m.i87 + 0.0160982*m.i42*m.i88 +
0.006593*m.i42*m.i89 + 0.01418496*m.i42*m.i90 + 0.01803698*m.i42*m.i91 + 0.0159653*m.i42*m.i92 +
0.00291508*m.i42*m.i93 + 0.00538746*m.i42*m.i94 + 0.01644022*m.i42*m.i95 + 0.0250208*m.i42*m.i96
+ 0.018306*m.i42*m.i97 + 0.01797718*m.i42*m.i98 + 0.01649756*m.i42*m.i99 + 0.025412*m.i42*m.i100
+ 0.01762524*m.i43*m.i44 + 0.0026577*m.i43*m.i45 + 0.00500594*m.i43*m.i46 + 0.01987672*m.i43*
m.i47 + 0.00486026*m.i43*m.i48 + 0.01054502*m.i43*m.i49 + 0.00887754*m.i43*m.i50 + 0.00693606*
m.i43*m.i51 + 0.01006578*m.i43*m.i52 + 0.01002454*m.i43*m.i53 + 0.0138188*m.i43*m.i54 +
0.00975298*m.i43*m.i55 + 0.01686962*m.i43*m.i56 + 0.00490722*m.i43*m.i57 + 0.00949952*m.i43*m.i58
+ 0.01032096*m.i43*m.i59 + 0.00313858*m.i43*m.i60 + 0.01509816*m.i43*m.i61 + 0.0162044*m.i43*
m.i62 + 0.01875628*m.i43*m.i63 + 0.01240346*m.i43*m.i64 + 0.0085184*m.i43*m.i65 + 0.0097536*m.i43
*m.i66 + 0.00601436*m.i43*m.i67 + 0.0069333*m.i43*m.i68 + 0.01534648*m.i43*m.i69 + 0.00585324*
m.i43*m.i70 + 0.01833662*m.i43*m.i71 + 0.01219044*m.i43*m.i72 + 0.00997222*m.i43*m.i73 +
0.00950324*m.i43*m.i74 + 0.00395808*m.i43*m.i75 + 0.00230734*m.i43*m.i76 + 0.01177946*m.i43*m.i77
+ 0.00120913*m.i43*m.i78 + 0.00451336*m.i43*m.i79 + 0.0087064*m.i43*m.i80 + 0.01415418*m.i43*
m.i81 + 0.00158382*m.i43*m.i82 + 0.01934448*m.i43*m.i83 + 0.01332798*m.i43*m.i84 + 0.0073079*
m.i43*m.i85 + 0.01024086*m.i43*m.i86 + 0.00333288*m.i43*m.i87 + 0.01697646*m.i43*m.i88 +
0.00457426*m.i43*m.i89 + 0.00557218*m.i43*m.i90 + 0.0103559*m.i43*m.i91 + 0.00897022*m.i43*m.i92
+ 0.00315402*m.i43*m.i93 + 0.00504118*m.i43*m.i94 + 0.01075858*m.i43*m.i95 + 0.00678594*m.i43*
m.i96 + 0.01260626*m.i43*m.i97 + 0.0163881*m.i43*m.i98 + 0.01009846*m.i43*m.i99 + 0.01154306*
m.i43*m.i100 + 0.00483446*m.i44*m.i45 + 0.00652268*m.i44*m.i46 + 0.0242272*m.i44*m.i47 +
0.00478826*m.i44*m.i48 + 0.01685648*m.i44*m.i49 + 0.020425*m.i44*m.i50 + 0.00923526*m.i44*m.i51
+ 0.01214276*m.i44*m.i52 + 0.01807778*m.i44*m.i53 + 0.01714928*m.i44*m.i54 + 0.0117815*m.i44*
m.i55 + 0.01675568*m.i44*m.i56 + 0.0065756*m.i44*m.i57 + 0.01226174*m.i44*m.i58 + 0.0107529*m.i44
*m.i59 + 0.00316098*m.i44*m.i60 + 0.0237412*m.i44*m.i61 + 0.023095*m.i44*m.i62 + 0.0261176*m.i44*
m.i63 + 0.01217274*m.i44*m.i64 + 0.01008618*m.i44*m.i65 + 0.0100818*m.i44*m.i66 + 0.01058518*
m.i44*m.i67 + 0.00547734*m.i44*m.i68 + 0.0242058*m.i44*m.i69 + 0.01131642*m.i44*m.i70 + 0.0238346
*m.i44*m.i71 + 0.01469328*m.i44*m.i72 + 0.01153818*m.i44*m.i73 + 0.0107527*m.i44*m.i74 +
0.00664436*m.i44*m.i75 + 0.00643936*m.i44*m.i76 + 0.01819866*m.i44*m.i77 + 0.00401038*m.i44*m.i78
+ 0.00860378*m.i44*m.i79 + 0.01052694*m.i44*m.i80 + 0.01791956*m.i44*m.i81 + 0.001302356*m.i44*
m.i82 + 0.024415*m.i44*m.i83 + 0.01318656*m.i44*m.i84 + 0.00691488*m.i44*m.i85 + 0.0134211*m.i44*
m.i86 + 0.01005166*m.i44*m.i87 + 0.036692*m.i44*m.i88 + 0.00614716*m.i44*m.i89 + 0.0120958*m.i44*
m.i90 + 0.00884752*m.i44*m.i91 + 0.01296164*m.i44*m.i92 + 0.00513894*m.i44*m.i93 + 0.00596534*
m.i44*m.i94 + 0.01196692*m.i44*m.i95 + 0.01664976*m.i44*m.i96 + 0.01462126*m.i44*m.i97 +
0.0157382*m.i44*m.i98 + 0.01533824*m.i44*m.i99 + 0.0188597*m.i44*m.i100 + 0.00317774*m.i45*m.i46
+ 0.00420624*m.i45*m.i47 + 0.00199361*m.i45*m.i48 + 0.0050265*m.i45*m.i49 + 0.00894044*m.i45*
m.i50 + 0.00284776*m.i45*m.i51 + 0.00547162*m.i45*m.i52 + 0.00269966*m.i45*m.i53 + 0.0064379*
m.i45*m.i54 + 0.00472118*m.i45*m.i55 + 0.0042126*m.i45*m.i56 + 0.00394074*m.i45*m.i57 +
0.00265196*m.i45*m.i58 + 0.00448504*m.i45*m.i59 + 0.001797504*m.i45*m.i60 + 0.00867806*m.i45*
m.i61 + 0.00322858*m.i45*m.i62 + 0.00607352*m.i45*m.i63 + 0.00436738*m.i45*m.i64 + 0.00237578*
m.i45*m.i65 + 0.0044976*m.i45*m.i66 + 0.00181419*m.i45*m.i67 + 0.00495262*m.i45*m.i68 +
0.00570214*m.i45*m.i69 + 0.00422674*m.i45*m.i70 + 0.001748284*m.i45*m.i71 + 0.00347868*m.i45*
m.i72 + 0.00586478*m.i45*m.i73 + 0.00333902*m.i45*m.i74 + 0.0046385*m.i45*m.i75 + 0.001228842*
m.i45*m.i76 + 0.00595824*m.i45*m.i77 + 0.0027183*m.i45*m.i78 + 0.00108409*m.i45*m.i79 +
0.00761658*m.i45*m.i80 + 0.0005468*m.i45*m.i81 + 0.001647768*m.i45*m.i82 - 0.00572218*m.i45*m.i83
+ 0.00291394*m.i45*m.i84 + 0.00667112*m.i45*m.i85 + 0.00283124*m.i45*m.i86 + 0.00214236*m.i45*
m.i87 + 0.00913532*m.i45*m.i88 + 0.0031579*m.i45*m.i89 + 0.001671266*m.i45*m.i90 + 0.007457*m.i45
*m.i91 + 0.00539294*m.i45*m.i92 + 0.001548892*m.i45*m.i93 + 0.00325768*m.i45*m.i94 + 0.00415906*
m.i45*m.i95 + 0.00472416*m.i45*m.i96 + 0.00257908*m.i45*m.i97 + 0.00311904*m.i45*m.i98 -
0.00028754*m.i45*m.i99 + 0.00641254*m.i45*m.i100 + 0.00936266*m.i46*m.i47 + 0.00551424*m.i46*
m.i48 + 0.00665328*m.i46*m.i49 + 0.01254298*m.i46*m.i50 + 0.00457552*m.i46*m.i51 + 0.00723508*
m.i46*m.i52 + 0.01013924*m.i46*m.i53 + 0.00835722*m.i46*m.i54 + 0.00612552*m.i46*m.i55 +
0.00568528*m.i46*m.i56 + 0.00506602*m.i46*m.i57 + 0.00547684*m.i46*m.i58 + 0.00630834*m.i46*m.i59
+ 0.0034076*m.i46*m.i60 + 0.01269782*m.i46*m.i61 + 0.01056202*m.i46*m.i62 + 0.00905674*m.i46*
m.i63 + 0.00727642*m.i46*m.i64 + 0.0053986*m.i46*m.i65 + 0.00499194*m.i46*m.i66 + 0.00693256*
m.i46*m.i67 + 0.00384534*m.i46*m.i68 + 0.01113952*m.i46*m.i69 + 0.00571676*m.i46*m.i70 +
0.00918194*m.i46*m.i71 + 0.00582038*m.i46*m.i72 + 0.00587208*m.i46*m.i73 + 0.00927628*m.i46*m.i74
+ 0.00540062*m.i46*m.i75 + 0.00399822*m.i46*m.i76 + 0.00599102*m.i46*m.i77 + 0.00478388*m.i46*
m.i78 + 0.0052496*m.i46*m.i79 + 0.0080323*m.i46*m.i80 + 0.00786638*m.i46*m.i81 + 0.001854684*
m.i46*m.i82 + 0.00407872*m.i46*m.i83 + 0.00621788*m.i46*m.i84 + 0.00606418*m.i46*m.i85 +
0.00669516*m.i46*m.i86 + 0.00483036*m.i46*m.i87 + 0.00889994*m.i46*m.i88 + 0.00341184*m.i46*m.i89
+ 0.00883678*m.i46*m.i90 + 0.00699852*m.i46*m.i91 + 0.00577214*m.i46*m.i92 + 0.00238288*m.i46*
m.i93 + 0.001681122*m.i46*m.i94 + 0.00660328*m.i46*m.i95 + 0.0125098*m.i46*m.i96 + 0.00829924*
m.i46*m.i97 + 0.00843732*m.i46*m.i98 + 0.00930502*m.i46*m.i99 + 0.01141018*m.i46*m.i100 +
0.00622806*m.i47*m.i48 + 0.01275134*m.i47*m.i49 + 0.0219686*m.i47*m.i50 + 0.00559252*m.i47*m.i51
+ 0.014742*m.i47*m.i52 + 0.01293552*m.i47*m.i53 + 0.0202408*m.i47*m.i54 + 0.01276622*m.i47*m.i55
+ 0.0211842*m.i47*m.i56 + 0.00751862*m.i47*m.i57 + 0.01167596*m.i47*m.i58 + 0.0096102*m.i47*
m.i59 + 0.00476024*m.i47*m.i60 + 0.0291008*m.i47*m.i61 + 0.0293252*m.i47*m.i62 + 0.0218568*m.i47*
m.i63 + 0.01597818*m.i47*m.i64 + 0.01230724*m.i47*m.i65 + 0.01074494*m.i47*m.i66 + 0.01192482*
m.i47*m.i67 + 0.0072756*m.i47*m.i68 + 0.0259978*m.i47*m.i69 + 0.01196354*m.i47*m.i70 + 0.0346772*
m.i47*m.i71 + 0.01997802*m.i47*m.i72 + 0.0109755*m.i47*m.i73 + 0.01126216*m.i47*m.i74 +
0.00543986*m.i47*m.i75 + 0.00507998*m.i47*m.i76 + 0.01031016*m.i47*m.i77 + 0.0051788*m.i47*m.i78
+ 0.001275304*m.i47*m.i79 + 0.00993436*m.i47*m.i80 + 0.0302174*m.i47*m.i81 + 0.0025327*m.i47*
m.i82 + 0.0227778*m.i47*m.i83 + 0.01358392*m.i47*m.i84 + 0.01015524*m.i47*m.i85 + 0.01402648*
m.i47*m.i86 + 0.00789154*m.i47*m.i87 + 0.0151434*m.i47*m.i88 + 0.001278866*m.i47*m.i89 +
0.0158996*m.i47*m.i90 + 0.01154264*m.i47*m.i91 + 0.01393698*m.i47*m.i92 + 0.00304714*m.i47*m.i93
+ 0.00512466*m.i47*m.i94 + 0.01429612*m.i47*m.i95 + 0.01681572*m.i47*m.i96 + 0.01931984*m.i47*
m.i97 + 0.0267484*m.i47*m.i98 + 0.01797768*m.i47*m.i99 + 0.0282598*m.i47*m.i100 + 0.00546656*
m.i48*m.i49 + 0.01037534*m.i48*m.i50 + 0.00353598*m.i48*m.i51 + 0.00756044*m.i48*m.i52 +
0.01216498*m.i48*m.i53 + 0.00967664*m.i48*m.i54 + 0.00647364*m.i48*m.i55 + 0.00302706*m.i48*m.i56
+ 0.0053717*m.i48*m.i57 + 0.00577622*m.i48*m.i58 + 0.00544272*m.i48*m.i59 + 0.00352554*m.i48*
m.i60 + 0.01442968*m.i48*m.i61 + 0.0109524*m.i48*m.i62 + 0.00913756*m.i48*m.i63 + 0.00640136*
m.i48*m.i64 + 0.00303604*m.i48*m.i65 + 0.00380586*m.i48*m.i66 + 0.00547728*m.i48*m.i67 +
0.00370642*m.i48*m.i68 + 0.00883124*m.i48*m.i69 + 0.00549652*m.i48*m.i70 + 0.00566248*m.i48*m.i71
+ 0.00467596*m.i48*m.i72 + 0.00529964*m.i48*m.i73 + 0.00953518*m.i48*m.i74 + 0.00623786*m.i48*
m.i75 + 0.00402142*m.i48*m.i76 + 0.00662892*m.i48*m.i77 + 0.004711*m.i48*m.i78 + 0.001686804*
m.i48*m.i79 + 0.00761384*m.i48*m.i80 + 0.0057658*m.i48*m.i81 + 0.00181049*m.i48*m.i82 -
0.00054847*m.i48*m.i83 + 0.0048793*m.i48*m.i84 + 0.00598068*m.i48*m.i85 + 0.00652398*m.i48*m.i86
+ 0.0036324*m.i48*m.i87 + 0.00674584*m.i48*m.i88 + 0.00354232*m.i48*m.i89 + 0.00923644*m.i48*
m.i90 + 0.01247554*m.i48*m.i91 + 0.00613734*m.i48*m.i92 + 0.000820814*m.i48*m.i93 + 0.001893008*
m.i48*m.i94 + 0.00690274*m.i48*m.i95 + 0.01623126*m.i48*m.i96 + 0.00810288*m.i48*m.i97 +
0.00702362*m.i48*m.i98 + 0.01027006*m.i48*m.i99 + 0.01224198*m.i48*m.i100 + 0.01829412*m.i49*
m.i50 + 0.0119479*m.i49*m.i51 + 0.01038228*m.i49*m.i52 + 0.01375438*m.i49*m.i53 + 0.01480194*
m.i49*m.i54 + 0.01103368*m.i49*m.i55 + 0.01464938*m.i49*m.i56 + 0.00724638*m.i49*m.i57 +
0.00857364*m.i49*m.i58 + 0.0149174*m.i49*m.i59 + 0.00407556*m.i49*m.i60 + 0.0214208*m.i49*m.i61
+ 0.01655784*m.i49*m.i62 + 0.01832206*m.i49*m.i63 + 0.0099515*m.i49*m.i64 + 0.01025382*m.i49*
m.i65 + 0.00862324*m.i49*m.i66 + 0.00863512*m.i49*m.i67 + 0.0076467*m.i49*m.i68 + 0.0220404*m.i49
*m.i69 + 0.0095053*m.i49*m.i70 + 0.01307838*m.i49*m.i71 + 0.01047408*m.i49*m.i72 + 0.01294838*
m.i49*m.i73 + 0.01471132*m.i49*m.i74 + 0.00851398*m.i49*m.i75 + 0.00575748*m.i49*m.i76 +
0.0145716*m.i49*m.i77 + 0.00460678*m.i49*m.i78 + 0.01570596*m.i49*m.i79 + 0.00985226*m.i49*m.i80
+ 0.01023644*m.i49*m.i81 + 0.00369278*m.i49*m.i82 + 0.00860988*m.i49*m.i83 + 0.01393008*m.i49*
m.i84 + 0.00839504*m.i49*m.i85 + 0.01483048*m.i49*m.i86 + 0.01071222*m.i49*m.i87 + 0.0344974*
m.i49*m.i88 + 0.00962838*m.i49*m.i89 + 0.01169418*m.i49*m.i90 + 0.01045396*m.i49*m.i91 +
0.0095482*m.i49*m.i92 + 0.00539536*m.i49*m.i93 + 0.00663516*m.i49*m.i94 + 0.01120512*m.i49*m.i95
+ 0.01484196*m.i49*m.i96 + 0.0127009*m.i49*m.i97 + 0.01167858*m.i49*m.i98 + 0.01477446*m.i49*
m.i99 + 0.01842494*m.i49*m.i100 + 0.01663076*m.i50*m.i51 + 0.021828*m.i50*m.i52 + 0.029083*m.i50*
m.i53 + 0.0230518*m.i50*m.i54 + 0.01639088*m.i50*m.i55 + 0.01308142*m.i50*m.i56 + 0.01225642*
m.i50*m.i57 + 0.0094199*m.i50*m.i58 + 0.0222192*m.i50*m.i59 + 0.00884396*m.i50*m.i60 + 0.0415716*
m.i50*m.i61 + 0.032076*m.i50*m.i62 + 0.021259*m.i50*m.i63 + 0.01432872*m.i50*m.i64 + 0.01445944*
m.i50*m.i65 + 0.01098896*m.i50*m.i66 + 0.0219658*m.i50*m.i67 + 0.01066588*m.i50*m.i68 + 0.0354768
*m.i50*m.i69 + 0.01575178*m.i50*m.i70 + 0.01775054*m.i50*m.i71 + 0.01436852*m.i50*m.i72 +
0.01353572*m.i50*m.i73 + 0.01936092*m.i50*m.i74 + 0.01665002*m.i50*m.i75 + 0.00971184*m.i50*m.i76
+ 0.01642836*m.i50*m.i77 + 0.01382168*m.i50*m.i78 + 0.0341934*m.i50*m.i79 + 0.01843884*m.i50*
m.i80 + 0.01940942*m.i50*m.i81 + 0.00527464*m.i50*m.i82 + 0.00829608*m.i50*m.i83 + 0.0138699*
m.i50*m.i84 + 0.01840912*m.i50*m.i85 + 0.0210266*m.i50*m.i86 + 0.0205286*m.i50*m.i87 + 0.0451728*
m.i50*m.i88 + 0.01361116*m.i50*m.i89 + 0.0277252*m.i50*m.i90 + 0.01783032*m.i50*m.i91 +
0.01982086*m.i50*m.i92 + 0.00668064*m.i50*m.i93 + 0.00765962*m.i50*m.i94 + 0.01980832*m.i50*m.i95
+ 0.043863*m.i50*m.i96 + 0.0241266*m.i50*m.i97 + 0.0216094*m.i50*m.i98 + 0.0284306*m.i50*m.i99
+ 0.0308476*m.i50*m.i100 + 0.01058872*m.i51*m.i52 + 0.01279448*m.i51*m.i53 + 0.0112444*m.i51*
m.i54 + 0.00990216*m.i51*m.i55 + 0.00896022*m.i51*m.i56 + 0.00513818*m.i51*m.i57 + 0.00543454*
m.i51*m.i58 + 0.01870256*m.i51*m.i59 + 0.00309084*m.i51*m.i60 + 0.01767624*m.i51*m.i61 +
0.01208918*m.i51*m.i62 + 0.01086364*m.i51*m.i63 + 0.00670046*m.i51*m.i64 + 0.00877154*m.i51*m.i65
+ 0.00557174*m.i51*m.i66 + 0.00887856*m.i51*m.i67 + 0.00260902*m.i51*m.i68 + 0.01536338*m.i51*
m.i69 + 0.00483316*m.i51*m.i70 + 0.00448378*m.i51*m.i71 + 0.0043601*m.i51*m.i72 + 0.00929772*
m.i51*m.i73 + 0.00989476*m.i51*m.i74 + 0.00528028*m.i51*m.i75 + 0.00446022*m.i51*m.i76 +
0.00845848*m.i51*m.i77 + 0.00509916*m.i51*m.i78 + 0.0204202*m.i51*m.i79 + 0.00800384*m.i51*m.i80
+ 0.00529538*m.i51*m.i81 + 0.0038846*m.i51*m.i82 + 0.00772216*m.i51*m.i83 + 0.009979*m.i51*m.i84
+ 0.010097*m.i51*m.i85 + 0.0139755*m.i51*m.i86 + 0.01131734*m.i51*m.i87 + 0.02533*m.i51*m.i88 +
0.00621034*m.i51*m.i89 + 0.01160734*m.i51*m.i90 + 0.00843408*m.i51*m.i91 + 0.00995326*m.i51*m.i92
+ 0.00455616*m.i51*m.i93 + 0.00533468*m.i51*m.i94 + 0.00929878*m.i51*m.i95 + 0.0142337*m.i51*
m.i96 + 0.01066822*m.i51*m.i97 + 0.00526832*m.i51*m.i98 + 0.01737382*m.i51*m.i99 + 0.01465192*
m.i51*m.i100 + 0.01484222*m.i52*m.i53 + 0.0171371*m.i52*m.i54 + 0.01181392*m.i52*m.i55 +
0.00600344*m.i52*m.i56 + 0.00840878*m.i52*m.i57 + 0.0071463*m.i52*m.i58 + 0.01536778*m.i52*m.i59
+ 0.0071369*m.i52*m.i60 + 0.0280962*m.i52*m.i61 + 0.0210708*m.i52*m.i62 + 0.01590808*m.i52*m.i63
+ 0.01317442*m.i52*m.i64 + 0.0091774*m.i52*m.i65 + 0.0068045*m.i52*m.i66 + 0.01047574*m.i52*
m.i67 + 0.00882116*m.i52*m.i68 + 0.01759098*m.i52*m.i69 + 0.00927774*m.i52*m.i70 + 0.01307496*
m.i52*m.i71 + 0.0115876*m.i52*m.i72 + 0.01090888*m.i52*m.i73 + 0.0112976*m.i52*m.i74 + 0.00919952
*m.i52*m.i75 + 0.00611904*m.i52*m.i76 + 0.0126521*m.i52*m.i77 + 0.0063454*m.i52*m.i78 +
0.01337936*m.i52*m.i79 + 0.01210696*m.i52*m.i80 + 0.01264942*m.i52*m.i81 + 0.00476554*m.i52*m.i82
+ 0.01346924*m.i52*m.i83 + 0.01007318*m.i52*m.i84 + 0.0127267*m.i52*m.i85 + 0.01394736*m.i52*
m.i86 + 0.0099746*m.i52*m.i87 + 0.0311922*m.i52*m.i88 + 0.0079236*m.i52*m.i89 + 0.01182038*m.i52*
m.i90 + 0.01651678*m.i52*m.i91 + 0.01241554*m.i52*m.i92 + 0.0030009*m.i52*m.i93 + 0.00533038*
m.i52*m.i94 + 0.0132025*m.i52*m.i95 + 0.0243106*m.i52*m.i96 + 0.01594256*m.i52*m.i97 + 0.01260958
*m.i52*m.i98 + 0.0156343*m.i52*m.i99 + 0.01771086*m.i52*m.i100 + 0.0153737*m.i53*m.i54 +
0.01383672*m.i53*m.i55 + 0.00715324*m.i53*m.i56 + 0.00943676*m.i53*m.i57 + 0.00990018*m.i53*m.i58
+ 0.01573366*m.i53*m.i59 + 0.00657884*m.i53*m.i60 + 0.0319944*m.i53*m.i61 + 0.029398*m.i53*m.i62
+ 0.01378922*m.i53*m.i63 + 0.01107682*m.i53*m.i64 + 0.01095454*m.i53*m.i65 + 0.00681218*m.i53*
m.i66 + 0.01767184*m.i53*m.i67 + 0.00360916*m.i53*m.i68 + 0.0271974*m.i53*m.i69 + 0.01108326*
m.i53*m.i70 + 0.00659666*m.i53*m.i71 + 0.00877032*m.i53*m.i72 + 0.01135242*m.i53*m.i73 +
0.01814298*m.i53*m.i74 + 0.01264072*m.i53*m.i75 + 0.00851402*m.i53*m.i76 + 0.01433306*m.i53*m.i77
+ 0.00973382*m.i53*m.i78 + 0.025286*m.i53*m.i79 + 0.01345344*m.i53*m.i80 + 0.01259382*m.i53*
m.i81 + 0.0027805*m.i53*m.i82 + 0.000307752*m.i53*m.i83 + 0.0107134*m.i53*m.i84 + 0.01054482*
m.i53*m.i85 + 0.0158905*m.i53*m.i86 + 0.01354224*m.i53*m.i87 + 0.0304602*m.i53*m.i88 + 0.0090225*
m.i53*m.i89 + 0.0279162*m.i53*m.i90 + 0.01259072*m.i53*m.i91 + 0.01154418*m.i53*m.i92 +
0.00696904*m.i53*m.i93 + 0.0036836*m.i53*m.i94 + 0.01605638*m.i53*m.i95 + 0.0430698*m.i53*m.i96
+ 0.01780592*m.i53*m.i97 + 0.01137144*m.i53*m.i98 + 0.0256234*m.i53*m.i99 + 0.0212362*m.i53*
m.i100 + 0.01304758*m.i54*m.i55 + 0.01398616*m.i54*m.i56 + 0.00915664*m.i54*m.i57 + 0.01070596*
m.i54*m.i58 + 0.01499*m.i54*m.i59 + 0.0070249*m.i54*m.i60 + 0.0302542*m.i54*m.i61 + 0.0244214*
m.i54*m.i62 + 0.0228504*m.i54*m.i63 + 0.01378888*m.i54*m.i64 + 0.00915648*m.i54*m.i65 + 0.0089268
*m.i54*m.i66 + 0.010488*m.i54*m.i67 + 0.00997224*m.i54*m.i68 + 0.0229576*m.i54*m.i69 + 0.01077794
*m.i54*m.i70 + 0.01825372*m.i54*m.i71 + 0.01517784*m.i54*m.i72 + 0.01258444*m.i54*m.i73 +
0.01361126*m.i54*m.i74 + 0.01029832*m.i54*m.i75 + 0.00657472*m.i54*m.i76 + 0.01463254*m.i54*m.i77
+ 0.00613474*m.i54*m.i78 + 0.01201368*m.i54*m.i79 + 0.013126*m.i54*m.i80 + 0.01505614*m.i54*
m.i81 + 0.00467872*m.i54*m.i82 + 0.01050702*m.i54*m.i83 + 0.01265914*m.i54*m.i84 + 0.01318044*
m.i54*m.i85 + 0.01473222*m.i54*m.i86 + 0.01110614*m.i54*m.i87 + 0.0261814*m.i54*m.i88 +
0.00783796*m.i54*m.i89 + 0.01294844*m.i54*m.i90 + 0.0192808*m.i54*m.i91 + 0.0139507*m.i54*m.i92
+ 0.00351228*m.i54*m.i93 + 0.0068612*m.i54*m.i94 + 0.01527036*m.i54*m.i95 + 0.0205052*m.i54*
m.i96 + 0.01688726*m.i54*m.i97 + 0.01524852*m.i54*m.i98 + 0.0174601*m.i54*m.i99 + 0.0244266*m.i54
*m.i100 + 0.00673562*m.i55*m.i56 + 0.00707698*m.i55*m.i57 + 0.00734322*m.i55*m.i58 + 0.01405048*
m.i55*m.i59 + 0.00334038*m.i55*m.i60 + 0.0222096*m.i55*m.i61 + 0.01523028*m.i55*m.i62 + 0.0102055
*m.i55*m.i63 + 0.01002768*m.i55*m.i64 + 0.01048288*m.i55*m.i65 + 0.00635712*m.i55*m.i66 +
0.00874464*m.i55*m.i67 + 0.00593524*m.i55*m.i68 + 0.01648812*m.i55*m.i69 + 0.0080135*m.i55*m.i70
+ 0.00887592*m.i55*m.i71 + 0.00847214*m.i55*m.i72 + 0.01055314*m.i55*m.i73 + 0.01129422*m.i55*
m.i74 + 0.00699156*m.i55*m.i75 + 0.00627446*m.i55*m.i76 + 0.01024268*m.i55*m.i77 + 0.00531432*
m.i55*m.i78 + 0.0098513*m.i55*m.i79 + 0.01065934*m.i55*m.i80 + 0.00967318*m.i55*m.i81 +
0.00462964*m.i55*m.i82 + 0.00334858*m.i55*m.i83 + 0.01100528*m.i55*m.i84 + 0.00975296*m.i55*m.i85
+ 0.01214742*m.i55*m.i86 + 0.00846042*m.i55*m.i87 + 0.0242638*m.i55*m.i88 + 0.0054702*m.i55*
m.i89 + 0.01124098*m.i55*m.i90 + 0.0118002*m.i55*m.i91 + 0.01077996*m.i55*m.i92 + 0.00250778*
m.i55*m.i93 + 0.00555816*m.i55*m.i94 + 0.01037364*m.i55*m.i95 + 0.0175302*m.i55*m.i96 +
0.01283314*m.i55*m.i97 + 0.01054116*m.i55*m.i98 + 0.01565736*m.i55*m.i99 + 0.01643682*m.i55*
m.i100 + 0.00563824*m.i56*m.i57 + 0.00909602*m.i56*m.i58 + 0.0103611*m.i56*m.i59 + 0.00370386*
m.i56*m.i60 + 0.01345496*m.i56*m.i61 + 0.01240364*m.i56*m.i62 + 0.01894134*m.i56*m.i63 +
0.00842246*m.i56*m.i64 + 0.00913306*m.i56*m.i65 + 0.0128603*m.i56*m.i66 + 0.00789202*m.i56*m.i67
+ 0.0049437*m.i56*m.i68 + 0.0172921*m.i56*m.i69 + 0.00742364*m.i56*m.i70 + 0.0201228*m.i56*m.i71
+ 0.0118952*m.i56*m.i72 + 0.01088666*m.i56*m.i73 + 0.0107701*m.i56*m.i74 + 0.00409754*m.i56*
m.i75 + 0.00366002*m.i56*m.i76 + 0.01236854*m.i56*m.i77 + 0.00300872*m.i56*m.i78 + 0.0135613*
m.i56*m.i79 + 0.00480806*m.i56*m.i80 + 0.01596128*m.i56*m.i81 + 0.00309564*m.i56*m.i82 +
0.01777436*m.i56*m.i83 + 0.01193038*m.i56*m.i84 + 0.00565974*m.i56*m.i85 + 0.01170688*m.i56*m.i86
+ 0.01022376*m.i56*m.i87 + 0.0163427*m.i56*m.i88 + 0.00612568*m.i56*m.i89 + 0.01115784*m.i56*
m.i90 + 0.00381802*m.i56*m.i91 + 0.0089326*m.i56*m.i92 + 0.0075443*m.i56*m.i93 + 0.00818402*m.i56
*m.i94 + 0.00966992*m.i56*m.i95 + 0.00265106*m.i56*m.i96 + 0.01019204*m.i56*m.i97 + 0.01329902*
m.i56*m.i98 + 0.01411634*m.i56*m.i99 + 0.0138779*m.i56*m.i100 + 0.00474894*m.i57*m.i58 +
0.00767974*m.i57*m.i59 + 0.0043561*m.i57*m.i60 + 0.01478228*m.i57*m.i61 + 0.00989558*m.i57*m.i62
+ 0.00895424*m.i57*m.i63 + 0.0066828*m.i57*m.i64 + 0.00578744*m.i57*m.i65 + 0.00498864*m.i57*
m.i66 + 0.00614268*m.i57*m.i67 + 0.0054738*m.i57*m.i68 + 0.01078148*m.i57*m.i69 + 0.00688352*
m.i57*m.i70 + 0.0068114*m.i57*m.i71 + 0.00628102*m.i57*m.i72 + 0.00701898*m.i57*m.i73 +
0.00848154*m.i57*m.i74 + 0.0066742*m.i57*m.i75 + 0.00450208*m.i57*m.i76 + 0.0074907*m.i57*m.i77
+ 0.00457588*m.i57*m.i78 + 0.00668368*m.i57*m.i79 + 0.00806954*m.i57*m.i80 + 0.00702352*m.i57*
m.i81 + 0.0038917*m.i57*m.i82 + 0.000255196*m.i57*m.i83 + 0.00565464*m.i57*m.i84 + 0.00629044*
m.i57*m.i85 + 0.00649918*m.i57*m.i86 + 0.00619514*m.i57*m.i87 + 0.01578988*m.i57*m.i88 +
0.00523946*m.i57*m.i89 + 0.00717944*m.i57*m.i90 + 0.0080494*m.i57*m.i91 + 0.00534064*m.i57*m.i92
+ 0.00276512*m.i57*m.i93 + 0.00412012*m.i57*m.i94 + 0.00715034*m.i57*m.i95 + 0.01300638*m.i57*
m.i96 + 0.00826382*m.i57*m.i97 + 0.0068466*m.i57*m.i98 + 0.00897648*m.i57*m.i99 + 0.01037138*
m.i57*m.i100 + 0.00646004*m.i58*m.i59 + 0.00186599*m.i58*m.i60 + 0.01246886*m.i58*m.i61 +
0.00999352*m.i58*m.i62 + 0.01381952*m.i58*m.i63 + 0.00855014*m.i58*m.i64 + 0.00465434*m.i58*m.i65
+ 0.00825376*m.i58*m.i66 + 0.00576402*m.i58*m.i67 + 0.00273548*m.i58*m.i68 + 0.01035762*m.i58*
m.i69 + 0.004824*m.i58*m.i70 + 0.01355144*m.i58*m.i71 + 0.00700278*m.i58*m.i72 + 0.00707718*m.i58
*m.i73 + 0.00851974*m.i58*m.i74 + 0.00330912*m.i58*m.i75 + 0.00401842*m.i58*m.i76 + 0.00999942*
m.i58*m.i77 + 0.00277578*m.i58*m.i78 - 0.000989722*m.i58*m.i79 + 0.00742188*m.i58*m.i80 +
0.00901096*m.i58*m.i81 + 0.000981242*m.i58*m.i82 + 0.01290728*m.i58*m.i83 + 0.0083181*m.i58*m.i84
+ 0.00517936*m.i58*m.i85 + 0.00723458*m.i58*m.i86 + 0.0044253*m.i58*m.i87 + 0.0137847*m.i58*
m.i88 + 0.001547694*m.i58*m.i89 + 0.00582604*m.i58*m.i90 + 0.00844516*m.i58*m.i91 + 0.00776542*
m.i58*m.i92 + 0.00182761*m.i58*m.i93 + 0.0023829*m.i58*m.i94 + 0.00628056*m.i58*m.i95 +
0.00690478*m.i58*m.i96 + 0.00802988*m.i58*m.i97 + 0.0076502*m.i58*m.i98 + 0.01085276*m.i58*m.i99
+ 0.0112764*m.i58*m.i100 + 0.00476864*m.i59*m.i60 + 0.025812*m.i59*m.i61 + 0.01805478*m.i59*
m.i62 + 0.0109551*m.i59*m.i63 + 0.00938908*m.i59*m.i64 + 0.01178962*m.i59*m.i65 + 0.0076335*m.i59
*m.i66 + 0.01177666*m.i59*m.i67 + 0.0070214*m.i59*m.i68 + 0.0221478*m.i59*m.i69 + 0.007972*m.i59*
m.i70 + 0.0074733*m.i59*m.i71 + 0.0088486*m.i59*m.i72 + 0.01271666*m.i59*m.i73 + 0.0141508*m.i59*
m.i74 + 0.00914726*m.i59*m.i75 + 0.00537448*m.i59*m.i76 + 0.01084216*m.i59*m.i77 + 0.0073258*
m.i59*m.i78 + 0.0246694*m.i59*m.i79 + 0.01112936*m.i59*m.i80 + 0.00816652*m.i59*m.i81 +
0.00597972*m.i59*m.i82 + 0.00662172*m.i59*m.i83 + 0.01458364*m.i59*m.i84 + 0.01429256*m.i59*m.i85
+ 0.01882618*m.i59*m.i86 + 0.01439702*m.i59*m.i87 + 0.034478*m.i59*m.i88 + 0.0080275*m.i59*m.i89
+ 0.01623632*m.i59*m.i90 + 0.01482176*m.i59*m.i91 + 0.01127396*m.i59*m.i92 + 0.00550568*m.i59*
m.i93 + 0.00798042*m.i59*m.i94 + 0.01294416*m.i59*m.i95 + 0.0212862*m.i59*m.i96 + 0.01627426*
m.i59*m.i97 + 0.0106876*m.i59*m.i98 + 0.021021*m.i59*m.i99 + 0.0210024*m.i59*m.i100 + 0.01016558*
m.i60*m.i61 + 0.00950624*m.i60*m.i62 + 0.00759926*m.i60*m.i63 + 0.00405624*m.i60*m.i64 +
0.00408766*m.i60*m.i65 + 0.001012866*m.i60*m.i66 + 0.00434698*m.i60*m.i67 + 0.00457798*m.i60*
m.i68 + 0.0080193*m.i60*m.i69 + 0.0054101*m.i60*m.i70 + 0.0046192*m.i60*m.i71 + 0.00570946*m.i60*
m.i72 + 0.00452172*m.i60*m.i73 + 0.00634618*m.i60*m.i74 + 0.00624388*m.i60*m.i75 + 0.0033187*
m.i60*m.i76 + 0.00483228*m.i60*m.i77 + 0.00344686*m.i60*m.i78 + 0.0083673*m.i60*m.i79 +
0.00518592*m.i60*m.i80 + 0.00542166*m.i60*m.i81 + 0.0031059*m.i60*m.i82 - 0.001025068*m.i60*m.i83
+ 0.0028835*m.i60*m.i84 + 0.00445296*m.i60*m.i85 + 0.00423572*m.i60*m.i86 + 0.0051822*m.i60*
m.i87 + 0.01112192*m.i60*m.i88 + 0.00500464*m.i60*m.i89 + 0.0062184*m.i60*m.i90 + 0.00602*m.i60*
m.i91 + 0.00246398*m.i60*m.i92 + 0.00288384*m.i60*m.i93 + 0.00278724*m.i60*m.i94 + 0.00626372*
m.i60*m.i95 + 0.01170704*m.i60*m.i96 + 0.00615192*m.i60*m.i97 + 0.00462302*m.i60*m.i98 +
0.00471294*m.i60*m.i99 + 0.00588256*m.i60*m.i100 + 0.0418718*m.i61*m.i62 + 0.0230598*m.i61*m.i63
+ 0.01842282*m.i61*m.i64 + 0.01721234*m.i61*m.i65 + 0.00990124*m.i61*m.i66 + 0.0216044*m.i61*
m.i67 + 0.01473812*m.i61*m.i68 + 0.0394464*m.i61*m.i69 + 0.01716988*m.i61*m.i70 + 0.0195513*m.i61
*m.i71 + 0.0219932*m.i61*m.i72 + 0.01943214*m.i61*m.i73 + 0.020134*m.i61*m.i74 + 0.0174732*m.i61*
m.i75 + 0.01174406*m.i61*m.i76 + 0.01834496*m.i61*m.i77 + 0.01109086*m.i61*m.i78 + 0.0264464*
m.i61*m.i79 + 0.01965936*m.i61*m.i80 + 0.0227546*m.i61*m.i81 + 0.00831452*m.i61*m.i82 +
0.00631004*m.i61*m.i83 + 0.01801602*m.i61*m.i84 + 0.01882322*m.i61*m.i85 + 0.026381*m.i61*m.i86
+ 0.0201168*m.i61*m.i87 + 0.0582994*m.i61*m.i88 + 0.01420784*m.i61*m.i89 + 0.0279352*m.i61*m.i90
+ 0.0260044*m.i61*m.i91 + 0.01994278*m.i61*m.i92 + 0.00558188*m.i61*m.i93 + 0.0100806*m.i61*
m.i94 + 0.0228614*m.i61*m.i95 + 0.0472894*m.i61*m.i96 + 0.0277624*m.i61*m.i97 + 0.0233414*m.i61*
m.i98 + 0.0320998*m.i61*m.i99 + 0.037788*m.i61*m.i100 + 0.0226754*m.i62*m.i63 + 0.01497022*m.i62*
m.i64 + 0.0138219*m.i62*m.i65 + 0.00559668*m.i62*m.i66 + 0.01850946*m.i62*m.i67 + 0.01131414*
m.i62*m.i68 + 0.0392412*m.i62*m.i69 + 0.01609634*m.i62*m.i70 + 0.0216048*m.i62*m.i71 + 0.0216526*
m.i62*m.i72 + 0.0150155*m.i62*m.i73 + 0.01738604*m.i62*m.i74 + 0.01374744*m.i62*m.i75 +
0.00779326*m.i62*m.i76 + 0.01429558*m.i62*m.i77 + 0.0081994*m.i62*m.i78 + 0.024889*m.i62*m.i79 +
0.01494124*m.i62*m.i80 + 0.0229898*m.i62*m.i81 + 0.00445144*m.i62*m.i82 + 0.01114552*m.i62*m.i83
+ 0.01793036*m.i62*m.i84 + 0.01444614*m.i62*m.i85 + 0.01879448*m.i62*m.i86 + 0.01466504*m.i62*
m.i87 + 0.0326604*m.i62*m.i88 + 0.01169144*m.i62*m.i89 + 0.0254028*m.i62*m.i90 + 0.01965996*m.i62
*m.i91 + 0.01132102*m.i62*m.i92 + 0.0046546*m.i62*m.i93 + 0.00635342*m.i62*m.i94 + 0.0209304*
m.i62*m.i95 + 0.040751*m.i62*m.i96 + 0.0251822*m.i62*m.i97 + 0.0238578*m.i62*m.i98 + 0.0225858*
m.i62*m.i99 + 0.0313134*m.i62*m.i100 + 0.01545704*m.i63*m.i64 + 0.01086358*m.i63*m.i65 +
0.00996396*m.i63*m.i66 + 0.00982328*m.i63*m.i67 + 0.00892944*m.i63*m.i68 + 0.024956*m.i63*m.i69
+ 0.0125295*m.i63*m.i70 + 0.0274234*m.i63*m.i71 + 0.0136346*m.i63*m.i72 + 0.0143589*m.i63*m.i73
+ 0.01281966*m.i63*m.i74 + 0.009889*m.i63*m.i75 + 0.00617316*m.i63*m.i76 + 0.0195622*m.i63*m.i77
+ 0.00502572*m.i63*m.i78 + 0.00153262*m.i63*m.i79 + 0.01706792*m.i63*m.i80 + 0.01790944*m.i63*
m.i81 + 0.001490592*m.i63*m.i82 + 0.0267338*m.i63*m.i83 + 0.01586496*m.i63*m.i84 + 0.01166282*
m.i63*m.i85 + 0.01568614*m.i63*m.i86 + 0.00753188*m.i63*m.i87 + 0.0417782*m.i63*m.i88 + 0.0112216
*m.i63*m.i89 + 0.00371206*m.i63*m.i90 + 0.01829192*m.i63*m.i91 + 0.01841964*m.i63*m.i92 +
0.00206622*m.i63*m.i93 + 0.00505172*m.i63*m.i94 + 0.01487174*m.i63*m.i95 + 0.01414348*m.i63*m.i96
+ 0.0156802*m.i63*m.i97 + 0.01823426*m.i63*m.i98 + 0.01258764*m.i63*m.i99 + 0.01994098*m.i63*
m.i100 + 0.00854654*m.i64*m.i65 + 0.01079866*m.i64*m.i66 + 0.00602732*m.i64*m.i67 + 0.00921276*
m.i64*m.i68 + 0.01464414*m.i64*m.i69 + 0.00664932*m.i64*m.i70 + 0.0144736*m.i64*m.i71 +
0.00978338*m.i64*m.i72 + 0.00959208*m.i64*m.i73 + 0.0112566*m.i64*m.i74 + 0.00671142*m.i64*m.i75
+ 0.00408206*m.i64*m.i76 + 0.01167568*m.i64*m.i77 + 0.00375274*m.i64*m.i78 + 0.00404336*m.i64*
m.i79 + 0.00963238*m.i64*m.i80 + 0.0122908*m.i64*m.i81 + 0.001806772*m.i64*m.i82 + 0.01577266*
m.i64*m.i83 + 0.01128074*m.i64*m.i84 + 0.0095111*m.i64*m.i85 + 0.0097723*m.i64*m.i86 + 0.00346618
*m.i64*m.i87 + 0.01289324*m.i64*m.i88 + 0.00453186*m.i64*m.i89 + 0.0078486*m.i64*m.i90 +
0.01310134*m.i64*m.i91 + 0.00985686*m.i64*m.i92 + 0.00257788*m.i64*m.i93 + 0.00260324*m.i64*m.i94
+ 0.0108877*m.i64*m.i95 + 0.01349616*m.i64*m.i96 + 0.01306042*m.i64*m.i97 + 0.01405114*m.i64*
m.i98 + 0.0115142*m.i64*m.i99 + 0.01728302*m.i64*m.i100 + 0.0048225*m.i65*m.i66 + 0.00871696*
m.i65*m.i67 + 0.00504014*m.i65*m.i68 + 0.01673796*m.i65*m.i69 + 0.00728674*m.i65*m.i70 +
0.00969202*m.i65*m.i71 + 0.0082057*m.i65*m.i72 + 0.0103704*m.i65*m.i73 + 0.00998004*m.i65*m.i74
+ 0.00672722*m.i65*m.i75 + 0.00633346*m.i65*m.i76 + 0.00774852*m.i65*m.i77 + 0.00440922*m.i65*
m.i78 + 0.01343946*m.i65*m.i79 + 0.00798994*m.i65*m.i80 + 0.01225132*m.i65*m.i81 + 0.00444398*
m.i65*m.i82 + 0.00673302*m.i65*m.i83 + 0.0109598*m.i65*m.i84 + 0.00683186*m.i65*m.i85 +
0.01183874*m.i65*m.i86 + 0.0090907*m.i65*m.i87 + 0.0283952*m.i65*m.i88 + 0.00785096*m.i65*m.i89
+ 0.01125058*m.i65*m.i90 + 0.00510526*m.i65*m.i91 + 0.00837574*m.i65*m.i92 + 0.00385798*m.i65*
m.i93 + 0.00464904*m.i65*m.i94 + 0.00896456*m.i65*m.i95 + 0.0160694*m.i65*m.i96 + 0.0113557*m.i65
*m.i97 + 0.01155766*m.i65*m.i98 + 0.01443876*m.i65*m.i99 + 0.01238186*m.i65*m.i100 + 0.00548536*
m.i66*m.i67 + 0.00630564*m.i66*m.i68 + 0.00939978*m.i66*m.i69 + 0.00431468*m.i66*m.i70 +
0.01542742*m.i66*m.i71 + 0.0071665*m.i66*m.i72 + 0.00755022*m.i66*m.i73 + 0.00838922*m.i66*m.i74
+ 0.00386922*m.i66*m.i75 + 0.001951058*m.i66*m.i76 + 0.01146338*m.i66*m.i77 + 0.001980078*m.i66*
m.i78 + 0.00444902*m.i66*m.i79 + 0.00356762*m.i66*m.i80 + 0.00956806*m.i66*m.i81 - 0.00023183*
m.i66*m.i82 + 0.01703884*m.i66*m.i83 + 0.01002452*m.i66*m.i84 + 0.0062546*m.i66*m.i85 +
0.00563304*m.i66*m.i86 + 0.00514984*m.i66*m.i87 + 0.01908326*m.i66*m.i88 + 0.00457928*m.i66*m.i89
+ 0.003995*m.i66*m.i90 + 0.0080501*m.i66*m.i91 + 0.00810108*m.i66*m.i92 + 0.00328186*m.i66*m.i93
+ 0.00369064*m.i66*m.i94 + 0.0058103*m.i66*m.i95 + 0.00438208*m.i66*m.i96 + 0.00867896*m.i66*
m.i97 + 0.0114927*m.i66*m.i98 + 0.01103938*m.i66*m.i99 + 0.00981454*m.i66*m.i100 + 0.00310364*
m.i67*m.i68 + 0.0195756*m.i67*m.i69 + 0.00833924*m.i67*m.i70 + 0.01122*m.i67*m.i71 + 0.00862168*
m.i67*m.i72 + 0.00711248*m.i67*m.i73 + 0.00958304*m.i67*m.i74 + 0.00671208*m.i67*m.i75 +
0.00667666*m.i67*m.i76 + 0.00639998*m.i67*m.i77 + 0.00746068*m.i67*m.i78 + 0.0164696*m.i67*m.i79
+ 0.00952472*m.i67*m.i80 + 0.01054908*m.i67*m.i81 + 0.00295206*m.i67*m.i82 + 0.00786538*m.i67*
m.i83 + 0.00812566*m.i67*m.i84 + 0.00774908*m.i67*m.i85 + 0.01084866*m.i67*m.i86 + 0.01179554*
m.i67*m.i87 + 0.022894*m.i67*m.i88 + 0.00619526*m.i67*m.i89 + 0.01517056*m.i67*m.i90 + 0.00567344
*m.i67*m.i91 + 0.00901318*m.i67*m.i92 + 0.00388018*m.i67*m.i93 + 0.0036956*m.i67*m.i94 + 0.008896
*m.i67*m.i95 + 0.021896*m.i67*m.i96 + 0.01327636*m.i67*m.i97 + 0.0109*m.i67*m.i98 + 0.0178563*
m.i67*m.i99 + 0.01328366*m.i67*m.i100 + 0.01361686*m.i68*m.i69 + 0.00764086*m.i68*m.i70 +
0.00794036*m.i68*m.i71 + 0.01077146*m.i68*m.i72 + 0.00701056*m.i68*m.i73 + 0.00764336*m.i68*m.i74
+ 0.01085638*m.i68*m.i75 + 0.00267198*m.i68*m.i76 + 0.00622086*m.i68*m.i77 + 0.0026961*m.i68*
m.i78 + 0.01283914*m.i68*m.i79 + 0.00651186*m.i68*m.i80 + 0.00444824*m.i68*m.i81 + 0.00245108*
m.i68*m.i82 - 0.000724804*m.i68*m.i83 + 0.01001432*m.i68*m.i84 + 0.00659112*m.i68*m.i85 +
0.00798872*m.i68*m.i86 + 0.00378278*m.i68*m.i87 + 0.0249894*m.i68*m.i88 + 0.00935338*m.i68*m.i89
+ 0.00406214*m.i68*m.i90 + 0.01547864*m.i68*m.i91 + 0.0026383*m.i68*m.i92 + 0.001956366*m.i68*
m.i93 + 0.00433104*m.i68*m.i94 + 0.0086862*m.i68*m.i95 + 0.00871594*m.i68*m.i96 + 0.00917804*
m.i68*m.i97 + 0.01147728*m.i68*m.i98 + 0.000904318*m.i68*m.i99 + 0.0095902*m.i68*m.i100 +
0.01716134*m.i69*m.i70 + 0.0210128*m.i69*m.i71 + 0.01970512*m.i69*m.i72 + 0.01824406*m.i69*m.i73
+ 0.0202038*m.i69*m.i74 + 0.0166321*m.i69*m.i75 + 0.0080034*m.i69*m.i76 + 0.01785698*m.i69*m.i77
+ 0.00956708*m.i69*m.i78 + 0.0273938*m.i69*m.i79 + 0.01578286*m.i69*m.i80 + 0.01986548*m.i69*
m.i81 + 0.00472512*m.i69*m.i82 + 0.0064477*m.i69*m.i83 + 0.0205866*m.i69*m.i84 + 0.01485404*m.i69
*m.i85 + 0.0219926*m.i69*m.i86 + 0.01726592*m.i69*m.i87 + 0.044296*m.i69*m.i88 + 0.01519388*m.i69
*m.i89 + 0.0245318*m.i69*m.i90 + 0.019668*m.i69*m.i91 + 0.01322886*m.i69*m.i92 + 0.00622812*m.i69
*m.i93 + 0.00886068*m.i69*m.i94 + 0.0207946*m.i69*m.i95 + 0.0369544*m.i69*m.i96 + 0.0252064*m.i69
*m.i97 + 0.0246794*m.i69*m.i98 + 0.0240826*m.i69*m.i99 + 0.0322226*m.i69*m.i100 + 0.01122678*
m.i70*m.i71 + 0.00985708*m.i70*m.i72 + 0.00817346*m.i70*m.i73 + 0.01042594*m.i70*m.i74 +
0.0087512*m.i70*m.i75 + 0.00587552*m.i70*m.i76 + 0.00956692*m.i70*m.i77 + 0.00604702*m.i70*m.i78
+ 0.01012786*m.i70*m.i79 + 0.00894572*m.i70*m.i80 + 0.00937532*m.i70*m.i81 + 0.0040741*m.i70*
m.i82 + 0.001290572*m.i70*m.i83 + 0.00820512*m.i70*m.i84 + 0.00683756*m.i70*m.i85 + 0.00768078*
m.i70*m.i86 + 0.00827048*m.i70*m.i87 + 0.01990564*m.i70*m.i88 + 0.007123*m.i70*m.i89 + 0.00998564
*m.i70*m.i90 + 0.00953688*m.i70*m.i91 + 0.00558782*m.i70*m.i92 + 0.00342686*m.i70*m.i93 +
0.00568486*m.i70*m.i94 + 0.00914938*m.i70*m.i95 + 0.01630104*m.i70*m.i96 + 0.01110616*m.i70*m.i97
+ 0.010247*m.i70*m.i98 + 0.00833958*m.i70*m.i99 + 0.01265252*m.i70*m.i100 + 0.0220254*m.i71*
m.i72 + 0.0095213*m.i71*m.i73 + 0.01209936*m.i71*m.i74 + 0.00527094*m.i71*m.i75 + 0.00557218*
m.i71*m.i76 + 0.01262004*m.i71*m.i77 + 0.0037353*m.i71*m.i78 - 0.000223588*m.i71*m.i79 +
0.00801532*m.i71*m.i80 + 0.0286786*m.i71*m.i81 + 0.000788336*m.i71*m.i82 + 0.0387752*m.i71*m.i83
+ 0.01552284*m.i71*m.i84 + 0.00720994*m.i71*m.i85 + 0.01148132*m.i71*m.i86 + 0.00870698*m.i71*
m.i87 + 0.028675*m.i71*m.i88 + 0.00544718*m.i71*m.i89 + 0.00673884*m.i71*m.i90 + 0.01008984*m.i71
*m.i91 + 0.01241834*m.i71*m.i92 + 0.0025495*m.i71*m.i93 + 0.00280272*m.i71*m.i94 + 0.00947552*
m.i71*m.i95 + 0.0070495*m.i71*m.i96 + 0.0170916*m.i71*m.i97 + 0.0269036*m.i71*m.i98 + 0.01506306*
m.i71*m.i99 + 0.0206782*m.i71*m.i100 + 0.00925426*m.i72*m.i73 + 0.00967792*m.i72*m.i74 +
0.00847338*m.i72*m.i75 + 0.005213*m.i72*m.i76 + 0.00908662*m.i72*m.i77 + 0.00316872*m.i72*m.i78
+ 0.00898138*m.i72*m.i79 + 0.0069179*m.i72*m.i80 + 0.0151281*m.i72*m.i81 + 0.00348424*m.i72*
m.i82 + 0.01111986*m.i72*m.i83 + 0.01165966*m.i72*m.i84 + 0.0064802*m.i72*m.i85 + 0.00959246*
m.i72*m.i86 + 0.0084611*m.i72*m.i87 + 0.0240956*m.i72*m.i88 + 0.00687054*m.i72*m.i89 + 0.0094553*
m.i72*m.i90 + 0.0110757*m.i72*m.i91 + 0.00543508*m.i72*m.i92 + 0.0037306*m.i72*m.i93 + 0.00500972
*m.i72*m.i94 + 0.01005818*m.i72*m.i95 + 0.01294332*m.i72*m.i96 + 0.01344022*m.i72*m.i97 +
0.01593132*m.i72*m.i98 + 0.0093216*m.i72*m.i99 + 0.01640118*m.i72*m.i100 + 0.01198598*m.i73*m.i74
+ 0.00750544*m.i73*m.i75 + 0.0050216*m.i73*m.i76 + 0.01285904*m.i73*m.i77 + 0.00339452*m.i73*
m.i78 + 0.00891788*m.i73*m.i79 + 0.00948614*m.i73*m.i80 + 0.00944098*m.i73*m.i81 + 0.00409826*
m.i73*m.i82 + 0.00488372*m.i73*m.i83 + 0.01210326*m.i73*m.i84 + 0.00827726*m.i73*m.i85 +
0.0117403*m.i73*m.i86 + 0.00812428*m.i73*m.i87 + 0.031499*m.i73*m.i88 + 0.00909586*m.i73*m.i89 +
0.00829156*m.i73*m.i90 + 0.0112196*m.i73*m.i91 + 0.00781298*m.i73*m.i92 + 0.00380884*m.i73*m.i93
+ 0.00624296*m.i73*m.i94 + 0.01005016*m.i73*m.i95 + 0.01437472*m.i73*m.i96 + 0.011277*m.i73*
m.i97 + 0.01058622*m.i73*m.i98 + 0.0121454*m.i73*m.i99 + 0.01373088*m.i73*m.i100 + 0.01080198*
m.i74*m.i75 + 0.00656182*m.i74*m.i76 + 0.01437682*m.i74*m.i77 + 0.00746976*m.i74*m.i78 +
0.0158128*m.i74*m.i79 + 0.01161714*m.i74*m.i80 + 0.01098286*m.i74*m.i81 + 0.00409892*m.i74*m.i82
+ 0.00263806*m.i74*m.i83 + 0.01368742*m.i74*m.i84 + 0.00966578*m.i74*m.i85 + 0.0126469*m.i74*
m.i86 + 0.0097362*m.i74*m.i87 + 0.0236752*m.i74*m.i88 + 0.0087263*m.i74*m.i89 + 0.01653132*m.i74*
m.i90 + 0.01259886*m.i74*m.i91 + 0.0074886*m.i74*m.i92 + 0.00612882*m.i74*m.i93 + 0.00553384*
m.i74*m.i94 + 0.01256076*m.i74*m.i95 + 0.022837*m.i74*m.i96 + 0.01489052*m.i74*m.i97 + 0.0138654*
m.i74*m.i98 + 0.01608016*m.i74*m.i99 + 0.0185439*m.i74*m.i100 + 0.00483222*m.i75*m.i76 +
0.0084646*m.i75*m.i77 + 0.00605234*m.i75*m.i78 + 0.01627408*m.i75*m.i79 + 0.00784142*m.i75*m.i80
+ 0.00564276*m.i75*m.i81 + 0.00324588*m.i75*m.i82 - 0.00767236*m.i75*m.i83 + 0.00699372*m.i75*
m.i84 + 0.00737608*m.i75*m.i85 + 0.00954642*m.i75*m.i86 + 0.00823136*m.i75*m.i87 + 0.0262748*
m.i75*m.i88 + 0.00948902*m.i75*m.i89 + 0.01252876*m.i75*m.i90 + 0.01423104*m.i75*m.i91 +
0.00521492*m.i75*m.i92 + 0.00397698*m.i75*m.i93 + 0.00422896*m.i75*m.i94 + 0.01025216*m.i75*m.i95
+ 0.021456*m.i75*m.i96 + 0.01000128*m.i75*m.i97 + 0.00860654*m.i75*m.i98 + 0.0079023*m.i75*m.i99
+ 0.01223272*m.i75*m.i100 + 0.00508036*m.i76*m.i77 + 0.00440326*m.i76*m.i78 + 0.00722936*m.i76*
m.i79 + 0.00592748*m.i76*m.i80 + 0.00543106*m.i76*m.i81 + 0.00352072*m.i76*m.i82 + 0.00282876*
m.i76*m.i83 + 0.00421804*m.i76*m.i84 + 0.00327576*m.i76*m.i85 + 0.00605002*m.i76*m.i86 +
0.00724932*m.i76*m.i87 + 0.01581762*m.i76*m.i88 + 0.00366428*m.i76*m.i89 + 0.00812736*m.i76*m.i90
+ 0.00388382*m.i76*m.i91 + 0.0047062*m.i76*m.i92 + 0.00287772*m.i76*m.i93 + 0.00297876*m.i76*
m.i94 + 0.00459654*m.i76*m.i95 + 0.01070758*m.i76*m.i96 + 0.0061617*m.i76*m.i97 + 0.00324936*
m.i76*m.i98 + 0.00970994*m.i76*m.i99 + 0.00690694*m.i76*m.i100 + 0.00393188*m.i77*m.i78 +
0.00648912*m.i77*m.i79 + 0.00880144*m.i77*m.i80 + 0.00990674*m.i77*m.i81 + 0.00277832*m.i77*m.i82
+ 0.01369158*m.i77*m.i83 + 0.01108874*m.i77*m.i84 + 0.00804488*m.i77*m.i85 + 0.0100624*m.i77*
m.i86 + 0.00868852*m.i77*m.i87 + 0.0320896*m.i77*m.i88 + 0.00865688*m.i77*m.i89 + 0.00846622*
m.i77*m.i90 + 0.01262084*m.i77*m.i91 + 0.01111726*m.i77*m.i92 + 0.00462154*m.i77*m.i93 +
0.00718072*m.i77*m.i94 + 0.01147082*m.i77*m.i95 + 0.0176254*m.i77*m.i96 + 0.01224072*m.i77*m.i97
+ 0.00939734*m.i77*m.i98 + 0.012534*m.i77*m.i99 + 0.01295098*m.i77*m.i100 + 0.00907912*m.i78*
m.i79 + 0.00720642*m.i78*m.i80 + 0.00426806*m.i78*m.i81 + 0.0028332*m.i78*m.i82 - 0.001354666*
m.i78*m.i83 + 0.00318608*m.i78*m.i84 + 0.00627032*m.i78*m.i85 + 0.00574778*m.i78*m.i86 +
0.00663794*m.i78*m.i87 + 0.00493084*m.i78*m.i88 + 0.00225816*m.i78*m.i89 + 0.01063042*m.i78*m.i90
+ 0.0063342*m.i78*m.i91 + 0.00541402*m.i78*m.i92 + 0.00268782*m.i78*m.i93 + 0.00290288*m.i78*
m.i94 + 0.00588184*m.i78*m.i95 + 0.01436716*m.i78*m.i96 + 0.00728756*m.i78*m.i97 + 0.00442972*
m.i78*m.i98 + 0.00924454*m.i78*m.i99 + 0.00979098*m.i78*m.i100 + 0.0060581*m.i79*m.i80 +
0.00755126*m.i79*m.i81 + 0.00637932*m.i79*m.i82 - 0.00105651*m.i79*m.i83 + 0.01349704*m.i79*m.i84
+ 0.01178354*m.i79*m.i85 + 0.0220208*m.i79*m.i86 + 0.0245836*m.i79*m.i87 + 0.0524002*m.i79*m.i88
+ 0.0230428*m.i79*m.i89 + 0.0314514*m.i79*m.i90 + 0.00636018*m.i79*m.i91 + 0.0061917*m.i79*m.i92
+ 0.01207768*m.i79*m.i93 + 0.00753416*m.i79*m.i94 + 0.01719794*m.i79*m.i95 + 0.0367202*m.i79*
m.i96 + 0.01636496*m.i79*m.i97 + 0.01053626*m.i79*m.i98 + 0.0223148*m.i79*m.i99 + 0.0125583*m.i79
*m.i100 + 0.00731124*m.i80*m.i81 + 0.0043053*m.i80*m.i82 + 0.00250064*m.i80*m.i83 + 0.00942746*
m.i80*m.i84 + 0.01109824*m.i80*m.i85 + 0.0094077*m.i80*m.i86 + 0.00584688*m.i80*m.i87 +
0.01773876*m.i80*m.i88 + 0.00587054*m.i80*m.i89 + 0.0073899*m.i80*m.i90 + 0.01217556*m.i80*m.i91
+ 0.0092825*m.i80*m.i92 + 0.001672258*m.i80*m.i93 + 0.00403362*m.i80*m.i94 + 0.01001412*m.i80*
m.i95 + 0.01641906*m.i80*m.i96 + 0.01159292*m.i80*m.i97 + 0.01062798*m.i80*m.i98 + 0.00967468*
m.i80*m.i99 + 0.0140493*m.i80*m.i100 + 0.00288116*m.i81*m.i82 + 0.022981*m.i81*m.i83 + 0.01105584
*m.i81*m.i84 + 0.00722284*m.i81*m.i85 + 0.01178602*m.i81*m.i86 + 0.00945868*m.i81*m.i87 +
0.024973*m.i81*m.i88 + 0.00575624*m.i81*m.i89 + 0.01415098*m.i81*m.i90 + 0.0066048*m.i81*m.i91 +
0.01072344*m.i81*m.i92 + 0.00322326*m.i81*m.i93 + 0.00351188*m.i81*m.i94 + 0.01127788*m.i81*m.i95
+ 0.01956074*m.i81*m.i96 + 0.01617428*m.i81*m.i97 + 0.0227228*m.i81*m.i98 + 0.01855842*m.i81*
m.i99 + 0.01991896*m.i81*m.i100 - 0.00333172*m.i82*m.i83 + 0.00228114*m.i82*m.i84 + 0.00336158*
m.i82*m.i85 + 0.00354748*m.i82*m.i86 + 0.00514572*m.i82*m.i87 + 0.00636398*m.i82*m.i88 +
0.00276272*m.i82*m.i89 + 0.00394504*m.i82*m.i90 + 0.00242814*m.i82*m.i91 + 0.00151634*m.i82*m.i92
+ 0.00205258*m.i82*m.i93 + 0.00416174*m.i82*m.i94 + 0.0036601*m.i82*m.i95 + 0.00573294*m.i82*
m.i96 + 0.0040347*m.i82*m.i97 + 0.001040396*m.i82*m.i98 + 0.00519918*m.i82*m.i99 + 0.00479088*
m.i82*m.i100 + 0.01497528*m.i83*m.i84 + 0.0032291*m.i83*m.i85 + 0.01011148*m.i83*m.i86 +
0.00471364*m.i83*m.i87 + 0.0246434*m.i83*m.i88 + 0.000996878*m.i83*m.i89 - 0.00262512*m.i83*m.i90
- 0.000789784*m.i83*m.i91 + 0.01304756*m.i83*m.i92 + 0.000531142*m.i83*m.i93 - 0.000443948*m.i83
*m.i94 + 0.00279848*m.i83*m.i95 - 0.0065326*m.i83*m.i96 + 0.01221224*m.i83*m.i97 + 0.01799712*
m.i83*m.i98 + 0.0158385*m.i83*m.i99 + 0.0071337*m.i83*m.i100 + 0.00892568*m.i84*m.i85 +
0.01364388*m.i84*m.i86 + 0.0072533*m.i84*m.i87 + 0.0326884*m.i84*m.i88 + 0.00896504*m.i84*m.i89
+ 0.00823562*m.i84*m.i90 + 0.0125821*m.i84*m.i91 + 0.00787816*m.i84*m.i92 + 0.00249586*m.i84*
m.i93 + 0.00519262*m.i84*m.i94 + 0.01044988*m.i84*m.i95 + 0.01107886*m.i84*m.i96 + 0.0139867*
m.i84*m.i97 + 0.01596046*m.i84*m.i98 + 0.01218826*m.i84*m.i99 + 0.01543212*m.i84*m.i100 +
0.00990954*m.i85*m.i86 + 0.00725662*m.i85*m.i87 + 0.0133432*m.i85*m.i88 + 0.00507396*m.i85*m.i89
+ 0.00930526*m.i85*m.i90 + 0.01462284*m.i85*m.i91 + 0.01055408*m.i85*m.i92 + 0.00190258*m.i85*
m.i93 + 0.00468802*m.i85*m.i94 + 0.0107648*m.i85*m.i95 + 0.01646608*m.i85*m.i96 + 0.01215728*
m.i85*m.i97 + 0.01028698*m.i85*m.i98 + 0.01183266*m.i85*m.i99 + 0.01660366*m.i85*m.i100 +
0.0120373*m.i86*m.i87 + 0.0422718*m.i86*m.i88 + 0.00969238*m.i86*m.i89 + 0.01765146*m.i86*m.i90
+ 0.01429788*m.i86*m.i91 + 0.0124585*m.i86*m.i92 + 0.0040945*m.i86*m.i93 + 0.0046898*m.i86*m.i94
+ 0.01232074*m.i86*m.i95 + 0.0222548*m.i86*m.i96 + 0.0145479*m.i86*m.i97 + 0.0128277*m.i86*m.i98
+ 0.0192244*m.i86*m.i99 + 0.01947568*m.i86*m.i100 + 0.032904*m.i87*m.i88 + 0.0084843*m.i87*m.i89
+ 0.01591916*m.i87*m.i90 + 0.0059879*m.i87*m.i91 + 0.00789644*m.i87*m.i92 + 0.00607862*m.i87*
m.i93 + 0.00667478*m.i87*m.i94 + 0.0088746*m.i87*m.i95 + 0.01963916*m.i87*m.i96 + 0.01115822*
m.i87*m.i97 + 0.0065973*m.i87*m.i98 + 0.01821046*m.i87*m.i99 + 0.01269924*m.i87*m.i100 + 0.04164*
m.i88*m.i89 + 0.01700894*m.i88*m.i90 + 0.0282218*m.i88*m.i91 + 0.0247666*m.i88*m.i92 + 0.00860626
*m.i88*m.i93 + 0.0146832*m.i88*m.i94 + 0.0207292*m.i88*m.i95 + 0.0482992*m.i88*m.i96 + 0.026772*
m.i88*m.i97 + 0.0300758*m.i88*m.i98 + 0.0329128*m.i88*m.i99 + 0.01375988*m.i88*m.i100 +
0.00594302*m.i89*m.i90 + 0.00801468*m.i89*m.i91 + 0.00437824*m.i89*m.i92 + 0.00302882*m.i89*m.i93
+ 0.0041304*m.i89*m.i94 + 0.00803522*m.i89*m.i95 + 0.01620516*m.i89*m.i96 + 0.00836644*m.i89*
m.i97 + 0.01022328*m.i89*m.i98 + 0.0069101*m.i89*m.i99 + 0.00464412*m.i89*m.i100 + 0.01014268*
m.i90*m.i91 + 0.00890216*m.i90*m.i92 + 0.00857494*m.i90*m.i93 + 0.00416286*m.i90*m.i94 +
0.01435266*m.i90*m.i95 + 0.038709*m.i90*m.i96 + 0.01593092*m.i90*m.i97 + 0.0108455*m.i90*m.i98 +
0.0247362*m.i90*m.i99 + 0.0239224*m.i90*m.i100 + 0.01172504*m.i91*m.i92 - 3.25928e-5*m.i91*m.i93
+ 0.00582154*m.i91*m.i94 + 0.01455814*m.i91*m.i95 + 0.0217724*m.i91*m.i96 + 0.01520358*m.i91*
m.i97 + 0.01361584*m.i91*m.i98 + 0.01107608*m.i91*m.i99 + 0.0218082*m.i91*m.i100 + 0.000834202*
m.i92*m.i93 + 0.00361846*m.i92*m.i94 + 0.00964536*m.i92*m.i95 + 0.01621624*m.i92*m.i96 +
0.01139352*m.i92*m.i97 + 0.01032652*m.i92*m.i98 + 0.01663626*m.i92*m.i99 + 0.01551254*m.i92*
m.i100 + 0.00302326*m.i93*m.i94 + 0.0039602*m.i93*m.i95 + 0.0070366*m.i93*m.i96 + 0.0035814*m.i93
*m.i97 + 0.00156313*m.i93*m.i98 + 0.00599576*m.i93*m.i99 + 0.00427812*m.i93*m.i100 + 0.00550244*
m.i94*m.i95 + 0.00558508*m.i94*m.i96 + 0.0059384*m.i94*m.i97 + 0.00357124*m.i94*m.i98 + 0.0064057
*m.i94*m.i99 + 0.00623724*m.i94*m.i100 + 0.0227304*m.i95*m.i96 + 0.01445112*m.i95*m.i97 +
0.01257804*m.i95*m.i98 + 0.01368382*m.i95*m.i99 + 0.01773414*m.i95*m.i100 + 0.0257114*m.i96*m.i97
+ 0.01933344*m.i96*m.i98 + 0.0317874*m.i96*m.i99 + 0.0306278*m.i96*m.i100 + 0.01873902*m.i97*
m.i98 + 0.01912542*m.i97*m.i99 + 0.0219022*m.i97*m.i100 + 0.01388668*m.i98*m.i99 + 0.0207524*
m.i98*m.i100 + 0.0256994*m.i99*m.i100 - m.x101 <= 0)
m.c2 = Constraint(expr= 0.00311438*m.i1 - 0.0196628*m.i2 - 0.0134176*m.i3 - 0.00687102*m.i4 - 0.0147519*m.i5
- 0.0184501*m.i6 - 0.0153449*m.i7 - 0.136908*m.i8 + 0.0173991*m.i9 - 0.00159102*m.i10
- 0.0468625*m.i11 + 0.00163166*m.i12 - 0.00431355*m.i13 - 0.0377972*m.i14 - 0.0149845*m.i15
- 0.0104868*m.i16 + 0.0238532*m.i17 - 0.0104023*m.i18 + 0.0013017*m.i19 - 0.0474684*m.i20
- 0.00693531*m.i21 - 0.00667252*m.i22 - 0.0063525*m.i23 - 0.0205131*m.i24 - 0.00639281*m.i25
- 0.00085931*m.i26 - 0.0202418*m.i27 - 0.0104094*m.i28 - 0.00728791*m.i29 - 0.0650481*m.i30
+ 0.00379685*m.i31 - 0.00873524*m.i32 - 0.0191879*m.i33 - 0.0262863*m.i34 - 0.0148439*m.i35
- 0.0185713*m.i36 - 0.0097821*m.i37 - 0.0169321*m.i38 - 0.0126042*m.i39 + 0.0147787*m.i40
- 0.0212007*m.i41 - 0.0136018*m.i42 - 0.00404129*m.i43 - 0.01093*m.i44 - 0.0138447*m.i45
- 0.00281865*m.i46 - 0.0168853*m.i47 - 0.00610726*m.i48 - 0.00313898*m.i49 - 0.031707*m.i50
+ 0.00048868*m.i51 - 0.0135947*m.i52 - 0.00571196*m.i53 - 0.0158213*m.i54 - 0.00551418*m.i55
+ 7.4592E-5*m.i56 - 0.00372748*m.i57 + 0.00092127*m.i58 - 0.00743836*m.i59 + 0.00559625*m.i60
- 0.0170773*m.i61 - 0.0321089*m.i62 - 0.0230835*m.i63 - 0.0133205*m.i64 - 0.00788571*m.i65
- 0.0339356*m.i66 + 0.00227885*m.i67 - 0.010863*m.i68 - 0.0171333*m.i69 - 0.00515196*m.i70
- 0.0244616*m.i71 - 0.00205996*m.i72 + 0.00281383*m.i73 - 0.00173674*m.i74 - 0.0179568*m.i75
- 0.00659808*m.i76 - 0.0108104*m.i77 - 0.00557398*m.i78 - 0.0427583*m.i79 + 0.00183802*m.i80
- 0.0178204*m.i81 - 0.00328309*m.i82 - 0.0207823*m.i83 - 0.0110875*m.i84 - 0.0128258*m.i85
- 0.00442073*m.i86 - 0.00903049*m.i87 + 0.0203439*m.i88 - 0.0223604*m.i89 - 0.0149007*m.i90
- 0.0193623*m.i91 - 0.013037*m.i92 - 0.00297365*m.i93 - 0.0112456*m.i94 - 0.00469496*m.i95
- 0.00682019*m.i96 - 0.00327006*m.i97 - 0.0258562*m.i98 - 0.0215847*m.i99 - 0.0231142*m.i100
>= 0)
m.c3 = Constraint(expr= 52.59*m.i1 + 28.87*m.i2 + 29.19*m.i3 + 46.55*m.i4 + 24.26*m.i5 + 42.53*m.i6 + 40.53*m.i7
+ 79.56*m.i8 + 108.9*m.i9 + 79.06*m.i10 + 20.15*m.i11 + 35.64*m.i12 + 39.55*m.i13 + 14.32*m.i14
+ 26.41*m.i15 + 62.48*m.i16 + 254.3*m.i17 + 32.42*m.i18 + 24.84*m.i19 + 10.1*m.i20 + 21.2*m.i21
+ 40.25*m.i22 + 17.32*m.i23 + 60.92*m.i24 + 54.73*m.i25 + 78.62*m.i26 + 49.24*m.i27
+ 68.19*m.i28 + 50.3*m.i29 + 3.83*m.i30 + 18.27*m.i31 + 59.67*m.i32 + 12.21*m.i33 + 38.09*m.i34
+ 71.72*m.i35 + 23.6*m.i36 + 70.71*m.i37 + 56.98*m.i38 + 34.47*m.i39 + 10.23*m.i40 + 59.19*m.i41
+ 58.61*m.i42 + 445.29*m.i43 + 131.69*m.i44 + 34.24*m.i45 + 43.11*m.i46 + 25.18*m.i47 + 28*m.i48
+ 19.43*m.i49 + 14.33*m.i50 + 28.41*m.i51 + 74.5*m.i52 + 36.54*m.i53 + 38.99*m.i54 + 43.15*m.i55
+ 199.55*m.i56 + 59.07*m.i57 + 123.55*m.i58 + 20.55*m.i59 + 66.72*m.i60 + 37.95*m.i61
+ 27.62*m.i62 + 23.21*m.i63 + 36.09*m.i64 + 23.09*m.i65 + 46.54*m.i66 + 67.89*m.i67
+ 34.83*m.i68 + 11.96*m.i69 + 45.77*m.i70 + 32.91*m.i71 + 77.37*m.i72 + 21.46*m.i73
+ 53.11*m.i74 + 14.29*m.i75 + 61.13*m.i76 + 32.79*m.i77 + 59.84*m.i78 + 6.59*m.i79 + 14.06*m.i80
+ 55.29*m.i81 + 33.33*m.i82 + 4.24*m.i83 + 23.21*m.i84 + 47.85*m.i85 + 48.99*m.i86 + 57.46*m.i87
+ 28.87*m.i88 + 24.6*m.i89 + 22.26*m.i90 + 28.31*m.i91 + 26.67*m.i92 + 48.1*m.i93 + 28.01*m.i94
+ 64.85*m.i95 + 25.54*m.i96 + 31.47*m.i97 + 18.31*m.i98 + 35.06*m.i99 + 8.06*m.i100 >= 2000)
m.c4 = Constraint(expr= 52.59*m.i1 + 28.87*m.i2 + 29.19*m.i3 + 46.55*m.i4 + 24.26*m.i5 + 42.53*m.i6 + 40.53*m.i7
+ 79.56*m.i8 + 108.9*m.i9 + 79.06*m.i10 + 20.15*m.i11 + 35.64*m.i12 + 39.55*m.i13 + 14.32*m.i14
+ 26.41*m.i15 + 62.48*m.i16 + 254.3*m.i17 + 32.42*m.i18 + 24.84*m.i19 + 10.1*m.i20 + 21.2*m.i21
+ 40.25*m.i22 + 17.32*m.i23 + 60.92*m.i24 + 54.73*m.i25 + 78.62*m.i26 + 49.24*m.i27
+ 68.19*m.i28 + 50.3*m.i29 + 3.83*m.i30 + 18.27*m.i31 + 59.67*m.i32 + 12.21*m.i33 + 38.09*m.i34
+ 71.72*m.i35 + 23.6*m.i36 + 70.71*m.i37 + 56.98*m.i38 + 34.47*m.i39 + 10.23*m.i40 + 59.19*m.i41
+ 58.61*m.i42 + 445.29*m.i43 + 131.69*m.i44 + 34.24*m.i45 + 43.11*m.i46 + 25.18*m.i47 + 28*m.i48
+ 19.43*m.i49 + 14.33*m.i50 + 28.41*m.i51 + 74.5*m.i52 + 36.54*m.i53 + 38.99*m.i54 + 43.15*m.i55
+ 199.55*m.i56 + 59.07*m.i57 + 123.55*m.i58 + 20.55*m.i59 + 66.72*m.i60 + 37.95*m.i61
+ 27.62*m.i62 + 23.21*m.i63 + 36.09*m.i64 + 23.09*m.i65 + 46.54*m.i66 + 67.89*m.i67
+ 34.83*m.i68 + 11.96*m.i69 + 45.77*m.i70 + 32.91*m.i71 + 77.37*m.i72 + 21.46*m.i73
+ 53.11*m.i74 + 14.29*m.i75 + 61.13*m.i76 + 32.79*m.i77 + 59.84*m.i78 + 6.59*m.i79 + 14.06*m.i80
+ 55.29*m.i81 + 33.33*m.i82 + 4.24*m.i83 + 23.21*m.i84 + 47.85*m.i85 + 48.99*m.i86 + 57.46*m.i87
+ 28.87*m.i88 + 24.6*m.i89 + 22.26*m.i90 + 28.31*m.i91 + 26.67*m.i92 + 48.1*m.i93 + 28.01*m.i94
+ 64.85*m.i95 + 25.54*m.i96 + 31.47*m.i97 + 18.31*m.i98 + 35.06*m.i99 + 8.06*m.i100 <= 2200)
|
[
"christoph.neumann@kit.edu"
] |
christoph.neumann@kit.edu
|
1c332720219986262761e730eb3c9f28373b9757
|
8ca6a90b7db0cd0d7a54f98628359806bf18dcf4
|
/lstm/datain.py
|
0f42f87d3d8e190da173bab8feb0f66f3992c574
|
[] |
no_license
|
kateharline/buckler_lab_projects
|
39f47daeaf05925156a4a1db904941db7a06feef
|
904888fa836ba365329e66c331ae500e7a888195
|
refs/heads/master
| 2021-05-18T22:32:28.974481
| 2020-03-31T00:04:07
| 2020-03-31T00:04:07
| 251,437,497
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 8,559
|
py
|
# external libraries
import numpy as np
import pandas as pd
import os
import sklearn.preprocessing as sk
import pickfamily as pf
import platform
# import control datasets for testing
import control as c
####--------------making matrices-------------#############
def txt_to_csv(txt_file):
'''
convert txt file to csv to load as a dataframe etc
:param txt_file: str filename for the txt file to load
:return: NA, outputs file as csv
'''
with open(txt_file) as f:
csv_name = os.path.basename(txt_file).split()[0] + '.csv'
with open(csv_name, 'w') as out:
for line in f:
new_line = ','.join(line.split())
out.write(new_line)
out.write('\n')
##### make hydrophobicity matrix -- how to denote *
# column names for data frame
def make_hphob_matrix():
'''
compute differences in hydrophobicity between amino acids
:return: NA
'''
hydro_values = {'I': 4.92, 'L': 4.92, 'V': 4.04, 'P': 2.98, 'F': 2.98, 'M': 2.35,
'W': 2.33, 'A': 1.81, 'C': 1.28, 'G': 0.94, 'Y': -0.14, 'T': -2.57,
'S': -3.40, 'H': -4.66, 'Q': -5.54, 'K': -5.55, 'N': -6.64, 'E': -6.81,
'D': -8.72, 'R': -14.92}
csv_labels = list(hydro_values.keys())
def difference_matrix(values):
'''
compute pairwise differences for relational data
:param values: float values to find differences between
:return: matrix of differences (2D array)
'''
os.chdir('~/Desktop/buckler-lab/box-data')
vals = list(values.values())
matrix = np.zeros((20, 20))
for i in range(len(vals)):
for j in range(len(vals)):
matrix[i][j] = abs(vals[i] - vals[j]) / 20
matrix = pd.DataFrame(data=matrix, index=csv_labels, columns=csv_labels)
matrix['*'] = np.zeros((20))
return matrix
#compute matrix
matrix = difference_matrix(hydro_values)
matrix.to_csv(path_or_buf='protein_hphob.csv')
def float_to_rank():
'''
convert dictionary of protein hphob values to integers based on rank
:return: NA, output to txt file
'''
hphob_values = {'I': 4.92, 'L': 4.92, 'V': 4.04, 'P': 2.98, 'F': 2.98, 'M': 2.35,
'W': 2.33, 'A': 1.81, 'C': 1.28, 'G': 0.94, 'Y': -0.14, 'T': -2.57,
'S': -3.40, 'H': -4.66, 'Q': -5.54, 'K': -5.55, 'N': -6.64, 'E': -6.81,
'D': -8.72, 'R': -14.92, '*': float('-inf')}
########---------actual module code--------------############
def load_data(filename, delim=','):
'''
import data as pandas dataframe
:param filename: string name of the file
:param delim: string delimiter
:return: dataframe version of the given file
useful functions to check state of data
# print(data.head(10))
# print('data types '+str(data.dtypes))
'''
"""read in the csv of gene sequences and RNAseq expression values
returns the data as a pandas dataframe"""
data = pd.read_csv(filepath_or_buffer=filename, delimiter=delim)
return data
def my_max(seqs):
'''
determine the longest sequence
:param seqs: list of string sequences
:return: integer length of the longest sequence
'''
max_string = ''
max_len = len(max_string)
for seq in seqs:
if len(seq) > max_len:
max_string = seq
max_len = len(max_string)
return max_len
def base_to_one_hot(data, max, encode_dict):
'''
one hot helper function
:param data: datafrmae containing protein sequences as strings
:param max: int maximum length of sequence to use as array dimension or for padding
:param encode_dict: dataframe that can be used to convert sequence bases/residues to one hot vectors
:return: list of one hot encodings
'''
seqs = data['protein_sequence'].tolist()
d = encode_dict.to_dict('list')
newcol = np.zeros((len(seqs), max, 21))
for k, seq in enumerate(seqs):
# padding check
for i in range(len(seq)):
one_hot = d[seq[i]]
for j in range(0,21):
newcol[k][i][j] = one_hot[j]
return newcol
def encode_hphob(data):
'''
preprocess protein data for embedding, convert amino acid bases to integers based on hydrophobicity
:param data: dataframe with protein sequences and expression values
:return: the same dataframe with a new int array encoding of the proteins
'''
hphob_values = {'I': 4.92, 'L': 4.92, 'V': 4.04, 'P': 2.98, 'F': 2.98, 'M': 2.35,
'W': 2.33, 'A': 1.81, 'C': 1.28, 'G': 0.94, 'Y': -0.14, 'T': -2.57,
'S': -3.40, 'H': -4.66, 'Q': -5.54, 'K': -5.55, 'N': -6.64, 'E': -6.81,
'D': -8.72, 'R': -14.92, '*':0}
protein_seqs = data['protein_sequence'].tolist()
hphob_encoding = [[hphob_values[base] for base in seq ] for seq in protein_seqs]
data['hphob_encode'] = pd.Series(hphob_encoding).values
return data
def get_set(x_data, y_data, set):
'''
return the train, test or val subset of the x or y data
:param x_data: dataframe of x data
:param y_data: dataframe of y data
:param set: string subset of data to extract
:return: new dataframe ready for encoding, ids, sequences, expression values
'''
x_select = x_data.loc[x_data['group'] == set]
y_select = y_data.loc[y_data['group'] == set]
new_df = pd.concat([x_select, y_select], axis=1, join='inner')
return new_df
def extract_y(data, tissue, categorical):
'''
reformat dataframe values into usable np arrays
:param data: dataframe of sequence data and expression values
:param tissue: string tissue to select data from
:param categorical: bool make the data binary threshold [0, 1]
:return: np arrays of y data
'''
# slice out just one hot vectors and protein levels
slice = data.loc[:, [tissue]]
y = np.array(slice[tissue].values)
if categorical:
return binarize(y)
else:
return y
def binarize(y):
'''
create binary representation of expression levels 0: no expression 1: expression
:param y: np array of y data
:return: np array of binary y data
'''
bin_y = y.copy()
bin_y[bin_y > 0] = 1
bin_y[bin_y <= 0] = 0
return bin_y
def standardize(y_train, y_test, y_val):
'''
standardise the data between [0, 1] fit to train data
:param y_train: np array of y training exp values
:param y_test:np array of y test exp values
:param y_val: np array of y val exp values
:return: arrays scaled based on fit to y_train
'''
scaler = sk.MinMaxScaler.fit(y_train)
y_train_scaled = scaler.transform(y_train)
y_test_scaled = scaler.transform(y_test)
y_val_scaled = scaler.transform(y_val)
return y_train_scaled, y_test_scaled, y_val_scaled
def main(data_type='random', categorical=True, standardized=False):
'''
train/test synthetic data
# how long is the sequence and how many are there... for synthetic data
l = 400
n = 10000
synth = c.get_example('protein', n, l)
heavy_As = c.get_example('heavy_As', n, l)
encode_dict = load_data('box-data/protein_onehot.csv')
synth_encoded = encode_o_h(synth, encode_dict)
a_encoded = encode_o_h(heavy_As, encode_dict)
synth_encoded.to_csv('synth.csv')
a_encoded.to_csv('a_synth.csv')
'''
tissue = 'Protein_Leaf_Zone_3_Growth'
# pick x and y data based on family characteristics
x_data, y_data = pf.main(data_type)
# extract x and y values from dataframe based on set designation
train = get_set(x_data, y_data, 'train')
val = get_set(x_data, y_data, 'val')
test = get_set(x_data, y_data, 'test')
# one hot encode the x values and split based on set designation
encode_dict = load_data('protein_onehot.csv')
max = my_max(x_data['protein_sequence'].tolist())
train_encoded = base_to_one_hot(train, max, encode_dict)
val_encoded = base_to_one_hot(val, max, encode_dict)
test_encoded = base_to_one_hot(test, max, encode_dict)
# split the y values based on set designation
train = extract_y(train, tissue, categorical)
test = extract_y(test, tissue, categorical)
val = extract_y(val, tissue, categorical)
if standardized:
train, test, val = standardized(train, test, val)
return (train_encoded, train, test_encoded, test, val_encoded, val)
if __name__ == '__main__':
main()
|
[
"kharline@wustl.edu"
] |
kharline@wustl.edu
|
b859862094592ded8b548969d924bdcdce8f980c
|
bf46b65866c1179b49c07e1d428c5a8d6dbdd9c6
|
/forecasting_revenue.py
|
6be1403fdc743e52ca57c2fbfa86456850307e3a
|
[] |
no_license
|
goldiekapur/Time-Series-Analysis-Bike-Sharing-Demand-Forecasting
|
cd3a28775207ba220cf9f2d9851d125ee02a8385
|
7d52c48ff88f7db498c9ecb917c1c3b1b65d1802
|
refs/heads/master
| 2021-01-09T03:08:35.691840
| 2019-04-24T23:23:38
| 2019-04-24T23:23:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 5,415
|
py
|
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 29 17:25:47 2019
@author: mayank
"""
import pandas as pd
import numpy as np
from fbprophet import Prophet
from datetime import datetime
from sklearn.model_selection import train_test_split
from matplotlib import pyplot
from sklearn.metrics import mean_squared_error
from math import sqrt
df = pd.read_excel('C:/Users/tusha/Desktop/newtable.xlsx',sheet_name='newtable')
df.head()
df.dtypes
df['start_time']=pd.to_datetime(df['start_time'],format="%d/%m/%Y %I:%M:%S %p")
df['end_time']=pd.to_datetime(df['end_time'],format="%d/%m/%Y %I:%M:%S %p")
#calculating the revenue from each trip not tsking the membership fees into consideration
def revenue(passtype,duration,time):
perthirty=1.75
if(time<date(year=2018,month=7,day=12)):
perthirty=3.5
cost=0
qty=int(duration/30)
extra=duration %30
if(extra!=0):
qty=qty+1
if(passtype== 'Monthly Pass' or passtype== 'Annual Pass' or passtype == 'One Day Pass' or passtype == 'Flex Pass'):
qty=qty-1
if(qty<0):
qty=0
cost=perthirty*qty
return cost
rev=list()
for passtype,duration,time in zip(df['passholder_type'],df['trip_duration'],df['start_time']):
rev.append(revenue(passtype,duration,time.date()))
df['revenue']=rev
# df['end_time'].head(10)
df_d = pd.pivot_table(df[['revenue','start_time']],aggfunc='sum',index=df['start_time'].dt.date,fill_value=0) #date
df_d.index = pd.to_datetime(df_d.index)
## imported from the cycling event url:https://www.ciclavia.org/events_history
#rem=['2016-08-14','2018-10-16','2017-03-26','2017-05-11','2017-08-13','2017-10-08',\
# '2017-12-10','2018-04-22','2018-06-24','2018-09-30','2018-12-02']
#
#df_d['temp']=df_d.index # creating a column of indexes
#
#for l in rem:
# df_d=df_d[df_d.temp!=l] # removing the rows with rem values as these are the outliers
#
#
#df_d.drop('temp',axis=1,inplace=True) # removing the index column
df_o=pd.DataFrame()
mse_trn=[]
mse_tst=[]
for i,v in enumerate(df_d.columns):
#i=0
#v=('start_time', 3005)
def prophet_inputize(df,column_num = 0):
df_1 = pd.DataFrame()
df_1['ds'] = df.index
df_1['y'] = list(df.iloc[:,i])
return(df_1)
def do_something(df_d,sample ='D',test =-184):
#df_d = df_d.resample(sample).sum()
# imported from the cycling event url:https://www.ciclavia.org/events_history
rem=['2016-08-14','2018-10-16','2017-03-26','2017-05-11','2017-08-13','2017-10-08',\
'2017-12-10','2018-04-22','2018-06-24','2018-09-30','2018-12-02']
df_d['temp']=df_d.index # creating a column of indexes
for l in rem:
df_d=df_d[df_d.temp!=l] # removing the rows with rem values as these are the outliers
df_d.drop('temp',axis=1,inplace=True) # removing the index column
df_d_trn = pd.DataFrame()
df_d_tst = pd.DataFrame()
df_d_trn = df_d.loc[df_d.index[:test]]#int(train_prop*len(df_d.index))]]
df_d_tst = df_d.loc[df_d.index[test:]]#int(train_prop*len(df_d.index)):]]
df_d_trn = prophet_inputize(df_d_trn,i)
df_d_tst = prophet_inputize(df_d_tst,i)
# df_d_trn.plot(x='ds',y='y')
# df_d_tst.plot(x='ds',y='y')
return(df_d_trn,df_d_tst)
sample_freq = 'D'
trn, tst = do_something(df_d,sample_freq,-184)
m = Prophet(yearly_seasonality=True,weekly_seasonality= False,daily_seasonality=False)
m.fit(trn)
future = m.make_future_dataframe(periods=len(tst)+90+3,freq=sample_freq) # till 31st march 2019 q1 2019
forecast = m.predict(future)
df_o[v]=forecast['yhat']
# df_o['ds']=forecast['ds']
# fig1 = m.plot(forecast)
# print(forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].tail())
# print(tst.tail())
y_actual_tst=tst['y']
y_predicted_tst=df_o[v][df_o.index[-184:]]
mse_tst.append(sqrt(mean_squared_error(y_actual_tst, y_predicted_tst)))
y_actual_trn=trn['y']
y_predicted_trn=df_o[v][df_o.index[:-184-93]] ## removing q1 2019 dates
mse_trn.append(sqrt(mean_squared_error(y_actual_trn, y_predicted_trn)))
df_o['ds']=forecast['ds']
### now run this
# imported from the cycling event url:https://www.ciclavia.org/events_history
rem=['2016-08-14','2018-10-16','2017-03-26','2017-05-11','2017-08-13','2017-10-08',\
'2017-12-10','2018-04-22','2018-06-24','2018-09-30','2018-12-02']
df_d['ds']=df_d.index # creating a column of indexes
for l in rem:
df_d=df_d[df_d.ds!=l] # removing the rows with rem values as these are the outliers
df_d=df_d.reset_index(drop=True) # reset index to zero
mse_trn=pd.DataFrame(mse_trn)
mse_tst=pd.DataFrame(mse_tst)
#import statistics
#import math
#statistics.mean(mse)
with pd.ExcelWriter('outputY_Revenue.xlsx') as writer: # doctest: +SKIP
df_d.to_excel(writer,sheet_name='actual(Y)')
df_o.to_excel(writer,sheet_name='predicted(Y)')
mse_trn.to_excel(writer,sheet_name='mse_trn(Y)')
mse_tst.to_excel(writer,sheet_name='mse_tst(Y)')
|
[
"noreply@github.com"
] |
goldiekapur.noreply@github.com
|
fa2af2256e992f5dea361ca6dc8422c6d97e35d1
|
43ab33b2f50e47f5dbe322daa03c86a99e5ee77c
|
/rcc/models/study_events.py
|
73804683abfe9626a9ff78782d4aa06520a3ae77
|
[] |
no_license
|
Sage-Bionetworks/rcc-client
|
c770432de2d2950e00f7c7bd2bac22f3a81c2061
|
57c4a621aecd3a2f3f9faaa94f53b2727992a01a
|
refs/heads/main
| 2023-02-23T05:55:39.279352
| 2021-01-21T02:06:08
| 2021-01-21T02:06:08
| 331,486,099
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,338
|
py
|
# coding: utf-8
"""
nPhase REST Resource
REDCap REST API v.2 # noqa: E501
The version of the OpenAPI document: 2.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from rcc.configuration import Configuration
class StudyEvents(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'study_event': 'list[StudyEvent]'
}
attribute_map = {
'study_event': 'studyEvent'
}
def __init__(self, study_event=None, local_vars_configuration=None): # noqa: E501
"""StudyEvents - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration()
self.local_vars_configuration = local_vars_configuration
self._study_event = None
self.discriminator = None
if study_event is not None:
self.study_event = study_event
@property
def study_event(self):
"""Gets the study_event of this StudyEvents. # noqa: E501
:return: The study_event of this StudyEvents. # noqa: E501
:rtype: list[StudyEvent]
"""
return self._study_event
@study_event.setter
def study_event(self, study_event):
"""Sets the study_event of this StudyEvents.
:param study_event: The study_event of this StudyEvents. # noqa: E501
:type: list[StudyEvent]
"""
self._study_event = study_event
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, StudyEvents):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, StudyEvents):
return True
return self.to_dict() != other.to_dict()
|
[
"thomas.yu@sagebase.org"
] |
thomas.yu@sagebase.org
|
a4885e47195c762b6bbaf2e2a19dfdf4aa3f7fc1
|
2def74312f65dbe7950e9958070a175448d0dcff
|
/setup.py
|
6d8538691297cf80515acf61017b67e3b1b9c01b
|
[] |
no_license
|
JorgeJuarezM/pyqt-examples
|
9847353d93e94534d1193bb1bc3b33e4fc683f9a
|
586df9496314c5b62fe0e30d8959feb680a1500e
|
refs/heads/master
| 2021-07-20T18:53:33.081825
| 2017-10-30T04:29:45
| 2017-10-30T04:29:45
| 108,799,879
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 368
|
py
|
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ['main.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True,
'iconfile': './icon.icns'}
setup(
app=APP,
name="Odoo Client",
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
|
[
"contacto@jorgejuarez.net"
] |
contacto@jorgejuarez.net
|
e46fb5b9471464a721d150046158fc9f3b99a474
|
92e45c3f8460a1b61ba631072af30c1c5fa25c48
|
/src/chooseplan/urls.py
|
713acd3162b3d090fde22f6353eb15d2d5efa3bc
|
[] |
no_license
|
elmiraus/HealthcareNow
|
ad19bff6c7417dcdb3ed035fbc1bcdf1d5956df6
|
3f5877fce0cb6b1366dfe3528d5fc1c628b3ac51
|
refs/heads/master
| 2020-08-08T07:01:46.378703
| 2019-10-08T20:53:55
| 2019-10-08T20:53:55
| 213,767,892
| 0
| 0
| null | 2019-10-08T22:28:34
| 2019-10-08T22:28:33
| null |
UTF-8
|
Python
| false
| false
| 121
|
py
|
from django.urls import path
from . import views
urlpatterns = [
path('', views.chooseplan, name='chooseplan'),
]
|
[
"jacqueline.rollins@cgu.edu"
] |
jacqueline.rollins@cgu.edu
|
07025217cb00bf91a6ba23c519d15a6c2bff30ad
|
82a9077bcb5a90d88e0a8be7f8627af4f0844434
|
/google-cloud-sdk/lib/tests/unit/api_lib/compute/instances/ops_agents/exceptions_test.py
|
6315b0e3b6f56b2dd728bee1157215665d21febe
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
piotradamczyk5/gcloud_cli
|
1ae2553595e569fad6ce84af62b91a7ee5489017
|
384ece11040caadcd64d51da74e0b8491dd22ca3
|
refs/heads/master
| 2023-01-01T23:00:27.858583
| 2020-10-21T04:21:23
| 2020-10-21T04:21:23
| 290,238,061
| 0
| 0
| null | 2020-10-19T16:43:36
| 2020-08-25T14:31:00
|
Python
|
UTF-8
|
Python
| false
| false
| 1,861
|
py
|
# -*- coding: utf-8 -*- #
# Copyright 2020 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.
"""Unit Tests for ops_agents.exceptions."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.api_lib.compute.instances.ops_agents import exceptions
from tests.lib import test_case
import six
ERROR_MESSAGE_1 = 'At most one agent with type [logging] is allowed.'
ERROR_MESSAGE_2 = (
'The agent version [1] is not allowed. Expected values: [latest], '
'[current-major], or anything in the format of '
'[MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION] or [MAJOR_VERSION.*.*].')
ERROR_MESSAGE_3 = (
'An agent can not be pinned to the specific version [5.3.1] when '
'[enable-autoupgrade] is set to true for that agent.')
MULTI_ERROR_MESSAGE = '{} | {} | {}'.format(
ERROR_MESSAGE_1, ERROR_MESSAGE_2, ERROR_MESSAGE_3)
class PolicyValidationMultiErrorTest(test_case.TestCase):
def testErrorMessage(self):
errors = [
exceptions.PolicyValidationError(ERROR_MESSAGE_1),
exceptions.PolicyValidationError(ERROR_MESSAGE_2),
exceptions.PolicyValidationError(ERROR_MESSAGE_3),
]
multi_error = exceptions.PolicyValidationMultiError(errors)
self.assertEqual(MULTI_ERROR_MESSAGE, six.text_type(multi_error))
|
[
"code@bootstraponline.com"
] |
code@bootstraponline.com
|
faa5ddf2e6adabec7e26614f98bcb1343fb7633b
|
d18626d8f6f023e6e583f13dafea677c01b002bc
|
/test-wi-sub-pipeline.py
|
58386666c85cdccfde266d66ee5e0df348e4aeb3
|
[] |
no_license
|
kmsmith137/rf_pipelines
|
b3c596e1977ff9821a906cd279d128baf05edd68
|
4ecf6f9a909ef185cc03335339829f2b438cd1c0
|
refs/heads/master
| 2022-03-08T13:49:09.400064
| 2020-09-06T22:57:53
| 2020-09-06T22:57:53
| 61,664,765
| 2
| 6
| null | 2022-03-03T18:05:58
| 2016-06-21T20:25:17
|
C++
|
UTF-8
|
Python
| false
| false
| 5,939
|
py
|
#!/usr/bin/env python
#
# Tests wi_sub_pipeline, in special case Dt=1 for now.
# Also indirectly tests jsonize/from_json() for a few transforms.
#
# FIXME cleanup: combine with test-cpp-python-equivalence.py
import numpy as np
import numpy.random as rand
import rf_pipelines
def make_random_transform():
transform_type = rand.randint(0,3)
if transform_type == 0:
axis = 'freq' # FIXME generalize later
nbins = rand.randint(1, 5)
nt_chunk = 8 * rand.randint(5, 11)
epsilon = rand.uniform(3.0e-4, 1.0e-3)
return rf_pipelines.spline_detrender(nt_chunk, axis, nbins, epsilon)
elif transform_type == 1:
# intensity_clipper
axis = rand.randint(0,2) if (rand.uniform() < 0.66) else None
Df = 2**rand.randint(0,4)
Dt = 2**rand.randint(0,4)
sigma = rand.uniform(1.3, 1.7)
niter = rand.randint(1,5)
iter_sigma = rand.uniform(1.8, 2.0)
nt_chunk = Dt * 8 * rand.randint(1,8)
two_pass = True if rand.randint(0,2) else False
return rf_pipelines.intensity_clipper(nt_chunk, axis, sigma, niter, iter_sigma, Df, Dt, two_pass)
else:
# std_dev_clipper
axis = rand.randint(0,2)
Df = 2**rand.randint(0,4)
Dt = 2**rand.randint(0,4)
sigma = rand.uniform(1.3, 1.7)
nt_chunk = Dt * 8 * rand.randint(1,8)
two_pass = True if rand.randint(0,2) else False
return rf_pipelines.std_dev_clipper(nt_chunk, axis, sigma, Df, Dt, two_pass)
def make_random_pipeline():
n = rand.randint(1, 5)
return rf_pipelines.pipeline([ make_random_transform() for i in xrange(n) ])
def make_random_pipeline_json():
p = make_random_pipeline()
j = p.jsonize()
# throw in this test of jsonize()/from_json()
jj = rf_pipelines.pipeline_object.from_json(j).jsonize()
assert j == jj
return j
####################################################################################################
class initial_stream(rf_pipelines.wi_stream):
def __init__(self, intensity_arr, weights_arr, nt_chunk=None):
assert intensity_arr.ndim == 2
assert intensity_arr.shape == weights_arr.shape
if nt_chunk is None:
nt_chunk = rand.randint(10,20)
rf_pipelines.wi_stream.__init__(self, 'initial_stream')
self.nfreq = intensity_arr.shape[0]
self.nt_chunk = nt_chunk
self.nt_tot = intensity_arr.shape[1]
self.intensity_arr = intensity_arr
self.weights_arr = weights_arr
def _fill_chunk(self, intensity, weights, pos):
intensity[:,:] = 0.
weights[:,:] = 0.
if pos >= self.nt_tot:
return False
n = min(self.nt_tot - pos, self.nt_chunk)
intensity[:,:n] = self.intensity_arr[:,pos:(pos+n)]
weights[:,:n] = self.weights_arr[:,pos:(pos+n)]
return True
class final_transform(rf_pipelines.wi_transform):
def __init__(self, nt_chunk=None):
if nt_chunk is None:
nt_chunk = rand.randint(10,20)
rf_pipelines.wi_transform.__init__(self, "final_transform")
self.nt_chunk = nt_chunk
self.intensity_chunks = [ ]
self.weight_chunks = [ ]
def _process_chunk(self, intensity, weights, pos):
self.intensity_chunks.append(np.copy(intensity))
self.weight_chunks.append(np.copy(weights))
def get_results(self):
intensity = np.concatenate(self.intensity_chunks, axis=1)
weights = np.concatenate(self.weight_chunks, axis=1)
return (intensity, weights)
def run_pipeline(pipeline_json, intensity_arr, weights_arr):
# Just for fun, randomize 'nt_chunk'.
p0 = initial_stream(intensity_arr, weights_arr)
p1 = rf_pipelines.pipeline_object.from_json(pipeline_json)
p2 = final_transform()
p = rf_pipelines.pipeline([p0,p1,p2])
p.run(outdir=None, verbosity=0, debug=True)
(intensity, weights) = p2.get_results()
return (intensity, weights)
####################################################################################################
def maxdiff(a1, a2):
assert a1.shape == a2.shape
return np.max(np.abs(a1-a2))
def run_test():
Df = 2**rand.randint(0,5)
nfreq = Df * 8 * rand.randint(10, 20)
nt_tot = 8 * rand.randint(150, 500)
input_intensity = rand.standard_normal(size=(nfreq,nt_tot))
input_weights = rand.uniform(0.5, 1.0, size=(nfreq,nt_tot))
p0_json = make_random_pipeline_json()
p1_json = make_random_pipeline_json()
p2_json = make_random_pipeline_json()
# First run
(i0,w0) = run_pipeline(p0_json, input_intensity, input_weights)
(i0,w0) = (i0[:,:nt_tot], w0[:,:nt_tot])
(i1,w1) = rf_pipelines.wi_downsample(i0, w0, Df, 1)
(i2,w2) = run_pipeline(p1_json, i1, w1)
(i2,w2) = (i2[:,:nt_tot], w2[:,:nt_tot])
rf_pipelines.weight_upsample(w0, w2)
(i3,w3) = run_pipeline(p2_json, i0, w0)
# Second run
si = initial_stream(input_intensity, input_weights)
p0 = rf_pipelines.pipeline_object.from_json(p0_json)
p1 = rf_pipelines.pipeline_object.from_json(p1_json)
ps = rf_pipelines.wi_sub_pipeline(p1, Df=Df, Dt=1)
p2 = rf_pipelines.pipeline_object.from_json(p2_json)
tf = final_transform()
p = rf_pipelines.pipeline([ si, p0, ps, p2, tf ])
p.run(outdir=None, verbosity=0, debug=True)
(i4,w4) = tf.get_results()
eps_i = maxdiff((i3*w3)[:,:nt_tot],(i4*w4)[:,:nt_tot])
eps_w = maxdiff(w3[:,:nt_tot], w4[:,:nt_tot])
assert eps_i < 1.0e-5
assert eps_w < 1.0e-5
assert np.all(w3[:,nt_tot:] == 0.0)
assert np.all(w4[:,nt_tot:] == 0.0)
####################################################################################################
niter = 100
for iter in xrange(100):
if iter % 10 == 0:
print 'test-wi-sub-pipeline: iteration %d/%d' % (iter, niter)
run_test()
print 'test-wi-sub-pipeline: pass'
|
[
"kmsmith@perimeterinstitute.ca"
] |
kmsmith@perimeterinstitute.ca
|
f414faf29603d9e40eddaabc2774538b2a0c5f56
|
0e6f16fe472c164134048f4356662cd91e1ad37c
|
/DJANGO_PROJECT/settings.py
|
bfdbc920d1c168d5bfa691afd0f58d913913dd66
|
[] |
no_license
|
neel0812/quick
|
e35d1ec7ff809f4a9a9c9734ed0496f6152e7cde
|
142d9e6429ade89f6d43a563dd31cd00a275b316
|
refs/heads/master
| 2022-12-23T04:30:38.670543
| 2020-10-01T05:32:12
| 2020-10-01T05:32:12
| 300,156,149
| 0
| 0
| null | 2020-10-01T05:27:50
| 2020-10-01T05:27:49
| null |
UTF-8
|
Python
| false
| false
| 2,183
|
py
|
import os
BASE_DIR = os.path.dirname(
os.path.dirname(os.path.abspath(__file__))
)
SECRET_KEY = "o7fa-3u*pqnf@9_@@-d-)$4@*f56-j+4#cv25_3h3h=5u7)ah%"
DEBUG = True
ALLOWED_HOSTS = []
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"crispy_forms", # pip install django-crispy-forms
"todo",
]
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
ROOT_URLCONF = "DJANGO_PROJECT.urls"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
},
},
]
WSGI_APPLICATION = "DJANGO_PROJECT.wsgi.application"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
}
}
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
]
LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = "/static/"
CRISPY_TEMPLATE_PACK = "bootstrap4"
|
[
"srpatel980@gmail.com"
] |
srpatel980@gmail.com
|
84ed64371f199639424fba91bfd98c0c5eec0792
|
bdff2f51d12aa4329df511ec1f5564c0cb9b14fe
|
/tests/integration/adapters/test_mongo_projects_repository.py
|
8aebb4543a985a1f7445567d2c6bc077072b3526
|
[] |
no_license
|
jdgillespie91/projects-api
|
caec3e5af8979e512100545c4f799f3ccff4e287
|
b1df9447dedfd3fe9d875f4372160b9dd770548c
|
refs/heads/master
| 2021-04-29T06:36:30.004810
| 2018-06-03T14:40:04
| 2018-06-07T19:24:18
| 77,964,889
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,242
|
py
|
from pymongo import MongoClient
from pytest import fixture
from projects.adapters.mongo_projects_repository import MongoProjectsRepository
from projects.entities.project import ProjectSchema
@fixture(scope='module')
def database():
client = MongoClient(
'mongodb://mongo:27017/',
socketTimeoutMS=3000,
connectTimeoutMS=3000,
serverSelectionTimeoutMS=3000
)
client.drop_database('projects')
db = client.projects
collection = db.projects
collection.insert_one({
'id': 'a9c1fff4-09b1-4668-b94b-a301f21efdde',
'title': 'some title',
'description': 'some description',
'status': 'some status',
'links': {
'homepage': 'https://some.url'
}
})
def test_get(database):
expected_projects = [
ProjectSchema().load({
'id': 'a9c1fff4-09b1-4668-b94b-a301f21efdde',
'title': 'some title',
'description': 'some description',
'status': 'some status',
'links': {
'homepage': 'https://some.url'
}
})
]
repo = MongoProjectsRepository()
actual_projects = repo.get()
assert expected_projects == actual_projects
|
[
"jdgillespie91@gmail.com"
] |
jdgillespie91@gmail.com
|
80ffd316b9bbc8a682e4c8e9e842d3020e7a8472
|
545536daea315e31e01e388326e21a317f73dc6c
|
/Guddu on a Date.py
|
f390db81dd0b921ac0e786f7bc984075e63bfca0
|
[] |
no_license
|
calkikhunt/CODE_CHEF
|
3cd4db7d2231dc31a045645da08c52a78edda6b6
|
81bb90368822bc77e70582ab3eae1a4244e6c80f
|
refs/heads/master
| 2022-04-18T08:43:23.900118
| 2020-01-29T09:31:35
| 2020-01-29T09:31:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 805
|
py
|
t=int(input())
for i in range(t):
ctrcopy=19
n=int(input())
ptr=0
while ptr<(n):
ctr=ctrcopy
check=str(ctrcopy)
doublecheck=str(ctrcopy+19)
sumdigi=0
while ctr>0:
use=ctr%10
ctr=ctr//10
sumdigi+=use
if sumdigi%10==0 and check[len(check)-1]!='0':
ptr+=1
if ptr>=n:
break
ctrcopy+=9
elif sumdigi%10==0 and check[len(check)-1]=='0' and check[0]==doublecheck[0]:
ptr+=1
if ptr>=n:
break
ctrcopy+=19
elif sumdigi%10==0 and check[len(check)-1]=='0' and check[0]!=doublecheck[0]:
ptr+=1
if ptr>=n:
break
ctrcopy+=18
print(ctrcopy)
|
[
"wimpywarlord@gmail.com"
] |
wimpywarlord@gmail.com
|
34b4dcbd61262a45e923027007b9cb5f120328f2
|
1391c61927d4074254525950c71d9a2b9a63d2c9
|
/My_second_Project/My_second_Project/settings.py
|
318f94b331fbe5103e34c7ab11d02b992a45e540
|
[] |
no_license
|
bridgecrew-perf7/django-deployment-21
|
69a372d3bb69bb17459d5b6d2e2bc5fcfee66e43
|
4427466274723e66fedabfc94df188b871b620ed
|
refs/heads/main
| 2023-07-13T20:57:58.883444
| 2021-08-15T10:38:28
| 2021-08-15T10:38:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,399
|
py
|
"""
Django settings for My_second_Project project.
Generated by 'django-admin startproject' using Django 3.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib import Path
import os
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
STATIC_DIR = os.path.join(BASE_DIR, 'static')
MEDIA_DIR = os.path.join(BASE_DIR, 'media')
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'u!3oz9fa7u%f%&*!%frn3o09_e-)lpjfbo-*s8y&!#d$3%=+_v'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'Login_app'
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'My_second_Project.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'My_second_Project.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
LOGIN_URL = '/login/'
STATICFILES_DIRS = [STATIC_DIR]
MEDIA_ROOT = MEDIA_DIR
|
[
"tareqhasan2007@gmail.com"
] |
tareqhasan2007@gmail.com
|
b0707b9174477ff856490eef4c8f850d69768242
|
76dc1118958fdd709a27b826457fede99498a88d
|
/miner/address.py
|
9e610104d7dfe30ac07012f2ed5f64d8dac3c57e
|
[
"MIT"
] |
permissive
|
JesseEmond/pickaxe
|
5246301e0af1c6f573ea509f7524e40757ed690d
|
73b5eebbe00d658dc37a23b5bfc2eb0c2e48b2a4
|
refs/heads/master
| 2020-12-01T11:40:49.336817
| 2016-04-29T04:12:06
| 2016-04-29T04:12:06
| 66,162,585
| 1
| 0
| null | 2016-08-20T18:44:34
| 2016-08-20T18:44:34
| null |
UTF-8
|
Python
| false
| false
| 558
|
py
|
from base58 import b58decode_check
def p2pkh_address_to_pubkey_hash(address):
"""
Takes a P2PKH address (starting with a 1, m or n symbol) and extracts its
HASH160 hash (used as a public key hash).
:see: https://en.bitcoin.it/wiki/List_of_address_prefixes
:param address: P2PKH public address
:returns: HASH160 hash of the public key
"""
decoded = b58decode_check(address)
# check that it is a mainnet or testnet P2PKH address
assert(decoded[0] in [0x00, 0x6F])
return decoded[1:] # skip version byte
|
[
"emond.jesse@gmail.com"
] |
emond.jesse@gmail.com
|
dac834b379278ddf5e2bc0403e4ac406d9aea1e4
|
4f6ad7cdea2cab5fe89df34f6e5158e4b77837c3
|
/server/dvaapp/serializers.py
|
746c7a13a61f2e3b5f38663e2f1bf6dacfb29986
|
[
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] |
permissive
|
ginusxiao/DeepVideoAnalytics
|
7194d83b518976340cd834e4e6a8ab9b164a2e3f
|
52c38c729b1a114cc46e641943e3e28a68428e25
|
refs/heads/master
| 2020-03-18T21:40:31.811272
| 2018-05-29T10:16:20
| 2018-05-29T10:16:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 26,156
|
py
|
from rest_framework import serializers, viewsets
from django.contrib.auth.models import User
from models import Video, Frame, Region, DVAPQL, QueryResults, TEvent, IndexEntries, \
Tube, Segment, Label, VideoLabel, FrameLabel, RegionLabel, \
SegmentLabel, TubeLabel, TrainedModel, Retriever, SystemState, QueryRegion,\
QueryRegionResults, Worker, TrainingSet
import os, json, logging, glob
from collections import defaultdict
from django.conf import settings
from StringIO import StringIO
from rest_framework.parsers import JSONParser
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = User
fields = ('url', 'username', 'email', 'password')
extra_kwargs = {
'password': {'write_only': True},
}
# def create(self, validated_data):
# user = User.objects.create_user(**validated_data)
# return user
#
# def update(self, instance, validated_data):
# if 'password' in validated_data:
# password = validated_data.pop('password')
# instance.set_password(password)
# return super(UserSerializer, self).update(instance, validated_data)
class VideoSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = Video
fields = '__all__'
class RetrieverSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = Retriever
fields = '__all__'
class TrainedModelSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = TrainedModel
fields = '__all__'
class TrainingSetSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = TrainingSet
fields = '__all__'
class LabelSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = Label
fields = '__all__'
class FrameLabelSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = FrameLabel
fields = '__all__'
class RegionLabelSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = RegionLabel
fields = '__all__'
class SegmentLabelSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = SegmentLabel
fields = '__all__'
class VideoLabelSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = VideoLabel
fields = '__all__'
class TubeLabelSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = TubeLabel
fields = '__all__'
class FrameLabelExportSerializer(serializers.ModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = FrameLabel
fields = '__all__'
class RegionLabelExportSerializer(serializers.ModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = RegionLabel
fields = '__all__'
class SegmentLabelExportSerializer(serializers.ModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = SegmentLabel
fields = '__all__'
class VideoLabelExportSerializer(serializers.ModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = VideoLabel
fields = '__all__'
class WorkerSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Worker
fields = ('queue_name', 'id')
class TubeLabelExportSerializer(serializers.ModelSerializer):
class Meta:
model = TubeLabel
fields = '__all__'
class FrameSerializer(serializers.HyperlinkedModelSerializer):
media_url = serializers.SerializerMethodField()
def get_media_url(self,obj):
return "{}{}/frames/{}.jpg".format(settings.MEDIA_URL,obj.video_id,obj.frame_index)
class Meta:
model = Frame
fields = ('url','media_url', 'video', 'frame_index', 'keyframe', 'w', 'h', 't',
'name', 'subdir', 'id', 'segment_index')
class SegmentSerializer(serializers.HyperlinkedModelSerializer):
media_url = serializers.SerializerMethodField()
def get_media_url(self,obj):
return "{}{}/segments/{}.mp4".format(settings.MEDIA_URL,obj.video_id,obj.segment_index)
class Meta:
model = Segment
fields = ('video','segment_index','start_time','end_time','metadata',
'frame_count','start_index','start_frame','end_frame','url','media_url', 'id')
class RegionSerializer(serializers.HyperlinkedModelSerializer):
media_url = serializers.SerializerMethodField()
def get_media_url(self,obj):
if obj.materialized:
return "{}{}/regions/{}.jpg".format(settings.MEDIA_URL,obj.video_id,obj.pk)
else:
return None
class Meta:
model = Region
fields = ('url','media_url','region_type','video','user','frame','event','frame_index',
'segment_index','text','metadata','full_frame','x','y','h','w',
'polygon_points','created','object_name','confidence','materialized','png', 'id')
class TubeSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = Tube
fields = '__all__'
class QueryRegionSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = QueryRegion
fields = '__all__'
class SystemStateSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = SystemState
fields = '__all__'
class QueryResultsSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = QueryResults
fields = '__all__'
class QueryRegionResultsSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = QueryRegionResults
fields = '__all__'
class QueryResultsExportSerializer(serializers.ModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = QueryResults
fields = '__all__'
class QueryRegionResultsExportSerializer(serializers.ModelSerializer):
class Meta:
model = QueryRegionResults
fields = '__all__'
class QueryRegionExportSerializer(serializers.ModelSerializer):
query_region_results = QueryRegionResultsExportSerializer(source='queryregionresults_set', read_only=True, many=True)
class Meta:
model = QueryRegion
fields = ('id','region_type','query','event','text','metadata','full_frame','x','y','h','w','polygon_points',
'created','object_name','confidence','png','query_region_results')
class TaskExportSerializer(serializers.ModelSerializer):
query_results = QueryResultsExportSerializer(source='queryresults_set', read_only=True, many=True)
query_regions = QueryRegionExportSerializer(source='queryregion_set', read_only=True, many=True)
class Meta:
model = TEvent
fields = ('started','completed','errored','worker','error_message','video','operation','queue',
'created','start_ts','duration','arguments','task_id','parent','parent_process',
'imported','query_results', 'query_regions', 'id')
class TEventSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = TEvent
fields = '__all__'
class IndexEntriesSerializer(serializers.HyperlinkedModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = IndexEntries
fields = '__all__'
class RegionExportSerializer(serializers.ModelSerializer):
class Meta:
model = Region
fields = '__all__'
class FrameExportSerializer(serializers.ModelSerializer):
region_list = RegionExportSerializer(source='region_set', read_only=True, many=True)
class Meta:
model = Frame
fields = ('region_list', 'video', 'frame_index', 'keyframe', 'w', 'h', 't',
'name', 'subdir', 'id', 'segment_index')
class IndexEntryExportSerializer(serializers.ModelSerializer):
class Meta:
model = IndexEntries
fields = '__all__'
class TEventExportSerializer(serializers.ModelSerializer):
class Meta:
model = TEvent
fields = '__all__'
class TubeExportSerializer(serializers.ModelSerializer):
class Meta:
model = Tube
fields = '__all__'
class SegmentExportSerializer(serializers.ModelSerializer):
class Meta:
model = Segment
fields = '__all__'
class DVAPQLSerializer(serializers.HyperlinkedModelSerializer):
tasks = TaskExportSerializer(source='tevent_set', read_only=True, many=True)
query_image_url = serializers.SerializerMethodField()
def get_query_image_url(self,obj):
if obj.process_type == DVAPQL.QUERY:
return "{}queries/{}.png".format(settings.MEDIA_URL,obj.uuid)
else:
return None
class Meta:
model = DVAPQL
fields =('process_type','query_image_url','created', 'user', 'uuid', 'script', 'tasks',
'results_metadata', 'results_available', 'completed','id')
class VideoExportSerializer(serializers.ModelSerializer):
frame_list = FrameExportSerializer(source='frame_set', read_only=True, many=True)
segment_list = SegmentExportSerializer(source='segment_set', read_only=True, many=True)
index_entries_list = IndexEntryExportSerializer(source='indexentries_set', read_only=True, many=True)
event_list = TEventExportSerializer(source='tevent_set', read_only=True, many=True)
tube_list = TubeExportSerializer(source='tube_set', read_only=True, many=True)
frame_label_list = FrameLabelExportSerializer(source='framelabel_set', read_only=True, many=True)
region_label_list = RegionLabelExportSerializer(source='regionlabel_set', read_only=True, many=True)
tube_label_list = TubeLabelExportSerializer(source='tubelabel_set', read_only=True, many=True)
segment_label_list = SegmentLabelExportSerializer(source='segmentlabel_set', read_only=True, many=True)
video_label_list = VideoLabelExportSerializer(source='videolabel_set', read_only=True, many=True)
class Meta:
model = Video
fields = ('name', 'length_in_seconds', 'height', 'width', 'metadata', 'frames', 'created', 'description',
'uploaded', 'dataset', 'uploader', 'segments', 'url','frame_list', 'segment_list',
'event_list', 'tube_list', 'index_entries_list', 'frame_label_list', 'region_label_list',"stream",
'tube_label_list', 'segment_label_list', 'video_label_list')
def serialize_video_labels(v):
serialized_labels = {}
sources = [FrameLabel.objects.filter(video_id=v.pk), VideoLabel.objects.filter(video_id=v.pk),
SegmentLabel.objects.filter(video_id=v.pk), RegionLabel.objects.filter(video_id=v.pk),
TubeLabel.objects.filter(video_id=v.pk)]
for source in sources:
for k in source:
if k.label_id not in serialized_labels:
serialized_labels[k.label_id] = {'id':k.label.id,'name':k.label.name,'set':k.label.set}
return serialized_labels.values()
def import_frame_json(f,frame_index,event_id,video_id,w,h):
regions = []
df = Frame()
df.video_id = video_id
df.event_id = event_id
df.w = w
df.h = h
df.frame_index = frame_index
df.name = f['path']
for r in f.get('regions',[]):
regions.append(import_region_json(r,frame_index,video_id,event_id))
return df,regions
def import_region_json(r,frame_index,video_id,event_id,segment_index=None,frame_id=None):
dr = Region()
dr.frame_index = frame_index
dr.video_id = video_id
dr.event_id = event_id
dr.object_name = r['object_name']
dr.region_type = r.get('region_type', Region.ANNOTATION)
dr.full_frame = r.get('full_frame', False)
if segment_index:
dr.segment_index = segment_index
if frame_id:
dr.frame_id = frame_id
dr.x = r.get('x', 0)
dr.y = r.get('y', 0)
dr.w = r.get('w', 0)
dr.h = r.get('h', 0)
dr.confidence = r.get('confidence', 0.0)
if r.get('text', None):
dr.text = r['text']
else:
dr.text = ""
dr.metadata = r.get('metadata', None)
return dr
def create_event(e, v):
de = TEvent()
de.imported = True
de.started = e.get('started', False)
de.start_ts = e.get('start_ts', None)
de.completed = e.get('completed', False)
de.errored = e.get('errored', False)
de.error_message = e.get('error_message', "")
de.video_id = v.pk
de.operation = e.get('operation', "")
de.created = e['created']
if 'seconds' in e:
de.duration = e.get('seconds', -1)
else:
de.duration = e.get('duration', -1)
de.arguments = e.get('arguments', {})
de.task_id = e.get('task_id', "")
return de
class VideoImporter(object):
def __init__(self, video, json, root_dir):
self.video = video
self.json = json
self.root = root_dir
self.region_to_pk = {}
self.frame_to_pk = {}
self.event_to_pk = {}
self.segment_to_pk = {}
self.label_to_pk = {}
self.tube_to_pk = {}
self.name_to_shasum = {'inception':'48b026cf77dfbd5d9841cca3ee550ef0ee5a0751',
'facenet':'9f99caccbc75dcee8cb0a55a0551d7c5cb8a6836',
'vgg':'52723231e796dd06fafd190957c8a3b5a69e009c'}
def import_video(self):
if self.video.name is None or not self.video.name:
self.video.name = self.json['name']
self.video.frames = self.json['frames']
self.video.height = self.json['height']
self.video.width = self.json['width']
self.video.segments = self.json.get('segments', 0)
self.video.stream = self.json.get('stream',False)
self.video.dataset = self.json['dataset']
self.video.description = self.json['description']
self.video.metadata = self.json['metadata']
self.video.length_in_seconds = self.json['length_in_seconds']
self.video.save()
if not self.video.dataset:
old_video_path = [fname for fname in glob.glob("{}/video/*.mp4".format(self.root))][0]
new_video_path = "{}/video/{}.mp4".format(self.root, self.video.pk)
os.rename(old_video_path, new_video_path)
self.import_events()
self.import_segments()
self.bulk_import_frames()
self.convert_regions_files()
self.import_index_entries()
self.import_labels()
self.import_region_labels()
self.import_frame_labels()
self.import_segment_labels()
self.import_tube_labels()
self.import_video_labels()
def import_labels(self):
for l in self.json.get('labels', []):
dl, _ = Label.objects.get_or_create(name=l['name'],set=l.get('set',''))
self.label_to_pk[l['id']] = dl.pk
def import_region_labels(self):
region_labels = []
for rl in self.json.get('region_label_list', []):
drl = RegionLabel()
drl.frame_id = self.frame_to_pk[rl['frame']]
drl.region_id = self.region_to_pk[rl['region']]
drl.video_id = self.video.pk
if 'event' in rl:
drl.event_id = self.event_to_pk[rl['event']]
drl.frame_index = rl['frame_index']
drl.segment_index = rl['segment_index']
drl.label_id = self.label_to_pk[rl['label']]
region_labels.append(drl)
RegionLabel.objects.bulk_create(region_labels,1000)
def import_frame_labels(self):
frame_labels = []
for fl in self.json.get('frame_label_list', []):
dfl = FrameLabel()
dfl.frame_id = self.frame_to_pk[fl['frame']]
dfl.video_id = self.video.pk
if 'event' in fl:
dfl.event_id = self.event_to_pk[fl['event']]
dfl.frame_index = fl['frame_index']
dfl.segment_index = fl['segment_index']
dfl.label_id = self.label_to_pk[fl['label']]
frame_labels.append(dfl)
FrameLabel.objects.bulk_create(frame_labels,1000)
def import_segment_labels(self):
segment_labels = []
for sl in self.json.get('segment_label_list', []):
dsl = SegmentLabel()
dsl.video_id = self.video.pk
if 'event' in sl:
dsl.event_id = self.event_to_pk[sl['event']]
dsl.segment_id = self.segment_to_pk[sl['segment']]
dsl.segment_index = sl['segment_index']
dsl.label_id = self.label_to_pk[sl['label']]
segment_labels.append(dsl)
SegmentLabel.objects.bulk_create(segment_labels,1000)
def import_video_labels(self):
video_labels = []
for vl in self.json.get('video_label_list', []):
dvl = VideoLabel()
dvl.video_id = self.video.pk
if 'event' in vl:
dvl.event_id = self.event_to_pk[vl['event']]
dvl.label_id = self.label_to_pk[vl['label']]
video_labels.append(dvl)
VideoLabel.objects.bulk_create(video_labels,1000)
def import_tube_labels(self):
tube_labels = []
for tl in self.json.get('tube_label_list', []):
dtl = TubeLabel()
dtl.video_id = self.video.pk
if 'event' in tl:
dtl.event_id = self.event_to_pk[tl['event']]
dtl.label_id = self.label_to_pk[tl['label']]
dtl.tube_id = self.tube_to_pk[tl['tube']]
tube_labels.append(dtl)
TubeLabel.objects.bulk_create(tube_labels,1000)
def import_segments(self):
old_ids = []
segments = []
for s in self.json.get('segment_list', []):
old_ids.append(s['id'])
segments.append(self.create_segment(s))
segment_ids = Segment.objects.bulk_create(segments, 1000)
for i, k in enumerate(segment_ids):
self.segment_to_pk[old_ids[i]] = k.id
def create_segment(self,s):
ds = Segment()
ds.video_id = self.video.pk
ds.segment_index = s.get('segment_index', '-1')
ds.start_time = s.get('start_time', 0)
ds.framelist = s.get('framelist', {})
ds.end_time = s.get('end_time', 0)
ds.metadata = s.get('metadata', "")
if s.get('event', None):
ds.event_id = self.event_to_pk[s['event']]
ds.frame_count = s.get('frame_count', 0)
ds.start_index = s.get('start_index', 0)
return ds
def import_events(self):
old_ids = []
children_ids = defaultdict(list)
events = []
for e in self.json.get('event_list', []):
old_ids.append(e['id'])
if 'parent' in e:
children_ids[e['parent']].append(e['id'])
events.append(create_event(e, self.video))
event_ids = TEvent.objects.bulk_create(events, 1000)
for i, k in enumerate(event_ids):
self.event_to_pk[old_ids[i]] = k.id
for old_id in old_ids:
parent_id = self.event_to_pk[old_id]
for child_old_id in children_ids[old_id]:
ce = TEvent.objects.get(pk=self.event_to_pk[child_old_id])
ce.parent_id = parent_id
ce.save()
def convert_regions_files(self):
if os.path.isdir('{}/detections/'.format(self.root)):
source_subdir = 'detections' # temporary for previous version imports
os.mkdir('{}/regions'.format(self.root))
else:
source_subdir = 'regions'
convert_list = []
for k, v in self.region_to_pk.iteritems():
dd = Region.objects.get(pk=v)
original = '{}/{}/{}.jpg'.format(self.root, source_subdir, k)
temp_file = "{}/regions/d_{}.jpg".format(self.root, v)
converted = "{}/regions/{}.jpg".format(self.root, v)
if dd.materialized or os.path.isfile(original):
try:
os.rename(original, temp_file)
convert_list.append((temp_file, converted))
except:
raise ValueError, "could not copy {} to {}".format(original, temp_file)
for temp_file, converted in convert_list:
os.rename(temp_file, converted)
def import_index_entries(self):
# previous_transformed = set()
for i in self.json['index_entries_list']:
di = IndexEntries()
di.video = self.video
di.algorithm = i['algorithm']
# defaults only for backward compatibility
if 'indexer_shasum' in i:
di.indexer_shasum = i['indexer_shasum']
elif i['algorithm'] in self.name_to_shasum:
di.indexer_shasum = self.name_to_shasum[i['algorithm']]
else:
di.indexer_shasum = 'UNKNOWN'
if 'approximator_shasum' in i:
di.approximator_shasum = i['approximator_shasum']
di.count = i['count']
di.contains_detections = i['contains_detections']
di.contains_frames = i['contains_frames']
di.approximate = i['approximate']
di.created = i['created']
di.features_file_name = i['features_file_name']
if 'entries_file_name' in i:
entries = json.load(file('{}/indexes/{}'.format(self.root, i['entries_file_name'])))
else:
entries = i['entries']
di.detection_name = i['detection_name']
di.metadata = i.get('metadata',{})
transformed = []
for entry in entries:
entry['video_primary_key'] = self.video.pk
if 'detection_primary_key' in entry:
entry['detection_primary_key'] = self.region_to_pk[entry['detection_primary_key']]
if 'frame_primary_key' in entry:
entry['frame_primary_key'] = self.frame_to_pk[entry['frame_primary_key']]
transformed.append(entry)
di.entries =transformed
di.save()
def bulk_import_frames(self):
frame_regions = defaultdict(list)
frames = []
frame_index_to_fid = {}
for i, f in enumerate(self.json['frame_list']):
frames.append(self.create_frame(f))
frame_index_to_fid[i] = f['id']
if 'region_list' in f:
for a in f['region_list']:
ra = self.create_region(a)
if ra.region_type == Region.DETECTION:
frame_regions[i].append((ra, a['id']))
else:
frame_regions[i].append((ra, None))
elif 'detection_list' in f or 'annotation_list' in f:
raise NotImplementedError, "Older format no longer supported"
bulk_frames = Frame.objects.bulk_create(frames)
regions = []
regions_index_to_rid = {}
region_index = 0
bulk_regions = []
for i, k in enumerate(bulk_frames):
self.frame_to_pk[frame_index_to_fid[i]] = k.id
for r, rid in frame_regions[i]:
r.frame_id = k.id
regions.append(r)
regions_index_to_rid[region_index] = rid
region_index += 1
if len(regions) == 1000:
bulk_regions.extend(Region.objects.bulk_create(regions))
regions = []
bulk_regions.extend(Region.objects.bulk_create(regions))
regions = []
for i, k in enumerate(bulk_regions):
if regions_index_to_rid[i]:
self.region_to_pk[regions_index_to_rid[i]] = k.id
def create_region(self, a):
da = Region()
da.video_id = self.video.pk
da.x = a['x']
da.y = a['y']
da.h = a['h']
da.w = a['w']
da.vdn_key = a['id']
if 'text' in a:
da.text = a['text']
elif 'metadata_text' in a:
da.text = a['metadata_text']
if 'metadata' in a:
da.metadata = a['metadata']
elif 'metadata_json' in a:
da.metadata = a['metadata_json']
da.materialized = a.get('materialized', False)
da.png = a.get('png', False)
da.region_type = a['region_type']
da.confidence = a['confidence']
da.object_name = a['object_name']
da.full_frame = a['full_frame']
if a.get('event', None):
da.event_id = self.event_to_pk[a['event']]
if 'parent_frame_index' in a:
da.frame_index = a['parent_frame_index']
else:
da.frame_index = a['frame_index']
if 'parent_segment_index' in a:
da.segment_index = a.get('parent_segment_index', -1)
else:
da.segment_index = a.get('segment_index', -1)
return da
def create_frame(self, f):
df = Frame()
df.video_id = self.video.pk
df.name = f['name']
df.frame_index = f['frame_index']
df.subdir = f['subdir']
df.h = f.get('h', 0)
df.w = f.get('w', 0)
df.t = f.get('t', 0)
if f.get('event', None):
df.event_id = self.event_to_pk[f['event']]
df.segment_index = f.get('segment_index', 0)
df.keyframe = f.get('keyframe', False)
return df
def import_tubes(tubes, video_obj):
"""
:param segments:
:param video_obj:
:return:
"""
# TODO: Implement this
raise NotImplementedError
|
[
"akshayubhat@gmail.com"
] |
akshayubhat@gmail.com
|
f349e2ae3c868492cbe120dac5a23192b4e8183c
|
a2aef0303eceb97e121392c6e23704bc42cf606a
|
/venv/Scripts/easy_install-script.py
|
bda2ce6ee9eccc23161dedbf05d9743be3e7f841
|
[] |
no_license
|
khisomovkomron/bdd-test-framework
|
3dded546d388f54ad765028af605d36f4e1142b3
|
94aa00236336b270bdb0b85484bbfef781068363
|
refs/heads/master
| 2023-02-04T10:26:05.847056
| 2020-12-25T14:06:15
| 2020-12-25T14:06:15
| 324,369,459
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 456
|
py
|
#!C:\Users\komro\PycharmProjects\BDD_Framework\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install'
__requires__ = 'setuptools==40.8.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('setuptools==40.8.0', 'console_scripts', 'easy_install')()
)
|
[
"normok_9595@bk.ru"
] |
normok_9595@bk.ru
|
dd17b924d8c1cdced32a20a58454603aebae7f7e
|
dea39b5d71a51923b0690ad2663371f863e56d92
|
/app/__init__.py
|
eb88621efb0d0498123ef26e697cb1983e2c9a9a
|
[] |
no_license
|
kamillacrozara/flask-base
|
c41b4a32dd5923e2f414e4d8af475189c1be7cfc
|
88efcaaeb8138bbedf7ffecd94fee883977d8a1d
|
refs/heads/master
| 2021-01-21T02:01:28.089332
| 2016-06-15T21:45:25
| 2016-06-15T21:45:25
| 61,230,056
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 428
|
py
|
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from config import config
db = SQLAlchemy()
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[config_name].init_app(app)
db.init_app(app)
# attach routes and custom error pages here
from .main import main as main_blueprint
app.register_blueprint(main_blueprint)
return app
|
[
"holanda.kamilla@gmail.com"
] |
holanda.kamilla@gmail.com
|
2233f57c3679133af081bb703969e9eb6bbad208
|
710f7ad3af10c79aabb0cf0f64203d968e0057d8
|
/add_data.py
|
a8595e4a9deeb7e872ac759e7cf4414f35164720
|
[] |
no_license
|
tentotal/telegram-bot
|
dc986e79c01fe249c6a0cc16b8cdae8e3f4934d6
|
97bf882c572c4ec22841542bb5d252541bad9a70
|
refs/heads/master
| 2020-03-07T22:17:29.129819
| 2018-04-02T12:03:36
| 2018-04-02T12:03:36
| 127,750,135
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,973
|
py
|
import sqlite3
conn = sqlite3.connect('data.db')
c = conn.cursor()
def create_table():
c.execute("CREATE TABLE IF NOT EXISTS BlueCheese (mood TEXT, url TEXT, file_id TEXT, caption TEXT)")
def add(mood, url, file_id, caption):
conn = sqlite3.connect('data.db')
c = conn.cursor()
c.execute("INSERT INTO BlueCheese (mood, url, file_id, caption) VALUES (?,?,?,?)",
(mood, url, file_id, caption))
conn.commit()
c.close()
conn.close()
# create_table()
add("Fresh Tunes",
"https://itunes.apple.com/ru/playlist/urban-vibes/pl.0a6e08e1248a441284c3eb5a355adfc6?l=en",
"AgADAgAD_6cxG3ELKUgZPsTzNvG3TYfCDw4ABAN1KgPtW4gJzsQCAAEC",
"Playlist")
add("Fresh Tunes",
"https://itunes.apple.com/ru/playlist/new-hip-hop/pl.4355fef8c209446f82fe6fdf9fa97e03?l=en",
"AgADAgAEqDEbcQspSKwMIDi7gIsmwsUPDgAEmW8z883ZMAnLwAIAAQI",
"Playlist")
add("Essentials",
"https://itunes.apple.com/ru/playlist/chill/pl.6d2f03aab577450cb9f357f63020f7a3?l=en",
"AgADAgADiqgxG3ELIUgzNG0rKMyElCQWSw0ABPvjY1ajkkJN2MgRAAEC",
"Playlist")
add("Essentials",
"https://itunes.apple.com/ru/playlist/mood/pl.daa2a689923d4562bf5650a96809f929?l=en",
"AgADAgADi6gxG3ELIUjV-epUrFpYulgYMw4ABDwY-GMpHR1ofWcAAgI",
"Playlist")
add("Essentials",
"https://itunes.apple.com/ru/playlist/late-night-hip-hop/pl.c15a5391c65e44759efc3083463f88c4?l=en",
"AgADAgADAagxG3ELKUik62c-KGM8FwYxSw0ABBHtf-EagwUbxNkRAAEC",
"Playlist")
add("Essentials",
"https://itunes.apple.com/ru/playlist/onrepeat/pl.426a1044619f47d6b1f86b3f79ecf857?l=en",
"AgADAgADAqgxG3ELKUh8ZKtOfe0rYcIaMw4ABGOFUItGU30tCWsAAgI",
"Playlist")
add("Chill",
"https://itunes.apple.com/ru/album/88glam/1308490281?l=en",
"AgADAgADwKgxG4S8GEg62sqbtY3uyijPDw4ABI5eLSFTYLyXJcACAAEC",
"88GLAM - 88GLAM")
add("Chill",
"https://itunes.apple.com/ru/album/stoney-deluxe/1170616610?l=en",
"AgADAgADwagxG4S8GEhbhRYoC-HKugUIMw4ABE_uIIFNvSQ3H2EAAgI",
"Post Malone - Stoney")
add("Chill",
"https://itunes.apple.com/ru/album/welcome-to-gazi/1118065829?l=en",
"AgADAgADwqgxG4S8GEjaczKYtIh2Pn0OMw4ABI2Pf79lDv-fIWIAAgI",
"A.CHAL - Welcome to GAZI")
add("Chill",
"https://itunes.apple.com/ru/album/blonde/1146195596?l=en",
"AgADAgADxagxG4S8GEiNbTq6U3jKnCQ7Sw0ABEtuOO9B2CxhetoRAAEC",
"Frank Ocean - Blonde")
add("Chill",
"https://itunes.apple.com/ru/album/lil-boat/1130017345?l=en",
"AgADAgADw6gxG4S8GEgx4Di9V7xwcjv-Mg4ABCwZXaMSS8K4zGAAAgI",
"Lil Yachty - Lil Boat")
add("Chill",
"https://itunes.apple.com/ru/album/worlds/886037928?l=en",
"AgADAgADxKgxG4S8GEiD5TyUisfvKNLaDw4ABOUErDdmaJt50cECAAEC",
"Porter Robinson - Worlds")
add("All The Way Up",
"https://itunes.apple.com/ru/album/issa-album/1254351754?l=en",
"AgADAgADxqgxG4S8GEgFH-YR1QkdhhLODw4ABHGTF7rVjx9MhL0CAAEC",
"21 Savage - Issa Album")
add("All The Way Up",
"https://itunes.apple.com/ru/album/birds-in-the-trap-sing-mcknight/1150135681?l=en",
"AgADAgADx6gxG4S8GEiPb3HCf_QFkIkAATMOAAR-1J-Jh-tGjbRgAAIC",
"Travis Scott - Birds in the Trap Sing McKnight")
add("All The Way Up",
"https://itunes.apple.com/ru/album/damn/1223618217?l=en",
"AgADAgADyKgxG4S8GEjyxuafRAmREyvNDw4ABD_4VF4gy19HcL8CAAEC",
"Kendrick Lamar - DAMN.")
add("All The Way Up",
"https://itunes.apple.com/ru/album/still-striving/1266713355?l=en",
"AgADAgADBKgxG3ELKUigHYANxgP-XO_BDw4ABGIJsWJfQQahvsYCAAEC",
"A$AP Ferg - Still Striving")
add("All The Way Up",
"https://itunes.apple.com/ru/album/at-long-last-a%24ap/994727168?l=en",
"AgADAgADBagxG3ELKUg0YO9ORtd-rjMcMw4ABFbMeVPQKum4gmoAAgI",
"A$AP Rocky - AT.LONG.LAST.A$AP")
add("All The Way Up",
"https://itunes.apple.com/ru/album/more-life/1216996902?l=en",
"AgADAgADA6gxG3ELKUhwirTDO8N3WmsKMw4ABGcPj8CwkPr332kAAgI",
"Drake - More Life")
|
[
"noreply@github.com"
] |
tentotal.noreply@github.com
|
f8881798d5ff65d89336d5d349a7c1f28b288ccd
|
1275fe3e7cfe893c9a5f922c60fa4426eb155dbb
|
/legacy/cuda-convnet2/python_util/util.py
|
7aeec4217ef87546f6414f399ec375ad38272839
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
elhuhdron/emdrp
|
5f4b057986580139ce4de9a3a01083d717b90541
|
0c48f3325dd255d0ae06a89033e34cdc958ac4ab
|
refs/heads/master
| 2021-12-28T20:45:41.418547
| 2021-10-21T13:33:26
| 2021-10-21T13:33:26
| 47,223,300
| 5
| 1
|
MIT
| 2021-09-24T14:47:36
| 2015-12-01T23:11:46
|
Python
|
UTF-8
|
Python
| false
| false
| 2,867
|
py
|
# Copyright 2014 Google Inc. 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 re
#import cPickle as myPickle
import pickle as myPickle
import os
from cStringIO import StringIO
class UnpickleError(Exception):
pass
GPU_LOCK_NO_SCRIPT = -2
GPU_LOCK_NO_LOCK = -1
def pickle(filename, data):
fo = filename
if type(filename) == str:
fo = open(filename, "w")
myPickle.dump(data, fo, protocol=myPickle.HIGHEST_PROTOCOL)
fo.close()
def unpickle(filename):
if not os.path.exists(filename):
raise UnpickleError("Path '%s' does not exist." % filename)
fo = open(filename, 'r')
z = StringIO()
file_size = os.fstat(fo.fileno()).st_size
# Read 1GB at a time to avoid overflow
while fo.tell() < file_size:
z.write(fo.read(1 << 30))
fo.close()
dict = myPickle.loads(z.getvalue())
z.close()
return dict
def is_intel_machine():
VENDOR_ID_REGEX = re.compile('^vendor_id\s+: (\S+)')
f = open('/proc/cpuinfo')
for line in f:
m = VENDOR_ID_REGEX.match(line)
if m:
f.close()
return m.group(1) == 'GenuineIntel'
f.close()
return False
# Returns the CPUs associated with a given GPU
def get_cpus_for_gpu(gpu):
#proc = subprocess.Popen(['nvidia-smi', '-q', '-i', str(gpu)], stdout=subprocess.PIPE)
#lines = proc.communicate()[0]
#lines = subprocess.check_output(['nvidia-smi', '-q', '-i', str(gpu)]).split(os.linesep)
with open('/proc/driver/nvidia/gpus/%d/information' % gpu) as f:
for line in f:
if line.startswith('Bus Location'):
bus_id = line.split(':', 1)[1].strip()
bus_id = bus_id[:7] + ':' + bus_id[8:]
ff = open('/sys/module/nvidia/drivers/pci:nvidia/%s/local_cpulist' % bus_id)
cpus_str = ff.readline()
ff.close()
cpus = [cpu for s in cpus_str.split(',') for cpu in range(int(s.split('-')[0]),int(s.split('-')[1])+1)]
return cpus
return [-1]
def get_cpu():
if is_intel_machine():
return 'intel'
return 'amd'
def is_windows_machine():
return os.name == 'nt'
def tryint(s):
try:
return int(s)
except:
return s
def alphanum_key(s):
return [tryint(c) for c in re.split('([0-9]+)', s)]
|
[
"pwatkins@gmail.com"
] |
pwatkins@gmail.com
|
a17d7cd9fdcdc856d383afb6531cce96e9bb9932
|
1ff376da81912600e0f8b3d45ea061d9418a654c
|
/backend/weeklypulls/apps/series/models.py
|
219c094f4f48347bc1312ed8e9e5114862031b13
|
[] |
no_license
|
rkuykendall/weeklypulls
|
9c3448665b3a18cc0375ad40a60ad71008bb4e89
|
e8300a6f28f6ce959130865e8bcf8c365033b2ce
|
refs/heads/master
| 2021-01-17T19:51:43.702126
| 2017-12-18T12:16:28
| 2017-12-18T12:16:28
| 61,999,182
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,704
|
py
|
import os
from django.db import models
from django.contrib.postgres.fields import ArrayField
import marvelous
from weeklypulls.apps.marvel.models import DjangoCache
class Series(models.Model):
series_id = models.IntegerField(unique=True)
read = ArrayField(models.IntegerField(), default=list)
skipped = ArrayField(models.IntegerField(), default=list)
created_at = models.DateTimeField(auto_now_add=True)
class Meta:
verbose_name_plural = "series"
def __str__(self):
try:
return '{} ({})'.format(self.api['title'], self.series_id)
except Exception:
return 'Series {} (api error)'.format(self.series_id)
@property
def api(self):
public_key = os.environ['MAPI_PUBLIC_KEY']
private_key = os.environ['MAPI_PRIVATE_KEY']
cache = DjangoCache()
marvel_api = marvelous.api(public_key, private_key, cache=cache)
series = marvel_api.series(self.series_id)
response = {
'title': series.title,
'comics': [],
'series_id': self.series_id,
}
series_args = {
'format': "comic",
'formatType': "comic",
'noVariants': True,
'limit': 100,
}
for comic in series.comics(series_args):
response['comics'].append({
'id': comic.id,
'title': comic.title,
'read': (comic.id in self.read),
'skipped': (comic.id in self.skipped),
'on_sale': comic.dates.on_sale,
'series_id': comic.series.id,
'images': comic.images,
})
return response
|
[
"robert@rkuykendall.com"
] |
robert@rkuykendall.com
|
21426abe1f48a898a33972d629c9120481bac87b
|
c59e65267ca6b2cea83cc00a136cd4e1a18da0a1
|
/PyBuildingData/PyBuildingData.py
|
755af6db79d9301d457890386955c27e25452430
|
[
"MIT"
] |
permissive
|
victorcalixto/FOSS-BIM-Experiments
|
c46bb4cd6a0f1e2d240f98f86296735bcd6748cb
|
9a4a126b7ba4bff43dec21fa1560b4d22ae34558
|
refs/heads/main
| 2023-08-14T20:20:01.833767
| 2021-10-01T09:02:13
| 2021-10-01T09:02:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 21,510
|
py
|
# Helpers
#Primitives
def PointXY(x,y)
def PointXYZ(x,y,z)
def Line2D(PointXY,PointXY)
def Arc2D(PointXY,PointXY,PointXY)
def PolyCurve
sqrt2 = 1.414213562 # Squareroot of number 2
def find_in_list_of_list(mylist, char):
for sub_list in mylist:
if char in sub_list:
return (mylist.index(sub_list))
raise ValueError("'{char}' is not in list".format(char=char))
# Py Building Data
def PyBData.Common
#PyBData.Common.Framing
#PyBData.Common.Section
#Describe Parametric Profiles
#def Section
#Aluminium
#Steel
def parameters
def C-channel_parallel_flange(Section)
Description = "C-channel with parallel flange"
ID = "C_PF"
#parameters
b = Section.b #width
h = Sectopm.h #height
tf = Section.tf #flange thickness
tw = Section.tw #web thickness
r = Section.r #web fillet
e = Section.e #centroid horizontal
#describe points
p1 = [-e,-h/2] #left bottom
p2 = [b-e,-h/2] #right bottom
p3 = [b-e,-h/2+tf]
p4 = [-e+tw+r,-h/2+tf] #start arc
p5 = [-e+tw+r-r1,-h/2+tf+r-r1] #second point arc
p6 = [-e+tw,-h/2+tf+r] #end arc
p7 = [-e+tw,h/2-tf-r] #start arc
p8 = [-e+tw+r-r1,h/2-tf-r+r1] #second point arc
p9 = [-e+tw+r,h/2-tf] #end arc
p10 = [b-e,h/2-tf]
p11 = [b-e,h/2] #right top
p12 = [-e,h/2] #left top
#describe curves
l1 = line2D(p1,p2)
l2 = line2D(p2,p3)
l3 = line2D(p3,p4)
l3 = arc2D(p4,p5,p6)
l4 = line2D(p6,p7)
l5 = arc2D(p7,p8,p9)
l6 = line2D(p9,p10)
l7 = line2D(p10,p11)
l8 = line2D(p11,p12)
l9 = line2D(p12,p1)
curve = [l1,l2,l3,l4,l5,l6,l7,l8,l9]
def C-channel_sloped_flange(Section)
Description = "C-channel with sloped flange"
ID = "C_SF"
#parameters
b = Section.b #width
h = Sectopm.h #height
tf = Section.tf #flange thickness
tw = Section.tw #web thickness
r1 = Section.r1 #web fillet
r11 = r1/sqrt2
r2 = Section.r2 #flange fillet
r21 = r2/sqrt2
tl = Section.tl #flange thickness location from right
sa = Section.sa #the angle of sloped flange in degrees
e = Section.e #centroid horizontal
#describe points
#describe points
p1 = [-e,-h/2] #left bottom
p2 = [b-e,-h/2] #right bottom
p3 = [b-e,-h/2+tf-math.tan(sa)*tl-r2] #start arc
p4 = [b-e-r2+r21,-h/2+tf-math.tan(sa)*tl-r2+r21] #second point arc
p5 = [b-e-r2+math.sin(sa)*r2,-h/2+tf-math.tan(sa)*(tl-r2)] #end arc
p6 = [-e+tw+r1-math.sin(sa)*r1,-h/2+tf+math.tan(sa)*(b-tl-tw-r1)] #start arc
p7 = [-e+tw+r1-r11,-h/2+tf+math.tan(sa)*(b-tl-tw-r1)+r1-r11] #second point arc
p8 = [-e+tw,-h/2+tf+math.tan(sa)*(b-tl-tw)+r1] #end arc
p9 = [p8[0],-p8[1]] #start arc
p10 = [p7[0],-p7[1]] #second point arc
p11 = [p6[0],-p6[1]] #end arc
p12 = [p5[0],-p5[1]] #start arc
p13 = [p4[0],-p4[1]] #second point arc
p14 = [p3[0],-p3[1]] #end arc
p15 = [p2[0],-p2[1]] #right top
p16 = [p1[0],-p1[1]] #left top
#describe curves
l1 = line2D(p1,p2)
l2 = line2D(p2,p3)
l3 = arc2D(p3,p4,p5)
l4 = line2D(p5,p6)
l5 = arc2D(p6,p7,p8)
l6 = line2D(p8,p9)
l7 = arc2D(p9,p10,p11)
l8 = line2D(p11,p12)
l9 = arc2D(p12,p13,p14)
l10 = line2D(p14,p15)
l11 = line2D(p15,p16)
l12 = line2D(p16,p1)
curve = [l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12]
def I-shape_parallel_flange(Section)
Description = "I Shape profile with parallel flange"
ID = "I_PF"
#parameters
b = Section.b #width
h = Section.h #height
tf = Section.tf #flange thickness
tw = Section.tw #web thickness
r = Section.r #web fillet
r1 = r/sqrt2
#describe points
p1 = [b/2,-h/2] #right bottom
p2 = [b/2,-h/2+tf]
p3 = [tw/2+r,-h/2+tf] #start arc
p4 = [tw/2+r-r1,(-h/2+tf+r-r1)] #second point arc
p5 = [tw/2,-h/2+tf+r] #end arc
p6 = [tw/2,h/2-tf-r] #start arc
p7 = [tw/2+r-r1,h/2-tf-r+r1] #second point arc
p8 = [tw/2+r,h/2-tf] #end arc
p9 = [b/2,h/2-tf]
p10 = [b/2),(h/2] #right top
p11 = [-p10[0],p10[1]] #left top
p12 = [-p9[0],p9[1]]
p13 = [-p8[0],p8[1]] #start arc
p14 = [-p7[0],p7[1]] #second point arc
p15 = [-p6[0],p6[1]] #end arc
p16 = [-p5[0],p5[1]] #start arc
p17 = [-p4[0],p4[1]] #second point arc
p18 = [-p3[0],p3[1]] #end arc
p19 = [-p2[0],p2[1]]
p20 = [-p1[0],p1[1]]
#describe curves
l1 = line2D(p1,p2)
l2 = line2D(p2,p3)
l3 = arc2D(p3,p4,p5)
l4 = line2D(p5,p6)
l5 = arc2D(p6,p7,p8)
l6 = line2D(p8,p9)
l7 = line2D(p9,p10)
l8 = line2D(p10,p11)
l9 = line2D(p11,p12)
l10 = line2D(p12,p13)
l11 = arc2D(p13,p14,p15)
l12 = line2D(p15,p16)
l13 = arc2D(p16,p17,p18)
l14 = line2D(p18,p19)
l15 = line2D(p19,p20)
l16 = line2D(p20,p1)
curve = [l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16]
("steelprofilename", "h", "bf", "tf", "tw", "r", "I-shape parallel flange"),
def L_angle(Section)
Description = "L-angle""
ID = "L"
#parameters
b = Section.b #width
h = Section.h #height
tw = Section.tw #wall nominal thickness
tf = tw
r1 = Section.r1 #inner fillet
r11 = r1/math.sqrt(2)
r2 = Section.r2 #outer fillet
r21 = r2/math.sqrt(2)
ex = obj.CentroidHorizontal.Value #from left
ey = obj.CentroidVertical.Value #from bottom
#describe points
p1 = [-ex,-ey] #left bottom
p2 = [b-ex,-ey] #right bottom
p3 = [b-ex,-ey+tf-r2] #start arc
p4 = [b-ex-r2+r21,-ey+tf-r2+r21] #second point arc
p5 = [b-ex-r2,-ey+tf] #end arc
p6 = [-ex+tf+r1,-ey+tf] #start arc
p7 = [-ex+tf+r1-r11,-ey+tf+r1-r11] #second point arc
p8 = [-ex+tf,-ey+tf+r1] #end arc
p9 = [-ex+tf,h-ey-r2] #start arc
p10 = [-ex+tf-r2+r21,h-ey-r2+r21] #second point arc
p11 = [-ex+tf-r2,h-ey] #end arc
p12 = [-ex,h-ey] #left top
#describe curves
l1 = line2D(p1,p2)
l2 = line2D(p2,p3)
l3 = arc2D(p3,p4,p5)
l4 = line2D(p5,p6)
l5 = arc2D(p6,p7,p8)
l6 = line2D(p8,p9)
l7 = arc2D(p9,p10,p11)
l8 = line2D(p11,p12)
l9 = line2D(p12,p1)
curve = [l1,l2,l3,l4,l5,l6,l7,l8,l9]
def rectangle_hollow_section(Section)
Description = "rectangle hollow section"
ID = "RHS"
#parameters
b = Section.b #width
h = Section.h #height
t = Section.t #wall nominal thickness
r1 = Section.r1 #inner fillet
r2 = Section.r2 #outer fillet
#describe points
#outer curve
p1 = [b/2-r1,-h/2] #right bottom start arc
p2 = [b/2-r1+r11,-h/2+r1-r11] #right bottom second point arc
p3 = [b/2,-h/2+r1] #right bottom end arc
p4 = [p3[0],-p3[1]] #right top start arc
p5 = [p2[0],-p2[1]] #right top second point arc
p6 = [p1[0],-p1[1]] #right top end arc
p7 = [-p6[0],p6[1]] #left top start arc
p8 = [-p5[0],p5[1]] #left top second point arc
p9 = [-p4[0],p4[1]] #left top end arc
p10 = [p9[0],-p9[1]] #left bottom start arc
p11 = [p8[0],-p8[1]] #left bottom second point arc
p12 = [p7[0],-p7[1]] #left bottom end arc
#inner curve
q1 = [b/2-t-r2,-h/2+t] #right bottom start arc
q2 = [b/2-t-r2+r21,-h/2+t+r2-r21] #right bottom second point arc
q3 = [b/2-t,-h/2+t+r2] #right bottom end arc
q4 = [q3[0],-q3[1]] #right top start arc
q5 = [q2[0],-q2[1]] #right top second point arc
q6 = [q1[0],-q1[1]] #right top end arc
q7 = [-q6[0],q6[1]] #left top start arc
q8 = [-q5[0],q5[1]] #left top second point arc
q9 = [-q4[0],q4[1]] #left top end arc
q10 = [q9[0],-q9[1]] #left bottom start arc
q11 = [q8[0],-q8[1]] #left bottom second point arc
q12 = [q7[0],-q7[1]] #left bottom end arc
#CURVES TO ADD
#ConcreteCastInPlace
#ConcretePrecast
#Wood
SectionDatabase #Database of steelsections, concretesections and wood dimensions
# Concrete
def concrete_shapes(shapename):
shape_data = ["rectangle shape",
"round shape",
"H-shape",
"U-shape",
"L-shape",
"T-shape",
"RHS-shape",
"CHS-shape",
"cross-shape"
]
return "test"
# Steel
# profile means for coldformed steel
# otherwise a section is hotrolled or welded
def steel_profiles(profilename):
shape_data = [("C-profile"),
("C-profile with fold"),
("C-profile with lips"),
("C-channel parallel flange"), #done
("C-channel sloped flange"), #done
("I-shape parallel flange"), #done
("I-shape sloped flange"),
("I-shape welded"),
("I-split parallel flange"),
("I-split sloped flange"),
("L-profile"), #done
("L-profile with lips"),
("L-angle"),
("pipe standard"),
("rectangle bar"),
("rectangle hollow section"),
("round"),
("round hollow section",),
("sigma profile"),
("sigma profile with fold"),
("sigma profile with lips"),
("T-shape"),
("Z-profile"),
("Z-profile with lips")
]
steelprofile_data =[("HEA100",96,100,5,8,12,"I-shape parallel flange"),
("HEA120",114,120,5,8,12,"I-shape parallel flange"),
("HEA140",133,140,6,9,12,"I-shape parallel flange"),
("HEA160",152,160,6,9,15,"I-shape parallel flange"),
("HEA180",171,180,6,10,15,"I-shape parallel flange"),
("HEA200",190,200,7,10,18,"I-shape parallel flange"),
("HEA220",210,220,7,11,18,"I-shape parallel flange"),
("HEA240",230,240,8,12,21,"I-shape parallel flange"),
("HEA260",250,260,8,13,24,"I-shape parallel flange"),
("HEA280",270,280,8,13,24,"I-shape parallel flange"),
("HEA300",290,300,9,14,27,"I-shape parallel flange"),
("HEA320",310,300,9,16,27,"I-shape parallel flange"),
("HEA360",350,300,10,18,27,"I-shape parallel flange"),
("HEA400",390,300,11,19,27,"I-shape parallel flange"),
("HEA450",440,300,12,21,27,"I-shape parallel flange"),
("HEA500",490,300,12,23,27,"I-shape parallel flange"),
("HEA550",540,300,13,24,27,"I-shape parallel flange"),
("HEA600",590,300,13,25,27,"I-shape parallel flange"),
("HEA650",640,300,14,26,27,"I-shape parallel flange"),
("HEA700",690,300,15,27,27,"I-shape parallel flange"),
("HEA800",790,300,15,28,30,"I-shape parallel flange"),
("HEA900",890,300,16,30,30,"I-shape parallel flange"),
("HEA1000",990,300,17,31,30,"I-shape parallel flange"),
("HEB100",100,100,6,10,12,"I-shape parallel flange"),
("HEB120",120,120,7,11,12,"I-shape parallel flange"),
("HEB140",140,140,7,12,12,"I-shape parallel flange"),
("HEB160",160,160,8,13,15,"I-shape parallel flange"),
("HEB180",180,180,9,14,15,"I-shape parallel flange"),
("HEB200",200,200,9,15,18,"I-shape parallel flange"),
("HEB220",220,220,10,16,18,"I-shape parallel flange"),
("HEB240",240,240,10,17,21,"I-shape parallel flange"),
("HEB260",260,260,10,18,24,"I-shape parallel flange"),
("HEB280",280,280,11,18,24,"I-shape parallel flange"),
("HEB300",300,300,11,19,27,"I-shape parallel flange"),
("HEB320",320,300,12,21,27,"I-shape parallel flange"),
("HEB340",340,300,12,22,27,"I-shape parallel flange"),
("HEB360",360,300,13,23,27,"I-shape parallel flange"),
("HEB400",400,300,14,24,27,"I-shape parallel flange"),
("HEB450",450,300,14,26,27,"I-shape parallel flange"),
("HEB500",500,300,15,28,27,"I-shape parallel flange"),
("HEB550",550,300,15,29,27,"I-shape parallel flange"),
("HEB600",600,300,16,30,27,"I-shape parallel flange"),
("HEB650",650,300,16,31,27,"I-shape parallel flange"),
("HEB700",700,300,17,32,27,"I-shape parallel flange"),
("HEB800",800,300,18,33,30,"I-shape parallel flange"),
("HEB900",900,300,19,35,30,"I-shape parallel flange"),
("HEB1000",1000,300,19,36,30,"I-shape parallel flange"),
("HEM100",120,106,12,20,12,"I-shape parallel flange"),
("HEM120",140,126,13,21,12,"I-shape parallel flange"),
("HEM140",160,146,13,22,12,"I-shape parallel flange"),
("HEM160",180,166,14,23,15,"I-shape parallel flange"),
("HEM180",200,186,15,24,15,"I-shape parallel flange"),
("HEM200",220,206,15,25,18,"I-shape parallel flange"),
("HEM220",240,226,16,26,18,"I-shape parallel flange"),
("HEM240",270,248,18,32,21,"I-shape parallel flange"),
("HEM260",290,268,18,33,24,"I-shape parallel flange"),
("HEM280",310,288,19,33,24,"I-shape parallel flange"),
("HEM300",340,310,21,39,27,"I-shape parallel flange"),
("HEM320",359,309,21,40,27,"I-shape parallel flange"),
("HEM340",377,309,21,40,27,"I-shape parallel flange"),
("HEM360",395,308,21,40,27,"I-shape parallel flange"),
("HEM400",432,307,21,40,27,"I-shape parallel flange"),
("HEM450",478,307,21,40,27,"I-shape parallel flange"),
("HEM500",524,306,21,40,27,"I-shape parallel flange"),
("HEM550",572,306,21,40,27,"I-shape parallel flange"),
("HEM600",620,305,21,40,27,"I-shape parallel flange"),
("HEM650",668,305,21,40,27,"I-shape parallel flange"),
("HEM700",716,304,21,40,27,"I-shape parallel flange"),
("HEM800",814,303,21,40,30,"I-shape parallel flange"),
("HEM900",910,302,21,40,30,"I-shape parallel flange"),
("HEM1000",1008,302,21,40,30,"I-shape parallel flange"),
("IPE80",80,3.8,46,5.2,5,"I-shape parallel flange"),
("IPE100",100,4.1,55,5.7,7,"I-shape parallel flange"),
("IPE120",120,4.4,64,6.3,7,"I-shape parallel flange"),
("IPE140",140,4.7,73,6.9,7,"I-shape parallel flange"),
("IPE160",160,5,82,7.4,9,"I-shape parallel flange"),
("IPE180",180,5.3,91,8,9,"I-shape parallel flange"),
("IPE200",200,5.6,100,8.5,12,"I-shape parallel flange"),
("IPE220",220,5.9,110,9.2,12,"I-shape parallel flange"),
("IPE240",240,6.2,120,9.8,15,"I-shape parallel flange"),
("IPE270",270,6.6,135,10.2,15,"I-shape parallel flange"),
("IPE300",300,7.1,150,10.7,15,"I-shape parallel flange"),
("IPE330",330,7.5,160,11.5,18,"I-shape parallel flange"),
("IPE360",360,8,170,12.7,18,"I-shape parallel flange"),
("IPE400",400,8.6,180,13.5,21,"I-shape parallel flange"),
("IPE450",450,9.4,190,14.6,21,"I-shape parallel flange"),
("IPE500",500,10.2,200,16,21,"I-shape parallel flange"),
("IPE550",550,11.1,210,17.2,24,"I-shape parallel flange"),
("IPE600",600,12,220,19,24,"I-shape parallel flange"),
("UNP80",80,45,6,8,"C-channelslopedflange"),
("UNP100",100,50,6,9,"C-channelslopedflange"),
("UNP120",120,55,7,9,"C-channelslopedflange"),
("UNP140",140,60,7,10,"C-channelslopedflange"),
("UNP160",160,65,8,11,"C-channelslopedflange"),
("UNP180",180,70,8,11,"C-channelslopedflange"),
("UNP200",200,75,9,12,"C-channelslopedflange"),
("UNP220",220,80,9,13,"C-channelslopedflange"),
("UNP240",240,85,10,13,"C-channelslopedflange"),
("UNP260",260,90,10,14,"C-channelslopedflange"),
("UNP280",280,95,10,15,"C-channelslopedflange"),
("UNP300",300,100,10,16,"C-channelslopedflange"),
("UNP320",320,100,14,18,"C-channelslopedflange"),
("UNP350",350,100,14,16,"C-channelslopedflange"),
("UNP380",380,102,14,16,"C-channelslopedflange"),
("UNP400",400,110,14,18,"C-channelslopedflange"),
("UPE80",80,50,4.5,8,10,"C-channelparallelflange"),
("UPE100",100,55,5,8.5,10,"C-channelparallelflange"),
("UPE120",120,60,5.5,9,10,"C-channelparallelflange"),
("UPE140",140,65,6,9.5,10,"C-channelparallelflange"),
("UPE160",160,70,6.5,10,12,"C-channelparallelflange"),
("UPE180",180,75,7,10.5,12,"C-channelparallelflange"),
("UPE200",200,80,7.5,11,12,"C-channelparallelflange"),
("UPE220",220,85,8,12,12,"C-channelparallelflange"),
("UPE240",240,90,8.5,13,15,"C-channelparallelflange"),
("UPE270",270,95,9,14,15,"C-channelparallelflange"),
("UPE300",300,100,9.5,15,15,"C-channelparallelflange"),
("UPE330",330,105,11,16,18,"C-channelparallelflange"),
("UPE360",360,110,12,17,18,"C-channelparallelflange"),
("UPE400",400,115,13.5,18,18,"C-channelparallelflange")
]
steelprofile_sublist = steelprofile_data[find_in_list_of_list(steelprofile_data, profilename)]
parameternames_sublist = shape_data[find_in_list_of_list(shape_data, steelprofile_sublist[-1])]
return steelprofile_sublist, parameternames_sublist
name_profile = "HEA200"
profile_data = steel_profiles(name_profile)[0]
profile_name = profile_data[0]
b = profile_data[2]
h = profile_data[1]
tw = profile_data[4]
tf = profile_data[3]
r = profile_data[5]
print(b)
print(h)
print(tw)
print(tf)
print(r)
|
[
"30430941+DutchSailor@users.noreply.github.com"
] |
30430941+DutchSailor@users.noreply.github.com
|
e47f403cff42f8e7b4e57a819f1862876c988f13
|
23414270f524b36972140bd9044300ada3a28136
|
/密码体制算法实现/密码体制---ElGamal/ElGamal.py
|
9f44a89c9204be14e6ef8501456a57da819a8bd7
|
[] |
no_license
|
Jing0607101510/CryptoAlgorithms
|
421f463f5dc3e4701e8d1a5c7fbea6f772e92367
|
a0a78b37b1fd07db75ea7e5ef88c2c9cfee95ced
|
refs/heads/master
| 2021-10-09T06:57:25.105848
| 2018-12-23T06:46:20
| 2018-12-23T06:46:20
| 162,868,862
| 2
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 4,331
|
py
|
from PyQt5.QtWidgets import QApplication, QWidget
import sys
from ElGamal_ui import Ui_Form
import random
class ElGamal(QWidget, Ui_Form):
def __init__(self):
super(ElGamal, self).__init__()
self.setupUi(self)
self.setupSignal()
self.setupData()
def setupSignal(self):
self.encry.clicked.connect(self.onEncryptionClicked)
self.decry.clicked.connect(self.onDecryptionClicked)
self.clear1.clicked.connect(self.onClear1Clicked)
self.clear2.clicked.connect(self.onClear2Clicked)
self.gen_key.clicked.connect(self.genKey)
def onClear1Clicked(self):
self.textEdit_1.clear()
self.textBrowser_1.clear()
def onClear2Clicked(self):
self.textBrowser_2.clear()
self.textEdit_2.clear()
def setupData(self):
self.prime = int(self.lineEdit_1.text())
self.prime_root = int(self.lineEdit_2.text())
self.xa = random.randint(1,1000000000)
self.lineEdit_3.setText(str(self.xa))
self.public_a = self.gen_pub_key(self.xa)
self.lineEdit_7.setText(str(self.public_a))
def genKey(self):
self.xa = random.randint(1,1000000000)
self.lineEdit_3.setText(str(self.xa))
self.public_a = self.gen_pub_key(self.xa)
self.lineEdit_7.setText(str(self.public_a))
def gen_pub_key(self, x):
return self.fast_exp_mode(self.prime_root, x, self.prime)
def fast_exp_mode(self, a, b, c):
res = 1
a = a % c
while b != 0:
if b % 2 == 1:
res = (res * a) % c
b >>= 1
a = (a * a) % c
return res
def split_plainText(self, text):
if len(text) % 3 != 0:
text += '\0'*(3-len(text)%3)
n = 0
i = 0
res = []
while i < len(text):
n = (n << 8) | ord(text[i])
n = (n << 8) | ord(text[i+1])
n = (n << 8) | ord(text[i+2])
res.append(n)
n = 0
i += 3
return res
def onEncryptionClicked(self):
plain_text = self.textEdit_1.toPlainText()
if plain_text:
blocks = self.split_plainText(plain_text)
result = ''
for block in blocks:
result += self.encryption(block)
self.textBrowser_1.setText(result)
def calc(self, a, key):
return self.fast_exp_mode(a, key, self.prime)
def encryption(self, block):
k = random.randint(1, self.prime-1)
K = self.calc(self.public_a, k)
c1 = self.calc(self.prime_root, k)
c2 = ((K%self.prime)*(block%self.prime))%self.prime
return '%08x%08x'%(c1, c2)
def split_enText(self, text):
if len(text) % 16 != 0:
text += '0' * (16 - len(text) % 16)
result = []
i = 0
while i < len(text):
c1 = text[i: i+8]
c2 = text[i+8: i+16]
i += 16
c1 = int(c1, 16)
c2 = int(c2, 16)
result.append([c1, c2])
return result
def onDecryptionClicked(self):
en_text = self.textEdit_2.toPlainText()
if en_text:
result = ''
blocks = self.split_enText(en_text)
for block in blocks:
result += self.decryption(block)
self.textBrowser_2.setText(result)
def decryption(self, block):
c1 = block[0]
c2 = block[1]
K = self.calc(c1, self.xa)
K_inverse = self.get_inverse(K, self.prime)
M = (c2 * (K_inverse % self.prime)) % self.prime
m = ''
for i in range(3):
m += chr(M&0x0ff)
M >>= 8
return m[::-1]
def get_inverse(self, x, mod):
x1 = 1
x2 = 0
x3 = mod
y1 = 0
y2 = 1
y3 = (x%mod+mod)%mod
while y3 != 1:
q = x3 // y3
t1 = x1 - q * y1
t2 = x2 - q * y2
t3 = x3 - q * y3
x1 = y1
x2 = y2
x3 = y3
y1 = t1
y2 = t2
y3 = t3
return y2
if __name__ == "__main__":
app = QApplication(sys.argv)
elgamal = ElGamal()
elgamal.show()
sys.exit(app.exec_())
|
[
"1293521172@qq.com"
] |
1293521172@qq.com
|
fee7f65b768ca3c7ee0d20fcf3e77badd3499824
|
ed496f92c738f3d6f169b48d9c6f47390a2693b8
|
/EasyOrders/wsgi.py
|
01ef649a12cbc712df630619cf50a142834744c4
|
[] |
no_license
|
yatharta/EasyOrders
|
642074db6c03ff00ba28e3dc12ffce3ded1c54cd
|
729e3574a82b13b96f9b60a84640e10fe9c664bc
|
refs/heads/master
| 2023-06-19T17:07:14.151804
| 2021-04-17T17:12:06
| 2021-04-17T17:12:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 397
|
py
|
"""
WSGI config for EasyOrders project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'EasyOrders.settings')
application = get_wsgi_application()
|
[
"60061690+tiwari1302@users.noreply.github.com"
] |
60061690+tiwari1302@users.noreply.github.com
|
dc87d52a4a3efca7e2c41d6882afd2891afdd885
|
1b622808bd714e3c770c811bfa6aed0b36693928
|
/30.py
|
1453dce7785baf4be61fffc89a73d01df55b6983
|
[] |
no_license
|
dinob0t/project_euler
|
a4d9a28b2994b64ea6ad064b05553f13ad38fc6d
|
b0fed278ae2bfc1bfe44043f2b02482ebc210a56
|
refs/heads/master
| 2020-09-12T14:07:16.137051
| 2014-09-01T16:16:49
| 2014-09-01T16:16:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 675
|
py
|
def sum_power_digits(num,power):
num_str = str(num)
num_sum = 0
for i in range(len(num_str)):
num_sum = num_sum + int(num_str[i])**power
return num_sum
def find_max(power):
nine_list = []
nine_list.append('9')
nines = int("".join(nine_list))
while nines < sum_power_digits(nines,power):
nine_list.append('9')
nines = int("".join(nine_list))
return nines
def find_numbers(power):
max_test = find_max(power)
success_sum = 0
for i in range(2,max_test):
spd = sum_power_digits(i, power)
if spd == i:
success_sum = success_sum + i
return success_sum
if __name__ == "__main__":
#print sum_power_digits(99999,4)
print find_numbers(5)
|
[
"dean.hillan@gmail.com"
] |
dean.hillan@gmail.com
|
e05b8c8908428641797fabbd3dc891fe97237cdb
|
8b30f1b8bcee0e8428a183e944ab01d4bd8912a3
|
/Trees/_tree_abstract.py
|
deecacfa9ed3ad4cfc86f7fe9aa76b3fc90a00f5
|
[] |
no_license
|
hayleymathews/data_structures_and_algorithms
|
1cd2bb4358e8f8a9681b79e2cf862dc51be4a4b6
|
ef89e4c89cb014d0acea1669f927cadc6af70225
|
refs/heads/master
| 2020-09-02T13:27:15.083968
| 2018-01-27T20:42:46
| 2018-01-27T20:42:46
| 219,231,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,872
|
py
|
"""python implementation of abstract class for ADT Tree"""
from abc import ABC, abstractmethod
from Queues.linked_queue import LinkedQueue
class Tree(ABC):
"""
abstract class representing a tree structure
"""
class Node:
def __init__(self, value):
self.value = value
def __repr__(self):
return "Node: {}".format(self.value)
def __init__(self):
self.root = None
def __iter__(self):
"""
generate an iteration of the tree's elements
"""
for p in self.positions():
yield p.element()
@abstractmethod
def __len__(self):
"""
return total number of elements in tree
"""
pass
@abstractmethod
def add_root(self, e):
"""
add Element e as tree's root
"""
pass
def get_root(self):
"""
return Position representing tree's root or None if empty
"""
return self.root
@abstractmethod
def parent(self, p):
"""
return Position representing p's paren of None if p is root
"""
pass
@abstractmethod
def num_children(self, p):
"""
return number of children Position p has
"""
pass
@abstractmethod
def children(self, p):
"""
generate an iteration of Positions representing p's children
"""
pass
def is_root(self, p):
"""
return True if Position p represents root of tree O(1)
"""
return self.get_root() == p
def is_leaf(self, p):
"""
return True if Position p has no children O(1)
"""
return self.num_children(p) == 0
def is_empty(self):
"""
return True if tree is empty
"""
return len(self) == 0
def depth(self, p):
"""
return number of levels separating Position p from root
"""
if self.is_root(p):
return 0
else:
return 1 + self.depth(self.parent(p))
def positions(self):
"""
generate an iteration of the tree's positions
"""
return self.preorder()
def preorder(self):
"""
generate a preorder iteration of positions in the tree
"""
if not self.is_empty():
for p in self._subtree_preorder(self.root):
yield p
def _subtree_preorder(self, p):
"""
generate a preorder iteration of positions in subtree rooted at p
"""
yield p
for c in self.children(p):
for other in self._subtree_preorder(c):
yield other
def postorder(self):
"""
generate a postorder iteration of positions in the tree
"""
if not self.is_empty():
for p in self._subtree_postorder(self.root):
yield p
def _subtree_postorder(self, p):
"""
genereate a postorder iteration of positions in subtree rooted at p
"""
for c in self.children(p):
for other in self._subtree_postorder(c):
yield other
yield p
def breadth_first(self):
"""
generate a breadth-first iteratorion of the positions of the tree
"""
if not self.is_empty():
fringe = LinkedQueue()
fringe.enqueue(self.root)
while not fringe.is_empty():
p = fringe.dequeue()
yield p
for c in self.children(p):
fringe.enqueue(c)
def preorder_indent(self, T, p, d):
"""
print preorder representation of subtree of T rooted at p at depth d
"""
print(2*d*' ' + str(p.element()))
for c in T.children(p):
self.preorder_indent(T, c, d+ 1)
|
[
"hmathews.tulane@gmail.com"
] |
hmathews.tulane@gmail.com
|
481ae39bdd81c05407a95d88b256471c8e60c9a3
|
d7327e6f2a68da73da2f2a99128da0e8a4a1b5d1
|
/cache/.mako.tmp/post_helper.tmpl.py
|
8989eeefff5685cabf849085b186c2f1957c7e3b
|
[] |
no_license
|
ryandkerr/nikola-ryandkerr
|
62d1d12aa65a05a8ea0aa304431a4e22109e130e
|
8c402e7f453948df66d9b4bdb4b2c661ff5213fa
|
refs/heads/master
| 2021-01-23T13:49:47.540182
| 2015-06-30T02:01:15
| 2015-06-30T02:01:15
| 37,417,504
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 9,719
|
py
|
# -*- coding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 10
_modified_time = 1435629633.56992
_enable_loop = True
_template_filename = u'/home/ryan/.virtualenvs/nikola-web/local/lib/python2.7/site-packages/nikola/data/themes/base/templates/post_helper.tmpl'
_template_uri = u'post_helper.tmpl'
_source_encoding = 'utf-8'
_exports = ['html_tags', 'html_pager', 'twitter_card_information', 'meta_translations', 'mathjax_script', 'open_graph_metadata']
def render_body(context,**pageargs):
__M_caller = context.caller_stack._push_frame()
try:
__M_locals = __M_dict_builtin(pageargs=pageargs)
__M_writer = context.writer()
__M_writer(u'\n')
__M_writer(u'\n\n')
__M_writer(u'\n\n')
__M_writer(u'\n\n')
__M_writer(u'\n\n')
__M_writer(u'\n\n')
__M_writer(u'\n')
return ''
finally:
context.caller_stack._pop_frame()
def render_html_tags(context,post):
__M_caller = context.caller_stack._push_frame()
try:
_link = context.get('_link', UNDEFINED)
hidden_tags = context.get('hidden_tags', UNDEFINED)
__M_writer = context.writer()
__M_writer(u'\n')
if post.tags:
__M_writer(u' <ul itemprop="keywords" class="tags">\n')
for tag in post.tags:
if tag not in hidden_tags:
__M_writer(u' <li><a class="tag p-category" href="')
__M_writer(unicode(_link('tag', tag)))
__M_writer(u'" rel="tag">')
__M_writer(unicode(tag))
__M_writer(u'</a></li>\n')
__M_writer(u' </ul>\n')
return ''
finally:
context.caller_stack._pop_frame()
def render_html_pager(context,post):
__M_caller = context.caller_stack._push_frame()
try:
messages = context.get('messages', UNDEFINED)
__M_writer = context.writer()
__M_writer(u'\n')
if post.prev_post or post.next_post:
__M_writer(u' <ul class="pager">\n')
if post.prev_post:
__M_writer(u' <li class="previous">\n <a href="')
__M_writer(unicode(post.prev_post.permalink()))
__M_writer(u'" rel="prev" title="')
__M_writer(filters.html_escape(unicode(post.prev_post.title())))
__M_writer(u'">')
__M_writer(unicode(messages("Previous post")))
__M_writer(u'</a>\n </li>\n')
if post.next_post:
__M_writer(u' <li class="next">\n <a href="')
__M_writer(unicode(post.next_post.permalink()))
__M_writer(u'" rel="next" title="')
__M_writer(filters.html_escape(unicode(post.next_post.title())))
__M_writer(u'">')
__M_writer(unicode(messages("Next post")))
__M_writer(u'</a>\n </li>\n')
__M_writer(u' </ul>\n')
return ''
finally:
context.caller_stack._pop_frame()
def render_twitter_card_information(context,post):
__M_caller = context.caller_stack._push_frame()
try:
twitter_card = context.get('twitter_card', UNDEFINED)
__M_writer = context.writer()
__M_writer(u'\n')
if twitter_card and twitter_card['use_twitter_cards']:
__M_writer(u' <meta name="twitter:card" content="')
__M_writer(filters.html_escape(unicode(twitter_card.get('card', 'summary'))))
__M_writer(u'">\n')
if 'site:id' in twitter_card:
__M_writer(u' <meta name="twitter:site:id" content="')
__M_writer(unicode(twitter_card['site:id']))
__M_writer(u'">\n')
elif 'site' in twitter_card:
__M_writer(u' <meta name="twitter:site" content="')
__M_writer(unicode(twitter_card['site']))
__M_writer(u'">\n')
if 'creator:id' in twitter_card:
__M_writer(u' <meta name="twitter:creator:id" content="')
__M_writer(unicode(twitter_card['creator:id']))
__M_writer(u'">\n')
elif 'creator' in twitter_card:
__M_writer(u' <meta name="twitter:creator" content="')
__M_writer(unicode(twitter_card['creator']))
__M_writer(u'">\n')
return ''
finally:
context.caller_stack._pop_frame()
def render_meta_translations(context,post):
__M_caller = context.caller_stack._push_frame()
try:
lang = context.get('lang', UNDEFINED)
translations = context.get('translations', UNDEFINED)
len = context.get('len', UNDEFINED)
__M_writer = context.writer()
__M_writer(u'\n')
if len(translations) > 1:
for langname in translations.keys():
if langname != lang and post.is_translation_available(langname):
__M_writer(u' <link rel="alternate" hreflang="')
__M_writer(unicode(langname))
__M_writer(u'" href="')
__M_writer(unicode(post.permalink(langname)))
__M_writer(u'">\n')
return ''
finally:
context.caller_stack._pop_frame()
def render_mathjax_script(context,post):
__M_caller = context.caller_stack._push_frame()
try:
__M_writer = context.writer()
__M_writer(u'\n')
if post.is_mathjax:
__M_writer(u' <script type="text/x-mathjax-config">\n MathJax.Hub.Config({tex2jax: {inlineMath: [[\'$latex \',\'$\'], [\'\\\\(\',\'\\\\)\']]}});</script>\n <script src="/assets/js/mathjax.js"></script>\n')
return ''
finally:
context.caller_stack._pop_frame()
def render_open_graph_metadata(context,post):
__M_caller = context.caller_stack._push_frame()
try:
lang = context.get('lang', UNDEFINED)
permalink = context.get('permalink', UNDEFINED)
url_replacer = context.get('url_replacer', UNDEFINED)
striphtml = context.get('striphtml', UNDEFINED)
abs_link = context.get('abs_link', UNDEFINED)
blog_title = context.get('blog_title', UNDEFINED)
use_open_graph = context.get('use_open_graph', UNDEFINED)
__M_writer = context.writer()
__M_writer(u'\n')
if use_open_graph:
__M_writer(u' <meta property="og:site_name" content="')
__M_writer(striphtml(unicode(blog_title)))
__M_writer(u'">\n <meta property="og:title" content="')
__M_writer(filters.html_escape(unicode(post.title()[:70])))
__M_writer(u'">\n <meta property="og:url" content="')
__M_writer(unicode(abs_link(permalink)))
__M_writer(u'">\n')
if post.description():
__M_writer(u' <meta property="og:description" content="')
__M_writer(filters.html_escape(unicode(post.description()[:200])))
__M_writer(u'">\n')
else:
__M_writer(u' <meta property="og:description" content="')
__M_writer(filters.html_escape(unicode(post.text(strip_html=True)[:200])))
__M_writer(u'">\n')
if post.previewimage:
__M_writer(u' <meta property="og:image" content="')
__M_writer(unicode(url_replacer(permalink, post.previewimage, lang, 'absolute')))
__M_writer(u'">\n')
__M_writer(u' <meta property="og:type" content="article">\n')
if post.date.isoformat():
__M_writer(u' <meta property="article:published_time" content="')
__M_writer(unicode(post.date.isoformat()))
__M_writer(u'">\n')
if post.tags:
for tag in post.tags:
__M_writer(u' <meta property="article:tag" content="')
__M_writer(unicode(tag))
__M_writer(u'">\n')
return ''
finally:
context.caller_stack._pop_frame()
"""
__M_BEGIN_METADATA
{"source_encoding": "utf-8", "line_map": {"15": 0, "20": 2, "21": 11, "22": 23, "23": 40, "24": 69, "25": 85, "26": 93, "32": 13, "38": 13, "39": 14, "40": 15, "41": 16, "42": 17, "43": 18, "44": 18, "45": 18, "46": 18, "47": 18, "48": 21, "54": 25, "59": 25, "60": 26, "61": 27, "62": 28, "63": 29, "64": 30, "65": 30, "66": 30, "67": 30, "68": 30, "69": 30, "70": 33, "71": 34, "72": 35, "73": 35, "74": 35, "75": 35, "76": 35, "77": 35, "78": 38, "84": 71, "89": 71, "90": 72, "91": 73, "92": 73, "93": 73, "94": 74, "95": 75, "96": 75, "97": 75, "98": 76, "99": 77, "100": 77, "101": 77, "102": 79, "103": 80, "104": 80, "105": 80, "106": 81, "107": 82, "108": 82, "109": 82, "115": 3, "122": 3, "123": 4, "124": 5, "125": 6, "126": 7, "127": 7, "128": 7, "129": 7, "130": 7, "136": 87, "140": 87, "141": 88, "142": 89, "148": 42, "159": 42, "160": 43, "161": 44, "162": 44, "163": 44, "164": 45, "165": 45, "166": 46, "167": 46, "168": 47, "169": 48, "170": 48, "171": 48, "172": 49, "173": 50, "174": 50, "175": 50, "176": 52, "177": 53, "178": 53, "179": 53, "180": 55, "181": 60, "182": 61, "183": 61, "184": 61, "185": 63, "186": 64, "187": 65, "188": 65, "189": 65, "195": 189}, "uri": "post_helper.tmpl", "filename": "/home/ryan/.virtualenvs/nikola-web/local/lib/python2.7/site-packages/nikola/data/themes/base/templates/post_helper.tmpl"}
__M_END_METADATA
"""
|
[
"ryankerr@college.harvard.edu"
] |
ryankerr@college.harvard.edu
|
6197cdabb7c4583ac32673f476142d255aaa856f
|
d65499ebd34c4fb8095294b12619104efbbd8ee4
|
/Airflow Writing/main_code.py
|
2c2325b4f3e04e8e185fae5014555c6833c0d61d
|
[] |
no_license
|
ashishsingh99/AirFlow-Writing
|
3135a93a95c0b22e97ca4a8a91584ddaaea9fe3f
|
696b66ab44751f5b256b1fe8591bc17abb8d6ebe
|
refs/heads/main
| 2023-05-29T03:14:36.446736
| 2021-06-13T13:28:24
| 2021-06-13T13:28:24
| 376,550,471
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,451
|
py
|
import cv2
import numpy as np
#### global ####
x,y,k = 200,200,-1
cap = cv2.VideoCapture(0)
################################################
############# func def #########################
def take_inp(event, x1, y1, flag, param):
global x, y, k
if event == cv2.EVENT_LBUTTONDOWN:
x = x1
y = y1
k = 1
cv2.namedWindow("enter_point")
cv2.setMouseCallback("enter_point", take_inp)
##### taking input point ######################
while True:
_, inp_img = cap.read()
inp_img = cv2.flip(inp_img, 1)
gray_inp_img = cv2.cvtColor(inp_img, cv2.COLOR_BGR2GRAY)
cv2.imshow("enter_point", inp_img)
if k == 1 or cv2.waitKey(30) == 27:
cv2.destroyAllWindows()
break
##############################################
stp = 0
########## opical flow starts here ###########
old_pts = np.array([[x, y]], dtype=np.float32).reshape(-1,1,2)
mask = np.zeros_like(inp_img)
while True:
_, new_inp_img = cap.read()
new_inp_img = cv2.flip(new_inp_img, 1)
new_gray = cv2.cvtColor(new_inp_img, cv2.COLOR_BGR2GRAY)
new_pts,status,err = cv2.calcOpticalFlowPyrLK(gray_inp_img,
new_gray,
old_pts,
None, maxLevel=1,
criteria=(cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT,
15, 0.08))
for i, j in zip(old_pts, new_pts):
x,y = j.ravel()
a,b = i.ravel()
if cv2.waitKey(2) & 0xff == ord('q'):
stp = 1
elif cv2.waitKey(2) & 0xff == ord('w'):
stp = 0
elif cv2.waitKey(2) == ord('n'):
mask = np.zeros_like(new_inp_img)
if stp == 0:
mask = cv2.line(mask, (a,b), (x,y), (0,0,255), 6)
cv2.circle(new_inp_img, (x,y), 6, (0,255,0), -1)
new_inp_img = cv2.addWeighted(mask, 0.3, new_inp_img, 0.7, 0)
cv2.putText(mask, "'q' to gap 'w' - start 'n' - clear", (10,50),
cv2.FONT_HERSHEY_PLAIN, 2, (255,255,255))
cv2.imshow("ouput", new_inp_img)
cv2.imshow("result", mask)
gray_inp_img = new_gray.copy()
old_pts = new_pts.reshape(-1,1,2)
if cv2.waitKey(1) & 0xff == ord("a"):
break
cv2.destroyAllWindows()
cap.release()
|
[
"noreply@github.com"
] |
ashishsingh99.noreply@github.com
|
9aec856b0fb1eb94d3f55b1249194e4c210932aa
|
1f3f0dc8799dac1e7974b1b05211c2bb863db787
|
/Asakura/3set/part26.py
|
f09145e1e0d00d37716d85d01ebdf63eb69112a2
|
[] |
no_license
|
m-note/100knock2015
|
665bb27bc84a0eacaa795523b5e65a5b64c426ac
|
84cd1d0617b0b5c15f64e593dd2e0ae21a4dcef7
|
refs/heads/master
| 2021-01-18T19:41:54.111994
| 2015-07-28T16:15:53
| 2015-07-28T16:15:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,156
|
py
|
#!usr/bin/python
#--*--coding:utf-8--*--
#強調マークアップの除去:025の処理時に、テンプレートの値からMediawikiの強調マークアップを除去してテキストに変換せよ
import sys
import re
if __name__ == '__main__':
inputfile = open(sys.argv[1],'r')
re_start = re.compile('\{\{基礎情報')
re_end = re.compile('\}\}')
re_temp = re.compile('\|(.+?) = (.+)')
re_ref = re.compile('(.*)(<ref>|<ref.*)')
re_impact = re.compile('\'\'+')
mydict = {}
flag = False
for line in inputfile:
if re_start.match(line) is not None:
flag = True
continue
if re_end.match(line) is not None:
flag = False
break
if flag:
result = re_temp.search(line)
if result is not None:
key = result.group(1)
ref = re_ref.search(result.group(2))
if ref is not None:
value = ref.group(1)
else:
value = result.group(2)
value = re_impact.sub('',value)
mydict[key] = value
for key,value in sorted(mydict.items()):
print '%s = %s' % (key,value)
|
[
"tennisabc562@gmail.com"
] |
tennisabc562@gmail.com
|
7ae8008a08ca52e7b57bd92704d3e8870be2f0c6
|
97c6ea9a1e561d9a8ac250c90b15ecf3cda6af44
|
/models/pointnet2_seg.py
|
68db21bd2f9cb874105111d5f93db8c56ad04153
|
[] |
no_license
|
li1901/Pointnet2.PyTorch
|
4d216aa92526e294ce38469b48025913a2d5350f
|
1b98042fa286ce13db5cbfeb498f0f64dc1487b4
|
refs/heads/master
| 2023-01-08T23:15:51.981693
| 2020-11-14T03:02:12
| 2020-11-14T03:02:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,406
|
py
|
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils.set_abstraction import PointNet_SA_Module, PointNet_SA_Module_MSG
from utils.feature_propagation import PointNet_FP_Module
class pointnet2_seg_ssg(nn.Module):
def __init__(self, in_channels, nclasses):
super(pointnet2_seg_ssg, self).__init__()
self.pt_sa1 = PointNet_SA_Module(M=512, radius=0.2, K=32, in_channels=in_channels, mlp=[64, 64, 128], group_all=False)
self.pt_sa2 = PointNet_SA_Module(M=128, radius=0.4, K=64, in_channels=131, mlp=[128, 128, 256], group_all=False)
self.pt_sa3 = PointNet_SA_Module(M=None, radius=None, K=None, in_channels=259, mlp=[256, 512, 1024], group_all=True)
self.pt_fp1 = PointNet_FP_Module(in_channels=1024+256, mlp=[256, 256], bn=True)
self.pt_fp2 = PointNet_FP_Module(in_channels=256 + 128, mlp=[256, 128], bn=True)
self.pt_fp3 = PointNet_FP_Module(in_channels=128 + 6, mlp=[128, 128, 128], bn=True)
self.conv1 = nn.Conv1d(128, 128, 1, stride=1, bias=False)
self.bn1 = nn.BatchNorm1d(128)
self.dropout1 = nn.Dropout(0.5)
self.cls = nn.Conv1d(128, nclasses, 1, stride=1)
def forward(self, l0_xyz, l0_points):
l1_xyz, l1_points = self.pt_sa1(l0_xyz, l0_points)
l2_xyz, l2_points = self.pt_sa2(l1_xyz, l1_points)
l3_xyz, l3_points = self.pt_sa3(l2_xyz, l2_points)
l2_points = self.pt_fp1(l2_xyz, l3_xyz, l2_points, l3_points)
l1_points = self.pt_fp2(l1_xyz, l2_xyz, l1_points, l2_points)
l0_points = self.pt_fp3(l0_xyz, l1_xyz, torch.cat([l0_points, l0_xyz], dim=-1), l1_points)
net = l0_points.permute(0, 2, 1).contiguous()
net = self.dropout1(F.relu(self.bn1(self.conv1(net))))
net = self.cls(net)
return net
class seg_loss(nn.Module):
def __init__(self):
super(seg_loss, self).__init__()
self.loss = nn.CrossEntropyLoss()
def forward(self, pred, label):
'''
:param pred: shape=(B, N, C)
:param label: shape=(B, N)
:return:
'''
loss = self.loss(pred, label)
return loss
if __name__ == '__main__':
in_channels = 6
n_classes = 50
l0_xyz = torch.randn(4, 1024, 3)
l0_points = torch.randn(4, 1024, 3)
model = pointnet2_seg_ssg(in_channels, n_classes)
net = model(l0_xyz, l0_points)
print(net.shape)
|
[
"lifazhu@deepglint.com"
] |
lifazhu@deepglint.com
|
e7e5c5a12d2160bfbdb3aa8eb09df7b667911baf
|
0a8619f073dd199f054eff1947d3d5a66f0f160c
|
/4.py
|
cabb6877cdb802c615eceb7b09bd24fcfd2db1e3
|
[] |
no_license
|
rainmayecho/applemunchers
|
70fc858eb6d9086365398b1515abac9e3fd265dd
|
cd1e92836eac53a781597bf316d80bcf0cba9dfb
|
refs/heads/master
| 2021-01-18T22:24:48.087329
| 2013-09-10T16:55:47
| 2013-09-10T16:55:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 381
|
py
|
def func():
i=900
palindrome = 0
for x in range(i,1000):
for y in range(i+1,1000):
if is_palindrome(str(x*y)) and x*y > palindrome:
palindrome = x*y
return palindrome
def is_palindrome(input):
string = list(input)
string.reverse()
if list(input) == string:
return True
return False
|
[
"sanguinex9@gmail.com"
] |
sanguinex9@gmail.com
|
9b7d397ba307c03c0cd50292f30ea2770a2a8816
|
ca7aa979e7059467e158830b76673f5b77a0f5a3
|
/Python_codes/p02623/s581456736.py
|
db739a5bab8b529088885d50f94a895ce4eb8e86
|
[] |
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
| 713
|
py
|
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
a_num = 0
b_num = 0
book_num = 0
passed_k = 0
for i in range(n):
if a[i] + passed_k <= k:
a_num += 1
passed_k += a[i]
else:
break
for i in range(m):
if b[i] + passed_k <= k:
b_num += 1
passed_k += b[i]
else:
break
book_num = a_num + b_num
while a_num > 0:
passed_k -= a[a_num - 1]
a_num -= 1
while b_num < m:
if passed_k + b[b_num] <= k:
passed_k += b[b_num]
b_num += 1
else:
break
book_num = max(book_num, a_num + b_num)
if b_num == m:
break
print(book_num)
|
[
"66529651+Aastha2104@users.noreply.github.com"
] |
66529651+Aastha2104@users.noreply.github.com
|
6ac0c907489a203ecfc7642cfbef6fc7477c2e62
|
1287456060aa52a0338ab3928c300a14779f9a30
|
/SRP/tasks.py
|
f054f4a1446e36b72b5887a09929672704735830
|
[] |
no_license
|
maxm11/Full-Stack-Senior-Research-Project
|
66a9dc0e817556c0a0806740aba65535adeca9ef
|
68e5d80343881bdee0335f39e95063897bc4e8d6
|
refs/heads/master
| 2021-03-27T08:31:03.530687
| 2018-12-05T06:28:55
| 2018-12-05T06:28:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 6,219
|
py
|
# Create your tasks here
from __future__ import absolute_import, unicode_literals
from .models import Entity, Experience, Sentence, Noun
from decimal import Decimal
from .libs.nlp import tone
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from background_task import background
from textblob import TextBlob
from django_dandelion.datatxt import EntityExtraction
import requests
# Sample Tasks
def add(x, y):
return x + y
def div(x, y):
return x / y
def xsum(numbers):
return sum(numbers)
@background(schedule=1, queue="entity")
def entity_bg(ent_id):
entity_id = int(ent_id)
entity = Entity.objects.filter(pk=entity_id)[0]
if entity.current_process:
try:
sent = Sentence.objects.filter(entity_id=entity.id, process_t=-1)[0]
ee = EntityExtraction()
text = sent.content
ee.params = 'text', text
ee.params = 'lang', 'en'
ee.params = 'country', 'US'
ee.params = 'min_confidence', '0.5'
a = ee.analyze()
for note in a.annotations:
n = Noun()
n.noun = note['id']
n.joy = sent.joy
n.sadness = sent.sadness
n.fear = sent.fear
n.anger = sent.anger
n.analytical = sent.analytical
n.confident = sent.confident
n.tentative = sent.tentative
n.entity_id = entity.id
n.experience_id = sent.experience_id
n.sentence_id = sent.id
n.save()
sent.process_t = entity.current_t
sent.save()
entity.current_t += 1
entity.joy = ((sent.joy + entity.joy)/2)
entity.sadness = ((sent.sadness + entity.sadness)/2)
entity.fear = ((sent.fear + entity.fear)/2)
entity.anger = ((sent.anger + entity.anger)/2)
entity.analytical = ((sent.analytical + entity.analytical)/2)
entity.confident = ((sent.confident + entity.confident)/2)
entity.tentative = ((sent.tentative + entity.tentative)/2)
entity.save()
except IndexError:
entity.current_process = False
entity.save()
@background(schedule=1, queue="experience")
def experience_intake(exp_id, time):
experience_id = int(exp_id)
experience = Experience.objects.filter(pk=experience_id)[0]
# Take in Experience
experience_content = experience.content
# Run Text Sentiment
# Output : sent_score, sent_mag, sentences[list]
analysis = tone(experience_content)
# Document Sentiment
for t in analysis['document_tone']['tones']:
tid = t['tone_id']
score = t['score']
exec("experience." + tid + "= score")
# Save Experience
experience.process_t = time
experience.save()
# Breakdown the sentences and save them to the database
if analysis['sentences_tone']:
for sent in analysis['sentences_tone']:
content = sent['text']
s = Sentence(content=content, experience_id=experience.id, entity_id=experience.entity_id, create_t=time)
for t in sent['tones']:
tid = t['tone_id']
score = t['score']
exec("s." + tid + "= score")
s.save()
def noun_display(search, entity_id):
# Establish Context
context = dict()
ee = EntityExtraction()
text = search
ee.params = 'text', text
ee.params = 'lang', 'en'
ee.params = 'country', 'US'
ee.params = 'min_confidence', '0.01'
a = ee.analyze()
if a.annotations:
concept = a.annotations[0]
concept_title = concept['title']
concept_id = concept['id']
concept_confidence = concept['confidence']
try:
params = {'action':'query', 'titles': concept_title, 'prop':'pageimages', 'format':'json', 'pithumbsize':'256'}
wiki_request = requests.post('https://en.wikipedia.org/w/api.php', params)
j = wiki_request.json()
concept_img = next( iter( (j['query']['pages'].values())))['thumbnail']['source']
except:
concept_img = ""
try:
params = {'action':'query', 'titles': concept_title, 'prop':'extracts', 'format':'json', 'exsentences':'2', 'explaintext':''}
r = requests.post('https://en.wikipedia.org/w/api.php', params)
j = r.json()
concept_desc = next( iter( (j['query']['pages'].values())))['extract']
except:
concept_desc = ""
else:
context.update(search_error=(search + " is not a recognized concept."))
return context
# Get list of nouns
nounlist = Noun.objects.filter(entity_id=entity_id, noun=concept_id)
if nounlist:
# Average Scores
avg_joy = Decimal()
avg_sadness = Decimal()
avg_fear = Decimal()
avg_anger = Decimal()
avg_analytical = Decimal()
avg_confident = Decimal()
avg_tentative = Decimal()
for rec in nounlist:
avg_joy += rec.joy
avg_sadness += rec.sadness
avg_fear += rec.fear
avg_anger += rec.anger
avg_analytical += rec.analytical
avg_confident += rec.confident
avg_tentative += rec.tentative
avg_joy /= nounlist.count()
avg_sadness /= nounlist.count()
avg_fear /= nounlist.count()
avg_anger /= nounlist.count()
avg_analytical /= nounlist.count()
avg_confident /= nounlist.count()
avg_tentative /= nounlist.count()
context.update(avg_joy = avg_joy, avg_sadness = avg_sadness, avg_fear = avg_fear, avg_anger = avg_anger, avg_analytical = avg_analytical, avg_confident = avg_confident, avg_tentative = avg_tentative, concept_title=concept_title, concept_confidence=concept_confidence, concept_img=concept_img, concept_desc=concept_desc)
return context
else:
context.update(search_error=(concept_title + " is a recognized concept but was not present in the selected entity."))
return context
|
[
"maxmrphy@gmail.com"
] |
maxmrphy@gmail.com
|
d0ab779d19449025bfcd4a9b8f4ae12d101f3ed3
|
a63d907ad63ba6705420a6fb2788196d1bd3763c
|
/src/api/dataflow/modeling/job/job_driver.py
|
fb79d2645b77791a5e854507749137ec274c3ec8
|
[
"MIT"
] |
permissive
|
Tencent/bk-base
|
a38461072811667dc2880a13a5232004fe771a4b
|
6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2
|
refs/heads/master
| 2022-07-30T04:24:53.370661
| 2022-04-02T10:30:55
| 2022-04-02T10:30:55
| 381,257,882
| 101
| 51
|
NOASSERTION
| 2022-04-02T10:30:56
| 2021-06-29T06:10:01
|
Python
|
UTF-8
|
Python
| false
| false
| 10,200
|
py
|
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
--------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
import json
import uuid
from dataflow.batch.api.api_helper import BksqlHelper
from dataflow.batch.handlers.processing_batch_info import ProcessingBatchInfoHandler
from dataflow.batch.handlers.processing_job_info import ProcessingJobInfoHandler
from dataflow.modeling.api.api_helper import ModelingApiHelper
from dataflow.modeling.job.jobnavi_register_modeling import ModelingJobNaviRegister
from dataflow.modeling.settings import PARSED_TASK_TYPE, TABLE_TYPE
from dataflow.shared.log import modeling_logger as logger
from dataflow.shared.meta.result_table.result_table_helper import ResultTableHelper
from dataflow.shared.storekit.storekit_helper import StorekitHelper
from dataflow.udf.functions import function_driver
def register_schedule(job_id, schedule_time, created_by, is_restart=False):
# 离线已将相关操作重新封装整理,因此这里可以进行很大的简化
jobnavi_register = ModelingJobNaviRegister(job_id, created_by, is_restart)
return jobnavi_register.register_jobnavi(schedule_time)
def get_output_info(node_info):
# 注意,这里是从前端传递的内容解析出输出字段
# 此时真正的物理表可能还不存在 ,所以这里不能使用ResultTableHelper等相关的请求来获取请求的storage等信息
output_table = None
output_fields = []
output_alias = None
for table_id in node_info["output"]:
output_table = table_id
for field in node_info["output"][table_id]["fields"]:
logger.info(field)
output_field = {
"field": field["field_name"],
"type": field["field_type"],
"description": field["field_alias"],
"origin": [],
}
output_fields.append(output_field)
output_alias = node_info["output"][table_id]["table_alias"]
return {"name": output_table, "fields": output_fields, "alias": output_alias}
def get_input_info(dependence_info):
input_table = None
input_fileds = []
input = {}
for table_id in dependence_info:
input_table = table_id
result_table_fields = ResultTableHelper.get_result_table_fields(input_table)
for filed_info in result_table_fields:
input_table_field = {
"field": filed_info["field_name"],
"type": filed_info["field_type"],
"origin": "",
"description": filed_info["field_alias"],
}
input_fileds.append(input_table_field)
result_table_storage = ResultTableHelper.get_result_table_storage(input_table, "hdfs")["hdfs"]
input["type"] = "hdfs"
input["format"] = result_table_storage["data_type"]
result_table_connect = json.loads(result_table_storage["storage_cluster"]["connection_info"])
input["path"] = "{hdfs_url}/{hdfs_path}".format(
hdfs_url=result_table_connect["hdfs_url"],
hdfs_path=result_table_storage["physical_table_name"],
)
input["table_type"] = TABLE_TYPE.RESULT_TABLE.value
if input["format"] == "iceberg":
iceberg_hdfs_config = StorekitHelper.get_hdfs_conf(input_table)
iceberg_config = {
"physical_table_name": result_table_storage["physical_table_name"],
"hdfs_config": iceberg_hdfs_config,
}
input["iceberg_config"] = iceberg_config
return {"name": input_table, "fields": input_fileds, "info": input}
def get_window_info(input_table, dependence_info, node_info):
# 由于计算真正的数据路径时需要用到当前节点的周期配置(schedule_info)以及依赖表的配置(dependence)
# 所以这里将两者合并在一起成为window_info,每个依赖表都有一个window信息
# 所以在window的信息中有两部分,一部分是每个source都不一样的dependence 以及每个 source内值都一样的schedule_info
# schedule_info表示的是当前节点的调试信息,与父任务无关,这里需要注意理解
window_info = {}
window_info.update(dependence_info[input_table])
window_info.update(node_info["schedule_info"])
return window_info
def update_process_and_job(table_name, processor_logic, submit_args):
batch_processing_info = ProcessingBatchInfoHandler.get_proc_batch_info_by_prefix(table_name)
for processing_info in batch_processing_info:
# 上述两者要更新加Processing
ProcessingBatchInfoHandler.update_proc_batch_info_logic(processing_info.processing_id, processor_logic)
ProcessingBatchInfoHandler.update_proc_batch_info_submit_args(processing_info.processing_id, submit_args)
processing_job_info_list = ProcessingJobInfoHandler.get_proc_job_info_by_prefix(table_name)
for processing_job_info in processing_job_info_list:
job_config = json.loads(processing_job_info.job_config)
job_config["submit_args"] = json.dumps(submit_args)
job_config["processor_logic"] = json.dumps(processor_logic)
ProcessingJobInfoHandler.update_proc_job_info_job_config(processing_job_info.job_id, job_config)
return table_name
def get_sub_query_task(sql, sub_sql, target_entity_name, geog_area_code):
"""
将子查询的相关信息封装为一个临时的task
@param sql: 源mlsql
@param sub_sql: 子查询
@param target_entity_name: mlsql生成实例名称
@param geog_area_code: area code
@return: 临时的任务信息
"""
uuid_str = str(uuid.uuid4())
processing_id = target_entity_name + "_" + uuid_str[0 : uuid_str.find("-")]
# 解析所有用到的udf
udf_data = function_driver.parse_sql(sub_sql, geog_area_code)
logger.info("udf data result:" + json.dumps(udf_data))
udf_name_list = []
for udf in udf_data:
udf_name_list.append(udf["name"])
# 解析用到的所有表
sub_query_table_names = ModelingApiHelper.get_table_names_by_mlsql_parser({"sql": sql})
logger.info("sub query table names:" + json.dumps(sub_query_table_names))
spark_sql_propertiies = {
"spark.input_result_table": sub_query_table_names,
"spark.bk_biz_id": target_entity_name[0 : target_entity_name.find("_")],
"spark.dataflow_udf_function_name": ",".join(udf_name_list),
"spark.result_table_name": processing_id,
}
# 使用sparksql解析子查询的输出
spark_sql_parse_result_list = BksqlHelper.spark_sql(sub_sql, spark_sql_propertiies)
logger.info("spark sql result:" + json.dumps(spark_sql_parse_result_list))
spark_sql_parse_result = spark_sql_parse_result_list[0]
sub_query_fields = spark_sql_parse_result["fields"]
sparksql_query_sql = spark_sql_parse_result["sql"]
tmp_sub_query_fields = []
for field in sub_query_fields:
tmp_sub_query_fields.append(
{
"field": field["field_name"],
"type": field["field_type"],
"description": field["field_alias"],
"index": field["field_index"],
"origins": [""],
}
)
# 解析子查询的输入中用到的所有列
sql_columns_result = ModelingApiHelper.get_columns_by_mlsql_parser({"sql": sub_sql})
logger.info("sql column result:" + json.dumps(sql_columns_result))
processor = {
"args": {
"sql": sparksql_query_sql,
"format_sql": sql_columns_result["sql"], # 含有通配字符的sql
},
"type": "untrained-run",
"name": "tmp_processor",
}
# 解析子查询用到的数据区间(目前暂无应用)
sql_query_source_result = ModelingApiHelper.get_mlsql_query_source_parser({"sql": sub_sql})
logger.info("sql query source result:" + json.dumps(sql_query_source_result))
processor["args"]["time_range"] = sql_query_source_result
# todo:根据所有输入表检查输入列是否存在,去掉不存在的输入列(这里认为不存在的即为经过as或其它重新命名得到的列)这里可以进一步优化
sql_all_columns = sql_columns_result["columns"]
sql_exist_columns = []
for table in sub_query_table_names:
table_fields = ResultTableHelper.get_result_table_fields(table)
for field in table_fields:
sql_exist_columns.append(field["field_name"])
processor["args"]["column"] = list(set(sql_all_columns).intersection(set(sql_exist_columns)))
tmp_subquery_task = {
"table_name": processing_id,
"fields": tmp_sub_query_fields,
"parents": sub_query_table_names,
"processor": processor,
"interpreter": [],
"processing_id": processing_id,
"udfs": udf_data,
"task_type": PARSED_TASK_TYPE.SUB_QUERY.value,
}
return tmp_subquery_task
|
[
"terrencehan@tencent.com"
] |
terrencehan@tencent.com
|
7d57e61792fab366f859e0ad676e16d0a883424a
|
d51735cfc00ea4e536c44bf8309db5e28f704972
|
/myutils.py
|
984dda6f6df5a6640dc986d6aac510503c35aa28
|
[] |
no_license
|
bhavyagera10/Attn-to-FC
|
23733adec8d658788f229aaf17a84f1694ef42ec
|
ba421d16e317b4b94a2c828f285689a5e2537e97
|
refs/heads/master
| 2022-11-21T05:54:33.982663
| 2020-07-27T21:30:31
| 2020-07-27T21:30:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 25,178
|
py
|
import sys
import javalang
from timeit import default_timer as timer
import keras
import numpy as np
import tensorflow as tf
import networkx as nx
import random
# do NOT import keras in this header area, it will break predict.py
# instead, import keras as needed in each function
# TODO refactor this so it imports in the necessary functions
dataprep = '/nfs/projects/attn-to-fc/data/standard'
sys.path.append(dataprep)
import tokenizer
start = 0
end = 0
def init_tf(gpu, horovod=False):
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto()
config = tf.ConfigProto(log_device_placement=False)
config.gpu_options.allow_growth = True
config.gpu_options.visible_device_list = gpu
set_session(tf.Session(config=config))
def prep(msg):
global start
statusout(msg)
start = timer()
def statusout(msg):
sys.stdout.write(msg)
sys.stdout.flush()
def drop():
global start
global end
end = timer()
sys.stdout.write('done, %s seconds.\n' % (round(end - start, 2)))
sys.stdout.flush()
def index2word(tok):
i2w = {}
for word, index in tok.w2i.items():
i2w[index] = word
return i2w
def seq2sent(seq, tokenizer):
sent = []
check = index2word(tokenizer)
for i in seq:
sent.append(check[i])
return(' '.join(sent))
class batch_gen(keras.utils.Sequence):
def __init__(self, seqdata, tt, config, training=True):
self.comvocabsize = config['comvocabsize']
self.tt = tt
self.batch_size = config['batch_size']
self.seqdata = seqdata
self.allfids = list(seqdata['dt%s' % (tt)].keys())
self.num_inputs = config['num_input']
self.config = config
self.training = training
random.shuffle(self.allfids) # actually, might need to sort allfids to ensure same order
def __getitem__(self, idx):
start = (idx*self.batch_size)
end = self.batch_size*(idx+1)
batchfids = self.allfids[start:end]
return self.make_batch(batchfids)
def make_batch(self, batchfids):
if self.config['batch_maker'] == 'datsonly':
return self.divideseqs(batchfids, self.seqdata, self.comvocabsize, self.tt)
elif self.config['batch_maker'] == 'ast':
return self.divideseqs_ast(batchfids, self.seqdata, self.comvocabsize, self.tt)
elif self.config['batch_maker'] == 'ast_threed':
return self.divideseqs_ast_threed(batchfids, self.seqdata, self.comvocabsize, self.tt)
elif self.config['batch_maker'] == 'threed':
return self.divideseqs_threed(batchfids, self.seqdata, self.comvocabsize, self.tt)
elif self.config['batch_maker'] == 'graphast':
return self.divideseqs_graphast(batchfids, self.seqdata, self.comvocabsize, self.tt)
elif self.config['batch_maker'] == 'graphast_threed':
return self.divideseqs_graphast_threed(batchfids, self.seqdata, self.comvocabsize, self.tt)
elif self.config['batch_maker'] == 'pathast_threed':
return self.divideseqs_pathast_threed(batchfids, self.seqdata, self.comvocabsize, self.tt)
else:
return None
def __len__(self):
#if self.num_inputs == 4:
return int(np.ceil(len(list(self.seqdata['dt%s' % (self.tt)]))/self.batch_size))
#else:
# return int(np.ceil(len(list(self.seqdata['d%s' % (self.tt)]))/self.batch_size))
def on_epoch_end(self):
random.shuffle(self.allfids)
def divideseqs(self, batchfids, seqdata, comvocabsize, tt):
import keras.utils
datseqs = list()
comseqs = list()
comouts = list()
fiddat = dict()
for fid in batchfids:
wdatseq = seqdata['dt%s' % (tt)][fid]
wcomseq = seqdata['c%s' % (tt)][fid]
wdatseq = wdatseq[:self.config['tdatlen']]
if not self.training:
fiddat[fid] = [wdatseq, wcomseq]
else:
for i in range(len(wcomseq)):
datseqs.append(wdatseq)
comseq = wcomseq[:i]
comout = keras.utils.to_categorical(wcomseq[i], num_classes=comvocabsize)
for j in range(0, len(wcomseq)):
try:
comseq[j]
except IndexError as ex:
comseq = np.append(comseq, 0)
comseqs.append(np.asarray(comseq))
comouts.append(np.asarray(comout))
datseqs = np.asarray(datseqs)
comseqs = np.asarray(comseqs)
comouts = np.asarray(comouts)
if not self.training:
return fiddat
else:
return [[datseqs, comseqs], comouts]
def divideseqs_ast(self, batchfids, seqdata, comvocabsize, tt):
import keras.utils
datseqs = list()
comseqs = list()
smlseqs = list()
comouts = list()
fiddat = dict()
for fid in batchfids:
wdatseq = seqdata['dt%s' % (tt)][fid]
wcomseq = seqdata['c%s' % (tt)][fid]
wsmlseq = seqdata['s%s' % (tt)][fid]
wdatseq = wdatseq[:self.config['tdatlen']]
if not self.training:
fiddat[fid] = [wdatseq, wcomseq, wsmlseq]
else:
for i in range(0, len(wcomseq)):
datseqs.append(wdatseq)
smlseqs.append(wsmlseq)
# slice up whole comseq into seen sequence and current sequence
# [a b c d] => [] [a], [a] [b], [a b] [c], [a b c] [d], ...
comseq = wcomseq[0:i]
comout = wcomseq[i]
comout = keras.utils.to_categorical(comout, num_classes=comvocabsize)
# extend length of comseq to expected sequence size
# the model will be expecting all input vectors to have the same size
for j in range(0, len(wcomseq)):
try:
comseq[j]
except IndexError as ex:
comseq = np.append(comseq, 0)
comseqs.append(comseq)
comouts.append(np.asarray(comout))
datseqs = np.asarray(datseqs)
smlseqs = np.asarray(smlseqs)
comseqs = np.asarray(comseqs)
comouts = np.asarray(comouts)
if not self.training:
return fiddat
else:
return [[datseqs, comseqs, smlseqs], comouts]
def divideseqs_ast_threed(self, batchfids, seqdata, comvocabsize, tt):
import keras.utils
tdatseqs = list()
sdatseqs = list()
comseqs = list()
smlseqs = list()
comouts = list()
fiddat = dict()
for fid in batchfids:
wtdatseq = seqdata['dt%s' % (tt)][fid]
wsdatseq = seqdata['ds%s' % (tt)][fid]
wcomseq = seqdata['c%s' % (tt)][fid]
wsmlseq = seqdata['s%s' % (tt)][fid]
wtdatseq = wtdatseq[:self.config['tdatlen']]
# the dataset contains 20+ functions per file, but we may elect
# to reduce that amount for a given model based on the config
newlen = self.config['sdatlen']-len(wsdatseq)
if newlen < 0:
newlen = 0
wsdatseq = wsdatseq.tolist()
for k in range(newlen):
wsdatseq.append(np.zeros(self.config['stdatlen']))
for i in range(0, len(wsdatseq)):
wsdatseq[i] = np.array(wsdatseq[i])[:self.config['stdatlen']]
wsdatseq = np.asarray(wsdatseq)
wsdatseq = wsdatseq[:self.config['sdatlen'],:]
wsmlseq = wsmlseq[:self.config['smllen']]
if not self.training:
fiddat[fid] = [wtdatseq, wsdatseq, wcomseq, wsmlseq]
else:
for i in range(0, len(wcomseq)):
tdatseqs.append(wtdatseq)
sdatseqs.append(wsdatseq)
smlseqs.append(wsmlseq)
# slice up whole comseq into seen sequence and current sequence
# [a b c d] => [] [a], [a] [b], [a b] [c], [a b c] [d], ...
comseq = wcomseq[0:i]
comout = wcomseq[i]
comout = keras.utils.to_categorical(comout, num_classes=comvocabsize)
# extend length of comseq to expected sequence size
# the model will be expecting all input vectors to have the same size
for j in range(0, len(wcomseq)):
try:
comseq[j]
except IndexError as ex:
comseq = np.append(comseq, 0)
comseqs.append(comseq)
comouts.append(np.asarray(comout))
tdatseqs = np.asarray(tdatseqs)
sdatseqs = np.asarray(sdatseqs)
smlseqs = np.asarray(smlseqs)
comseqs = np.asarray(comseqs)
comouts = np.asarray(comouts)
if not self.training:
return fiddat
else:
if self.config['num_output'] == 2:
return [[tdatseqs, sdatseqs, comseqs, smlseqs], [comouts, comouts]]
else:
return [[tdatseqs, sdatseqs, comseqs, smlseqs], comouts]
def divideseqs_threed(self, batchfids, seqdata, comvocabsize, tt):
import keras.utils
tdatseqs = list()
sdatseqs = list()
comseqs = list()
comouts = list()
fiddat = dict()
for fid in batchfids:
wtdatseq = seqdata['dt%s' % (tt)][fid]
wsdatseq = seqdata['ds%s' % (tt)][fid]
wcomseq = seqdata['c%s' % (tt)][fid]
wtdatseq = wtdatseq[:self.config['tdatlen']]
# the dataset contains 20+ functions per file, but we may elect
# to reduce that amount for a given model based on the config
newlen = self.config['sdatlen']-len(wsdatseq)
if newlen < 0:
newlen = 0
wsdatseq = wsdatseq.tolist()
for k in range(newlen):
wsdatseq.append(np.zeros(self.config['stdatlen']))
for i in range(0, len(wsdatseq)):
wsdatseq[i] = np.array(wsdatseq[i])[:self.config['stdatlen']]
wsdatseq = np.asarray(wsdatseq)
wsdatseq = wsdatseq[:self.config['sdatlen'],:]
if not self.training:
fiddat[fid] = [wtdatseq, wsdatseq, wcomseq]
else:
for i in range(0, len(wcomseq)):
tdatseqs.append(wtdatseq)
sdatseqs.append(wsdatseq)
# slice up whole comseq into seen sequence and current sequence
# [a b c d] => [] [a], [a] [b], [a b] [c], [a b c] [d], ...
comseq = wcomseq[0:i]
comout = wcomseq[i]
comout = keras.utils.to_categorical(comout, num_classes=comvocabsize)
# extend length of comseq to expected sequence size
# the model will be expecting all input vectors to have the same size
for j in range(0, len(wcomseq)):
try:
comseq[j]
except IndexError as ex:
comseq = np.append(comseq, 0)
comseqs.append(comseq)
comouts.append(np.asarray(comout))
tdatseqs = np.asarray(tdatseqs)
sdatseqs = np.asarray(sdatseqs)
comseqs = np.asarray(comseqs)
comouts = np.asarray(comouts)
if not self.training:
return fiddat
else:
if self.config['num_output'] == 2:
return [[tdatseqs, sdatseqs, comseqs], [comouts, comouts]]
else:
return [[tdatseqs, sdatseqs, comseqs], comouts]
def divideseqs_graphast(self, batchfids, seqdata, comvocabsize, tt):
import keras.utils
tdatseqs = list()
comseqs = list()
smlnodes = list()
smledges = list()
comouts = list()
fiddat = dict()
for fid in batchfids:
wtdatseq = seqdata['dt%s' % (tt)][fid]
wcomseq = seqdata['c%s' % (tt)][fid]
wsmlnodes = seqdata['s%s_nodes' % (tt)][fid]
wsmledges = seqdata['s%s_edges' % (tt)][fid]
# crop/expand ast sequence
wsmlnodes = wsmlnodes[:self.config['maxastnodes']]
tmp = np.zeros(self.config['maxastnodes'], dtype='int32')
tmp[:wsmlnodes.shape[0]] = wsmlnodes
wsmlnodes = np.int32(tmp)
# crop/expand ast adjacency matrix to dense
wsmledges = np.asarray(wsmledges.todense())
wsmledges = wsmledges[:self.config['maxastnodes'], :self.config['maxastnodes']]
tmp = np.zeros((self.config['maxastnodes'], self.config['maxastnodes']), dtype='int32')
tmp[:wsmledges.shape[0], :wsmledges.shape[1]] = wsmledges
wsmledges = np.int32(tmp)
# crop tdat to max tdat len specified by model config
wtdatseq = wtdatseq[:self.config['tdatlen']]
if not self.training:
fiddat[fid] = [wtdatseq, wcomseq, wsmlnodes, wsmledges]
else:
for i in range(0, len(wcomseq)):
if(self.config['use_tdats']):
tdatseqs.append(wtdatseq)
smlnodes.append(wsmlnodes)
smledges.append(wsmledges)
# slice up whole comseq into seen sequence and current sequence
# [a b c d] => [] [a], [a] [b], [a b] [c], [a b c] [d], ...
comseq = wcomseq[0:i]
comout = wcomseq[i]
comout = keras.utils.to_categorical(comout, num_classes=comvocabsize)
# extend length of comseq to expected sequence size
# the model will be expecting all input vectors to have the same size
for j in range(0, len(wcomseq)):
try:
comseq[j]
except IndexError as ex:
comseq = np.append(comseq, 0)
comseqs.append(comseq)
comouts.append(np.asarray(comout))
if(self.config['use_tdats']):
tdatseqs = np.asarray(tdatseqs)
smlnodes = np.asarray(smlnodes)
smledges = np.asarray(smledges)
comseqs = np.asarray(comseqs)
comouts = np.asarray(comouts)
if not self.training:
return fiddat
else:
if self.config['num_output'] == 2:
return [[tdatseqs, comseqs, smlnodes, smledges], [comouts, comouts]]
else:
if(self.config['use_tdats']):
return [[tdatseqs, comseqs, smlnodes, smledges], comouts]
else:
return [[comseqs, smlnodes, smledges], comouts]
def divideseqs_graphast_threed(self, batchfids, seqdata, comvocabsize, tt):
import keras.utils
tdatseqs = list()
sdatseqs = list()
comseqs = list()
smlnodes = list()
smledges = list()
comouts = list()
fiddat = dict()
for fid in batchfids:
wtdatseq = seqdata['dt%s' % (tt)][fid]
wsdatseq = seqdata['ds%s' % (tt)][fid]
wcomseq = seqdata['c%s' % (tt)][fid]
wsmlnodes = seqdata['s%s_nodes' % (tt)][fid]
wsmledges = seqdata['s%s_edges' % (tt)][fid]
# crop/expand ast sequence
wsmlnodes = wsmlnodes[:self.config['maxastnodes']]
tmp = np.zeros(self.config['maxastnodes'], dtype='int32')
tmp[:wsmlnodes.shape[0]] = wsmlnodes
wsmlnodes = np.int32(tmp)
# crop/expand ast adjacency matrix to dense
wsmledges = np.asarray(wsmledges.todense())
wsmledges = wsmledges[:self.config['maxastnodes'], :self.config['maxastnodes']]
tmp = np.zeros((self.config['maxastnodes'], self.config['maxastnodes']), dtype='int32')
tmp[:wsmledges.shape[0], :wsmledges.shape[1]] = wsmledges
wsmledges = np.int32(tmp)
# crop tdat to max tdat len specified by model config
wtdatseq = wtdatseq[:self.config['tdatlen']]
# the dataset contains 20+ functions per file, but we may elect
# to reduce that amount for a given model based on the config
newlen = self.config['sdatlen']-len(wsdatseq)
if newlen < 0:
newlen = 0
wsdatseq = wsdatseq.tolist()
for k in range(newlen):
wsdatseq.append(np.zeros(self.config['stdatlen']))
for i in range(0, len(wsdatseq)):
wsdatseq[i] = np.array(wsdatseq[i])[:self.config['stdatlen']]
wsdatseq = np.asarray(wsdatseq)
wsdatseq = wsdatseq[:self.config['sdatlen'],:]
if not self.training:
fiddat[fid] = [wtdatseq, wsdatseq, wcomseq, wsmlnodes, wsmledges]
else:
for i in range(0, len(wcomseq)):
if(self.config['use_tdats']):
tdatseqs.append(wtdatseq)
sdatseqs.append(wsdatseq)
smlnodes.append(wsmlnodes)
smledges.append(wsmledges)
# slice up whole comseq into seen sequence and current sequence
# [a b c d] => [] [a], [a] [b], [a b] [c], [a b c] [d], ...
comseq = wcomseq[0:i]
comout = wcomseq[i]
comout = keras.utils.to_categorical(comout, num_classes=comvocabsize)
# extend length of comseq to expected sequence size
# the model will be expecting all input vectors to have the same size
for j in range(0, len(wcomseq)):
try:
comseq[j]
except IndexError as ex:
comseq = np.append(comseq, 0)
comseqs.append(comseq)
comouts.append(np.asarray(comout))
if(self.config['use_tdats']):
tdatseqs = np.asarray(tdatseqs)
sdatseqs = np.asarray(sdatseqs)
smlnodes = np.asarray(smlnodes)
smledges = np.asarray(smledges)
comseqs = np.asarray(comseqs)
comouts = np.asarray(comouts)
if not self.training:
return fiddat
else:
if self.config['num_output'] == 2:
return [[tdatseqs, sdatseqs, comseqs, smlnodes, smledges], [comouts, comouts]]
else:
if(self.config['use_tdats']):
return [[tdatseqs, sdatseqs, comseqs, smlnodes, smledges], comouts]
else:
return [[sdatseqs, comseqs, smlnodes, smledges], comouts]
def idx2tok(self, nodelist, path):
out = list()
for idx in path:
out.append(nodelist[idx])
return out
def divideseqs_pathast_threed(self, batchfids, seqdata, comvocabsize, tt):
import keras.utils
tdatseqs = list()
sdatseqs = list()
comseqs = list()
smlpaths = list()
comouts = list()
fiddat = dict()
for fid in batchfids:
wtdatseq = seqdata['dt%s' % (tt)][fid]
wsdatseq = seqdata['ds%s' % (tt)][fid]
wcomseq = seqdata['c%s' % (tt)][fid]
wsmlnodes = seqdata['s%s_nodes' % (tt)][fid]
wsmledges = seqdata['s%s_edges' % (tt)][fid]
# crop/expand ast sequence
#wsmlnodes = wsmlnodes[:self.config['maxastnodes']]
#tmp = np.zeros(self.config['maxastnodes'], dtype='int32')
#tmp[:wsmlnodes.shape[0]] = wsmlnodes
#wsmlnodes = np.int32(tmp)
# crop/expand ast adjacency matrix to dense
#wsmledges = np.asarray(wsmledges.todense())
#wsmledges = wsmledges[:self.config['maxastnodes'], :self.config['maxastnodes']]
#tmp = np.zeros((self.config['maxastnodes'], self.config['maxastnodes']), dtype='int32')
#tmp[:wsmledges.shape[0], :wsmledges.shape[1]] = wsmledges
#wsmledges = np.int32(tmp)
g = nx.from_numpy_matrix(wsmledges.todense())
astpaths = nx.all_pairs_shortest_path(g, cutoff=self.config['pathlen'])
wsmlpaths = list()
for astpath in astpaths:
source = astpath[0]
if len([n for n in g.neighbors(source)]) > 1:
continue
for path in astpath[1].values():
if len([n for n in g.neighbors(path[-1])]) > 1:
continue # ensure only terminals as in Alon et al
if len(path) > 1 and len(path) <= self.config['pathlen']:
newpath = self.idx2tok(wsmlnodes, path)
tmp = [0] * (self.config['pathlen'] - len(newpath))
newpath.extend(tmp)
wsmlpaths.append(newpath)
random.shuffle(wsmlpaths) # Alon et al stipulate random selection of paths
wsmlpaths = wsmlpaths[:self.config['maxpaths']] # Alon et al use 200, crop/expand to size
if len(wsmlpaths) < self.config['maxpaths']:
wsmlpaths.extend([[0]*self.config['pathlen']] * (self.config['maxpaths'] - len(wsmlpaths)))
wsmlpaths = np.asarray(wsmlpaths)
# crop tdat to max tdat len specified by model config
wtdatseq = wtdatseq[:self.config['tdatlen']]
# the dataset contains 20+ functions per file, but we may elect
# to reduce that amount for a given model based on the config
newlen = self.config['sdatlen']-len(wsdatseq)
if newlen < 0:
newlen = 0
wsdatseq = wsdatseq.tolist()
for k in range(newlen):
wsdatseq.append(np.zeros(self.config['stdatlen']))
for i in range(0, len(wsdatseq)):
wsdatseq[i] = np.array(wsdatseq[i])[:self.config['stdatlen']]
wsdatseq = np.asarray(wsdatseq)
wsdatseq = wsdatseq[:self.config['sdatlen'],:]
if not self.training:
fiddat[fid] = [wtdatseq, wsdatseq, wcomseq, wsmlpaths]
else:
for i in range(0, len(wcomseq)):
if(self.config['use_tdats']):
tdatseqs.append(wtdatseq)
sdatseqs.append(wsdatseq)
smlpaths.append(wsmlpaths)
# slice up whole comseq into seen sequence and current sequence
# [a b c d] => [] [a], [a] [b], [a b] [c], [a b c] [d], ...
comseq = wcomseq[0:i]
comout = wcomseq[i]
comout = keras.utils.to_categorical(comout, num_classes=comvocabsize)
# extend length of comseq to expected sequence size
# the model will be expecting all input vectors to have the same size
for j in range(0, len(wcomseq)):
try:
comseq[j]
except IndexError as ex:
comseq = np.append(comseq, 0)
comseqs.append(comseq)
comouts.append(np.asarray(comout))
if(self.config['use_tdats']):
tdatseqs = np.asarray(tdatseqs)
if(self.config['use_sdats']):
sdatseqs = np.asarray(sdatseqs)
smlpaths = np.asarray(smlpaths)
comseqs = np.asarray(comseqs)
comouts = np.asarray(comouts)
if not self.training:
return fiddat
else:
if self.config['num_output'] == 2:
return [[tdatseqs, sdatseqs, comseqs, smlpaths], [comouts, comouts]]
else:
if(self.config['use_tdats'] and self.config['use_sdats']):
return [[tdatseqs, sdatseqs, comseqs, smlpaths], comouts]
elif(self.config['use_tdats'] and not self.config['use_sdats']):
return [[tdatseqs, comseqs, smlpaths], comouts]
elif(not self.config['use_tdats'] and self.config['use_sdats']):
return [[sdatseqs, comseqs, smlpaths], comouts]
elif(not self.config['use_tdats'] and not self.config['use_sdats']):
return [[comseqs, smlpaths], comouts]
|
[
"shaque@nd.edu"
] |
shaque@nd.edu
|
881bf26ac89b923944c31b113c5a4250cb30de70
|
780c45da6388931381d911499723c5afa8a44036
|
/run_test_c30.py
|
ce1a8a664e0893aa42c5eaf89ed0835150c1a6ad
|
[
"Apache-2.0"
] |
permissive
|
daitouli/metaheuristics
|
f9157bd700957072a69c0be03d8d34378533581c
|
9d885e4c9e9f39ad22baa9ea5d263d5daa276f88
|
refs/heads/master
| 2021-02-04T18:40:47.387347
| 2019-09-30T06:51:26
| 2019-09-30T06:51:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,520
|
py
|
import pandas as pd
from models.multiple_solution.swarm_based.ABC import *
from models.multiple_solution.swarm_based.BMO import *
from models.multiple_solution.swarm_based.BOA import *
from models.multiple_solution.swarm_based.EPO import *
from models.multiple_solution.swarm_based.HHO import *
from models.multiple_solution.swarm_based.NMR import *
from models.multiple_solution.swarm_based.PFA import *
from models.multiple_solution.swarm_based.PSO import *
from models.multiple_solution.swarm_based.SFO import *
from models.multiple_solution.swarm_based.SOA import *
from models.multiple_solution.swarm_based.WOA import *
from utils.FunctionUtil import *
## Setting parameters
root_paras = {
"problem_size": 100,
"domain_range": [-100, 100],
"print_train": True,
"objective_func": C30
}
abc_paras = {
"epoch": 500,
"pop_size": 100,
"couple_bees": [16, 4], # number of bees which provided for good location and other location
"patch_variables": [5.0, 0.985], # patch_variables = patch_variables * patch_factor (0.985)
"sites": [3, 1], # 3 bees (employed bees, onlookers and scouts), 1 good partition
}
bmo_paras = {
"epoch": 500,
"pop_size": 100,
"bm_teams": 10
}
boa_paras = {
"epoch": 500,
"pop_size": 100,
"c": 0.01,
"p": 0.8,
"alpha": [0.1, 0.3]
}
epo_paras = {
"epoch": 500,
"pop_size": 100
}
hho_paras = {
"epoch": 500,
"pop_size": 100
}
nmr_paras = {
"pop_size": 100,
"epoch": 500,
"bp": 0.75, # breeding probability
}
pfa_paras = {
"epoch": 500,
"pop_size": 100
}
pso_paras = {
"epoch": 500,
"pop_size": 100,
"w_minmax": [0.4, 0.9], # [0-1] -> [0.4-0.9] Weight of bird
"c_minmax": [1.2, 1.2] # [(1.2, 1.2), (0.8, 2.0), (1.6, 0.6)] Effecting of local va global
}
isfo_paras = {
"epoch": 500,
"pop_size": 100, # SailFish pop size
"pp": 0.1 # the rate between SailFish and Sardines (N_sf = N_s * pp) = 0.25, 0.2, 0.1
}
soa_paras = {
"epoch": 500,
"pop_size": 100,
}
woa_paras = {
"epoch": 500,
"pop_size": 100
}
## Run model
name_model = {
'BaseABC': BaseABC(root_algo_paras=root_paras, abc_paras=abc_paras),
'BaseBMO': BaseBMO(root_algo_paras=root_paras, bmo_paras=bmo_paras),
"AdaptiveBOA": AdaptiveBOA(root_algo_paras=root_paras, boa_paras=boa_paras),
"BaseEPO": BaseEPO(root_algo_paras=root_paras, epo_paras=epo_paras),
"BaseHHO": BaseHHO(root_algo_paras=root_paras, hho_paras=hho_paras),
"LevyNMR": LevyNMR(root_algo_paras=root_paras, nmr_paras=nmr_paras),
"IPFA": IPFA(root_algo_paras=root_paras, pfa_paras=pfa_paras),
"BasePSO": BasePSO(root_algo_paras=root_paras, pso_paras=pso_paras),
"ImprovedSFO": ImprovedSFO(root_algo_paras=root_paras, isfo_paras=isfo_paras),
"BaseSOA": BaseSOA(root_algo_paras=root_paras, soa_paras=soa_paras),
"BaoWOA": BaoWOA(root_algo_paras=root_paras, woa_paras=woa_paras)
}
### 1st: way
# list_loss = []
# for name, model in name_model.items():
# _, loss = model._train__()
# list_loss.append(loss)
# list_loss = np.asarray(list_loss)
# list_loss = list_loss.T
# np.savetxt("run_test_c30.csv", list_loss, delimiter=",", header=str(name_model.keys()))
### 2nd: way
list_loss = {}
for name, model in name_model.items():
_, loss = model._train__()
list_loss[name] = loss
df = pd.DataFrame(list_loss)
df.to_csv('c30_results.csv') # saving the dataframe
|
[
"nguyenthieu2102@gmail.com"
] |
nguyenthieu2102@gmail.com
|
a13082ba9e21bf1a732e1cfa9a5f593917aa62c5
|
84ac452582ba1f2a5ba48f490a21ef62ecd502d5
|
/build/android/tombstones.py
|
39fa5050e3a92dc3e847dc5f0152493dc613b183
|
[] |
no_license
|
stanislavalbreht/sandbox_test_2016
|
e215a45a48be6b31873c1ad5510f232ee80107aa
|
0e6e0c265d6af23f6eeac510d57271d6aa0de5c4
|
refs/heads/master
| 2021-01-10T03:26:10.886636
| 2016-01-27T08:29:27
| 2016-01-27T08:29:27
| 50,448,216
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 8,533
|
py
|
#!/usr/bin/env python
#
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Find the most recent tombstone file(s) on all connected devices
# and prints their stacks.
#
# Assumes tombstone file was created with current symbols.
import datetime
import logging
import multiprocessing
import os
import re
import subprocess
import sys
import optparse
import devil_chromium
from devil.android import device_blacklist
from devil.android import device_errors
from devil.android import device_utils
from devil.utils import run_tests_helper
_TZ_UTC = {'TZ': 'UTC'}
def _ListTombstones(device):
"""List the tombstone files on the device.
Args:
device: An instance of DeviceUtils.
Yields:
Tuples of (tombstone filename, date time of file on device).
"""
try:
if not device.PathExists('/data/tombstones', timeout=60, retries=3):
return
# TODO(perezju): Introduce a DeviceUtils.Ls() method (crbug.com/552376).
lines = device.RunShellCommand(
['ls', '-a', '-l', '/data/tombstones'],
as_root=True, check_return=True, env=_TZ_UTC, timeout=60)
for line in lines:
if 'tombstone' in line:
details = line.split()
t = datetime.datetime.strptime(details[-3] + ' ' + details[-2],
'%Y-%m-%d %H:%M')
yield details[-1], t
except device_errors.CommandFailedError:
logging.exception('Could not retrieve tombstones.')
except device_errors.CommandTimeoutError:
logging.exception('Timed out retrieving tombstones.')
def _GetDeviceDateTime(device):
"""Determine the date time on the device.
Args:
device: An instance of DeviceUtils.
Returns:
A datetime instance.
"""
device_now_string = device.RunShellCommand(
['date'], check_return=True, env=_TZ_UTC)
return datetime.datetime.strptime(
device_now_string[0], '%a %b %d %H:%M:%S %Z %Y')
def _GetTombstoneData(device, tombstone_file):
"""Retrieve the tombstone data from the device
Args:
device: An instance of DeviceUtils.
tombstone_file: the tombstone to retrieve
Returns:
A list of lines
"""
return device.ReadFile(
'/data/tombstones/' + tombstone_file, as_root=True).splitlines()
def _EraseTombstone(device, tombstone_file):
"""Deletes a tombstone from the device.
Args:
device: An instance of DeviceUtils.
tombstone_file: the tombstone to delete.
"""
return device.RunShellCommand(
['rm', '/data/tombstones/' + tombstone_file],
as_root=True, check_return=True)
def _DeviceAbiToArch(device_abi):
# The order of this list is significant to find the more specific match (e.g.,
# arm64) before the less specific (e.g., arm).
arches = ['arm64', 'arm', 'x86_64', 'x86_64', 'x86', 'mips']
for arch in arches:
if arch in device_abi:
return arch
raise RuntimeError('Unknown device ABI: %s' % device_abi)
def _ResolveSymbols(tombstone_data, include_stack, device_abi):
"""Run the stack tool for given tombstone input.
Args:
tombstone_data: a list of strings of tombstone data.
include_stack: boolean whether to include stack data in output.
device_abi: the default ABI of the device which generated the tombstone.
Yields:
A string for each line of resolved stack output.
"""
# Check if the tombstone data has an ABI listed, if so use this in preference
# to the device's default ABI.
for line in tombstone_data:
found_abi = re.search('ABI: \'(.+?)\'', line)
if found_abi:
device_abi = found_abi.group(1)
arch = _DeviceAbiToArch(device_abi)
if not arch:
return
stack_tool = os.path.join(os.path.dirname(__file__), '..', '..',
'third_party', 'android_platform', 'development',
'scripts', 'stack')
proc = subprocess.Popen([stack_tool, '--arch', arch], stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
output = proc.communicate(input='\n'.join(tombstone_data))[0]
for line in output.split('\n'):
if not include_stack and 'Stack Data:' in line:
break
yield line
def _ResolveTombstone(tombstone):
lines = []
lines += [tombstone['file'] + ' created on ' + str(tombstone['time']) +
', about this long ago: ' +
(str(tombstone['device_now'] - tombstone['time']) +
' Device: ' + tombstone['serial'])]
logging.info('\n'.join(lines))
logging.info('Resolving...')
lines += _ResolveSymbols(tombstone['data'], tombstone['stack'],
tombstone['device_abi'])
return lines
def _ResolveTombstones(jobs, tombstones):
"""Resolve a list of tombstones.
Args:
jobs: the number of jobs to use with multiprocess.
tombstones: a list of tombstones.
"""
if not tombstones:
logging.warning('No tombstones to resolve.')
return
if len(tombstones) == 1:
data = [_ResolveTombstone(tombstones[0])]
else:
pool = multiprocessing.Pool(processes=jobs)
data = pool.map(_ResolveTombstone, tombstones)
for tombstone in data:
for line in tombstone:
logging.info(line)
def _GetTombstonesForDevice(device, options):
"""Returns a list of tombstones on a given device.
Args:
device: An instance of DeviceUtils.
options: command line arguments from OptParse
"""
ret = []
all_tombstones = list(_ListTombstones(device))
if not all_tombstones:
logging.warning('No tombstones.')
return ret
# Sort the tombstones in date order, descending
all_tombstones.sort(cmp=lambda a, b: cmp(b[1], a[1]))
# Only resolve the most recent unless --all-tombstones given.
tombstones = all_tombstones if options.all_tombstones else [all_tombstones[0]]
device_now = _GetDeviceDateTime(device)
try:
for tombstone_file, tombstone_time in tombstones:
ret += [{'serial': str(device),
'device_abi': device.product_cpu_abi,
'device_now': device_now,
'time': tombstone_time,
'file': tombstone_file,
'stack': options.stack,
'data': _GetTombstoneData(device, tombstone_file)}]
except device_errors.CommandFailedError:
for line in device.RunShellCommand(
['ls', '-a', '-l', '/data/tombstones'],
as_root=True, check_return=True, env=_TZ_UTC, timeout=60):
logging.info('%s: %s', str(device), line)
raise
# Erase all the tombstones if desired.
if options.wipe_tombstones:
for tombstone_file, _ in all_tombstones:
_EraseTombstone(device, tombstone_file)
return ret
def main():
custom_handler = logging.StreamHandler(sys.stdout)
custom_handler.setFormatter(run_tests_helper.CustomFormatter())
logging.getLogger().addHandler(custom_handler)
logging.getLogger().setLevel(logging.INFO)
parser = optparse.OptionParser()
parser.add_option('--device',
help='The serial number of the device. If not specified '
'will use all devices.')
parser.add_option('--blacklist-file', help='Device blacklist JSON file.')
parser.add_option('-a', '--all-tombstones', action='store_true',
help="""Resolve symbols for all tombstones, rather than just
the most recent""")
parser.add_option('-s', '--stack', action='store_true',
help='Also include symbols for stack data')
parser.add_option('-w', '--wipe-tombstones', action='store_true',
help='Erase all tombstones from device after processing')
parser.add_option('-j', '--jobs', type='int',
default=4,
help='Number of jobs to use when processing multiple '
'crash stacks.')
options, _ = parser.parse_args()
devil_chromium.Initialize()
blacklist = (device_blacklist.Blacklist(options.blacklist_file)
if options.blacklist_file
else None)
if options.device:
devices = [device_utils.DeviceUtils(options.device)]
else:
devices = device_utils.DeviceUtils.HealthyDevices(blacklist)
# This must be done serially because strptime can hit a race condition if
# used for the first time in a multithreaded environment.
# http://bugs.python.org/issue7980
tombstones = []
for device in devices:
tombstones += _GetTombstonesForDevice(device, options)
_ResolveTombstones(options.jobs, tombstones)
if __name__ == '__main__':
sys.exit(main())
|
[
"fatalerr@yandex-team.ru"
] |
fatalerr@yandex-team.ru
|
5037790cae63e5d0725dbad341711f5906ac6bd6
|
705a1a6b909cb8456780e10e28cb255fc17acde5
|
/Jubilacion.py
|
f3ef2e2c421b3909d50656af5bd7d505ec8ef870
|
[] |
no_license
|
danistenia/Calculadora-Pensiones-AFP
|
7b321ce4ea8beedde3436547d4acabc886d2663e
|
145c20778f975e53e4b3a6fddda0cd427efdc358
|
refs/heads/master
| 2022-12-06T15:21:50.362452
| 2020-08-15T20:56:35
| 2020-08-15T20:56:35
| 287,823,353
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,844
|
py
|
import streamlit as st
from enum import Enum
from typing import List
def jubilacion(sueldo_clp,tasa,tiempo_años,capital_actual,sexo):
for i in range(0,(tiempo_años*12)+1):
if i==0:
aporte = ((sueldo_clp/0.83)*(1+0.01/12))*0.1 + capital_actual
else:
aporte = ((sueldo_clp/0.83)*(1+0.01/12))*0.1 + monto_ganado
monto_ganado = aporte * (1+tasa/1200)
#print(monto_ganado)
if sexo=='Hombre':
pension_mensual = monto_ganado/(20*12)
else:
pension_mensual = monto_ganado/(30*12)
return f'{round(pension_mensual):,}',monto_ganado
def jubilacion_total(sueldo_clp,tasa,tiempo_años,capital_actual):
for i in range(0,(tiempo_años*12)+1):
if i==0:
aporte = ((sueldo_clp/0.83)*(1+0.01/12))*0.1 + capital_actual
else:
aporte = ((sueldo_clp/0.83)*(1+0.01/12))*0.1 + monto_ganado
monto_ganado = aporte * (1+tasa/1200)
print(monto_ganado)
return f'{round(monto_ganado):,}'
st.write("""
# AFP y Jubilación """)
st.sidebar.header('Parámetros')
sexo = st.sidebar.selectbox("Sexo", ('Hombre','Mujer'))
sueldo_liquido = st.sidebar.number_input('Cuánto es su sueldo líquido?')
rentabilidad = st.sidebar.number_input('Tasa de Rentabilidad')
tiempo_jubilacion = st.sidebar.number_input('Cuánto le queda para Jubilar?')
capital_actual = st.sidebar.number_input('Cuánto es su capital actual?')
pensound = jubilacion(sueldo_liquido,rentabilidad,int(tiempo_jubilacion),capital_actual, sexo)
pensound_2 = jubilacion_total(sueldo_liquido,rentabilidad,int(tiempo_jubilacion),capital_actual)
st.write( "Su pensión mensual será **{}** y su monto total acumulado es **{}**.".format(pensound,pensound_2))
|
[
"noreply@github.com"
] |
danistenia.noreply@github.com
|
2a55fd29b450411bb3c2a75e589f5359a2f3f9bf
|
d580e171f80540923e56fce88655b5c6b42af6c1
|
/python_code.py
|
76654fcf64c5aa00c0a28167bd11f8e1f80af8d3
|
[] |
no_license
|
trushadesign/github-example
|
b81a8276d4a1ff2cb97b6bc30c172cd669921045
|
4d8f75421a0a75b74b3dbddfa7cee82a5e598bc8
|
refs/heads/master
| 2020-11-29T11:07:42.071586
| 2019-12-25T12:57:26
| 2019-12-25T12:57:26
| 230,099,784
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 35
|
py
|
print("Hello Github!")
git status
|
[
"serhii.vichev@MacBook-Air-Serhii.local"
] |
serhii.vichev@MacBook-Air-Serhii.local
|
e49f2894a3ab9c1a654ba0df022d7398b7113dc5
|
85455c059499f6df9648defd7bbf44d9a3963a6a
|
/app/models.py
|
40fa912bd68ea0ad93da96bccf4cd1d190150dcb
|
[] |
no_license
|
zoneneo/hanzi
|
6951024bf99eead7cace58f78b12daa21f610268
|
6f35785120a3733b656c3baef12518112d6df4b6
|
refs/heads/main
| 2023-02-20T19:40:35.767078
| 2021-01-26T10:05:35
| 2021-01-26T10:05:35
| 327,545,310
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 9,543
|
py
|
# -*- coding: utf-8 -
from .exts import db
from sqlalchemy import Column, text, func, Index, outerjoin, and_
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy import distinct
from sqlalchemy import desc
from sqlalchemy import update
from sqlalchemy.orm import aliased
from sqlalchemy.types import TypeDecorator, VARCHAR
import sqlalchemy.types as types
from sqlalchemy.ext.mutable import Mutable,MutableDict,MutableList
import json
# lett=db.Enum()
# a=ord('a')
# lett.enums=[chr(i) for i in range(a,a+26)]
class JSONEncodedDict(TypeDecorator):
"""Represents an immutable structure as a json-encoded string."""
impl = VARCHAR
def process_bind_param(self, value, dialect):
if value is not None:
value = json.dumps(value)
return value
def process_result_value(self, value, dialect):
if value is not None:
value = json.loads(value)
return value
#MutableDict.associate_with(JSONEncodedDict)
def tab_name(val,pre='c'):
seq=pre+val
return ''.join([c.isupper() and '_'+c or c for c in seq]).lower()
class Base(db.Model):
__abstract__ = True
__table_args__ = {'mysql_engine': 'InnoDB'}
# create_time = db.Column(db.TIMESTAMP(True),server_default=text('CURRENT_TIMESTAMP'))
@declared_attr
def __tablename__(cls):
return tab_name(cls.__name__)
def save(self, flush = True):
result = db.session.add(self)
if flush:
#db.session.flush()
db.session.commit()
return result
def upsert(self):
db.session.merge(self)
return db.session.commit()
def destroy(self):
result = db.session.delete(self)
return result
def to_dict(self):
d = dict()
for c in self.__table__.columns:
v = getattr(self, c.name)
if v:
d[c.name] = v
return d
@classmethod
def rollback(cls):
return db.session.rollback()
@classmethod
def update(cls,sid,**row):
cls.query.filter_by(id=sid).update(row)
return db.session.commit()
@classmethod
def _get(cls, key):
return cls.query.get(key)
@classmethod
def remove(cls, kid):
one = cls.query.get(kid)
db.session.delete(one)
return db.session.commit()
@classmethod
def delete(cls, ids):
result = (cls.query
.filter(cls.id.in_(ids))
.delete(synchronize_session=False))
return result
@classmethod
def _count(cls, search = None):
result = db.session.query(func.count(cls.id))
return result.scalar()
@classmethod
def commit(cls):
db.session.commit()
@classmethod
def _search(cls, page, size, **search):
is_desc = search.pop('is_desc',False)
if search:
key, val = search.popitem()
if key in cls.__table__.columns:
field = getattr(cls, key)
query = cls.query.filter(field.like("%" + val + "%"))
else:
query = cls.query
else:
query = cls.query
if is_desc:
query = query.order_by(desc(cls.id))
else:
query = query.order_by(cls.id)
return query.paginate(page, per_page=size, error_out=False)
@classmethod
def _page(cls, page, size, **kwargs):
is_desc = kwargs.pop('is_desc',False)
if kwargs:
conditions={}
for key in kwargs:
if key in cls.__table__.columns:
conditions[key]=kwargs[key]
query = cls.query.filter_by(**conditions)
else:
query = cls.query
if is_desc:
query = query.order_by(desc(cls.id))
else:
query = query.order_by(cls.id)
return query.paginate(page, per_page=size, error_out=False)
@classmethod
def _all(cls):
return cls.query.all()
class Common(Base):
key = db.Column(db.String(128), primary_key=True)
value = db.Column(db.String(1024))
class User(Base):
id = db.Column(db.Integer,autoincrement=True,primary_key=True)
username = db.Column(db.String(100),comment= '姓名')
password = db.Column(db.String(128),comment= '密码')
email = db.Column(db.String(128),comment= '邮箱')
role = db.Column(db.String(6),comment= '角色')
class Customer(Base):
id = db.Column(db.Integer,autoincrement=True,primary_key=True)
name = db.Column(db.String(100),comment= '姓名')
age = db.Column(db.String(100),comment= '年龄')
sex = db.Column(db.String(100),comment= '性别')
birthday = db.Column(db.Integer,comment= '出生日期')
nation = db.Column(db.String(100),comment= '民族')
phone = db.Column(db.String(16),comment= '联系电话')
email = db.Column(db.String(128),comment= '邮箱')
address = db.Column(db.String(64),comment= '联系地址')
idcard = db.Column(db.String(20),comment= '身份证号码')
native_place = db.Column(db.String(64),comment= '籍贯')
remark = db.Column(db.String(128),comment= '备注')
class Study(Base):
id = db.Column(db.Integer,autoincrement=True,primary_key=True)
class Students(Base):
id = db.Column(db.Integer,autoincrement=True,primary_key=True)
#汉语字词
class Words(Base):
id = db.Column(db.Integer, primary_key=True)
gbk = db.Column(db.String(8), comment='编码')
spell = db.Column(db.String(50), comment='拼写')
word = db.Column(db.String(4), comment='汉字')
tone = db.Column(db.String(50), comment='拼音')
freq = db.Column(db.Integer, comment='频率')
#四字成语
class Idiom(Base):
id = db.Column(db.Integer, primary_key=True)
#格言谚语
class Proverb(Base):
id = db.Column(db.Integer, primary_key=True)
#词组短语
class Phrase(Base):
id = db.Column(db.Integer, primary_key=True)
gbk=db.Column(db.String(16),unique=True, comment='编码')
score = db.Column(db.Boolean(0), comment='评分')
length = db.Column(db.Integer, comment='词组长度')
spell = db.Column(db.String(128), comment='拼音')
words = db.Column(db.String(32), comment='词组')
class Chapter(Base):
id = db.Column(db.Integer, primary_key=True)
grade = db.Column(db.Integer, comment='年级')
chapter = db.Column(db.Integer, comment='章节')
subject = db.Column(db.String(64), comment='题目')
content = db.Column(db.Text, comment='课文')
class Section(Base):
id = db.Column(db.Integer, primary_key=True)
grade = db.Column(db.Integer, comment='年级')
chapter = db.Column(db.Integer, comment='章节')
know = db.Column(db.String(512), comment='识字表')
word = db.Column(db.String(512), comment='写字表')
phrase = db.Column(db.Text, comment='词语表')
class Dictation(Base):
id = db.Column(db.Integer, primary_key=True)
book_id = db.Column(db.Integer, comment='课本id')
grade = db.Column(db.Integer, comment='年级')
chapter = db.Column(db.String(64), comment='章节')
words = db.Column(db.String(64), comment='写字表')
know = db.Column(db.String(64), comment='识字表')
phrase = db.Column(db.String(512), comment='词组')
class Courses(Base):
id = db.Column(db.Integer, primary_key=True)
book_id = db.Column(db.Integer, comment='课本id')
grade = db.Column(db.Integer, comment='年级')
chapter = db.Column(db.String(64), comment='章节')
words = db.Column(db.String(64), comment='写字表')
know = db.Column(db.String(64), comment='识字表')
phrase = db.Column(db.String(512), comment='词组')
class Article(Base):
id = db.Column(db.Integer, primary_key=True)
tag = db.Column(db.String(64), comment='标签')
book_id = db.Column(db.Integer, comment='书本id')
category = db.Column(db.String(64), comment='分类')
author = db.Column(db.String(32), comment='作者')
subject = db.Column(db.String(64), comment='主题')
content = db.Column(db.Text, comment='内容')
class TextBook(Base):
id = db.Column(db.Integer, primary_key=True)
#publication_date = db.Column(db.TIMESTAMP(True), server_default=text('CURRENT_TIMESTAMP'))
title =db.Column(db.String(64), comment='书本名称')
course = db.Column(db.String(32), comment='科目')#语文
level = db.Column(db.String(64), comment='级别')#小初中高级
grade = db.Column(db.Integer, comment='年级')
volume = db.Column(db.Integer, comment='上中下册')
edition=db.Column(db.String(64), comment='版本')
editor=db.Column(db.String(128), comment='主编')
abstract=db.Column(db.Text, comment='摘要')
isbn = db.Column(db.String(32), comment='版本')
press=db.Column(db.Integer, comment='出版商id')
province = db.Column(db.Integer, comment='省份')
class Publisher(Base):
id = db.Column(db.Integer, primary_key=True)
publishing_house = db.Column(db.String(128), comment='出版商')
serial_number = db.Column(db.String(8), comment='编号')
province = db.Column(db.Integer, comment='省份')
class Links(Base):
id = db.Column(db.Integer, primary_key=True)
used = db.Column(db.Boolean(0), comment='己使用')
grade = db.Column(db.Integer, comment='年级')
chapter = db.Column(db.Integer, comment='课文')
subject = db.Column(db.String(64), comment='课文题目')
link = db.Column(db.String(512), comment='链接')
tag = db.Column(db.String(16), comment='标签')
|
[
"zoneneo@hotmail.com"
] |
zoneneo@hotmail.com
|
6a7aa84cda5df60cadffb73eb06bb8813fea8c4c
|
0d1548f0fc2eeabfb663b3523e062df4413cd7ae
|
/manage.py
|
b3be62c86cff2966d667623c28727ccca9a80445
|
[] |
no_license
|
rachanabhagwat15/Stock-Market-Prediction
|
3f6ab7ea3c919cade1e9effa09e79522f82e6447
|
bae1b983b846501114228f520dbf9cda0df8caad
|
refs/heads/main
| 2023-02-15T20:41:19.433982
| 2021-01-17T04:47:50
| 2021-01-17T04:47:50
| 330,315,606
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 683
|
py
|
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Stock.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()
|
[
"noreply@github.com"
] |
rachanabhagwat15.noreply@github.com
|
fda5dcaafbc12d591a25e04eff5dae783cabda9c
|
588fc7a74ec467f708a6e0684870929cf4c99234
|
/30.py
|
35cbe344ed9066e19a2c3529531b46c502dfd342
|
[] |
no_license
|
petitviolet/project_euler
|
87710cd1b5138d6fea15a563c5a23b23c2b3c870
|
03f62a400708bd5cd4370456178c2ee63fb717db
|
refs/heads/master
| 2020-05-27T10:56:32.187374
| 2013-05-16T00:16:38
| 2013-05-16T00:16:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 512
|
py
|
# -*- encoding:utf-8 -*-
def sum_order(n):
if n == 1:
return False
str_n = str(n)
order = [int(s) for s in str_n]
result = 0
for o in order:
if o == 0:
pass
else:
result += o ** 5
if n == result:
return True
else:
return False
def main():
ans = 0
for i in xrange(1000000):
if sum_order(i):
print i
ans += i
i += 1
print ans
if __name__ == '__main__':
main()
|
[
"violethero0820@gmail.com"
] |
violethero0820@gmail.com
|
1548e71eb3e56b1454fba2ebb60d6ebcd1105cfe
|
4f03a65a6af608a8fb2d0049f6b1237532585925
|
/src/apconf/mixins/cms.py
|
347eaec1e8516b1276f09a493216a5910b076ab1
|
[] |
no_license
|
pymallorca/pymallorca
|
865f0cfa1fa693b7b488330236691eb8c6c4bf2b
|
048d41e02c305d6ccbe67ebf99ca519af6698109
|
refs/heads/master
| 2020-06-09T04:08:37.359739
| 2014-11-24T23:30:49
| 2014-11-24T23:30:49
| 26,458,565
| 2
| 0
| null | 2014-11-22T11:36:36
| 2014-11-10T22:20:06
|
Python
|
UTF-8
|
Python
| false
| false
| 918
|
py
|
# -*- coding: utf-8 -*-
from apconf import Options
opts = Options()
def get(value, default):
return opts.get(value, default, section='CMS')
class CMSMixin(object):
CMS_SEO_FIELDS = True
CMS_REDIRECTS = True
CMS_SOFTROOT = False
CMS_TEMPLATE_INHERITANCE = True
CMS_MENU_TITLE_OVERWRITE = True
CMS_USE_TINYMCE = False
CMS_PERMISSION = True
@property
def CMS_LANGUAGES(self):
lang_dict = lambda code, name: {
'code': code,
'name': name,
'hide_untranslated': code == self.LANGUAGE_CODE,
'redirect_on_fallback': not (code == self.LANGUAGE_CODE),
}
langs_list = [lang_dict(code, name) for code, name in self.LANGUAGES]
return {
self.SITE_ID: langs_list,
'default': {
'fallbacks': [self.LANGUAGE_CODE, ]
}
}
|
[
"gshark@gmail.com"
] |
gshark@gmail.com
|
c83b1d17781b0f8bb755ab8da5af3e52437121b5
|
dc397dcb1f6210c6e1bde1c8650428ab84239e72
|
/sandbox/mooncake2.py
|
9cafb0fcea00859b571a86dcaedb5e2cbc3bc774
|
[] |
no_license
|
ccurro/font-bakers
|
963a939736ececa9ab8ceb0756fd9507c285de7e
|
9e0a7e726a7c2c46e56a8a79168afe3efc4648fb
|
refs/heads/master
| 2020-04-07T01:03:24.898430
| 2019-04-29T21:31:49
| 2019-04-29T21:31:49
| 157,929,015
| 5
| 0
| null | 2019-04-29T21:32:20
| 2018-11-16T22:38:06
|
Python
|
UTF-8
|
Python
| false
| false
| 9,070
|
py
|
#!/bin/python
import numpy as np
import torch
from torch import nn, optim
import torch.nn.functional as F
import matplotlib.pyplot as plt
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
BATCH_SIZE = 512
NUM_BLOCKS = 16
NUM_TRAIN_ITERATIONS = 10000
SEED_LENGTH = 20
class CausalConv1d(nn.Conv1d):
# From Alex Rogozhnikov:
# https://github.com/pytorch/pytorch/issues/1333#issuecomment-400338207
def __init__(
self,
in_channels,
out_channels,
kernel_size,
stride=1,
dilation=1,
groups=1,
bias=True,
):
self.__padding = (kernel_size - 1) * dilation
super(CausalConv1d, self).__init__(
in_channels,
out_channels,
kernel_size=kernel_size,
stride=stride,
padding=self.__padding,
dilation=dilation,
groups=groups,
bias=bias,
)
def forward(self, input):
result = super(CausalConv1d, self).forward(input)
if self.__padding != 0:
return result[:, :, :-self.__padding]
return result
def generate_sinewaves(batch_size,
num_periods=2,
variance=0.1,
max_num_samples=200):
"""
Returns samples of one period of a sinewave with random frequency, phase
and number of samples.
Parameters
----------
batch_size : int
Batch size.
num_periods : int
Number of periods of the sinewave to generate before stopping.
variance : float
Variance of the AWGN to add to the sinewave.
max_num_samples : int
The maximum length of the stopped sinewave.
Returns
-------
sinewave : [batch_size, 1, max_num_samples]
"""
sinewaves = []
for i in range(batch_size):
n = np.random.randint(50, 150)
f = np.random.uniform(0.8, 1.2)
phi = np.random.uniform(0.1, 0.5)
x = np.linspace(0, num_periods / f, n, dtype=np.float32)
sinewave = np.sin(2 * np.pi * f * (x + phi))
pad_length = max_num_samples - len(sinewave)
sinewave = np.pad(
sinewave, (0, pad_length), "constant", constant_values=0)
sinewave += variance * np.random.randn(max_num_samples)
sinewaves.append(sinewave)
return torch.tensor(np.stack(sinewaves, axis=0)).unsqueeze(1).to(DEVICE)
def negative_log_prob(x, pi, mu, sigma):
"""
Negative log probability of predictive distribution of x_{k+1} from x_1,
..., x_k.
Parameters
----------
x : [batch_size, num_channels, max_num_samples]
Sinewave.
pi, mu, sigma : [batch_size, num_components (+1 for pi), max_num_samples]
Mixture weights, means and standard deviations of each Gaussian
component, respectively.
Returns
-------
[batch_size, max_num_samples - 1]
"""
# Index appropriately to compute nlogp of predicted next value.
vals = x[..., 1:]
pi = pi[:, 1:, :-1]
mu = mu[..., :-1]
sigma = sigma[..., :-1]
negative_densities = (0.5 * np.log(2 * np.pi) + torch.log(sigma) -
torch.log(pi) + 0.5 * (vals - mu)**2 / sigma**2)
return negative_densities.sum(dim=1)
class ResidualBlock(nn.Module):
"""
|-------------------------------------|
| |
| |-- tanh --| |
----|-> dilated_conv * --- 1x1 -- + -->
|-- sigm --| |
|
|
----------------------------------> + -------->
"""
def __init__(self, num_channels, kernel_size, dilation):
super(ResidualBlock, self).__init__()
self.num_channels = num_channels
self.conv1 = CausalConv1d(
num_channels,
2 * num_channels,
kernel_size=kernel_size,
dilation=dilation)
self.conv2 = nn.Conv1d(
num_channels, num_channels, kernel_size=1, dilation=1)
def forward(self, x):
a = self.conv1(x)
b = torch.tanh(a[:, :self.num_channels, :])
c = torch.sigmoid(a[:, self.num_channels:, :])
return self.conv2(b * c) + x
class Mooncake(nn.Module):
def __init__(
self,
in_channels=1,
max_num_samples=200,
num_channels=4,
num_blocks=8,
kernel_size=2,
dilations=[1, 2, 4, 8, 16, 32, 64, 128],
num_components=1,
):
super(Mooncake, self).__init__()
if len(dilations) != num_blocks:
msg = ("Number of dilations must be equal to number of residual "
"blocks.")
raise ValueError(msg)
self.max_num_samples = max_num_samples
self.num_channels = num_channels
self.num_blocks = num_blocks
# Coordconv adds 1 to `in_channels`
self.conv1 = CausalConv1d(
in_channels + 1, num_channels, kernel_size=kernel_size, dilation=1)
self.conv2 = nn.Conv1d(num_channels, 2 * num_channels, kernel_size=1)
self.blocks = nn.ModuleList([
ResidualBlock(
num_channels, kernel_size=kernel_size,
dilation=dilations[i]).to(DEVICE)
for i in range(self.num_blocks)
])
self.conv_pi = nn.Conv1d(
2 * num_channels, num_components + 1, kernel_size=1)
self.conv_mu = nn.Conv1d(
2 * num_channels, num_components, kernel_size=1)
self.conv_sigma = nn.Conv1d(
2 * num_channels, num_components, kernel_size=1)
def forward(self, x):
"""
Parameters
----------
x : [batch_size, num_channels, num_samples]
Input.
Returns
-------
pi, mu, sigma : [batch_size, num_components (+1 for pi), num_samples]
Mixture weights, means and standard deviations of each Gaussian
component, respectively.
"""
batch_size = x.shape[0]
num_samples = x.shape[2]
linspace = torch.tensor(
np.tile(
np.linspace(0, num_samples / self.max_num_samples,
num_samples),
[batch_size, 1])).unsqueeze(1).float().to(DEVICE)
x = torch.cat([x, linspace], dim=1)
taps = [self.conv1(x)]
for i in range(self.num_blocks):
tap = self.blocks[i](taps[i])
taps.append(tap)
aggregated_blocks = F.relu(torch.stack(taps).mean(dim=0))
z = self.conv2(aggregated_blocks)
pi = F.softmax(self.conv_pi(z), dim=1)
mu = 2 * torch.tanh(self.conv_mu(z) / 2)
sigma = F.softplus(self.conv_sigma(z))
return pi, mu, sigma
if __name__ == "__main__":
np.random.seed(1618)
torch.manual_seed(1618)
dilations = [2**i for i in range(NUM_BLOCKS)]
mooncake = Mooncake(num_blocks=NUM_BLOCKS, dilations=dilations).to(DEVICE)
optimizer = optim.Adam(mooncake.parameters(), lr=0.002)
num_trainable_params = sum(
p.numel() for p in mooncake.parameters() if p.requires_grad)
print("# trainable parameters: {}".format(num_trainable_params))
# Train
mooncake.train()
for i in range(NUM_TRAIN_ITERATIONS):
# Generate one sinewave and make a batch out of it.
sinewaves = generate_sinewaves(BATCH_SIZE)
pi, mu, sigma = mooncake(sinewaves)
# Update
optimizer.zero_grad()
nlogp = negative_log_prob(sinewaves, pi, mu, sigma).mean()
nlogp.backward()
optimizer.step()
if i % 10 == 0:
print("[{}] nlogp: {}".format(i,
nlogp.cpu().detach().numpy().item()))
del nlogp
if i % 500 == 499:
# Infer
mooncake.eval()
fig, ax = plt.subplots()
for c in ['r', 'b', 'g']:
with torch.no_grad():
ground_truth = generate_sinewaves(1)
inferred = torch.zeros_like(ground_truth)
inferred[..., :SEED_LENGTH] = ground_truth[..., :
SEED_LENGTH]
for j in range(SEED_LENGTH, inferred.shape[-1]):
pi, mu, sigma = mooncake(inferred[..., :j])
pi = pi[:, 1:, -1]
mu = mu[..., -1]
sigma = sigma[..., -1]
inferred[..., j] = (pi * mu).sum(dim=1)
ax.plot(
ground_truth.cpu().detach().numpy().squeeze(),
color=c,
linestyle='dashed',
alpha=0.3)
ax.plot(
inferred.cpu().detach().numpy().squeeze(),
color=c,
linestyle='solid')
plt.savefig("inference_{}.png".format(i))
|
[
"noreply@github.com"
] |
ccurro.noreply@github.com
|
2101e8141de93508a3429d18ac2ef38c874c6d79
|
99df1b7e2323ced0f2b2c9d6e2696136ef7521d7
|
/medproject/medapp/migrations/0002_auto_20210126_2242.py
|
a9c1f27b9f95d15ec1e8c42c71e1a60c9ab7180f
|
[] |
no_license
|
Resa-Obamwonyi/med_appointment
|
f3d6abe0e88d38b863a9ebf3eb6dff150b45da68
|
0bd30c267d7726d030c81679b1bd592f6f05708b
|
refs/heads/main
| 2023-02-24T14:35:42.106402
| 2021-01-27T19:32:09
| 2021-01-27T19:32:09
| 333,034,260
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 815
|
py
|
# Generated by Django 3.1.2 on 2021-01-26 22:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('medapp', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='appointment',
name='end_time',
field=models.TimeField(),
),
migrations.AlterField(
model_name='appointment',
name='start_time',
field=models.TimeField(),
),
migrations.AlterField(
model_name='availability',
name='end_time',
field=models.TimeField(),
),
migrations.AlterField(
model_name='availability',
name='start_time',
field=models.TimeField(),
),
]
|
[
"theresaobamwonyi@gmail.com"
] |
theresaobamwonyi@gmail.com
|
23b938e1ab8367b219527b79832098965d421692
|
b306123b0b6a7751357bfd553763f2d9cb62689d
|
/transformers/authors_transformer.py
|
21690931b1659e814655a1338a37a909c5e6e461
|
[] |
no_license
|
aascode/detecting-deception-in-political-debates
|
cc3e326493199fbc7fa94d8cf06821dce5d52c10
|
5f7c007e82fef1792aa7982bfb630cd0ddf057aa
|
refs/heads/master
| 2022-03-22T22:05:47.891021
| 2020-01-05T04:07:59
| 2020-01-05T05:26:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 522
|
py
|
from transformers import BaseTransformer
class AuthorsTransformer(BaseTransformer):
def __init__(self, data):
self.names = ['AUTHOR_TRUMP', 'AUTHOR_CLINTON', 'AUTHOR_OTHER']
transformed = []
for author in data:
is_trump = 1 if 'TRUMP' in author else 0
is_clinton = 1 if 'CLINTON' in author else 0
is_other = 1 if is_trump == 0 and is_clinton == 0 else 0
transformed.append([is_trump, is_clinton, is_other])
self.features = transformed
|
[
"34142780+fire0@users.noreply.github.com"
] |
34142780+fire0@users.noreply.github.com
|
cc83e1f6b8d5643656dcc69ec20fd57b14143940
|
c79d32b780dccf68c66a693ccc93969bae805d9c
|
/FP/Treino Exame/ex 3.py
|
466640675603564afb5d5eff19f3d11d320333c2
|
[] |
no_license
|
Tiburso/Trabalhos-IST
|
1ac065bd1328f37ff8d3d90960cae25ddafd5d27
|
2e473c3bf8a536899304c58b24e45f433962f2a4
|
refs/heads/master
| 2021-01-15T00:56:00.603234
| 2021-01-03T15:51:34
| 2021-01-03T15:51:34
| 242,820,217
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 362
|
py
|
def codifica(num):
n_f = 0
i = 0
while num > 0:
if (num % 10) % 2 == 0:
if num % 10 != 8:
n_f += (num % 10 + 2)*10**i
else:
if num % 10 == 1:
n_f += 9*10**i
else:
n_f += (num%10-2)*10**i
i += 1
num //= 10
return n_f
|
[
"noreply@github.com"
] |
Tiburso.noreply@github.com
|
ed530e3765c93ad395a073bdba2ebcf9db8a922e
|
2069ec66ace2e8fb5d55502d1c3ce7fd89f3cdcc
|
/fp2/example/write.py
|
2835c40effeaaa01280a975bc1037885b60af898
|
[] |
no_license
|
caimingA/ritsumeiPython
|
6812a0233456cf3d5346a63d890f4201160593c5
|
bb9c39726dd26fe53f7a41f5367bdab60c36a057
|
refs/heads/master
| 2022-11-16T22:28:50.274374
| 2020-07-13T14:53:51
| 2020-07-13T14:53:51
| 279,294,544
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 301
|
py
|
f = open("yuki.txt", mode="w", encoding="utf-8")
f.write("或冬曇りの午後、わたしは中央線の汽車の窓に一列の山脈を眺めてゐた。")
f.write("山脈は勿論まつ白だつた。")
f.write("が、それは雪と言ふよりも山脈の皮膚に近い色をしてゐた。")
|
[
"caiming106@sina.com"
] |
caiming106@sina.com
|
4aab067f7718e6227ed17f2f3bc3df1da3500b6b
|
227da5bdfc09fdbe6cea7d694a58470c26aaf94a
|
/auctions/views.py
|
0db9b0d7bac07d817fe2ef4c3e477a9203d95aaa
|
[
"MIT"
] |
permissive
|
amogyisabogy1/Filesharing
|
28db40bba5a909c83fc7142cdc9590a93c76952d
|
bc1d318af015cd3ede4710ca7c2f1ed823c205e4
|
refs/heads/master
| 2023-08-25T13:33:57.759426
| 2021-10-11T01:38:12
| 2021-10-11T01:38:12
| 415,744,000
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 11,701
|
py
|
from django.contrib.auth import authenticate, login, logout
from django.db import IntegrityError
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse
import datetime
from annoying.functions import get_object_or_None
from django.contrib.auth.decorators import login_required
from .models import *
# this is the default view
def index(request):
return render(request, "auctions/index.html")
# this is the view for login
def login_view(request):
if request.method == "POST":
# Attempt to sign user in
username = request.POST["username"]
password = request.POST["password"]
user = authenticate(request, username=username, password=password)
# Check if authentication successful
if user is not None:
login(request, user)
return HttpResponseRedirect(reverse("index"))
# if not authenticated
else:
return render(request, "auctions/login.html", {
"message": "Invalid username and/or password.",
"msg_type": "danger"
})
# if GET request
else:
return render(request, "auctions/login.html")
# view for logging out
def logout_view(request):
logout(request)
return HttpResponseRedirect(reverse("index"))
# view for registering
def register(request):
if request.method == "POST":
username = request.POST["username"]
email = request.POST["email"]
# Ensure password matches confirmation
password = request.POST["password"]
confirmation = request.POST["confirmation"]
if password != confirmation:
return render(request, "auctions/register.html", {
"message": "Passwords must match.",
"msg_type": "danger"
})
if not username:
return render(request, "auctions/register.html", {
"message": "Please enter your username.",
"msg_type": "danger"
})
if not email:
return render(request, "auctions/register.html", {
"message": "Please enter your email.",
"msg_type": "danger"
})
# Attempt to create new user
try:
user = User.objects.create_user(username, email, password)
user.save()
except IntegrityError:
return render(request, "auctions/register.html", {
"message": "Username already taken.",
"msg_type": "danger"
})
login(request, user)
return HttpResponseRedirect(reverse("index"))
# if GET request
else:
return render(request, "auctions/register.html")
# view for dashboard
@login_required(login_url='/login')
def dashboard(request):
winners = Winner.objects.filter(winner=request.user.username)
# checking for watchlist
lst = Watchlist.objects.filter(user=request.user.username)
# list of products available in WinnerModel
present = False
prodlst = []
i = 0
if lst:
present = True
for item in lst:
product = Listing.objects.get(id=item.listingid)
prodlst.append(product)
print(prodlst)
return render(request, "auctions/dashboard.html", {
"product_list": prodlst,
"present": present,
"products": winners
})
# view for showing the active lisitngs
@login_required(login_url='/login')
def activelisting(request):
# list of products available
products = Listing.objects.all()
# checking if there are any products
empty = False
if len(products) == 0:
empty = True
return render(request, "auctions/activelisting.html", {
"products": products,
"empty": empty
})
# view to create a lisiting
@login_required(login_url='/login')
def createlisting(request):
# if user submitted the create listing form
if request.method == "POST":
# item is of type Listing (object)
item = Listing()
# assigning the data submitted via form to the object
item.pdf = request.FILES["document"]
item.seller = request.user.username
item.title = request.POST.get('title')
item.description = request.POST.get('description')
item.category = request.POST.get('category')
# submitting data of the image link is optional
if request.POST.get('image_link'):
item.image_link = request.POST.get('image_link')
else:
item.image_link = "https://www.aust-biosearch.com.au/wp-content/themes/titan/images/noimage.gif"
# saving the data into the database
item.save()
# retrieving the new products list after adding and displaying
products = Listing.objects.all()
empty = False
if len(products) == 0:
empty = True
return render(request, "auctions/activelisting.html", {
"products": products,
"empty": empty
})
# if request is get
else:
return render(request, "auctions/createlisting.html")
# view to display all the categories
@login_required(login_url='/login')
def categories(request):
return render(request, "auctions/categories.html")
# view to display individual listing
@login_required(login_url='/login')
def viewlisting(request, product_id):
# if the user submits his bid
comments = Comment.objects.filter(listingid=product_id)
if request.method == "POST":
item = Listing.objects.get(id=product_id)
newbid = int(request.POST.get('newbid'))
# checking if the newbid is greater than or equal to current bid
if item.starting_bid >= newbid:
product = Listing.objects.get(id=product_id)
return render(request, "auctions/viewlisting.html", {
"product": product,
"message": "Your Bid should be higher than the Current one.",
"msg_type": "danger",
"comments": comments
})
# if bid is greater then updating in Listings table
else:
item.starting_bid = newbid
item.save()
# saving the bid in Bid model
bidobj = Bid.objects.filter(listingid=product_id)
if bidobj:
bidobj.delete()
obj = Bid()
obj.user = request.user.username
obj.title = item.title
obj.listingid = product_id
obj.bid = newbid
obj.save()
product = Listing.objects.get(id=product_id)
return render(request, "auctions/viewlisting.html", {
"product": product,
"message": "Your Bid is added.",
"msg_type": "success",
"comments": comments
})
# accessing individual listing GET
else:
product = Listing.objects.get(id=product_id)
added = Watchlist.objects.filter(
listingid=product_id, user=request.user.username)
return render(request, "auctions/viewlisting.html", {
"product": product,
"added": added,
"comments": comments
})
# View to add or remove products to watchlists
@login_required(login_url='/login')
def addtowatchlist(request, product_id):
obj = Watchlist.objects.filter(
listingid=product_id, user=request.user.username)
comments = Comment.objects.filter(listingid=product_id)
# checking if it is already added to the watchlist
if obj:
# if its already there then user wants to remove it from watchlist
obj.delete()
# returning the updated content
product = Listing.objects.get(id=product_id)
added = Watchlist.objects.filter(
listingid=product_id, user=request.user.username)
return render(request, "auctions/viewlisting.html", {
"product": product,
"added": added,
"comments": comments
})
else:
# if it not present then the user wants to add it to watchlist
obj = Watchlist()
obj.user = request.user.username
obj.listingid = product_id
obj.save()
# returning the updated content
product = Listing.objects.get(id=product_id)
added = Watchlist.objects.filter(
listingid=product_id, user=request.user.username)
return render(request, "auctions/viewlisting.html", {
"product": product,
"added": added,
"comments": comments
})
# view for comments
@login_required(login_url='/login')
def addcomment(request, product_id):
obj = Comment()
obj.comment = request.POST.get("comment")
obj.user = request.user.username
obj.listingid = product_id
obj.save()
# returning the updated content
print("displaying comments")
comments = Comment.objects.filter(listingid=product_id)
product = Listing.objects.get(id=product_id)
added = Watchlist.objects.filter(
listingid=product_id, user=request.user.username)
return render(request, "auctions/viewlisting.html", {
"product": product,
"added": added,
"comments": comments
})
# view to display all the active listings in that category
@login_required(login_url='/login')
def category(request, categ):
# retieving all the products that fall into this category
categ_products = Listing.objects.filter(category=categ)
empty = False
if len(categ_products) == 0:
empty = True
return render(request, "auctions/category.html", {
"categ": categ,
"empty": empty,
"products": categ_products
})
# view when the user wants to close the bid
@login_required(login_url='/login')
def closebid(request, product_id):
winobj = Winner()
listobj = Listing.objects.get(id=product_id)
obj = get_object_or_None(Bid, listingid=product_id)
if not obj:
message = "Deleting Bid"
msg_type = "danger"
else:
bidobj = Bid.objects.get(listingid=product_id)
winobj.owner = request.user.username
winobj.winner = bidobj.user
winobj.listingid = product_id
winobj.winprice = bidobj.bid
winobj.title = bidobj.title
winobj.save()
message = "Bid Closed"
msg_type = "success"
# removing from Bid
bidobj.delete()
# removing from watchlist
if Watchlist.objects.filter(listingid=product_id):
watchobj = Watchlist.objects.filter(listingid=product_id)
watchobj.delete()
# removing from Comment
if Comment.objects.filter(listingid=product_id):
commentobj = Comment.objects.filter(listingid=product_id)
commentobj.delete()
# removing from Listing
listobj.delete()
# retrieving the new products list after adding and displaying
# list of products available in WinnerModel
winners = Winner.objects.all()
# checking if there are any products
empty = False
if len(winners) == 0:
empty = True
return render(request, "auctions/closedlisting.html", {
"products": winners,
"empty": empty,
"message": message,
"msg_type": msg_type
})
# view to see closed listings
@login_required(login_url='/login')
def closedlisting(request):
# list of products available in WinnerModel
winners = Winner.objects.all()
# checking if there are any products
empty = False
if len(winners) == 0:
empty = True
return render(request, "auctions/closedlisting.html", {
"products": winners,
"empty": empty
})
|
[
"amoghganjikunta@gmail.com"
] |
amoghganjikunta@gmail.com
|
6349c63eb24b738a6bd6f609809d3db6989a179c
|
230a760662c8e2641dbe834bc41996fb9a7e644d
|
/app/fac/urls.py
|
ecb2febbb10c21a9b29c7baa01c2c3465a19d71c
|
[] |
no_license
|
OrlandoGareca/sistema-de-compra-y-facturacion
|
99a37762905bdf216558c5282705e2df4235f235
|
8b3cb64d2f9ebcbe085dd37b40fbc3b3b408dfee
|
refs/heads/master
| 2021-04-17T18:05:53.723207
| 2020-04-13T18:14:05
| 2020-04-13T18:14:05
| 249,464,579
| 0
| 0
| null | 2021-03-19T23:18:23
| 2020-03-23T15:10:38
|
HTML
|
UTF-8
|
Python
| false
| false
| 1,038
|
py
|
from django.urls import path, include
from app.fac.views import ClienteView,ClienteNew,ClienteEdit,clienteInactivar,\
FacturaView, facturas,\
ProductoView,\
borrar_detalle_factura
from app.fac.reportes import imprimir_factura_recibo
urlpatterns = [
path('clientes/',ClienteView.as_view(), name="cliente_list"),
path('clientes/new',ClienteNew.as_view(), name="cliente_new"),
path('clientes/<int:pk>',ClienteEdit.as_view(), name="cliente_edit"),
path('clientes/estado/<int:id>', clienteInactivar, name="cliente_inactivar"),
path('facturas/',FacturaView.as_view(), name="factura_list"),
path('facturas/new',facturas, name="factura_new"),
path('facturas/edit/<int:id>', facturas,name="factura_edit"),
path('facturas/buscar-producto', ProductoView.as_view(),name="factura_producto"),
path('facturas/borrar-detalle/<int:id>', borrar_detalle_factura ,name="factura_borrar_detalle"),
path('facturas/imprimir/<int:id>', imprimir_factura_recibo ,name="factura_imprimir_one"),
]
|
[
"orlando.dilmar.gareca.pena@gmail.com"
] |
orlando.dilmar.gareca.pena@gmail.com
|
f26e7859405297b5aea6a72fdb7d7d3d9f8143c0
|
60e277d924751aeda0162060b7d04e455e3de3c9
|
/rcnfq/receive_video_zmq.py
|
910388461bd21d10d5feec3ce7bf28eec1576817
|
[
"MIT"
] |
permissive
|
cosmoharrigan/rc-nfq
|
0700e69af9f5af79b04c108190edf04517577bf3
|
0b18d27d0b95644bded258d5a9fbb5cb4f895c91
|
refs/heads/master
| 2021-07-12T18:10:08.884411
| 2021-03-17T18:25:37
| 2021-03-17T18:25:37
| 53,664,411
| 15
| 8
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,018
|
py
|
'''Receive streaming video from the robot using ZeroMQ
'''
import io
import socket
import struct
from PIL import Image
from scipy.misc import imread
import numpy as np
import zmq
import time
# Configure the following parameter:
IP_ADDRESS = "192.168.0.56"
# Setup SUBSCRIBE socket
context = zmq.Context()
zmq_socket = context.socket(zmq.SUB)
zmq_socket.setsockopt(zmq.SUBSCRIBE, b'')
zmq_socket.setsockopt(zmq.CONFLATE, 1)
zmq_socket.connect("tcp://{}:5557".format(IP_ADDRESS))
i = 0
try:
while True:
# Construct a stream to hold the image data and read the image
# data from the connection
image_stream = io.BytesIO()
payload = zmq_socket.recv()
image_stream.write(payload)
# Rewind the stream, open it as an image with PIL and do some
# processing on it
image_stream.seek(0)
image = imread(image_stream)
# Do something with the image
print(np.round(np.mean(image), 0))
i += 1
finally:
pass
|
[
"cosmo.harrigan@singularityu.org"
] |
cosmo.harrigan@singularityu.org
|
ca7494f0ff6984b0e87384fffe98c9b39bfd9b3e
|
4db4276f7e05c16bc6719b48deb58e40f74230ca
|
/wordcount.py
|
832ac70c7f9a6b322e9e1de8ab38f594d958de59
|
[] |
no_license
|
dmrsh/hello-world
|
ea6e00aa31401f48c46abbd48b35ab1c717530a0
|
2e33d0982e8fb40f8bce87b7b8141f2dc96f7d7e
|
refs/heads/master
| 2016-09-06T15:16:00.456635
| 2015-07-27T20:22:17
| 2015-07-27T20:22:17
| 39,794,669
| 0
| 0
| null | 2015-07-27T20:22:17
| 2015-07-27T19:52:28
|
Python
|
UTF-8
|
Python
| false
| false
| 463
|
py
|
import os
cwd = os.getcwd()
wds = open(cwd+'\subdir\muchText.txt')
d = dict()
for line in wds:
for word in line.split():
tok = word.strip().lower()
d[tok] = d.get(tok, 0) + 1
sd = []
for tok in d:
sd.append((d[tok], tok))
sd.sort(reverse=True)
for word in sd:
count = word[0]
if(count > 1):
print(word[1], '\t', count)
ld = dict()
for word in sd:
ld[word[0]] = ld.get(word[0], ()) + (word[1],)
for key in ld:
if(key > 1):
print(key, ld[key])
|
[
"s99bf19a@yahoo.co.uk"
] |
s99bf19a@yahoo.co.uk
|
91c38c6e741d31665a613aefbe52b741dad9f2d3
|
e2f133885cfcea86a3c06bba2f1d4d165e50c823
|
/api_test/main.py
|
eb2d68962d74199d1e2afd00f96adc2b336a3364
|
[] |
no_license
|
JR1QQ4/app_test
|
e0d9dc25ea03060d17dc7f29f30706ec4b8c16ea
|
1c2ab9a5601e94a28f9bfe485e615d22511bb79b
|
refs/heads/main
| 2023-05-25T14:55:53.326377
| 2021-06-08T14:33:52
| 2021-06-08T14:33:52
| 349,760,345
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 8,417
|
py
|
#!/usr/bin/python
# -*- coding:utf-8 -*-
from time import sleep
from appium import webdriver
from appium.webdriver.common.mobileby import MobileBy
from appium.webdriver.common.touch_action import TouchAction
from appium.webdriver.extensions.android.gsm import GsmCallActions
from appium.webdriver.webdriver import WebDriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
class Main:
_driver: WebDriver
_appPackage = "com.xueqiu.android"
_appActivity = ".view.WelcomeActivityAlias"
# _appActivity = ".common.MainActivity"
# 搜索框
_search_input = (MobileBy.ID, "com.xueqiu.android:id/tv_search")
_search_text = (MobileBy.ID, "com.xueqiu.android:id/search_input_text")
# 搜索到的内容
_search_result = (MobileBy.XPATH, '//*[@resource-id="com.xueqiu.android:id/name" and @text="$value"]')
_search_result_first = (MobileBy.ID, 'com.xueqiu.android:id/name')
_result_item = (MobileBy.XPATH, '//*[@resource-id="com.xueqiu.android:id/ll_stock_result_view"]'
'//*[@text="$value"]/../..')
_result_item_code = (MobileBy.XPATH, '//*[@text="$code"]')
_result_price = (MobileBy.XPATH, '//*[@resource-id="com.xueqiu.android:id/ll_stock_result_view"]'
'//*[@text="$value"]/../..//*[@resource-id="com.xueqiu.android:id/current_price"]')
_result_price_with_code = (MobileBy.XPATH, '//*[@text="$code"]/../../..'
'//*[@resource-id="com.xueqiu.android:id/current_price"]')
# 取消搜索
_close_search = (MobileBy.ID, 'com.xueqiu.android:id/action_close')
# tab导航
_tab = (MobileBy.XPATH, '//*[@resource-id="android:id/tabs"]//*[@text="$tab"]/..')
def __init__(self, driver: WebDriver = None):
if driver is None:
opts = ["http://127.0.0.1:4723/wd/hub",
{
"platformName": "Android",
"platformVersion": "6.0",
"deviceName": "127.0.0.1:7555",
"automationName": "UiAutomator2",
"appPackage": self._appPackage, # adb shell dumpsys activity top
"appActivity": self._appActivity,
"noRest": True,
"unicodeKeyBoard": True,
"resetKeyBoard": True,
# "avd": "Pixel_23_6", # 启动模拟器
"dontStopAppOnRest": True, # 首次启动 app 时不停止 app(可以调试或者运行的时候提升运行速度)
"skipDeviceInitialization": True, # 跳过安装,权限设置等操作(可以调试或者运行的时候提升运行速度)
# "newCommandTimeout": 300, # 每一条命令执行的间隔时间
# "uuid": "", # 用于
# "autoGrantPermissions": True, # 用于权限管理,设置了这个,就不需要设置 noRest
"chromedriverExecutable": "C:\\webdriver\\chromedriver.exe" # 用于测试 webview 页面
}
]
self._driver = webdriver.Remote(*opts)
else:
self._driver.start_activity(self._appPackage, self._appActivity)
self._driver.implicitly_wait(10)
def find(self, locator):
WebDriverWait(self._driver, 10).until(EC.visibility_of_element_located(locator))
return self._driver.find_element(*locator)
def click(self, locator):
ele = WebDriverWait(self._driver, 10).until(EC.visibility_of_element_located(locator))
ele.click()
def text(self, locator, value=""):
WebDriverWait(self._driver, 10).until(EC.visibility_of_element_located(locator))
if value != "":
self._driver.find_element(*locator).send_keys(value)
else:
return self._driver.find_element(*locator).text
def search(self, value="阿里巴巴"):
self.click(self._search_input)
self.text(self._search_text, value)
def search_and_get_price(self, value="阿里巴巴"):
self.click(self._search_input)
self.text(self._search_text, value)
self.click((self._search_result[0], self._search_result[1].replace("$value", "阿里巴巴")))
return float(self.text((self._result_price[0], self._result_price[1].replace("$value", "阿里巴巴"))))
def search_and_show_attribute(self):
ele = self.find(self._search_input)
search_enabled = ele.is_enabled()
print(ele.text) # 搜索股票/组合/用户/讨论
print(ele.location) # {'x': 219, 'y': 60}
print(ele.size) # {'height': 36, 'width': 281}
if search_enabled:
ele.click()
self.text(self._search_text, "alibaba")
ali_ele = self.find((self._search_result[0], self._search_result[1].replace("$value", "阿里巴巴")))
# ali_ele.is_displayed()
print(ali_ele.get_attribute("displayed")) # true
def move_to(self, cur=None, target=None):
sleep(3)
action = TouchAction(self._driver)
# action.press(x=cur["x"], y=cur["y"]).wait(200).move_to(x=target["x"], y=target["y"]).release().perform()
print(self._driver.get_window_rect())
action.press(x=360, y=1000).wait(200).move_to(x=360, y=280).release().perform()
def scroll_and_search_with_android_selector(self):
loc = (MobileBy.ANDROID_UIAUTOMATOR, 'new UiSelector().text("关注")')
WebDriverWait(self._driver, 10).until(EC.visibility_of_element_located(loc))
self._driver.find_element_by_android_uiautomator('new UiSelector().text("关注")').click()
self._driver.find_element_by_android_uiautomator('new UiScrollable(new UiSelector().'
'scrollable(true).instance(0)).'
'scrollIntoView(new UiSelector().text("玉山落雨").'
'instance(0));').click()
sleep(5)
def toast(self):
print(self._driver.page_source)
def clear(self, locator):
self.find(locator).clear()
def search_get_price(self, value, code):
self.click(self._search_input)
self.text(self._search_text, value)
self.click(self._search_result_first)
price = self.text((self._result_price_with_code[0], self._result_price_with_code[1].replace("$code", code)))
self.click(self._close_search)
return price
def mobile_call(self, phone_number="13883256868", action=GsmCallActions.CALL):
"""mumu 模拟器不支持,需要使用原生的"""
# action:
# GsmCallActions.CALL
# GsmCallActions.ACCEPT
# GsmCallActions.CANCEL
# GsmCallActions.HOLD
self._driver.make_gsm_call(phone_number, action)
def msg(self, phone_number="13537773695", message="Hello world!"):
"""mumu 模拟器不支持,需要使用原生的"""
self._driver.send_sms(phone_number, message)
def network(self, connection_type=1):
self._driver.set_network_connection(connection_type)
sleep(3)
self._driver.set_network_connection(6)
sleep(3)
def screenshot_as_file(self, path="./photos/img.png"):
self._driver.get_screenshot_as_file(path)
def webview(self):
self.click((self._tab[0], self._tab[1].replace("$tab", "交易")))
sleep(10)
print(self._driver.contexts)
# 立即开户,切换到 webview
self._driver.switch_to.context(self._driver.contexts[-1])
sleep(10)
# print(self._driver.window_handles)
loc1 = (MobileBy.XPATH, "//*[id='Layout_app_3V4']/div/div/ul/li[1]/div[2]/h1")
WebDriverWait(self._driver, 10).until(EC.element_to_be_clickable(loc1))
self.click(loc1)
sleep(10)
handle = self._driver.window_handles[-1]
self._driver.switch_to.window(handle)
# 开户信息填写
loc2 = (MobileBy.ID, "phone-number")
loc3 = (MobileBy.ID, "code")
loc4 = (MobileBy.CSS_SELECTOR, ".btn-submit")
self.text(loc2, "13810120202")
self.text(loc3, "6666")
self.click(loc4)
|
[
"chenjunrenyx@163.com"
] |
chenjunrenyx@163.com
|
e232ea8556be487081ad7ae17a32d47bd88efdad
|
31e6ca145bfff0277509dbd7c4b44b8deddf3334
|
/LeetCode/Graph/combination-sum.py
|
1bad4a940655a4357b9828e4c8a4c2eb18a168a3
|
[] |
no_license
|
brillantescene/Coding_Test
|
2582d6eb2d0af8d9ac33b8e829ff8c1682563c42
|
0ebc75cd66e1ccea3cedc24d6e457b167bb52491
|
refs/heads/master
| 2023-08-31T06:20:39.000734
| 2021-10-15T10:51:17
| 2021-10-15T10:51:17
| 254,366,460
| 3
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 459
|
py
|
class Solution:
def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]:
result = []
def dfs(csum, index, path):
if csum < 0:
return
if csum == 0:
result.append(path)
return
for i in range(index, len(candidates)):
dfs(csum-candidates[i], i, path+[candidates[i]])
dfs(target, 0, [])
return result
|
[
"glisteneugene@gmail.com"
] |
glisteneugene@gmail.com
|
613ab8ac9d59b0f20df16241ff4defdd691ee164
|
79b6e625fb9fd2533a0e492d0e23fb5bb18f4f18
|
/app/config/__init__.py
|
2fc2af08e1789ef2352c15615fe8b6bea8adf792
|
[] |
no_license
|
schulzsebastian/vdata
|
93d57491c1b2553e42539ef5772cd845b1ee9075
|
999270b32ff60f0f17cd13eb0c8b391069bcdfba
|
refs/heads/master
| 2021-01-11T06:51:28.611857
| 2016-11-03T19:40:19
| 2016-11-03T19:40:19
| 71,816,268
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 194
|
py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from .local_config import LocalConfig
current_config = LocalConfig
except:
from .config import Config
current_config = Config
|
[
"schulz.siwy@gmail.com"
] |
schulz.siwy@gmail.com
|
e4c41ba497ad969a0d1063fd764a5b856b1015ec
|
fdf96c2a5d0c044dcb9eea210434dfc5448cf2e9
|
/el.py
|
69d20ce3363d30b857e9ad995a268486ff20be78
|
[] |
no_license
|
joquizon/Python-Class
|
84f8db181c0c37385d18f4c9b9d616365b96972f
|
2341589e9cc63262c5424189a19b48772add5972
|
refs/heads/master
| 2021-05-21T13:58:36.812773
| 2021-01-29T16:02:56
| 2021-01-29T16:02:56
| 252,673,470
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,158
|
py
|
from Newdatin import Ndataenter
from Editdatin import Bigeditinput
from Edinfo import editinputFo
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#_____________________________________________________________________________________________________________
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>mode select
def modeset():
mission = input("1 for entry or 2 for output: ")
if mission== '1':
print("A new employee! coo'coo :)")
Ndataenter()
elif mission== '2':
Bigeditinput()
#run search function for editing employee info
elif mission == '3':
editinputFo()
elif mission == '4':
quit()
else:
print('boopbeep Error!')
modeset()
modeset()
|
[
"josequizon@jcqfolio.com"
] |
josequizon@jcqfolio.com
|
77fd709015fd652698b0f4af3bad2db95658244b
|
9766c2e479e99cca5bf7cc834c949fc4d5286275
|
/TEST/GUI/00190_page_bdyanalysis/cleanup.py
|
016dd73ae3dc45790df8a484acfe062a7795a6de
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
UstbCmsPjy/OOF2
|
4c141e8da3c7e3c5bc9129c2cb27ed301455a155
|
f8539080529d257a02b8f5cc44040637387ed9a1
|
refs/heads/master
| 2023-05-05T09:58:22.597997
| 2020-05-28T23:05:30
| 2020-05-28T23:05:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 26
|
py
|
removefile('bdyanal.log')
|
[
"lnz5@rosie.nist.gov"
] |
lnz5@rosie.nist.gov
|
9e373589be438679c33b4a580fe89b840e5164f3
|
a8ebc4cccbf1ba346b1de4779dee7d4c803c7106
|
/display_pixels/cap_symmetrize_velfield.py
|
ad419157b76b0cabc104f2eff3144a8894c45ca7
|
[] |
no_license
|
Treibeis/python
|
6b4680b167e8da7dffdcbe31704f18b0bd4f31fb
|
e5f467f1db96c99bb8085229f915592f90932802
|
refs/heads/master
| 2023-07-25T09:18:40.941330
| 2023-07-15T05:51:43
| 2023-07-15T05:51:43
| 143,747,936
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,828
|
py
|
#######################################################################
#
# Copyright (C) 2004-2015, Michele Cappellari
# E-mail: michele.cappellari_at_physics.ox.ac.uk
#
# This software is provided as is without any warranty whatsoever.
# Permission to use, for non-commercial purposes is granted.
# Permission to modify for personal or internal use is granted,
# provided this copyright and disclaimer are included unchanged
# at the beginning of the file. All other rights are reserved.
#
#######################################################################
#
# NAME:
# symmetrize_velfield()
#
# PURPOSE:
# This routine generates a bi-symmetric ('axisymmetric')
# version of a given set of kinematical measurements.
# PA: is the angle in degrees, measured counter-clockwise,
# from the vertical axis (Y axis) to the galaxy major axis.
# SYM: by-simmetry: is 1 for (V,h3,h5) and 2 for (sigma,h4,h6)
#
# HISTORY:
# V1.0.0: Michele Cappellari, Vicenza, 21 May 2004
# V1.0.1: Added MISSING keyword to TRIGRID call. Flipped velocity sign.
# Written basic documentation. MC, Leiden, 25 May 2004
# V1.1.0: Included point-symmetric case. Remco van den Bosch, Leiden, 18 January 2005
# V1.1.1: Minor code revisions. MC, Leiden, 23 May 2005
# V1.1.2: Important: changed definition of PA to be measured counterclockwise
# with respect to the positive Y axis, as in astronomical convention and
# consistently with my FIND_GALAXY routine. MC, Leiden, 1 June 2005
# V1.1.3: Added optional keyword TRIANG. Corrected rare situation with w=-1.
# MC, Leiden, 2 June 2005
# V1.1.4: Added prefix SYMM_ to internal functions to prevent conflicts
# with external functions with the same name. MC, Oxford, 11 May 2007
# V2.0.0 : Completely rewritten without any loop. MC, Oxford, 8 October 2013
# V2.0.1: Uses TOLERANCE keyword of TRIANGULATE to try to avoid IDL error
# "TRIANGULATE: Points are co-linear, no solution." MC, Oxford, 2 December 2013
# V3.0.0: Translated from IDL into Python. MC, Oxford, 14 February 2014
# V3.0.1: Fixed rare case where interpolated value at boundary becomes
# NaN due to numerical accuracy. MC, Oxford, 20 May 2015
#
#######################################################################
import numpy as np
from scipy import interpolate
#----------------------------------------------------------------------
# Michele cappellari, Paranal, 10 November 2013
def _rotate_points(x, y, ang):
"""
Rotates points counter-clockwise by an angle ANG-90 in degrees.
"""
theta = np.radians(ang - 90.)
xNew = x*np.cos(theta) - y*np.sin(theta)
yNew = x*np.sin(theta) + y*np.cos(theta)
return xNew, yNew
#----------------------------------------------------------------------
def symmetrize_velfield(xbin, ybin, velBin, sym=2, pa=90.):
"""
This routine generates a bi-symmetric ('axisymmetric')
version of a given set of kinematical measurements.
PA: is the angle in degrees, measured counter-clockwise,
from the vertical axis (Y axis) to the galaxy major axis.
SYM: by-simmetry: is 1 for (V,h3,h5) and 2 for (sigma,h4,h6)
"""
xbin, ybin, velBin = map(np.asarray, [xbin, ybin, velBin])
x, y = _rotate_points(xbin, ybin, -pa) # Negative PA for counter-clockwise
xyIn = np.column_stack([x, y])
xout = np.hstack([x,-x, x,-x])
yout = np.hstack([y, y,-y,-y])
xyOut = np.column_stack([xout, yout])
velOut = interpolate.griddata(xyIn, velBin, xyOut)
velOut = velOut.reshape(4, xbin.size)
velOut[0, :] = velBin # see V3.0.1
if sym == 1:
velOut[[1, 3], :] *= -1.
velSym = np.nanmean(velOut, axis=0)
return velSym
#----------------------------------------------------------------------
|
[
"[treibeis1995@gmail.com]"
] |
[treibeis1995@gmail.com]
|
5588a9b58bb4811699015d008966309f1b432923
|
76a01339f7ca19536a07d66e18ff427762157a2a
|
/codeforces/Python/serval_and_bus.py
|
49a999fb8f0c58c2e96f04c61667f1b963aee56a
|
[] |
no_license
|
shaarangg/CP-codes
|
75f99530921a380b93d8473a2f2a588dc35b0beb
|
94fc49d0f20c02da69f23c74e26c974dfe122b2f
|
refs/heads/main
| 2023-07-19T21:31:40.011853
| 2021-09-07T05:22:28
| 2021-09-07T05:22:28
| 332,644,437
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 282
|
py
|
n,t = map(int,input().split())
m=10**9
j=0
for i in range(n):
s,d = map(int,input().split())
if(t<=s):
a=s-t
else:
a=t-s
if(a%d==0):
a=0
else:
a = (a//d + 1)*d -t + s
if(m>a):
m=a
j=i+1
print(j)
|
[
"shaaranggsingh@gmail.com"
] |
shaaranggsingh@gmail.com
|
f13581b5b5453ebc6de7b1a6fb333b7aef052b4f
|
5685c24b2d955a00861b4082c10e3b479923f3ea
|
/week4/8.5_lists.py
|
c817beb147b1f49da90b21a17531fd087de02d84
|
[
"MIT"
] |
permissive
|
itsanshulverma/py-data-structures-umich
|
2fe837faa38eaa07e7f357c2731fcebe7500743e
|
5cd4f2a87de8205d551057b32e8586405079f92c
|
refs/heads/master
| 2022-12-05T00:11:17.304705
| 2020-08-31T11:16:19
| 2020-08-31T11:16:19
| 291,684,537
| 4
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 846
|
py
|
#by Anshul Verma
#8.5 Open the file mbox-short.txt and read it line by line.
#When you find a line that starts with 'From ' like the following line:
# From stephen.marquard@uct.ac.za Sat Jan 5 09:14:16 2008
#You will parse the From line using split() and
#print out the second word in the line (i.e. the entire address of the person who sent the message).
#Then print out a count at the end.
#Hint: make sure not to include the lines that start with 'From:'.
#You can download the sample data at
#http://www.py4e.com/code3/mbox-short.txt
fname = input("Enter the file name: ")
if len(fname) < 1 : fname = "mbox-short.txt"
fh = open(fname)
count = 0
for line in fh:
if line.startswith('From '):
count = count + 1
words = line.split()
print(words[1])
print("There were", count, "lines in the file with From as the first word")
|
[
"itsanshulverma@gmail.com"
] |
itsanshulverma@gmail.com
|
3adc95673cbed3a1842979da20f0907a4b031f28
|
bfafc91d672a1ea2bff6178038d93ee3b0d39c3e
|
/bioinformatics/rosalind/NEED/need.py
|
674ed759d673c6b16ac06aea31783b7dd0f2b662
|
[] |
no_license
|
danshea/python
|
c2567644f4e18b98c30b4e908b6e96f5475e6fd6
|
66bd667d525c64dbb23a4248772cb3094c3ae930
|
refs/heads/master
| 2021-08-06T06:02:05.094272
| 2021-06-21T20:24:28
| 2021-06-21T20:24:28
| 4,727,109
| 2
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,148
|
py
|
#!/usr/bin/env python
################################################################################
#
# Name: need.py
# Date: 2014-04-25
# Author: dshea
# Description:
# Problem
#
# An online interface to EMBOSS's Needle tool for aligning DNA and RNA strings
# can be found here.
#
# Use:
#
# The DNAfull scoring matrix; note that DNAfull uses IUPAC notation for
# ambiguous nucleotides. Gap opening penalty of 10. Gap extension penalty of 1.
#
# For our purposes, the "pair" output format will work fine; this format shows
# the two strings aligned at the bottom of the output file beneath some
# statistics about the alignment.
#
# Given: Two GenBank IDs.
#
# Return: The maximum global alignment score between the DNA strings associated
# with these IDs. Sample Dataset
#
# JX205496.1 JX469991.1
#
# Sample Output
#
# 257
#
################################################################################
import os.path
import sys
from Bio.Emboss.Applications import NeedleCommandline
from Bio import Entrez
from Bio import SeqIO
# GLOBAL
Entrez.email = "shea.d@husky.neu.edu"
def getFasta(genbank_id):
filename = '{0:s}.fa'.format(genbank_id)
if not os.path.isfile(filename):
handle = Entrez.efetch(db='nucleotide', rettype='fasta', retmode='text', id=genbank_id)
seq_record = SeqIO.read(handle, 'fasta')
handle.close()
SeqIO.write(seq_record, filename, format='fasta')
return(filename)
def main():
if len(sys.argv) != 3:
print 'usage {0:s} genbank_id1 genbank_id2'.format(sys.argv[0])
sys.exit(1)
genbank_a = sys.argv[1]
genbank_b = sys.argv[2]
sequence_a = getFasta(genbank_a)
sequence_b = getFasta(genbank_b)
needle_cline = NeedleCommandline('/usr/local/bin/needle',
asequence=sequence_a, bsequence=sequence_b,
gapopen=10, gapextend=1, endweight=True, endopen=10, endextend=1,
outfile='{0:s}_{1:s}_needle.txt'.format(genbank_a,genbank_b))
stdout, stderr = needle_cline()
sys.exit(0)
if __name__ == '__main__':
main()
|
[
"daniel.john.shea@gmail.com"
] |
daniel.john.shea@gmail.com
|
e093d502ae8e843bd99621c4dbb2bdd8f510aca7
|
c265cb56c7f6a5bc532a506188e61cb4d6ac3358
|
/example/get_face_enhancement_v1.py
|
029237fc791914bc3ec24b1c0dbb6e03fa4672ef
|
[
"MIT"
] |
permissive
|
tranhoangnguyen03/MobileFace
|
00ae926053494d1668004621cebbf5ed0575471b
|
c94aa16bf5f1fb3b74b67e5685fb39061cf10ef4
|
refs/heads/master
| 2020-06-25T22:40:46.715046
| 2019-07-29T11:51:51
| 2019-07-29T11:51:51
| 199,442,953
| 0
| 0
|
MIT
| 2019-07-29T11:50:43
| 2019-07-29T11:50:43
| null |
UTF-8
|
Python
| false
| false
| 2,818
|
py
|
import os, sys
import argparse
import cv2
from matplotlib import pyplot as plt
import numpy as np
sys.path.append(os.path.abspath(os.path.dirname(__file__)) + os.sep + '../MobileFace_Enhancement/')
from mobileface_enhancement import MobileFaceEnhance
def parse_args():
parser = argparse.ArgumentParser(description='Test MobileFace Makeup.')
parser.add_argument('--image-dir', type=str, default='./light',
help='Test images directory.')
parser.add_argument('--result-dir', type=str, default='./light_result',
help='Result images directory.')
parser.add_argument('--dark-th', type=int, default=80,
help='Black pixel threshold whith typical values from 50 to 100.')
parser.add_argument('--bright-th', type=int, default=200,
help='White pixel threshold whith typical values from 180 to 220.')
parser.add_argument('--dark-shift', type=float, default=0.4,
help='Gamma shift value for gamma correction to brighten the face. \
The typical values are from 0.3 to 0.5.')
parser.add_argument('--bright-shift', type=float, default=2.5,
help='Gamma shift value for gamma correction to darken the face. \
The typical values are from 2.0 to 3.0.')
args = parser.parse_args()
return args
def main():
args = parse_args()
enhance_tool = MobileFaceEnhance()
img_list = os.listdir(args.image_dir)
for img_name in img_list:
im_path = os.path.join(args.image_dir, img_name)
img = cv2.imread(im_path)
gamma, hist = enhance_tool.hist_statistic(img,
dark_th = args.dark_th,
bright_th = args.bright_th,
dark_shift = args.dark_shift,
bright_shift = args.bright_shift)
img_gamma = enhance_tool.gamma_trans(img, gamma)
if not os.path.exists(args.result_dir):
os.makedirs(args.result_dir)
rst_path = os.path.join(args.result_dir, 'rst_' + img_name)
cv2.imwrite(rst_path, img_gamma)
img_stack = np.hstack((img, img_gamma))
plt.figure(figsize=(5, 5))
ax1 = plt.subplot2grid((2,1),(0, 0))
ax1.set_title('Grayscale Histogram')
ax1.set_xlabel("Bins")
ax1.set_ylabel("Num of Pixels")
ax1.plot(hist)
ax1.set_xlim([0, 256])
ax1 = plt.subplot2grid((2, 1), (1, 0), colspan=3, rowspan=1)
ax1.set_title('Enhance Comparison')
ax1.imshow(img_stack[:,:,::-1])
plt.tight_layout()
plt.show()
if __name__ == "__main__":
main()
|
[
"helloai777@gmail.com"
] |
helloai777@gmail.com
|
03e8e0bae9c7c05a0bbd236400a40a4707d76ea3
|
15a1d05d48953ddaa835b94c8fb93ca69c02488d
|
/catkin_ws/src/initialize_particles/src/init_particles_caller.py
|
bcd4d11372cc28044b7bf35873ded9ddf54332b9
|
[] |
no_license
|
ok-kewei/ROS-Navigation
|
81b895cccbe65287be98da6e62967ae44dee4ab6
|
5218fe366db3638efc179cc6e55fe368842a1c20
|
refs/heads/master
| 2023-01-06T15:08:19.822330
| 2020-11-05T20:41:03
| 2020-11-05T20:41:03
| 304,449,087
| 3
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 329
|
py
|
#! /usr/bin/env python
import rospy
from std_srvs.srv import Empty, EmptyRequest
import sys
rospy.init_node('service_client')
rospy.wait_for_service('/global_localization')
disperse_particles_service = rospy.ServiceProxy('/global_localization', Empty)
msg = EmptyRequest()
result = disperse_particles_service(msg)
print result
|
[
"43628709+ok-kewei@users.noreply.github.com"
] |
43628709+ok-kewei@users.noreply.github.com
|
c68fc822bcbcb1801f923e29bd5a518e6dfe4dcd
|
74db1485d7560f087b7798a816a1262f1aff97d8
|
/keepfit_api/keepfit/test.py
|
66293ce9f5d3e0bbb46d28b9d772f4077922595c
|
[] |
no_license
|
NirvaanReddy/SportsApp
|
d14c80b537c50f7900cda7f70c7ae945dd59ceda
|
632b20bde7877925cd0f1667208d42a0e8344d3c
|
refs/heads/main
| 2023-05-02T07:17:09.253553
| 2021-05-10T02:38:08
| 2021-05-10T02:38:08
| 337,168,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,011
|
py
|
from django.test import TestCase
from django.shortcuts import render
from rest_framework.decorators import api_view
from rest_framework.response import Response
from django.db import models
from .s import *
from .user import *
from django.core.files import File
from django.http import HttpResponse
from .user_endpoints import photos_path
from .user import *
from .user_endpoints import *
from .workout_endpoints import *
from .search_endpoints import *
class UserCreatedSuccesfully(TestCase):
def setUp(self):
pass
def createUserVerify(self):
# to verify that we are correctly making users
items = { "id": "whatever" ,"sex": "Male", "pounds":170,
"inches": 170, "shortBiography": "My name is Jason Gomez :)",
"birthdate" : 2.3 , "username" : "jjjj" , "password": "stringstring"
}
json_string = json.dumps(items)
result = create_user(json_string)
self.assertEqual("Hello", 'The lion says "roar"')
|
[
"nirvaanreddy@gmail.com"
] |
nirvaanreddy@gmail.com
|
71b3ff2955147e25fe13059d258d1b76d5638d8c
|
6989347289b52b16c5c7af1f73851d734245bf61
|
/draw_sim_tree_with_matrix.py
|
9994b33b11058e7842418a9e3bb7bc6dc10ee783
|
[] |
no_license
|
cfriedline/bayesiansimulation
|
4abecf292a1d5361ac3951f2c367db4680cbf355
|
a74dbb7b39a10efc70bbb72086d45ca9fbaf5927
|
refs/heads/master
| 2021-01-01T19:20:51.001407
| 2014-06-05T07:00:00
| 2014-06-05T07:00:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,608
|
py
|
__author__ = 'chris'
import os
import sys
from ete2 import Tree, TreeNode, TreeStyle, AttrFace, TextFace, ClusterTree, ClusterNode, ProfileFace, CircleFace, NodeStyle, PhyloTree
import numpy
import tempfile
def get_color(data, row, col):
val = float(data[row, col])
coldata = get_column(data, col)
colsum = numpy.sum(coldata)
colmed = numpy.median(coldata)
colavg = numpy.average(coldata)
colsd = numpy.std(coldata)
colmin = numpy.min(coldata)
colptp = numpy.ptp(coldata)
n = (val-colmin)/colptp
if n >= 0.5:
first = int(round(n*255))
first = hex(first)[2:]
third = "00"
else:
third = int(round(n*255))
third = hex(third)[2:]
first = "00"
color = "#%s%s%s" % (first, "00", third)
return color
def get_tree_style(tree_file, abund, rownames):
with open("matrix.txt", "w") as temp:
cols = len(abund[0])
header = "#Names"
for i in xrange(cols):
header += "\tOTU%d" % i
temp.write("%s\n" % header)
for i, row in enumerate(abund):
temp.write("%s\t%s\n" % (rownames[i], '\t'.join([str(i) for i in row])))
t = Tree(tree_file)
t.convert_to_ultrametric(10)
assert isinstance(abund, numpy.ndarray)
assert isinstance(rownames, numpy.ndarray)
ts = TreeStyle()
ts.mode = "r"
ts.show_leaf_name = False
ts.show_scale = False
ts.show_branch_length = False
ts.branch_vertical_margin = 20
ts.force_topology = True
ts.optimal_scale_level = "full"
ts.scale = 50
ts.draw_guiding_lines = True
ts.guiding_lines_type = 0
ts.guiding_lines_color = "black"
for n in t.traverse():
if not n.is_leaf():
nstyle = NodeStyle()
n.set_style(nstyle)
nstyle['size'] = 0
nstyle['hz_line_width'] = 3
nstyle['vt_line_width'] = 3
else:
nstyle = NodeStyle()
n.set_style(nstyle)
nstyle['size'] = 0
nstyle['hz_line_width'] = 3
nstyle['vt_line_width'] = 3
nstyle['fgcolor'] = "Black"
nstyle['shape'] = "square"
name_face = AttrFace("name", fsize=14, ftype="Arial", fgcolor="black", penwidth=10, text_prefix=" ", text_suffix=" ")
n.add_face(name_face, column=0, position="aligned")
row_index = rownames.tolist().index(n.name)
col = 1
for i in xrange(10):
col += 1
n.add_face(CircleFace(5, color=get_color(abund, row_index, i)), column=col, position="aligned")
return t, ts
def get_tree(tree_file, abund, rownames):
t, ts = get_tree_style(tree_file, abund, rownames)
return t, ts
def read_data_file(file):
data = []
rownames = []
f = open(file)
for line in f:
d = line.rstrip().split("\t")
rownames.append(d[0])
data.append([int(i) for i in d[1:]])
return numpy.array(data), numpy.array(rownames)
def get_column(matrix, i):
return numpy.array([int(row[i]) for row in matrix])
def main():
dir = "/Users/chris/projects/bsim4/test/"
tree_file = os.path.join(dir, "tree_8_1000_0.txt")
abund_file = os.path.join(dir, "abund_1000_0_0.txt")
gap_file = os.path.join(dir, "gap_1000_0_0.txt")
abund, abund_names = read_data_file(abund_file)
gap, gap_names = read_data_file(gap_file)
tree, tree_style = get_tree(tree_file, abund, abund_names)
# tree.show(tree_style=tree_style)
tree.render("sim_tree.pdf", tree_style=tree_style)
if __name__ == '__main__':
main()
|
[
"cfriedline@vcu.edu"
] |
cfriedline@vcu.edu
|
1353f3961676958e592cf32649e52eeefe94fb13
|
45100ef7950cbac271695d3dc7fe80ae30dec437
|
/NSRDB_analysis.py
|
de2e361d277fc3841ef34f349ecf1dcf5bf1baeb
|
[] |
no_license
|
shafferpr/solar_radiation_database
|
635e628700c69b6dff258e95e310e7952629b88d
|
113a80bf25a1cd4db0a8d9124d70b867b38cca51
|
refs/heads/master
| 2021-01-23T05:44:49.555014
| 2017-05-31T20:04:22
| 2017-05-31T20:04:22
| 92,983,996
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,218
|
py
|
#! /usr/local/bin/python
import os
import sys
import string
import requests
import json
import numpy as np
import pandas as ps
import math
from bokeh.plotting import figure, output_file, show
from dateutil.parser import parse
def createDateTimeFigure(repoString):
payload = {}
r=requests.get('https://api.github.com/repos/'+repoString+'/commits', auth=('shafferpr@gmail.com','chem1633'), params=payload)
myList = []
for i in range (len(r.json())):
myList.append(r.json()[i]['sha'])
q=[]
for i in range (len(myList)):
q.append(requests.get('https://api.github.com/repos/'+repoString+'/commits/'+myList[i],auth=('shafferpr@gmail.com','chem1633'), params=payload))
x=[]
for i in range(len(q)):
x.append(parse(q[i].json()['commit']['author']['date']))
y=[]
for i in range(len(q)):
y.append(q[i].json()['stats']['total'])
output_file("./static/plot.html")
p = figure(title="commit size over time", x_axis_label='date of commit', y_axis_label='size of commit', x_axis_type="datetime")
p.line(x, y, legend=repoString, line_width=2, line_color="blue")
show(p)
return p
#createDateTimeFigure("tensorflow/tensorflow")
|
[
"shafferpr@gmail.com"
] |
shafferpr@gmail.com
|
3add1f213eb7b59613b0794ec7004fc7996b804b
|
4ea06addb40da22573bbfb4a0253406b564ae2cd
|
/test38Simp.py
|
137aa3fb83a348e62d47974376e5c4c3d9cc0113
|
[] |
no_license
|
AldyColares/Projetos_MNii
|
5eff276daf7f7139b8875fb20bfa405af44639a9
|
43dc45cb2a7890837257f36934d0d32b5e40fc67
|
refs/heads/master
| 2016-09-11T05:48:43.756753
| 2014-03-21T14:50:45
| 2014-03-21T14:50:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 664
|
py
|
import re
arquivo = open("arquivo1.txt")
m = int(arquivo.readline().rstrip('\n'))
txt = arquivo.read()
print "grau =",m
print "\nxi\tf(xi)"
print txt
dados = map(float, re.split('\t|\n',txt))
arquivo.close()
a = dados[0]
b = dados[m*2]
fx0 = dados[1]
fxm = dados[m*2+1]
h = (b - a)/m
L = range(m+1)
i=1
j=0
S1=0
S2=0
k=1
while ( i <= m*2+1 ):
L[j] = dados[i]
i = i+2
j = j+1
while(k<m):
if int(k) % 3 == 0:
S1 = S1 + L[k]
else:
S2 = S2 + L[k]
k = k+1
I = (3*h/8)*(fx0 + fxm + 3*S2 + 2*S1)
print "\na =",a
print "b =",b
print "h =",h
print "f(x0) =",fx0
print "f(xm) =",fxm
print "Somatorio de impar =",S2
print "Somatorio de par =",S1
print "\nI =",I
|
[
"dyego@alu.ufc.br"
] |
dyego@alu.ufc.br
|
a20ec095f9065df80a1ba32f675716abe0875c05
|
26c4426d2c9cd10fd7d4a73609512e69e31b64ba
|
/justone/mayflower/products/forms.py
|
452a35e79f1ecaab5846dfb47812af7c3869b763
|
[] |
no_license
|
KirillUdod/html2exc
|
550761213eb6edd7d3ea4787938cce65584606c3
|
60569f01822a15b2e5b6884a42774cd428953700
|
refs/heads/master
| 2021-01-15T17:07:05.906492
| 2016-01-06T11:51:38
| 2016-01-06T11:51:38
| 34,809,072
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,453
|
py
|
from django import forms
from products.models import Bouquet
class DependenciesForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(DependenciesForm, self).__init__(*args, **kwargs)
instance = getattr(self, 'instance', None)
dependencies = getattr(self.Meta.model, 'dependencies', {})
if isinstance(dependencies, dict):
for (depend_field, depend_field_value), fields in dependencies.iteritems():
if not isinstance(self.fields[depend_field], forms.BooleanField)\
and not getattr(self.fields[depend_field], 'choices', None):
raise ValueError()
if not isinstance(fields, (list, tuple)):
fields = [fields]
required = False
if self.data:
post_value = self.data.get(self.add_prefix(depend_field))
if post_value == 'on' and isinstance(depend_field_value, bool):
post_value = 'True'
if post_value == unicode(depend_field_value):
required = True
elif instance and getattr(instance, depend_field, None) == depend_field_value:
required = True
for field in fields:
self.fields[field].required = required
class BouquetAdminForm(DependenciesForm):
class Meta:
model = Bouquet
|
[
"kirilludod@gmail.com"
] |
kirilludod@gmail.com
|
b19d04a16672a6e82ef0ac5031a632a46feb1e78
|
bb150497a05203a718fb3630941231be9e3b6a32
|
/framework/api/nn/test_dynamicdecode.py
|
3dfc0093a772141b2e3a8044746f517ce9ae1b98
|
[] |
no_license
|
PaddlePaddle/PaddleTest
|
4fb3dec677f0f13f7f1003fd30df748bf0b5940d
|
bd3790ce72a2a26611b5eda3901651b5a809348f
|
refs/heads/develop
| 2023-09-06T04:23:39.181903
| 2023-09-04T11:17:50
| 2023-09-04T11:17:50
| 383,138,186
| 42
| 312
| null | 2023-09-13T11:13:35
| 2021-07-05T12:44:59
|
Python
|
UTF-8
|
Python
| false
| false
| 20,209
|
py
|
#!/bin/env python
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test paddle.nn.dynamic_decode
"""
import random
import paddle
from apibase import compare
import pytest
import numpy as np
from paddle.nn import BeamSearchDecoder, dynamic_decode
from paddle.nn import GRUCell, Linear, Embedding, LSTMCell
from paddle.nn import TransformerDecoderLayer, TransformerDecoder
np.random.seed(2)
random.seed(2)
paddle.seed(2)
class ModelGRUCell4(paddle.nn.Layer):
"""
GRUCell model
"""
def __init__(self):
"""
initialize
"""
super(ModelGRUCell4, self).__init__()
self.trg_embeder = Embedding(100, 32)
self.output_layer = Linear(32, 32)
self.decoder_cell = GRUCell(input_size=32, hidden_size=32)
self.decoder = BeamSearchDecoder(
self.decoder_cell,
start_token=0,
end_token=1,
beam_size=4,
embedding_fn=self.trg_embeder,
output_fn=self.output_layer,
)
def forward(self):
"""
forward
"""
encoder_output = paddle.ones((4, 8, 32), dtype=paddle.get_default_dtype())
outputs = dynamic_decode(
decoder=self.decoder, inits=self.decoder_cell.get_initial_states(encoder_output), max_step_num=10
)
return outputs[0]
class ModelGRUCell5(paddle.nn.Layer):
"""
GRUCell model1
"""
def __init__(self):
"""
initialize
"""
super(ModelGRUCell5, self).__init__()
self.trg_embeder = Embedding(100, 32)
self.output_layer = Linear(32, 32)
self.decoder_cell = GRUCell(input_size=32, hidden_size=32)
self.decoder = BeamSearchDecoder(
self.decoder_cell,
start_token=0,
end_token=1,
beam_size=4,
embedding_fn=self.trg_embeder,
output_fn=self.output_layer,
)
def forward(self):
"""
forward
"""
encoder_output = paddle.ones((4, 8, 32), dtype=paddle.get_default_dtype())
outputs = dynamic_decode(
decoder=self.decoder,
inits=self.decoder_cell.get_initial_states(encoder_output),
output_time_major=True,
max_step_num=10,
)
return outputs[0]
class ModelGRUCell6(paddle.nn.Layer):
"""
GRUCell model2
"""
def __init__(self):
"""
initialize
"""
super(ModelGRUCell6, self).__init__()
self.trg_embeder = Embedding(100, 32)
self.output_layer = Linear(32, 32)
self.decoder_cell = GRUCell(input_size=32, hidden_size=32)
self.decoder = BeamSearchDecoder(
self.decoder_cell,
start_token=0,
end_token=1,
beam_size=4,
embedding_fn=self.trg_embeder,
output_fn=self.output_layer,
)
def forward(self):
"""
forward
"""
encoder_output = paddle.ones((4, 8, 32), dtype=paddle.get_default_dtype())
outputs = dynamic_decode(
decoder=self.decoder,
inits=self.decoder_cell.get_initial_states(encoder_output),
is_test=True,
max_step_num=10,
)
return outputs[0]
class ModelGRUCell7(paddle.nn.Layer):
"""
GRUCell model3
"""
def __init__(self):
"""
initialize
"""
super(ModelGRUCell7, self).__init__()
self.trg_embeder = Embedding(100, 32)
self.output_layer = Linear(32, 32)
self.decoder_cell = GRUCell(input_size=32, hidden_size=32)
self.decoder = BeamSearchDecoder(
self.decoder_cell,
start_token=0,
end_token=1,
beam_size=4,
embedding_fn=self.trg_embeder,
output_fn=self.output_layer,
)
def forward(self):
"""
forward
"""
encoder_output = paddle.ones((4, 8, 32), dtype=paddle.get_default_dtype())
outputs = dynamic_decode(
decoder=self.decoder,
inits=self.decoder_cell.get_initial_states(encoder_output),
impute_finished=True,
max_step_num=10,
)
return outputs[0]
class ModelGRUCell8(paddle.nn.Layer):
"""
GRUCell model4
"""
def __init__(self):
"""
initialize
"""
super(ModelGRUCell8, self).__init__()
self.trg_embeder = Embedding(100, 32)
self.output_layer = Linear(32, 32)
self.decoder_cell = GRUCell(input_size=32, hidden_size=32)
self.decoder = BeamSearchDecoder(
self.decoder_cell,
start_token=0,
end_token=1,
beam_size=4,
embedding_fn=self.trg_embeder,
output_fn=self.output_layer,
)
def forward(self):
"""
forward
"""
encoder_output = paddle.ones((4, 8, 32), dtype=paddle.get_default_dtype())
outputs = dynamic_decode(
decoder=self.decoder,
inits=self.decoder_cell.get_initial_states(encoder_output),
return_length=True,
max_step_num=10,
)
return outputs[2]
class ModelLSTMCell1(paddle.nn.Layer):
"""
LSTMCell model
"""
def __init__(self):
"""
initialize
"""
super(ModelLSTMCell1, self).__init__()
self.trg_embeder = Embedding(100, 32)
self.output_layer = Linear(32, 32)
self.decoder_cell = LSTMCell(input_size=32, hidden_size=32)
self.decoder = BeamSearchDecoder(
self.decoder_cell,
start_token=0,
end_token=1,
beam_size=4,
embedding_fn=self.trg_embeder,
output_fn=self.output_layer,
)
def forward(self):
"""
forward
"""
encoder_output = paddle.ones((4, 8, 32), dtype=paddle.get_default_dtype())
outputs = dynamic_decode(
decoder=self.decoder, inits=self.decoder_cell.get_initial_states(encoder_output), max_step_num=10
)
return outputs[0]
class ModelLSTMCell2(paddle.nn.Layer):
"""
LSTMCell model1
"""
def __init__(self):
"""
initialize
"""
super(ModelLSTMCell2, self).__init__()
self.trg_embeder = Embedding(100, 16)
self.output_layer = Linear(16, 16)
self.decoder_cell = LSTMCell(input_size=16, hidden_size=16)
self.decoder = BeamSearchDecoder(
self.decoder_cell,
start_token=0,
end_token=1,
beam_size=4,
embedding_fn=self.trg_embeder,
output_fn=self.output_layer,
)
def forward(self):
"""
forward
"""
encoder_output = paddle.ones((4, 4, 16), dtype=paddle.get_default_dtype())
outputs = dynamic_decode(
decoder=self.decoder, inits=self.decoder_cell.get_initial_states(encoder_output), max_step_num=10
)
return outputs[0]
class ModelLSTMCell3(paddle.nn.Layer):
"""
LSTMCell model2
"""
def __init__(self):
"""
initialize
"""
super(ModelLSTMCell3, self).__init__()
self.trg_embeder = Embedding(100, 32)
self.output_layer = Linear(32, 32)
self.decoder_cell = LSTMCell(input_size=32, hidden_size=32)
self.decoder = BeamSearchDecoder(
self.decoder_cell,
start_token=0,
end_token=1,
beam_size=4,
embedding_fn=self.trg_embeder,
output_fn=self.output_layer,
)
def forward(self):
"""
forward
"""
encoder_output = paddle.ones((4, 8, 32), dtype=paddle.get_default_dtype())
outputs = dynamic_decode(
decoder=self.decoder, inits=self.decoder_cell.get_initial_states(encoder_output), max_step_num=5
)
return outputs[0]
@pytest.mark.api_nn_dynamic_decode_parameters
def test_dynamic_decode0():
"""
GRUCell
"""
# paddle.seed(33)
m = ModelGRUCell4()
a = paddle.load("model/model_grucell4")
m.set_state_dict(a)
res = [
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
]
compare(m().numpy(), res)
@pytest.mark.api_nn_dynamic_decode_parameters
def test_dynamic_decode1():
"""
change the decoder cell to LSTMCell
"""
m = ModelLSTMCell1()
a = paddle.load("model/model_lstmcell1")
m.set_state_dict(a)
res = [
[
[4, 4, 22, 4],
[4, 4, 4, 4],
[30, 20, 20, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 20],
],
[
[4, 4, 22, 4],
[4, 4, 4, 4],
[30, 20, 20, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 20],
],
[
[4, 4, 22, 4],
[4, 4, 4, 4],
[30, 20, 20, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 20],
],
[
[4, 4, 22, 4],
[4, 4, 4, 4],
[30, 20, 20, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 30],
[30, 30, 30, 20],
],
]
compare(m().numpy(), res)
@pytest.mark.api_nn_dynamic_decode_parameters
def test_dynamic_decode2():
"""
change the input size
"""
m = ModelLSTMCell2()
a = paddle.load("model/model_lstmcell2")
m.set_state_dict(a)
res = [
[
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 9, 9],
[4, 9, 9, 4],
],
[
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 9, 9],
[4, 9, 9, 4],
],
[
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 9, 9],
[4, 9, 9, 4],
],
[
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 4, 4],
[4, 4, 9, 9],
[4, 9, 9, 4],
],
]
compare(m().numpy(), res)
@pytest.mark.api_nn_dynamic_decode_parameters
def test_dynamic_decode3():
"""
change the max_step_num
"""
m = ModelLSTMCell3()
a = paddle.load("model/model_lstmcell3")
m.set_state_dict(a)
res = [
[[4, 4, 22, 4], [4, 4, 4, 4], [30, 20, 20, 30], [30, 30, 30, 30], [30, 30, 30, 30], [30, 30, 30, 20]],
[[4, 4, 22, 4], [4, 4, 4, 4], [30, 20, 20, 30], [30, 30, 30, 30], [30, 30, 30, 30], [30, 30, 30, 20]],
[[4, 4, 22, 4], [4, 4, 4, 4], [30, 20, 20, 30], [30, 30, 30, 30], [30, 30, 30, 30], [30, 30, 30, 20]],
[[4, 4, 22, 4], [4, 4, 4, 4], [30, 20, 20, 30], [30, 30, 30, 30], [30, 30, 30, 30], [30, 30, 30, 20]],
]
compare(m().numpy(), res)
@pytest.mark.api_nn_dynamic_decode_parameters
def test_dynamic_decode4():
"""
set the output_time_major True
"""
m = ModelGRUCell5()
a = paddle.load("model/model_grucell5")
m.set_state_dict(a)
res = [
[[23, 23, 23, 23], [23, 23, 23, 23], [23, 23, 23, 23], [23, 23, 23, 23]],
[[9, 23, 9, 9], [9, 23, 9, 9], [9, 23, 9, 9], [9, 23, 9, 9]],
[[9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9]],
[[9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9]],
[[9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9]],
[[9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9]],
[[9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9]],
[[9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9]],
[[9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9]],
[[9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9], [9, 9, 9, 9]],
[[9, 9, 23, 27], [9, 9, 23, 27], [9, 9, 23, 27], [9, 9, 23, 27]],
]
compare(m().numpy(), res)
@pytest.mark.api_nn_dynamic_decode_parameters
def test_dynamic_decode5():
"""
set the is_test True
"""
m = ModelGRUCell6()
a = paddle.load("model/model_grucell6")
m.set_state_dict(a)
res = [
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
]
compare(m().numpy(), res)
@pytest.mark.api_nn_dynamic_decode_parameters
def test_dynamic_decode6():
"""
set the impute_finished True
"""
m = ModelGRUCell7()
a = paddle.load("model/model_grucell7")
m.set_state_dict(a)
res = [
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
[
[23, 23, 23, 23],
[9, 23, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 9, 9],
[9, 9, 23, 27],
],
]
compare(m().numpy(), res)
@pytest.mark.api_nn_dynamic_decode_parameters
def test_dynamic_decode7():
"""
set the return_length True
"""
m = ModelGRUCell8()
a = paddle.load("model/model_grucell8")
m.set_state_dict(a)
res = [[11, 11, 11, 11], [11, 11, 11, 11], [11, 11, 11, 11], [11, 11, 11, 11]]
compare(m().numpy(), res)
@pytest.mark.api_nn_dynamic_decode_exception
def test_dynamic_decode10():
"""
Decoder type error
"""
decoder_cell = LSTMCell(input_size=32, hidden_size=32)
output_layer = TransformerDecoderLayer(32, 2, 128)
decoder = TransformerDecoder(output_layer, 2)
encoder_output = paddle.ones((4, 8, 32), dtype=paddle.get_default_dtype())
try:
dynamic_decode(decoder=decoder, inits=decoder_cell.get_initial_states(encoder_output), max_step_num=10)
except Exception as e:
# print(e)
if "object has no attribute 'initialize'" in e.args[0]:
pass
else:
raise Exception
@pytest.mark.skip(reason="RD代码异常改变,此Case会报错,暂时跳过")
@pytest.mark.api_nn_dynamic_decode_exception
def test_dynamic_decode11():
"""
No parameters passed to inits
"""
paddle.seed(33)
trg_embeder = Embedding(100, 32)
output_layer = Linear(32, 32)
decoder_cell = GRUCell(input_size=32, hidden_size=32)
decoder = BeamSearchDecoder(
decoder_cell, start_token=0, end_token=1, beam_size=4, embedding_fn=trg_embeder, output_fn=output_layer
)
try:
dynamic_decode(decoder=decoder, max_step_num=5)
except Exception as e:
# print(e)
error = "'NoneType' object has no attribute 'dtype'"
if error in e.args[0]:
pass
else:
raise Exception
@pytest.mark.skip(reason="RD代码异常改变,此Case会报错,暂时跳过")
@pytest.mark.api_nn_dynamic_decode_exception
def test_dynamic_decode12():
"""
the size of inits mismatch the size of the decoder
"""
paddle.seed(33)
trg_embeder = Embedding(100, 32)
output_layer = Linear(32, 32)
decoder_cell = LSTMCell(input_size=32, hidden_size=32)
decoder = BeamSearchDecoder(
decoder_cell, start_token=0, end_token=1, beam_size=4, embedding_fn=trg_embeder, output_fn=output_layer
)
encoder_output = paddle.ones((4, 8, 32), dtype=paddle.get_default_dtype())
decoder_initial_states = [
decoder_cell.get_initial_states(encoder_output, shape=[16]),
decoder_cell.get_initial_states(encoder_output, shape=[16]),
]
try:
dynamic_decode(decoder=decoder, inits=decoder_initial_states, max_step_num=5)
except Exception as e:
if "[operator < matmul_v2 > error]" in e.args[0]:
pass
else:
raise Exception
|
[
"noreply@github.com"
] |
PaddlePaddle.noreply@github.com
|
dc6dfa3596c32270087a4264ab9fb490ee5ddcba
|
089a6a7c51af5ca5b28282e9370bd1fc97ff94b5
|
/superhero_database/heroes/views.py
|
a2614fcd574ebbe99743b2e8002c8b43a032cc59
|
[] |
no_license
|
plumtree87/superheroes
|
95bedd4c354373d15bcea5eae770e4ea368adb35
|
0192a304676cb63de859a61ef9493d8473e7c5c9
|
refs/heads/main
| 2023-03-29T10:02:12.859584
| 2021-04-08T15:26:53
| 2021-04-08T15:26:53
| 355,323,644
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,399
|
py
|
from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from .models import Hero
from django.urls import reverse
# Create your views here.
def index(request):
all_heroes = Hero.objects.all()
context = {
'all_heroes': all_heroes
}
return render(request, 'heroes/index.html', context)
def detail(request, hero_id):
details = Hero.objects.get(pk=hero_id)
context = {
'details': details
}
return render(request, 'heroes/detail.html', context)
def create(request):
if request.method == 'POST':
name = request.POST.get('name')
alter_ego = request.POST.get('alter_ego')
primary_ability = request.POST.get('primary_ability')
secondary_ability = request.POST.get('secondary_ability')
catch_phrase = request.POST.get('catch_phrase')
new_hero = Hero(name=name, alter_ego=alter_ego, primary_ability=primary_ability, secondary_ability=secondary_ability, catch_phrase=catch_phrase)
new_hero.save()
return HttpResponseRedirect(reverse('heroes:index'))
else:
return render(request, 'heroes/create.html')
def edit(request, hero_id):
if request.method == 'POST':
details = Hero.objects.get(pk=hero_id)
name = request.POST.get('name')
alter_ego = request.POST.get('alter_ego')
primary_ability = request.POST.get('primary_ability')
secondary_ability = request.POST.get('secondary_ability')
catch_phrase = request.POST.get('catch_phrase')
details.name = name
details.alter_ego = alter_ego
details.primary_ability = primary_ability
details.secondary_ability = secondary_ability
details.catch_phrase = catch_phrase
details.save()
return HttpResponseRedirect(reverse('heroes:index'))
else:
details = Hero.objects.get(pk=hero_id)
context = {
'details': details
}
return render(request, 'heroes/edit.html', context)
def delete(request, hero_id):
if request.method == 'POST':
details = Hero.objects.get(pk=hero_id)
details.delete()
return HttpResponseRedirect(reverse('heroes:index'))
else:
details = Hero.objects.get(pk=hero_id)
context = {
'details': details
}
return render(request, 'heroes/delete.html', context)
|
[
"plumtree87@protonmail.com"
] |
plumtree87@protonmail.com
|
dd68bda41f4ec18bcbffcfb66e2ae4ecf26a052d
|
a661e08f57b572b6b4e0b3f54b6bc6db81f689aa
|
/requestget.py
|
739aafc3585aec2ab3fd35be36e36201caeecd12
|
[] |
no_license
|
absentfriend/Channel
|
ca7f8f336b85a2ca0db2bd12ac496627d474f883
|
0bec6d447632ecb05edcd2fd019a900dab8d0bd7
|
refs/heads/master
| 2022-07-09T14:35:15.697345
| 2022-06-21T22:39:28
| 2022-06-21T22:39:28
| 194,481,970
| 0
| 0
| null | 2019-06-30T06:13:21
| 2019-06-30T06:13:21
| null |
UTF-8
|
Python
| false
| false
| 555
|
py
|
import requests
headers = {'Referer': 'http://m.91kds.org/jiemu_sdqdtv1.html',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36'}
def geturl(url,headers):
r=requests.get(url,headers=headers)
r.encoding='utf-8'
#r.encoding='GB2312'
r=r.text
#print(r)
return r
def posturl(url,data,headers=headers):
r=requests.post(url,json=data,headers=headers)
r.encoding='utf-8'
#r.encoding='GB2312'
r=r.text
#print(r)
return r
|
[
"43053658+YaozhiweiGit@users.noreply.github.com"
] |
43053658+YaozhiweiGit@users.noreply.github.com
|
2ce099f6946ba532a45dc0075b0918ffcbeff559
|
bd50532e0c0ca5fd6d5c1f389a5f98787736e170
|
/Symmetric Tree.py
|
b0a05dc2fcad4bbe3156161354e99b4fa56b5535
|
[
"MIT"
] |
permissive
|
chyavan-mc/My-Solutions-to-Leetcode-problems-using-Python-3
|
eec8bce6456e33776e3565ced8e87b94e75b1f19
|
b78779bd3f5313ab4752f9e9a23cb4a93805aff6
|
refs/heads/master
| 2022-08-29T16:49:30.227034
| 2019-01-17T05:47:54
| 2019-01-17T05:47:54
| 145,867,402
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 666
|
py
|
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def isSymmetric(self, root):
"""
:type root: TreeNode
:rtype: bool
"""
ptr = root
if(ptr==None):
return True
return self.CheckSym(ptr,ptr)
def CheckSym(self,x,y):
if(x==None and y==None):
return True
elif(x!=None and y!=None):
if(x.val==y.val):
return self.CheckSym(x.left,y.right) and self.CheckSym(x.right,y.left)
return False
|
[
"noreply@github.com"
] |
chyavan-mc.noreply@github.com
|
ec1d8c4d661870efcce6dd2ea0b18baee2087b45
|
f21109a5c23340447d0e3d34f14299c30e49d023
|
/Dynamic Programming/11. Longest Common Subsequence.py
|
a8f0e898a3fad5f7001ac206032d7ee02a013de3
|
[] |
no_license
|
ShashankSinha98/FAANG-Questions
|
45366004c3176a3c11ef554a25a11fe21e53ebca
|
73ef742b3747e89d32d384baa6acf35044bf3ce0
|
refs/heads/master
| 2022-12-21T09:42:51.796086
| 2020-09-24T08:24:47
| 2020-09-24T08:24:47
| 286,765,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 598
|
py
|
t = int(input())
def common_lcs(str1,n,str2,m):
dp = [[0]*(m+1) for i in range(n+1)]
for i in range(1,n+1):
for j in range(1,m+1):
if str1[i-1]==str2[j-1]:
dp[i][j] = dp[i-1][j-1] + 1
else:
dp[i][j] = max(dp[i-1][j],dp[i][j-1])
return dp[n][m]
def display(arr):
for i in arr:
for j in i:
print(j,end=" ")
print()
print()
while t!=0:
t-=1
n,m = [int(i) for i in input().split()]
str1 = input()
str2 = input()
res = common_lcs(str1,n,str2,m)
print(res)
|
[
"34626597+ShashankSinha98@users.noreply.github.com"
] |
34626597+ShashankSinha98@users.noreply.github.com
|
86ef3bfdb2fb1c55d0cd8cefb61f7f2d7e42c78c
|
009a73adacda072e6241965ff0c589e1fff92aa4
|
/CreateConnections.py
|
92293021753f3c40cb89638383829da70da84cfb
|
[] |
no_license
|
bernhardkaplan/OculomotorControl
|
0dc24095c813a25856ed9556b8a250e10952e88e
|
ac0b5261a3c3617e3f72f9ffd8e5515270f80fb9
|
refs/heads/master
| 2021-01-01T17:22:19.117464
| 2013-09-03T10:53:32
| 2013-09-03T10:53:32
| 10,267,811
| 0
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 347
|
py
|
class CreateConnections(object):
def __init__(self, params):
self.params = params
def connect_mt_to_bg(self, src_net, tgt_net):
"""
The NEST simulation should run for some pre-fixed time
Keyword arguments:
src_net, tgt_net -- the source and the target network
"""
pass
|
[
"Bernhard.Kaplan@gmail.com"
] |
Bernhard.Kaplan@gmail.com
|
569d33d3a9b9c3cd4c1091378db6fb048a872c82
|
76931db41954de1e7314ee0d3f4ce296e69a2f00
|
/src/main.py
|
16e4ceeee88e14b0404de8b1a76ddaac5f201391
|
[] |
no_license
|
graciehao25/Insight_coding_practice
|
6b0c9e39f01ecad993258fc29b65dc5f9b3e6957
|
5267856066dc05ab65f786426e7b8b9b31f37b44
|
refs/heads/master
| 2020-04-03T13:39:04.533029
| 2018-10-30T21:59:02
| 2018-10-30T21:59:02
| 155,291,892
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,186
|
py
|
import csv
import sys
from collections import Counter
from get_idx import get_idx
from get_feature_list import get_feature_list
from a_list_of_top_X_sorted_feature_dict import a_list_of_top_X_sorted_feature_dict
from write_output_csv import write_output_csv
def main(INPUT, OUTPUT0, OUTPUT1):
"""
Main function contains six steps:
1. figure out the column indices of the a list of features
2. filter the dataframe by status, create a list for each feature.
3. Create frequency dictionary for each feature
4. Sort dictionary by vaule(desc) and alphabet(asc)
5. crop the dictionary and keep only TOP X
6. Save the output
Inputs of the main function:
1. an INPUT csv file of interests
2. OUTPUT0 named 'top_10_occupations.txt'
3. OUTPUT1 named 'top_10_states.txt'
The main funciton will call two other functions I wrote stored under the src folder:
1. get_idx to get the indices for the filter variable and features
2. feature_list to filter the dataframe by status, create a list for each feature.
"""
# Specs user can customize
X=10
filter_str="STATUS"
filter_condition="CERTIFIED"
features_list=["SOC_NAME","WORKSITE_STATE"]
a_list_of_output_paths = [OUTPUT0, OUTPUT1]
output_cols_1=["TOP_OCCUPATIONS", "NUMBER_CERTIFIED_APPLICATIONS", "PERCENTAGE"]
output_cols_2=["TOP_STATES", "NUMBER_CERTIFIED_APPLICATIONS", "PERCENTAGE"]
output_cols= [output_cols_1,output_cols_2]
"""
idx in the original data file
assuming the filter variable is "STATUS", and st
get the filter variable index and a list of feature indices
"""
filter_idx,features_idx=get_idx(INPUT,filter_str,features_list)
"""
iterate through the list of features user provided in main.py
"""
num_of_entries, a_list_of_top_x_dicts=a_list_of_top_X_sorted_feature_dict(INPUT,filter_idx,filter_condition,features_idx,X)
write_output_csv(num_of_entries,a_list_of_top_x_dicts,a_list_of_output_paths)
if __name__ == '__main__':
INPUT = sys.argv[1]
OUTPUT0 = sys.argv[2]
OUTPUT1 = sys.argv[3]
main(INPUT, OUTPUT0, OUTPUT1)
|
[
"graciehao25@gmail.com"
] |
graciehao25@gmail.com
|
f6813e579cbf76ee872102859d44f28c4c47746b
|
ca7aa979e7059467e158830b76673f5b77a0f5a3
|
/Python_codes/p03107/s767358209.py
|
f9a07c556a610f1f56bccfb4d8bc42ed0285d230
|
[] |
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
| 83
|
py
|
s = input()
red = s.count("0")
blue = s.count("1")
num = min(red,blue)
print(num*2)
|
[
"66529651+Aastha2104@users.noreply.github.com"
] |
66529651+Aastha2104@users.noreply.github.com
|
702f47e3a48767738613e267a62b0f5477021049
|
0a68928bfcada2bb4803068ffe1175556aa06883
|
/Code Examples/doc_replacement.py
|
3bcab05b05cddf602d1acbd73c8b57e666dd8687
|
[
"Apache-2.0"
] |
permissive
|
shannonsands/StoryNode
|
a487a94ea7dc101f1209bdf548a3ed7a57607b5e
|
e863e68e4b95b92a074554c2399492dbfb54cbab
|
refs/heads/main
| 2023-04-24T16:06:10.473740
| 2021-05-16T23:10:16
| 2021-05-16T23:10:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 746
|
py
|
import spacy
from spacy.matcher import Matcher
import sys
def main(argv):
nlp = spacy.load("en_core_web_sm")
matcher = Matcher(nlp.vocab)
# Add match ID "HelloWorld" with no callback and one pattern
pattern = [{"LOWER": "hello"}, {"IS_PUNCT": True}, {"LOWER": "world"}]
matcher.add("HelloWorld", [pattern])
doc = nlp("Hello, world! Hello world!")
matches = matcher(doc)
for match_id, start, end in matches:
string_id = nlp.vocab.strings[match_id] # Get string representation
span = doc[start:end] # The matched span
print(match_id, string_id, start, end, span.text)
for token in doc:
print(token)
print(doc[0:5])
if __name__ == "__main__":
main(sys.argv)
|
[
"seadav.17@gmail.com"
] |
seadav.17@gmail.com
|
b7c78da890d1c759f77537a7e6faae7e4377540e
|
8e53fa0b67e2268b912ad09a41356b622fff715d
|
/uniquee.py
|
e60f09ef22cdf16401ac8e1c5abde45851359d09
|
[] |
no_license
|
Dhathri29/Guvi-Sessions
|
a0962212e8f6e95429de101f2b03bd3ab500baee
|
3a0a6c78b82420b518eca167e4a7c79c75e1d6f0
|
refs/heads/master
| 2020-04-30T15:34:21.454160
| 2019-07-23T12:01:47
| 2019-07-23T12:01:47
| 176,923,992
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 350
|
py
|
def Repeat(x):
_size=len(x)
repeated=[]
for i in range(_size):
k=i+1
for j in range(k,_size):
if x[i]==x[j] and x[i] not in repeated:
repeated.append(x[i])
return repeated
repeated.sort()
print(repeated)
n=int(input())
list1=list(map(int,input().split()))
print (Repeat(list1))
|
[
"noreply@github.com"
] |
Dhathri29.noreply@github.com
|
446d6d7faa595deb53a808126c8a2aced62533ca
|
00b86f883694b17575a514227960b963d3b6179b
|
/Analysis/python/regions.py
|
fd5293018c7e89c2e26d88fe5e64bddca3efeb61
|
[] |
no_license
|
HephyAnalysisSW/TTZRun2EFT
|
1b33a6bad49d0d6e119e49c74faa35dee0e4bb0e
|
730a7465d4cbde52649965ed0e2a5b29bcc309c3
|
refs/heads/master
| 2020-04-30T16:40:46.454225
| 2019-04-18T08:09:46
| 2019-04-18T08:09:46
| 176,956,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,950
|
py
|
from TTZRun2EFT.Analysis.Region import Region
from TTZRun2EFT.Analysis.Region import texString
from TTZRun2EFT.Analysis.Region import allowedVars
from math import pi
def getRegionsFromThresholds(var, vals, gtLastThreshold = True):
return [Region(var, (vals[i], vals[i+1])) for i in range(len(vals)-1)]
def getRegions2D(varOne, varOneThresholds, varTwo, varTwoThresholds):
regions_varOne = getRegionsFromThresholds(varOne, varOneThresholds)
regions_varTwo = getRegionsFromThresholds(varTwo, varTwoThresholds)
regions2D = []
for r1 in regions_varOne:
for r2 in regions_varTwo:
regions2D.append(r1+r2)
return regions2D
def simpleStringToDict( simpleString ):
# replace variables by a string not containing "_"
for i, var in enumerate(allowedVars):
simpleString = simpleString.replace(var, "var%i"%i)
cutList = simpleString.split("_")
# convert simpleString to threshold tuple, fill in dict
cutDict = {}
for cut in cutList:
for i, var in enumerate(allowedVars):
if "var"+str(i) in cut:
cutRange = cut.replace("var%i"%i, "")
cutRange = cutRange.split("To")
cutRange = tuple( map( float, cutRange ) )
if len(cutRange) == 1: cutRange = ( cutRange[0], -1 )
cutDict.update( {var:cutRange} )
return cutDict
def dictToCutString( dict ):
res=[]
for var in dict.keys():
svar = var
s1=svar+">="+str(dict[var][0])
if dict[var][1]>-1: s1+="&&"+svar+"<"+str(dict[var][1])
res.append(s1)
return "&&".join(res)
def simpleStringToCutString( cutString ):
return dictToCutString( simpleStringToDict( cutString ) )
#Put all sets of regions that are used in the analysis, closure, tables, etc.
#differencial
thresholds = [ 20, 120, 220, 320, 420, -999 ]
genTTZRegions = getRegionsFromThresholds( "GenPhoton_pt[0]", thresholds )
|
[
"lukas.k.lechner@gmail.com"
] |
lukas.k.lechner@gmail.com
|
0fed34a34be9f0c7a478742d654290d73259c7fd
|
510765d4cc0bbb8e16a31acef5a619abae9cd736
|
/SML_project1_6.py
|
07ffb9ad85587f51947ccb985aebfacf878b605d
|
[] |
no_license
|
LzyloveRila/twitter-Authorship-attribution
|
e9c6435465bdc2076ffdc774e1a270537ec54356
|
7c062abd22633016fe5721ec7acc88a1a93aaf89
|
refs/heads/master
| 2020-07-23T10:09:42.192542
| 2019-09-16T10:11:37
| 2019-09-16T10:11:37
| 207,523,998
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,715
|
py
|
#!/usr/bin/env python
# coding: utf-8
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import CountVectorizer
import nltk
from nltk.tokenize import word_tokenize
from nltk.tokenize import TweetTokenizer
from sklearn.linear_model import SGDClassifier
from sklearn.pipeline import Pipeline
"""-----------------------------------------------------"""
# f=open('preprocessing_havestopword_part.txt')
f=open('lemmer_PosTag.txt')
Trainning_set = f.readlines()
tweets=[]
label=[]
for line in Trainning_set:
tweets.append(line.split("\t")[1])
label.append(line.split("\t")[0])
X_train, X_test, Y_train, Y_test = train_test_split(np.array(tweets), label, test_size=0.05, random_state=90051)
sample_split= "Training set has {} instances. Test set has {} instances.".format(X_train.shape[0], X_test.shape[0])
def my_tokenize(s):
tknzr = TweetTokenizer()
return tknzr.tokenize(s)
#return nltk.word_tokenize(s)
count_vect = CountVectorizer(tokenizer=my_tokenize,lowercase=False)
X_train_counts = count_vect.fit_transform(X_train)
X_train_counts_shape = "X_train_counts shape:",X_train_counts.shape
from sklearn.feature_extraction.text import TfidfTransformer
tf_transformer = TfidfTransformer(use_idf=False).fit(X_train_counts)
X_train_tf = tf_transformer.transform(X_train_counts)
tfidf_transformer = TfidfTransformer()
X_train_tfidf = tfidf_transformer.fit_transform(X_train_counts)
text_clf = Pipeline([('vect', CountVectorizer(tokenizer=my_tokenize)),
('tfidf', TfidfTransformer()),
('clf', SGDClassifier(loss='hinge', penalty='l2',alpha=1e-4,
random_state=42,max_iter=20, tol=None)),])
text_clf.fit(X_train, Y_train)
predicted = text_clf.predict(X_test)
accuracy = np.mean(predicted == Y_test)
print(accuracy)
# predict test data
f2=open('preprocess_lemm_test_postag.txt')
predict = []
predict = f2.readlines()
print(len(predict))
predicted = text_clf.predict(predict)
f2.close()
#output
f=open('1_6.txt','w')
for i in range(len(predicted)):
f.write(str(i)+","+str(predicted[i]))
f.write('\n')
f.close()
f1 = open('record1_4.txt','w')
f1.write("Training1: Preprocess:nostemmer,postag,twitter token; Feature:countervectorizer+tfidf"+
"Loss:hinge, max_iter:20, set_split:0.05")
# f1.write(sample_split)
# f1.write(X_train_counts_shape)
f1.write(str(accuracy))
# f1.write("predict length:",len(predict))
f1.close()
# # #save model to disk
# import pickle
# file_name = "BOW SGD1.sav"
# pickle.dump(text_clf,open(file_name,'wb'),protocol=4)
# # load the model from disk
# loaded_model = pickle.load(open(filename, 'rb'))
# result = loaded_model.score(X_test, Y_test)
# print(result)
|
[
"noreply@github.com"
] |
LzyloveRila.noreply@github.com
|
ebb96a9ed8fe8b1ad75429c27bcb2733a7ca3183
|
f4dcbcdfbafae47b8db5ef62701cc001bf044827
|
/utils.py
|
f71c46607d7a835be15ca1bcfe05e32c91240f45
|
[] |
no_license
|
sheriffab/Machine-learning
|
116dfed45aed4a889167b46566a12097e742ccb1
|
873177d2586a8843a9bd0ea0bec3bfaf4bb7806b
|
refs/heads/main
| 2023-06-11T08:33:41.101922
| 2021-06-25T04:18:41
| 2021-06-25T04:18:41
| 380,121,940
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 12,250
|
py
|
import pandas as pd
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.linear_model import LogisticRegression
from tensorflow import keras
from tensorflow.keras import layers
from sklearn.preprocessing import OneHotEncoder
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import GridSearchCV
def oneHotEncodeData(data_df):
# Make sure names are similar
data_df['t1_playerid'] = data_df['t1_playerid'].str.lower().str.strip().str.replace(" ","_")
data_df['t2_playerid'] = data_df['t2_playerid'].str.lower().str.strip().replace(" ","_")
data_df['t1p1_player'] = data_df['t1p1_player'].str.lower().str.strip().replace(" ","_")
data_df['t1p2_player'] = data_df['t1p2_player'].str.lower().str.strip().replace(" ","_")
data_df['t1p3_player'] = data_df['t1p3_player'].str.lower().str.strip().replace(" ","_")
data_df['t1p4_player'] = data_df['t1p4_player'].str.lower().str.strip().replace(" ","_")
data_df['t1p5_player'] = data_df['t1p5_player'].str.lower().str.strip().replace(" ","_")
data_df['t2p1_player'] = data_df['t2p1_player'].str.lower().str.strip().replace(" ","_")
data_df['t2p2_player'] = data_df['t2p2_player'].str.lower().str.strip().replace(" ","_")
data_df['t2p3_player'] = data_df['t2p3_player'].str.lower().str.strip().replace(" ","_")
data_df['t2p4_player'] = data_df['t2p4_player'].str.lower().str.strip().replace(" ","_")
data_df['t2p5_player'] = data_df['t2p5_player'].str.lower().str.strip().replace(" ","_")
data_df['t1p1_champion'] = data_df['t1p1_champion'].str.lower().str.strip().replace(" ","_")
data_df['t1p2_champion'] = data_df['t1p2_champion'].str.lower().str.strip().replace(" ","_")
data_df['t1p3_champion'] = data_df['t1p3_champion'].str.lower().str.strip().replace(" ","_")
data_df['t1p4_champion'] = data_df['t1p4_champion'].str.lower().str.strip().replace(" ","_")
data_df['t1p5_champion'] = data_df['t1p5_champion'].str.lower().str.strip().replace(" ","_")
data_df['t2p1_champion'] = data_df['t2p1_champion'].str.lower().str.strip().replace(" ","_")
data_df['t2p2_champion'] = data_df['t2p2_champion'].str.lower().str.strip().replace(" ","_")
data_df['t2p3_champion'] = data_df['t2p3_champion'].str.lower().str.strip().replace(" ","_")
data_df['t2p4_champion'] = data_df['t2p4_champion'].str.lower().str.strip().replace(" ","_")
data_df['t2p5_champion'] = data_df['t2p5_champion'].str.lower().str.strip().replace(" ","_")
data_df['t1_ban1'] = data_df['t1_ban1'].str.lower().str.strip().replace(" ","_")
data_df['t1_ban2'] = data_df['t1_ban2'].str.lower().str.strip().replace(" ","_")
data_df['t1_ban3'] = data_df['t1_ban3'].str.lower().str.strip().replace(" ","_")
data_df['t1_ban4'] = data_df['t1_ban4'].str.lower().str.strip().replace(" ","_")
data_df['t1_ban5'] = data_df['t1_ban5'].str.lower().str.strip().replace(" ","_")
data_df['t2_ban1'] = data_df['t2_ban1'].str.lower().str.strip().replace(" ","_")
data_df['t2_ban2'] = data_df['t2_ban2'].str.lower().str.strip().replace(" ","_")
data_df['t2_ban3'] = data_df['t2_ban3'].str.lower().str.strip().replace(" ","_")
data_df['t2_ban4'] = data_df['t2_ban4'].str.lower().str.strip().replace(" ","_")
data_df['t2_ban5'] = data_df['t2_ban5'].str.lower().str.strip().replace(" ","_")
categorical_columns = ['t1_playerid','t2_playerid','t1p1_player','t1p2_player','t1p3_player','t1p4_player',
't1p5_player','t2p1_player','t2p2_player','t2p3_player','t2p4_player','t2p5_player',
't1p1_champion','t1p2_champion','t1p3_champion','t1p4_champion',
't1p5_champion','t2p1_champion','t2p2_champion','t2p3_champion','t2p4_champion','t2p5_champion',
't1_ban1','t1_ban2','t1_ban3','t1_ban4','t1_ban5','t2_ban1','t2_ban2','t2_ban3','t2_ban4','t2_ban5',]
dum_df = pd.get_dummies(data_df, columns=categorical_columns, prefix=categorical_columns)
return dum_df
def piecharts(data_df):
bans = pd.Series(data_df['t1_ban1'])
bans.append(data_df['t1_ban2'])
bans.append(data_df['t1_ban3'])
unique_bans = bans.unique()
ban_count = []
for i in unique_bans:
count = 0
for a in data_df['t1_ban1']:
if(a == i):
count += 1
for b in data_df['t1_ban2']:
if(b == i):
count += 1
for c in data_df['t1_ban3']:
if(c == i):
count += 1
ban_count.append(count)
ban_count_series = pd.Series(ban_count)
ban_count_series.index = unique_bans
plt.figure(figsize=(12,7))
ban_count_series.sort_values(ascending=False)[:10].plot(kind='pie', autopct='%1.1f%%')
plt.title('Top 10 Banned Champions')
plt.ylabel('Champions')
plt.show()
picks = pd.Series(data_df['t1p1_champion'])
picks.append(data_df['t1p2_champion'])
picks.append(data_df['t1p3_champion'])
picks.append(data_df['t1p4_champion'])
picks.append(data_df['t1p5_champion'])
unique_picks = picks.unique()
pick_count = []
for i in unique_picks:
count = 0
for a in data_df['t1_ban1']:
if(a == i):
count += 1
for b in data_df['t1_ban2']:
if(b == i):
count += 1
for c in data_df['t1_ban3']:
if(c == i):
count += 1
pick_count.append(count)
pick_count_series = pd.Series(pick_count)
pick_count_series.index = unique_picks
plt.figure(figsize=(12,7))
pick_count_series.sort_values(ascending=False)[:10].plot(kind='pie', autopct='%1.1f%%')
plt.title('Top 10 Picked Champions')
plt.ylabel('Champions')
plt.show()
def bargraphs(data_df):
total_dragons = data_df.groupby(["t1_playerid"]).t1_dragons.sum() + data_df.groupby(["t2_playerid"]).t2_dragons.sum()
total_dragons.sort_values(ascending=False)[:10].plot(kind='barh')
plt.title('Teams Top 10 Dragon Count')
plt.ylabel('Teams')
plt.show()
total_heralds = data_df.groupby(["t1_playerid"]).t1_heralds.sum() + data_df.groupby(["t2_playerid"]).t2_heralds.sum()
total_heralds.sort_values(ascending=False)[:10].plot(kind='barh')
plt.title('Teams Top 10 Heralds Count')
plt.ylabel('Teams')
plt.show()
total_barons = data_df.groupby(["t1_playerid"]).t1_barons.sum() + data_df.groupby(["t2_playerid"]).t2_barons.sum()
total_barons.sort_values(ascending=False)[:10].plot(kind='barh')
plt.title('Teams Top 10 Barons Count')
plt.ylabel('Teams')
plt.show()
def bargraphs2(data_df):
wins = data_df[data_df['t2_result'] == 1]['t2_playerid'].value_counts() + data_df[data_df['t1_result'] == 1]['t1_playerid'].value_counts()
wins.sort_values(ascending=False)[:10].plot(kind='barh')
plt.title("Number of games won")
plt.show()
def bargraphs3(data_df):
wins = data_df[data_df['t2_result'] == 1]['t2_playerid'].value_counts() + data_df[data_df['t1_result'] == 1]['t1_playerid'].value_counts()
losses = data_df[data_df['t2_result'] == 0]['t2_playerid'].value_counts() + data_df[data_df['t1_result'] == 0]['t1_playerid'].value_counts()
ratio = wins / (losses + wins)
plt.title("Win/loss ratio")
ratio.sort_values(ascending=False)[:15].plot(kind='barh')
def rolling_average(data_df, t1_count_name, t1_objective, t1_avg_objective, t2_count_name, t2_objective, t2_avg_objective):
cummsum(t1_count_name, 't1_playerid', t1_objective, data_df)
cummsum(t2_count_name, 't2_playerid', t2_objective, data_df)
data_df['t1_gamecount'] = data_df.groupby('t1_playerid').cumcount()
data_df[t1_avg_objective] = data_df[t1_count_name]/data_df['t1_gamecount']
data_df[t1_avg_objective] = data_df[t1_avg_objective].fillna(0)
data_df['t2_gamecount'] = data_df.groupby('t2_playerid').cumcount()
data_df[t2_avg_objective] = data_df[t2_count_name]/data_df['t2_gamecount']
data_df[t2_avg_objective] = data_df[t2_avg_objective].fillna(0)
data_df[t1_avg_objective]= data_df[t1_avg_objective].round(2)
data_df[t2_avg_objective]= data_df[t2_avg_objective].round(2)
return data_df
def cummsum(sum_feature, player, player_stats, data):
data[sum_feature] = data.groupby(player)[player_stats].cumsum(axis=0)
data[sum_feature] = data.groupby(player)[sum_feature].shift(1) #lag by 1 so theres only info from previous matches
data[sum_feature].fillna(0,inplace=True)
return data
def rep(new_col, og_col, data):
data[new_col] = data[og_col].replace([0],1)
return data
def kda (player_kda, player_kills, player_assists, player_deaths, data):
data[player_kda] = (data[player_kills] + data[player_assists])/data[player_deaths]
data[player_kda] = data[player_kda].round(2)
return data
def buildLrModel(X_train, Y_train, feature_names):
logistic = LogisticRegression()
log_model = GridSearchCV(logistic, {
'C': [1,10,100],
'max_iter': [25,50,100],
'solver' : ['liblinear','saga'],
'tol' : [0.1,0.2,0.3]
})
log_model.fit(X_train, Y_train)
print(log_model.best_estimator_)
return log_model
def buildNeuralModel(X_train,Y_train,feature_names):
feature_count = len(feature_names)
neural_model = keras.Sequential([
layers.Dense(32, activation='relu', input_shape=[feature_count]),
layers.Dense(32, activation='relu'),
layers.Dense(1, activation='sigmoid')
])
neural_model.compile(
loss='binary_crossentropy',
optimizer='adam',
metrics=['accuracy'],
)
EPOCHS = 50
neural_model.fit(
X_train,
Y_train,
batch_size=32,
epochs=EPOCHS,
)
return neural_model
def buildRandomForestModel(X_train,Y_train,feature_names):
random_forest= RandomForestClassifier()
random_forest_model = GridSearchCV(random_forest, {
'n_estimators': [10,100,200],
'max_depth': [1,2,5,10],
})
random_forest_model.fit(X_train, Y_train)
return random_forest_model
def addWinRate(data_df,dum_df):
winMap = {}
for item in dum_df.columns:
if 't1_playerid' in item:
winMap[item] = {'wins':[],'totalGames':[]}
if 't2_playerid' in item:
winMap[item] = {'wins':[],'totalGames':[]}
data_df['t1_games_won_so_far'] = 0
data_df['t1__games_played_so_far'] = 0
data_df['t2_games_won_so_far'] = 0
data_df['t2__games_played_so_far'] = 0
for team, values in winMap.items():
team_df = data_df[data_df[team] == 1]
idx = 0
for index, row in team_df.iterrows():
result = 0
if 't1_playerid' in team:
result = row['t1_result']
else:
result = row['t2_result']
laggedIdx = idx
if idx == 0:
values['wins'].append(result)
values['totalGames'].append(1)
if 't1_playerid' in team:
data_df.loc[index,'t1_games_won_so_far'] = 0
data_df.loc[index,'t1_games_played_so_far'] = 0
else:
data_df.loc[index,'t2_games_won_so_far'] = 0
data_df.loc[index,'t2_games_played_so_far'] = 0
else:
values['wins'].append(values['wins'][idx - 1] + result)
values['totalGames'].append(values['totalGames'][idx - 1] + 1)
if 't1_playerid' in team:
data_df.loc[index,'t1_games_won_so_far'] = values['wins'][idx - 1]
data_df.loc[index,'t1_games_played_so_far'] = values['totalGames'][idx - 1]
else:
data_df.loc[index,'t2_games_won_so_far'] = values['wins'][idx - 1]
data_df.loc[index,'t2_games_played_so_far'] = values['totalGames'][idx - 1]
idx = idx + 1
data_df['t1_winrate'] = data_df['t1_games_won_so_far'] / data_df['t1_games_played_so_far']
data_df['t2_winrate'] = data_df['t2_games_won_so_far'] / data_df['t2_games_played_so_far']
data_df['t1_winrate'] = data_df['t1_winrate'].fillna(0)
data_df['t2_winrate'] = data_df['t2_winrate'].fillna(0)
return data_df
|
[
"noreply@github.com"
] |
sheriffab.noreply@github.com
|
0a4f0d71af479b78c4d2993b8c4a84ed458e3ae1
|
2c886cc64c9c7ff59d02f8637c1e765e7911f079
|
/aarms/data/msd/echonest.py
|
a760b9ae3af8740258d48c5fb7f8a22a0a3d4215
|
[
"MIT"
] |
permissive
|
eldrin/aarms
|
8c6b0a095fa0bc69803af933d4bcc0a28fb0a7e1
|
bdd5455ac8dcfc1fe91a12fdd132b74e6c37609d
|
refs/heads/master
| 2023-04-03T23:56:56.516979
| 2021-03-30T20:22:52
| 2021-03-30T20:22:52
| 252,807,989
| 0
| 0
|
MIT
| 2021-03-30T20:22:52
| 2020-04-03T18:22:15
|
Python
|
UTF-8
|
Python
| false
| false
| 1,583
|
py
|
from os.path import join
import csv
from scipy import sparse as sp
import sqlite3
from tqdm import tqdm
N_INTERACTIONS = 48373586
def load_echonest(path, verbose=False):
"""
"""
with open(join(path, 'train_triplets.txt'), 'r') as f:
users = {}
items = {}
I, J, V = [], [], []
with tqdm(total=N_INTERACTIONS, ncols=80, disable=not verbose) as prog:
for uid, sid, cnt in csv.reader(f, delimiter='\t'):
if uid not in users:
users[uid] = len(users)
if sid not in items:
items[sid] = len(items)
I.append(users[uid])
J.append(items[sid])
V.append(float(cnt))
prog.update()
X = sp.coo_matrix((V, (I, J)), shape=(len(users), len(items))).tocsr()
return {
'user_song': X,
'users': users,
'items': items
}
def load_echonest_from_sqlitedb(db_file):
"""
"""
with sqlite3.connect(db_file) as conn:
c = conn.cursor()
I, J, V = [], [], []
for u, i, v in c.execute('SELECT * FROM user_song'):
I.append(u)
J.append(i)
V.append(v)
users = [r[0] for r in c.execute('SELECT user FROM users')]
songs = [r[0] for r in c.execute('SELECT song FROM songs')]
# convert to CSR matrix
X = sp.coo_matrix((V, (I, J)), shape=(len(users), len(songs)))
X = X.tocsr()
return {
'user_song': X,
'users': users,
'songs': songs
}
|
[
"jaehun.j.kim@gmail.com"
] |
jaehun.j.kim@gmail.com
|
3f1b0191d31826c1fdcf7c016004635c307f9ca8
|
17659bdaf60e799941c5d7863e08d1a5d2308382
|
/src/scenic/simulators/webots/mars/__init__.py
|
baaff9c834c5aab9c4f29557045398f9689e1813
|
[
"BSD-3-Clause"
] |
permissive
|
cahartsell/Scenic
|
60a21fc95ea29629cc8d753feaed5589052ff19f
|
2e7979011aef426108687947668d9ba6f5439136
|
refs/heads/master
| 2023-01-11T07:58:05.869681
| 2020-11-09T20:25:58
| 2020-11-09T20:25:58
| 283,645,281
| 0
| 0
|
NOASSERTION
| 2020-07-30T02:02:01
| 2020-07-30T02:02:01
| null |
UTF-8
|
Python
| false
| false
| 156
|
py
|
"""World model for a simple Mars rover example in Webots.
.. raw:: html
<h2>Submodules</h2>
.. autosummary::
:toctree: _autosummary
model
"""
|
[
"dfremont@ucsc.edu"
] |
dfremont@ucsc.edu
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.