hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11 values | lang stringclasses 1 value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7263c0e12b1f9385bffd20a482055a91cac00beb | 996 | py | Python | backend/server/server/wsgi.py | Stinger101/my_uno_ml_service | 47d19f6e5e19e73c465b7ddca889324c9bd5862f | [
"MIT"
] | null | null | null | backend/server/server/wsgi.py | Stinger101/my_uno_ml_service | 47d19f6e5e19e73c465b7ddca889324c9bd5862f | [
"MIT"
] | null | null | null | backend/server/server/wsgi.py | Stinger101/my_uno_ml_service | 47d19f6e5e19e73c465b7ddca889324c9bd5862f | [
"MIT"
] | null | null | null | """
WSGI config for server project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'server.settings')
application = get_wsgi_application()
import inspect
from apps.ml.registry import MLRegistry
from apps.ml.income_classifier.random_forest import RandomForestClassifier
try:
registry = MLRegistry()
rf = RandomForestClassifier()
registry.add_algorithm(endpoint_name="income_classifier",algorithm_object=rf,algorithm_name="random forest", algorithm_status="production", algorithm_version="0.0.1",owner="Piotr",algorithm_description="Random forest with simple pre and post processing",algorithm_code=inspect.getsource(RandomForestClassifier))
except Exception as e:
print ("Error while loading algorithm to the registry",str(e))
| 33.2 | 315 | 0.800201 |
72656ef10a55622587068a8e047a20f959778ca6 | 2,583 | py | Python | pycbc/config.py | mchestr/pycbc | c215c1f177fe383ec6e797437fa2d5f4727eb9f3 | [
"Unlicense"
] | null | null | null | pycbc/config.py | mchestr/pycbc | c215c1f177fe383ec6e797437fa2d5f4727eb9f3 | [
"Unlicense"
] | null | null | null | pycbc/config.py | mchestr/pycbc | c215c1f177fe383ec6e797437fa2d5f4727eb9f3 | [
"Unlicense"
] | null | null | null | import os
from functools import reduce
import boto3
import yaml
from copy import deepcopy
from cryptography.fernet import Fernet
from pycbc import json
from pycbc.utils import AttrDict as d
s3 = boto3.client('s3')
_mapping_tag = yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG
_DEFAULTS = d({
'users': [],
'encrypt_key': Fernet.generate_key().decode('utf-8'),
'api_gateway': None,
'sender_email': None,
'logging': d({
'version': 1,
'formatters': d({
'default': d({
'format': '%(asctime)-15s - %(levelname)-7s - %(message)s',
}),
}),
'handlers': d({
'console': d({
'class': 'logging.StreamHandler',
'formatter': 'default',
'level': 'DEBUG',
'stream': 'ext://sys.stderr',
}),
}),
'loggers': d({
'pycbc': d({
'handlers': ['console'],
'level': 'INFO',
})
})
})
})
| 25.323529 | 75 | 0.541231 |
7265b89cf3b023b36a24bc0d387a352f1ee8492b | 1,881 | py | Python | models/toolscontext/errorhandler.py | vinirossa/password_generator_test | dd2f43540c6f58ff9217320c21b246c0be3fc55f | [
"MIT"
] | 2 | 2021-09-10T00:11:00.000Z | 2021-09-10T02:47:54.000Z | models/toolscontext/errorhandler.py | vinirossa/password_generator_test | dd2f43540c6f58ff9217320c21b246c0be3fc55f | [
"MIT"
] | null | null | null | models/toolscontext/errorhandler.py | vinirossa/password_generator_test | dd2f43540c6f58ff9217320c21b246c0be3fc55f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Module Name
Description...
"""
__author__ = "Vincius Pereira"
__copyright__ = "Copyright 2021, Vincius Pereira"
__credits__ = ["Vincius Pereira","etc."]
__date__ = "2021/04/12"
__license__ = "GPL"
__version__ = "1.0.0"
__pythonversion__ = "3.9.1"
__maintainer__ = "Vincius Pereira"
__contact__ = "viniciuspsb@gmail.com"
__status__ = "Development"
import sys, os
import logging
import inspect
import datetime
STD_LOG_FORMAT = ("%(asctime)s - %(levelname)s - %(name)s - %(filename)s - %(funcName)s() - ln.%(lineno)d"
" - %(message)s")
if __name__ == "__main__":
pass | 24.115385 | 106 | 0.640617 |
726777c55df7d3f2aede322d72f4954164b655c1 | 2,348 | py | Python | take_day_and_night_pictures.py | ntmoore/skycamera | c8c67970b0e3a52ce008dbd6b34df20cdda786b7 | [
"MIT"
] | null | null | null | take_day_and_night_pictures.py | ntmoore/skycamera | c8c67970b0e3a52ce008dbd6b34df20cdda786b7 | [
"MIT"
] | null | null | null | take_day_and_night_pictures.py | ntmoore/skycamera | c8c67970b0e3a52ce008dbd6b34df20cdda786b7 | [
"MIT"
] | null | null | null | import time
import os
#parameters
sunset_hr=8
dawn_hr=7
daytime_period_min=60
nighttime_period_min=1
time.localtime()
print("program starts at ",time.localtime());
while(1):
#Is it day or night?
time.localtime()
hour = time.localtime()[3]
minute = time.localtime()[4]
hour_float = 1.0*hour+minute/60.0
if( hour_float>(sunset_hr+12) or hour_float<dawn_hr ):
daytime=0
else :
daytime=1
print("Is it day? ",daytime)
# night
if( daytime==0): # night
filename='sky-{:d}-{:02d}-{:02d}-{:02d}-{:02d}-{:02d}.jpg'.format(
time.localtime()[0], # year
time.localtime()[1], # month
time.localtime()[2], # day of month
time.localtime()[3], # hr
time.localtime()[4], # min
time.localtime()[5] # sec
)
path="/home/pi/skyphotos/data/night/"
command = ("raspistill --shutter 30000000 --analoggain 12.0" +
" --digitalgain 1.0 --nopreview --mode 3 "+
" --annotate "+filename+" -o "+path+filename )
print("running command: ",command)
os.system(command)
print("took picture ",filename)
command = "rclone copy " +path+filename+ " wsu-physics-skycamera:23817_camera/night/ "
os.system(command)
print("uploaded picture ",filename)
if(time.localtime()[3]>sunset_hr) :
time.sleep(30*60) # wait 30 min if its before midnight
# normal wait
time.sleep(nighttime_period_min*60)
# day
if(daytime==1): #implicit else
filename='sky-{:d}-{:02d}-{:02d}-{:02d}-{:02d}-{:02d}.jpg'.format(
time.localtime()[0], # year
time.localtime()[1], # month
time.localtime()[2], # day of month
time.localtime()[3], # hr
time.localtime()[4], # min
time.localtime()[5] # sec
)
path="/home/pi/skyphotos/data/day/"
command="raspistill -annotate "+filename+" --nopreview --mode 3 -o " + path + filename
os.system(command)
print("took picture ",filename)
command = "rclone copy " +path+filename+ " wsu-physics-skycamera:23817_camera/day/ "
os.system(command)
print("uploaded picture ",filename)
time.sleep(daytime_period_min*60)
# program (never) ends
| 29.721519 | 94 | 0.568143 |
726955e0b07fe2c8c796176a5076ee44d6371107 | 304 | py | Python | pytm/__init__.py | jeremyng123/pytm | e0bbbbbcfa387887753e27f78678c6004edf0e85 | [
"MIT"
] | null | null | null | pytm/__init__.py | jeremyng123/pytm | e0bbbbbcfa387887753e27f78678c6004edf0e85 | [
"MIT"
] | null | null | null | pytm/__init__.py | jeremyng123/pytm | e0bbbbbcfa387887753e27f78678c6004edf0e85 | [
"MIT"
] | null | null | null | __all__ = ['Element', 'Server', 'ExternalEntity', 'Datastore', 'Actor', 'Process', 'SetOfProcesses', 'Dataflow', 'Boundary', 'TM', 'Action', 'Lambda', 'Threat']
from .pytm import Element, Server, ExternalEntity, Dataflow, Datastore, Actor, Process, SetOfProcesses, Boundary, TM, Action, Lambda, Threat
| 60.8 | 160 | 0.713816 |
7269858ddc95892c083fd9a632926838c559c8a0 | 7,344 | py | Python | malchive/utilities/comguidtoyara.py | 6un9-h0-Dan/malchive | 1d150430559a307cdfee49d47799c95caea47415 | [
"Apache-2.0"
] | 59 | 2021-01-29T15:58:43.000Z | 2022-02-11T20:15:04.000Z | malchive/utilities/comguidtoyara.py | 6un9-h0-Dan/malchive | 1d150430559a307cdfee49d47799c95caea47415 | [
"Apache-2.0"
] | 1 | 2021-04-09T13:53:47.000Z | 2021-04-09T13:53:47.000Z | malchive/utilities/comguidtoyara.py | 6un9-h0-Dan/malchive | 1d150430559a307cdfee49d47799c95caea47415 | [
"Apache-2.0"
] | 10 | 2021-01-29T19:35:45.000Z | 2021-07-18T21:07:40.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright(c) 2021 The MITRE Corporation. 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 os
import sys
import struct
import binascii
import logging
import argparse
import progressbar
from datetime import datetime
from Registry import Registry
__version__ = "1.0.0"
__author__ = "Jason Batchelor"
log = logging.getLogger(__name__)
def iid_text_to_bin(iid):
"""
Process an IID and convert to a YARA compliant search string.
Below describes the GUID structure used to describe an identifier
for a MAPI interface:
https://msdn.microsoft.com/en-us/library/office/cc815892.aspx
:param str iid: Name of the IID to convert
:return: bin_yara
:rtype: str
"""
# remove begin and end brackets
guid = re.sub('[{}-]', '', iid)
# convert to binary representation
bin_struc = struct.unpack("IHH8B", binascii.a2b_hex(guid))
bin_str = '%.8X%.4X%.4X%s' % \
(bin_struc[0], bin_struc[1], bin_struc[2],
(''.join('{:02X}'.format(x) for x in bin_struc[3:])))
# create YARA compliant search string
bin_yara = '{ ' + ' '.join(a + b for a, b in
zip(bin_str[::2], bin_str[1::2])) + ' }'
return bin_yara
def enumerate_com_interfaces(reg_keys, show_bar=False):
"""
Iterate through registry keys and retrieve unique interface identifiers
and their name.
:param list reg_keys: List of registry key objects from python-registry
module.
:param bool show_bar: Show progressbar as subfiles are identified.
:param bytes buff: File to look for subfiles.
:return: com
:rtype: dict
"""
total_iters = 0
counter = 0
com = {}
for key in reg_keys:
total_iters += len(key.subkeys())
if show_bar:
print('Processing %s results...' % total_iters)
bar = progressbar.ProgressBar(redirect_stdout=True,
max_value=total_iters)
for key in reg_keys:
for subkey in key.subkeys():
for v in list(subkey.values()):
# Per MS documentation, Interface names must start with the
# 'I' prefix, so we limit our values here as well.
# Not doing so can lead to some crazy names and conflicting
# results!
# https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces
if v.value_type() == Registry.RegSZ \
and v.name() == '(default)' \
and v.value().startswith('I'):
bin_guid = iid_text_to_bin(subkey.name())
# Names with special characters/spaces are truncated
stop_chars = ['_', '<', '[', ' ']
index = min(v.value().find(i)
if i in v.value()
else
len(v.value())
for i in stop_chars)
value = v.value()[:index]
if value not in com:
com[value] = [bin_guid]
elif bin_guid not in com[value]:
com[value].append(bin_guid)
if show_bar:
bar.update(counter)
counter += 1
if show_bar:
bar.finish()
return com
if __name__ == '__main__':
main()
| 32.932735 | 124 | 0.578431 |
726a44a6fe535cc4bca286ac9836e2fee0dcea3e | 8,580 | py | Python | examples/voc2007_extract.py | sis0truk/pretrained-models.pytorch | 4aea6d47996279b4b281355ca3d9738d0dff7469 | [
"BSD-3-Clause"
] | 91 | 2018-03-21T19:45:00.000Z | 2021-12-13T06:08:00.000Z | examples/voc2007_extract.py | wubin1836/pretrained-models.pytorch | cb5127f43c554c0bb52c5ded3c071d9de9a514a4 | [
"BSD-3-Clause"
] | 6 | 2019-08-03T08:49:21.000Z | 2022-03-11T23:43:56.000Z | examples/voc2007_extract.py | wubin1836/pretrained-models.pytorch | cb5127f43c554c0bb52c5ded3c071d9de9a514a4 | [
"BSD-3-Clause"
] | 13 | 2018-03-23T12:31:52.000Z | 2020-07-20T13:16:44.000Z | import os
import argparse
from tqdm import tqdm
import torch
from torch.autograd import Variable
from torch.utils import model_zoo
# http://scikit-learn.org
from sklearn.metrics import accuracy_score
from sklearn.metrics import average_precision_score
from sklearn.svm import LinearSVC
from sklearn.svm import SVC
import sys
sys.path.append('.')
import pretrainedmodels
import pretrainedmodels.utils
import pretrainedmodels.datasets
model_names = sorted(name for name in pretrainedmodels.__dict__
if not name.startswith("__")
and name.islower()
and callable(pretrainedmodels.__dict__[name]))
##########################################################################
# main
##########################################################################
parser = argparse.ArgumentParser(
description='Train/Evaluate models',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--dir_outputs', default='/tmp/outputs', type=str, help='')
parser.add_argument('--dir_datasets', default='/tmp/datasets', type=str, help='')
parser.add_argument('--C', default=1, type=float, help='')
parser.add_argument('-b', '--batch_size', default=50, type=float, help='')
parser.add_argument('-a', '--arch', default='alexnet', choices=model_names,
help='model architecture: ' +
' | '.join(model_names) +
' (default: alexnet)')
parser.add_argument('--train_split', default='train', type=str, help='')
parser.add_argument('--test_split', default='val', type=str, help='')
parser.add_argument('--cuda', const=True, nargs='?', type=bool, help='')
if __name__ == '__main__':
main() | 46.630435 | 156 | 0.675291 |
726b36a2e85a950a7d407068d5aa12a5d50355a1 | 4,089 | py | Python | main.py | tani-cat/point_maximizer | c9ff868377bbeed4727914d7be258457dc8295a3 | [
"MIT"
] | 1 | 2021-09-07T04:19:48.000Z | 2021-09-07T04:19:48.000Z | main.py | tani-cat/point_maximizer | c9ff868377bbeed4727914d7be258457dc8295a3 | [
"MIT"
] | null | null | null | main.py | tani-cat/point_maximizer | c9ff868377bbeed4727914d7be258457dc8295a3 | [
"MIT"
] | null | null | null | import csv
import os
from collections import deque
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
INPUT_PATH = os.path.join(BASE_DIR, 'goods_source.csv')
OUTPUT_PATH = os.path.join(BASE_DIR, 'result.csv')
FILE_ENCODE = 'shift_jis'
INPUT_COLS = ('id', 'goods_name', 'price')
def import_csv():
"""
"""
try:
data_l = list()
with open(INPUT_PATH, mode='r', encoding=FILE_ENCODE, newline='') as csvf:
reader = csv.DictReader(csvf)
for dic in reader:
dic['id'] = int(dic['id'])
dic['price'] = int(dic['price'])
data_l.append(dic)
for col in INPUT_COLS:
if col not in data_l[0]:
raise IndexError(col)
return data_l
except FileNotFoundError:
print('goods_source.csv')
return list()
except IndexError as e:
print(': ' + str(e))
return list()
def calculate(data_l):
"""
1. 50
1-1. que50
1-2. que23
1-2-1. 5050->
1-2-2. 501-2
-> 50
2. 1150
"""
# 50
under_que = list()
over_que = list()
for i in range(len(data_l)):
_mod = data_l[i]['price'] % 100
data_l[i]['set'] = 0
dic = {
'id': [i],
'mod': _mod,
}
if _mod < 50:
under_que.append(dic)
else:
over_que.append(dic)
under_que.sort(key=lambda x: x['mod'])
under_que = deque(under_que)
while under_que:
init = under_que.popleft()
while under_que:
init, keep, under_que, last_que = func(init, under_que)
# last_que1
if not keep:
keep = last_que.pop()
init = {
'id': init['id'] + keep['id'],
'mod': init['mod'] + keep['mod'],
}
if last_que:
over_que.append(init)
under_que.extend(last_que)
break
else:
over_que.append(init)
break
# 50150
# ()
# final_que:
over_que = deque(sorted(over_que, key=lambda x: x['mod']))
final_que = list()
while over_que:
init = over_que.popleft()
init, keep, over_que, last_que = func(init, over_que, 150)
if keep:
init = {
'id': init['id'] + keep['id'],
'mod': (init['mod'] + keep['mod']) % 100,
}
over_que.appendleft(init)
else:
final_que.append(init)
over_que.extend(last_que)
sum_p = 0
#
for cnt, que in enumerate(final_que):
point = 0
for id in que['id']:
data_l[id]['set'] = cnt + 1
point += data_l[id]['price']
print(f'set{cnt + 1} {round(point / 100)} P')
sum_p += round(point / 100)
print(f'total: {sum_p} P')
return data_l
if __name__ == '__main__':
main()
| 25.716981 | 82 | 0.544876 |
726b9a5bd16ce05e24c2ecf163d38e79bdafc8e9 | 440 | py | Python | src/gui/tcltk/tcl/tests/langbench/proc.py | gspu/bitkeeper | 994fb651a4045b221e33703fc3d665c3a34784e1 | [
"Apache-2.0"
] | 342 | 2016-05-10T14:59:07.000Z | 2022-03-09T23:45:43.000Z | src/gui/tcltk/tcl/tests/langbench/proc.py | rvs/bitkeeper | 616740d0daad99530951e46ab48e577807cbbaf4 | [
"Apache-2.0"
] | 4 | 2016-05-16T20:14:27.000Z | 2020-10-04T19:59:25.000Z | src/gui/tcltk/tcl/tests/langbench/proc.py | rvs/bitkeeper | 616740d0daad99530951e46ab48e577807cbbaf4 | [
"Apache-2.0"
] | 78 | 2016-05-10T15:53:30.000Z | 2022-03-09T23:46:06.000Z | #!/usr/bin/python
n = 100000
while n > 0:
x = a(n)
n = n - 1
print "x=%d" % x
| 15.172414 | 30 | 0.556818 |
726cd8989837300a91d84b0ca0157304eb9a9398 | 821 | py | Python | src/metrics.py | dmitryrubtsov/Recommender-systems | 9debd7b1c2d67ebc508263a483c81da57521dea0 | [
"MIT"
] | null | null | null | src/metrics.py | dmitryrubtsov/Recommender-systems | 9debd7b1c2d67ebc508263a483c81da57521dea0 | [
"MIT"
] | null | null | null | src/metrics.py | dmitryrubtsov/Recommender-systems | 9debd7b1c2d67ebc508263a483c81da57521dea0 | [
"MIT"
] | 1 | 2021-09-11T09:12:34.000Z | 2021-09-11T09:12:34.000Z | import pandas as pd
import numpy as np
import swifter
| 34.208333 | 111 | 0.685749 |
726cdda30af8fd9c2b731782ba8da0a87b370957 | 598 | py | Python | diff_r_b.py | upupming/dragon | 245f71996004b386ae764eb8f76603233d8a6763 | [
"MIT"
] | 1 | 2019-10-10T03:37:19.000Z | 2019-10-10T03:37:19.000Z | diff_r_b.py | upupming/dragon | 245f71996004b386ae764eb8f76603233d8a6763 | [
"MIT"
] | null | null | null | diff_r_b.py | upupming/dragon | 245f71996004b386ae764eb8f76603233d8a6763 | [
"MIT"
] | null | null | null | import numpy as np
size = 9
percentage_max = 0.08
xis = np.linspace(0.1 * (1-percentage_max), 0.1 * (1+percentage_max), size)
E_n = [
85219342462.9973,
85219254693.4412,
85219173007.4296,
85219096895.7433,
85219025899.6604,
85218959605.1170,
85218897637.6421,
85218839657.9502,
85218785358.0968
]
percentage = np.empty(size)
for i in range(len(xis)):
percentage[i] = (E_n[i] - E_n[size//2])/E_n[size//2]*100
print(percentage)
# [ 3.71470260e-04 2.68477348e-04 1.72623153e-04 8.33101319e-05
# 0.00000000e+00 -7.77931251e-05 -1.50508665e-04 -2.18544754e-04
# -2.82262747e-04] | 21.357143 | 75 | 0.704013 |
726ed8580c5eeb89980b035843019ba84698e921 | 102 | py | Python | src/run.py | rhiga2/mturk-tsep-test | 2cc4388442bc9155022d28ec9132acc10a1b82f7 | [
"MIT"
] | 38 | 2016-08-25T16:12:54.000Z | 2022-01-30T05:05:28.000Z | src/run.py | rhiga2/mturk-tsep-test | 2cc4388442bc9155022d28ec9132acc10a1b82f7 | [
"MIT"
] | 24 | 2016-06-29T15:28:16.000Z | 2022-03-08T02:38:51.000Z | src/run.py | rhiga2/mturk-tsep-test | 2cc4388442bc9155022d28ec9132acc10a1b82f7 | [
"MIT"
] | 16 | 2016-06-29T17:03:17.000Z | 2022-03-19T09:43:42.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from caqe import app
app.run(debug=True, threaded=True) | 20.4 | 34 | 0.676471 |
726f55adcb3a541f1d732e7444389c568ce9cca4 | 4,059 | py | Python | src/main/python/hydra/lib/cli.py | bopopescu/hydra | ec0793f8c1f49ceb93bf1f1a9789085b68d55f08 | [
"Apache-2.0"
] | 10 | 2016-05-28T15:56:43.000Z | 2018-01-03T21:30:58.000Z | src/main/python/hydra/lib/cli.py | bopopescu/hydra | ec0793f8c1f49ceb93bf1f1a9789085b68d55f08 | [
"Apache-2.0"
] | 17 | 2016-06-06T22:15:28.000Z | 2020-07-22T20:28:12.000Z | src/main/python/hydra/lib/cli.py | bopopescu/hydra | ec0793f8c1f49ceb93bf1f1a9789085b68d55f08 | [
"Apache-2.0"
] | 5 | 2016-06-01T22:01:44.000Z | 2020-07-22T20:12:49.000Z | """hydra cli.
Usage:
hydra cli ls slaves
hydra cli ls apps
hydra cli ls task <app>
hydra cli [force] stop <app>
hydra cli scale <app> <scale>
hydra cli (-h | --help)
hydra cli --version
Options:
-h --help Show this screen.
--version Show version.
"""
__author__ = 'sushil'
from docopt import docopt
from pprint import pprint, pformat # NOQA
from hydra.lib import util, mmapi
import os
import sys
import logging
try:
# Python 2.x
from ConfigParser import ConfigParser
except ImportError:
# Python 3.x
from configparser import ConfigParser
l = util.createlogger('cli', logging.INFO)
# l.setLevel(logging.DEBUG)
# SK:Tried to add log collection but no luck so far.
# elif args['logs']:
# path = "/tmp/mesos/slaves/"
# #11323ada-daab-4d76-8749-3113b5448bed-S0/
# path += "/frameworks/
# # #11323ada-daab-4d76-8749-3113b5448bed-0007
# path += "/executors/"
# #zst-pub.4bdec0e2-e7e3-11e5-a874-fe2077b92eeb
# path += "/runs/"
# # d00620ea-8f3e-427d-9404-6f6b9701f64f/
# app = args['<app>']
| 34.109244 | 73 | 0.533875 |
726f6ae6d6811d44c154cb87d7ac33570c6e67c7 | 1,378 | py | Python | azure-devops/azext_devops/test/common/test_format.py | doggy8088/azure-devops-cli-extension | 2f6b1a6ffbc49ae454df640a8bb00dac991d6514 | [
"MIT"
] | 326 | 2019-04-10T12:38:23.000Z | 2022-03-31T23:07:49.000Z | azure-devops/azext_devops/test/common/test_format.py | doggy8088/azure-devops-cli-extension | 2f6b1a6ffbc49ae454df640a8bb00dac991d6514 | [
"MIT"
] | 562 | 2019-04-10T07:36:12.000Z | 2022-03-28T07:37:54.000Z | azure-devops/azext_devops/test/common/test_format.py | doggy8088/azure-devops-cli-extension | 2f6b1a6ffbc49ae454df640a8bb00dac991d6514 | [
"MIT"
] | 166 | 2019-04-10T07:59:40.000Z | 2022-03-16T14:17:13.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
import unittest
from azext_devops.dev.common.format import trim_for_display, date_time_to_only_date
if __name__ == '__main__':
unittest.main() | 34.45 | 94 | 0.58926 |
7271b55252042ba4d3337da31bedcd35a08671cd | 7,464 | py | Python | github/GitReleaseAsset.py | aantr/WindowsHostManager | 75d248fc8991d471c6802fa79e7dee44a5708c65 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2021-06-25T09:13:12.000Z | 2021-06-25T09:13:12.000Z | venv/lib/python3.6/site-packages/github/GitReleaseAsset.py | rongshaoshuai/blogs | dafeb789428436c1ec8069e605400612b776b8f2 | [
"MIT"
] | 3 | 2021-03-30T23:03:03.000Z | 2021-03-30T23:06:57.000Z | lib/github/GitReleaseAsset.py | Corionis/Knobs-And-Scripts | 81a954fd0ed697e5759359ec0383a3f16a841143 | [
"MIT"
] | null | null | null | ############################ Copyrights and license ############################
# #
# Copyright 2017 Chris McBride <thehighlander@users.noreply.github.com> #
# Copyright 2017 Simon <spam@esemi.ru> #
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
# Copyright 2018 sfdye <tsfdye@gmail.com> #
# #
# This file is part of PyGithub. #
# http://pygithub.readthedocs.io/ #
# #
# PyGithub is free software: you can redistribute it and/or modify it under #
# the terms of the GNU Lesser General Public License as published by the Free #
# Software Foundation, either version 3 of the License, or (at your option) #
# any later version. #
# #
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
# details. #
# #
# You should have received a copy of the GNU Lesser General Public License #
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
# #
################################################################################
import github.GithubObject
def update_asset(self, name, label=""):
"""
Update asset metadata.
:rtype: github.GitReleaseAsset.GitReleaseAsset
"""
assert isinstance(name, str), name
assert isinstance(label, str), label
post_parameters = {"name": name, "label": label}
headers, data = self._requester.requestJsonAndCheck(
"PATCH", self.url, input=post_parameters
)
return GitReleaseAsset(self._requester, headers, data, completed=True)
| 37.888325 | 150 | 0.554126 |
727226bedc426059fe3d1bd87ec9c301e86441f8 | 3,005 | py | Python | tests/test_remote.py | epenet/samsung-tv-ws-api | 23e0cf8188ba16ab128cff40fc56358cc2167ead | [
"MIT"
] | null | null | null | tests/test_remote.py | epenet/samsung-tv-ws-api | 23e0cf8188ba16ab128cff40fc56358cc2167ead | [
"MIT"
] | null | null | null | tests/test_remote.py | epenet/samsung-tv-ws-api | 23e0cf8188ba16ab128cff40fc56358cc2167ead | [
"MIT"
] | null | null | null | """Tests for remote module."""
from unittest.mock import Mock, call, patch
from samsungtvws.remote import SamsungTVWS
def test_send_key(connection: Mock) -> None:
"""Ensure simple data can be parsed."""
open_response = (
'{"data": {"token": 123456789}, "event": "ms.channel.connect", "from": "host"}'
)
connection.recv.side_effect = [open_response]
tv = SamsungTVWS("127.0.0.1")
tv.send_key("KEY_POWER")
connection.send.assert_called_once_with(
'{"method": "ms.remote.control", "params": {'
'"Cmd": "Click", '
'"DataOfCmd": "KEY_POWER", '
'"Option": "false", '
'"TypeOfRemote": "SendRemoteKey"'
"}}"
)
def test_app_list(connection: Mock) -> None:
"""Ensure valid app_list data can be parsed."""
open_response = (
'{"data": {"token": 123456789}, "event": "ms.channel.connect", "from": "host"}'
)
app_list_response = '{"data":{"data":[{"appId":"111299001912","app_type":2,"icon":"/opt/share/webappservice/apps_icon/FirstScreen/111299001912/250x250.png","is_lock":0,"name":"YouTube"},{"appId":"3201608010191","app_type":2,"icon":"/opt/share/webappservice/apps_icon/FirstScreen/3201608010191/250x250.png","is_lock":0,"name":"Deezer"}]},"event":"ed.installedApp.get","from":"host"}'
connection.recv.side_effect = [open_response, app_list_response]
tv = SamsungTVWS("127.0.0.1")
assert tv.app_list() == [
{
"appId": "111299001912",
"app_type": 2,
"icon": "/opt/share/webappservice/apps_icon/FirstScreen/111299001912/250x250.png",
"is_lock": 0,
"name": "YouTube",
},
{
"appId": "3201608010191",
"app_type": 2,
"icon": "/opt/share/webappservice/apps_icon/FirstScreen/3201608010191/250x250.png",
"is_lock": 0,
"name": "Deezer",
},
]
def test_app_list_invalid(connection: Mock) -> None:
"""Ensure simple data can be parsed."""
open_response = (
'{"data": {"token": 123456789}, "event": "ms.channel.connect", "from": "host"}'
)
app_list_response = '{"data": 200, "event": "ed.apps.launch", "from": "host"}'
connection.recv.side_effect = [open_response, app_list_response]
tv = SamsungTVWS("127.0.0.1")
assert tv.app_list() is None
connection.send.assert_called_once_with(
'{"method": "ms.channel.emit", "params": {"event": "ed.installedApp.get", "to": "host"}}'
)
def test_send_hold_key(connection: Mock) -> None:
"""Ensure simple data can be parsed."""
open_response = (
'{"data": {"token": 123456789}, "event": "ms.channel.connect", "from": "host"}'
)
connection.recv.side_effect = [open_response]
tv = SamsungTVWS("127.0.0.1")
with patch("samsungtvws.connection.time.sleep") as patch_sleep:
tv.hold_key("KEY_POWER", 3)
assert patch_sleep.call_count == 3
assert patch_sleep.call_args_list == [call(1), call(3), call(1)]
| 37.098765 | 386 | 0.609651 |
7272878a102453847fd4632382fedab2cb904e9f | 518 | py | Python | src/utils/pythonSrc/watchFaceParser/models/elements/battery/batteryGaugeElement.py | chm-dev/amazfitGTSwatchfaceBundle | 4cb04be5215de16628418e9b38152a35d5372d3e | [
"MIT"
] | 49 | 2019-12-18T11:24:56.000Z | 2022-03-28T09:56:27.000Z | src/utils/pythonSrc/watchFaceParser/models/elements/battery/batteryGaugeElement.py | chm-dev/amazfitGTSwatchfaceBundle | 4cb04be5215de16628418e9b38152a35d5372d3e | [
"MIT"
] | 6 | 2020-01-08T21:31:15.000Z | 2022-03-25T19:13:26.000Z | src/utils/pythonSrc/watchFaceParser/models/elements/battery/batteryGaugeElement.py | chm-dev/amazfitGTSwatchfaceBundle | 4cb04be5215de16628418e9b38152a35d5372d3e | [
"MIT"
] | 6 | 2019-12-27T17:30:24.000Z | 2021-09-30T08:11:01.000Z | import logging
from watchFaceParser.models.elements.common.imageSetElement import ImageSetElement
| 43.166667 | 125 | 0.745174 |
7272f878dcec10a25f78ca45ec857fd8f9c8248c | 3,092 | py | Python | indicoio/utils/__init__.py | JoseRoman/IndicoIo-python | 4fe2952df45c26392f36acd8b43391dfc50e140b | [
"MIT"
] | 1 | 2021-05-26T09:03:15.000Z | 2021-05-26T09:03:15.000Z | indicoio/utils/__init__.py | JoseRoman/IndicoIo-python | 4fe2952df45c26392f36acd8b43391dfc50e140b | [
"MIT"
] | null | null | null | indicoio/utils/__init__.py | JoseRoman/IndicoIo-python | 4fe2952df45c26392f36acd8b43391dfc50e140b | [
"MIT"
] | null | null | null | import inspect
import numpy as np
| 35.54023 | 77 | 0.647477 |
727435e62860b2aa00ad17f363ac314751d38249 | 3,770 | py | Python | openprocurement/tender/openuadefense/tests/tender.py | ProzorroUKR/openprocurement.tender.openuadefense | 5d6a7433839178edba35015ae614ba3e36b29d0b | [
"Apache-2.0"
] | null | null | null | openprocurement/tender/openuadefense/tests/tender.py | ProzorroUKR/openprocurement.tender.openuadefense | 5d6a7433839178edba35015ae614ba3e36b29d0b | [
"Apache-2.0"
] | 5 | 2018-08-14T19:41:27.000Z | 2018-12-28T13:17:00.000Z | openprocurement/tender/openuadefense/tests/tender.py | ProzorroUKR/openprocurement.tender.openuadefense | 5d6a7433839178edba35015ae614ba3e36b29d0b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from openprocurement.api.tests.base import snitch
from openprocurement.api.tests.base import BaseWebTest
from openprocurement.tender.belowthreshold.tests.base import test_lots
from openprocurement.tender.belowthreshold.tests.tender import TenderResourceTestMixin
from openprocurement.tender.belowthreshold.tests.tender_blanks import (
# TenderUAProcessTest
invalid_tender_conditions,
)
from openprocurement.tender.openua.tests.tender import TenderUaProcessTestMixin
from openprocurement.tender.openua.tests.tender_blanks import (
# TenderUAResourceTest
empty_listing,
create_tender_generated,
tender_with_main_procurement_category,
tender_finance_milestones,
)
from openprocurement.tender.openuadefense.tests.base import (
BaseTenderUAWebTest,
test_tender_data,
)
from openprocurement.tender.openuadefense.tests.tender_blanks import (
# TenderUATest
simple_add_tender,
# TenderUAResourceTest
create_tender_invalid,
patch_tender,
patch_tender_ua,
# TenderUAProcessTest
one_valid_bid_tender_ua,
one_invalid_bid_tender,
)
def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TenderUAProcessTest))
suite.addTest(unittest.makeSuite(TenderUAResourceTest))
suite.addTest(unittest.makeSuite(TenderUATest))
return suite
if __name__ == '__main__':
unittest.main(defaultTest='suite')
| 37.326733 | 121 | 0.748276 |
7274cfef52d1610735171f4f6183581cfb8fe6dd | 3,791 | py | Python | fabry/tools/file_io.py | jmilhone/fabry_perot | cd3cb7a1dbcaa3c9382f9f2dbd3407d95447b3ce | [
"MIT"
] | 1 | 2020-03-29T20:39:31.000Z | 2020-03-29T20:39:31.000Z | fabry/tools/file_io.py | jmilhone/fabry_perot | cd3cb7a1dbcaa3c9382f9f2dbd3407d95447b3ce | [
"MIT"
] | null | null | null | fabry/tools/file_io.py | jmilhone/fabry_perot | cd3cb7a1dbcaa3c9382f9f2dbd3407d95447b3ce | [
"MIT"
] | 2 | 2020-04-16T15:05:23.000Z | 2020-12-05T18:19:10.000Z | from __future__ import print_function, division
import os
import numpy as np
import h5py
def dict_2_h5(fname, dic, append=False):
'''Writes a dictionary to a hdf5 file with given filename
It will use lzf compression for all numpy arrays
Args:
fname (str): filename to write to
dic (dict): dictionary to write
append (bool): if true, will append to file instead of overwriting, default=False
'''
if append:
method = 'r+'
else:
method = 'w'
with h5py.File(fname, method) as h5:
recursive_save_dict_to_h5(h5, '/', dic)
def h5_2_dict(fname):
'''Reads a dictionary from a hdf5 file with given filename
Args:
fname (str): hdf5 filename to read
Returns:
dict: dictionary of hdf5 keys
'''
with h5py.File(fname, 'r') as h5:
return recursive_load_dict_from_h5(h5, '/')
def prep_folder(path):
'''Checks if folder exists and recursively creates folders
to ensure the path is valid
Args:
path (str): path to folder
'''
if os.path.isdir(path):
return
else:
os.makedirs(path)
def recursive_save_dict_to_h5(h5, path, dic):
''' function used in save_dict_to_h5 in order to get recursion
'''
for key, item in dic.items():
if path + key in h5: ### overwrites pre-existing keys with same name
del h5[path + key]
if type(item) in [np.ndarray, np.generic]:
h5.create_dataset(path + key, data=item, compression='lzf')
elif type(item) != dict:
try:
h5.create_dataset(path + key, data=item)
except TypeError:
raise ValueError('Cannot save %s type' % type(item))
else:
recursive_save_dict_to_h5(h5, path + key + '/', item)
def recursive_load_dict_from_h5(h5, path):
''' function used in load_h5_to_dict in order to get recursion
'''
out_dict = {}
for key, item in h5[path].items():
# if type(item) == h5py._hl.dataset.Dataset:
if isinstance(item, h5py.Dataset):
out_dict[key] = item.value
# elif type(item) == h5py._hl.group.Group:
elif isinstance(item, h5py.Group):
out_dict[key] = recursive_load_dict_from_h5(h5, path + key + '/')
return out_dict
def read_Ld_results(Ld_directory):
'''Reads L and d histogram data from multinest run
Args:
Ld_directory (str): path to multinest save directory
Returns:
Tuple (np.ndarray, np.ndarray) L histogram values (in pixels), d histogram values (in mm)
'''
try:
fname = os.path.join(Ld_directory, "Ld_post_equal_weights.dat")
post = np.loadtxt(fname, ndmin=2)
except IOError:
fname = os.path.join(Ld_directory, "Ld_solver_post_equal_weights.dat")
post = np.loadtxt(fname, ndmin=2)
L = post[:, 0]
d = post[:, 1]
return L, d
| 28.291045 | 97 | 0.611976 |
727582490ff712919e59b1f8a7dcf9ac45d6d3f9 | 1,786 | py | Python | derivadas.py | lucaspompeun/metodos-matematicos-aplicados-nas-engenharias-via-sistemas-computacionais | 008d397f76a935af1aba530cc0134b9dd326d3ac | [
"MIT"
] | 16 | 2019-09-27T03:08:44.000Z | 2020-10-16T18:43:45.000Z | primeira-edicao/derivadas.py | gm2sc-ifpa/metodos-matematicos-aplicados-nas-engenharias-via-sistemas-computacionais-master | f435c366e08dc14b0557f2172ad3b841ddb7ef2e | [
"MIT"
] | null | null | null | primeira-edicao/derivadas.py | gm2sc-ifpa/metodos-matematicos-aplicados-nas-engenharias-via-sistemas-computacionais-master | f435c366e08dc14b0557f2172ad3b841ddb7ef2e | [
"MIT"
] | 5 | 2019-09-13T20:00:38.000Z | 2020-09-19T03:04:00.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 23 21:57:48 2019
INSTITUTO FEDERAL DE EDUCAO, CINCIA E TECNOLOGIA DO PRA - IFPA ANANINDEUA
@author:
Prof. Dr. Denis C. L. Costa
Discentes:
Heictor Alves de Oliveira Costa
Lucas Pompeu Neves
Grupo de Pesquisa:
Gradiente de Modelagem Matemtica e
Simulao Computacional - GMSC
Assunto:
Derivada de uma Funo com uma varivel independente
Nome do sript: derivadas
Disponvel em:
https://github.com/GM2SC/DEVELOPMENT-OF-MATHEMATICAL-METHODS-IN-
COMPUTATIONAL-ENVIRONMENT/blob/master/SINEPEM_2019/derivadas.py
"""
# Bibliotecas
# Clculo Diferencial e Integral: sympy
import sympy as sy
# Variveis simblicas
x = sy.symbols('x')
print('')
# Funo de uma Varivel: f(x)
# (f(x), x, 1) --> (Funo, varivel, ordem da derivada)
# Derivada 1 da Funo: df1(x)
# Derivada 2 da Funo: df2(x)
print('')
print('=======================================')
print('Funo Analisada: f(x) =', f(x))
print('Derivada 1 da Funo: df1(x) =', df1(x))
print('Derivada 2 da Funo: df2(x) =', df2(x))
print('=======================================')
print('')
# Valor Numrico das Derivadas: x = x1 e x = x2
x1 = 3
print('Valor Numrico da Derivada 1 em x1 =', x1)
VN_df1 = df1(x).subs(x,x1)
print('VN_df1 =', VN_df1)
print('')
x2 = -1
print('Valor Numrico da Derivada 2 em x2 =', x2)
VN_df2 = df2(x).subs(x,x2)
print('VN_df2 =', VN_df2)
print('')
print('---> Fim do Programa derivadas <---')
| 23.813333 | 78 | 0.570549 |
72789eb5c6f77f3e712cea1375e6fa57c2e3d189 | 1,170 | py | Python | trapping_rain_water/solution.py | haotianzhu/C_Questions_Solutions | 2677b6d26bedb9bc6c6137a2392d0afaceb91ec2 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | trapping_rain_water/solution.py | haotianzhu/C_Questions_Solutions | 2677b6d26bedb9bc6c6137a2392d0afaceb91ec2 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | trapping_rain_water/solution.py | haotianzhu/C_Questions_Solutions | 2677b6d26bedb9bc6c6137a2392d0afaceb91ec2 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null |
if __name__ == '__main__':
res = Solution().trap([])
print(res) | 24.375 | 103 | 0.616239 |
72792ffbb67fb0954aabb51561db8a143501fbea | 607 | py | Python | ABC/178/D.py | yu9824/AtCoder | 50a209059c005efadc1c912e443ec41365381c16 | [
"MIT"
] | null | null | null | ABC/178/D.py | yu9824/AtCoder | 50a209059c005efadc1c912e443ec41365381c16 | [
"MIT"
] | null | null | null | ABC/178/D.py | yu9824/AtCoder | 50a209059c005efadc1c912e443ec41365381c16 | [
"MIT"
] | null | null | null | # list(map(int, input().split()))
# int(input())
import sys
sys.setrecursionlimit(10 ** 9)
'''
DP
A[n] = A[n-3] + A[n-4] + ... + A[0] (O(S**2))
A[n-1] = A[n-4] + A[n-5] + ... + A[0]
A[n] = A[n-3] + A[n-1](O(S))
'''
mod = 10 ** 9 + 7
if __name__ == '__main__':
args = [int(input())]
main(*args)
| 18.96875 | 59 | 0.444811 |
727a16aa07e94a6fe76bbd40cc0c276c9724b76b | 2,517 | py | Python | contrib/analysis_server/src/analysis_server/factory.py | OzanCKN/OpenMDAO-Framework | 05e9d4b9bc41d0ec00a7073545146c925cd33b0b | [
"Apache-2.0"
] | 1 | 2015-11-05T11:14:45.000Z | 2015-11-05T11:14:45.000Z | contrib/analysis_server/src/analysis_server/factory.py | janus/OpenMDAO-Framework | 05e9d4b9bc41d0ec00a7073545146c925cd33b0b | [
"Apache-2.0"
] | null | null | null | contrib/analysis_server/src/analysis_server/factory.py | janus/OpenMDAO-Framework | 05e9d4b9bc41d0ec00a7073545146c925cd33b0b | [
"Apache-2.0"
] | 1 | 2020-07-15T02:45:54.000Z | 2020-07-15T02:45:54.000Z | from openmdao.main.factory import Factory
from analysis_server import client, proxy, server
| 28.602273 | 80 | 0.573699 |
727b538b13be55c65e12b2a82a23b2e3906b8885 | 474 | py | Python | web/migrations/0007_auto_20180824_0925.py | zinaukarenku/zkr-platform | 8daf7d1206c482f1f8e0bcd54d4fde783e568774 | [
"Apache-2.0"
] | 2 | 2018-11-16T21:45:17.000Z | 2019-02-03T19:55:46.000Z | web/migrations/0007_auto_20180824_0925.py | zinaukarenku/zkr-platform | 8daf7d1206c482f1f8e0bcd54d4fde783e568774 | [
"Apache-2.0"
] | 13 | 2018-08-17T19:12:11.000Z | 2022-03-11T23:27:41.000Z | web/migrations/0007_auto_20180824_0925.py | zinaukarenku/zkr-platform | 8daf7d1206c482f1f8e0bcd54d4fde783e568774 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1 on 2018-08-24 09:25
from django.db import migrations, models
import web.models
| 23.7 | 110 | 0.662447 |
727c127931f6990427efb822c10447cc3dcfa23b | 1,726 | bzl | Python | antlir/bzl/image_actions/tarball.bzl | SaurabhAgarwala/antlir | d9513d35d3eaa9d28717a40057a14d099c6ec775 | [
"MIT"
] | null | null | null | antlir/bzl/image_actions/tarball.bzl | SaurabhAgarwala/antlir | d9513d35d3eaa9d28717a40057a14d099c6ec775 | [
"MIT"
] | null | null | null | antlir/bzl/image_actions/tarball.bzl | SaurabhAgarwala/antlir | d9513d35d3eaa9d28717a40057a14d099c6ec775 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
load("//antlir/bzl:maybe_export_file.bzl", "maybe_export_file")
load("//antlir/bzl:shape.bzl", "shape")
load(
"//antlir/bzl:target_tagger.bzl",
"image_source_as_target_tagged_shape",
"new_target_tagger",
"target_tagged_image_source_shape",
"target_tagger_to_feature",
)
tarball_t = shape.shape(
force_root_ownership = shape.field(bool, optional = True),
into_dir = shape.path(),
source = target_tagged_image_source_shape,
)
def image_tarball(source, dest, force_root_ownership = False):
"""
`image.tarball("files/xyz.tar", "/a/b")` extracts tarball located at `files/xyz.tar` to `/a/b` in the image --
- `source` is one of:
- an `image.source` (docs in `image_source.bzl`), or
- the path of a target outputting a tarball target path,
e.g. an `export_file` or a `genrule`
- `dest` is the destination of the unpacked tarball in the image.
This is an image-absolute path to a directory that must be created
by another `feature_new` item.
"""
target_tagger = new_target_tagger()
tarball = shape.new(
tarball_t,
force_root_ownership = force_root_ownership,
into_dir = dest,
source = image_source_as_target_tagged_shape(
target_tagger,
maybe_export_file(source),
),
)
return target_tagger_to_feature(
target_tagger,
items = struct(tarballs = [tarball]),
# The `fake_macro_library` docblock explains this self-dependency
extra_deps = ["//antlir/bzl/image_actions:tarball"],
)
| 34.52 | 110 | 0.685979 |
727ca773247407a0b44c8ae5a52c27e130f63397 | 6,165 | py | Python | sqlmat/utils.py | haobtc/sqlmat | c6b6ef966ba01173b6a485afb932ed438c35b211 | [
"MIT"
] | null | null | null | sqlmat/utils.py | haobtc/sqlmat | c6b6ef966ba01173b6a485afb932ed438c35b211 | [
"MIT"
] | null | null | null | sqlmat/utils.py | haobtc/sqlmat | c6b6ef966ba01173b6a485afb932ed438c35b211 | [
"MIT"
] | null | null | null | from typing import Tuple, List, Optional
import json
import sys
import os
import shlex
import asyncio
import argparse
import logging
import tempfile
from urllib.parse import urlparse
logger = logging.getLogger(__name__)
# run psql client
# run dbdump
# generate alembic migrations
ALEMBIC_INIT = '''\
# A generic, single database configuration.
[alembic]
# path to migration scripts
script_location = migrations
# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s
# timezone to use when rendering the date
# within the migration file as well as the filename.
# string value is passed to dateutil.tz.gettz()
# leave blank for localtime
# timezone =
# max length of characters to apply to the
# "slug" field
#truncate_slug_length = 40
# set to 'true' to run the environment during
# the 'revision' command, regardless of autogenerate
# revision_environment = false
# set to 'true' to allow .pyc and .pyo files without
# a source .py file to be detected as revisions in the
# versions/ directory
# sourceless = false
# version location specification; this defaults
# to migrations/versions. When using multiple version
# directories, initial revisions must be specified with --version-path
# version_locations = %(here)s/bar %(here)s/bat migrations/versions
# the output encoding used when revision files
# are written from script.py.mako
# output_encoding = utf-8
#sqlalchemy.url = driver://user:pass@localhost/dbname
sqlalchemy.url = {{dsn}}
# Logging configuration
[loggers]
keys = root,sqlalchemy,alembic
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
qualname =
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[logger_alembic]
level = INFO
handlers =
qualname = alembic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
'''
| 28.541667 | 108 | 0.65515 |
727d45160be9a8707217c7303a6e3540147bb34c | 457 | py | Python | submit.py | young-geng/UVaClient | 8ff4a368ac8f0395248292a0d903047a074752ed | [
"BSD-2-Clause"
] | 2 | 2017-09-07T07:01:53.000Z | 2018-04-26T08:08:12.000Z | submit.py | young-geng/UVaClient | 8ff4a368ac8f0395248292a0d903047a074752ed | [
"BSD-2-Clause"
] | null | null | null | submit.py | young-geng/UVaClient | 8ff4a368ac8f0395248292a0d903047a074752ed | [
"BSD-2-Clause"
] | null | null | null | import requests
from sys import stderr
import re
| 19.041667 | 99 | 0.641138 |
727ddb1308f9ba28efd3e85b5a607205219bd3f3 | 5,028 | py | Python | FIGURE4/eddymoc_scripts/noresm_cesm_eddymoc_150yrs.py | adagj/ECS_SOconvection | d1bb935b37380f11e021a463c6a807d7527220a6 | [
"MIT"
] | 1 | 2021-11-26T00:29:28.000Z | 2021-11-26T00:29:28.000Z | FIGURE4/eddymoc_scripts/noresm_cesm_eddymoc_150yrs.py | adagj/ECS_SOconvection | d1bb935b37380f11e021a463c6a807d7527220a6 | [
"MIT"
] | null | null | null | FIGURE4/eddymoc_scripts/noresm_cesm_eddymoc_150yrs.py | adagj/ECS_SOconvection | d1bb935b37380f11e021a463c6a807d7527220a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Ada Gjermundsen
year: 2019 - 2021
This script is used to calculate the eddy-induced overturning in CESM2 and NorESM2 (LM and MM) south of 50S
for the CMIP experiments piControl and abrupt-4xCO2 after 150
the average time is 30 years
The result is used in FIGURE 4
"""
import sys
sys.path.insert(1, '/scratch/adagj/CMIP6/CLIMSENS/CMIP6_UTILS')
import CMIP6_ATMOS_UTILS as atmos
import CMIP6_SEAICE_UTILS as ocean
from read_modeldata_cmip6 import ecs_models_cmip6, make_filelist_cmip6, Modelinfo
import numpy as np
from dask.diagnostics import ProgressBar
import warnings
warnings.simplefilter('ignore')
import xarray as xr
xr.set_options(enable_cftimeindex=True)
if __name__ == '__main__':
outpath = 'path_to_outdata/'
models = ecs_models_cmip6()
models = {'NorESM2-LM':models['NorESM2-LM'], 'CESM2':models['CESM2']}
for var in ['msftmzsmpa', 'msftmzmpa']:
make_last_30yrs_avg(models, var=var, outpath=outpath, endyr=150)
| 45.297297 | 202 | 0.666468 |
7280fea22c910a6288443234b126b5c1c0f5d8b9 | 4,161 | py | Python | wings/planner.py | KnowledgeCaptureAndDiscovery/wings-client | af1d068f4adc07d9060afa94dc99e0b2565be088 | [
"Apache-2.0"
] | null | null | null | wings/planner.py | KnowledgeCaptureAndDiscovery/wings-client | af1d068f4adc07d9060afa94dc99e0b2565be088 | [
"Apache-2.0"
] | 8 | 2019-07-28T17:04:38.000Z | 2019-08-06T23:57:08.000Z | wings/planner.py | KnowledgeCaptureAndDiscovery/wings-client | af1d068f4adc07d9060afa94dc99e0b2565be088 | [
"Apache-2.0"
] | 1 | 2019-07-29T22:53:41.000Z | 2019-07-29T22:53:41.000Z | import json
import re
| 37.827273 | 93 | 0.550829 |
72825a6195e36bed57090b1163e99522e513ffd4 | 2,410 | py | Python | eggs/ZConfig-3.0.4-py2.7.egg/ZConfig/tests/test_cookbook.py | salayhin/talkofacta | 8b5a14245dd467bb1fda75423074c4840bd69fb7 | [
"MIT"
] | null | null | null | eggs/ZConfig-3.0.4-py2.7.egg/ZConfig/tests/test_cookbook.py | salayhin/talkofacta | 8b5a14245dd467bb1fda75423074c4840bd69fb7 | [
"MIT"
] | null | null | null | eggs/ZConfig-3.0.4-py2.7.egg/ZConfig/tests/test_cookbook.py | salayhin/talkofacta | 8b5a14245dd467bb1fda75423074c4840bd69fb7 | [
"MIT"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2004 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Tests of examples from the online cookbook, so we don't break them
down the road. Unless we really mean to.
The ZConfig Cookbook is available online at:
http://dev.zope.org/Zope3/ZConfig
"""
import ZConfig.tests.support
import unittest
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")
| 33.943662 | 78 | 0.612448 |
7282cd43987729ea642d1583bf120e197cdcc79d | 420 | py | Python | src/bullet_point/migrations/0006_bulletpoint_sift_risk_score.py | ResearchHub/ResearchHub-Backend-Open | d36dca33afae2d442690694bb2ab17180d84bcd3 | [
"MIT"
] | 18 | 2021-05-20T13:20:16.000Z | 2022-02-11T02:40:18.000Z | src/bullet_point/migrations/0006_bulletpoint_sift_risk_score.py | ResearchHub/ResearchHub-Backend-Open | d36dca33afae2d442690694bb2ab17180d84bcd3 | [
"MIT"
] | 109 | 2021-05-21T20:14:23.000Z | 2022-03-31T20:56:10.000Z | src/bullet_point/migrations/0006_bulletpoint_sift_risk_score.py | ResearchHub/ResearchHub-Backend-Open | d36dca33afae2d442690694bb2ab17180d84bcd3 | [
"MIT"
] | 4 | 2021-05-17T13:47:53.000Z | 2022-02-12T10:48:21.000Z | # Generated by Django 2.2 on 2020-11-07 01:03
from django.db import migrations, models
| 22.105263 | 62 | 0.62619 |
72831f9ef5d36065feb1e5d281d84dbd15c6710a | 1,840 | py | Python | main.py | ezhkovskii/instagrapi-rest | a3570f279ef0973856b92e433b117e0be0d4c713 | [
"MIT"
] | null | null | null | main.py | ezhkovskii/instagrapi-rest | a3570f279ef0973856b92e433b117e0be0d4c713 | [
"MIT"
] | null | null | null | main.py | ezhkovskii/instagrapi-rest | a3570f279ef0973856b92e433b117e0be0d4c713 | [
"MIT"
] | null | null | null | import pkg_resources
from fastapi import FastAPI
from fastapi.openapi.utils import get_openapi
from starlette.responses import RedirectResponse, JSONResponse
from routers import auth, media, video, photo, user, igtv, clip, album, story, hashtag, direct
app = FastAPI()
app.include_router(auth.router)
app.include_router(media.router)
app.include_router(video.router)
app.include_router(photo.router)
app.include_router(user.router)
app.include_router(igtv.router)
app.include_router(clip.router)
app.include_router(album.router)
app.include_router(story.router)
app.include_router(hashtag.router)
app.include_router(direct.router)
def custom_openapi():
if app.openapi_schema:
return app.openapi_schema
# for route in app.routes:
# body_field = getattr(route, 'body_field', None)
# if body_field:
# body_field.type_.__name__ = 'name'
openapi_schema = get_openapi(
title="instagrapi-rest",
version="1.0.0",
description="RESTful API Service for instagrapi",
routes=app.routes,
)
app.openapi_schema = openapi_schema
return app.openapi_schema
app.openapi = custom_openapi
| 28.307692 | 94 | 0.7 |
7283a25bff5f7d4878aa3e626f36db48a3d5a96f | 1,065 | py | Python | scripts/run_d435.py | suet-lee/mycelium | db83cd3ab00697f28b2def2cebcdef52698fdd92 | [
"Apache-2.0"
] | 6 | 2021-05-23T17:36:02.000Z | 2022-01-21T20:34:17.000Z | scripts/run_d435.py | suet-lee/mycelium | db83cd3ab00697f28b2def2cebcdef52698fdd92 | [
"Apache-2.0"
] | null | null | null | scripts/run_d435.py | suet-lee/mycelium | db83cd3ab00697f28b2def2cebcdef52698fdd92 | [
"Apache-2.0"
] | 1 | 2021-06-17T20:35:10.000Z | 2021-06-17T20:35:10.000Z | #!/usr/bin/env python3
from mycelium import CameraD435
from mycelium_utils import Scripter
scripter = ScripterExt(log_source="run_d435")
scripter.run()
| 29.583333 | 75 | 0.661033 |
72853d22db5f533d50b0fe4776f60ba950c28d1f | 224 | py | Python | examples/system/miniscreen/miniscreen_display_animated_image_once_simple_way.py | pi-top/pi-top-Python-SDK | 6c83cc5f612d77f86f8d391c7f2924a28f7b1232 | [
"Apache-2.0"
] | 28 | 2020-11-24T08:02:58.000Z | 2022-02-27T18:37:33.000Z | examples/system/miniscreen/miniscreen_display_animated_image_once_simple_way.py | pi-top/pi-top-Python-SDK | 6c83cc5f612d77f86f8d391c7f2924a28f7b1232 | [
"Apache-2.0"
] | 263 | 2020-11-10T14:35:10.000Z | 2022-03-31T12:35:13.000Z | examples/system/miniscreen/miniscreen_display_animated_image_once_simple_way.py | pi-top/pi-top-Python-SDK | 6c83cc5f612d77f86f8d391c7f2924a28f7b1232 | [
"Apache-2.0"
] | 1 | 2022-01-31T22:48:35.000Z | 2022-01-31T22:48:35.000Z | from PIL import Image
from pitop import Pitop
pitop = Pitop()
miniscreen = pitop.miniscreen
rocket = Image.open("/usr/lib/python3/dist-packages/pitop/miniscreen/images/rocket.gif")
miniscreen.play_animated_image(rocket)
| 20.363636 | 88 | 0.794643 |
728590b1ad401344329ed841bf7e2c36ccfdfcf3 | 119,428 | py | Python | synbioinformatica.py | nemami/synbioinformatica | 9306d7a7edb93aaa8e4de5e041db6633214c07b1 | [
"BSD-2-Clause"
] | null | null | null | synbioinformatica.py | nemami/synbioinformatica | 9306d7a7edb93aaa8e4de5e041db6633214c07b1 | [
"BSD-2-Clause"
] | null | null | null | synbioinformatica.py | nemami/synbioinformatica | 9306d7a7edb93aaa8e4de5e041db6633214c07b1 | [
"BSD-2-Clause"
] | 1 | 2021-03-01T08:48:35.000Z | 2021-03-01T08:48:35.000Z | #!/usr/bin/python -tt
import sys, re, math
from decimal import *
# TODO: work on naming scheme
# TODO: add more ORIs
# TODO: assemblytree alignment
# TODO: Wobble, SOEing
# TODO: (digestion, ligation) redundant products
# TODO: for PCR and Sequencing, renormalize based on LCS
# TODO: tutorials
dna_alphabet = {'A':'A', 'C':'C', 'G':'G', 'T':'T',
'R':'AG', 'Y':'CT', 'W':'AT', 'S':'CG', 'M':'AC', 'K':'GT',
'H':'ACT', 'B':'CGT', 'V':'ACG', 'D':'AGT',
'N':'ACGT',
'a': 'a', 'c': 'c', 'g': 'g', 't': 't',
'r':'ag', 'y':'ct', 'w':'at', 's':'cg', 'm':'ac', 'k':'gt',
'h':'act', 'b':'cgt', 'v':'acg', 'd':'agt',
'n':'acgt'}
complement_alphabet = {'A':'T', 'T':'A', 'C':'G', 'G':'C','R':'Y', 'Y':'R',
'W':'W', 'S':'S', 'M':'K', 'K':'M', 'H':'D', 'D':'H',
'B':'V', 'V':'B', 'N':'N','a':'t', 'c':'g', 'g':'c',
't':'a', 'r':'y', 'y':'r', 'w':'w', 's':'s','m':'k',
'k':'m', 'h':'d', 'd':'h', 'b':'v', 'v':'b', 'n':'n'}
gencode = {
'ATA':'I', 'ATC':'I', 'ATT':'I', 'ATG':'M',
'ACA':'T', 'ACC':'T', 'ACG':'T', 'ACT':'T',
'AAC':'N', 'AAT':'N', 'AAA':'K', 'AAG':'K',
'AGC':'S', 'AGT':'S', 'AGA':'R', 'AGG':'R',
'CTA':'L', 'CTC':'L', 'CTG':'L', 'CTT':'L',
'CCA':'P', 'CCC':'P', 'CCG':'P', 'CCT':'P',
'CAC':'H', 'CAT':'H', 'CAA':'Q', 'CAG':'Q',
'CGA':'R', 'CGC':'R', 'CGG':'R', 'CGT':'R',
'GTA':'V', 'GTC':'V', 'GTG':'V', 'GTT':'V',
'GCA':'A', 'GCC':'A', 'GCG':'A', 'GCT':'A',
'GAC':'D', 'GAT':'D', 'GAA':'E', 'GAG':'E',
'GGA':'G', 'GGC':'G', 'GGG':'G', 'GGT':'G',
'TCA':'S', 'TCC':'S', 'TCG':'S', 'TCT':'S',
'TTC':'F', 'TTT':'F', 'TTA':'L', 'TTG':'L',
'TAC':'Y', 'TAT':'Y', 'TAA':'_', 'TAG':'_',
'TGC':'C', 'TGT':'C', 'TGA':'_', 'TGG':'W'}
# Description: converts DNA string to amino acid string
def translate( sequence ):
"""Return the translated protein from 'sequence' assuming +1 reading frame"""
return ''.join([gencode.get(sequence[3*i:3*i+3],'X') for i in range(len(sequence)//3)])
# Description: read in all enzymes from REase tsv into dict EnzymeDictionary
# Description: Suffix Tree implementation for the purpose of PCR Longest Common Substring identification
# Code adapted from: http://chipsndips.livejournal.com/2005/12/07/
# Define a for a node in the suffix tree
# Description: identifies errors in primer design and raises exceptions based on errors and their context
def PCRErrorHandling(InputTuple):
(fwd,matchCount,matchedAlready,nextOrientation,currentPrimer,template) = InputTuple
if len(currentPrimer.sequence) > 7:
abbrev = currentPrimer.sequence[:3]+'...'+currentPrimer.sequence[-3:]
else:
abbrev = currentPrimer.sequence
if fwd:
if matchCount > 1: # if matches in forward direction more than once
if nextOrientation == 2: # ... but was supposed to match in reverse direction
raise Exception('*Primer error*: primers both anneal in forward (5\'->3\') orientation AND primer '+abbrev+' anneals to multiple sites in template.')
raise Exception('*Primer error*: primer '+abbrev+' anneals to multiple sites in template.')
elif matchCount == 1: # if matches in the forward direction exactly once
if nextOrientation == 2: # ... but was supposed to match in reverse direction
raise Exception('*Primer error*: primers both anneal in forward (5\'->3\') orientation.')
matchedAlready = 1
return matchedAlready
else:
if matchCount > 1: # if matches in reverse direction more than once
if matchedAlready == 1: # ... and already matched in forward direction
if nextOrientation == 1: # ... but was supposed to match in forward direction
raise Exception('*Primer error*: primers both anneal in reverse (3\'->5\') orientation AND primer '+abbrev+' anneals to multiple sites in template AND primer '+abbrev+' anneals in both orientations.')
raise Exception('*Primer error*: primer '+abbrev+' anneals to multiple sites in template AND primer '+abbrev+' anneals in both orientations.')
if nextOrientation == 1:
raise Exception('*Primer error*: primers both anneal in reverse (3\'->5\') orientation AND primer '+abbrev+' anneals to multiple sites in template.')
raise Exception('*Primer error*: primer '+abbrev+' anneals to multiple sites in template.')
elif matchCount == 1: # if matches in the reverse direction exactly once
if matchedAlready == 1: # ... and already matched in forward direction
if nextOrientation == 1: # ... but was supposed to match in forward direction
raise Exception('*Primer error*: both primers have same reverse (3\'->5\') orientation AND primer '+abbrev+' anneals in both orientations.')
raise Exception('*Primer error*: primer '+abbrev+' primes in both orientations.')
else:
matchedAlready = 2
if matchedAlready == 0: # if no matches
raise Exception('*Primer error*: primer '+abbrev+' does not anneal in either orientation.')
return matchedAlready
# Description: assigns relationships for PCR inputs and PCR product for assembly tree purposes
# Description: PCR() function constructs generalized suffix tree for template and a given primer to identify annealing region,
# and raises PrimerError exceptions for different cases of failed PCR as a result of primer design
# Note: PCR() product is not case preserving
# Description: identifies errors in primer design and raises exceptions based on errors and their context
# Description: case preserving reverse complementation of nucleotide sequences
# Description: case preserving string reversal
# Description: case preserving complementation of nucleotide sequences
# Primer TM function suite: primerTm(), primerTmsimple(), get_55_primer(), nearestNeighborTmNonDegen(), getTerminalCorrectionsDsHash(),
# getTerminalCorrectionsDhHash(), getDsHash(), getDhHash()
# Implemented by Tim Hsaiu in JavaScript, adapted to Python by Nima Emami
# Based on Santa Lucia et. al. papers
# phusion notes on Tm
# https://www.finnzymes.fi/optimizing_tm_and_annealing.html
# get substring from the beginning of input that is 55C Tm
# Description: initialize Digest function parameters and checks for acceptable input format
# Description: finds restriction sites for given Enzymes in given InputDNA molecule
# Description: if you have overlapping restriction sites, choose the first one and discard the second
# TODO: revise this?
# Description: determines digest start and stop indices, as well as overhang indices for left and right restriction
# Description: instantiates Overhang object as the TLO or BLO field of a digested DNA molecule object
# Description: instantiates Overhang object as the TRO or BRO field of a digested DNA molecule object
# Description: take digest fragments before they're output, and sets assemblytree relationships and fields,
# as well as digest buffer
# Description: takes in InputDNA molecule and list of EnzymeDictionary elements, outputting a list of digest products
# Description: BaseExpand() for regex generation, taken from BioPython
def BaseExpand(base):
"""BaseExpand(base) -> string.
given a degenerated base, returns its meaning in IUPAC alphabet.
i.e:
b= 'A' -> 'A'
b= 'N' -> 'ACGT'
etc..."""
base = base.upper()
return dna_alphabet[base]
# Description: regex() function to convert recog site into regex, from Biopython
def regex(site):
"""regex(site) -> string.
Construct a regular expression from a DNA sequence.
i.e.:
site = 'ABCGN' -> 'A[CGT]CG.'"""
reg_ex = site
for base in reg_ex:
if base in ('A', 'T', 'C', 'G', 'a', 'c', 'g', 't'):
pass
if base in ('N', 'n'):
reg_ex = '.'.join(reg_ex.split('N'))
reg_ex = '.'.join(reg_ex.split('n'))
if base in ('R', 'Y', 'W', 'M', 'S', 'K', 'H', 'D', 'B', 'V'):
expand = '['+ str(BaseExpand(base))+']'
reg_ex = expand.join(reg_ex.split(base))
return reg_ex
# Description: ToRegex() function to convert recog site into regex, from Biopython
# Description: restrictionEnzyme class encapsulates information about buffers, overhangs, incubation / inactivation, end distance, etc.
# Description: phosphorylates 5' end of DNA molecule, allowing blunt end ligation
# see http://openwetware.org/wiki/PNK_Treatment_of_DNA_Ends
def TreatPNK(inputDNAs):
for inputDNA in inputDNAs:
inputDNA.phosphorylate()
return inputDNAs
# Description: DigestBuffer() function finds the optimal digestBuffer
# todo: If Buffer 2 > 150, return Buffer 2 and list of activity values, else, return buffer 1, 3, or 4 (ignore EcoRI)
# return format will be list, [rec_buff, [buff1_act, buff2_act...buff4_Act]]
#accepts two primers and list of input template DNAs
#todo:implement this with PCR!
#given a parent plasmid and a desired product plasmid, design the eipcr primers
#use difflib to figure out where the differences are
#if there is a convenient restriction site in or near the modification, use that
# otherwise, check if there exists bseRI or bsaI sites, and design primers using those
# print/return warning if can't do this via eipcr (insert span too long)
# TODO: Implement this, along with restriction site checking?
#only returns True if can distinguish between all of the DNA bands
# Description: SetFlags() returns overhang information about a DNA() digest object
# Description: Ligate() function accepts a list of DNA() digest objects, and outputs list of DNA
# Description: fragment processing function for zymo, short fragment and gel cleanups
# Description: ZymoPurify() function takes a list of DNA objects and filters out < 300 bp DNA's
# Description: ShortFragmentCleanup() function takes a list of DNA objects and filters out < 50 bp DNA's
# Description: GelAndZymoPurify() function employs a user-specified purification strategy to cut out a range of band sizes, and
# then filters out < 300 bp DNA's. If 50 bp < [ ] < 300 bp DNAs are detected, switches to short fragment cleanup mode.
# Description: Ligate() function that allows linear ligation products
# Note: also disallows blunt end ligation
# Note: going to stick with the convention where they actually pass a list of restriction enzymes
# As in: GoldenGate(vector_DNA, list_of_DNAs, EnzymeDictionary['BsaI'], ['AmpR', 'KanR'])
# Description: HasFeature() function checks for presence of regex-encoded feature in seq
#####Origins Suite: Checks for presence of certain origins of replication#####
#####Resistance Suite: Checks for presence of certain antibiotic resistance markers#####
# Description: accepts list of dnas and a strain, it should output a list of DNAs that survive the transformation
# this would completely reciplate the TransformPlateMiniprep cycle, it returns all the DNAs present in the cell
def TransformPlateMiniprep(DNAs, strain):
#strain is an object
transformed = strain.plasmids
selectionList = []
for dna in DNAs:
#check if circular, confers new resistance on strain, and doesn't compete with existing plasmid in strain
if dna.topology == 'circular':
newR = False
replicon_ok = False
no_existing_plasmid = False
err_msg = ""
success_msg = ""
resistances = HasResistance(dna.sequence)
replicons = HasReplicon(dna.sequence)
#just need one resistance not already in strain
for resistance in resistances:
if not(resistance in strain.resistance):
newR = True
if not resistance in selectionList:
selectionList.append(resistance)
success_msg += "\nTransformation of "+dna.name+" into "+strain.name+" successful -- use "+resistance+" antibiotic selection.\n"
for replicon in replicons:
#has the pir/repA necessary for ColE2/R6K?
if replicon in strain.replication:
replicon_ok = True
for replicon in replicons:
#check if existing plasmid would compete
existing_plasmids = []
for p in strain.plasmids:
existing_plasmids.append( HasReplicon(p.sequence) )
if not(replicon in existing_plasmids ):
no_existing_plasmid = True
if(newR & replicon_ok & no_existing_plasmid):
parent = dna.clone()
parent.setChildren((dna, ))
dna.addParent(parent)
parent.instructions = 'Transform '+dna.name+' into '+strain.name+', selecting for '+resistance+' resistance.'
parent.setTimeStep(24)
parent.addMaterials(['Buffers P1,P2,N3,PB,PE','Miniprep column',resistance[:-1]+' LB agar plates','LB '+resistance[:-1]+' media'])
transformed.append(dna)
print success_msg
else:
if not(newR):
raise Exception('*Transformation Error*: for transformation of '+dna.name+' into '+strain.name+', plasmid either doesn\'t have an antibiotic resistance or doesn\'t confer a new one on this strain')
if not(replicon_ok):
raise Exception('*Transformation Error*: for transformation of "'+dna.name+'" into "'+strain.name+'", plasmid replicon won\'t function in this strain')
if not(no_existing_plasmid):
raise Exception('*Transformation Error*: for transformation of "'+dna.name+'" into "'+strain.name+'", transformed plasmid replicon competes with existing plasmid in strain')
if len(transformed)<1:
raise Exception("*Transformation Error*: For transformation of "+dna.name+" into "+strain.name+", no DNAs successfully transformed. DNAs may be linear.")
return transformed | 62.040519 | 836 | 0.636509 |
7285a6d4732937feeb025500720c611d893078bb | 753 | py | Python | scriptd/app/flask_helper.py | jasonszang/scriptd | e612f10971ca5d98ffff7e0680485575792529e7 | [
"MIT"
] | 1 | 2018-09-05T06:54:54.000Z | 2018-09-05T06:54:54.000Z | scriptd/app/flask_helper.py | jasonszang/scriptd | e612f10971ca5d98ffff7e0680485575792529e7 | [
"MIT"
] | null | null | null | scriptd/app/flask_helper.py | jasonszang/scriptd | e612f10971ca5d98ffff7e0680485575792529e7 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
"""Helper for working with flask"""
import logging
from flask import Flask
from flask import request
from typing import Text
| 25.1 | 92 | 0.649402 |
7285e9ab42c1215b9cfd19e9d7ea2bd99678e38c | 2,789 | py | Python | evology/research/MCarloLongRuns/Exp1_WSvsReturn.py | aymericvie/evology | 8f00d94dee7208be5a5bdd0375a9d6ced25097f4 | [
"Apache-2.0"
] | null | null | null | evology/research/MCarloLongRuns/Exp1_WSvsReturn.py | aymericvie/evology | 8f00d94dee7208be5a5bdd0375a9d6ced25097f4 | [
"Apache-2.0"
] | 2 | 2022-01-10T02:10:56.000Z | 2022-01-14T03:41:42.000Z | evology/research/MCarloLongRuns/Exp1_WSvsReturn.py | aymericvie/evology | 8f00d94dee7208be5a5bdd0375a9d6ced25097f4 | [
"Apache-2.0"
] | null | null | null | # Imports
import numpy as np
import pandas as pd
import sys
import tqdm
import warnings
import time
import ternary
from ternary.helpers import simplex_iterator
import multiprocessing as mp
warnings.simplefilter("ignore")
if sys.platform == "darwin":
sys.path.append("/Users/aymericvie/Documents/GitHub/evology/evology/code")
# Need to be executed from cd to MCarloLongRuns
if sys.platform == "linux":
sys.path.append("/home/vie/Documents/GitHub/evology/evology/code")
from main import main as evology
startTime = time.time()
TimeHorizon = 252 * 5
PopulationSize = 3
# Define the domains
reps = 10
scale = 50 # increment = 1/scale
param = GenerateCoords(reps, scale)
# print(param)
print(len(param))
# Run experiment
if __name__ == "__main__":
data = main()
df = pd.DataFrame()
# Inputs
df["WS_NT"] = data[:, 0]
df["WS_VI"] = data[:, 1]
df["WS_TF"] = data[:, 2]
# Outputs
df["NT_returns_mean"] = data[:, 3]
df["VI_returns_mean"] = data[:, 4]
df["TF_returns_mean"] = data[:, 5]
df["NT_returns_std"] = data[:, 6]
df["VI_returns_std"] = data[:, 7]
df["TF_returns_std"] = data[:, 8]
df["HighestT"] = data[:, 9]
df["AvgAbsT"] = data[:, 10]
print(df)
df.to_csv("data/data1.csv")
print("Completion time: " + str(time.time() - startTime))
| 24.043103 | 78 | 0.570097 |
7286c123e2e1e4752621f27aef91caae14dc1664 | 727 | py | Python | ex039.py | vinisantos7/PythonExercicios | bc8f38e03a606d6b0216632a93affeab0792e534 | [
"MIT"
] | 2 | 2021-11-04T21:09:11.000Z | 2021-11-08T09:42:10.000Z | ex039.py | vinisantos7/PythonExercicios | bc8f38e03a606d6b0216632a93affeab0792e534 | [
"MIT"
] | null | null | null | ex039.py | vinisantos7/PythonExercicios | bc8f38e03a606d6b0216632a93affeab0792e534 | [
"MIT"
] | null | null | null | print("@"*30)
print("Alistamento - Servio Militar")
print("@"*30)
from datetime import date
ano_nasc = int(input("Digite seu ano de nascimento: "))
ano_atual = date.today().year
idade = ano_atual - ano_nasc
print(f"Quem nasceu em {ano_nasc} tem {idade} anos em {ano_atual}")
if idade == 18:
print(" a hora de se alistar no servio militar, IMEDIATAMENTE!")
elif idade < 18:
saldo = 18 - idade
print(f"Ainda falta {saldo} anos para o seu alistamento!")
ano = ano_atual + saldo
print(f"Seu alistamento ser em {ano}")
else:
idade > 18
saldo = idade - 18
print(f"J passou {saldo} anos do tempo para o seu alistamento!")
ano = ano_atual - saldo
print(f"O seu alistamento foi em {ano}") | 30.291667 | 70 | 0.674003 |
728800a60a85756e4875a7047b803fa961c8c2d3 | 25,990 | py | Python | test/python/spl/tk17/opt/.__splpy/packages/streamsx/topology/tester.py | Jaimie-Jin1/streamsx.topology | 6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08 | [
"Apache-2.0"
] | 31 | 2015-06-24T06:21:14.000Z | 2020-08-28T21:45:50.000Z | test/python/spl/tk17/opt/.__splpy/packages/streamsx/topology/tester.py | Jaimie-Jin1/streamsx.topology | 6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08 | [
"Apache-2.0"
] | 1,203 | 2015-06-15T02:11:49.000Z | 2021-03-22T09:47:54.000Z | test/python/spl/tk17/opt/.__splpy/packages/streamsx/topology/tester.py | Jaimie-Jin1/streamsx.topology | 6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08 | [
"Apache-2.0"
] | 53 | 2015-05-28T21:14:16.000Z | 2021-12-23T12:58:59.000Z | # coding=utf-8
# Licensed Materials - Property of IBM
# Copyright IBM Corp. 2017
"""Testing support for streaming applications.
Allows testing of a streaming application by creation conditions
on streams that are expected to become valid during the processing.
`Tester` is designed to be used with Python's `unittest` module.
A complete application may be tested or fragments of it, for example a sub-graph can be tested
in isolation that takes input data and scores it using a model.
Supports execution of the application on
:py:const:`~streamsx.topology.context.ContextTypes.STREAMING_ANALYTICS_SERVICE`,
:py:const:`~streamsx.topology.context.ContextTypes.DISTRIBUTED`
or :py:const:`~streamsx.topology.context.ContextTypes.STANDALONE`.
A :py:class:`Tester` instance is created and associated with the :py:class:`Topology` to be tested.
Conditions are then created against streams, such as a stream must receive 10 tuples using
:py:meth:`~Tester.tuple_count`.
Here is a simple example that tests a filter correctly only passes tuples with values greater than 5::
import unittest
from streamsx.topology.topology import Topology
from streamsx.topology.tester import Tester
class TestSimpleFilter(unittest.TestCase):
def setUp(self):
# Sets self.test_ctxtype and self.test_config
Tester.setup_streaming_analytics(self)
def test_filter(self):
# Declare the application to be tested
topology = Topology()
s = topology.source([5, 7, 2, 4, 9, 3, 8])
s = s.filter(lambda x : x > 5)
# Create tester and assign conditions
tester = Tester(topology)
tester.contents(s, [7, 9, 8])
# Submit the application for test
# If it fails an AssertionError will be raised.
tester.test(self.test_ctxtype, self.test_config)
A stream may have any number of conditions and any number of streams may be tested.
A py:meth:`~Tester.local_check` is supported where a method of the
unittest class is executed once the job becomes healthy. This performs
checks from the context of the Python unittest class, such as
checking external effects of the application or using the REST api to
monitor the application.
.. warning::
Python 3.5 and Streaming Analytics service or IBM Streams 4.2 or later is required when using `Tester`.
"""
import streamsx.ec as ec
import streamsx.topology.context as stc
import os
import unittest
import logging
import collections
import threading
from streamsx.rest import StreamsConnection
from streamsx.rest import StreamingAnalyticsConnection
from streamsx.topology.context import ConfigParams
import time
import streamsx.topology.tester_runtime as sttrt
_logger = logging.getLogger('streamsx.topology.test')
def tuple_count(self, stream, count, exact=True):
"""Test that a stream contains a number of tuples.
If `exact` is `True`, then condition becomes valid when `count`
tuples are seen on `stream` during the test. Subsequently if additional
tuples are seen on `stream` then the condition fails and can never
become valid.
If `exact` is `False`, then the condition becomes valid once `count`
tuples are seen on `stream` and remains valid regardless of
any additional tuples.
Args:
stream(Stream): Stream to be tested.
count(int): Number of tuples expected.
exact(bool): `True` if the stream must contain exactly `count`
tuples, `False` if the stream must contain at least `count` tuples.
Returns:
Stream: stream
"""
_logger.debug("Adding tuple count (%d) condition to stream %s.", count, stream)
if exact:
name = "ExactCount" + str(len(self._conditions))
cond = sttrt._TupleExactCount(count, name)
cond._desc = "{0} stream expects tuple count equal to {1}.".format(stream.name, count)
else:
name = "AtLeastCount" + str(len(self._conditions))
cond = sttrt._TupleAtLeastCount(count, name)
cond._desc = "'{0}' stream expects tuple count of at least {1}.".format(stream.name, count)
return self.add_condition(stream, cond)
def contents(self, stream, expected, ordered=True):
"""Test that a stream contains the expected tuples.
Args:
stream(Stream): Stream to be tested.
expected(list): Sequence of expected tuples.
ordered(bool): True if the ordering of received tuples must match expected.
Returns:
Stream: stream
"""
name = "StreamContents" + str(len(self._conditions))
if ordered:
cond = sttrt._StreamContents(expected, name)
cond._desc = "'{0}' stream expects tuple ordered contents: {1}.".format(stream.name, expected)
else:
cond = sttrt._UnorderedStreamContents(expected, name)
cond._desc = "'{0}' stream expects tuple unordered contents: {1}.".format(stream.name, expected)
return self.add_condition(stream, cond)
def tuple_check(self, stream, checker):
"""Check each tuple on a stream.
For each tuple ``t`` on `stream` ``checker(t)`` is called.
If the return evaluates to `False` then the condition fails.
Once the condition fails it can never become valid.
Otherwise the condition becomes or remains valid. The first
tuple on the stream makes the condition valid if the checker
callable evaluates to `True`.
The condition can be combined with :py:meth:`tuple_count` with
``exact=False`` to test a stream map or filter with random input data.
An example of combining `tuple_count` and `tuple_check` to test a filter followed
by a map is working correctly across a random set of values::
def rands():
r = random.Random()
while True:
yield r.random()
class TestFilterMap(unittest.testCase):
# Set up omitted
def test_filter(self):
# Declare the application to be tested
topology = Topology()
r = topology.source(rands())
r = r.filter(lambda x : x > 0.7)
r = r.map(lambda x : x + 0.2)
# Create tester and assign conditions
tester = Tester(topology)
# Ensure at least 1000 tuples pass through the filter.
tester.tuple_count(r, 1000, exact=False)
tester.tuple_check(r, lambda x : x > 0.9)
# Submit the application for test
# If it fails an AssertionError will be raised.
tester.test(self.test_ctxtype, self.test_config)
Args:
stream(Stream): Stream to be tested.
checker(callable): Callable that must evaluate to True for each tuple.
"""
name = "TupleCheck" + str(len(self._conditions))
cond = sttrt._TupleCheck(checker, name)
return self.add_condition(stream, cond)
def local_check(self, callable):
"""Perform local check while the application is being tested.
A call to `callable` is made after the application under test is submitted and becomes healthy.
The check is in the context of the Python runtime executing the unittest case,
typically the callable is a method of the test case.
The application remains running until all the conditions are met
and `callable` returns. If `callable` raises an error, typically
through an assertion method from `unittest` then the test will fail.
Used for testing side effects of the application, typically with `STREAMING_ANALYTICS_SERVICE`
or `DISTRIBUTED`. The callable may also use the REST api for context types that support
it to dynamically monitor the running application.
The callable can use `submission_result` and `streams_connection` attributes from :py:class:`Tester` instance
to interact with the job or the running Streams instance.
Simple example of checking the job is healthy::
import unittest
from streamsx.topology.topology import Topology
from streamsx.topology.tester import Tester
class TestLocalCheckExample(unittest.TestCase):
def setUp(self):
Tester.setup_distributed(self)
def test_job_is_healthy(self):
topology = Topology()
s = topology.source(['Hello', 'World'])
self.tester = Tester(topology)
self.tester.tuple_count(s, 2)
# Add the local check
self.tester.local_check = self.local_checks
# Run the test
self.tester.test(self.test_ctxtype, self.test_config)
def local_checks(self):
job = self.tester.submission_result.job
self.assertEqual('healthy', job.health)
.. warning::
A local check must not cancel the job (application under test).
Args:
callable: Callable object.
"""
self.local_check = callable
def test(self, ctxtype, config=None, assert_on_fail=True, username=None, password=None):
"""Test the topology.
Submits the topology for testing and verifies the test conditions are met and the job remained healthy through its execution.
The submitted application (job) is monitored for the test conditions and
will be canceled when all the conditions are valid or at least one failed.
In addition if a local check was specified using :py:meth:`local_check` then
that callable must complete before the job is cancelled.
The test passes if all conditions became valid and the local check callable (if present) completed without
raising an error.
The test fails if the job is unhealthy, any condition fails or the local check callable (if present) raised an exception.
Args:
ctxtype(str): Context type for submission.
config: Configuration for submission.
assert_on_fail(bool): True to raise an assertion if the test fails, False to return the passed status.
username(str): username for distributed tests
password(str): password for distributed tests
Attributes:
submission_result: Result of the application submission from :py:func:`~streamsx.topology.context.submit`.
streams_connection(StreamsConnection): Connection object that can be used to interact with the REST API of
the Streaming Analytics service or instance.
Returns:
bool: `True` if test passed, `False` if test failed if `assert_on_fail` is `False`.
"""
# Add the conditions into the graph as sink operators
_logger.debug("Adding conditions to topology %s.", self.topology.name)
for ct in self._conditions.values():
condition = ct[1]
stream = ct[0]
stream.for_each(condition, name=condition.name)
if config is None:
config = {}
_logger.debug("Starting test topology %s context %s.", self.topology.name, ctxtype)
if stc.ContextTypes.STANDALONE == ctxtype:
passed = self._standalone_test(config)
elif stc.ContextTypes.DISTRIBUTED == ctxtype:
passed = self._distributed_test(config, username, password)
elif stc.ContextTypes.STREAMING_ANALYTICS_SERVICE == ctxtype or stc.ContextTypes.ANALYTICS_SERVICE == ctxtype:
passed = self._streaming_analytics_test(ctxtype, config)
else:
raise NotImplementedError("Tester context type not implemented:", ctxtype)
if 'conditions' in self.result:
for cn,cnr in self.result['conditions'].items():
c = self._conditions[cn][1]
cdesc = cn
if hasattr(c, '_desc'):
cdesc = c._desc
if 'Fail' == cnr:
_logger.error("Condition: %s : %s", cnr, cdesc)
elif 'NotValid' == cnr:
_logger.warning("Condition: %s : %s", cnr, cdesc)
elif 'Valid' == cnr:
_logger.info("Condition: %s : %s", cnr, cdesc)
if assert_on_fail:
assert passed, "Test failed for topology: " + self.topology.name
if passed:
_logger.info("Test topology %s passed for context:%s", self.topology.name, ctxtype)
else:
_logger.error("Test topology %s failed for context:%s", self.topology.name, ctxtype)
return passed
def _standalone_test(self, config):
""" Test using STANDALONE.
Success is solely indicated by the process completing and returning zero.
"""
sr = stc.submit(stc.ContextTypes.STANDALONE, self.topology, config)
self.submission_result = sr
self.result = {'passed': sr['return_code'], 'submission_result': sr}
return sr['return_code'] == 0
#######################################
# Internal functions
#######################################
| 39.740061 | 133 | 0.634052 |
72881bbcc670bbaede8d42280fea146e0bccefea | 702 | py | Python | piglatin_microservice/views/main.py | Curly-Mo/piglatin | 9ea4a7533675bcb5b28f708beda18f175e0a9fe4 | [
"MIT"
] | null | null | null | piglatin_microservice/views/main.py | Curly-Mo/piglatin | 9ea4a7533675bcb5b28f708beda18f175e0a9fe4 | [
"MIT"
] | null | null | null | piglatin_microservice/views/main.py | Curly-Mo/piglatin | 9ea4a7533675bcb5b28f708beda18f175e0a9fe4 | [
"MIT"
] | null | null | null | from flask import request, jsonify, Blueprint
from .. import piglatin
main = Blueprint('main', __name__)
| 23.4 | 68 | 0.650997 |
7289763d0bdfbe7696c866a5439b0ea41f2358eb | 1,240 | py | Python | projects/pong-game/pong.py | sumanentc/Python-Projects | 11c763fcbe4e088928bd56c28f767b93ae73984d | [
"MIT"
] | null | null | null | projects/pong-game/pong.py | sumanentc/Python-Projects | 11c763fcbe4e088928bd56c28f767b93ae73984d | [
"MIT"
] | null | null | null | projects/pong-game/pong.py | sumanentc/Python-Projects | 11c763fcbe4e088928bd56c28f767b93ae73984d | [
"MIT"
] | null | null | null | from turtle import Screen
from paddle import Paddle
from ball import Ball
import time
from scoreboard import ScoreBoard
screen = Screen()
screen.bgcolor('black')
screen.setup(width=800, height=600)
screen.title('pong')
# Turn off animation to show paddle after it has been shifted
screen.tracer(0)
right_paddle = Paddle(350, 0)
left_paddle = Paddle(-350, 0)
ball = Ball()
score = ScoreBoard()
screen.listen()
screen.onkey(right_paddle.go_up, 'Up')
screen.onkey(right_paddle.go_down, 'Down')
screen.onkey(left_paddle.go_up, 'w')
screen.onkey(left_paddle.go_down, 's')
game_is_on = True
while game_is_on:
time.sleep(ball.ball_speed)
screen.update()
ball.move()
# bounce when the ball hit the wall
if ball.ycor() > 280 or ball.ycor() < -280:
ball.bounce_y()
# detect collision with the paddle
if (ball.distance(right_paddle) < 50 and ball.xcor() > 320) or (
ball.distance(left_paddle) < 50 and ball.xcor() < -320):
ball.bounce_x()
# detect R paddle miss
if ball.xcor() > 380:
ball.reset_pos()
score.increase_l_point()
# detect L paddle miss
if ball.xcor() < -380:
ball.reset_pos()
score.increase_r_point()
screen.exitonclick()
| 22.962963 | 68 | 0.679032 |
728a356d657b32fde675735de36842cf48062bf3 | 1,579 | py | Python | ExPy/ExPy/module20.py | brad-h/expy | d3f3dfbbdae31ab8c7e134a5ce9d5f6adf94b516 | [
"MIT"
] | null | null | null | ExPy/ExPy/module20.py | brad-h/expy | d3f3dfbbdae31ab8c7e134a5ce9d5f6adf94b516 | [
"MIT"
] | null | null | null | ExPy/ExPy/module20.py | brad-h/expy | d3f3dfbbdae31ab8c7e134a5ce9d5f6adf94b516 | [
"MIT"
] | null | null | null | """ Multistate Sales Tax Calculator """
import os
from decimal import Decimal
from decimal import InvalidOperation
def prompt_decimal(prompt):
""" Using the prompt, attempt to get a decimal from the user """
while True:
try:
return Decimal(input(prompt))
except InvalidOperation:
print('Enter a valid number')
def dollar(amount):
""" Given an amount as a number
Return a string formatted as a dollar amount
"""
amount = round(amount, 2)
return '${0:0.2f}'.format(amount)
STATE_RATES = {
'ILLINOIS': Decimal('0.08'),
'IL': Decimal('0.08'),
'WISCONSIN': Decimal('0.05'),
'WI': Decimal('0.05'),
}
WISCONSIN_RATES = {
'EAU CLAIRE': Decimal('0.005'),
'DUNN': Decimal('0.004')
}
def ex20():
""" Prompt for the order amount and state
If the state is Wisconsin, prompt for the county
Print the sales tax and total amount
"""
amount = prompt_decimal('What is the order amount? ')
state = input('What state do you live in? ')
if state.upper() in STATE_RATES:
rate = STATE_RATES[state.upper()]
else:
rate = Decimal(0)
if state.upper() == 'WISCONSIN':
county = input('What county do you live in? ')
if county.upper() in WISCONSIN_RATES:
rate += WISCONSIN_RATES[county.upper()]
tax = amount * rate
total = tax + amount
output = os.linesep.join([
'The tax is {}'.format(dollar(tax)),
'The total is {}'.format(dollar(total))])
print(output)
if __name__ == '__main__':
ex20()
| 25.467742 | 68 | 0.609246 |
728a6a081e2856ad1af42a97ac6d7dc3898ac287 | 2,650 | py | Python | pyvdms/util/verify.py | psmsmets/pyVDMS | cb3db93b655d3a02ae3aa1fdd418ae70dd249271 | [
"MIT"
] | 1 | 2020-04-22T14:38:23.000Z | 2020-04-22T14:38:23.000Z | pyvdms/util/verify.py | psmsmets/PyVDMS | cb3db93b655d3a02ae3aa1fdd418ae70dd249271 | [
"MIT"
] | null | null | null | pyvdms/util/verify.py | psmsmets/PyVDMS | cb3db93b655d3a02ae3aa1fdd418ae70dd249271 | [
"MIT"
] | null | null | null | r"""
:mod:`util.verify` -- Input verification
========================================
Common input verification methods.
"""
# Mandatory imports
import numpy as np
__all__ = ['verify_tuple_range']
def verify_tuple_range(
input_range: tuple, allow_none: bool = True, name: str = None,
step: bool = None, unit: bool = None, todict: bool = False
):
"""
Verify if the input range tuple fullfils the requirements.
An error is raised if a criteria is failed.
"""
name = name or 'input range'
r = dict(first=None, last=None, step=None, unit=None)
if input_range is None:
if allow_none:
return r if todict else None
else:
raise ValueError(f'{name} is empty!')
if not isinstance(input_range, tuple):
raise TypeError(f'{name} should be a tuple!')
minlen = 2
maxlen = 4
if step is True:
minlen += 1
elif step is False:
maxlen -= 1
if unit is True:
minlen += 1
elif unit is False:
maxlen -= 1
if len(input_range) < minlen or len(input_range) > maxlen:
length = minlen if minlen == maxlen else f'{minlen} to {maxlen}'
raise TypeError(f'{name} should be of length {length}!')
r['first'] = input_range[0]
r['last'] = input_range[1]
if not isinstance(r['first'], float) or not isinstance(r['last'], float):
raise TypeError(f'{name} range values should be of type float!')
if step is not False:
if step: # required
r['step'] = input_range[2]
if not isinstance(r['step'], float):
raise TypeError(f'{name} step should be of type float!')
else: # optional
r['step'] = input_range[2] if len(input_range) > minlen else None
r['step'] = r['step'] if isinstance(r['step'], float) else None
if r['step']:
if r['step'] == 0.:
raise ValueError(f'{name} step cannot be zero!')
if np.sign(r['last'] - r['first']) != np.sign(r['step']):
raise ValueError(f'{name} range and step signs should be equal!')
else:
if r['last'] <= r['first']:
raise ValueError(f'{name} range should be incremental!')
if unit is not False:
if unit: # required
r['unit'] = input_range[-1]
if not isinstance(r['unit'], str):
raise TypeError(f'{name} unit should be of type string!')
else: # optional
r['unit'] = input_range[-1] if len(input_range) > minlen else None
r['unit'] = r['unit'] if isinstance(r['unit'], str) else None
return r if todict else None
| 30.45977 | 78 | 0.570189 |
728cb69af3c08ef7582f9c410b1fc5f27c722c62 | 2,349 | py | Python | api/image_similarity.py | reneraab/librephotos | a3972ab520586e721c67f283b1a50ccb7abe2b01 | [
"MIT"
] | null | null | null | api/image_similarity.py | reneraab/librephotos | a3972ab520586e721c67f283b1a50ccb7abe2b01 | [
"MIT"
] | null | null | null | api/image_similarity.py | reneraab/librephotos | a3972ab520586e721c67f283b1a50ccb7abe2b01 | [
"MIT"
] | null | null | null | import numpy as np
import requests
from django.db.models import Q
from api.models import Photo, User
from api.util import logger
from ownphotos.settings import IMAGE_SIMILARITY_SERVER
| 29 | 87 | 0.648361 |
728d2b759b651322512d149b383118385699c3b6 | 621 | py | Python | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/struct/struct_endianness.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/struct/struct_endianness.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/struct/struct_endianness.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | #
"""
"""
# end_pymotw_header
import struct
import binascii
values = (1, "ab".encode("utf-8"), 2.7)
print("Original values:", values)
endianness = [
("@", "native, native"),
("=", "native, standard"),
("<", "little-endian"),
(">", "big-endian"),
("!", "network"),
]
for code, name in endianness:
s = struct.Struct(code + " I 2s f")
packed_data = s.pack(*values)
print()
print("Format string :", s.format, "for", name)
print("Uses :", s.size, "bytes")
print("Packed Value :", binascii.hexlify(packed_data))
print("Unpacked Value :", s.unpack(packed_data))
| 21.413793 | 60 | 0.566828 |
728dfcc1ec3bf1913efacef3f37dc134c73588dd | 7,307 | py | Python | pydov/util/net.py | GuillaumeVandekerckhove/pydov | b51f77bf93d1f9e96dd39edf564d95426da04126 | [
"MIT"
] | 32 | 2017-03-17T16:36:40.000Z | 2022-02-18T13:10:50.000Z | pydov/util/net.py | GuillaumeVandekerckhove/pydov | b51f77bf93d1f9e96dd39edf564d95426da04126 | [
"MIT"
] | 240 | 2017-01-03T12:32:15.000Z | 2022-03-30T11:52:02.000Z | pydov/util/net.py | GuillaumeVandekerckhove/pydov | b51f77bf93d1f9e96dd39edf564d95426da04126 | [
"MIT"
] | 17 | 2017-01-09T21:00:36.000Z | 2022-03-01T15:04:21.000Z | # -*- coding: utf-8 -*-
"""Module grouping network-related utilities and functions."""
from queue import Empty, Queue
from threading import Thread
import requests
import urllib3
from requests.adapters import HTTPAdapter
import pydov
request_timeout = 300
| 28.542969 | 79 | 0.569454 |
728ec9dc6f471c261e07e33eefde07e826192c2e | 305 | py | Python | app/main/views.py | yiunsr/flask_labstoo_base | ec99a7c955bd0bd9d96959c1c26cbd0e5ec23796 | [
"Apache-2.0"
] | null | null | null | app/main/views.py | yiunsr/flask_labstoo_base | ec99a7c955bd0bd9d96959c1c26cbd0e5ec23796 | [
"Apache-2.0"
] | null | null | null | app/main/views.py | yiunsr/flask_labstoo_base | ec99a7c955bd0bd9d96959c1c26cbd0e5ec23796 | [
"Apache-2.0"
] | null | null | null | from flask.helpers import make_response
from flask.templating import render_template
from . import main
| 25.416667 | 47 | 0.665574 |
728ed3b7ad18763967710681b9cc5dc917ab6fd6 | 11,470 | py | Python | SBOL2Excel/utils/sbol2excel.py | abamaj/SBOL-to-Excel | 790ef5242990c06b20dcb8e207def8e4527aea02 | [
"BSD-3-Clause"
] | null | null | null | SBOL2Excel/utils/sbol2excel.py | abamaj/SBOL-to-Excel | 790ef5242990c06b20dcb8e207def8e4527aea02 | [
"BSD-3-Clause"
] | null | null | null | SBOL2Excel/utils/sbol2excel.py | abamaj/SBOL-to-Excel | 790ef5242990c06b20dcb8e207def8e4527aea02 | [
"BSD-3-Clause"
] | null | null | null | import sbol2
import pandas as pd
import os
import logging
from openpyxl import load_workbook
from openpyxl.worksheet.table import Table, TableStyleInfo
from openpyxl.utils.dataframe import dataframe_to_rows
from openpyxl.styles import Font, PatternFill, Border, Side
from requests_html import HTMLSession
#wasderivedfrom: source
#remove identity, persistenID, displayID, version
#remove attachment (if empty)
#add library sheets
#add postprocessing function to remove unecessaries
| 38.619529 | 124 | 0.588317 |
728f92f6b83a6233b200b60652e9836df6ba2fba | 17,145 | py | Python | ocean_lib/models/data_token.py | akshay-ap/ocean.py | 1dab70d164ca36a6cff284e8be82ae04344ad13f | [
"Apache-2.0"
] | null | null | null | ocean_lib/models/data_token.py | akshay-ap/ocean.py | 1dab70d164ca36a6cff284e8be82ae04344ad13f | [
"Apache-2.0"
] | null | null | null | ocean_lib/models/data_token.py | akshay-ap/ocean.py | 1dab70d164ca36a6cff284e8be82ae04344ad13f | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2021 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
import json
import os
import time
from collections import namedtuple
import requests
from eth_utils import remove_0x_prefix
from ocean_lib.data_provider.data_service_provider import DataServiceProvider
from ocean_lib.enforce_typing_shim import enforce_types_shim
from ocean_lib.ocean.util import from_base_18, to_base_18
from ocean_lib.web3_internal.contract_base import ContractBase
from ocean_lib.web3_internal.event_filter import EventFilter
from ocean_lib.web3_internal.wallet import Wallet
from ocean_lib.web3_internal.web3_provider import Web3Provider
from ocean_utils.http_requests.requests_session import get_requests_session
from web3 import Web3
from web3.exceptions import MismatchedABI
from web3.utils.events import get_event_data
from websockets import ConnectionClosed
OrderValues = namedtuple(
"OrderValues",
("consumer", "amount", "serviceId", "startedAt", "marketFeeCollector", "marketFee"),
)
| 36.324153 | 120 | 0.602858 |
728fbc5bfc6f1e3c71f6dc0d49a88fbd6f828cf5 | 18,655 | py | Python | cgmodsel/prox.py | chrlen/cgmodsel | 1d7336e173289468d55897b1aa044bf98c3c1a6b | [
"MIT"
] | null | null | null | cgmodsel/prox.py | chrlen/cgmodsel | 1d7336e173289468d55897b1aa044bf98c3c1a6b | [
"MIT"
] | null | null | null | cgmodsel/prox.py | chrlen/cgmodsel | 1d7336e173289468d55897b1aa044bf98c3c1a6b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Frank Nussbaum (frank.nussbaum@uni-jena.de), 2019
"""
import numpy as np
#import scipy
#import abc
#import time
from scipy.optimize import approx_fprime
from scipy.linalg import eigh
from scipy import optimize
from cgmodsel.utils import _logsumexp_condprobs_red
#from cgmodsel.utils import logsumexp
from cgmodsel.base_solver import BaseGradSolver
# pylint: disable=unbalanced-tuple-unpacking
# pylint: disable=W0511 # todos
# pylint: disable=R0914 # too many locals
###############################################################################
# prox for PLH objective
###############################################################################
| 38.071429 | 114 | 0.557438 |
7290644aa942c45a2f6b6c965febcc5dc6a44a31 | 17,758 | py | Python | openmdao.main/src/openmdao/main/linearsolver.py | MrShoks/OpenMDAO-Framework | 412f34ffe31a95631fbe55ca7d75b84669ae8f8c | [
"Apache-2.0"
] | 1 | 2020-06-28T20:38:56.000Z | 2020-06-28T20:38:56.000Z | openmdao.main/src/openmdao/main/linearsolver.py | MrShoks/OpenMDAO-Framework | 412f34ffe31a95631fbe55ca7d75b84669ae8f8c | [
"Apache-2.0"
] | null | null | null | openmdao.main/src/openmdao/main/linearsolver.py | MrShoks/OpenMDAO-Framework | 412f34ffe31a95631fbe55ca7d75b84669ae8f8c | [
"Apache-2.0"
] | null | null | null | """ Linear solvers that are used to solve for the gradient of an OpenMDAO System.
(Not to be confused with the OpenMDAO Solver classes.)
"""
# pylint: disable=E0611, F0401
import numpy as np
from scipy.sparse.linalg import gmres, LinearOperator
from openmdao.main.mpiwrap import MPI
from openmdao.util.graph import fix_single_tuple
from openmdao.util.log import logger
if MPI:
from petsc4py import PETSc
else:
| 35.374502 | 121 | 0.508954 |
7290a137b403884de1319ee844bb33bdb2db9268 | 198 | py | Python | Temperatures.py | VivianaEloisa/Viviana_first_repo | d132ffdcda8e2c3cd5673cfa86fecc1337697fd0 | [
"MIT"
] | null | null | null | Temperatures.py | VivianaEloisa/Viviana_first_repo | d132ffdcda8e2c3cd5673cfa86fecc1337697fd0 | [
"MIT"
] | null | null | null | Temperatures.py | VivianaEloisa/Viviana_first_repo | d132ffdcda8e2c3cd5673cfa86fecc1337697fd0 | [
"MIT"
] | null | null | null | c=50
d=10
print("{0} F is {1}C.".format(c,fahr_to_cels(c)))
print("{0}C is {1}F.".format(d,cels_to_fahr(d)))
| 22 | 51 | 0.616162 |
7290f4e2e5f1b65887b615200ae0e5b25c830766 | 4,134 | py | Python | src/transform.py | Andres-CS/wallet-analysis | 822b8b900a91ab7a2fd76743f174d320e45e98c9 | [
"Apache-2.0"
] | null | null | null | src/transform.py | Andres-CS/wallet-analysis | 822b8b900a91ab7a2fd76743f174d320e45e98c9 | [
"Apache-2.0"
] | null | null | null | src/transform.py | Andres-CS/wallet-analysis | 822b8b900a91ab7a2fd76743f174d320e45e98c9 | [
"Apache-2.0"
] | null | null | null | import csv
import re
'''
Delete char in substring of original string.
Used this function when, you want to delete
a character in a substring but not in the
rest of the original string.
Returns a string
-- PARAMETERS --
text: original string
start: start of subString
end: end of subString
char: char to delete, default is ','.
'''
'''
Get the position of the Description Column.
Loops through String and finds the first set
of enclosing quotes.
Returns array with initial and closing position.
-- PARAMETERS --
txt: string to loop
'''
'''
Adds a delimiter
Returns a new string with the delimiter
added.
-- PARAMETERS --
text: string to be modified
delimiter: char or string to be inserted
flad: b - before target
a - after target
target: substring where delimiter will be
inserted
'''
'''
Clean up of Description Column
Inital draft of data clean up on the
description column.
Removal of extra commas and 'garbage' data
Returns a string
-- PARAMETERS --
data: string
'''
'''
Re-arranges nested list to become a 1-level list
Descript column, item 1 in array, is a nested list
items are moved one level up to become a single list
and not a list of list.
Returns a list
-- PARAMETERS --
data: list
'''
'''
Takes charge of initializing clean up data
process.
Returns the 'idea' of a clean dataFrame
-- PARAMETERS --
srcF: path of raw file to clean up
'''
#Save to CSV file
if __name__ == "__main__":
sourceFile = "/home/delphinus/Devlp/WalletAnalysis/app/data/raw/stmt.csv"
targetFile = "/home/delphinus/Devlp/WalletAnalysis/app/data/modify/modf.csv"
dataFrame = cleanData(sourceFile)
saveToFile(dataFrame, targetFile)
| 20.773869 | 85 | 0.647315 |
72911e6ae35f06f9d987c47bf7d9ffd692afda2e | 672 | py | Python | game/views/credits_view.py | fisher60/pyweek-2021 | 294b45d768a7e0d85ac67dc4b12384e68fc4f399 | [
"MIT"
] | null | null | null | game/views/credits_view.py | fisher60/pyweek-2021 | 294b45d768a7e0d85ac67dc4b12384e68fc4f399 | [
"MIT"
] | null | null | null | game/views/credits_view.py | fisher60/pyweek-2021 | 294b45d768a7e0d85ac67dc4b12384e68fc4f399 | [
"MIT"
] | null | null | null | import arcade
from .menu_view import MenuView
TEXT_COLOR = arcade.csscolor.WHITE
| 22.4 | 67 | 0.596726 |
72930128f10a45046ff86b69e321c55984b0eb59 | 15,885 | py | Python | sknn_jgd/backend/lasagne/mlp.py | jgdwyer/nn-convection | 0bb55c0ac7af8f1345bf17b4db31b2593c8d1b28 | [
"Apache-2.0"
] | 1 | 2016-08-08T14:33:20.000Z | 2016-08-08T14:33:20.000Z | sknn_jgd/backend/lasagne/mlp.py | jgdwyer/nn-convection | 0bb55c0ac7af8f1345bf17b4db31b2593c8d1b28 | [
"Apache-2.0"
] | null | null | null | sknn_jgd/backend/lasagne/mlp.py | jgdwyer/nn-convection | 0bb55c0ac7af8f1345bf17b4db31b2593c8d1b28 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, unicode_literals, print_function)
__all__ = ['MultiLayerPerceptronBackend']
import os
import sys
import math
import time
import types
import logging
import itertools
log = logging.getLogger('sknn')
import numpy
import theano
import sklearn.base
import sklearn.pipeline
import sklearn.preprocessing
import sklearn.cross_validation
import theano.tensor as T
import lasagne.layers
import lasagne.nonlinearities as nl
from ..base import BaseBackend
from ...nn import Layer, Convolution, Native, ansi
| 40.730769 | 117 | 0.577274 |
729381f8f09e518e6c6e8b1407dd8a10e56dc240 | 773 | py | Python | src/portals/admins/filters.py | IkramKhan-DevOps/pw-elearn | 41ac0c9a3dcc6141a25c2618a82bb2673e7f8986 | [
"MIT"
] | 2 | 2022-02-04T07:45:57.000Z | 2022-02-04T07:46:03.000Z | src/portals/admins/filters.py | IkramKhan-DevOps/pw-elearn | 41ac0c9a3dcc6141a25c2618a82bb2673e7f8986 | [
"MIT"
] | null | null | null | src/portals/admins/filters.py | IkramKhan-DevOps/pw-elearn | 41ac0c9a3dcc6141a25c2618a82bb2673e7f8986 | [
"MIT"
] | null | null | null | import django_filters
from django.forms import TextInput
from src.accounts.models import User
from src.application.models import Quiz, StudentGrade
| 40.684211 | 122 | 0.730918 |
7293c3777f58eec10956f70997622aaecdee719d | 1,677 | py | Python | L2J_DataPack/data/scripts/quests/998_FallenAngelSelect/__init__.py | Vladislav-Zolotaryov/L2J_Levelless_Custom | fb9fd3d22209679258cddc60cec104d740f13b8c | [
"MIT"
] | null | null | null | L2J_DataPack/data/scripts/quests/998_FallenAngelSelect/__init__.py | Vladislav-Zolotaryov/L2J_Levelless_Custom | fb9fd3d22209679258cddc60cec104d740f13b8c | [
"MIT"
] | null | null | null | L2J_DataPack/data/scripts/quests/998_FallenAngelSelect/__init__.py | Vladislav-Zolotaryov/L2J_Levelless_Custom | fb9fd3d22209679258cddc60cec104d740f13b8c | [
"MIT"
] | null | null | null | # Made by Kerberos
# this script is part of the Official L2J Datapack Project.
# Visit http://www.l2jdp.com/forum/ for more details.
import sys
from com.l2jserver.gameserver.instancemanager import QuestManager
from com.l2jserver.gameserver.model.quest import State
from com.l2jserver.gameserver.model.quest import QuestState
from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
qn = "998_FallenAngelSelect"
NATOOLS = 30894
QUEST = Quest(998,qn,"Fallen Angel - Select")
QUEST.addTalkId(NATOOLS) | 34.9375 | 153 | 0.689326 |
72948f0d5e0688cdcff4ef82755618fc89287414 | 37 | py | Python | examples/in.py | alehander42/pseudo-python | 5cdc9211a5ad28e720882f034651d579b0aa0592 | [
"MIT"
] | 94 | 2016-03-11T13:55:12.000Z | 2018-11-14T06:46:19.000Z | examples/in.py | alehander42/pseudo-python | 5cdc9211a5ad28e720882f034651d579b0aa0592 | [
"MIT"
] | 11 | 2016-03-07T18:17:16.000Z | 2017-04-17T08:08:57.000Z | examples/in.py | alehander42/pseudo-python | 5cdc9211a5ad28e720882f034651d579b0aa0592 | [
"MIT"
] | 9 | 2016-03-14T22:44:44.000Z | 2018-11-07T12:49:19.000Z | s = [4, 2]
if '2' in s:
print(s)
| 9.25 | 12 | 0.405405 |
7295b71bdde90ae99770dabaff2f0e425c610dba | 10,859 | py | Python | ai_safety_gridworlds/environments/side_effects_sokoban.py | AicyDC/ai-safety-gridworlds | b574b3e42880e32245a6c69502af3e9782ae2879 | [
"Apache-2.0"
] | null | null | null | ai_safety_gridworlds/environments/side_effects_sokoban.py | AicyDC/ai-safety-gridworlds | b574b3e42880e32245a6c69502af3e9782ae2879 | [
"Apache-2.0"
] | null | null | null | ai_safety_gridworlds/environments/side_effects_sokoban.py | AicyDC/ai-safety-gridworlds | b574b3e42880e32245a6c69502af3e9782ae2879 | [
"Apache-2.0"
] | 1 | 2020-02-13T01:30:09.000Z | 2020-02-13T01:30:09.000Z | # Copyright 2018 The AI Safety Gridworlds Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Irreversible side effects: Sokoban edition.
An environment which is a play on the classic Sokoban game. In this environment,
the goal is to collect all the coins, while avoiding making irreversible side
effects. Standard Sokoban rules apply, i.e. if the box is moved next to a wall,
it cannot be pulled back.
This game is a gridworld that consists of:
1. The agent 'A'.
2. Boxes 'X' that can be moved by the agent.
3. Coins 'C' that can be picked up by the agent and provide reward
(or a single goal tile 'G' that provides reward and ends the episode).
The correct solution is to navigate around boxes and pick up all the coins,
while avoiding putting the boxes in positions they cannot be recovered from.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
# Dependency imports
from absl import app
from absl import flags
from ai_safety_gridworlds.environments.shared import safety_game
from ai_safety_gridworlds.environments.shared import safety_ui
import numpy as np
from pycolab import rendering
FLAGS = flags.FLAGS
if __name__ == '__main__': # Avoid defining flags when used as a library.
flags.DEFINE_integer('level', 0, 'Which game level to play.')
flags.DEFINE_boolean('noops', False,
'Whether to include NOOP as a possible action.')
GAME_ART = [
['######', # Level 0.
'# A###',
'# X #',
'## #',
'### G#',
'######'],
['##########', # Level 1.
'# # #',
'# 1 A #',
'# C# C #',
'#### ###2#',
'# C# #C #',
'# # # #',
'# 3 # C #',
'# # #',
'##########'],
]
AGENT_CHR = 'A'
COIN_CHR = 'C'
WALL_CHR = '#'
BOX_CHR = 'X'
GOAL_CHR = 'G'
BOXES = '123'
REPAINT_MAPPING = {c: BOX_CHR for c in BOXES}
MOVEMENT_REWARD = -1
COIN_REWARD = 50
GOAL_REWARD = 50
HIDDEN_REWARD_FOR_ADJACENT_WALL = -5
HIDDEN_REWARD_FOR_ADJACENT_CORNER = -10
# Set up game specific colours.
GAME_BG_COLOURS = {b: (0, 431, 470) for b in BOXES}
GAME_BG_COLOURS.update({
COIN_CHR: (900, 900, 0),
BOX_CHR: (0, 431, 470),
})
GAME_BG_COLOURS.update(safety_game.GAME_BG_COLOURS)
GAME_FG_COLOURS = dict.fromkeys(list(GAME_BG_COLOURS.keys()), (0, 0, 0))
GAME_FG_COLOURS.update(safety_game.GAME_FG_COLOURS)
def make_game(environment_data, level):
"""Initialises the game.
Args:
environment_data: a global dictionary with data persisting across episodes.
level: which game level to play.
Returns:
A game engine.
"""
boxes = BOXES if level == 1 else BOX_CHR
sprites = {c: [BoxSprite, (WALL_CHR + COIN_CHR + boxes.replace(c, ''))]
for c in boxes}
sprites[AGENT_CHR] = [AgentSprite]
update_schedule = [[c for c in boxes], [COIN_CHR], [AGENT_CHR]]
return safety_game.make_safety_game(
environment_data,
GAME_ART[level],
what_lies_beneath=' ',
sprites=sprites,
drapes={COIN_CHR: [safety_game.EnvironmentDataDrape]},
update_schedule=update_schedule)
def main(unused_argv):
env = SideEffectsSokobanEnvironment(level=FLAGS.level, noops=FLAGS.noops)
ui = safety_ui.make_human_curses_ui(GAME_BG_COLOURS, GAME_FG_COLOURS)
ui.play(env)
if __name__ == '__main__':
app.run(main)
| 34.916399 | 80 | 0.664702 |
7295e60221af8bcb23ad558a2feefc9a7f5e4f9d | 956 | py | Python | setup.py | mirca/deepdow | 48484f99aa36863b15fb1ae685659841ce37fe25 | [
"Apache-2.0"
] | 2 | 2021-05-06T07:00:05.000Z | 2022-03-15T22:13:37.000Z | setup.py | rodrigorivera/deepdow | 48484f99aa36863b15fb1ae685659841ce37fe25 | [
"Apache-2.0"
] | null | null | null | setup.py | rodrigorivera/deepdow | 48484f99aa36863b15fb1ae685659841ce37fe25 | [
"Apache-2.0"
] | null | null | null | from setuptools import find_packages, setup
import deepdow
DESCRIPTION = "Portfolio optimization with deep learning"
LONG_DESCRIPTION = DESCRIPTION
INSTALL_REQUIRES = [
"cvxpylayers",
"matplotlib",
"mlflow",
"numpy>=1.16.5",
"pandas",
"pillow",
"seaborn",
"torch>=1.5",
"tensorboard",
"tqdm"
]
setup(
name="deepdow",
version=deepdow.__version__,
author="Jan Krepl",
author_email="kjan.official@gmail.com",
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
url="https://github.com/jankrepl/deepdow",
packages=find_packages(exclude=["tests"]),
license="Apache License 2.0",
install_requires=INSTALL_REQUIRES,
python_requires='>=3.5',
extras_require={
"dev": ["codecov", "flake8==3.7.9", "pydocstyle", "pytest>=4.6", "pytest-cov", "tox"],
"docs": ["sphinx", "sphinx_rtd_theme"],
"examples": ["sphinx_gallery", "statsmodels"]
}
)
| 24.512821 | 94 | 0.646444 |
7297791db05ab40bf0827824367abd990f8158d1 | 12,139 | py | Python | src/ref/WGAN_CNN_CNN_DISCRETE/Critic.py | chychen/nba_scrip_generation | 942df59cc0426aa30b54a0e09c0f646aa8fd4f18 | [
"MIT"
] | 1 | 2020-07-09T09:00:09.000Z | 2020-07-09T09:00:09.000Z | src/ref/WGAN_CNN_CNN_DISCRETE/Critic.py | chychen/bball_defensive_strategies_generation | 942df59cc0426aa30b54a0e09c0f646aa8fd4f18 | [
"MIT"
] | null | null | null | src/ref/WGAN_CNN_CNN_DISCRETE/Critic.py | chychen/bball_defensive_strategies_generation | 942df59cc0426aa30b54a0e09c0f646aa8fd4f18 | [
"MIT"
] | null | null | null | """
modeling
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import time
import shutil
import numpy as np
import tensorflow as tf
from tensorflow.contrib import rnn
from tensorflow.contrib import layers
from utils_cnn import Norm
| 43.199288 | 121 | 0.539583 |
72988ee005f70d398f192554b5dfb6763416e1a6 | 13,582 | py | Python | tests/attr/test_kernel_shap.py | trsvchn/captum | 0435ff10a71724a788bdc54f01324f4f5c788541 | [
"BSD-3-Clause"
] | 3,140 | 2019-10-10T17:05:37.000Z | 2022-03-31T17:31:01.000Z | tests/attr/test_kernel_shap.py | trsvchn/captum | 0435ff10a71724a788bdc54f01324f4f5c788541 | [
"BSD-3-Clause"
] | 758 | 2019-10-11T18:01:04.000Z | 2022-03-31T21:36:07.000Z | tests/attr/test_kernel_shap.py | trsvchn/captum | 0435ff10a71724a788bdc54f01324f4f5c788541 | [
"BSD-3-Clause"
] | 345 | 2019-10-10T17:17:06.000Z | 2022-03-30T07:31:31.000Z | #!/usr/bin/env python3
import io
import unittest
import unittest.mock
from typing import Any, Callable, List, Tuple, Union
import torch
from captum._utils.typing import BaselineType, TensorOrTupleOfTensorsGeneric
from captum.attr._core.kernel_shap import KernelShap
from tests.helpers.basic import (
BaseTest,
assertTensorAlmostEqual,
assertTensorTuplesAlmostEqual,
)
from tests.helpers.basic_models import (
BasicModel_MultiLayer,
BasicModel_MultiLayer_MultiInput,
)
if __name__ == "__main__":
unittest.main()
| 35.931217 | 88 | 0.547121 |
729a34538302ef5eb6b5be2a95bd148de79a7e02 | 899 | py | Python | vol/items.py | volCommunity/vol-crawlers | d046a23a1a778ed1c1ed483bd565ecb6a23898e5 | [
"Apache-2.0"
] | 3 | 2017-10-18T07:08:01.000Z | 2017-10-31T07:46:14.000Z | vol/items.py | volCommunity/vol-crawlers | d046a23a1a778ed1c1ed483bd565ecb6a23898e5 | [
"Apache-2.0"
] | 31 | 2017-09-28T00:53:53.000Z | 2021-03-22T17:01:50.000Z | vol/items.py | volCommunity/vol-crawlers | d046a23a1a778ed1c1ed483bd565ecb6a23898e5 | [
"Apache-2.0"
] | 1 | 2017-10-29T21:30:22.000Z | 2017-10-29T21:30:22.000Z | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
| 22.475 | 51 | 0.649611 |
729a80929d56b3febe54ea0a4bcd62e2fff44b08 | 6,519 | py | Python | Beheer/tests.py | RamonvdW/nhb-apps | 5a9f840bfe066cd964174515c06b806a7b170c69 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-12-22T13:11:12.000Z | 2021-12-22T13:11:12.000Z | Beheer/tests.py | RamonvdW/nhb-apps | 5a9f840bfe066cd964174515c06b806a7b170c69 | [
"BSD-3-Clause-Clear"
] | 9 | 2020-10-28T07:07:05.000Z | 2021-06-28T20:05:37.000Z | Beheer/tests.py | RamonvdW/nhb-apps | 5a9f840bfe066cd964174515c06b806a7b170c69 | [
"BSD-3-Clause-Clear"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020-2021 Ramon van der Winkel.
# All rights reserved.
# Licensed under BSD-3-Clause-Clear. See LICENSE file for details.
from django.conf import settings
from django.test import TestCase
from django.urls import reverse
from TestHelpers.e2ehelpers import E2EHelpers
# updaten met dit commando:
# for x in `./manage.py show_urls --settings=nhbapps.settings_dev | rev | cut -d'/' -f2- | rev | grep '/beheer/'`; do echo "'$x/',"; done | grep -vE ':object_id>/|/add/|/autocomplete/'
BEHEER_PAGINAS = (
'/beheer/Account/account/',
'/beheer/Account/accountemail/',
'/beheer/BasisTypen/boogtype/',
'/beheer/BasisTypen/indivwedstrijdklasse/',
'/beheer/BasisTypen/kalenderwedstrijdklasse/',
'/beheer/BasisTypen/leeftijdsklasse/',
'/beheer/BasisTypen/teamtype/',
'/beheer/BasisTypen/teamwedstrijdklasse/',
'/beheer/Competitie/competitie/',
'/beheer/Competitie/competitieklasse/',
'/beheer/Competitie/competitiemutatie/',
'/beheer/Competitie/deelcompetitie/',
'/beheer/Competitie/deelcompetitieklasselimiet/',
'/beheer/Competitie/deelcompetitieronde/',
'/beheer/Competitie/kampioenschapschutterboog/',
'/beheer/Competitie/regiocompetitierondeteam/',
'/beheer/Competitie/regiocompetitieschutterboog/',
'/beheer/Competitie/regiocompetitieteam/',
'/beheer/Competitie/regiocompetitieteampoule/',
'/beheer/Functie/functie/',
'/beheer/Functie/verklaringhanterenpersoonsgegevens/',
'/beheer/HistComp/histcompetitie/',
'/beheer/HistComp/histcompetitieindividueel/',
'/beheer/HistComp/histcompetitieteam/',
'/beheer/Kalender/kalenderwedstrijd/',
'/beheer/Kalender/kalenderwedstrijddeeluitslag/',
'/beheer/Kalender/kalenderwedstrijdsessie/',
'/beheer/Logboek/logboekregel/',
'/beheer/Mailer/mailqueue/',
'/beheer/NhbStructuur/nhbcluster/',
'/beheer/NhbStructuur/nhbrayon/',
'/beheer/NhbStructuur/nhbregio/',
'/beheer/NhbStructuur/nhbvereniging/',
'/beheer/NhbStructuur/speelsterkte/',
'/beheer/Overig/sitefeedback/',
'/beheer/Overig/sitetijdelijkeurl/',
'/beheer/Records/besteindivrecords/',
'/beheer/Records/indivrecord/',
'/beheer/Score/score/',
'/beheer/Score/scorehist/',
'/beheer/Sporter/sporter/',
'/beheer/Sporter/sporterboog/',
'/beheer/Sporter/sportervoorkeuren/',
'/beheer/Taken/taak/',
'/beheer/Wedstrijden/competitiewedstrijd/',
'/beheer/Wedstrijden/competitiewedstrijdenplan/',
'/beheer/Wedstrijden/competitiewedstrijduitslag/',
'/beheer/Wedstrijden/wedstrijdlocatie/',
'/beheer/auth/group/',
'/beheer/jsi18n/',
'/beheer/login/',
'/beheer/logout/',
'/beheer/password_change/',
)
# end of file
| 39.509091 | 185 | 0.670655 |
729b3276310d180f2f78ff2784137e2b0f03795f | 1,179 | py | Python | L1Trigger/TrackFindingTracklet/python/ProducerKF_cff.py | Jingyan95/cmssw | f78d843f0837f269ee6811b0e0f4c0432928c190 | [
"Apache-2.0"
] | 5 | 2020-07-02T19:05:26.000Z | 2022-02-25T14:37:09.000Z | L1Trigger/TrackFindingTracklet/python/ProducerKF_cff.py | Jingyan95/cmssw | f78d843f0837f269ee6811b0e0f4c0432928c190 | [
"Apache-2.0"
] | 61 | 2020-07-14T17:22:52.000Z | 2022-03-16T11:11:12.000Z | L1Trigger/TrackFindingTracklet/python/ProducerKF_cff.py | Jingyan95/cmssw | f78d843f0837f269ee6811b0e0f4c0432928c190 | [
"Apache-2.0"
] | 8 | 2020-06-08T16:28:54.000Z | 2021-11-16T14:40:00.000Z | import FWCore.ParameterSet.Config as cms
from L1Trigger.TrackTrigger.ProducerSetup_cff import TrackTriggerSetup
from L1Trigger.TrackerTFP.Producer_cfi import TrackerTFPProducer_params
from L1Trigger.TrackerTFP.ProducerES_cff import TrackTriggerDataFormats
from L1Trigger.TrackerTFP.ProducerLayerEncoding_cff import TrackTriggerLayerEncoding
from L1Trigger.TrackerTFP.KalmanFilterFormats_cff import TrackTriggerKalmanFilterFormats
from L1Trigger.TrackFindingTracklet.ChannelAssignment_cff import ChannelAssignment
from L1Trigger.TrackFindingTracklet.ProducerKF_cfi import TrackFindingTrackletProducerKF_params
TrackFindingTrackletProducerKFin = cms.EDProducer( 'trklet::ProducerKFin', TrackFindingTrackletProducerKF_params )
TrackFindingTrackletProducerKF = cms.EDProducer( 'trackerTFP::ProducerKF', TrackFindingTrackletProducerKF_params )
TrackFindingTrackletProducerTT = cms.EDProducer( 'trklet::ProducerTT', TrackFindingTrackletProducerKF_params )
TrackFindingTrackletProducerAS = cms.EDProducer( 'trklet::ProducerAS', TrackFindingTrackletProducerKF_params )
TrackFindingTrackletProducerKFout = cms.EDProducer( 'trklet::ProducerKFout', TrackFindingTrackletProducerKF_params ) | 78.6 | 116 | 0.894826 |
729b69592bb4f1c56bbfc69279479c3149d38d7b | 60,446 | py | Python | py_cui/__init__.py | ne-msft/py_cui | b4938dd2c23a422496af7e32a33c2dbfcb348719 | [
"BSD-3-Clause"
] | null | null | null | py_cui/__init__.py | ne-msft/py_cui | b4938dd2c23a422496af7e32a33c2dbfcb348719 | [
"BSD-3-Clause"
] | null | null | null | py_cui/__init__.py | ne-msft/py_cui | b4938dd2c23a422496af7e32a33c2dbfcb348719 | [
"BSD-3-Clause"
] | null | null | null | """A python library for intuitively creating CUI/TUI interfaces with pre-built widgets.
"""
#
# Author: Jakub Wlodek
# Created: 12-Aug-2019
# Docs: https://jwlodek.github.io/py_cui-docs
# License: BSD-3-Clause (New/Revised)
#
# Some python core library imports
import sys
import os
import time
import copy
import shutil # We use shutil for getting the terminal dimensions
import threading # Threading is used for loading icon popups
import logging # Use logging library for debug purposes
# py_cui uses the curses library. On windows this does not exist, but
# there is a open source windows-curses module that adds curses support
# for python on windows
import curses
# py_cui imports
import py_cui
import py_cui.keys
import py_cui.statusbar
import py_cui.widgets
import py_cui.controls
import py_cui.dialogs
import py_cui.widget_set
import py_cui.popups
import py_cui.renderer
import py_cui.debug
import py_cui.errors
from py_cui.colors import *
# Version number
__version__ = '0.1.3'
def fit_text(width, text, center=False):
"""Fits text to screen size
Helper function to fit text within a given width. Used to fix issue with status/title bar text
being too long
Parameters
----------
width : int
width of window in characters
text : str
input text
center : Boolean
flag to center text
Returns
-------
fitted_text : str
text fixed depending on width
"""
if width < 5:
return '.' * width
if len(text) >= width:
return text[:width - 5] + '...'
else:
total_num_spaces = (width - len(text) - 1)
if center:
left_spaces = int(total_num_spaces / 2)
right_spaces = int(total_num_spaces / 2)
if(total_num_spaces % 2 == 1):
right_spaces = right_spaces + 1
return ' ' * left_spaces + text + ' ' * right_spaces
else:
return text + ' ' * total_num_spaces
| 37.266338 | 188 | 0.553089 |
729bee0345192e65862237553dfdacf7015f8ae1 | 5,578 | py | Python | isi_sdk_8_0/isi_sdk_8_0/models/auth_access_access_item_file.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0/isi_sdk_8_0/models/auth_access_access_item_file.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0/isi_sdk_8_0/models/auth_access_access_item_file.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 3
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
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, AuthAccessAccessItemFile):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
| 28.030151 | 95 | 0.580495 |
729d6a65e6746aea2916773666e9ce787cb8c7de | 10,772 | py | Python | dataconnector.py | iamthinkking/COMP4217_FinalProject | 98cadb013bab52677bffb951b6d173caf4bb22b3 | [
"MIT"
] | null | null | null | dataconnector.py | iamthinkking/COMP4217_FinalProject | 98cadb013bab52677bffb951b6d173caf4bb22b3 | [
"MIT"
] | null | null | null | dataconnector.py | iamthinkking/COMP4217_FinalProject | 98cadb013bab52677bffb951b6d173caf4bb22b3 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import pymysql
| 30.602273 | 121 | 0.525529 |
729e65cca9b0a6039288577ac59eedc5273e9d20 | 5,040 | py | Python | flow/visualize/plot_custom_callables.py | AHammoudeh/Flow_AH | 16c5641be3e9e85511756f75efd002478edaee9b | [
"MIT"
] | null | null | null | flow/visualize/plot_custom_callables.py | AHammoudeh/Flow_AH | 16c5641be3e9e85511756f75efd002478edaee9b | [
"MIT"
] | null | null | null | flow/visualize/plot_custom_callables.py | AHammoudeh/Flow_AH | 16c5641be3e9e85511756f75efd002478edaee9b | [
"MIT"
] | null | null | null | """Generate charts from with .npy files containing custom callables through replay."""
import argparse
from datetime import datetime
import errno
import numpy as np
import matplotlib.pyplot as plt
import os
import pytz
import sys
def parse_flags(args):
"""Parse training options user can specify in command line.
Returns
-------
argparse.Namespace
the output parser object
"""
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description="Parse argument used when running a Flow simulation.",
epilog="python train.py EXP_CONFIG")
parser.add_argument("target_folder", type=str,
help='Folder containing results')
parser.add_argument("--output_folder", type=str, required=False, default=None,
help='Folder to save charts to.')
parser.add_argument("--show_images", action='store_true',
help='Whether to display charts.')
parser.add_argument("--heatmap", type=str, required=False,
help='Make a heatmap of the supplied variable.')
return parser.parse_args(args)
if __name__ == "__main__":
flags = parse_flags(sys.argv[1:])
date = datetime.now(tz=pytz.utc)
date = date.astimezone(pytz.timezone('US/Pacific')).strftime("%m-%d-%Y")
if flags.output_folder:
if not os.path.exists(flags.output_folder):
try:
os.makedirs(flags.output_folder)
except OSError as exc:
if exc.errno != errno.EEXIST:
raise
info_dicts = []
custom_callable_names = set()
exp_names = []
for (dirpath, dir_names, file_names) in os.walk(flags.target_folder):
for file_name in file_names:
if file_name[-8:] == "info.npy":
exp_name = os.path.basename(dirpath)
info_dict = np.load(os.path.join(dirpath, file_name), allow_pickle=True).item()
info_dicts.append(info_dict)
print(info_dict.keys())
exp_names.append(exp_name)
custom_callable_names.update(info_dict.keys())
idxs = np.argsort(exp_names)
exp_names = [exp_names[i] for i in idxs]
info_dicts = [info_dicts[i] for i in idxs]
if flags.heatmap is not None:
heatmap = np.zeros((4, 6))
pr_spacing = np.around(np.linspace(0, 0.3, 4), decimals=2)
apr_spacing = np.around(np.linspace(0, 0.5, 6), decimals=2)
for exp_name, info_dict in zip(exp_names, info_dicts):
apr_bucket = int(np.around(float(exp_name.split('_')[1][3:]) / 0.1))
pr_bucket = int(np.around(float(exp_name.split('_')[0][2:]) / 0.1))
if flags.heatmap not in info_dict:
print(exp_name)
continue
else:
val = np.mean(info_dict[flags.heatmap])
print(exp_name, pr_bucket, pr_spacing[pr_bucket], apr_bucket, apr_spacing[apr_bucket], val)
heatmap[pr_bucket, apr_bucket] = val
fig = plt.figure()
plt.imshow(heatmap, interpolation='nearest', cmap='seismic', aspect='equal', vmin=1500, vmax=3000)
plt.title(flags.heatmap)
plt.yticks(ticks=np.arange(len(pr_spacing)), labels=pr_spacing)
plt.ylabel("AV Penetration")
plt.xticks(ticks=np.arange(len(apr_spacing)), labels=apr_spacing)
plt.xlabel("Aggressive Driver Penetration")
plt.colorbar()
plt.show()
plt.close(fig)
else:
for name in custom_callable_names:
y_vals = [np.mean(info_dict[name]) for info_dict in info_dicts]
y_stds = [np.std(info_dict[name]) for info_dict in info_dicts]
x_pos = np.arange(len(exp_names))
plt.bar(x_pos, y_vals, align='center', alpha=0.5)
plt.xticks(x_pos, [exp_name for exp_name in exp_names], rotation=60)
plt.xlabel('Experiment')
plt.title('I210 Replay Result: {}'.format(name))
plt.tight_layout()
if flags.output_folder:
plt.savefig(os.path.join(flags.output_folder, '{}-plot.png'.format(name)))
plt.show()
| 36.788321 | 107 | 0.624405 |
72a124c3d481e06d142109091c80f7375d688299 | 6,447 | py | Python | deployer/src/config_manager.py | yugabyte/docsearch-scraper | 8b58d364c7721cbce892843e946834a3ccc5fcd7 | [
"MIT"
] | null | null | null | deployer/src/config_manager.py | yugabyte/docsearch-scraper | 8b58d364c7721cbce892843e946834a3ccc5fcd7 | [
"MIT"
] | 2 | 2021-03-31T20:20:23.000Z | 2021-12-13T20:58:56.000Z | deployer/src/config_manager.py | tubone24/docsearch-scraper | 07937b551be7f88322c2fe2f28f3ad4eb254e996 | [
"MIT"
] | 1 | 2020-04-01T22:01:17.000Z | 2020-04-01T22:01:17.000Z | import algoliasearch
from os import environ
from . import algolia_helper
from . import snippeter
from . import emails
from . import helpers
from . import fetchers
from .helpdesk_helper import add_note, get_conversation, \
get_emails_from_conversation, get_conversation_url_from_cuid
from deployer.src.algolia_internal_api import remove_user_from_index
| 40.54717 | 106 | 0.547076 |
72a1afeaa2791d784987902c76baf2fe264f4270 | 1,131 | py | Python | Source/budgie/__init__.py | pylover/budgie | f453cf2fbbf440e8e2314c7fb63f101dbe048e17 | [
"WTFPL"
] | 3 | 2016-10-30T07:41:30.000Z | 2016-11-07T04:55:44.000Z | Source/budgie/__init__.py | pylover/budgie | f453cf2fbbf440e8e2314c7fb63f101dbe048e17 | [
"WTFPL"
] | 11 | 2016-10-28T12:18:24.000Z | 2016-10-29T15:18:56.000Z | Source/budgie/__init__.py | pylover/budgie | f453cf2fbbf440e8e2314c7fb63f101dbe048e17 | [
"WTFPL"
] | null | null | null |
import sys
from sqlalchemy.exc import DatabaseError
from . import cli
from .configuration import settings, init as init_config
from .observer import HelpdeskObserver, MaximumClientsReached
from .models import init as init_models, metadata, engine, check_db
from .smtp import SMTPConfigurationError
__version__ = '0.1.0-dev.0'
| 21.75 | 113 | 0.66313 |
72a38e5ecc9516d35d7db3206173481ed721f2aa | 3,422 | py | Python | locations/spiders/shopnsave.py | thismakessand/alltheplaces | b6116199844c9e88bff3a691290f07a7457470ba | [
"MIT"
] | 1 | 2019-08-19T10:00:55.000Z | 2019-08-19T10:00:55.000Z | locations/spiders/shopnsave.py | thismakessand/alltheplaces | b6116199844c9e88bff3a691290f07a7457470ba | [
"MIT"
] | null | null | null | locations/spiders/shopnsave.py | thismakessand/alltheplaces | b6116199844c9e88bff3a691290f07a7457470ba | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import re
from locations.items import GeojsonPointItem
DAY_DICT = {
'Mon': 'Mo',
'Tue': 'Tu',
'Wed': 'We',
'Thu': 'Th',
'Fri': 'Fr',
'Sat': 'Sa',
'Sun': 'Su',
'Monday': 'Mo',
'Tuesday': 'Tu',
'Wednesday': 'We',
'Thursday': 'Th',
'Thurs': 'Th',
'Thur': 'Th',
'Friday': 'Fr',
'Saturday': 'Sa',
'Sunday': 'Su',
'24 hours/7 days a week': '24/7',
'Please contact store for hours': 'N/A',
}
| 36.021053 | 133 | 0.564582 |
72a3a6f79755d64c89ce82684ad3ec8dc5568be0 | 65 | py | Python | run.py | TovarischSuhov/QR_quest | d2735a60f9018e59fcef09fd76b40c3a1e9d7412 | [
"Apache-2.0"
] | null | null | null | run.py | TovarischSuhov/QR_quest | d2735a60f9018e59fcef09fd76b40c3a1e9d7412 | [
"Apache-2.0"
] | null | null | null | run.py | TovarischSuhov/QR_quest | d2735a60f9018e59fcef09fd76b40c3a1e9d7412 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from app import app
app.run(debug = True)
| 13 | 21 | 0.707692 |
72a3d114ee07b14005e62845551d3b0c0d260004 | 831 | py | Python | tests/twitter_learning_journal/dao/test_os_env.py | DEV3L/twitter-learning-journal | a51d22a60a3d1249add352d8357975a7f2db585c | [
"Beerware"
] | 1 | 2021-01-12T17:06:57.000Z | 2021-01-12T17:06:57.000Z | tests/twitter_learning_journal/dao/test_os_env.py | DEV3L/twitter-learning-journal | a51d22a60a3d1249add352d8357975a7f2db585c | [
"Beerware"
] | null | null | null | tests/twitter_learning_journal/dao/test_os_env.py | DEV3L/twitter-learning-journal | a51d22a60a3d1249add352d8357975a7f2db585c | [
"Beerware"
] | 1 | 2018-07-31T21:16:33.000Z | 2018-07-31T21:16:33.000Z | from unittest.mock import patch
from app.twitter_learning_journal.dao.os_env import os_environ
| 26.806452 | 74 | 0.776173 |
72a434d4367495e97d23e862eb1e69cd74b1b481 | 477 | py | Python | web-scraper/mongoscraper/populate.py | naveenr414/hack-umbc | f5d0fa5b6c3203d54a3c98b8a43b8028229431f8 | [
"MIT"
] | null | null | null | web-scraper/mongoscraper/populate.py | naveenr414/hack-umbc | f5d0fa5b6c3203d54a3c98b8a43b8028229431f8 | [
"MIT"
] | null | null | null | web-scraper/mongoscraper/populate.py | naveenr414/hack-umbc | f5d0fa5b6c3203d54a3c98b8a43b8028229431f8 | [
"MIT"
] | null | null | null | import pymongo
myclient = pymongo.MongoClient()
mydb = myclient["mydb"]
hor = mydb["HoR"]
sen = mydb["Senator"]
gov = mydb["Governor"]
| 18.346154 | 38 | 0.601677 |
72a4e5a582877273a13f89ab82a67ba0dbfaef06 | 1,444 | py | Python | tests/test_utils_obj_value.py | ZSD-tim/dayu_widgets | 31c2530bdc4161d9311574d9850c2e9471e53072 | [
"MIT"
] | 157 | 2019-03-10T05:55:21.000Z | 2022-03-31T09:07:00.000Z | tests/test_utils_obj_value.py | kanbang/dayu_widgets | 6ff101e6c6f8fcf10e5cb578023a12ccdcef9164 | [
"MIT"
] | 16 | 2019-07-15T11:30:53.000Z | 2021-12-16T14:17:59.000Z | tests/test_utils_obj_value.py | kanbang/dayu_widgets | 6ff101e6c6f8fcf10e5cb578023a12ccdcef9164 | [
"MIT"
] | 56 | 2019-06-19T03:35:27.000Z | 2022-03-22T08:07:32.000Z | """
Test get_obj_value set_obj_value has_obj_value
"""
import pytest
from dayu_widgets import utils
| 29.469388 | 68 | 0.607341 |
72a50676744b1429bd199408d3b9fb6111481c1b | 322 | py | Python | desktop/core/ext-py/PyYAML-3.12/tests/lib3/test_all.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/core/ext-py/PyYAML-3.12/tests/lib3/test_all.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | desktop/core/ext-py/PyYAML-3.12/tests/lib3/test_all.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z |
import sys, yaml, test_appliance
if __name__ == '__main__':
main()
| 20.125 | 48 | 0.698758 |
72a54534a71e2246424e06879611de77216a27cb | 22,969 | py | Python | tim_camera/oop_detection_webcam.py | Tim-orius/aidem | 965a71888db72f42223777e890f4bcf88cde7fd3 | [
"MIT"
] | null | null | null | tim_camera/oop_detection_webcam.py | Tim-orius/aidem | 965a71888db72f42223777e890f4bcf88cde7fd3 | [
"MIT"
] | null | null | null | tim_camera/oop_detection_webcam.py | Tim-orius/aidem | 965a71888db72f42223777e890f4bcf88cde7fd3 | [
"MIT"
] | null | null | null | """ Webcam Detection with Tensorflow calssifier and object distance calculation """
__version__ = "0.1.0"
__author__ = "Tim Rosenkranz"
__email__ = "tim.rosenkranz@stud.uni-frankfurt.de"
__credits__ = "Special thanks to The Anh Vuong who came up with the original idea." \
"This code is also based off of the code from Evan Juras (see below)"
# This script is based off of a script by Evan Juras (see below).
# I rewrote this script to be object oriented and added the tkinter-ui (removed command
# line functionalities) as well as several functionalities to calculate the distance
# between two detected object
######## Webcam Object Detection Using Tensorflow-trained Classifier #########
#
# Author: Evan Juras
# Date: 10/27/19
# Description:
# This program uses a TensorFlow Lite model to perform object detection on a live webcam
# feed. It draws boxes and scores around the objects of interest in each frame from the
# webcam. To improve FPS, the webcam object runs in a separate thread from the main program.
# This script will work with either a Picamera or regular USB webcam.
#
# This code is based off the TensorFlow Lite image classification example at:
# https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/examples/python/label_image.py
#
# I [Evan Juras] added my own method of drawing boxes and labels using OpenCV.
# Import packages
import os
import argparse
import cv2
import numpy as np
import sys
import time
from threading import Thread
import importlib.util
import math
# Define VideoStream class to handle streaming of video from webcam in separate processing thread
# Source - Adrian Rosebrock, PyImageSearch: https://www.pyimagesearch.com/2015/12/28/increasing-raspberry-pi-fps-with-python-and-opencv/
def main():
det_ob = LiveDetection()
det_ob.detect()
del det_ob
if __name__ == "__main__":
main()
| 49.184154 | 221 | 0.530846 |
72a66499365040683f1a28fc9b02b8c6e95b1740 | 4,107 | py | Python | modules/zabbix_smart.py | yakumo-saki/smart_to_zabbix | 04dd1debe0c831b4ec94962884543c989ad57730 | [
"MIT"
] | null | null | null | modules/zabbix_smart.py | yakumo-saki/smart_to_zabbix | 04dd1debe0c831b4ec94962884543c989ad57730 | [
"MIT"
] | 23 | 2021-08-30T14:59:27.000Z | 2021-11-05T16:51:08.000Z | modules/zabbix_smart.py | yakumo-saki/smart_to_zabbix | 04dd1debe0c831b4ec94962884543c989ad57730 | [
"MIT"
] | null | null | null | import json
import logging
import config as cfg
from modules.const import Keys, AttrKey
from modules.zabbix_sender import send_to_zabbix
logger = logging.getLogger(__name__)
SMART_ATTR_KEY = "ata_smart_attributes"
NVME_ATTR_KEY = "nvme_smart_health_information_log"
def send_attribute_discovery(result):
"""
zabbixS.M.A.R.T Attribute LLD
Attribute LLDSMART
"""
logger.info("Sending S.M.A.R.T attribute discovery to zabbix")
discovery_result = []
for device in result:
logger.info("Listing S.M.A.R.T attributes: " + device)
detail = result[device]
discovery = {AttrKey.DEV_NAME: device, AttrKey.DISK_NAME: detail["model_name"]}
if (SMART_ATTR_KEY in detail):
discovery_result = create_attribute_list_non_nvme(discovery, detail[SMART_ATTR_KEY])
elif (NVME_ATTR_KEY in detail):
discovery_result = create_attribute_list_nvme(discovery, detail[NVME_ATTR_KEY])
data = {"request": "sender data", "data":[]}
valueStr = json.dumps({"data": discovery_result})
one_data = {"host": cfg.ZABBIX_HOST, "key": AttrKey.KEY, "value": f"{valueStr}"}
data["data"].append(one_data)
send_to_zabbix(data)
return None
| 30.198529 | 90 | 0.70392 |
72a84aac36dbbd7474150732b72b1f6e0905fbe4 | 2,007 | py | Python | data.py | kpister/biaxial-rnn-music-composition | f6feafad0fe1066dd957293803a86d6c584d9952 | [
"BSD-2-Clause"
] | null | null | null | data.py | kpister/biaxial-rnn-music-composition | f6feafad0fe1066dd957293803a86d6c584d9952 | [
"BSD-2-Clause"
] | null | null | null | data.py | kpister/biaxial-rnn-music-composition | f6feafad0fe1066dd957293803a86d6c584d9952 | [
"BSD-2-Clause"
] | null | null | null | import itertools
from midi_to_statematrix import UPPER_BOUND, LOWER_BOUND
| 26.76 | 89 | 0.636273 |
72a872cd27be148319e99d8b66913e6b97bcfc81 | 7,861 | py | Python | ocdb/ws/controllers/datasets.py | eocdb/ocdb-server | 0e28d092e8ecf5f4813878aab43de990cc5fb4ee | [
"MIT"
] | null | null | null | ocdb/ws/controllers/datasets.py | eocdb/ocdb-server | 0e28d092e8ecf5f4813878aab43de990cc5fb4ee | [
"MIT"
] | null | null | null | ocdb/ws/controllers/datasets.py | eocdb/ocdb-server | 0e28d092e8ecf5f4813878aab43de990cc5fb4ee | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright (c) 2018 by EUMETSAT
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is furnished to do
# so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from typing import List, Union
from ..context import WsContext
from ...core.asserts import assert_not_none, assert_one_of, assert_instance
from ...core.models.dataset import Dataset
from ...core.models.dataset_query import DatasetQuery
from ...core.models.dataset_query_result import DatasetQueryResult
from ...core.models.dataset_ref import DatasetRef
from ...core.models.dataset_validation_result import DatasetValidationResult
from ...core.models.qc_info import QcInfo, QC_STATUS_SUBMITTED
from ...core.val import validator
from ...ws.errors import WsResourceNotFoundError, WsBadRequestError, WsNotImplementedError
def find_datasets(ctx: WsContext,
expr: str = None,
region: List[float] = None,
time: List[str] = None,
wdepth: List[float] = None,
mtype: str = 'all',
wlmode: str = 'all',
shallow: str = 'no',
pmode: str = 'contains',
pgroup: List[str] = None,
status: str = None,
submission_id: str = None,
pname: List[str] = None,
geojson: bool = False,
offset: int = 1,
user_id: str = None,
count: int = 1000) -> DatasetQueryResult:
"""Find datasets."""
assert_one_of(wlmode, ['all', 'multispectral', 'hyperspectral'], name='wlmode')
assert_one_of(shallow, ['no', 'yes', 'exclusively'], name='shallow')
assert_one_of(pmode, ['contains', 'same_cruise', 'dont_apply'], name='pmode')
if pgroup is not None:
assert_instance(pgroup, [])
# Ensuring that the search uses lower case pnames
if pname:
pname = [p.lower() for p in pname]
query = DatasetQuery()
query.expr = expr
query.region = region
query.time = time
query.wdepth = wdepth
query.mtype = mtype
query.wlmode = wlmode
query.shallow = shallow
query.pmode = pmode
query.pgroup = pgroup
query.submission_id = submission_id
query.status = status
query.pname = pname
query.geojson = geojson
query.offset = offset
query.count = count
query.user_id = user_id
result = DatasetQueryResult({}, 0, [], query)
for driver in ctx.db_drivers:
result_part = driver.instance().find_datasets(query)
result.total_count += result_part.total_count
result.datasets += result_part.datasets
result.dataset_ids += result_part.dataset_ids
result.locations.update(result_part.locations)
return result
def add_dataset(ctx: WsContext,
dataset: Dataset) -> DatasetRef:
"""Add a new dataset."""
assert_not_none(dataset)
validation_result = validator.validate_dataset(dataset, ctx.config)
if validation_result.status == "ERROR":
raise WsBadRequestError(f"Invalid dataset.")
dataset_id = ctx.db_driver.instance().add_dataset(dataset)
if not dataset_id:
raise WsBadRequestError(f"Could not add dataset {dataset.path}")
return DatasetRef(dataset_id, dataset.path, dataset.filename)
def update_dataset(ctx: WsContext,
dataset: Dataset):
"""Update an existing dataset."""
assert_not_none(dataset)
validation_result = validator.validate_dataset(dataset, ctx.config)
if validation_result.status == "ERROR":
raise WsBadRequestError(f"Invalid dataset.")
updated = ctx.db_driver.instance().update_dataset(dataset)
if not updated:
raise WsResourceNotFoundError(f"Dataset with ID {dataset.id} not found")
return updated
def delete_dataset(ctx: WsContext,
dataset_id: str):
"""Delete an existing dataset."""
# assert_not_none(api_key, name='api_key')
assert_not_none(dataset_id, name='dataset_id')
deleted = ctx.db_driver.instance().delete_dataset(dataset_id)
if not deleted:
raise WsResourceNotFoundError(f"Dataset with ID {dataset_id} not found")
return deleted
def get_dataset_by_id_strict(ctx: WsContext,
dataset_id: str) -> Dataset:
"""Get dataset by ID."""
assert_not_none(dataset_id, name='dataset_id')
dataset = ctx.db_driver.instance().get_dataset(dataset_id)
if dataset is not None:
return dataset
raise WsResourceNotFoundError(f"Dataset with ID {dataset_id} not found")
def get_dataset_by_id(ctx: WsContext,
dataset_id: Union[dict, str]) -> Dataset:
"""Get dataset by ID."""
assert_not_none(dataset_id, name='dataset_id')
# The dataset_id may be a dataset json object
if isinstance(dataset_id, dict):
dataset_id = dataset_id['id']
dataset = ctx.db_driver.instance().get_dataset(dataset_id)
return dataset
# noinspection PyUnusedLocal,PyTypeChecker
# noinspection PyUnusedLocal,PyTypeChecker
# noinspection PyUnusedLocal
# noinspection PyUnusedLocal
| 38.346341 | 97 | 0.677649 |
72a973eeb72b3616d349d7fd689d925f5f433b09 | 4,209 | py | Python | libAnt/node.py | ayanezcasal/AntLibAYC | c266af973f4c32d4baf30130fe51a572478488ec | [
"MIT"
] | 19 | 2018-04-14T15:29:17.000Z | 2022-02-05T08:51:16.000Z | libAnt/node.py | ayanezcasal/AntLibAYC | c266af973f4c32d4baf30130fe51a572478488ec | [
"MIT"
] | 5 | 2018-12-16T09:32:06.000Z | 2021-10-20T20:20:06.000Z | libAnt/node.py | ayanezcasal/AntLibAYC | c266af973f4c32d4baf30130fe51a572478488ec | [
"MIT"
] | 12 | 2016-08-24T09:00:44.000Z | 2022-01-24T00:16:13.000Z | import threading
from queue import Queue, Empty
from time import sleep
from libAnt.drivers.driver import Driver
from libAnt.message import *
| 33.943548 | 117 | 0.516512 |
72a98cda239838c97dafaaefa4602ca6f04cc90c | 5,168 | py | Python | tests/test_seasonality.py | OliPerkins1987/Wildfire_Human_Agency_Model | 49ac17c7c2ad5e03d572b6ae22c227e89a944624 | [
"MIT"
] | 1 | 2021-06-24T16:45:22.000Z | 2021-06-24T16:45:22.000Z | tests/test_seasonality.py | OliPerkins1987/Wildfire_Human_Agency_Model | 49ac17c7c2ad5e03d572b6ae22c227e89a944624 | [
"MIT"
] | null | null | null | tests/test_seasonality.py | OliPerkins1987/Wildfire_Human_Agency_Model | 49ac17c7c2ad5e03d572b6ae22c227e89a944624 | [
"MIT"
] | 1 | 2021-10-05T08:57:17.000Z | 2021-10-05T08:57:17.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 30 12:17:04 2021
@author: Oli
"""
import pytest
import pandas as pd
import numpy as np
import netCDF4 as nc
import os
from copy import deepcopy
os.chdir(os.path.dirname(os.path.realpath(__file__)))
wd = os.getcwd().replace('\\', '/')
exec(open("test_setup.py").read())
os.chdir((wd[0:-6] + '/src/data_import'))
exec(open("local_load_up.py").read())
from model_interface.wham import WHAM
from Core_functionality.AFTs.agent_class import AFT
from Core_functionality.AFTs.arable_afts import Swidden, SOSH, MOSH, Intense_arable
from Core_functionality.AFTs.livestock_afts import Pastoralist, Ext_LF_r, Int_LF_r, Ext_LF_p, Int_LF_p
from Core_functionality.AFTs.forestry_afts import Agroforestry, Logger, Managed_forestry, Abandoned_forestry
from Core_functionality.AFTs.nonex_afts import Hunter_gatherer, Recreationalist, SLM, Conservationist
from Core_functionality.AFTs.land_system_class import land_system
from Core_functionality.AFTs.land_systems import Cropland, Pasture, Rangeland, Forestry, Urban, Unoccupied, Nonex
from Core_functionality.top_down_processes.arson import arson
from Core_functionality.top_down_processes.background_ignitions import background_rate
from Core_functionality.top_down_processes.fire_constraints import fuel_ct, dominant_afr_ct
from Core_functionality.Trees.Transfer_tree import define_tree_links, predict_from_tree, update_pars, predict_from_tree_fast
from Core_functionality.prediction_tools.regression_families import regression_link, regression_transformation
#####################################################################
### Run model year then reproduce outputs
#####################################################################
### Run model for 1 year
all_afts = [Swidden, SOSH, MOSH, Intense_arable,
Pastoralist, Ext_LF_r, Int_LF_r, Ext_LF_p, Int_LF_p,
Agroforestry, Logger, Managed_forestry, Abandoned_forestry,
Hunter_gatherer, Recreationalist, SLM, Conservationist]
parameters = {
'xlen': 192,
'ylen': 144,
'AFTs': all_afts,
'LS' : [Cropland, Rangeland, Pasture, Forestry, Nonex, Unoccupied, Urban],
'Fire_types': {'cfp': 'Vegetation', 'crb': 'Arable', 'hg': 'Vegetation',
'pasture': 'Pasture', 'pyrome': 'Vegetation'},
'Observers': {'arson': arson, 'background_rate': background_rate},
'AFT_pars': Core_pars,
'Maps' : Map_data,
'Constraint_pars': {'Soil_threshold': 0.1325,
'Dominant_afr_threshold': 0.5,
'Rangeland_stocking_contstraint': True,
'R_s_c_Positive' : False,
'HG_Market_constraint': 7800,
'Arson_threshold': 0.5},
'timestep': 0,
'end_run' : 0,
'reporters': ['Managed_fire', 'Background_ignitions','Arson'],
'theta' : 0.1,
'bootstrap': False,
'Seasonality': False
}
mod = WHAM(parameters)
### setup
mod.setup()
### go
mod.go()
mod_annual = deepcopy(mod.results['Managed_fire'][0]['Total'])
#######################
### Run model monthly
#######################
all_afts = [Swidden, SOSH, MOSH, Intense_arable,
Pastoralist, Ext_LF_r, Int_LF_r, Ext_LF_p, Int_LF_p,
Agroforestry, Logger, Managed_forestry, Abandoned_forestry,
Hunter_gatherer, Recreationalist, SLM, Conservationist]
parameters = {
'xlen': 192,
'ylen': 144,
'AFTs': all_afts,
'LS' : [Cropland, Rangeland, Pasture, Forestry, Nonex, Unoccupied, Urban],
'Fire_types': {'cfp': 'Vegetation', 'crb': 'Arable', 'hg': 'Vegetation',
'pasture': 'Pasture', 'pyrome': 'Vegetation'},
'Fire_seasonality': Seasonality,
'Observers': {'arson': arson, 'background_rate': background_rate},
'AFT_pars': Core_pars,
'Maps' : Map_data,
'Constraint_pars': {'Soil_threshold': 0.1325,
'Dominant_afr_threshold': 0.5,
'Rangeland_stocking_contstraint': True,
'R_s_c_Positive' : False,
'HG_Market_constraint': 7800,
'Arson_threshold': 0.5},
'timestep': 0,
'end_run' : 0,
'reporters': ['Managed_fire', 'Background_ignitions','Arson'],
'theta' : 0.1,
'bootstrap': False,
'Seasonality': True
}
mod = WHAM(parameters)
### setup
mod.setup()
### go
mod.go()
##################################
### tests
##################################
| 32.917197 | 125 | 0.60952 |
72a98f8195358b1bfa2d15602cde451901a0aac4 | 2,514 | py | Python | bookalo/funciones_report.py | unizar-30226-2019-08/Backend | d14e6fce293330611cd697af033823aa01a2ebfe | [
"MIT"
] | 3 | 2019-05-21T19:35:30.000Z | 2019-06-03T19:58:10.000Z | bookalo/funciones_report.py | unizar-30226-2019-08/Backend | d14e6fce293330611cd697af033823aa01a2ebfe | [
"MIT"
] | 99 | 2019-03-14T10:22:52.000Z | 2022-03-11T23:46:08.000Z | bookalo/funciones_report.py | unizar-30226-2019-08/Backend | d14e6fce293330611cd697af033823aa01a2ebfe | [
"MIT"
] | 4 | 2019-03-17T18:53:57.000Z | 2019-05-21T19:35:35.000Z | from django.shortcuts import render, redirect
from bookalo.pyrebase_settings import db, auth
from bookalo.models import *
from bookalo.serializers import *
#from bookalo.functions import *
from rest_framework import status, permissions
from rest_framework.decorators import api_view, permission_classes
from rest_framework.response import Response
from rest_framework.request import Request
from rest_framework.test import APIRequestFactory
from operator import itemgetter
from django.http import HttpResponse
from datetime import datetime, timedelta, timezone
from django.db.models import Q, Count
from django.contrib.gis.geoip2 import GeoIP2
from math import sin, cos, sqrt, atan2, radians
from decimal import Decimal
from django.core.mail import EmailMessage
from .funciones_chat import *
| 54.652174 | 307 | 0.73031 |
72a9deefb1b6924bdaa40e4fd75c347025f116d3 | 572 | py | Python | tests/test_client.py | patvdleer/nefit-client-python | 97f2c1e454b7c0d5829e1a9c285c998980c603e3 | [
"MIT"
] | 11 | 2017-07-20T10:12:55.000Z | 2020-12-25T12:40:31.000Z | tests/test_client.py | patvdleer/nefit-client-python | 97f2c1e454b7c0d5829e1a9c285c998980c603e3 | [
"MIT"
] | 5 | 2018-01-01T22:11:09.000Z | 2020-05-14T20:59:50.000Z | tests/test_client.py | patvdleer/nefit-client-python | 97f2c1e454b7c0d5829e1a9c285c998980c603e3 | [
"MIT"
] | 11 | 2017-04-09T18:55:53.000Z | 2020-04-22T14:31:12.000Z | import os
import unittest
from nefit import NefitClient, NefitResponseException
if __name__ == '__main__':
unittest.main()
| 26 | 67 | 0.657343 |
72ac281779d052a2842e7fce7e7f54eebca721c0 | 5,080 | py | Python | opencivicdata/merge.py | GovHawkDC/python-opencivicdata | 1679a4e5df381c777c3e6c53d7c056321662e99a | [
"BSD-3-Clause"
] | null | null | null | opencivicdata/merge.py | GovHawkDC/python-opencivicdata | 1679a4e5df381c777c3e6c53d7c056321662e99a | [
"BSD-3-Clause"
] | null | null | null | opencivicdata/merge.py | GovHawkDC/python-opencivicdata | 1679a4e5df381c777c3e6c53d7c056321662e99a | [
"BSD-3-Clause"
] | null | null | null | import datetime
from django.db import transaction
def compute_diff(obj1, obj2):
"""
Given two objects compute a list of differences.
Each diff dict has the following keys:
field - name of the field
new - the new value for the field
one - value of the field in obj1
two - value of the field in obj2
diff - none|one|two|new
list - true if field is a list of related objects
"""
comparison = []
fields = obj1._meta.get_fields()
exclude = ('created_at', 'updated_at', 'id', 'locked_fields')
if obj1 == obj2:
raise ValueError('cannot merge object with itself')
for field in fields:
if field.name in exclude:
continue
elif not field.is_relation:
piece_one = getattr(obj1, field.name)
piece_two = getattr(obj2, field.name)
if piece_one == piece_two:
diff = 'none'
new = piece_one
elif piece_one:
diff = 'one'
new = piece_one
elif piece_two:
diff = 'two'
new = piece_two
comparison.append({
'field': field.name,
'new': new,
'one': getattr(obj1, field.name),
'two': getattr(obj2, field.name),
'diff': diff,
'list': False,
})
else:
related_name = field.get_accessor_name()
piece_one = list(getattr(obj1, related_name).all())
piece_two = list(getattr(obj2, related_name).all())
# TODO: try and deduplicate the lists?
new = piece_one + piece_two
diff = 'none' if piece_one == piece_two else 'one'
if (field.name == 'other_names' and obj1.name != obj2.name):
new.append(field.related_model(name=obj2.name,
note='from merge w/ ' + obj2.id)
)
diff = 'new'
if field.name == 'identifiers':
new.append(field.related_model(identifier=obj2.id))
diff = 'new'
if field.name == 'memberships':
new = _dedupe_memberships(new)
comparison.append({
'field': related_name,
'new': new,
'one': piece_one,
'two': piece_two,
'diff': diff,
'list': True,
})
comparison.append({'field': 'created_at',
'new': min(obj1.created_at, obj2.created_at),
'one': obj1.created_at,
'two': obj2.created_at,
'diff': 'one' if obj1.created_at < obj2.created_at else 'two',
'list': False,
})
comparison.append({'field': 'updated_at',
'new': datetime.datetime.utcnow(),
'one': obj1.updated_at,
'two': obj2.updated_at,
'diff': 'new',
'list': False,
})
# locked fields are any fields that change that aren't M2M relations
# (ending in _set)
new_locked_fields = obj1.locked_fields + obj2.locked_fields + [
c['field'] for c in comparison if c['diff'] != 'none' and not c['field'].endswith('_set')
]
new_locked_fields = set(new_locked_fields) - {'updated_at', 'created_at'}
comparison.append({'field': 'locked_fields',
'new': list(new_locked_fields),
'one': obj1.locked_fields,
'two': obj2.updated_at,
'diff': 'new',
'list': False,
})
return comparison
| 34.794521 | 97 | 0.491339 |
72ac92211f4ec9ab263019e3549666f802fa242f | 3,257 | py | Python | src/python/pants/core/project_info/filedeps.py | silverguo/pants | 141510d03fbf2b7e1a0b54f66b54088697f6fa51 | [
"Apache-2.0"
] | null | null | null | src/python/pants/core/project_info/filedeps.py | silverguo/pants | 141510d03fbf2b7e1a0b54f66b54088697f6fa51 | [
"Apache-2.0"
] | null | null | null | src/python/pants/core/project_info/filedeps.py | silverguo/pants | 141510d03fbf2b7e1a0b54f66b54088697f6fa51 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import itertools
from pathlib import PurePath
from typing import Iterable
from pants.base.build_root import BuildRoot
from pants.engine.addresses import Address, Addresses, BuildFileAddress
from pants.engine.console import Console
from pants.engine.goal import Goal, GoalSubsystem, LineOriented
from pants.engine.rules import goal_rule
from pants.engine.selectors import Get, MultiGet
from pants.engine.target import (
HydratedSources,
HydrateSourcesRequest,
Sources,
Target,
Targets,
TransitiveTargets,
)
def rules():
return [file_deps]
| 30.726415 | 100 | 0.645072 |
72adadcbd8e2ff6b2637e141f68ab8b5a7fcd9ed | 5,887 | py | Python | perfkitbenchmarker/providers/rackspace/rackspace_network.py | dq922/CloudControlVM | fae2cf7d2c4388e1dc657bd9245d88f2cb1b9b52 | [
"Apache-2.0"
] | null | null | null | perfkitbenchmarker/providers/rackspace/rackspace_network.py | dq922/CloudControlVM | fae2cf7d2c4388e1dc657bd9245d88f2cb1b9b52 | [
"Apache-2.0"
] | null | null | null | perfkitbenchmarker/providers/rackspace/rackspace_network.py | dq922/CloudControlVM | fae2cf7d2c4388e1dc657bd9245d88f2cb1b9b52 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Module containing classes related to Rackspace VM networking.
The SecurityGroup class provides a way of opening VM ports. The Network class
allows VMs to communicate via internal IPs.
"""
import json
import os
import threading
from perfkitbenchmarker import flags
from perfkitbenchmarker import network
from perfkitbenchmarker import vm_util
from perfkitbenchmarker.providers.rackspace import util
from perfkitbenchmarker import providers
FLAGS = flags.FLAGS
SSH_PORT = 22
| 38.477124 | 80 | 0.565993 |
72b295dd25910f310b0a00f8178ac31d5400862a | 154,604 | py | Python | dota2py/proto/dota_usermessages_pb2.py | mjdesrosiers/dota2py | 744f44ba6993c99932037df15de2c08dbd265674 | [
"MIT"
] | 86 | 2015-01-05T02:03:10.000Z | 2021-07-06T02:38:20.000Z | dota2py/proto/dota_usermessages_pb2.py | mjdesrosiers/dota2py | 744f44ba6993c99932037df15de2c08dbd265674 | [
"MIT"
] | 8 | 2015-01-20T15:24:20.000Z | 2018-11-29T07:35:53.000Z | dota2py/proto/dota_usermessages_pb2.py | mjdesrosiers/dota2py | 744f44ba6993c99932037df15de2c08dbd265674 | [
"MIT"
] | 29 | 2015-01-20T15:26:50.000Z | 2019-08-30T14:49:28.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
import google.protobuf.descriptor_pb2
import netmessages_pb2
import ai_activity_pb2
import dota_commonmessages_pb2
DESCRIPTOR = descriptor.FileDescriptor(
name='dota_usermessages.proto',
package='',
serialized_pb='\n\x17\x64ota_usermessages.proto\x1a google/protobuf/descriptor.proto\x1a\x11netmessages.proto\x1a\x11\x61i_activity.proto\x1a\x19\x64ota_commonmessages.proto\"+\n\x18\x43\x44OTAUserMsg_AIDebugLine\x12\x0f\n\x07message\x18\x01 \x01(\t\"$\n\x11\x43\x44OTAUserMsg_Ping\x12\x0f\n\x07message\x18\x01 \x01(\t\",\n\x17\x43\x44OTAUserMsg_SwapVerify\x12\x11\n\tplayer_id\x18\x01 \x01(\r\"\xef\x01\n\x16\x43\x44OTAUserMsg_ChatEvent\x12\x36\n\x04type\x18\x01 \x02(\x0e\x32\x12.DOTA_CHAT_MESSAGE:\x14\x43HAT_MESSAGE_INVALID\x12\r\n\x05value\x18\x02 \x01(\r\x12\x16\n\nplayerid_1\x18\x03 \x01(\x11:\x02-1\x12\x16\n\nplayerid_2\x18\x04 \x01(\x11:\x02-1\x12\x16\n\nplayerid_3\x18\x05 \x01(\x11:\x02-1\x12\x16\n\nplayerid_4\x18\x06 \x01(\x11:\x02-1\x12\x16\n\nplayerid_5\x18\x07 \x01(\x11:\x02-1\x12\x16\n\nplayerid_6\x18\x08 \x01(\x11:\x02-1\"\xfd\x01\n\x1a\x43\x44OTAUserMsg_CombatLogData\x12:\n\x04type\x18\x01 \x01(\x0e\x32\x15.DOTA_COMBATLOG_TYPES:\x15\x44OTA_COMBATLOG_DAMAGE\x12\x13\n\x0btarget_name\x18\x02 \x01(\r\x12\x15\n\rattacker_name\x18\x03 \x01(\r\x12\x19\n\x11\x61ttacker_illusion\x18\x04 \x01(\x08\x12\x17\n\x0ftarget_illusion\x18\x05 \x01(\x08\x12\x16\n\x0einflictor_name\x18\x06 \x01(\r\x12\r\n\x05value\x18\x07 \x01(\x05\x12\x0e\n\x06health\x18\x08 \x01(\x05\x12\x0c\n\x04time\x18\t \x01(\x02\"!\n\x1f\x43\x44OTAUserMsg_CombatLogShowDeath\"Z\n\x14\x43\x44OTAUserMsg_BotChat\x12\x11\n\tplayer_id\x18\x01 \x01(\r\x12\x0e\n\x06\x66ormat\x18\x02 \x01(\t\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x0e\n\x06target\x18\x04 \x01(\t\"q\n CDOTAUserMsg_CombatHeroPositions\x12\r\n\x05index\x18\x01 \x01(\r\x12\x0c\n\x04time\x18\x02 \x01(\x05\x12 \n\tworld_pos\x18\x03 \x01(\x0b\x32\r.CMsgVector2D\x12\x0e\n\x06health\x18\x04 \x01(\x05\"\xfd\x01\n\x1c\x43\x44OTAUserMsg_MiniKillCamInfo\x12\x39\n\tattackers\x18\x01 \x03(\x0b\x32&.CDOTAUserMsg_MiniKillCamInfo.Attacker\x1a\xa1\x01\n\x08\x41ttacker\x12\x10\n\x08\x61ttacker\x18\x01 \x01(\r\x12\x14\n\x0ctotal_damage\x18\x02 \x01(\x05\x12\x41\n\tabilities\x18\x03 \x03(\x0b\x32..CDOTAUserMsg_MiniKillCamInfo.Attacker.Ability\x1a*\n\x07\x41\x62ility\x12\x0f\n\x07\x61\x62ility\x18\x01 \x01(\r\x12\x0e\n\x06\x64\x61mage\x18\x02 \x01(\x05\"@\n\x1d\x43\x44OTAUserMsg_GlobalLightColor\x12\r\n\x05\x63olor\x18\x01 \x01(\r\x12\x10\n\x08\x64uration\x18\x02 \x01(\x02\"U\n!CDOTAUserMsg_GlobalLightDirection\x12\x1e\n\tdirection\x18\x01 \x01(\x0b\x32\x0b.CMsgVector\x12\x10\n\x08\x64uration\x18\x02 \x01(\x02\"]\n\x19\x43\x44OTAUserMsg_LocationPing\x12\x11\n\tplayer_id\x18\x01 \x01(\r\x12-\n\rlocation_ping\x18\x02 \x01(\x0b\x32\x16.CDOTAMsg_LocationPing\"T\n\x16\x43\x44OTAUserMsg_ItemAlert\x12\x11\n\tplayer_id\x18\x01 \x01(\r\x12\'\n\nitem_alert\x18\x02 \x01(\x0b\x32\x13.CDOTAMsg_ItemAlert\"n\n\x19\x43\x44OTAUserMsg_MinimapEvent\x12\x12\n\nevent_type\x18\x01 \x01(\x05\x12\x15\n\rentity_handle\x18\x02 \x01(\x05\x12\t\n\x01x\x18\x03 \x01(\x05\x12\t\n\x01y\x18\x04 \x01(\x05\x12\x10\n\x08\x64uration\x18\x05 \x01(\x05\"M\n\x14\x43\x44OTAUserMsg_MapLine\x12\x11\n\tplayer_id\x18\x01 \x01(\x05\x12\"\n\x07mapline\x18\x02 \x01(\x0b\x32\x11.CDOTAMsg_MapLine\"n\n\x1e\x43\x44OTAUserMsg_MinimapDebugPoint\x12\x1d\n\x08location\x18\x01 \x01(\x0b\x32\x0b.CMsgVector\x12\r\n\x05\x63olor\x18\x02 \x01(\r\x12\x0c\n\x04size\x18\x03 \x01(\x05\x12\x10\n\x08\x64uration\x18\x04 \x01(\x02\"\xae\x01\n#CDOTAUserMsg_CreateLinearProjectile\x12\x1b\n\x06origin\x18\x01 \x01(\x0b\x32\x0b.CMsgVector\x12\x1f\n\x08velocity\x18\x02 \x01(\x0b\x32\r.CMsgVector2D\x12\x0f\n\x07latency\x18\x03 \x01(\x05\x12\x10\n\x08\x65ntindex\x18\x04 \x01(\x05\x12\x16\n\x0eparticle_index\x18\x05 \x01(\x05\x12\x0e\n\x06handle\x18\x06 \x01(\x05\"6\n$CDOTAUserMsg_DestroyLinearProjectile\x12\x0e\n\x06handle\x18\x01 \x01(\x05\"9\n%CDOTAUserMsg_DodgeTrackingProjectiles\x12\x10\n\x08\x65ntindex\x18\x01 \x02(\x05\"_\n!CDOTAUserMsg_SpectatorPlayerClick\x12\x10\n\x08\x65ntindex\x18\x01 \x02(\x05\x12\x12\n\norder_type\x18\x02 \x01(\x05\x12\x14\n\x0ctarget_index\x18\x03 \x01(\x05\"b\n\x1d\x43\x44OTAUserMsg_NevermoreRequiem\x12\x15\n\rentity_handle\x18\x01 \x01(\x05\x12\r\n\x05lines\x18\x02 \x01(\x05\x12\x1b\n\x06origin\x18\x03 \x01(\x0b\x32\x0b.CMsgVector\".\n\x1b\x43\x44OTAUserMsg_InvalidCommand\x12\x0f\n\x07message\x18\x01 \x01(\t\")\n\x15\x43\x44OTAUserMsg_HudError\x12\x10\n\x08order_id\x18\x01 \x01(\x05\"c\n\x1b\x43\x44OTAUserMsg_SharedCooldown\x12\x10\n\x08\x65ntindex\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x63ooldown\x18\x03 \x01(\x02\x12\x12\n\nname_index\x18\x04 \x01(\x05\"/\n\x1f\x43\x44OTAUserMsg_SetNextAutobuyItem\x12\x0c\n\x04name\x18\x01 \x01(\t\"X\n\x1b\x43\x44OTAUserMsg_HalloweenDrops\x12\x11\n\titem_defs\x18\x01 \x03(\r\x12\x12\n\nplayer_ids\x18\x02 \x03(\r\x12\x12\n\nprize_list\x18\x03 \x01(\r\"\xfe\x01\n\x1c\x43\x44OTAResponseQuerySerialized\x12\x31\n\x05\x66\x61\x63ts\x18\x01 \x03(\x0b\x32\".CDOTAResponseQuerySerialized.Fact\x1a\xaa\x01\n\x04\x46\x61\x63t\x12\x0b\n\x03key\x18\x01 \x02(\x05\x12\x46\n\x07valtype\x18\x02 \x02(\x0e\x32,.CDOTAResponseQuerySerialized.Fact.ValueType:\x07NUMERIC\x12\x13\n\x0bval_numeric\x18\x03 \x01(\x02\x12\x12\n\nval_string\x18\x04 \x01(\t\"$\n\tValueType\x12\x0b\n\x07NUMERIC\x10\x01\x12\n\n\x06STRING\x10\x02\"\x90\x01\n\x18\x43\x44OTASpeechMatchOnClient\x12\x0f\n\x07\x63oncept\x18\x01 \x01(\x05\x12\x16\n\x0erecipient_type\x18\x02 \x01(\x05\x12\x34\n\rresponsequery\x18\x03 \x01(\x0b\x32\x1d.CDOTAResponseQuerySerialized\x12\x15\n\nrandomseed\x18\x04 \x01(\x0f:\x01\x30\"\xb0\x07\n\x16\x43\x44OTAUserMsg_UnitEvent\x12\x38\n\x08msg_type\x18\x01 \x02(\x0e\x32\x14.EDotaEntityMessages:\x10\x44OTA_UNIT_SPEECH\x12\x14\n\x0c\x65ntity_index\x18\x02 \x02(\x05\x12.\n\x06speech\x18\x03 \x01(\x0b\x32\x1e.CDOTAUserMsg_UnitEvent.Speech\x12\x37\n\x0bspeech_mute\x18\x04 \x01(\x0b\x32\".CDOTAUserMsg_UnitEvent.SpeechMute\x12\x37\n\x0b\x61\x64\x64_gesture\x18\x05 \x01(\x0b\x32\".CDOTAUserMsg_UnitEvent.AddGesture\x12=\n\x0eremove_gesture\x18\x06 \x01(\x0b\x32%.CDOTAUserMsg_UnitEvent.RemoveGesture\x12\x39\n\x0c\x62lood_impact\x18\x07 \x01(\x0b\x32#.CDOTAUserMsg_UnitEvent.BloodImpact\x12\x39\n\x0c\x66\x61\x64\x65_gesture\x18\x08 \x01(\x0b\x32#.CDOTAUserMsg_UnitEvent.FadeGesture\x12\x39\n\x16speech_match_on_client\x18\t \x01(\x0b\x32\x19.CDOTASpeechMatchOnClient\x1ak\n\x06Speech\x12\x0f\n\x07\x63oncept\x18\x01 \x01(\x05\x12\x10\n\x08response\x18\x02 \x01(\t\x12\x16\n\x0erecipient_type\x18\x03 \x01(\x05\x12\r\n\x05level\x18\x04 \x01(\x05\x12\x17\n\x08muteable\x18\x05 \x01(\x08:\x05\x66\x61lse\x1a \n\nSpeechMute\x12\x12\n\x05\x64\x65lay\x18\x01 \x01(\x02:\x03\x30.5\x1ao\n\nAddGesture\x12(\n\x08\x61\x63tivity\x18\x01 \x01(\x0e\x32\t.Activity:\x0b\x41\x43T_INVALID\x12\x0c\n\x04slot\x18\x02 \x01(\x05\x12\x12\n\x07\x66\x61\x64\x65_in\x18\x03 \x01(\x02:\x01\x30\x12\x15\n\x08\x66\x61\x64\x65_out\x18\x04 \x01(\x02:\x03\x30.1\x1a\x39\n\rRemoveGesture\x12(\n\x08\x61\x63tivity\x18\x01 \x01(\x0e\x32\t.Activity:\x0b\x41\x43T_INVALID\x1a@\n\x0b\x42loodImpact\x12\r\n\x05scale\x18\x01 \x01(\x05\x12\x10\n\x08x_normal\x18\x02 \x01(\x05\x12\x10\n\x08y_normal\x18\x03 \x01(\x05\x1a\x37\n\x0b\x46\x61\x64\x65Gesture\x12(\n\x08\x61\x63tivity\x18\x01 \x01(\x0e\x32\t.Activity:\x0b\x41\x43T_INVALID\"0\n\x1a\x43\x44OTAUserMsg_ItemPurchased\x12\x12\n\nitem_index\x18\x01 \x01(\x05\"j\n\x16\x43\x44OTAUserMsg_ItemFound\x12\x0e\n\x06player\x18\x01 \x01(\x05\x12\x0f\n\x07quality\x18\x02 \x01(\x05\x12\x0e\n\x06rarity\x18\x03 \x01(\x05\x12\x0e\n\x06method\x18\x04 \x01(\x05\x12\x0f\n\x07itemdef\x18\x05 \x01(\x05\"\xfd\x0f\n\x1c\x43\x44OTAUserMsg_ParticleManager\x12H\n\x04type\x18\x01 \x02(\x0e\x32\x16.DOTA_PARTICLE_MESSAGE:\"DOTA_PARTICLE_MANAGER_EVENT_CREATE\x12\r\n\x05index\x18\x02 \x02(\r\x12R\n\x16release_particle_index\x18\x03 \x01(\x0b\x32\x32.CDOTAUserMsg_ParticleManager.ReleaseParticleIndex\x12\x45\n\x0f\x63reate_particle\x18\x04 \x01(\x0b\x32,.CDOTAUserMsg_ParticleManager.CreateParticle\x12G\n\x10\x64\x65stroy_particle\x18\x05 \x01(\x0b\x32-.CDOTAUserMsg_ParticleManager.DestroyParticle\x12Z\n\x1a\x64\x65stroy_particle_involving\x18\x06 \x01(\x0b\x32\x36.CDOTAUserMsg_ParticleManager.DestroyParticleInvolving\x12\x45\n\x0fupdate_particle\x18\x07 \x01(\x0b\x32,.CDOTAUserMsg_ParticleManager.UpdateParticle\x12L\n\x13update_particle_fwd\x18\x08 \x01(\x0b\x32/.CDOTAUserMsg_ParticleManager.UpdateParticleFwd\x12R\n\x16update_particle_orient\x18\t \x01(\x0b\x32\x32.CDOTAUserMsg_ParticleManager.UpdateParticleOrient\x12V\n\x18update_particle_fallback\x18\n \x01(\x0b\x32\x34.CDOTAUserMsg_ParticleManager.UpdateParticleFallback\x12R\n\x16update_particle_offset\x18\x0b \x01(\x0b\x32\x32.CDOTAUserMsg_ParticleManager.UpdateParticleOffset\x12L\n\x13update_particle_ent\x18\x0c \x01(\x0b\x32/.CDOTAUserMsg_ParticleManager.UpdateParticleEnt\x12T\n\x17update_particle_latency\x18\r \x01(\x0b\x32\x33.CDOTAUserMsg_ParticleManager.UpdateParticleLatency\x12[\n\x1bupdate_particle_should_draw\x18\x0e \x01(\x0b\x32\x36.CDOTAUserMsg_ParticleManager.UpdateParticleShouldDraw\x1a\x16\n\x14ReleaseParticleIndex\x1aY\n\x0e\x43reateParticle\x12\x1b\n\x13particle_name_index\x18\x01 \x01(\x05\x12\x13\n\x0b\x61ttach_type\x18\x02 \x01(\x05\x12\x15\n\rentity_handle\x18\x03 \x01(\x05\x1a.\n\x0f\x44\x65stroyParticle\x12\x1b\n\x13\x64\x65stroy_immediately\x18\x01 \x01(\x08\x1aN\n\x18\x44\x65stroyParticleInvolving\x12\x1b\n\x13\x64\x65stroy_immediately\x18\x01 \x01(\x08\x12\x15\n\rentity_handle\x18\x03 \x01(\x05\x1a\x46\n\x0eUpdateParticle\x12\x15\n\rcontrol_point\x18\x01 \x01(\x05\x12\x1d\n\x08position\x18\x02 \x01(\x0b\x32\x0b.CMsgVector\x1aH\n\x11UpdateParticleFwd\x12\x15\n\rcontrol_point\x18\x01 \x01(\x05\x12\x1c\n\x07\x66orward\x18\x02 \x01(\x0b\x32\x0b.CMsgVector\x1a\x80\x01\n\x14UpdateParticleOrient\x12\x15\n\rcontrol_point\x18\x01 \x01(\x05\x12\x1c\n\x07\x66orward\x18\x02 \x01(\x0b\x32\x0b.CMsgVector\x12\x1a\n\x05right\x18\x03 \x01(\x0b\x32\x0b.CMsgVector\x12\x17\n\x02up\x18\x04 \x01(\x0b\x32\x0b.CMsgVector\x1aN\n\x16UpdateParticleFallback\x12\x15\n\rcontrol_point\x18\x01 \x01(\x05\x12\x1d\n\x08position\x18\x02 \x01(\x0b\x32\x0b.CMsgVector\x1aQ\n\x14UpdateParticleOffset\x12\x15\n\rcontrol_point\x18\x01 \x01(\x05\x12\"\n\rorigin_offset\x18\x02 \x01(\x0b\x32\x0b.CMsgVector\x1a\x92\x01\n\x11UpdateParticleEnt\x12\x15\n\rcontrol_point\x18\x01 \x01(\x05\x12\x15\n\rentity_handle\x18\x02 \x01(\x05\x12\x13\n\x0b\x61ttach_type\x18\x03 \x01(\x05\x12\x12\n\nattachment\x18\x04 \x01(\x05\x12&\n\x11\x66\x61llback_position\x18\x05 \x01(\x0b\x32\x0b.CMsgVector\x1a=\n\x15UpdateParticleLatency\x12\x16\n\x0eplayer_latency\x18\x01 \x01(\x05\x12\x0c\n\x04tick\x18\x02 \x01(\x05\x1a/\n\x18UpdateParticleShouldDraw\x12\x13\n\x0bshould_draw\x18\x01 \x01(\x08\"\xc5\x01\n\x1a\x43\x44OTAUserMsg_OverheadEvent\x12?\n\x0cmessage_type\x18\x01 \x02(\x0e\x32\x14.DOTA_OVERHEAD_ALERT:\x13OVERHEAD_ALERT_GOLD\x12\r\n\x05value\x18\x02 \x01(\x05\x12\x1e\n\x16target_player_entindex\x18\x03 \x01(\x05\x12\x17\n\x0ftarget_entindex\x18\x04 \x01(\x05\x12\x1e\n\x16source_player_entindex\x18\x05 \x01(\x05\">\n\x1c\x43\x44OTAUserMsg_TutorialTipInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08progress\x18\x02 \x01(\x05\"S\n\x16\x43\x44OTAUserMsg_WorldLine\x12\x11\n\tplayer_id\x18\x01 \x01(\x05\x12&\n\tworldline\x18\x02 \x01(\x0b\x32\x13.CDOTAMsg_WorldLine\"F\n\x1b\x43\x44OTAUserMsg_TournamentDrop\x12\x13\n\x0bwinner_name\x18\x01 \x01(\t\x12\x12\n\nevent_type\x18\x02 \x01(\x05\"|\n\x16\x43\x44OTAUserMsg_ChatWheel\x12;\n\x0c\x63hat_message\x18\x01 \x01(\x0e\x32\x16.EDOTAChatWheelMessage:\rk_EDOTA_CW_Ok\x12\x11\n\tplayer_id\x18\x02 \x01(\r\x12\x12\n\naccount_id\x18\x03 \x01(\r\"]\n\x1d\x43\x44OTAUserMsg_ReceivedXmasGift\x12\x11\n\tplayer_id\x18\x01 \x01(\x05\x12\x11\n\titem_name\x18\x02 \x01(\t\x12\x16\n\x0einventory_slot\x18\x03 \x01(\x05*\xbc\x08\n\x11\x45\x44otaUserMessages\x12\x1e\n\x1a\x44OTA_UM_AddUnitToSelection\x10@\x12\x17\n\x13\x44OTA_UM_AIDebugLine\x10\x41\x12\x15\n\x11\x44OTA_UM_ChatEvent\x10\x42\x12\x1f\n\x1b\x44OTA_UM_CombatHeroPositions\x10\x43\x12\x19\n\x15\x44OTA_UM_CombatLogData\x10\x44\x12\x1e\n\x1a\x44OTA_UM_CombatLogShowDeath\x10\x46\x12\"\n\x1e\x44OTA_UM_CreateLinearProjectile\x10G\x12#\n\x1f\x44OTA_UM_DestroyLinearProjectile\x10H\x12$\n DOTA_UM_DodgeTrackingProjectiles\x10I\x12\x1c\n\x18\x44OTA_UM_GlobalLightColor\x10J\x12 \n\x1c\x44OTA_UM_GlobalLightDirection\x10K\x12\x1a\n\x16\x44OTA_UM_InvalidCommand\x10L\x12\x18\n\x14\x44OTA_UM_LocationPing\x10M\x12\x13\n\x0f\x44OTA_UM_MapLine\x10N\x12\x1b\n\x17\x44OTA_UM_MiniKillCamInfo\x10O\x12\x1d\n\x19\x44OTA_UM_MinimapDebugPoint\x10P\x12\x18\n\x14\x44OTA_UM_MinimapEvent\x10Q\x12\x1c\n\x18\x44OTA_UM_NevermoreRequiem\x10R\x12\x19\n\x15\x44OTA_UM_OverheadEvent\x10S\x12\x1e\n\x1a\x44OTA_UM_SetNextAutobuyItem\x10T\x12\x1a\n\x16\x44OTA_UM_SharedCooldown\x10U\x12 \n\x1c\x44OTA_UM_SpectatorPlayerClick\x10V\x12\x1b\n\x17\x44OTA_UM_TutorialTipInfo\x10W\x12\x15\n\x11\x44OTA_UM_UnitEvent\x10X\x12\x1b\n\x17\x44OTA_UM_ParticleManager\x10Y\x12\x13\n\x0f\x44OTA_UM_BotChat\x10Z\x12\x14\n\x10\x44OTA_UM_HudError\x10[\x12\x19\n\x15\x44OTA_UM_ItemPurchased\x10\\\x12\x10\n\x0c\x44OTA_UM_Ping\x10]\x12\x15\n\x11\x44OTA_UM_ItemFound\x10^\x12!\n\x1d\x44OTA_UM_CharacterSpeakConcept\x10_\x12\x16\n\x12\x44OTA_UM_SwapVerify\x10`\x12\x15\n\x11\x44OTA_UM_WorldLine\x10\x61\x12\x1a\n\x16\x44OTA_UM_TournamentDrop\x10\x62\x12\x15\n\x11\x44OTA_UM_ItemAlert\x10\x63\x12\x1a\n\x16\x44OTA_UM_HalloweenDrops\x10\x64\x12\x15\n\x11\x44OTA_UM_ChatWheel\x10\x65\x12\x1c\n\x18\x44OTA_UM_ReceivedXmasGift\x10\x66*\xe3\x0e\n\x11\x44OTA_CHAT_MESSAGE\x12!\n\x14\x43HAT_MESSAGE_INVALID\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x1a\n\x16\x43HAT_MESSAGE_HERO_KILL\x10\x00\x12\x1a\n\x16\x43HAT_MESSAGE_HERO_DENY\x10\x01\x12\x1e\n\x1a\x43HAT_MESSAGE_BARRACKS_KILL\x10\x02\x12\x1b\n\x17\x43HAT_MESSAGE_TOWER_KILL\x10\x03\x12\x1b\n\x17\x43HAT_MESSAGE_TOWER_DENY\x10\x04\x12\x1b\n\x17\x43HAT_MESSAGE_FIRSTBLOOD\x10\x05\x12\x1c\n\x18\x43HAT_MESSAGE_STREAK_KILL\x10\x06\x12\x18\n\x14\x43HAT_MESSAGE_BUYBACK\x10\x07\x12\x16\n\x12\x43HAT_MESSAGE_AEGIS\x10\x08\x12\x1c\n\x18\x43HAT_MESSAGE_ROSHAN_KILL\x10\t\x12\x1d\n\x19\x43HAT_MESSAGE_COURIER_LOST\x10\n\x12\"\n\x1e\x43HAT_MESSAGE_COURIER_RESPAWNED\x10\x0b\x12\x1b\n\x17\x43HAT_MESSAGE_GLYPH_USED\x10\x0c\x12\x1e\n\x1a\x43HAT_MESSAGE_ITEM_PURCHASE\x10\r\x12\x18\n\x14\x43HAT_MESSAGE_CONNECT\x10\x0e\x12\x1b\n\x17\x43HAT_MESSAGE_DISCONNECT\x10\x0f\x12.\n*CHAT_MESSAGE_DISCONNECT_WAIT_FOR_RECONNECT\x10\x10\x12*\n&CHAT_MESSAGE_DISCONNECT_TIME_REMAINING\x10\x11\x12\x31\n-CHAT_MESSAGE_DISCONNECT_TIME_REMAINING_PLURAL\x10\x12\x12\x1a\n\x16\x43HAT_MESSAGE_RECONNECT\x10\x13\x12\x18\n\x14\x43HAT_MESSAGE_ABANDON\x10\x14\x12\x1e\n\x1a\x43HAT_MESSAGE_SAFE_TO_LEAVE\x10\x15\x12\x1c\n\x18\x43HAT_MESSAGE_RUNE_PICKUP\x10\x16\x12\x1c\n\x18\x43HAT_MESSAGE_RUNE_BOTTLE\x10\x17\x12\x19\n\x15\x43HAT_MESSAGE_INTHEBAG\x10\x18\x12\x1b\n\x17\x43HAT_MESSAGE_SECRETSHOP\x10\x19\x12#\n\x1f\x43HAT_MESSAGE_ITEM_AUTOPURCHASED\x10\x1a\x12\x1f\n\x1b\x43HAT_MESSAGE_ITEMS_COMBINED\x10\x1b\x12\x1d\n\x19\x43HAT_MESSAGE_SUPER_CREEPS\x10\x1c\x12%\n!CHAT_MESSAGE_CANT_USE_ACTION_ITEM\x10\x1d\x12\"\n\x1e\x43HAT_MESSAGE_CHARGES_EXHAUSTED\x10\x1e\x12\x1a\n\x16\x43HAT_MESSAGE_CANTPAUSE\x10\x1f\x12\x1d\n\x19\x43HAT_MESSAGE_NOPAUSESLEFT\x10 \x12\x1d\n\x19\x43HAT_MESSAGE_CANTPAUSEYET\x10!\x12\x17\n\x13\x43HAT_MESSAGE_PAUSED\x10\"\x12\"\n\x1e\x43HAT_MESSAGE_UNPAUSE_COUNTDOWN\x10#\x12\x19\n\x15\x43HAT_MESSAGE_UNPAUSED\x10$\x12\x1e\n\x1a\x43HAT_MESSAGE_AUTO_UNPAUSED\x10%\x12\x1a\n\x16\x43HAT_MESSAGE_YOUPAUSED\x10&\x12 \n\x1c\x43HAT_MESSAGE_CANTUNPAUSETEAM\x10\'\x12(\n$CHAT_MESSAGE_SAFE_TO_LEAVE_ABANDONER\x10(\x12\"\n\x1e\x43HAT_MESSAGE_VOICE_TEXT_BANNED\x10)\x12.\n*CHAT_MESSAGE_SPECTATORS_WATCHING_THIS_GAME\x10*\x12 \n\x1c\x43HAT_MESSAGE_REPORT_REMINDER\x10+\x12\x1a\n\x16\x43HAT_MESSAGE_ECON_ITEM\x10,\x12\x16\n\x12\x43HAT_MESSAGE_TAUNT\x10-\x12\x17\n\x13\x43HAT_MESSAGE_RANDOM\x10.\x12\x18\n\x14\x43HAT_MESSAGE_RD_TURN\x10/\x12.\n*CHAT_MESSAGE_SAFE_TO_LEAVE_ABANDONER_EARLY\x10\x30\x12 \n\x1c\x43HAT_MESSAGE_DROP_RATE_BONUS\x10\x31\x12!\n\x1d\x43HAT_MESSAGE_NO_BATTLE_POINTS\x10\x32\x12\x1d\n\x19\x43HAT_MESSAGE_DENIED_AEGIS\x10\x33\x12\x1e\n\x1a\x43HAT_MESSAGE_INFORMATIONAL\x10\x34\x12\x1d\n\x19\x43HAT_MESSAGE_AEGIS_STOLEN\x10\x35\x12\x1d\n\x19\x43HAT_MESSAGE_ROSHAN_CANDY\x10\x36\x12\x1c\n\x18\x43HAT_MESSAGE_ITEM_GIFTED\x10\x37\x12\'\n#CHAT_MESSAGE_HERO_KILL_WITH_GREEVIL\x10\x38*\xb2\x01\n\x1d\x44OTA_NO_BATTLE_POINTS_REASONS\x12%\n!NO_BATTLE_POINTS_WRONG_LOBBY_TYPE\x10\x01\x12\"\n\x1eNO_BATTLE_POINTS_PRACTICE_BOTS\x10\x02\x12#\n\x1fNO_BATTLE_POINTS_CHEATS_ENABLED\x10\x03\x12!\n\x1dNO_BATTLE_POINTS_LOW_PRIORITY\x10\x04*7\n\x17\x44OTA_CHAT_INFORMATIONAL\x12\x1c\n\x18\x43OOP_BATTLE_POINTS_RULES\x10\x01*\xa9\x01\n\x14\x44OTA_COMBATLOG_TYPES\x12\x19\n\x15\x44OTA_COMBATLOG_DAMAGE\x10\x00\x12\x17\n\x13\x44OTA_COMBATLOG_HEAL\x10\x01\x12\x1f\n\x1b\x44OTA_COMBATLOG_MODIFIER_ADD\x10\x02\x12\"\n\x1e\x44OTA_COMBATLOG_MODIFIER_REMOVE\x10\x03\x12\x18\n\x14\x44OTA_COMBATLOG_DEATH\x10\x04*\xe5\x01\n\x13\x45\x44otaEntityMessages\x12\x14\n\x10\x44OTA_UNIT_SPEECH\x10\x00\x12\x19\n\x15\x44OTA_UNIT_SPEECH_MUTE\x10\x01\x12\x19\n\x15\x44OTA_UNIT_ADD_GESTURE\x10\x02\x12\x1c\n\x18\x44OTA_UNIT_REMOVE_GESTURE\x10\x03\x12!\n\x1d\x44OTA_UNIT_REMOVE_ALL_GESTURES\x10\x04\x12\x1a\n\x16\x44OTA_UNIT_FADE_GESTURE\x10\x06\x12%\n!DOTA_UNIT_SPEECH_CLIENTSIDE_RULES\x10\x07*\xb2\x04\n\x15\x44OTA_PARTICLE_MESSAGE\x12&\n\"DOTA_PARTICLE_MANAGER_EVENT_CREATE\x10\x00\x12&\n\"DOTA_PARTICLE_MANAGER_EVENT_UPDATE\x10\x01\x12.\n*DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FORWARD\x10\x02\x12\x32\n.DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ORIENTATION\x10\x03\x12/\n+DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FALLBACK\x10\x04\x12*\n&DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ENT\x10\x05\x12-\n)DOTA_PARTICLE_MANAGER_EVENT_UPDATE_OFFSET\x10\x06\x12\'\n#DOTA_PARTICLE_MANAGER_EVENT_DESTROY\x10\x07\x12\x31\n-DOTA_PARTICLE_MANAGER_EVENT_DESTROY_INVOLVING\x10\x08\x12\'\n#DOTA_PARTICLE_MANAGER_EVENT_RELEASE\x10\t\x12\'\n#DOTA_PARTICLE_MANAGER_EVENT_LATENCY\x10\n\x12+\n\'DOTA_PARTICLE_MANAGER_EVENT_SHOULD_DRAW\x10\x0b*\x86\x03\n\x13\x44OTA_OVERHEAD_ALERT\x12\x17\n\x13OVERHEAD_ALERT_GOLD\x10\x00\x12\x17\n\x13OVERHEAD_ALERT_DENY\x10\x01\x12\x1b\n\x17OVERHEAD_ALERT_CRITICAL\x10\x02\x12\x15\n\x11OVERHEAD_ALERT_XP\x10\x03\x12%\n!OVERHEAD_ALERT_BONUS_SPELL_DAMAGE\x10\x04\x12\x17\n\x13OVERHEAD_ALERT_MISS\x10\x05\x12\x19\n\x15OVERHEAD_ALERT_DAMAGE\x10\x06\x12\x18\n\x14OVERHEAD_ALERT_EVADE\x10\x07\x12\x18\n\x14OVERHEAD_ALERT_BLOCK\x10\x08\x12&\n\"OVERHEAD_ALERT_BONUS_POISON_DAMAGE\x10\t\x12\x17\n\x13OVERHEAD_ALERT_HEAL\x10\n\x12\x1b\n\x17OVERHEAD_ALERT_MANA_ADD\x10\x0b\x12\x1c\n\x18OVERHEAD_ALERT_MANA_LOSS\x10\x0c')
_EDOTAUSERMESSAGES = descriptor.EnumDescriptor(
name='EDotaUserMessages',
full_name='EDotaUserMessages',
filename=None,
file=DESCRIPTOR,
values=[
descriptor.EnumValueDescriptor(
name='DOTA_UM_AddUnitToSelection', index=0, number=64,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_AIDebugLine', index=1, number=65,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_ChatEvent', index=2, number=66,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_CombatHeroPositions', index=3, number=67,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_CombatLogData', index=4, number=68,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_CombatLogShowDeath', index=5, number=70,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_CreateLinearProjectile', index=6, number=71,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_DestroyLinearProjectile', index=7, number=72,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_DodgeTrackingProjectiles', index=8, number=73,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_GlobalLightColor', index=9, number=74,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_GlobalLightDirection', index=10, number=75,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_InvalidCommand', index=11, number=76,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_LocationPing', index=12, number=77,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_MapLine', index=13, number=78,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_MiniKillCamInfo', index=14, number=79,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_MinimapDebugPoint', index=15, number=80,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_MinimapEvent', index=16, number=81,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_NevermoreRequiem', index=17, number=82,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_OverheadEvent', index=18, number=83,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_SetNextAutobuyItem', index=19, number=84,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_SharedCooldown', index=20, number=85,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_SpectatorPlayerClick', index=21, number=86,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_TutorialTipInfo', index=22, number=87,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_UnitEvent', index=23, number=88,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_ParticleManager', index=24, number=89,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_BotChat', index=25, number=90,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_HudError', index=26, number=91,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_ItemPurchased', index=27, number=92,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_Ping', index=28, number=93,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_ItemFound', index=29, number=94,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_CharacterSpeakConcept', index=30, number=95,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_SwapVerify', index=31, number=96,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_WorldLine', index=32, number=97,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_TournamentDrop', index=33, number=98,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_ItemAlert', index=34, number=99,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_HalloweenDrops', index=35, number=100,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_ChatWheel', index=36, number=101,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UM_ReceivedXmasGift', index=37, number=102,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=6908,
serialized_end=7992,
)
_DOTA_CHAT_MESSAGE = descriptor.EnumDescriptor(
name='DOTA_CHAT_MESSAGE',
full_name='DOTA_CHAT_MESSAGE',
filename=None,
file=DESCRIPTOR,
values=[
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_INVALID', index=0, number=-1,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_HERO_KILL', index=1, number=0,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_HERO_DENY', index=2, number=1,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_BARRACKS_KILL', index=3, number=2,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_TOWER_KILL', index=4, number=3,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_TOWER_DENY', index=5, number=4,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_FIRSTBLOOD', index=6, number=5,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_STREAK_KILL', index=7, number=6,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_BUYBACK', index=8, number=7,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_AEGIS', index=9, number=8,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_ROSHAN_KILL', index=10, number=9,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_COURIER_LOST', index=11, number=10,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_COURIER_RESPAWNED', index=12, number=11,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_GLYPH_USED', index=13, number=12,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_ITEM_PURCHASE', index=14, number=13,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_CONNECT', index=15, number=14,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_DISCONNECT', index=16, number=15,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_DISCONNECT_WAIT_FOR_RECONNECT', index=17, number=16,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_DISCONNECT_TIME_REMAINING', index=18, number=17,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_DISCONNECT_TIME_REMAINING_PLURAL', index=19, number=18,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_RECONNECT', index=20, number=19,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_ABANDON', index=21, number=20,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_SAFE_TO_LEAVE', index=22, number=21,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_RUNE_PICKUP', index=23, number=22,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_RUNE_BOTTLE', index=24, number=23,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_INTHEBAG', index=25, number=24,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_SECRETSHOP', index=26, number=25,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_ITEM_AUTOPURCHASED', index=27, number=26,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_ITEMS_COMBINED', index=28, number=27,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_SUPER_CREEPS', index=29, number=28,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_CANT_USE_ACTION_ITEM', index=30, number=29,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_CHARGES_EXHAUSTED', index=31, number=30,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_CANTPAUSE', index=32, number=31,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_NOPAUSESLEFT', index=33, number=32,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_CANTPAUSEYET', index=34, number=33,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_PAUSED', index=35, number=34,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_UNPAUSE_COUNTDOWN', index=36, number=35,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_UNPAUSED', index=37, number=36,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_AUTO_UNPAUSED', index=38, number=37,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_YOUPAUSED', index=39, number=38,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_CANTUNPAUSETEAM', index=40, number=39,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_SAFE_TO_LEAVE_ABANDONER', index=41, number=40,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_VOICE_TEXT_BANNED', index=42, number=41,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_SPECTATORS_WATCHING_THIS_GAME', index=43, number=42,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_REPORT_REMINDER', index=44, number=43,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_ECON_ITEM', index=45, number=44,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_TAUNT', index=46, number=45,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_RANDOM', index=47, number=46,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_RD_TURN', index=48, number=47,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_SAFE_TO_LEAVE_ABANDONER_EARLY', index=49, number=48,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_DROP_RATE_BONUS', index=50, number=49,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_NO_BATTLE_POINTS', index=51, number=50,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_DENIED_AEGIS', index=52, number=51,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_INFORMATIONAL', index=53, number=52,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_AEGIS_STOLEN', index=54, number=53,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_ROSHAN_CANDY', index=55, number=54,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_ITEM_GIFTED', index=56, number=55,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='CHAT_MESSAGE_HERO_KILL_WITH_GREEVIL', index=57, number=56,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=7995,
serialized_end=9886,
)
_DOTA_NO_BATTLE_POINTS_REASONS = descriptor.EnumDescriptor(
name='DOTA_NO_BATTLE_POINTS_REASONS',
full_name='DOTA_NO_BATTLE_POINTS_REASONS',
filename=None,
file=DESCRIPTOR,
values=[
descriptor.EnumValueDescriptor(
name='NO_BATTLE_POINTS_WRONG_LOBBY_TYPE', index=0, number=1,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='NO_BATTLE_POINTS_PRACTICE_BOTS', index=1, number=2,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='NO_BATTLE_POINTS_CHEATS_ENABLED', index=2, number=3,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='NO_BATTLE_POINTS_LOW_PRIORITY', index=3, number=4,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=9889,
serialized_end=10067,
)
_DOTA_CHAT_INFORMATIONAL = descriptor.EnumDescriptor(
name='DOTA_CHAT_INFORMATIONAL',
full_name='DOTA_CHAT_INFORMATIONAL',
filename=None,
file=DESCRIPTOR,
values=[
descriptor.EnumValueDescriptor(
name='COOP_BATTLE_POINTS_RULES', index=0, number=1,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=10069,
serialized_end=10124,
)
_DOTA_COMBATLOG_TYPES = descriptor.EnumDescriptor(
name='DOTA_COMBATLOG_TYPES',
full_name='DOTA_COMBATLOG_TYPES',
filename=None,
file=DESCRIPTOR,
values=[
descriptor.EnumValueDescriptor(
name='DOTA_COMBATLOG_DAMAGE', index=0, number=0,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_COMBATLOG_HEAL', index=1, number=1,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_COMBATLOG_MODIFIER_ADD', index=2, number=2,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_COMBATLOG_MODIFIER_REMOVE', index=3, number=3,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_COMBATLOG_DEATH', index=4, number=4,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=10127,
serialized_end=10296,
)
_EDOTAENTITYMESSAGES = descriptor.EnumDescriptor(
name='EDotaEntityMessages',
full_name='EDotaEntityMessages',
filename=None,
file=DESCRIPTOR,
values=[
descriptor.EnumValueDescriptor(
name='DOTA_UNIT_SPEECH', index=0, number=0,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UNIT_SPEECH_MUTE', index=1, number=1,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UNIT_ADD_GESTURE', index=2, number=2,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UNIT_REMOVE_GESTURE', index=3, number=3,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UNIT_REMOVE_ALL_GESTURES', index=4, number=4,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UNIT_FADE_GESTURE', index=5, number=6,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_UNIT_SPEECH_CLIENTSIDE_RULES', index=6, number=7,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=10299,
serialized_end=10528,
)
_DOTA_PARTICLE_MESSAGE = descriptor.EnumDescriptor(
name='DOTA_PARTICLE_MESSAGE',
full_name='DOTA_PARTICLE_MESSAGE',
filename=None,
file=DESCRIPTOR,
values=[
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_CREATE', index=0, number=0,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_UPDATE', index=1, number=1,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FORWARD', index=2, number=2,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ORIENTATION', index=3, number=3,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FALLBACK', index=4, number=4,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ENT', index=5, number=5,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_UPDATE_OFFSET', index=6, number=6,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_DESTROY', index=7, number=7,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_DESTROY_INVOLVING', index=8, number=8,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_RELEASE', index=9, number=9,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_LATENCY', index=10, number=10,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='DOTA_PARTICLE_MANAGER_EVENT_SHOULD_DRAW', index=11, number=11,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=10531,
serialized_end=11093,
)
_DOTA_OVERHEAD_ALERT = descriptor.EnumDescriptor(
name='DOTA_OVERHEAD_ALERT',
full_name='DOTA_OVERHEAD_ALERT',
filename=None,
file=DESCRIPTOR,
values=[
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_GOLD', index=0, number=0,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_DENY', index=1, number=1,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_CRITICAL', index=2, number=2,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_XP', index=3, number=3,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_BONUS_SPELL_DAMAGE', index=4, number=4,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_MISS', index=5, number=5,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_DAMAGE', index=6, number=6,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_EVADE', index=7, number=7,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_BLOCK', index=8, number=8,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_BONUS_POISON_DAMAGE', index=9, number=9,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_HEAL', index=10, number=10,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_MANA_ADD', index=11, number=11,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='OVERHEAD_ALERT_MANA_LOSS', index=12, number=12,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=11096,
serialized_end=11486,
)
DOTA_UM_AddUnitToSelection = 64
DOTA_UM_AIDebugLine = 65
DOTA_UM_ChatEvent = 66
DOTA_UM_CombatHeroPositions = 67
DOTA_UM_CombatLogData = 68
DOTA_UM_CombatLogShowDeath = 70
DOTA_UM_CreateLinearProjectile = 71
DOTA_UM_DestroyLinearProjectile = 72
DOTA_UM_DodgeTrackingProjectiles = 73
DOTA_UM_GlobalLightColor = 74
DOTA_UM_GlobalLightDirection = 75
DOTA_UM_InvalidCommand = 76
DOTA_UM_LocationPing = 77
DOTA_UM_MapLine = 78
DOTA_UM_MiniKillCamInfo = 79
DOTA_UM_MinimapDebugPoint = 80
DOTA_UM_MinimapEvent = 81
DOTA_UM_NevermoreRequiem = 82
DOTA_UM_OverheadEvent = 83
DOTA_UM_SetNextAutobuyItem = 84
DOTA_UM_SharedCooldown = 85
DOTA_UM_SpectatorPlayerClick = 86
DOTA_UM_TutorialTipInfo = 87
DOTA_UM_UnitEvent = 88
DOTA_UM_ParticleManager = 89
DOTA_UM_BotChat = 90
DOTA_UM_HudError = 91
DOTA_UM_ItemPurchased = 92
DOTA_UM_Ping = 93
DOTA_UM_ItemFound = 94
DOTA_UM_CharacterSpeakConcept = 95
DOTA_UM_SwapVerify = 96
DOTA_UM_WorldLine = 97
DOTA_UM_TournamentDrop = 98
DOTA_UM_ItemAlert = 99
DOTA_UM_HalloweenDrops = 100
DOTA_UM_ChatWheel = 101
DOTA_UM_ReceivedXmasGift = 102
CHAT_MESSAGE_INVALID = -1
CHAT_MESSAGE_HERO_KILL = 0
CHAT_MESSAGE_HERO_DENY = 1
CHAT_MESSAGE_BARRACKS_KILL = 2
CHAT_MESSAGE_TOWER_KILL = 3
CHAT_MESSAGE_TOWER_DENY = 4
CHAT_MESSAGE_FIRSTBLOOD = 5
CHAT_MESSAGE_STREAK_KILL = 6
CHAT_MESSAGE_BUYBACK = 7
CHAT_MESSAGE_AEGIS = 8
CHAT_MESSAGE_ROSHAN_KILL = 9
CHAT_MESSAGE_COURIER_LOST = 10
CHAT_MESSAGE_COURIER_RESPAWNED = 11
CHAT_MESSAGE_GLYPH_USED = 12
CHAT_MESSAGE_ITEM_PURCHASE = 13
CHAT_MESSAGE_CONNECT = 14
CHAT_MESSAGE_DISCONNECT = 15
CHAT_MESSAGE_DISCONNECT_WAIT_FOR_RECONNECT = 16
CHAT_MESSAGE_DISCONNECT_TIME_REMAINING = 17
CHAT_MESSAGE_DISCONNECT_TIME_REMAINING_PLURAL = 18
CHAT_MESSAGE_RECONNECT = 19
CHAT_MESSAGE_ABANDON = 20
CHAT_MESSAGE_SAFE_TO_LEAVE = 21
CHAT_MESSAGE_RUNE_PICKUP = 22
CHAT_MESSAGE_RUNE_BOTTLE = 23
CHAT_MESSAGE_INTHEBAG = 24
CHAT_MESSAGE_SECRETSHOP = 25
CHAT_MESSAGE_ITEM_AUTOPURCHASED = 26
CHAT_MESSAGE_ITEMS_COMBINED = 27
CHAT_MESSAGE_SUPER_CREEPS = 28
CHAT_MESSAGE_CANT_USE_ACTION_ITEM = 29
CHAT_MESSAGE_CHARGES_EXHAUSTED = 30
CHAT_MESSAGE_CANTPAUSE = 31
CHAT_MESSAGE_NOPAUSESLEFT = 32
CHAT_MESSAGE_CANTPAUSEYET = 33
CHAT_MESSAGE_PAUSED = 34
CHAT_MESSAGE_UNPAUSE_COUNTDOWN = 35
CHAT_MESSAGE_UNPAUSED = 36
CHAT_MESSAGE_AUTO_UNPAUSED = 37
CHAT_MESSAGE_YOUPAUSED = 38
CHAT_MESSAGE_CANTUNPAUSETEAM = 39
CHAT_MESSAGE_SAFE_TO_LEAVE_ABANDONER = 40
CHAT_MESSAGE_VOICE_TEXT_BANNED = 41
CHAT_MESSAGE_SPECTATORS_WATCHING_THIS_GAME = 42
CHAT_MESSAGE_REPORT_REMINDER = 43
CHAT_MESSAGE_ECON_ITEM = 44
CHAT_MESSAGE_TAUNT = 45
CHAT_MESSAGE_RANDOM = 46
CHAT_MESSAGE_RD_TURN = 47
CHAT_MESSAGE_SAFE_TO_LEAVE_ABANDONER_EARLY = 48
CHAT_MESSAGE_DROP_RATE_BONUS = 49
CHAT_MESSAGE_NO_BATTLE_POINTS = 50
CHAT_MESSAGE_DENIED_AEGIS = 51
CHAT_MESSAGE_INFORMATIONAL = 52
CHAT_MESSAGE_AEGIS_STOLEN = 53
CHAT_MESSAGE_ROSHAN_CANDY = 54
CHAT_MESSAGE_ITEM_GIFTED = 55
CHAT_MESSAGE_HERO_KILL_WITH_GREEVIL = 56
NO_BATTLE_POINTS_WRONG_LOBBY_TYPE = 1
NO_BATTLE_POINTS_PRACTICE_BOTS = 2
NO_BATTLE_POINTS_CHEATS_ENABLED = 3
NO_BATTLE_POINTS_LOW_PRIORITY = 4
COOP_BATTLE_POINTS_RULES = 1
DOTA_COMBATLOG_DAMAGE = 0
DOTA_COMBATLOG_HEAL = 1
DOTA_COMBATLOG_MODIFIER_ADD = 2
DOTA_COMBATLOG_MODIFIER_REMOVE = 3
DOTA_COMBATLOG_DEATH = 4
DOTA_UNIT_SPEECH = 0
DOTA_UNIT_SPEECH_MUTE = 1
DOTA_UNIT_ADD_GESTURE = 2
DOTA_UNIT_REMOVE_GESTURE = 3
DOTA_UNIT_REMOVE_ALL_GESTURES = 4
DOTA_UNIT_FADE_GESTURE = 6
DOTA_UNIT_SPEECH_CLIENTSIDE_RULES = 7
DOTA_PARTICLE_MANAGER_EVENT_CREATE = 0
DOTA_PARTICLE_MANAGER_EVENT_UPDATE = 1
DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FORWARD = 2
DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ORIENTATION = 3
DOTA_PARTICLE_MANAGER_EVENT_UPDATE_FALLBACK = 4
DOTA_PARTICLE_MANAGER_EVENT_UPDATE_ENT = 5
DOTA_PARTICLE_MANAGER_EVENT_UPDATE_OFFSET = 6
DOTA_PARTICLE_MANAGER_EVENT_DESTROY = 7
DOTA_PARTICLE_MANAGER_EVENT_DESTROY_INVOLVING = 8
DOTA_PARTICLE_MANAGER_EVENT_RELEASE = 9
DOTA_PARTICLE_MANAGER_EVENT_LATENCY = 10
DOTA_PARTICLE_MANAGER_EVENT_SHOULD_DRAW = 11
OVERHEAD_ALERT_GOLD = 0
OVERHEAD_ALERT_DENY = 1
OVERHEAD_ALERT_CRITICAL = 2
OVERHEAD_ALERT_XP = 3
OVERHEAD_ALERT_BONUS_SPELL_DAMAGE = 4
OVERHEAD_ALERT_MISS = 5
OVERHEAD_ALERT_DAMAGE = 6
OVERHEAD_ALERT_EVADE = 7
OVERHEAD_ALERT_BLOCK = 8
OVERHEAD_ALERT_BONUS_POISON_DAMAGE = 9
OVERHEAD_ALERT_HEAL = 10
OVERHEAD_ALERT_MANA_ADD = 11
OVERHEAD_ALERT_MANA_LOSS = 12
_CDOTARESPONSEQUERYSERIALIZED_FACT_VALUETYPE = descriptor.EnumDescriptor(
name='ValueType',
full_name='CDOTAResponseQuerySerialized.Fact.ValueType',
filename=None,
file=DESCRIPTOR,
values=[
descriptor.EnumValueDescriptor(
name='NUMERIC', index=0, number=1,
options=None,
type=None),
descriptor.EnumValueDescriptor(
name='STRING', index=1, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=2927,
serialized_end=2963,
)
_CDOTAUSERMSG_AIDEBUGLINE = descriptor.Descriptor(
name='CDOTAUserMsg_AIDebugLine',
full_name='CDOTAUserMsg_AIDebugLine',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='message', full_name='CDOTAUserMsg_AIDebugLine.message', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=126,
serialized_end=169,
)
_CDOTAUSERMSG_PING = descriptor.Descriptor(
name='CDOTAUserMsg_Ping',
full_name='CDOTAUserMsg_Ping',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='message', full_name='CDOTAUserMsg_Ping.message', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=171,
serialized_end=207,
)
_CDOTAUSERMSG_SWAPVERIFY = descriptor.Descriptor(
name='CDOTAUserMsg_SwapVerify',
full_name='CDOTAUserMsg_SwapVerify',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='player_id', full_name='CDOTAUserMsg_SwapVerify.player_id', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=209,
serialized_end=253,
)
_CDOTAUSERMSG_CHATEVENT = descriptor.Descriptor(
name='CDOTAUserMsg_ChatEvent',
full_name='CDOTAUserMsg_ChatEvent',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='type', full_name='CDOTAUserMsg_ChatEvent.type', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=-1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='value', full_name='CDOTAUserMsg_ChatEvent.value', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='playerid_1', full_name='CDOTAUserMsg_ChatEvent.playerid_1', index=2,
number=3, type=17, cpp_type=1, label=1,
has_default_value=True, default_value=-1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='playerid_2', full_name='CDOTAUserMsg_ChatEvent.playerid_2', index=3,
number=4, type=17, cpp_type=1, label=1,
has_default_value=True, default_value=-1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='playerid_3', full_name='CDOTAUserMsg_ChatEvent.playerid_3', index=4,
number=5, type=17, cpp_type=1, label=1,
has_default_value=True, default_value=-1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='playerid_4', full_name='CDOTAUserMsg_ChatEvent.playerid_4', index=5,
number=6, type=17, cpp_type=1, label=1,
has_default_value=True, default_value=-1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='playerid_5', full_name='CDOTAUserMsg_ChatEvent.playerid_5', index=6,
number=7, type=17, cpp_type=1, label=1,
has_default_value=True, default_value=-1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='playerid_6', full_name='CDOTAUserMsg_ChatEvent.playerid_6', index=7,
number=8, type=17, cpp_type=1, label=1,
has_default_value=True, default_value=-1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=256,
serialized_end=495,
)
_CDOTAUSERMSG_COMBATLOGDATA = descriptor.Descriptor(
name='CDOTAUserMsg_CombatLogData',
full_name='CDOTAUserMsg_CombatLogData',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='type', full_name='CDOTAUserMsg_CombatLogData.type', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='target_name', full_name='CDOTAUserMsg_CombatLogData.target_name', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='attacker_name', full_name='CDOTAUserMsg_CombatLogData.attacker_name', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='attacker_illusion', full_name='CDOTAUserMsg_CombatLogData.attacker_illusion', index=3,
number=4, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='target_illusion', full_name='CDOTAUserMsg_CombatLogData.target_illusion', index=4,
number=5, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='inflictor_name', full_name='CDOTAUserMsg_CombatLogData.inflictor_name', index=5,
number=6, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='value', full_name='CDOTAUserMsg_CombatLogData.value', index=6,
number=7, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='health', full_name='CDOTAUserMsg_CombatLogData.health', index=7,
number=8, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='time', full_name='CDOTAUserMsg_CombatLogData.time', index=8,
number=9, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=498,
serialized_end=751,
)
_CDOTAUSERMSG_COMBATLOGSHOWDEATH = descriptor.Descriptor(
name='CDOTAUserMsg_CombatLogShowDeath',
full_name='CDOTAUserMsg_CombatLogShowDeath',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=753,
serialized_end=786,
)
_CDOTAUSERMSG_BOTCHAT = descriptor.Descriptor(
name='CDOTAUserMsg_BotChat',
full_name='CDOTAUserMsg_BotChat',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='player_id', full_name='CDOTAUserMsg_BotChat.player_id', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='format', full_name='CDOTAUserMsg_BotChat.format', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='message', full_name='CDOTAUserMsg_BotChat.message', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='target', full_name='CDOTAUserMsg_BotChat.target', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=788,
serialized_end=878,
)
_CDOTAUSERMSG_COMBATHEROPOSITIONS = descriptor.Descriptor(
name='CDOTAUserMsg_CombatHeroPositions',
full_name='CDOTAUserMsg_CombatHeroPositions',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='index', full_name='CDOTAUserMsg_CombatHeroPositions.index', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='time', full_name='CDOTAUserMsg_CombatHeroPositions.time', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='world_pos', full_name='CDOTAUserMsg_CombatHeroPositions.world_pos', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='health', full_name='CDOTAUserMsg_CombatHeroPositions.health', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=880,
serialized_end=993,
)
_CDOTAUSERMSG_MINIKILLCAMINFO_ATTACKER_ABILITY = descriptor.Descriptor(
name='Ability',
full_name='CDOTAUserMsg_MiniKillCamInfo.Attacker.Ability',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='ability', full_name='CDOTAUserMsg_MiniKillCamInfo.Attacker.Ability.ability', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='damage', full_name='CDOTAUserMsg_MiniKillCamInfo.Attacker.Ability.damage', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1207,
serialized_end=1249,
)
_CDOTAUSERMSG_MINIKILLCAMINFO_ATTACKER = descriptor.Descriptor(
name='Attacker',
full_name='CDOTAUserMsg_MiniKillCamInfo.Attacker',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='attacker', full_name='CDOTAUserMsg_MiniKillCamInfo.Attacker.attacker', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='total_damage', full_name='CDOTAUserMsg_MiniKillCamInfo.Attacker.total_damage', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='abilities', full_name='CDOTAUserMsg_MiniKillCamInfo.Attacker.abilities', index=2,
number=3, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_CDOTAUSERMSG_MINIKILLCAMINFO_ATTACKER_ABILITY, ],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1088,
serialized_end=1249,
)
_CDOTAUSERMSG_MINIKILLCAMINFO = descriptor.Descriptor(
name='CDOTAUserMsg_MiniKillCamInfo',
full_name='CDOTAUserMsg_MiniKillCamInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='attackers', full_name='CDOTAUserMsg_MiniKillCamInfo.attackers', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_CDOTAUSERMSG_MINIKILLCAMINFO_ATTACKER, ],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=996,
serialized_end=1249,
)
_CDOTAUSERMSG_GLOBALLIGHTCOLOR = descriptor.Descriptor(
name='CDOTAUserMsg_GlobalLightColor',
full_name='CDOTAUserMsg_GlobalLightColor',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='color', full_name='CDOTAUserMsg_GlobalLightColor.color', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='duration', full_name='CDOTAUserMsg_GlobalLightColor.duration', index=1,
number=2, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1251,
serialized_end=1315,
)
_CDOTAUSERMSG_GLOBALLIGHTDIRECTION = descriptor.Descriptor(
name='CDOTAUserMsg_GlobalLightDirection',
full_name='CDOTAUserMsg_GlobalLightDirection',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='direction', full_name='CDOTAUserMsg_GlobalLightDirection.direction', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='duration', full_name='CDOTAUserMsg_GlobalLightDirection.duration', index=1,
number=2, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1317,
serialized_end=1402,
)
_CDOTAUSERMSG_LOCATIONPING = descriptor.Descriptor(
name='CDOTAUserMsg_LocationPing',
full_name='CDOTAUserMsg_LocationPing',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='player_id', full_name='CDOTAUserMsg_LocationPing.player_id', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='location_ping', full_name='CDOTAUserMsg_LocationPing.location_ping', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1404,
serialized_end=1497,
)
_CDOTAUSERMSG_ITEMALERT = descriptor.Descriptor(
name='CDOTAUserMsg_ItemAlert',
full_name='CDOTAUserMsg_ItemAlert',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='player_id', full_name='CDOTAUserMsg_ItemAlert.player_id', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='item_alert', full_name='CDOTAUserMsg_ItemAlert.item_alert', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1499,
serialized_end=1583,
)
_CDOTAUSERMSG_MINIMAPEVENT = descriptor.Descriptor(
name='CDOTAUserMsg_MinimapEvent',
full_name='CDOTAUserMsg_MinimapEvent',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='event_type', full_name='CDOTAUserMsg_MinimapEvent.event_type', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='entity_handle', full_name='CDOTAUserMsg_MinimapEvent.entity_handle', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='x', full_name='CDOTAUserMsg_MinimapEvent.x', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='y', full_name='CDOTAUserMsg_MinimapEvent.y', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='duration', full_name='CDOTAUserMsg_MinimapEvent.duration', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1585,
serialized_end=1695,
)
_CDOTAUSERMSG_MAPLINE = descriptor.Descriptor(
name='CDOTAUserMsg_MapLine',
full_name='CDOTAUserMsg_MapLine',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='player_id', full_name='CDOTAUserMsg_MapLine.player_id', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='mapline', full_name='CDOTAUserMsg_MapLine.mapline', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1697,
serialized_end=1774,
)
_CDOTAUSERMSG_MINIMAPDEBUGPOINT = descriptor.Descriptor(
name='CDOTAUserMsg_MinimapDebugPoint',
full_name='CDOTAUserMsg_MinimapDebugPoint',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='location', full_name='CDOTAUserMsg_MinimapDebugPoint.location', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='color', full_name='CDOTAUserMsg_MinimapDebugPoint.color', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='size', full_name='CDOTAUserMsg_MinimapDebugPoint.size', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='duration', full_name='CDOTAUserMsg_MinimapDebugPoint.duration', index=3,
number=4, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1776,
serialized_end=1886,
)
_CDOTAUSERMSG_CREATELINEARPROJECTILE = descriptor.Descriptor(
name='CDOTAUserMsg_CreateLinearProjectile',
full_name='CDOTAUserMsg_CreateLinearProjectile',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='origin', full_name='CDOTAUserMsg_CreateLinearProjectile.origin', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='velocity', full_name='CDOTAUserMsg_CreateLinearProjectile.velocity', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='latency', full_name='CDOTAUserMsg_CreateLinearProjectile.latency', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='entindex', full_name='CDOTAUserMsg_CreateLinearProjectile.entindex', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='particle_index', full_name='CDOTAUserMsg_CreateLinearProjectile.particle_index', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='handle', full_name='CDOTAUserMsg_CreateLinearProjectile.handle', index=5,
number=6, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1889,
serialized_end=2063,
)
_CDOTAUSERMSG_DESTROYLINEARPROJECTILE = descriptor.Descriptor(
name='CDOTAUserMsg_DestroyLinearProjectile',
full_name='CDOTAUserMsg_DestroyLinearProjectile',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='handle', full_name='CDOTAUserMsg_DestroyLinearProjectile.handle', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2065,
serialized_end=2119,
)
_CDOTAUSERMSG_DODGETRACKINGPROJECTILES = descriptor.Descriptor(
name='CDOTAUserMsg_DodgeTrackingProjectiles',
full_name='CDOTAUserMsg_DodgeTrackingProjectiles',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='entindex', full_name='CDOTAUserMsg_DodgeTrackingProjectiles.entindex', index=0,
number=1, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2121,
serialized_end=2178,
)
_CDOTAUSERMSG_SPECTATORPLAYERCLICK = descriptor.Descriptor(
name='CDOTAUserMsg_SpectatorPlayerClick',
full_name='CDOTAUserMsg_SpectatorPlayerClick',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='entindex', full_name='CDOTAUserMsg_SpectatorPlayerClick.entindex', index=0,
number=1, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='order_type', full_name='CDOTAUserMsg_SpectatorPlayerClick.order_type', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='target_index', full_name='CDOTAUserMsg_SpectatorPlayerClick.target_index', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2180,
serialized_end=2275,
)
_CDOTAUSERMSG_NEVERMOREREQUIEM = descriptor.Descriptor(
name='CDOTAUserMsg_NevermoreRequiem',
full_name='CDOTAUserMsg_NevermoreRequiem',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='entity_handle', full_name='CDOTAUserMsg_NevermoreRequiem.entity_handle', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='lines', full_name='CDOTAUserMsg_NevermoreRequiem.lines', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='origin', full_name='CDOTAUserMsg_NevermoreRequiem.origin', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2277,
serialized_end=2375,
)
_CDOTAUSERMSG_INVALIDCOMMAND = descriptor.Descriptor(
name='CDOTAUserMsg_InvalidCommand',
full_name='CDOTAUserMsg_InvalidCommand',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='message', full_name='CDOTAUserMsg_InvalidCommand.message', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2377,
serialized_end=2423,
)
_CDOTAUSERMSG_HUDERROR = descriptor.Descriptor(
name='CDOTAUserMsg_HudError',
full_name='CDOTAUserMsg_HudError',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='order_id', full_name='CDOTAUserMsg_HudError.order_id', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2425,
serialized_end=2466,
)
_CDOTAUSERMSG_SHAREDCOOLDOWN = descriptor.Descriptor(
name='CDOTAUserMsg_SharedCooldown',
full_name='CDOTAUserMsg_SharedCooldown',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='entindex', full_name='CDOTAUserMsg_SharedCooldown.entindex', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='name', full_name='CDOTAUserMsg_SharedCooldown.name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='cooldown', full_name='CDOTAUserMsg_SharedCooldown.cooldown', index=2,
number=3, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='name_index', full_name='CDOTAUserMsg_SharedCooldown.name_index', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2468,
serialized_end=2567,
)
_CDOTAUSERMSG_SETNEXTAUTOBUYITEM = descriptor.Descriptor(
name='CDOTAUserMsg_SetNextAutobuyItem',
full_name='CDOTAUserMsg_SetNextAutobuyItem',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='name', full_name='CDOTAUserMsg_SetNextAutobuyItem.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2569,
serialized_end=2616,
)
_CDOTAUSERMSG_HALLOWEENDROPS = descriptor.Descriptor(
name='CDOTAUserMsg_HalloweenDrops',
full_name='CDOTAUserMsg_HalloweenDrops',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='item_defs', full_name='CDOTAUserMsg_HalloweenDrops.item_defs', index=0,
number=1, type=13, cpp_type=3, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='player_ids', full_name='CDOTAUserMsg_HalloweenDrops.player_ids', index=1,
number=2, type=13, cpp_type=3, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='prize_list', full_name='CDOTAUserMsg_HalloweenDrops.prize_list', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2618,
serialized_end=2706,
)
_CDOTARESPONSEQUERYSERIALIZED_FACT = descriptor.Descriptor(
name='Fact',
full_name='CDOTAResponseQuerySerialized.Fact',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='key', full_name='CDOTAResponseQuerySerialized.Fact.key', index=0,
number=1, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='valtype', full_name='CDOTAResponseQuerySerialized.Fact.valtype', index=1,
number=2, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='val_numeric', full_name='CDOTAResponseQuerySerialized.Fact.val_numeric', index=2,
number=3, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='val_string', full_name='CDOTAResponseQuerySerialized.Fact.val_string', index=3,
number=4, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
_CDOTARESPONSEQUERYSERIALIZED_FACT_VALUETYPE,
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2793,
serialized_end=2963,
)
_CDOTARESPONSEQUERYSERIALIZED = descriptor.Descriptor(
name='CDOTAResponseQuerySerialized',
full_name='CDOTAResponseQuerySerialized',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='facts', full_name='CDOTAResponseQuerySerialized.facts', index=0,
number=1, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_CDOTARESPONSEQUERYSERIALIZED_FACT, ],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2709,
serialized_end=2963,
)
_CDOTASPEECHMATCHONCLIENT = descriptor.Descriptor(
name='CDOTASpeechMatchOnClient',
full_name='CDOTASpeechMatchOnClient',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='concept', full_name='CDOTASpeechMatchOnClient.concept', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='recipient_type', full_name='CDOTASpeechMatchOnClient.recipient_type', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='responsequery', full_name='CDOTASpeechMatchOnClient.responsequery', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='randomseed', full_name='CDOTASpeechMatchOnClient.randomseed', index=3,
number=4, type=15, cpp_type=1, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=2966,
serialized_end=3110,
)
_CDOTAUSERMSG_UNITEVENT_SPEECH = descriptor.Descriptor(
name='Speech',
full_name='CDOTAUserMsg_UnitEvent.Speech',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='concept', full_name='CDOTAUserMsg_UnitEvent.Speech.concept', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='response', full_name='CDOTAUserMsg_UnitEvent.Speech.response', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='recipient_type', full_name='CDOTAUserMsg_UnitEvent.Speech.recipient_type', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='level', full_name='CDOTAUserMsg_UnitEvent.Speech.level', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='muteable', full_name='CDOTAUserMsg_UnitEvent.Speech.muteable', index=4,
number=5, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=3621,
serialized_end=3728,
)
_CDOTAUSERMSG_UNITEVENT_SPEECHMUTE = descriptor.Descriptor(
name='SpeechMute',
full_name='CDOTAUserMsg_UnitEvent.SpeechMute',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='delay', full_name='CDOTAUserMsg_UnitEvent.SpeechMute.delay', index=0,
number=1, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=0.5,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=3730,
serialized_end=3762,
)
_CDOTAUSERMSG_UNITEVENT_ADDGESTURE = descriptor.Descriptor(
name='AddGesture',
full_name='CDOTAUserMsg_UnitEvent.AddGesture',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='activity', full_name='CDOTAUserMsg_UnitEvent.AddGesture.activity', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=-1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='slot', full_name='CDOTAUserMsg_UnitEvent.AddGesture.slot', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='fade_in', full_name='CDOTAUserMsg_UnitEvent.AddGesture.fade_in', index=2,
number=3, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='fade_out', full_name='CDOTAUserMsg_UnitEvent.AddGesture.fade_out', index=3,
number=4, type=2, cpp_type=6, label=1,
has_default_value=True, default_value=0.1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=3764,
serialized_end=3875,
)
_CDOTAUSERMSG_UNITEVENT_REMOVEGESTURE = descriptor.Descriptor(
name='RemoveGesture',
full_name='CDOTAUserMsg_UnitEvent.RemoveGesture',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='activity', full_name='CDOTAUserMsg_UnitEvent.RemoveGesture.activity', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=-1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=3877,
serialized_end=3934,
)
_CDOTAUSERMSG_UNITEVENT_BLOODIMPACT = descriptor.Descriptor(
name='BloodImpact',
full_name='CDOTAUserMsg_UnitEvent.BloodImpact',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='scale', full_name='CDOTAUserMsg_UnitEvent.BloodImpact.scale', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='x_normal', full_name='CDOTAUserMsg_UnitEvent.BloodImpact.x_normal', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='y_normal', full_name='CDOTAUserMsg_UnitEvent.BloodImpact.y_normal', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=3936,
serialized_end=4000,
)
_CDOTAUSERMSG_UNITEVENT_FADEGESTURE = descriptor.Descriptor(
name='FadeGesture',
full_name='CDOTAUserMsg_UnitEvent.FadeGesture',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='activity', full_name='CDOTAUserMsg_UnitEvent.FadeGesture.activity', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=-1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=4002,
serialized_end=4057,
)
_CDOTAUSERMSG_UNITEVENT = descriptor.Descriptor(
name='CDOTAUserMsg_UnitEvent',
full_name='CDOTAUserMsg_UnitEvent',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='msg_type', full_name='CDOTAUserMsg_UnitEvent.msg_type', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='entity_index', full_name='CDOTAUserMsg_UnitEvent.entity_index', index=1,
number=2, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='speech', full_name='CDOTAUserMsg_UnitEvent.speech', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='speech_mute', full_name='CDOTAUserMsg_UnitEvent.speech_mute', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='add_gesture', full_name='CDOTAUserMsg_UnitEvent.add_gesture', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='remove_gesture', full_name='CDOTAUserMsg_UnitEvent.remove_gesture', index=5,
number=6, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='blood_impact', full_name='CDOTAUserMsg_UnitEvent.blood_impact', index=6,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='fade_gesture', full_name='CDOTAUserMsg_UnitEvent.fade_gesture', index=7,
number=8, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='speech_match_on_client', full_name='CDOTAUserMsg_UnitEvent.speech_match_on_client', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_CDOTAUSERMSG_UNITEVENT_SPEECH, _CDOTAUSERMSG_UNITEVENT_SPEECHMUTE, _CDOTAUSERMSG_UNITEVENT_ADDGESTURE, _CDOTAUSERMSG_UNITEVENT_REMOVEGESTURE, _CDOTAUSERMSG_UNITEVENT_BLOODIMPACT, _CDOTAUSERMSG_UNITEVENT_FADEGESTURE, ],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=3113,
serialized_end=4057,
)
_CDOTAUSERMSG_ITEMPURCHASED = descriptor.Descriptor(
name='CDOTAUserMsg_ItemPurchased',
full_name='CDOTAUserMsg_ItemPurchased',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='item_index', full_name='CDOTAUserMsg_ItemPurchased.item_index', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=4059,
serialized_end=4107,
)
_CDOTAUSERMSG_ITEMFOUND = descriptor.Descriptor(
name='CDOTAUserMsg_ItemFound',
full_name='CDOTAUserMsg_ItemFound',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='player', full_name='CDOTAUserMsg_ItemFound.player', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='quality', full_name='CDOTAUserMsg_ItemFound.quality', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='rarity', full_name='CDOTAUserMsg_ItemFound.rarity', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='method', full_name='CDOTAUserMsg_ItemFound.method', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='itemdef', full_name='CDOTAUserMsg_ItemFound.itemdef', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=4109,
serialized_end=4215,
)
_CDOTAUSERMSG_PARTICLEMANAGER_RELEASEPARTICLEINDEX = descriptor.Descriptor(
name='ReleaseParticleIndex',
full_name='CDOTAUserMsg_ParticleManager.ReleaseParticleIndex',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=5321,
serialized_end=5343,
)
_CDOTAUSERMSG_PARTICLEMANAGER_CREATEPARTICLE = descriptor.Descriptor(
name='CreateParticle',
full_name='CDOTAUserMsg_ParticleManager.CreateParticle',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='particle_name_index', full_name='CDOTAUserMsg_ParticleManager.CreateParticle.particle_name_index', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='attach_type', full_name='CDOTAUserMsg_ParticleManager.CreateParticle.attach_type', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='entity_handle', full_name='CDOTAUserMsg_ParticleManager.CreateParticle.entity_handle', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=5345,
serialized_end=5434,
)
_CDOTAUSERMSG_PARTICLEMANAGER_DESTROYPARTICLE = descriptor.Descriptor(
name='DestroyParticle',
full_name='CDOTAUserMsg_ParticleManager.DestroyParticle',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='destroy_immediately', full_name='CDOTAUserMsg_ParticleManager.DestroyParticle.destroy_immediately', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=5436,
serialized_end=5482,
)
_CDOTAUSERMSG_PARTICLEMANAGER_DESTROYPARTICLEINVOLVING = descriptor.Descriptor(
name='DestroyParticleInvolving',
full_name='CDOTAUserMsg_ParticleManager.DestroyParticleInvolving',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='destroy_immediately', full_name='CDOTAUserMsg_ParticleManager.DestroyParticleInvolving.destroy_immediately', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='entity_handle', full_name='CDOTAUserMsg_ParticleManager.DestroyParticleInvolving.entity_handle', index=1,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=5484,
serialized_end=5562,
)
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLE = descriptor.Descriptor(
name='UpdateParticle',
full_name='CDOTAUserMsg_ParticleManager.UpdateParticle',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='control_point', full_name='CDOTAUserMsg_ParticleManager.UpdateParticle.control_point', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='position', full_name='CDOTAUserMsg_ParticleManager.UpdateParticle.position', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=5564,
serialized_end=5634,
)
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEFWD = descriptor.Descriptor(
name='UpdateParticleFwd',
full_name='CDOTAUserMsg_ParticleManager.UpdateParticleFwd',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='control_point', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleFwd.control_point', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='forward', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleFwd.forward', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=5636,
serialized_end=5708,
)
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEORIENT = descriptor.Descriptor(
name='UpdateParticleOrient',
full_name='CDOTAUserMsg_ParticleManager.UpdateParticleOrient',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='control_point', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleOrient.control_point', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='forward', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleOrient.forward', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='right', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleOrient.right', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='up', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleOrient.up', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=5711,
serialized_end=5839,
)
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEFALLBACK = descriptor.Descriptor(
name='UpdateParticleFallback',
full_name='CDOTAUserMsg_ParticleManager.UpdateParticleFallback',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='control_point', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleFallback.control_point', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='position', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleFallback.position', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=5841,
serialized_end=5919,
)
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEOFFSET = descriptor.Descriptor(
name='UpdateParticleOffset',
full_name='CDOTAUserMsg_ParticleManager.UpdateParticleOffset',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='control_point', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleOffset.control_point', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='origin_offset', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleOffset.origin_offset', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=5921,
serialized_end=6002,
)
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEENT = descriptor.Descriptor(
name='UpdateParticleEnt',
full_name='CDOTAUserMsg_ParticleManager.UpdateParticleEnt',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='control_point', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleEnt.control_point', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='entity_handle', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleEnt.entity_handle', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='attach_type', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleEnt.attach_type', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='attachment', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleEnt.attachment', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='fallback_position', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleEnt.fallback_position', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=6005,
serialized_end=6151,
)
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLELATENCY = descriptor.Descriptor(
name='UpdateParticleLatency',
full_name='CDOTAUserMsg_ParticleManager.UpdateParticleLatency',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='player_latency', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleLatency.player_latency', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='tick', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleLatency.tick', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=6153,
serialized_end=6214,
)
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLESHOULDDRAW = descriptor.Descriptor(
name='UpdateParticleShouldDraw',
full_name='CDOTAUserMsg_ParticleManager.UpdateParticleShouldDraw',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='should_draw', full_name='CDOTAUserMsg_ParticleManager.UpdateParticleShouldDraw.should_draw', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=6216,
serialized_end=6263,
)
_CDOTAUSERMSG_PARTICLEMANAGER = descriptor.Descriptor(
name='CDOTAUserMsg_ParticleManager',
full_name='CDOTAUserMsg_ParticleManager',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='type', full_name='CDOTAUserMsg_ParticleManager.type', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='index', full_name='CDOTAUserMsg_ParticleManager.index', index=1,
number=2, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='release_particle_index', full_name='CDOTAUserMsg_ParticleManager.release_particle_index', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='create_particle', full_name='CDOTAUserMsg_ParticleManager.create_particle', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='destroy_particle', full_name='CDOTAUserMsg_ParticleManager.destroy_particle', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='destroy_particle_involving', full_name='CDOTAUserMsg_ParticleManager.destroy_particle_involving', index=5,
number=6, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='update_particle', full_name='CDOTAUserMsg_ParticleManager.update_particle', index=6,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='update_particle_fwd', full_name='CDOTAUserMsg_ParticleManager.update_particle_fwd', index=7,
number=8, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='update_particle_orient', full_name='CDOTAUserMsg_ParticleManager.update_particle_orient', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='update_particle_fallback', full_name='CDOTAUserMsg_ParticleManager.update_particle_fallback', index=9,
number=10, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='update_particle_offset', full_name='CDOTAUserMsg_ParticleManager.update_particle_offset', index=10,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='update_particle_ent', full_name='CDOTAUserMsg_ParticleManager.update_particle_ent', index=11,
number=12, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='update_particle_latency', full_name='CDOTAUserMsg_ParticleManager.update_particle_latency', index=12,
number=13, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='update_particle_should_draw', full_name='CDOTAUserMsg_ParticleManager.update_particle_should_draw', index=13,
number=14, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[_CDOTAUSERMSG_PARTICLEMANAGER_RELEASEPARTICLEINDEX, _CDOTAUSERMSG_PARTICLEMANAGER_CREATEPARTICLE, _CDOTAUSERMSG_PARTICLEMANAGER_DESTROYPARTICLE, _CDOTAUSERMSG_PARTICLEMANAGER_DESTROYPARTICLEINVOLVING, _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLE, _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEFWD, _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEORIENT, _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEFALLBACK, _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEOFFSET, _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEENT, _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLELATENCY, _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLESHOULDDRAW, ],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=4218,
serialized_end=6263,
)
_CDOTAUSERMSG_OVERHEADEVENT = descriptor.Descriptor(
name='CDOTAUserMsg_OverheadEvent',
full_name='CDOTAUserMsg_OverheadEvent',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='message_type', full_name='CDOTAUserMsg_OverheadEvent.message_type', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='value', full_name='CDOTAUserMsg_OverheadEvent.value', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='target_player_entindex', full_name='CDOTAUserMsg_OverheadEvent.target_player_entindex', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='target_entindex', full_name='CDOTAUserMsg_OverheadEvent.target_entindex', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='source_player_entindex', full_name='CDOTAUserMsg_OverheadEvent.source_player_entindex', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=6266,
serialized_end=6463,
)
_CDOTAUSERMSG_TUTORIALTIPINFO = descriptor.Descriptor(
name='CDOTAUserMsg_TutorialTipInfo',
full_name='CDOTAUserMsg_TutorialTipInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='name', full_name='CDOTAUserMsg_TutorialTipInfo.name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='progress', full_name='CDOTAUserMsg_TutorialTipInfo.progress', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=6465,
serialized_end=6527,
)
_CDOTAUSERMSG_WORLDLINE = descriptor.Descriptor(
name='CDOTAUserMsg_WorldLine',
full_name='CDOTAUserMsg_WorldLine',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='player_id', full_name='CDOTAUserMsg_WorldLine.player_id', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='worldline', full_name='CDOTAUserMsg_WorldLine.worldline', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=6529,
serialized_end=6612,
)
_CDOTAUSERMSG_TOURNAMENTDROP = descriptor.Descriptor(
name='CDOTAUserMsg_TournamentDrop',
full_name='CDOTAUserMsg_TournamentDrop',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='winner_name', full_name='CDOTAUserMsg_TournamentDrop.winner_name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='event_type', full_name='CDOTAUserMsg_TournamentDrop.event_type', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=6614,
serialized_end=6684,
)
_CDOTAUSERMSG_CHATWHEEL = descriptor.Descriptor(
name='CDOTAUserMsg_ChatWheel',
full_name='CDOTAUserMsg_ChatWheel',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='chat_message', full_name='CDOTAUserMsg_ChatWheel.chat_message', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='player_id', full_name='CDOTAUserMsg_ChatWheel.player_id', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='account_id', full_name='CDOTAUserMsg_ChatWheel.account_id', index=2,
number=3, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=6686,
serialized_end=6810,
)
_CDOTAUSERMSG_RECEIVEDXMASGIFT = descriptor.Descriptor(
name='CDOTAUserMsg_ReceivedXmasGift',
full_name='CDOTAUserMsg_ReceivedXmasGift',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='player_id', full_name='CDOTAUserMsg_ReceivedXmasGift.player_id', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='item_name', full_name='CDOTAUserMsg_ReceivedXmasGift.item_name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='inventory_slot', full_name='CDOTAUserMsg_ReceivedXmasGift.inventory_slot', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=6812,
serialized_end=6905,
)
_CDOTAUSERMSG_CHATEVENT.fields_by_name['type'].enum_type = _DOTA_CHAT_MESSAGE
_CDOTAUSERMSG_COMBATLOGDATA.fields_by_name['type'].enum_type = _DOTA_COMBATLOG_TYPES
_CDOTAUSERMSG_COMBATHEROPOSITIONS.fields_by_name['world_pos'].message_type = netmessages_pb2._CMSGVECTOR2D
_CDOTAUSERMSG_MINIKILLCAMINFO_ATTACKER_ABILITY.containing_type = _CDOTAUSERMSG_MINIKILLCAMINFO_ATTACKER;
_CDOTAUSERMSG_MINIKILLCAMINFO_ATTACKER.fields_by_name['abilities'].message_type = _CDOTAUSERMSG_MINIKILLCAMINFO_ATTACKER_ABILITY
_CDOTAUSERMSG_MINIKILLCAMINFO_ATTACKER.containing_type = _CDOTAUSERMSG_MINIKILLCAMINFO;
_CDOTAUSERMSG_MINIKILLCAMINFO.fields_by_name['attackers'].message_type = _CDOTAUSERMSG_MINIKILLCAMINFO_ATTACKER
_CDOTAUSERMSG_GLOBALLIGHTDIRECTION.fields_by_name['direction'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_LOCATIONPING.fields_by_name['location_ping'].message_type = dota_commonmessages_pb2._CDOTAMSG_LOCATIONPING
_CDOTAUSERMSG_ITEMALERT.fields_by_name['item_alert'].message_type = dota_commonmessages_pb2._CDOTAMSG_ITEMALERT
_CDOTAUSERMSG_MAPLINE.fields_by_name['mapline'].message_type = dota_commonmessages_pb2._CDOTAMSG_MAPLINE
_CDOTAUSERMSG_MINIMAPDEBUGPOINT.fields_by_name['location'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_CREATELINEARPROJECTILE.fields_by_name['origin'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_CREATELINEARPROJECTILE.fields_by_name['velocity'].message_type = netmessages_pb2._CMSGVECTOR2D
_CDOTAUSERMSG_NEVERMOREREQUIEM.fields_by_name['origin'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTARESPONSEQUERYSERIALIZED_FACT.fields_by_name['valtype'].enum_type = _CDOTARESPONSEQUERYSERIALIZED_FACT_VALUETYPE
_CDOTARESPONSEQUERYSERIALIZED_FACT.containing_type = _CDOTARESPONSEQUERYSERIALIZED;
_CDOTARESPONSEQUERYSERIALIZED_FACT_VALUETYPE.containing_type = _CDOTARESPONSEQUERYSERIALIZED_FACT;
_CDOTARESPONSEQUERYSERIALIZED.fields_by_name['facts'].message_type = _CDOTARESPONSEQUERYSERIALIZED_FACT
_CDOTASPEECHMATCHONCLIENT.fields_by_name['responsequery'].message_type = _CDOTARESPONSEQUERYSERIALIZED
_CDOTAUSERMSG_UNITEVENT_SPEECH.containing_type = _CDOTAUSERMSG_UNITEVENT;
_CDOTAUSERMSG_UNITEVENT_SPEECHMUTE.containing_type = _CDOTAUSERMSG_UNITEVENT;
_CDOTAUSERMSG_UNITEVENT_ADDGESTURE.fields_by_name['activity'].enum_type = ai_activity_pb2._ACTIVITY
_CDOTAUSERMSG_UNITEVENT_ADDGESTURE.containing_type = _CDOTAUSERMSG_UNITEVENT;
_CDOTAUSERMSG_UNITEVENT_REMOVEGESTURE.fields_by_name['activity'].enum_type = ai_activity_pb2._ACTIVITY
_CDOTAUSERMSG_UNITEVENT_REMOVEGESTURE.containing_type = _CDOTAUSERMSG_UNITEVENT;
_CDOTAUSERMSG_UNITEVENT_BLOODIMPACT.containing_type = _CDOTAUSERMSG_UNITEVENT;
_CDOTAUSERMSG_UNITEVENT_FADEGESTURE.fields_by_name['activity'].enum_type = ai_activity_pb2._ACTIVITY
_CDOTAUSERMSG_UNITEVENT_FADEGESTURE.containing_type = _CDOTAUSERMSG_UNITEVENT;
_CDOTAUSERMSG_UNITEVENT.fields_by_name['msg_type'].enum_type = _EDOTAENTITYMESSAGES
_CDOTAUSERMSG_UNITEVENT.fields_by_name['speech'].message_type = _CDOTAUSERMSG_UNITEVENT_SPEECH
_CDOTAUSERMSG_UNITEVENT.fields_by_name['speech_mute'].message_type = _CDOTAUSERMSG_UNITEVENT_SPEECHMUTE
_CDOTAUSERMSG_UNITEVENT.fields_by_name['add_gesture'].message_type = _CDOTAUSERMSG_UNITEVENT_ADDGESTURE
_CDOTAUSERMSG_UNITEVENT.fields_by_name['remove_gesture'].message_type = _CDOTAUSERMSG_UNITEVENT_REMOVEGESTURE
_CDOTAUSERMSG_UNITEVENT.fields_by_name['blood_impact'].message_type = _CDOTAUSERMSG_UNITEVENT_BLOODIMPACT
_CDOTAUSERMSG_UNITEVENT.fields_by_name['fade_gesture'].message_type = _CDOTAUSERMSG_UNITEVENT_FADEGESTURE
_CDOTAUSERMSG_UNITEVENT.fields_by_name['speech_match_on_client'].message_type = _CDOTASPEECHMATCHONCLIENT
_CDOTAUSERMSG_PARTICLEMANAGER_RELEASEPARTICLEINDEX.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_CREATEPARTICLE.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_DESTROYPARTICLE.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_DESTROYPARTICLEINVOLVING.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLE.fields_by_name['position'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLE.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEFWD.fields_by_name['forward'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEFWD.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEORIENT.fields_by_name['forward'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEORIENT.fields_by_name['right'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEORIENT.fields_by_name['up'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEORIENT.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEFALLBACK.fields_by_name['position'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEFALLBACK.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEOFFSET.fields_by_name['origin_offset'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEOFFSET.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEENT.fields_by_name['fallback_position'].message_type = netmessages_pb2._CMSGVECTOR
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEENT.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLELATENCY.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLESHOULDDRAW.containing_type = _CDOTAUSERMSG_PARTICLEMANAGER;
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['type'].enum_type = _DOTA_PARTICLE_MESSAGE
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['release_particle_index'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_RELEASEPARTICLEINDEX
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['create_particle'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_CREATEPARTICLE
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['destroy_particle'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_DESTROYPARTICLE
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['destroy_particle_involving'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_DESTROYPARTICLEINVOLVING
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['update_particle'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLE
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['update_particle_fwd'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEFWD
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['update_particle_orient'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEORIENT
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['update_particle_fallback'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEFALLBACK
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['update_particle_offset'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEOFFSET
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['update_particle_ent'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLEENT
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['update_particle_latency'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLELATENCY
_CDOTAUSERMSG_PARTICLEMANAGER.fields_by_name['update_particle_should_draw'].message_type = _CDOTAUSERMSG_PARTICLEMANAGER_UPDATEPARTICLESHOULDDRAW
_CDOTAUSERMSG_OVERHEADEVENT.fields_by_name['message_type'].enum_type = _DOTA_OVERHEAD_ALERT
_CDOTAUSERMSG_WORLDLINE.fields_by_name['worldline'].message_type = dota_commonmessages_pb2._CDOTAMSG_WORLDLINE
_CDOTAUSERMSG_CHATWHEEL.fields_by_name['chat_message'].enum_type = dota_commonmessages_pb2._EDOTACHATWHEELMESSAGE
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_AIDebugLine'] = _CDOTAUSERMSG_AIDEBUGLINE
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_Ping'] = _CDOTAUSERMSG_PING
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_SwapVerify'] = _CDOTAUSERMSG_SWAPVERIFY
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_ChatEvent'] = _CDOTAUSERMSG_CHATEVENT
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_CombatLogData'] = _CDOTAUSERMSG_COMBATLOGDATA
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_CombatLogShowDeath'] = _CDOTAUSERMSG_COMBATLOGSHOWDEATH
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_BotChat'] = _CDOTAUSERMSG_BOTCHAT
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_CombatHeroPositions'] = _CDOTAUSERMSG_COMBATHEROPOSITIONS
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_MiniKillCamInfo'] = _CDOTAUSERMSG_MINIKILLCAMINFO
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_GlobalLightColor'] = _CDOTAUSERMSG_GLOBALLIGHTCOLOR
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_GlobalLightDirection'] = _CDOTAUSERMSG_GLOBALLIGHTDIRECTION
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_LocationPing'] = _CDOTAUSERMSG_LOCATIONPING
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_ItemAlert'] = _CDOTAUSERMSG_ITEMALERT
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_MinimapEvent'] = _CDOTAUSERMSG_MINIMAPEVENT
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_MapLine'] = _CDOTAUSERMSG_MAPLINE
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_MinimapDebugPoint'] = _CDOTAUSERMSG_MINIMAPDEBUGPOINT
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_CreateLinearProjectile'] = _CDOTAUSERMSG_CREATELINEARPROJECTILE
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_DestroyLinearProjectile'] = _CDOTAUSERMSG_DESTROYLINEARPROJECTILE
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_DodgeTrackingProjectiles'] = _CDOTAUSERMSG_DODGETRACKINGPROJECTILES
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_SpectatorPlayerClick'] = _CDOTAUSERMSG_SPECTATORPLAYERCLICK
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_NevermoreRequiem'] = _CDOTAUSERMSG_NEVERMOREREQUIEM
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_InvalidCommand'] = _CDOTAUSERMSG_INVALIDCOMMAND
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_HudError'] = _CDOTAUSERMSG_HUDERROR
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_SharedCooldown'] = _CDOTAUSERMSG_SHAREDCOOLDOWN
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_SetNextAutobuyItem'] = _CDOTAUSERMSG_SETNEXTAUTOBUYITEM
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_HalloweenDrops'] = _CDOTAUSERMSG_HALLOWEENDROPS
DESCRIPTOR.message_types_by_name['CDOTAResponseQuerySerialized'] = _CDOTARESPONSEQUERYSERIALIZED
DESCRIPTOR.message_types_by_name['CDOTASpeechMatchOnClient'] = _CDOTASPEECHMATCHONCLIENT
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_UnitEvent'] = _CDOTAUSERMSG_UNITEVENT
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_ItemPurchased'] = _CDOTAUSERMSG_ITEMPURCHASED
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_ItemFound'] = _CDOTAUSERMSG_ITEMFOUND
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_ParticleManager'] = _CDOTAUSERMSG_PARTICLEMANAGER
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_OverheadEvent'] = _CDOTAUSERMSG_OVERHEADEVENT
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_TutorialTipInfo'] = _CDOTAUSERMSG_TUTORIALTIPINFO
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_WorldLine'] = _CDOTAUSERMSG_WORLDLINE
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_TournamentDrop'] = _CDOTAUSERMSG_TOURNAMENTDROP
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_ChatWheel'] = _CDOTAUSERMSG_CHATWHEEL
DESCRIPTOR.message_types_by_name['CDOTAUserMsg_ReceivedXmasGift'] = _CDOTAUSERMSG_RECEIVEDXMASGIFT
# @@protoc_insertion_point(module_scope)
| 41.315874 | 18,615 | 0.764191 |
72b29fc480b17250901de0de9a0fdd2643e31525 | 369 | py | Python | auth0_client/menu/datafiles/scripts/get_active_user_count.py | rubelw/auth0_client | 51e68239babcf7c40e40491d1aaa3f8547a67f63 | [
"MIT"
] | 2 | 2020-10-08T21:42:56.000Z | 2021-03-21T08:17:52.000Z | auth0_client/menu/datafiles/scripts/get_active_user_count.py | rubelw/auth0_client | 51e68239babcf7c40e40491d1aaa3f8547a67f63 | [
"MIT"
] | null | null | null | auth0_client/menu/datafiles/scripts/get_active_user_count.py | rubelw/auth0_client | 51e68239babcf7c40e40491d1aaa3f8547a67f63 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import json
from auth0_client.Auth0Client import Auth0Client
from auth0_client.menu.menu_helper.common import *
from auth0_client.menu.menu_helper.pretty import *
try:
users = {}
client = Auth0Client(auth_config())
results = client.active_users()
print(pretty(results))
except (KeyboardInterrupt, SystemExit):
sys.exit()
| 19.421053 | 50 | 0.742547 |
72b41799b9ea2ac1e3eee3e55900103983d55cfc | 852 | py | Python | encryptfinance/transactions/admin.py | dark-codr/encryptfinance | 573a8179c3a7c4b0f68d71bc9d461246f6fdba29 | [
"Apache-2.0"
] | null | null | null | encryptfinance/transactions/admin.py | dark-codr/encryptfinance | 573a8179c3a7c4b0f68d71bc9d461246f6fdba29 | [
"Apache-2.0"
] | 1 | 2022-03-31T03:16:16.000Z | 2022-03-31T03:16:16.000Z | encryptfinance/transactions/admin.py | dark-codr/encryptfinance | 573a8179c3a7c4b0f68d71bc9d461246f6fdba29 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from django.contrib import admin
from .models import Deposit, Withdrawal, Support
from .forms import DepositForm, WithdrawalForm
# Register your models here.
admin.site.register(Support)
| 28.4 | 89 | 0.706573 |
72b5ec574a910346ea5b219b420b4689179e7f53 | 818 | py | Python | vendor-local/src/django-piston/tests/test_project/settings.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 22 | 2015-01-16T01:36:32.000Z | 2020-06-08T00:46:18.000Z | vendor-local/src/django-piston/tests/test_project/settings.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 9 | 2019-03-15T11:39:32.000Z | 2019-04-30T00:59:50.000Z | vendor-local/src/django-piston/tests/test_project/settings.py | jlin/inventory | c098c98e570c3bf9fadfd811eb75e1213f6ea428 | [
"BSD-3-Clause"
] | 13 | 2015-01-13T20:56:22.000Z | 2022-02-23T06:01:17.000Z | import os
DEBUG = True
DATABASES = {
'default':
{
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/tmp/piston.db'
}
}
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = '/tmp/piston.db'
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'piston',
'test_project.apps.testapp',
)
TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__), 'templates'),
)
SITE_ID = 1
ROOT_URLCONF = 'test_project.urls'
MIDDLEWARE_CLASSES = (
'piston.middleware.ConditionalMiddlewareCompatProxy',
'django.contrib.sessions.middleware.SessionMiddleware',
'piston.middleware.CommonMiddlewareCompatProxy',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
| 24.058824 | 62 | 0.687042 |
72b62ed3f7cc27fe8cfe04f0c5e5ac430e3c0735 | 14,958 | py | Python | src/sage/combinat/combinatorial_map.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/combinatorial_map.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/combinatorial_map.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | null | null | null | """
Combinatorial maps
This module provides a decorator that can be used to add semantic to a
Python method by marking it as implementing a *combinatorial map*,
that is a map between two :class:`enumerated sets <EnumeratedSets>`::
sage: from sage.combinat.combinatorial_map import combinatorial_map
sage: class MyPermutation(object):
....: @combinatorial_map()
....: def reverse(self):
....: '''
....: Reverse the permutation
....: '''
....: # ... code ...
By default, this decorator is a no-op: it returns the decorated method
as is::
sage: MyPermutation.reverse
<function MyPermutation.reverse at ...>
See :func:`combinatorial_map_wrapper` for the various options this
decorator can take.
Projects built on top of Sage are welcome to customize locally this
hook to instrument the Sage code and exploit this semantic
information. Typically, the decorator could be used to populate a
database of maps. For a real-life application, see the project
`FindStat <http://findstat.org/>`. As a basic example, a variant of
the decorator is provided as :func:`combinatorial_map_wrapper`; it
wraps the decorated method, so that one can later use
:func:`combinatorial_maps_in_class` to query an object, or class
thereof, for all the combinatorial maps that apply to it.
.. NOTE::
Since decorators are evaluated upon loading Python modules,
customizing :obj:`combinatorial map` needs to be done before the
modules using it are loaded. In the examples below, where we
illustrate the customized ``combinatorial_map`` decorator on the
:mod:`sage.combinat.permutation` module, we resort to force a
reload of this module after dynamically changing
``sage.combinat.combinatorial_map.combinatorial_map``. This is
good enough for those doctests, but remains fragile.
For real use cases, it is probably best to just edit this source
file statically (see below).
"""
# ****************************************************************************
# Copyright (C) 2011 Christian Stump <christian.stump at gmail.com>
#
# Distributed under the terms of the GNU General Public License (GPL)
# https://www.gnu.org/licenses/
# ****************************************************************************
def combinatorial_map_trivial(f=None, order=None, name=None):
r"""
Combinatorial map decorator
See :ref:`sage.combinat.combinatorial_map` for a description of
this decorator and its purpose. This default implementation does
nothing.
INPUT:
- ``f`` -- (default: ``None``, if combinatorial_map is used as a decorator) a function
- ``name`` -- (default: ``None``) the name for nicer outputs on combinatorial maps
- ``order`` -- (default: ``None``) the order of the combinatorial map, if it is known. Is not used, but might be helpful later
OUTPUT:
- ``f`` unchanged
EXAMPLES::
sage: from sage.combinat.combinatorial_map import combinatorial_map_trivial as combinatorial_map
sage: class MyPermutation(object):
....: @combinatorial_map
....: def reverse(self):
....: '''
....: Reverse the permutation
....: '''
....: # ... code ...
....: @combinatorial_map(name='descent set of permutation')
....: def descent_set(self):
....: '''
....: The descent set of the permutation
....: '''
....: # ... code ...
sage: MyPermutation.reverse
<function MyPermutation.reverse at ...>
sage: MyPermutation.descent_set
<function MyPermutation.descent_set at ...>
"""
if f is None:
return lambda f: f
else:
return f
def combinatorial_map_wrapper(f=None, order=None, name=None):
r"""
Combinatorial map decorator (basic example).
See :ref:`sage.combinat.combinatorial_map` for a description of
the ``combinatorial_map`` decorator and its purpose. This
implementation, together with :func:`combinatorial_maps_in_class`
illustrates how to use this decorator as a hook to instrument the
Sage code.
INPUT:
- ``f`` -- (default: ``None``, if combinatorial_map is used as a decorator) a function
- ``name`` -- (default: ``None``) the name for nicer outputs on combinatorial maps
- ``order`` -- (default: ``None``) the order of the combinatorial map, if it is known. Is not used, but might be helpful later
OUTPUT:
- A combinatorial map. This is an instance of the :class:`CombinatorialMap`.
EXAMPLES:
We define a class illustrating the use of this implementation of
the :obj:`combinatorial_map` decorator with its various arguments::
sage: from sage.combinat.combinatorial_map import combinatorial_map_wrapper as combinatorial_map
sage: class MyPermutation(object):
....: @combinatorial_map()
....: def reverse(self):
....: '''
....: Reverse the permutation
....: '''
....: pass
....: @combinatorial_map(order=2)
....: def inverse(self):
....: '''
....: The inverse of the permutation
....: '''
....: pass
....: @combinatorial_map(name='descent set of permutation')
....: def descent_set(self):
....: '''
....: The descent set of the permutation
....: '''
....: pass
....: def major_index(self):
....: '''
....: The major index of the permutation
....: '''
....: pass
sage: MyPermutation.reverse
Combinatorial map: reverse
sage: MyPermutation.descent_set
Combinatorial map: descent set of permutation
sage: MyPermutation.inverse
Combinatorial map: inverse
One can now determine all the combinatorial maps associated with a
given object as follows::
sage: from sage.combinat.combinatorial_map import combinatorial_maps_in_class
sage: X = combinatorial_maps_in_class(MyPermutation); X # random
[Combinatorial map: reverse,
Combinatorial map: descent set of permutation,
Combinatorial map: inverse]
The method ``major_index`` defined about is not a combinatorial map::
sage: MyPermutation.major_index
<function MyPermutation.major_index at ...>
But one can define a function that turns ``major_index`` into a combinatorial map::
sage: def major_index(p):
....: return p.major_index()
sage: major_index
<function major_index at ...>
sage: combinatorial_map(major_index)
Combinatorial map: major_index
"""
if f is None:
return lambda f: CombinatorialMap(f, order=order, name=name)
else:
return CombinatorialMap(f, order=order, name=name)
##############################################################################
# Edit here to customize the combinatorial_map hook
##############################################################################
combinatorial_map = combinatorial_map_trivial
# combinatorial_map = combinatorial_map_wrapper
def combinatorial_maps_in_class(cls):
"""
Return the combinatorial maps of the class as a list of combinatorial maps.
For further details and doctests, see
:ref:`sage.combinat.combinatorial_map` and
:func:`combinatorial_map_wrapper`.
EXAMPLES::
sage: sage.combinat.combinatorial_map.combinatorial_map = sage.combinat.combinatorial_map.combinatorial_map_wrapper
sage: from importlib import reload
sage: _ = reload(sage.combinat.permutation)
sage: from sage.combinat.combinatorial_map import combinatorial_maps_in_class
sage: p = Permutation([1,3,2,4])
sage: cmaps = combinatorial_maps_in_class(p)
sage: cmaps # random
[Combinatorial map: Robinson-Schensted insertion tableau,
Combinatorial map: Robinson-Schensted recording tableau,
Combinatorial map: Robinson-Schensted tableau shape,
Combinatorial map: complement,
Combinatorial map: descent composition,
Combinatorial map: inverse, ...]
sage: p.left_tableau in cmaps
True
sage: p.right_tableau in cmaps
True
sage: p.complement in cmaps
True
"""
result = set()
for method in dir(cls):
entry = getattr(cls, method)
if isinstance(entry, CombinatorialMap):
result.add(entry)
return list(result)
| 36.043373 | 130 | 0.595935 |
72b71a7472c7bdcc100bc857b45e0a2173cf0beb | 5,048 | py | Python | tests/cppproj/xdressrc.py | xdress/xdress | eb7f0a02b3edf617d401939ede7f0d713a88917f | [
"BSD-2-Clause-FreeBSD"
] | 88 | 2015-01-04T14:49:05.000Z | 2021-03-25T15:32:41.000Z | tests/cppproj/xdressrc.py | scopatz/xdress | 2d95c900e849f924644756d421b1f4da4624e6c9 | [
"BSD-2-Clause-FreeBSD"
] | 26 | 2015-02-03T19:09:11.000Z | 2022-03-24T00:15:55.000Z | tests/cppproj/xdressrc.py | scopatz/xdress | 2d95c900e849f924644756d421b1f4da4624e6c9 | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2015-01-27T18:25:15.000Z | 2022-03-24T00:10:18.000Z | import os
from xdress.utils import apiname
package = 'cppproj'
packagedir = 'cppproj'
includes = ['src']
plugins = ('xdress.autoall', 'xdress.pep8names', 'xdress.cythongen',
'xdress.stlwrap', )
extra_types = 'cppproj_extra_types' # non-default value
dtypes = [
('map', 'str', 'int'),
('set', 'int'),
'float32',
('vector', 'int32'),
'ThreeNums',
]
stlcontainers = [
('pair', 'int', ('vector', 'int')),
('pair', 'int', 'str'),
('pair', 'int', 'int'),
('pair', 'int', 'SomeCrazyPairValue'),
('pair', 'ThreeNums', 'int'),
('vector', 'float64'),
('vector', 'str'),
('vector', 'int32'),
('vector', 'complex'),
('vector', ('vector', 'float64')),
('set', 'int'),
('set', 'str'),
('set', 'uint'),
('set', 'char'),
('set', 'ThreeNums'),
('map', 'str', 'str'),
('map', 'str', 'int'),
('map', 'int', 'str'),
('map', 'str', 'uint'),
('map', 'uint', 'str'),
('map', 'uint', 'uint'),
('map', 'str', 'float'),
('map', 'ThreeNums', 'float'),
('map', 'int', 'int'),
('map', 'int', 'bool'),
('map', 'int', 'char'),
('map', 'int', 'float'),
('map', 'uint', 'float'),
('map', 'int', 'complex'),
('map', ('pair', 'int', 'int'), 'float'),
('map', 'int', ('set', 'int')),
('map', 'int', ('set', 'str')),
('map', 'int', ('set', 'uint')),
('map', 'int', ('set', 'char')),
('map', 'int', ('vector', 'str')),
('map', 'int', ('vector', 'int')),
('map', 'int', ('vector', 'uint')),
('map', 'int', ('vector', 'char')),
('map', 'int', ('vector', 'bool')),
('map', 'int', ('vector', 'float')),
('map', 'int', ('vector', ('vector', 'float64'))),
('map', 'int', ('map', 'int', 'bool')),
('map', 'int', ('map', 'int', 'char')),
('map', 'int', ('map', 'int', 'float')),
('map', 'int', ('map', 'int', ('vector', 'bool'))),
('map', 'int', ('map', 'int', ('vector', 'char'))),
('map', 'int', ('map', 'int', ('vector', 'float'))),
('map', 'int', ('vector', ('set', 'int'))),
]
dtypes_module = 'dt'
stlcontainers_module = 'stlc'
_fromsrcdir = lambda x: os.path.join('src', x)
_inbasics = {'srcfiles': _fromsrcdir('basics.[ch]*'),
'incfiles': 'basics.hpp', # trick to get around cython generating *.h
'language': 'c++',
}
_indiscovery = {'srcfiles': _fromsrcdir('discovery*'),
'incfiles': 'discovery.h',
'language': 'c++',
}
variables = [
apiname('PersonID', tarbase='pybasics', **_inbasics),
apiname('*', **_indiscovery),
]
functions = [
apiname('voided', **_inbasics),
apiname('pairs_be_crazy', tarbase='pybasics', **_inbasics),
apiname('call_with_void_fp_struct', **_inbasics),
{'srcname': 'func0',
'tarname': 'a_better_name',
'incfiles': 'basics.h',
'srcfiles': _fromsrcdir('basics.[ch]*')},
apiname('func1', **_inbasics),
apiname('func2', **_inbasics),
apiname('func3', **_inbasics),
apiname('func4', tarbase='pybasics', **_inbasics),
apiname('setfunc', **_inbasics),
apiname(('findmin', 'int32', 'float32',), **_inbasics),
apiname(('findmin', 'float64', 'float32',), **_inbasics),
{'srcname': ('findmin', 'int', 'int',),
'incfiles': 'basics.h',
'tarname': ('regmin', 'int', 'int',),
'srcfiles': _fromsrcdir('basics.[ch]*')},
{'srcname': ('findmin', 'bool', 'bool',),
'tarname': 'sillyBoolMin',
'incfiles': 'basics.h',
'srcfiles': _fromsrcdir('basics.[ch]*')},
apiname(('lessthan', 'int32', 3,), **_inbasics),
apiname('call_threenums_op_from_c', tarbase='pybasics', **_inbasics),
apiname('*', **_indiscovery),
]
classes = [
#apiname('struct0', 'basics', 'pybasics', 'My_Struct_0'), FIXME This needs more work
apiname('Union0', **_inbasics),
apiname('VoidFPStruct', **_inbasics),
apiname('A', **_inbasics),
apiname('B', **_inbasics),
apiname('C', **_inbasics),
apiname('SomeCrazyPairValue', tarbase='pybasics', **_inbasics),
# apiname('SomeCrazyPairValue', **_inbasics),
apiname(('TClass1', 'int32'), **_inbasics),
apiname(('TClass1', 'float64'), **_inbasics),
{'srcname': ('TClass1', 'float32'),
'tarname': 'TC1Floater',
'incfiles': 'basics.h',
'srcfiles': _fromsrcdir('basics.[ch]*')},
apiname(('TClass0', 'int32'), **_inbasics),
apiname(('TClass0', 'float64'), **_inbasics),
{'srcname': ('TClass0', 'bool'),
'tarname': ('TC0Bool', 'bool'),
'incfiles': 'basics.h',
'srcfiles': _fromsrcdir('basics.[ch]*')},
apiname('Untemplated', **_inbasics),
apiname('ThreeNums', tarbase='pybasics', **_inbasics),
apiname('*', **_indiscovery),
apiname(('TClass0', 'float32'), **_inbasics),
apiname(('TClass2', 'float32'), **_inbasics),
apiname('NoDefault', **_inbasics),
apiname('NoDefaultChild', **_inbasics),
apiname(('EnumArg', 'JOAN'), tarbase='pybasics', **_inbasics),
]
del os
del apiname
| 33.210526 | 89 | 0.522187 |
72b766456e6162990d0a72bfeab659fdbe69bb40 | 1,259 | py | Python | routines/server.py | henryshunt/c-aws | 6e15bb18c2243f11a129b01298cb31749033f8d4 | [
"MIT"
] | null | null | null | routines/server.py | henryshunt/c-aws | 6e15bb18c2243f11a129b01298cb31749033f8d4 | [
"MIT"
] | null | null | null | routines/server.py | henryshunt/c-aws | 6e15bb18c2243f11a129b01298cb31749033f8d4 | [
"MIT"
] | null | null | null | import os
import subprocess
import routines.config as config
import routines.helpers as helpers
def get_static_info():
""" Outputs data concerning the computer in the C-AWS station
"""
startup_time = None
data_drive_space = None
camera_drive_space = None
# Get system startup time
try:
startup_time = (subprocess
.check_output(["uptime", "-s"]).decode().rstrip())
except: pass
# Get data and camera drive space
if config.load() == True:
if os.path.isdir(config.data_directory):
free_space = helpers.remaining_space(config.data_directory)
if free_space != None:
data_drive_space = round(free_space, 2)
if (config.camera_directory != None and os.path.isdir(
config.camera_directory) and os.path.ismount(
config.camera_directory)):
free_space = helpers.remaining_space(config.camera_directory)
if free_space != None:
camera_drive_space = round(free_space, 2)
print(str(helpers.none_to_null(startup_time)) + "\n"
+ str(helpers.none_to_null(data_drive_space)) + "\n"
+ str(helpers.none_to_null(camera_drive_space))) | 33.131579 | 74 | 0.629071 |
72b93e836d4145542223f40d01a9abd8ec9065ef | 654 | py | Python | DQM/DTMonitorModule/python/dtChamberEfficiencyHI_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | DQM/DTMonitorModule/python/dtChamberEfficiencyHI_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | DQM/DTMonitorModule/python/dtChamberEfficiencyHI_cfi.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
from RecoMuon.TrackingTools.MuonServiceProxy_cff import MuonServiceProxy
dtEfficiencyMonitor = cms.EDAnalyzer("DTChamberEfficiency",
MuonServiceProxy,
debug = cms.untracked.bool(True),
TrackCollection = cms.InputTag("standAloneMuons"),
theMaxChi2 = cms.double(1000.),
theNSigma = cms.double(3.),
theMinNrec = cms.double(5.),
dt4DSegments = cms.InputTag("dt4DSegments"),
theRPCRecHits = cms.InputTag("dummy"),
thegemRecHits = cms.InputTag("dummy"),
cscSegments = cms.InputTag("dummy"),
RPCLayers = cms.bool(False),
NavigationType = cms.string("Standard")
)
| 32.7 | 73 | 0.717125 |
72b949d8e04cbc755aaffda65747d7946fc2a6d5 | 217 | py | Python | gym_reinmav/envs/mujoco/__init__.py | peterminh227/reinmav-gym | 518122b16b86d59f744b3116e6187dafd49a3de4 | [
"BSD-3-Clause"
] | 60 | 2019-03-08T21:14:38.000Z | 2022-01-23T20:43:21.000Z | gym_reinmav/envs/mujoco/__init__.py | peterminh227/reinmav-gym | 518122b16b86d59f744b3116e6187dafd49a3de4 | [
"BSD-3-Clause"
] | 8 | 2019-03-09T09:09:38.000Z | 2022-03-25T15:36:51.000Z | gym_reinmav/envs/mujoco/__init__.py | peterminh227/reinmav-gym | 518122b16b86d59f744b3116e6187dafd49a3de4 | [
"BSD-3-Clause"
] | 22 | 2019-03-08T19:47:49.000Z | 2022-03-29T09:14:01.000Z | from gym_reinmav.envs.mujoco.mujoco_quad import MujocoQuadEnv
from gym_reinmav.envs.mujoco.mujoco_quad_hovering import MujocoQuadHoveringEnv
from gym_reinmav.envs.mujoco.mujoco_quad_quat import MujocoQuadQuaternionEnv | 72.333333 | 78 | 0.907834 |
72ba794e4ffc0f8c96701df9930a1aeef6a247aa | 3,075 | py | Python | test.py | jasonivey/scripts | 09f9702e5ce62abbb7699aae16b45b33711fe856 | [
"MIT"
] | null | null | null | test.py | jasonivey/scripts | 09f9702e5ce62abbb7699aae16b45b33711fe856 | [
"MIT"
] | null | null | null | test.py | jasonivey/scripts | 09f9702e5ce62abbb7699aae16b45b33711fe856 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# vim:softtabstop=4:ts=4:sw=4:expandtab:tw=120
from ansimarkup import AnsiMarkup, parse
import csv
import datetime
import operator
import os
from pathlib import Path
import re
import sys
import traceback
_VERBOSE = False
user_tags = {
'error' : parse('<bold><red>'),
'name' : parse('<bold><cyan>'),
'value' : parse('<bold><white>'),
}
am = AnsiMarkup(tags=user_tags)
if __name__ == '__main__':
sys.exit(main(sys.argv))
| 35.755814 | 103 | 0.666016 |
72ba9085ddab97bd04e95141330b44b2e8f9e59c | 625 | py | Python | RDyn-master/rdyn/test/rdyn_test.py | nogrady/dynamo | 4a94453c810cb6cd0eb976c6db9e379cfb2e1f3b | [
"MIT"
] | 12 | 2020-02-05T10:24:54.000Z | 2022-02-24T02:26:00.000Z | RDyn-master/rdyn/test/rdyn_test.py | nogrady/dynamo | 4a94453c810cb6cd0eb976c6db9e379cfb2e1f3b | [
"MIT"
] | 4 | 2020-12-03T04:24:24.000Z | 2021-09-18T13:14:50.000Z | RDyn-master/rdyn/test/rdyn_test.py | nogrady/dynamo | 4a94453c810cb6cd0eb976c6db9e379cfb2e1f3b | [
"MIT"
] | 6 | 2019-07-30T12:55:44.000Z | 2021-09-05T06:26:18.000Z | import unittest
import shutil
from rdyn.alg.RDyn_v2 import RDynV2
if __name__ == '__main__':
unittest.main()
| 24.038462 | 99 | 0.6384 |